HamroKhanpin/hamrokhaanpaan/wp-includes/js/dist/compose.min.js

9 lines
32 KiB
JavaScript
Raw Permalink Normal View History

2024-04-29 07:27:44 +00:00
/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.compose=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="PD33")}({"1CF3":function(e,t){e.exports=window.wp.dom},GRId:function(e,t){e.exports=window.wp.element},NMb1:function(e,t){e.exports=window.wp.deprecated},PD33:function(e,t,n){"use strict";n.r(t),n.d(t,"createHigherOrderComponent",(function(){return o})),n.d(t,"compose",(function(){return i})),n.d(t,"ifCondition",(function(){return u})),n.d(t,"pure",(function(){return f})),n.d(t,"withGlobalEvents",(function(){return m})),n.d(t,"withInstanceId",(function(){return y})),n.d(t,"withSafeTimeout",(function(){return g})),n.d(t,"withState",(function(){return E})),n.d(t,"useConstrainedTabbing",(function(){return k})),n.d(t,"useCopyOnClick",(function(){return S})),n.d(t,"useCopyToClipboard",(function(){return L})),n.d(t,"__experimentalUseDialog",(function(){return I})),n.d(t,"__experimentalUseDragging",(function(){return F})),n.d(t,"useFocusOnMount",(function(){return R})),n.d(t,"__experimentalUseFocusOutside",(function(){return M})),n.d(t,"useFocusReturn",(function(){return D})),n.d(t,"useInstanceId",(function(){return b})),n.d(t,"useIsomorphicLayoutEffect",(function(){return N})),n.d(t,"useKeyboardShortcut",(function(){return q})),n.d(t,"useMediaQuery",(function(){return U})),n.d(t,"usePrevious",(function(){return G})),n.d(t,"useReducedMotion",(function(){return z})),n.d(t,"useViewportMatch",(function(){return Y})),n.d(t,"useResizeObserver",(function(){return Q})),n.d(t,"useAsyncList",(function(){return ee})),n.d(t,"useWarnOnChange",(function(){return te})),n.d(t,"useDebounce",(function(){return re})),n.d(t,"useThrottle",(function(){return oe})),n.d(t,"useMergeRefs",(function(){return A})),n.d(t,"useRefEffect",(function(){return T})),n.d(t,"__experimentalUseDropZone",(function(){return ce}));var r=n("YLtl");var o=function(e,t){return n=>{const o=e(n),i=n.displayName||n.name||"Component";return o.displayName=`${Object(r.upperFirst)(Object(r.camelCase)(t))}(${i})`,o}},i=r.flowRight,c=n("GRId");var u=e=>o(t=>n=>e(n)?Object(c.createElement)(t,n):null,"ifCondition"),a=n("rl8x"),s=n.n(a);var f=o(e=>e.prototype instanceof c.Component?class extends e{shouldComponentUpdate(e,t){return!s()(e,this.props)||!s()(t,this.state)}}:class extends c.Component{shouldComponentUpdate(e){return!s()(e,this.props)}render(){return Object(c.createElement)(e,this.props)}},"pure"),l=n("wx14"),d=n("NMb1"),p=n.n(d);const h=new class{constructor(){this.listeners={},this.handleEvent=this.handleEvent.bind(this)}add(e,t){this.listeners[e]||(window.addEventListener(e,this.handleEvent),this.listeners[e]=[]),this.listeners[e].push(t)}remove(e,t){this.listeners[e]=Object(r.without)(this.listeners[e],t),this.listeners[e].length||(window.removeEventListener(e,this.handleEvent),delete this.listeners[e])}handleEvent(e){Object(r.forEach)(this.listeners[e.type],t=>{t.handleEvent(e)})}};function m(e){return p()("wp.compose.withGlobalEvents",{since:"5.7",alternative:"useEffect"}),o(t=>{class n extends c.Component{constructor(){super(...arguments),this.handleEvent=this.handleEvent.bind(this),this.handleRef=this.handleRef.bind(this)}componentDidMount(){Object(r.forEach)(e,(e,t)=>{h.add(t,this)})}componentWillUnmount(){Object(r.forEach)(e,(e,t)=>
/*!
* clipboard.js v2.0.8
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var r;r=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return g}});var r=n(279),o=n.n(r),i=n(370),c=n.n(i),u=n(817),a=n.n(u);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}var t,n,r;return t=e,(n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=a()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=a()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==s(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}])&&f(t.prototype,n),r&&f(t,r),e}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.definePropert