| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 /******/ var __webpack_modules__ = ({ 2 3 /***/ 622: 4 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5 6 /* harmony export */ __webpack_require__.d(__webpack_exports__, { 7 /* harmony export */ Ob: () => (/* binding */ K), 8 /* harmony export */ Qv: () => (/* binding */ J), 9 /* harmony export */ XX: () => (/* binding */ G), 10 /* harmony export */ fF: () => (/* binding */ l), 11 /* harmony export */ h: () => (/* binding */ _), 12 /* harmony export */ q6: () => (/* binding */ Q), 13 /* harmony export */ uA: () => (/* binding */ x), 14 /* harmony export */ zO: () => (/* binding */ t) 15 /* harmony export */ }); 16 /* unused harmony exports Fragment, createElement, createRef, toChildArray */ 17 var n,l,u,t,i,r,o,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m(l,e,i,r,null)}function m(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?S(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!$.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)($)}function $(){for(var n,u,t,r,o,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N(f,t,c),r.__e=r.__=null,t.__e!=o&&C(t)));$.__r=0}function I(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):w(o)?m(k,{children:o},null,null,null):null==o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,r;if("function"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function H(n,l){return l=l||[],null==n||"boolean"==typeof n||(w(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function T(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y.test(l)?u:u+"px"}function j(n,l,u,t,i){var r,o;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T(n.style,l,u[l])}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f,"$1")),o=l.toLowerCase(),l=o in n||"onFocusOut"==l||"onFocusIn"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,r?a:s,r)):n.removeEventListener(l,r?a:s,r);else{if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,w(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(T=o.length;T--;)g(o[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function V(n){return"object"!=typeof n||null==n||n.__b&&n.__b>0?n:w(n)?n.map(V):d({},n)}function q(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),b=i.props||p,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=d;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j(u,a,null,d,o)}for(a in k)d=k[a],"children"==a?y=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?_=d:"checked"==a?m=d:c&&"function"!=typeof d||b[a]===d||j(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I("template"==t.type?u.content:u,w(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j(u,a,m,b[a],o))}return u}function B(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D(i[r],u,t||"function"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!r&&i||t).__k=_(k,null,[u]),o||p,p,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,r,o,e,f=d({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,r||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c="__cC"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d({},this.state),"function"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0; 18 19 20 /***/ }) 21 22 /******/ }); 23 /************************************************************************/ 24 /******/ // The module cache 25 /******/ var __webpack_module_cache__ = {}; 26 /******/ 27 /******/ // The require function 28 /******/ function __webpack_require__(moduleId) { 29 /******/ // Check if module is in cache 30 /******/ var cachedModule = __webpack_module_cache__[moduleId]; 31 /******/ if (cachedModule !== undefined) { 32 /******/ return cachedModule.exports; 33 /******/ } 34 /******/ // Create a new module (and put it into the cache) 35 /******/ var module = __webpack_module_cache__[moduleId] = { 36 /******/ // no module.id needed 37 /******/ // no module.loaded needed 38 /******/ exports: {} 39 /******/ }; 40 /******/ 41 /******/ // Execute the module function 42 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 43 /******/ 44 /******/ // Return the exports of the module 45 /******/ return module.exports; 46 /******/ } 47 /******/ 48 /************************************************************************/ 49 /******/ /* webpack/runtime/define property getters */ 50 /******/ (() => { 51 /******/ // define getter functions for harmony exports 52 /******/ __webpack_require__.d = (exports, definition) => { 53 /******/ for(var key in definition) { 54 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 55 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 56 /******/ } 57 /******/ } 58 /******/ }; 59 /******/ })(); 60 /******/ 61 /******/ /* webpack/runtime/hasOwnProperty shorthand */ 62 /******/ (() => { 63 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 64 /******/ })(); 65 /******/ 66 /************************************************************************/ 67 var __webpack_exports__ = {}; 68 69 // EXPORTS 70 __webpack_require__.d(__webpack_exports__, { 71 zj: () => (/* reexport */ getConfig), 72 SD: () => (/* reexport */ getContext), 73 V6: () => (/* reexport */ getElement), 74 $K: () => (/* reexport */ getServerContext), 75 vT: () => (/* reexport */ getServerState), 76 jb: () => (/* binding */ privateApis), 77 yT: () => (/* reexport */ splitTask), 78 M_: () => (/* reexport */ store), 79 hb: () => (/* reexport */ useCallback), 80 vJ: () => (/* reexport */ useEffect), 81 ip: () => (/* reexport */ useInit), 82 Nf: () => (/* reexport */ useLayoutEffect), 83 Kr: () => (/* reexport */ useMemo), 84 li: () => (/* reexport */ A), 85 J0: () => (/* reexport */ d), 86 FH: () => (/* reexport */ useWatch), 87 v4: () => (/* reexport */ withScope), 88 mh: () => (/* reexport */ withSyncEvent) 89 }); 90 91 // EXTERNAL MODULE: ./node_modules/preact/dist/preact.module.js 92 var preact_module = __webpack_require__(622); 93 ;// ./node_modules/preact/hooks/dist/hooks.module.js 94 var hooks_module_t,r,hooks_module_u,i,hooks_module_o=0,hooks_module_f=[],hooks_module_c=preact_module/* options */.fF,e=hooks_module_c.__b,a=hooks_module_c.__r,v=hooks_module_c.diffed,l=hooks_module_c.__c,m=hooks_module_c.unmount,s=hooks_module_c.__;function p(n,t){hooks_module_c.__h&&hooks_module_c.__h(r,n,hooks_module_o||t),hooks_module_o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return hooks_module_o=1,h(D,n)}function h(n,u,i){var o=p(hooks_module_t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=p(hooks_module_t++,3);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(hooks_module_t++,4);!hooks_module_c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return hooks_module_o=5,T(function(){return{current:n}},[])}function F(n,t,r){hooks_module_o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(hooks_module_t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return hooks_module_o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=p(hooks_module_t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){hooks_module_c.useDebugValue&&hooks_module_c.useDebugValue(t?t(n):n)}function b(n){var u=p(hooks_module_t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=p(hooks_module_t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++}return n.__}function j(){for(var n;n=hooks_module_f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],hooks_module_c.__e(t,n.__v)}}hooks_module_c.__b=function(n){r=null,e&&e(n)},hooks_module_c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},hooks_module_c.__r=function(n){a&&a(n),hooks_module_t=0;var i=(r=n.__c).__H;i&&(hooks_module_u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],hooks_module_t=0)),hooks_module_u=r},hooks_module_c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==hooks_module_f.push(t)&&i===hooks_module_c.requestAnimationFrame||((i=hooks_module_c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hooks_module_u=r=null},hooks_module_c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],hooks_module_c.__e(r,n.__v)}}),l&&l(n,t)},hooks_module_c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&hooks_module_c.__e(t,r.__v))};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return"function"==typeof t?t(n):t} 95 96 ;// ./node_modules/@preact/signals-core/dist/signals-core.module.js 97 var signals_core_module_i=Symbol.for("preact-signals");function signals_core_module_t(){if(!(signals_core_module_s>1)){var i,t=!1;while(void 0!==signals_core_module_h){var r=signals_core_module_h;signals_core_module_h=void 0;signals_core_module_f++;while(void 0!==r){var o=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&signals_core_module_c(r))try{r.c()}catch(r){if(!t){i=r;t=!0}}r=o}}signals_core_module_f=0;signals_core_module_s--;if(t)throw i}else signals_core_module_s--}function signals_core_module_r(i){if(signals_core_module_s>0)return i();signals_core_module_s++;try{return i()}finally{signals_core_module_t()}}var signals_core_module_o=void 0;function n(i){var t=signals_core_module_o;signals_core_module_o=void 0;try{return i()}finally{signals_core_module_o=t}}var signals_core_module_h=void 0,signals_core_module_s=0,signals_core_module_f=0,signals_core_module_v=0;function signals_core_module_e(i){if(void 0!==signals_core_module_o){var t=i.n;if(void 0===t||t.t!==signals_core_module_o){t={i:0,S:i,p:signals_core_module_o.s,n:void 0,t:signals_core_module_o,e:void 0,x:void 0,r:t};if(void 0!==signals_core_module_o.s)signals_core_module_o.s.n=t;signals_core_module_o.s=t;i.n=t;if(32&signals_core_module_o.f)i.S(t);return t}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=signals_core_module_o.s;t.n=void 0;signals_core_module_o.s.n=t;signals_core_module_o.s=t}return t}}}function signals_core_module_u(i,t){this.v=i;this.i=0;this.n=void 0;this.t=void 0;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}signals_core_module_u.prototype.brand=signals_core_module_i;signals_core_module_u.prototype.h=function(){return!0};signals_core_module_u.prototype.S=function(i){var t=this,r=this.t;if(r!==i&&void 0===i.e){i.x=r;this.t=i;if(void 0!==r)r.e=i;else n(function(){var i;null==(i=t.W)||i.call(t)})}};signals_core_module_u.prototype.U=function(i){var t=this;if(void 0!==this.t){var r=i.e,o=i.x;if(void 0!==r){r.x=o;i.e=void 0}if(void 0!==o){o.e=r;i.x=void 0}if(i===this.t){this.t=o;if(void 0===o)n(function(){var i;null==(i=t.Z)||i.call(t)})}}};signals_core_module_u.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=signals_core_module_o;signals_core_module_o=void 0;try{i(r)}finally{signals_core_module_o=n}},{name:"sub"})};signals_core_module_u.prototype.valueOf=function(){return this.value};signals_core_module_u.prototype.toString=function(){return this.value+""};signals_core_module_u.prototype.toJSON=function(){return this.value};signals_core_module_u.prototype.peek=function(){var i=signals_core_module_o;signals_core_module_o=void 0;try{return this.value}finally{signals_core_module_o=i}};Object.defineProperty(signals_core_module_u.prototype,"value",{get:function(){var i=signals_core_module_e(this);if(void 0!==i)i.i=this.i;return this.v},set:function(i){if(i!==this.v){if(signals_core_module_f>100)throw new Error("Cycle detected");this.v=i;this.i++;signals_core_module_v++;signals_core_module_s++;try{for(var r=this.t;void 0!==r;r=r.x)r.t.N()}finally{signals_core_module_t()}}}});function signals_core_module_d(i,t){return new signals_core_module_u(i,t)}function signals_core_module_c(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function signals_core_module_a(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break}}}function signals_core_module_l(i){var t=i.s,r=void 0;while(void 0!==t){var o=t.p;if(-1===t.i){t.S.U(t);if(void 0!==o)o.n=t.n;if(void 0!==t.n)t.n.p=o}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=o}i.s=r}function signals_core_module_y(i,t){signals_core_module_u.call(this,void 0);this.x=i;this.s=void 0;this.g=signals_core_module_v-1;this.f=4;this.W=null==t?void 0:t.watched;this.Z=null==t?void 0:t.unwatched;this.name=null==t?void 0:t.name}signals_core_module_y.prototype=new signals_core_module_u;signals_core_module_y.prototype.h=function(){this.f&=-3;if(1&this.f)return!1;if(32==(36&this.f))return!0;this.f&=-5;if(this.g===signals_core_module_v)return!0;this.g=signals_core_module_v;this.f|=1;if(this.i>0&&!signals_core_module_c(this)){this.f&=-2;return!0}var i=signals_core_module_o;try{signals_core_module_a(this);signals_core_module_o=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++}}catch(i){this.v=i;this.f|=16;this.i++}signals_core_module_o=i;signals_core_module_l(this);this.f&=-2;return!0};signals_core_module_y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}signals_core_module_u.prototype.S.call(this,i)};signals_core_module_y.prototype.U=function(i){if(void 0!==this.t){signals_core_module_u.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}}};signals_core_module_y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N()}};Object.defineProperty(signals_core_module_y.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var i=signals_core_module_e(this);this.h();if(void 0!==i)i.i=this.i;if(16&this.f)throw this.v;return this.v}});function signals_core_module_w(i,t){return new signals_core_module_y(i,t)}function signals_core_module_(i){var r=i.u;i.u=void 0;if("function"==typeof r){signals_core_module_s++;var n=signals_core_module_o;signals_core_module_o=void 0;try{r()}catch(t){i.f&=-2;i.f|=8;signals_core_module_b(i);throw t}finally{signals_core_module_o=n;signals_core_module_t()}}}function signals_core_module_b(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;signals_core_module_(i)}function signals_core_module_g(i){if(signals_core_module_o!==this)throw new Error("Out-of-order effect");signals_core_module_l(this);signals_core_module_o=i;this.f&=-2;if(8&this.f)signals_core_module_b(this);signals_core_module_t()}function signals_core_module_p(i,t){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;this.name=null==t?void 0:t.name}signals_core_module_p.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t}finally{i()}};signals_core_module_p.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1;this.f&=-9;signals_core_module_(this);signals_core_module_a(this);signals_core_module_s++;var i=signals_core_module_o;signals_core_module_o=this;return signals_core_module_g.bind(this,i)};signals_core_module_p.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=signals_core_module_h;signals_core_module_h=this}};signals_core_module_p.prototype.d=function(){this.f|=8;if(!(1&this.f))signals_core_module_b(this)};signals_core_module_p.prototype.dispose=function(){this.d()};function E(i,t){var r=new signals_core_module_p(i,t);try{r.c()}catch(i){r.d();throw i}var o=r.d.bind(r);o[Symbol.dispose]=o;return o} 98 ;// ./node_modules/@preact/signals/dist/signals.module.js 99 var signals_module_v,signals_module_s;function signals_module_l(i,n){preact_module/* options */.fF[i]=n.bind(null,preact_module/* options */.fF[i]||function(){})}function signals_module_d(i){if(signals_module_s)signals_module_s();signals_module_s=i&&i.S()}function signals_module_h(i){var r=this,f=i.data,o=useSignal(f);o.value=f;var e=T(function(){var i=r.__v;while(i=i.__)if(i.__c){i.__c.__$f|=4;break}r.__$u.c=function(){var i,t=r.__$u.S(),f=e.value;t();if((0,preact_module/* isValidElement */.zO)(f)||3!==(null==(i=r.base)?void 0:i.nodeType)){r.__$f|=1;r.setState({})}else r.base.data=f};return signals_core_module_w(function(){var i=o.value.value;return 0===i?0:!0===i?"":i||""})},[]);return e.value}signals_module_h.displayName="_st";Object.defineProperties(signals_core_module_u.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:signals_module_h},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});signals_module_l("__b",function(i,r){if("string"==typeof r.type){var n,t=r.props;for(var f in t)if("children"!==f){var o=t[f];if(o instanceof signals_core_module_u){if(!n)r.__np=n={};n[f]=o;t[f]=o.peek()}}}i(r)});signals_module_l("__r",function(i,r){signals_module_d();var n,t=r.__c;if(t){t.__$f&=-2;if(void 0===(n=t.__$u))t.__$u=n=function(i){var r;E(function(){r=this});r.c=function(){t.__$f|=1;t.setState({})};return r}()}signals_module_v=t;signals_module_d(n);i(r)});signals_module_l("__e",function(i,r,n,t){signals_module_d();signals_module_v=void 0;i(r,n,t)});signals_module_l("diffed",function(i,r){signals_module_d();signals_module_v=void 0;var n;if("string"==typeof r.type&&(n=r.__e)){var t=r.__np,f=r.props;if(t){var o=n.U;if(o)for(var e in o){var u=o[e];if(void 0!==u&&!(e in t)){u.d();o[e]=void 0}}else n.U=o={};for(var a in t){var c=o[a],s=t[a];if(void 0===c){c=signals_module_p(n,a,s,f);o[a]=c}else c.o(s,f)}}}i(r)});function signals_module_p(i,r,n,t){var f=r in i&&void 0===i.ownerSVGElement,o=signals_core_module_d(n);return{o:function(i,r){o.value=i;t=r},d:E(function(){var n=o.value.value;if(t[r]!==n){t[r]=n;if(f)i[r]=n;else if(n)i.setAttribute(r,n);else i.removeAttribute(r)}})}}signals_module_l("unmount",function(i,r){if("string"==typeof r.type){var n=r.__e;if(n){var t=n.U;if(t){n.U=void 0;for(var f in t){var o=t[f];if(o)o.d()}}}}else{var e=r.__c;if(e){var u=e.__$u;if(u){e.__$u=void 0;u.d()}}}i(r)});signals_module_l("__h",function(i,r,n,t){if(t<3||9===t)r.__$f|=2;i(r,n,t)});preact_module/* Component */.uA.prototype.shouldComponentUpdate=function(i,r){var n=this.__$u,t=n&&void 0!==n.s;for(var f in r)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){if(!(t||2&this.__$f||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(t||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var o in i)if("__source"!==o&&i[o]!==this.props[o])return!0;for(var e in this.props)if(!(e in i))return!0;return!1};function useSignal(i){return T(function(){return signals_core_module_d(i)},[])}function useComputed(i){var r=f(i);r.current=i;signals_module_v.__$f|=4;return t(function(){return u(function(){return r.current()})},[])}function useSignalEffect(i){var r=f(i);r.current=i;o(function(){return c(function(){return r.current()})},[])} 100 ;// ./node_modules/@wordpress/interactivity/build-module/namespaces.js 101 const namespaceStack = []; 102 const getNamespace = () => namespaceStack.slice(-1)[0]; 103 const setNamespace = (namespace) => { 104 namespaceStack.push(namespace); 105 }; 106 const resetNamespace = () => { 107 namespaceStack.pop(); 108 }; 109 110 111 ;// ./node_modules/@wordpress/interactivity/build-module/scopes.js 112 113 114 const scopeStack = []; 115 const getScope = () => scopeStack.slice(-1)[0]; 116 const setScope = (scope) => { 117 scopeStack.push(scope); 118 }; 119 const resetScope = () => { 120 scopeStack.pop(); 121 }; 122 const throwNotInScope = (method) => { 123 throw Error( 124 `Cannot call \`$method}()\` when there is no scope. If you are using an async function, please consider using a generator instead. If you are using some sort of async callbacks, like \`setTimeout\`, please wrap the callback with \`withScope(callback)\`.` 125 ); 126 }; 127 const getContext = (namespace) => { 128 const scope = getScope(); 129 if (true) { 130 if (!scope) { 131 throwNotInScope("getContext"); 132 } 133 } 134 return scope.context[namespace || getNamespace()]; 135 }; 136 const getElement = () => { 137 const scope = getScope(); 138 let deepReadOnlyOptions = {}; 139 if (true) { 140 if (!scope) { 141 throwNotInScope("getElement"); 142 } 143 deepReadOnlyOptions = { 144 errorMessage: "Don't mutate the attributes from `getElement`, use `data-wp-bind` to modify the attributes of an element instead." 145 }; 146 } 147 const { ref, attributes } = scope; 148 return Object.freeze({ 149 ref: ref.current, 150 attributes: deepReadOnly(attributes, deepReadOnlyOptions) 151 }); 152 }; 153 function getServerContext(namespace) { 154 const scope = getScope(); 155 if (true) { 156 if (!scope) { 157 throwNotInScope("getServerContext"); 158 } 159 } 160 getServerContext.subscribe = navigationSignal.value; 161 return scope.serverContext[namespace || getNamespace()]; 162 } 163 getServerContext.subscribe = 0; 164 165 166 ;// ./node_modules/@wordpress/interactivity/build-module/utils.js 167 168 169 170 171 const afterNextFrame = (callback) => { 172 return new Promise((resolve) => { 173 const done = () => { 174 clearTimeout(timeout); 175 window.cancelAnimationFrame(raf); 176 setTimeout(() => { 177 callback(); 178 resolve(); 179 }); 180 }; 181 const timeout = setTimeout(done, 100); 182 const raf = window.requestAnimationFrame(done); 183 }); 184 }; 185 const splitTask = typeof window.scheduler?.yield === "function" ? window.scheduler.yield.bind(window.scheduler) : () => { 186 return new Promise((resolve) => { 187 setTimeout(resolve, 0); 188 }); 189 }; 190 function createFlusher(compute, notify) { 191 let flush = () => void 0; 192 const dispose = E(function() { 193 flush = this.c.bind(this); 194 this.x = compute; 195 this.c = notify; 196 return compute(); 197 }); 198 return { flush, dispose }; 199 } 200 function utils_useSignalEffect(callback) { 201 y(() => { 202 let eff = null; 203 let isExecuting = false; 204 const notify = async () => { 205 if (eff && !isExecuting) { 206 isExecuting = true; 207 await afterNextFrame(eff.flush); 208 isExecuting = false; 209 } 210 }; 211 eff = createFlusher(callback, notify); 212 return eff.dispose; 213 }, []); 214 } 215 function withScope(func) { 216 const scope = getScope(); 217 const ns = getNamespace(); 218 let wrapped; 219 if (func?.constructor?.name === "GeneratorFunction") { 220 wrapped = async (...args) => { 221 const gen = func(...args); 222 let value; 223 let it; 224 let error; 225 while (true) { 226 setNamespace(ns); 227 setScope(scope); 228 try { 229 it = error ? gen.throw(error) : gen.next(value); 230 error = void 0; 231 } catch (e) { 232 throw e; 233 } finally { 234 resetScope(); 235 resetNamespace(); 236 } 237 try { 238 value = await it.value; 239 } catch (e) { 240 error = e; 241 } 242 if (it.done) { 243 if (error) { 244 throw error; 245 } else { 246 break; 247 } 248 } 249 } 250 return value; 251 }; 252 } else { 253 wrapped = (...args) => { 254 setNamespace(ns); 255 setScope(scope); 256 try { 257 return func(...args); 258 } finally { 259 resetNamespace(); 260 resetScope(); 261 } 262 }; 263 } 264 const syncAware = func; 265 if (syncAware.sync) { 266 const syncAwareWrapped = wrapped; 267 syncAwareWrapped.sync = true; 268 return syncAwareWrapped; 269 } 270 return wrapped; 271 } 272 function useWatch(callback) { 273 utils_useSignalEffect(withScope(callback)); 274 } 275 function useInit(callback) { 276 y(withScope(callback), []); 277 } 278 function useEffect(callback, inputs) { 279 y(withScope(callback), inputs); 280 } 281 function useLayoutEffect(callback, inputs) { 282 _(withScope(callback), inputs); 283 } 284 function useCallback(callback, inputs) { 285 return q(withScope(callback), inputs); 286 } 287 function useMemo(factory, inputs) { 288 return T(withScope(factory), inputs); 289 } 290 const createRootFragment = (parent, replaceNode) => { 291 replaceNode = [].concat(replaceNode); 292 const sibling = replaceNode[replaceNode.length - 1].nextSibling; 293 function insert(child, root) { 294 parent.insertBefore(child, root || sibling); 295 } 296 return parent.__k = { 297 nodeType: 1, 298 parentNode: parent, 299 firstChild: replaceNode[0], 300 childNodes: replaceNode, 301 insertBefore: insert, 302 appendChild: insert, 303 removeChild(c) { 304 parent.removeChild(c); 305 }, 306 contains(c) { 307 parent.contains(c); 308 } 309 }; 310 }; 311 function kebabToCamelCase(str) { 312 return str.replace(/^-+|-+$/g, "").toLowerCase().replace(/-([a-z])/g, function(_match, group1) { 313 return group1.toUpperCase(); 314 }); 315 } 316 const logged = /* @__PURE__ */ new Set(); 317 const warn = (message) => { 318 if (true) { 319 if (logged.has(message)) { 320 return; 321 } 322 console.warn(message); 323 try { 324 throw Error(message); 325 } catch (e) { 326 } 327 logged.add(message); 328 } 329 }; 330 const isPlainObject = (candidate) => Boolean( 331 candidate && typeof candidate === "object" && candidate.constructor === Object 332 ); 333 function withSyncEvent(callback) { 334 const syncAware = callback; 335 syncAware.sync = true; 336 return syncAware; 337 } 338 const readOnlyMap = /* @__PURE__ */ new WeakMap(); 339 const createDeepReadOnlyHandlers = (errorMessage) => { 340 const handleError = () => { 341 if (true) { 342 warn(errorMessage); 343 } 344 return false; 345 }; 346 return { 347 get(target, prop) { 348 const value = target[prop]; 349 if (value && typeof value === "object") { 350 return deepReadOnly(value, { errorMessage }); 351 } 352 return value; 353 }, 354 set: handleError, 355 deleteProperty: handleError, 356 defineProperty: handleError 357 }; 358 }; 359 function deepReadOnly(obj, options) { 360 const errorMessage = options?.errorMessage ?? "Cannot modify read-only object"; 361 if (!readOnlyMap.has(obj)) { 362 const handlers = createDeepReadOnlyHandlers(errorMessage); 363 readOnlyMap.set(obj, new Proxy(obj, handlers)); 364 } 365 return readOnlyMap.get(obj); 366 } 367 const navigationSignal = signals_core_module_d(0); 368 369 370 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/registry.js 371 const objToProxy = /* @__PURE__ */ new WeakMap(); 372 const proxyToObj = /* @__PURE__ */ new WeakMap(); 373 const proxyToNs = /* @__PURE__ */ new WeakMap(); 374 const supported = /* @__PURE__ */ new Set([Object, Array]); 375 const createProxy = (namespace, obj, handlers) => { 376 if (!shouldProxy(obj)) { 377 throw Error("This object cannot be proxified."); 378 } 379 if (!objToProxy.has(obj)) { 380 const proxy = new Proxy(obj, handlers); 381 objToProxy.set(obj, proxy); 382 proxyToObj.set(proxy, obj); 383 proxyToNs.set(proxy, namespace); 384 } 385 return objToProxy.get(obj); 386 }; 387 const getProxyFromObject = (obj) => objToProxy.get(obj); 388 const getNamespaceFromProxy = (proxy) => proxyToNs.get(proxy); 389 const shouldProxy = (candidate) => { 390 if (typeof candidate !== "object" || candidate === null) { 391 return false; 392 } 393 return !proxyToNs.has(candidate) && supported.has(candidate.constructor); 394 }; 395 const getObjectFromProxy = (proxy) => proxyToObj.get(proxy); 396 397 398 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/signals.js 399 400 401 402 403 404 const NO_SCOPE = {}; 405 class PropSignal { 406 /** 407 * Proxy that holds the property this PropSignal is associated with. 408 */ 409 owner; 410 /** 411 * Relation of computeds by scope. These computeds are read-only signals 412 * that depend on whether the property is a value or a getter and, 413 * therefore, can return different values depending on the scope in which 414 * the getter is accessed. 415 */ 416 computedsByScope; 417 /** 418 * Signal with the value assigned to the related property. 419 */ 420 valueSignal; 421 /** 422 * Signal with the getter assigned to the related property. 423 */ 424 getterSignal; 425 /** 426 * Pending getter to be consolidated. 427 */ 428 pendingGetter; 429 /** 430 * Structure that manages reactivity for a property in a state object, using 431 * signals to keep track of property value or getter modifications. 432 * 433 * @param owner Proxy that holds the property this instance is associated 434 * with. 435 */ 436 constructor(owner) { 437 this.owner = owner; 438 this.computedsByScope = /* @__PURE__ */ new WeakMap(); 439 } 440 /** 441 * Changes the internal value. If a getter was set before, it is set to 442 * `undefined`. 443 * 444 * @param value New value. 445 */ 446 setValue(value) { 447 this.update({ value }); 448 } 449 /** 450 * Changes the internal getter. If a value was set before, it is set to 451 * `undefined`. 452 * 453 * @param getter New getter. 454 */ 455 setGetter(getter) { 456 this.update({ get: getter }); 457 } 458 /** 459 * Changes the internal getter asynchronously. 460 * 461 * The update is made in a microtask, which prevents issues with getters 462 * accessing the state, and ensures the update occurs before any render. 463 * 464 * @param getter New getter. 465 */ 466 setPendingGetter(getter) { 467 this.pendingGetter = getter; 468 queueMicrotask(() => this.consolidateGetter()); 469 } 470 /** 471 * Consolidate the pending value of the getter. 472 */ 473 consolidateGetter() { 474 const getter = this.pendingGetter; 475 if (getter) { 476 this.pendingGetter = void 0; 477 this.update({ get: getter }); 478 } 479 } 480 /** 481 * Returns the computed that holds the result of evaluating the prop in the 482 * current scope. 483 * 484 * These computeds are read-only signals that depend on whether the property 485 * is a value or a getter and, therefore, can return different values 486 * depending on the scope in which the getter is accessed. 487 * 488 * @return Computed that depends on the scope. 489 */ 490 getComputed() { 491 const scope = getScope() || NO_SCOPE; 492 if (!this.valueSignal && !this.getterSignal) { 493 this.update({}); 494 } 495 if (this.pendingGetter) { 496 this.consolidateGetter(); 497 } 498 if (!this.computedsByScope.has(scope)) { 499 const callback = () => { 500 const getter = this.getterSignal?.value; 501 return getter ? getter.call(this.owner) : this.valueSignal?.value; 502 }; 503 setNamespace(getNamespaceFromProxy(this.owner)); 504 this.computedsByScope.set( 505 scope, 506 signals_core_module_w(withScope(callback)) 507 ); 508 resetNamespace(); 509 } 510 return this.computedsByScope.get(scope); 511 } 512 /** 513 * Updates the internal signals for the value and the getter of the 514 * corresponding prop. 515 * 516 * @param param0 517 * @param param0.get New getter. 518 * @param param0.value New value. 519 */ 520 update({ get, value }) { 521 if (!this.valueSignal) { 522 this.valueSignal = signals_core_module_d(value); 523 this.getterSignal = signals_core_module_d(get); 524 } else if (value !== this.valueSignal.peek() || get !== this.getterSignal.peek()) { 525 signals_core_module_r(() => { 526 this.valueSignal.value = value; 527 this.getterSignal.value = get; 528 }); 529 } 530 } 531 } 532 533 534 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/state.js 535 536 537 538 539 540 const wellKnownSymbols = new Set( 541 Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter((value) => typeof value === "symbol") 542 ); 543 const proxyToProps = /* @__PURE__ */ new WeakMap(); 544 const hasPropSignal = (proxy, key) => proxyToProps.has(proxy) && proxyToProps.get(proxy).has(key); 545 const getPropSignal = (proxy, key, initial) => { 546 if (!proxyToProps.has(proxy)) { 547 proxyToProps.set(proxy, /* @__PURE__ */ new Map()); 548 } 549 key = typeof key === "number" ? `$key}` : key; 550 const props = proxyToProps.get(proxy); 551 if (!props.has(key)) { 552 const ns = getNamespaceFromProxy(proxy); 553 const prop = new PropSignal(proxy); 554 props.set(key, prop); 555 if (initial) { 556 const { get, value } = initial; 557 if (get) { 558 prop.setGetter(get); 559 } else { 560 prop.setValue( 561 shouldProxy(value) ? proxifyState(ns, value) : value 562 ); 563 } 564 } 565 } 566 return props.get(key); 567 }; 568 const objToIterable = /* @__PURE__ */ new WeakMap(); 569 let peeking = false; 570 const PENDING_GETTER = Symbol("PENDING_GETTER"); 571 const stateHandlers = { 572 get(target, key, receiver) { 573 if (peeking || !target.hasOwnProperty(key) && key in target || typeof key === "symbol" && wellKnownSymbols.has(key)) { 574 return Reflect.get(target, key, receiver); 575 } 576 const desc = Object.getOwnPropertyDescriptor(target, key); 577 const prop = getPropSignal(receiver, key, desc); 578 const result = prop.getComputed().value; 579 if (result === PENDING_GETTER) { 580 throw PENDING_GETTER; 581 } 582 if (typeof result === "function") { 583 const ns = getNamespaceFromProxy(receiver); 584 return (...args) => { 585 setNamespace(ns); 586 try { 587 return result.call(receiver, ...args); 588 } finally { 589 resetNamespace(); 590 } 591 }; 592 } 593 return result; 594 }, 595 set(target, key, value, receiver) { 596 setNamespace(getNamespaceFromProxy(receiver)); 597 try { 598 return Reflect.set(target, key, value, receiver); 599 } finally { 600 resetNamespace(); 601 } 602 }, 603 defineProperty(target, key, desc) { 604 const isNew = !(key in target); 605 const result = Reflect.defineProperty(target, key, desc); 606 if (result) { 607 const receiver = getProxyFromObject(target); 608 const prop = getPropSignal(receiver, key); 609 const { get, value } = desc; 610 if (get) { 611 prop.setGetter(get); 612 } else { 613 const ns = getNamespaceFromProxy(receiver); 614 prop.setValue( 615 shouldProxy(value) ? proxifyState(ns, value) : value 616 ); 617 } 618 if (isNew && objToIterable.has(target)) { 619 objToIterable.get(target).value++; 620 } 621 if (Array.isArray(target) && proxyToProps.get(receiver)?.has("length")) { 622 const length = getPropSignal(receiver, "length"); 623 length.setValue(target.length); 624 } 625 } 626 return result; 627 }, 628 deleteProperty(target, key) { 629 const result = Reflect.deleteProperty(target, key); 630 if (result) { 631 const prop = getPropSignal(getProxyFromObject(target), key); 632 prop.setValue(void 0); 633 if (objToIterable.has(target)) { 634 objToIterable.get(target).value++; 635 } 636 } 637 return result; 638 }, 639 ownKeys(target) { 640 if (!objToIterable.has(target)) { 641 objToIterable.set(target, signals_core_module_d(0)); 642 } 643 objToIterable._ = objToIterable.get(target).value; 644 return Reflect.ownKeys(target); 645 } 646 }; 647 const proxifyState = (namespace, obj) => { 648 return createProxy(namespace, obj, stateHandlers); 649 }; 650 const peek = (obj, key) => { 651 peeking = true; 652 try { 653 return obj[key]; 654 } finally { 655 peeking = false; 656 } 657 }; 658 const deepMergeRecursive = (target, source, override = true) => { 659 if (!(isPlainObject(target) && isPlainObject(source))) { 660 return; 661 } 662 let hasNewKeys = false; 663 for (const key in source) { 664 const isNew = !(key in target); 665 hasNewKeys = hasNewKeys || isNew; 666 const desc = Object.getOwnPropertyDescriptor(source, key); 667 const proxy = getProxyFromObject(target); 668 const propSignal = !!proxy && hasPropSignal(proxy, key) && getPropSignal(proxy, key); 669 if (typeof desc.get === "function" || typeof desc.set === "function") { 670 if (override || isNew) { 671 Object.defineProperty(target, key, { 672 ...desc, 673 configurable: true, 674 enumerable: true 675 }); 676 if (desc.get && propSignal) { 677 propSignal.setPendingGetter(desc.get); 678 } 679 } 680 } else if (isPlainObject(source[key])) { 681 const targetValue = Object.getOwnPropertyDescriptor(target, key)?.value; 682 if (isNew || override && !isPlainObject(targetValue)) { 683 target[key] = {}; 684 if (propSignal) { 685 const ns = getNamespaceFromProxy(proxy); 686 propSignal.setValue( 687 proxifyState(ns, target[key]) 688 ); 689 } 690 deepMergeRecursive(target[key], source[key], override); 691 } else if (isPlainObject(targetValue)) { 692 deepMergeRecursive(target[key], source[key], override); 693 } 694 } else if (override || isNew) { 695 Object.defineProperty(target, key, desc); 696 if (propSignal) { 697 const { value } = desc; 698 const ns = getNamespaceFromProxy(proxy); 699 propSignal.setValue( 700 shouldProxy(value) ? proxifyState(ns, value) : value 701 ); 702 } 703 } 704 } 705 if (hasNewKeys && objToIterable.has(target)) { 706 objToIterable.get(target).value++; 707 } 708 }; 709 const deepMerge = (target, source, override = true) => signals_core_module_r( 710 () => deepMergeRecursive( 711 getObjectFromProxy(target) || target, 712 source, 713 override 714 ) 715 ); 716 717 718 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/store.js 719 720 721 722 const storeRoots = /* @__PURE__ */ new WeakSet(); 723 const storeHandlers = { 724 get: (target, key, receiver) => { 725 const result = Reflect.get(target, key); 726 const ns = getNamespaceFromProxy(receiver); 727 if (typeof result === "undefined" && storeRoots.has(receiver)) { 728 const obj = {}; 729 Reflect.set(target, key, obj); 730 return proxifyStore(ns, obj, false); 731 } 732 if (typeof result === "function") { 733 setNamespace(ns); 734 const scoped = withScope(result); 735 resetNamespace(); 736 return scoped; 737 } 738 if (isPlainObject(result) && shouldProxy(result)) { 739 return proxifyStore(ns, result, false); 740 } 741 return result; 742 } 743 }; 744 const proxifyStore = (namespace, obj, isRoot = true) => { 745 const proxy = createProxy(namespace, obj, storeHandlers); 746 if (proxy && isRoot) { 747 storeRoots.add(proxy); 748 } 749 return proxy; 750 }; 751 752 753 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/context.js 754 const contextObjectToProxy = /* @__PURE__ */ new WeakMap(); 755 const contextObjectToFallback = /* @__PURE__ */ new WeakMap(); 756 const contextProxies = /* @__PURE__ */ new WeakSet(); 757 const descriptor = Reflect.getOwnPropertyDescriptor; 758 const contextHandlers = { 759 get: (target, key) => { 760 const fallback = contextObjectToFallback.get(target); 761 const currentProp = target[key]; 762 return key in target ? currentProp : fallback[key]; 763 }, 764 set: (target, key, value) => { 765 const fallback = contextObjectToFallback.get(target); 766 const obj = key in target || !(key in fallback) ? target : fallback; 767 obj[key] = value; 768 return true; 769 }, 770 ownKeys: (target) => [ 771 .../* @__PURE__ */ new Set([ 772 ...Object.keys(contextObjectToFallback.get(target)), 773 ...Object.keys(target) 774 ]) 775 ], 776 getOwnPropertyDescriptor: (target, key) => descriptor(target, key) || descriptor(contextObjectToFallback.get(target), key), 777 has: (target, key) => Reflect.has(target, key) || Reflect.has(contextObjectToFallback.get(target), key) 778 }; 779 const proxifyContext = (current, inherited = {}) => { 780 if (contextProxies.has(current)) { 781 throw Error("This object cannot be proxified."); 782 } 783 contextObjectToFallback.set(current, inherited); 784 if (!contextObjectToProxy.has(current)) { 785 const proxy = new Proxy(current, contextHandlers); 786 contextObjectToProxy.set(current, proxy); 787 contextProxies.add(proxy); 788 } 789 return contextObjectToProxy.get(current); 790 }; 791 792 793 ;// ./node_modules/@wordpress/interactivity/build-module/proxies/index.js 794 795 796 797 798 799 ;// ./node_modules/@wordpress/interactivity/build-module/store.js 800 801 802 803 804 const stores = /* @__PURE__ */ new Map(); 805 const rawStores = /* @__PURE__ */ new Map(); 806 const storeLocks = /* @__PURE__ */ new Map(); 807 const storeConfigs = /* @__PURE__ */ new Map(); 808 const serverStates = /* @__PURE__ */ new Map(); 809 const getConfig = (namespace) => storeConfigs.get(namespace || getNamespace()) || {}; 810 function getServerState(namespace) { 811 const ns = namespace || getNamespace(); 812 if (!serverStates.has(ns)) { 813 serverStates.set(ns, deepReadOnly({})); 814 } 815 getServerState.subscribe = navigationSignal.value; 816 return serverStates.get(ns); 817 } 818 getServerState.subscribe = 0; 819 const universalUnlock = "I acknowledge that using a private store means my plugin will inevitably break on the next store release."; 820 function store(namespace, { state = {}, ...block } = {}, { lock = false } = {}) { 821 if (!stores.has(namespace)) { 822 if (lock !== universalUnlock) { 823 storeLocks.set(namespace, lock); 824 } 825 const rawStore = { 826 state: proxifyState( 827 namespace, 828 isPlainObject(state) ? state : {} 829 ), 830 ...block 831 }; 832 const proxifiedStore = proxifyStore(namespace, rawStore); 833 rawStores.set(namespace, rawStore); 834 stores.set(namespace, proxifiedStore); 835 } else { 836 if (lock !== universalUnlock && !storeLocks.has(namespace)) { 837 storeLocks.set(namespace, lock); 838 } else { 839 const storeLock = storeLocks.get(namespace); 840 const isLockValid = lock === universalUnlock || lock !== true && lock === storeLock; 841 if (!isLockValid) { 842 if (!storeLock) { 843 throw Error("Cannot lock a public store"); 844 } else { 845 throw Error( 846 "Cannot unlock a private store with an invalid lock code" 847 ); 848 } 849 } 850 } 851 const target = rawStores.get(namespace); 852 deepMerge(target, block); 853 deepMerge(target.state, state); 854 } 855 return stores.get(namespace); 856 } 857 const parseServerData = (dom = document) => { 858 const jsonDataScriptTag = ( 859 // Preferred Script Module data passing form 860 dom.getElementById( 861 "wp-script-module-data-@wordpress/interactivity" 862 ) ?? // Legacy form 863 dom.getElementById("wp-interactivity-data") 864 ); 865 if (jsonDataScriptTag?.textContent) { 866 try { 867 return JSON.parse(jsonDataScriptTag.textContent); 868 } catch { 869 } 870 } 871 return {}; 872 }; 873 const populateServerData = (data2) => { 874 serverStates.clear(); 875 storeConfigs.clear(); 876 if (isPlainObject(data2?.state)) { 877 Object.entries(data2.state).forEach(([namespace, state]) => { 878 const st = store(namespace, {}, { lock: universalUnlock }); 879 deepMerge(st.state, state, false); 880 serverStates.set(namespace, deepReadOnly(state)); 881 }); 882 } 883 if (isPlainObject(data2?.config)) { 884 Object.entries(data2.config).forEach(([namespace, config]) => { 885 storeConfigs.set(namespace, config); 886 }); 887 } 888 if (isPlainObject(data2?.derivedStateClosures)) { 889 Object.entries(data2.derivedStateClosures).forEach( 890 ([namespace, paths]) => { 891 const st = store( 892 namespace, 893 {}, 894 { lock: universalUnlock } 895 ); 896 paths.forEach((path) => { 897 const pathParts = path.split("."); 898 const prop = pathParts.splice(-1, 1)[0]; 899 const parent = pathParts.reduce( 900 (prev, key) => prev[key], 901 st 902 ); 903 if (isPlainObject(parent[prop])) { 904 parent[prop] = PENDING_GETTER; 905 } 906 }); 907 } 908 ); 909 } 910 navigationSignal.value += 1; 911 }; 912 const data = parseServerData(); 913 populateServerData(data); 914 915 916 ;// ./node_modules/@wordpress/interactivity/build-module/hooks.js 917 918 919 920 921 922 923 function isNonDefaultDirectiveSuffix(entry) { 924 return entry.suffix !== null; 925 } 926 function isDefaultDirectiveSuffix(entry) { 927 return entry.suffix === null; 928 } 929 const context = (0,preact_module/* createContext */.q6)({ client: {}, server: {} }); 930 const directiveCallbacks = {}; 931 const directivePriorities = {}; 932 const directive = (name, callback, { priority = 10 } = {}) => { 933 directiveCallbacks[name] = callback; 934 directivePriorities[name] = priority; 935 }; 936 const resolve = (path, namespace) => { 937 if (!namespace) { 938 warn( 939 `Namespace missing for "$path}". The value for that path won't be resolved.` 940 ); 941 return; 942 } 943 let resolvedStore = stores.get(namespace); 944 if (typeof resolvedStore === "undefined") { 945 resolvedStore = store( 946 namespace, 947 {}, 948 { 949 lock: universalUnlock 950 } 951 ); 952 } 953 const current = { 954 ...resolvedStore, 955 context: getScope().context[namespace] 956 }; 957 try { 958 const pathParts = path.split("."); 959 return pathParts.reduce((acc, key) => acc[key], current); 960 } catch (e) { 961 if (e === PENDING_GETTER) { 962 return PENDING_GETTER; 963 } 964 } 965 }; 966 const getEvaluate = ({ scope }) => ( 967 // TODO: When removing the temporarily remaining `value( ...args )` call below, remove the `...args` parameter too. 968 (entry, ...args) => { 969 let { value: path, namespace } = entry; 970 if (typeof path !== "string") { 971 throw new Error("The `value` prop should be a string path"); 972 } 973 const hasNegationOperator = path[0] === "!" && !!(path = path.slice(1)); 974 setScope(scope); 975 const value = resolve(path, namespace); 976 if (typeof value === "function") { 977 if (hasNegationOperator) { 978 warn( 979 "Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead." 980 ); 981 const functionResult = !value(...args); 982 resetScope(); 983 return functionResult; 984 } 985 resetScope(); 986 const wrappedFunction = (...functionArgs) => { 987 setScope(scope); 988 const functionResult = value(...functionArgs); 989 resetScope(); 990 return functionResult; 991 }; 992 if (value.sync) { 993 const syncAwareFunction = wrappedFunction; 994 syncAwareFunction.sync = true; 995 } 996 return wrappedFunction; 997 } 998 const result = value; 999 resetScope(); 1000 return hasNegationOperator && value !== PENDING_GETTER ? !result : result; 1001 } 1002 ); 1003 const getPriorityLevels = (directives) => { 1004 const byPriority = Object.keys(directives).reduce((obj, name) => { 1005 if (directiveCallbacks[name]) { 1006 const priority = directivePriorities[name]; 1007 (obj[priority] = obj[priority] || []).push(name); 1008 } 1009 return obj; 1010 }, {}); 1011 return Object.entries(byPriority).sort(([p1], [p2]) => parseInt(p1) - parseInt(p2)).map(([, arr]) => arr); 1012 }; 1013 const Directives = ({ 1014 directives, 1015 priorityLevels: [currentPriorityLevel, ...nextPriorityLevels], 1016 element, 1017 originalProps, 1018 previousScope 1019 }) => { 1020 const scope = A({}).current; 1021 scope.evaluate = q(getEvaluate({ scope }), []); 1022 const { client, server } = x(context); 1023 scope.context = client; 1024 scope.serverContext = server; 1025 scope.ref = previousScope?.ref || A(null); 1026 element = (0,preact_module/* cloneElement */.Ob)(element, { ref: scope.ref }); 1027 scope.attributes = element.props; 1028 const children = nextPriorityLevels.length > 0 ? (0,preact_module.h)(Directives, { 1029 directives, 1030 priorityLevels: nextPriorityLevels, 1031 element, 1032 originalProps, 1033 previousScope: scope 1034 }) : element; 1035 const props = { ...originalProps, children }; 1036 const directiveArgs = { 1037 directives, 1038 props, 1039 element, 1040 context, 1041 evaluate: scope.evaluate 1042 }; 1043 setScope(scope); 1044 for (const directiveName of currentPriorityLevel) { 1045 const wrapper = directiveCallbacks[directiveName]?.(directiveArgs); 1046 if (wrapper !== void 0) { 1047 props.children = wrapper; 1048 } 1049 } 1050 resetScope(); 1051 return props.children; 1052 }; 1053 const old = preact_module/* options */.fF.vnode; 1054 preact_module/* options */.fF.vnode = (vnode) => { 1055 if (vnode.props.__directives) { 1056 const props = vnode.props; 1057 const directives = props.__directives; 1058 if (directives.key) { 1059 vnode.key = directives.key.find(isDefaultDirectiveSuffix).value; 1060 } 1061 delete props.__directives; 1062 const priorityLevels = getPriorityLevels(directives); 1063 if (priorityLevels.length > 0) { 1064 vnode.props = { 1065 directives, 1066 priorityLevels, 1067 originalProps: props, 1068 type: vnode.type, 1069 element: (0,preact_module.h)(vnode.type, props), 1070 top: true 1071 }; 1072 vnode.type = Directives; 1073 } 1074 } 1075 if (old) { 1076 old(vnode); 1077 } 1078 }; 1079 1080 1081 ;// ./node_modules/@wordpress/interactivity/build-module/directives.js 1082 1083 1084 1085 1086 1087 1088 1089 1090 const warnUniqueIdWithTwoHyphens = (prefix, suffix, uniqueId) => { 1091 if (true) { 1092 warn( 1093 `The usage of data-wp-$prefix}--$suffix}$uniqueId ? `--$uniqueId}` : ""} (two hyphens for unique ID) is deprecated and will stop working in WordPress 7.0. Please use data-wp-$prefix}$uniqueId ? `--$suffix}---$uniqueId}` : `---$suffix}`} (three hyphens for unique ID) from now on.` 1094 ); 1095 } 1096 }; 1097 const warnUniqueIdNotSupported = (prefix, uniqueId) => { 1098 if (true) { 1099 warn( 1100 `Unique IDs are not supported for the data-wp-$prefix} directive. Ignoring the directive with unique ID "$uniqueId}".` 1101 ); 1102 } 1103 }; 1104 const warnWithSyncEvent = (wrongPrefix, rightPrefix) => { 1105 if (true) { 1106 warn( 1107 `The usage of data-wp-$wrongPrefix} is deprecated and will stop working in WordPress 7.0. Please, use data-wp-$rightPrefix} with the withSyncEvent() helper from now on.` 1108 ); 1109 } 1110 }; 1111 function deepClone(source) { 1112 if (isPlainObject(source)) { 1113 return Object.fromEntries( 1114 Object.entries(source).map(([key, value]) => [ 1115 key, 1116 deepClone(value) 1117 ]) 1118 ); 1119 } 1120 if (Array.isArray(source)) { 1121 return source.map((i) => deepClone(i)); 1122 } 1123 return source; 1124 } 1125 function wrapEventAsync(event) { 1126 const handler = { 1127 get(target, prop, receiver) { 1128 const value = target[prop]; 1129 switch (prop) { 1130 case "currentTarget": 1131 if (true) { 1132 warn( 1133 `Accessing the synchronous event.$prop} property in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().` 1134 ); 1135 } 1136 break; 1137 case "preventDefault": 1138 case "stopImmediatePropagation": 1139 case "stopPropagation": 1140 if (true) { 1141 warn( 1142 `Using the synchronous event.$prop}() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 7.0. Please wrap the store action in withSyncEvent().` 1143 ); 1144 } 1145 break; 1146 } 1147 if (value instanceof Function) { 1148 return function(...args) { 1149 return value.apply( 1150 this === receiver ? target : this, 1151 args 1152 ); 1153 }; 1154 } 1155 return value; 1156 } 1157 }; 1158 return new Proxy(event, handler); 1159 } 1160 const newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g; 1161 const ruleClean = /\/\*[^]*?\*\/| +/g; 1162 const ruleNewline = /\n+/g; 1163 const empty = " "; 1164 const cssStringToObject = (val) => { 1165 const tree = [{}]; 1166 let block, left; 1167 while (block = newRule.exec(val.replace(ruleClean, ""))) { 1168 if (block[4]) { 1169 tree.shift(); 1170 } else if (block[3]) { 1171 left = block[3].replace(ruleNewline, empty).trim(); 1172 tree.unshift(tree[0][left] = tree[0][left] || {}); 1173 } else { 1174 tree[0][block[1]] = block[2].replace(ruleNewline, empty).trim(); 1175 } 1176 } 1177 return tree[0]; 1178 }; 1179 const getGlobalEventDirective = (type) => { 1180 return ({ directives, evaluate }) => { 1181 directives[`on-$type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1182 const suffixParts = entry.suffix.split("--", 2); 1183 const eventName = suffixParts[0]; 1184 if (true) { 1185 if (suffixParts[1]) { 1186 warnUniqueIdWithTwoHyphens( 1187 `on-$type}`, 1188 suffixParts[0], 1189 suffixParts[1] 1190 ); 1191 } 1192 } 1193 useInit(() => { 1194 const cb = (event) => { 1195 const result = evaluate(entry); 1196 if (typeof result === "function") { 1197 if (!result?.sync) { 1198 event = wrapEventAsync(event); 1199 } 1200 result(event); 1201 } 1202 }; 1203 const globalVar = type === "window" ? window : document; 1204 globalVar.addEventListener(eventName, cb); 1205 return () => globalVar.removeEventListener(eventName, cb); 1206 }); 1207 }); 1208 }; 1209 }; 1210 const evaluateItemKey = (inheritedValue, namespace, item, itemProp, eachKey) => { 1211 const clientContextWithItem = { 1212 ...inheritedValue.client, 1213 [namespace]: { 1214 ...inheritedValue.client[namespace], 1215 [itemProp]: item 1216 } 1217 }; 1218 const scope = { 1219 ...getScope(), 1220 context: clientContextWithItem, 1221 serverContext: inheritedValue.server 1222 }; 1223 return eachKey ? getEvaluate({ scope })(eachKey) : item; 1224 }; 1225 const useItemContexts = function* (inheritedValue, namespace, items, itemProp, eachKey) { 1226 const { current: itemContexts } = A(/* @__PURE__ */ new Map()); 1227 for (const item of items) { 1228 const key = evaluateItemKey( 1229 inheritedValue, 1230 namespace, 1231 item, 1232 itemProp, 1233 eachKey 1234 ); 1235 if (!itemContexts.has(key)) { 1236 itemContexts.set( 1237 key, 1238 proxifyContext( 1239 proxifyState(namespace, { 1240 // Inits the item prop in the context to shadow it in case 1241 // it was inherited from the parent context. The actual 1242 // value is set in the `wp-each` directive later on. 1243 [itemProp]: void 0 1244 }), 1245 inheritedValue.client[namespace] 1246 ) 1247 ); 1248 } 1249 yield [item, itemContexts.get(key), key]; 1250 } 1251 }; 1252 const getGlobalAsyncEventDirective = (type) => { 1253 return ({ directives, evaluate }) => { 1254 directives[`on-async-$type}`].filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1255 if (true) { 1256 warnWithSyncEvent(`on-async-$type}`, `on-$type}`); 1257 } 1258 const eventName = entry.suffix.split("--", 1)[0]; 1259 useInit(() => { 1260 const cb = async (event) => { 1261 await splitTask(); 1262 const result = evaluate(entry); 1263 if (typeof result === "function") { 1264 result(event); 1265 } 1266 }; 1267 const globalVar = type === "window" ? window : document; 1268 globalVar.addEventListener(eventName, cb, { 1269 passive: true 1270 }); 1271 return () => globalVar.removeEventListener(eventName, cb); 1272 }); 1273 }); 1274 }; 1275 }; 1276 const routerRegions = /* @__PURE__ */ new Map(); 1277 var directives_default = () => { 1278 directive( 1279 "context", 1280 ({ 1281 directives: { context }, 1282 props: { children }, 1283 context: inheritedContext 1284 }) => { 1285 const entries = context.filter(isDefaultDirectiveSuffix).reverse(); 1286 if (!entries.length) { 1287 if (true) { 1288 warn( 1289 "The usage of data-wp-context--unique-id (two hyphens) is not supported. To add a unique ID to the directive, please use data-wp-context---unique-id (three hyphens) instead." 1290 ); 1291 } 1292 return; 1293 } 1294 const { Provider } = inheritedContext; 1295 const { client: inheritedClient, server: inheritedServer } = x(inheritedContext); 1296 const client = A({}); 1297 const server = {}; 1298 const result = { 1299 client: { ...inheritedClient }, 1300 server: { ...inheritedServer } 1301 }; 1302 const namespaces = /* @__PURE__ */ new Set(); 1303 entries.forEach(({ value, namespace, uniqueId }) => { 1304 if (!isPlainObject(value)) { 1305 if (true) { 1306 warn( 1307 `The value of data-wp-context$uniqueId ? `---$uniqueId}` : ""} on the $namespace} namespace must be a valid stringified JSON object.` 1308 ); 1309 } 1310 return; 1311 } 1312 if (!client.current[namespace]) { 1313 client.current[namespace] = proxifyState(namespace, {}); 1314 } 1315 deepMerge( 1316 client.current[namespace], 1317 deepClone(value), 1318 false 1319 ); 1320 server[namespace] = deepReadOnly(value); 1321 namespaces.add(namespace); 1322 }); 1323 namespaces.forEach((namespace) => { 1324 result.client[namespace] = proxifyContext( 1325 client.current[namespace], 1326 inheritedClient[namespace] 1327 ); 1328 result.server[namespace] = proxifyContext( 1329 server[namespace], 1330 inheritedServer[namespace] 1331 ); 1332 }); 1333 return (0,preact_module.h)(Provider, { value: result }, children); 1334 }, 1335 { priority: 5 } 1336 ); 1337 directive("watch", ({ directives: { watch }, evaluate }) => { 1338 watch.forEach((entry) => { 1339 if (true) { 1340 if (entry.suffix) { 1341 warnUniqueIdWithTwoHyphens("watch", entry.suffix); 1342 } 1343 } 1344 useWatch(() => { 1345 let start; 1346 if (false) {} 1347 let result = evaluate(entry); 1348 if (typeof result === "function") { 1349 result = result(); 1350 } 1351 if (false) {} 1352 return result; 1353 }); 1354 }); 1355 }); 1356 directive("init", ({ directives: { init }, evaluate }) => { 1357 init.forEach((entry) => { 1358 if (true) { 1359 if (entry.suffix) { 1360 warnUniqueIdWithTwoHyphens("init", entry.suffix); 1361 } 1362 } 1363 useInit(() => { 1364 let start; 1365 if (false) {} 1366 let result = evaluate(entry); 1367 if (typeof result === "function") { 1368 result = result(); 1369 } 1370 if (false) {} 1371 return result; 1372 }); 1373 }); 1374 }); 1375 directive("on", ({ directives: { on }, element, evaluate }) => { 1376 const events = /* @__PURE__ */ new Map(); 1377 on.filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1378 const suffixParts = entry.suffix.split("--", 2); 1379 if (true) { 1380 if (suffixParts[1]) { 1381 warnUniqueIdWithTwoHyphens( 1382 "on", 1383 suffixParts[0], 1384 suffixParts[1] 1385 ); 1386 } 1387 } 1388 if (!events.has(suffixParts[0])) { 1389 events.set(suffixParts[0], /* @__PURE__ */ new Set()); 1390 } 1391 events.get(suffixParts[0]).add(entry); 1392 }); 1393 events.forEach((entries, eventType) => { 1394 const existingHandler = element.props[`on$eventType}`]; 1395 element.props[`on$eventType}`] = (event) => { 1396 if (existingHandler) { 1397 existingHandler(event); 1398 } 1399 entries.forEach((entry) => { 1400 let start; 1401 if (false) {} 1402 const result = evaluate(entry); 1403 if (typeof result === "function") { 1404 if (!result?.sync) { 1405 event = wrapEventAsync(event); 1406 } 1407 result(event); 1408 } 1409 if (false) {} 1410 }); 1411 }; 1412 }); 1413 }); 1414 directive( 1415 "on-async", 1416 ({ directives: { "on-async": onAsync }, element, evaluate }) => { 1417 if (true) { 1418 warnWithSyncEvent("on-async", "on"); 1419 } 1420 const events = /* @__PURE__ */ new Map(); 1421 onAsync.filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1422 const event = entry.suffix.split("--", 1)[0]; 1423 if (!events.has(event)) { 1424 events.set(event, /* @__PURE__ */ new Set()); 1425 } 1426 events.get(event).add(entry); 1427 }); 1428 events.forEach((entries, eventType) => { 1429 const existingHandler = element.props[`on$eventType}`]; 1430 element.props[`on$eventType}`] = (event) => { 1431 if (existingHandler) { 1432 existingHandler(event); 1433 } 1434 entries.forEach(async (entry) => { 1435 await splitTask(); 1436 const result = evaluate(entry); 1437 if (typeof result === "function") { 1438 result(event); 1439 } 1440 }); 1441 }; 1442 }); 1443 } 1444 ); 1445 directive("on-window", getGlobalEventDirective("window")); 1446 directive("on-document", getGlobalEventDirective("document")); 1447 directive("on-async-window", getGlobalAsyncEventDirective("window")); 1448 directive( 1449 "on-async-document", 1450 getGlobalAsyncEventDirective("document") 1451 ); 1452 directive( 1453 "class", 1454 ({ directives: { class: classNames }, element, evaluate }) => { 1455 classNames.filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1456 const className = entry.uniqueId ? `$entry.suffix}---$entry.uniqueId}` : entry.suffix; 1457 let result = evaluate(entry); 1458 if (result === PENDING_GETTER) { 1459 return; 1460 } 1461 if (typeof result === "function") { 1462 result = result(); 1463 } 1464 const currentClass = element.props.class || ""; 1465 const classFinder = new RegExp( 1466 `(^|\\s)$className}(\\s|$)`, 1467 "g" 1468 ); 1469 if (!result) { 1470 element.props.class = currentClass.replace(classFinder, " ").trim(); 1471 } else if (!classFinder.test(currentClass)) { 1472 element.props.class = currentClass ? `$currentClass} $className}` : className; 1473 } 1474 useInit(() => { 1475 if (!result) { 1476 element.ref.current.classList.remove(className); 1477 } else { 1478 element.ref.current.classList.add(className); 1479 } 1480 }); 1481 }); 1482 } 1483 ); 1484 directive("style", ({ directives: { style }, element, evaluate }) => { 1485 style.filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1486 if (entry.uniqueId) { 1487 if (true) { 1488 warnUniqueIdNotSupported("style", entry.uniqueId); 1489 } 1490 return; 1491 } 1492 const styleProp = entry.suffix; 1493 let result = evaluate(entry); 1494 if (result === PENDING_GETTER) { 1495 return; 1496 } 1497 if (typeof result === "function") { 1498 result = result(); 1499 } 1500 element.props.style = element.props.style || {}; 1501 if (typeof element.props.style === "string") { 1502 element.props.style = cssStringToObject(element.props.style); 1503 } 1504 if (!result) { 1505 delete element.props.style[styleProp]; 1506 } else { 1507 element.props.style[styleProp] = result; 1508 } 1509 useInit(() => { 1510 if (!result) { 1511 element.ref.current.style.removeProperty(styleProp); 1512 } else { 1513 element.ref.current.style.setProperty(styleProp, result); 1514 } 1515 }); 1516 }); 1517 }); 1518 directive("bind", ({ directives: { bind }, element, evaluate }) => { 1519 bind.filter(isNonDefaultDirectiveSuffix).forEach((entry) => { 1520 if (entry.uniqueId) { 1521 if (true) { 1522 warnUniqueIdNotSupported("bind", entry.uniqueId); 1523 } 1524 return; 1525 } 1526 const attribute = entry.suffix; 1527 let result = evaluate(entry); 1528 if (result === PENDING_GETTER) { 1529 return; 1530 } 1531 if (typeof result === "function") { 1532 result = result(); 1533 } 1534 element.props[attribute] = result; 1535 useInit(() => { 1536 const el = element.ref.current; 1537 if (attribute === "style") { 1538 if (typeof result === "string") { 1539 el.style.cssText = result; 1540 } 1541 return; 1542 } else if (attribute !== "width" && attribute !== "height" && attribute !== "href" && attribute !== "list" && attribute !== "form" && /* 1543 * The value for `tabindex` follows the parsing rules for an 1544 * integer. If that fails, or if the attribute isn't present, then 1545 * the browsers should "follow platform conventions to determine if 1546 * the element should be considered as a focusable area", 1547 * practically meaning that most elements get a default of `-1` (not 1548 * focusable), but several also get a default of `0` (focusable in 1549 * order after all elements with a positive `tabindex` value). 1550 * 1551 * @see https://html.spec.whatwg.org/#tabindex-value 1552 */ 1553 attribute !== "tabIndex" && attribute !== "download" && attribute !== "rowSpan" && attribute !== "colSpan" && attribute !== "role" && attribute in el) { 1554 try { 1555 el[attribute] = result === null || result === void 0 ? "" : result; 1556 return; 1557 } catch (err) { 1558 } 1559 } 1560 if (result !== null && result !== void 0 && (result !== false || attribute[4] === "-")) { 1561 el.setAttribute(attribute, result); 1562 } else { 1563 el.removeAttribute(attribute); 1564 } 1565 }); 1566 }); 1567 }); 1568 directive( 1569 "ignore", 1570 ({ 1571 element: { 1572 type: Type, 1573 props: { innerHTML, ...rest } 1574 } 1575 }) => { 1576 if (true) { 1577 warn( 1578 "The data-wp-ignore directive is deprecated and will be removed in version 7.0." 1579 ); 1580 } 1581 const cached = T(() => innerHTML, []); 1582 return (0,preact_module.h)(Type, { 1583 dangerouslySetInnerHTML: { __html: cached }, 1584 ...rest 1585 }); 1586 } 1587 ); 1588 directive("text", ({ directives: { text }, element, evaluate }) => { 1589 const entries = text.filter(isDefaultDirectiveSuffix); 1590 if (!entries.length) { 1591 if (true) { 1592 warn( 1593 "The usage of data-wp-text--suffix is not supported. Please use data-wp-text instead." 1594 ); 1595 } 1596 return; 1597 } 1598 entries.forEach((entry) => { 1599 if (entry.uniqueId) { 1600 if (true) { 1601 warnUniqueIdNotSupported("text", entry.uniqueId); 1602 } 1603 return; 1604 } 1605 try { 1606 let result = evaluate(entry); 1607 if (result === PENDING_GETTER) { 1608 return; 1609 } 1610 if (typeof result === "function") { 1611 result = result(); 1612 } 1613 element.props.children = typeof result === "object" ? null : result.toString(); 1614 } catch (e) { 1615 element.props.children = null; 1616 } 1617 }); 1618 }); 1619 directive("run", ({ directives: { run }, evaluate }) => { 1620 run.forEach((entry) => { 1621 if (true) { 1622 if (entry.suffix) { 1623 warnUniqueIdWithTwoHyphens("run", entry.suffix); 1624 } 1625 } 1626 let result = evaluate(entry); 1627 if (typeof result === "function") { 1628 result = result(); 1629 } 1630 return result; 1631 }); 1632 }); 1633 directive( 1634 "each", 1635 ({ 1636 directives: { each, "each-key": eachKey }, 1637 context: inheritedContext, 1638 element, 1639 evaluate 1640 }) => { 1641 if (element.type !== "template") { 1642 if (true) { 1643 warn( 1644 "The data-wp-each directive can only be used on <template> elements." 1645 ); 1646 } 1647 return; 1648 } 1649 const { Provider } = inheritedContext; 1650 const inheritedValue = x(inheritedContext); 1651 const [entry] = each; 1652 const { namespace, suffix, uniqueId } = entry; 1653 if (each.length > 1) { 1654 if (true) { 1655 warn( 1656 "The usage of multiple data-wp-each directives on the same element is not supported. Please pick only one." 1657 ); 1658 } 1659 return; 1660 } 1661 if (uniqueId) { 1662 if (true) { 1663 warnUniqueIdNotSupported("each", uniqueId); 1664 } 1665 return; 1666 } 1667 let iterable = evaluate(entry); 1668 if (iterable === PENDING_GETTER) { 1669 return; 1670 } 1671 if (typeof iterable === "function") { 1672 iterable = iterable(); 1673 } 1674 if (typeof iterable?.[Symbol.iterator] !== "function") { 1675 return; 1676 } 1677 const itemProp = suffix ? kebabToCamelCase(suffix) : "item"; 1678 const result = []; 1679 const itemContexts = useItemContexts( 1680 inheritedValue, 1681 namespace, 1682 iterable, 1683 itemProp, 1684 eachKey?.[0] 1685 ); 1686 for (const [item, itemContext, key] of itemContexts) { 1687 const mergedContext = { 1688 client: { 1689 ...inheritedValue.client, 1690 [namespace]: itemContext 1691 }, 1692 server: { ...inheritedValue.server } 1693 }; 1694 mergedContext.client[namespace][itemProp] = item; 1695 result.push( 1696 (0,preact_module.h)( 1697 Provider, 1698 { value: mergedContext, key }, 1699 element.props.content 1700 ) 1701 ); 1702 } 1703 return result; 1704 }, 1705 { priority: 20 } 1706 ); 1707 directive( 1708 "each-child", 1709 ({ directives: { "each-child": eachChild }, element, evaluate }) => { 1710 const entry = eachChild.find(isDefaultDirectiveSuffix); 1711 if (!entry) { 1712 return; 1713 } 1714 const iterable = evaluate(entry); 1715 return iterable === PENDING_GETTER ? element : null; 1716 }, 1717 { priority: 1 } 1718 ); 1719 directive( 1720 "router-region", 1721 ({ directives: { "router-region": routerRegion } }) => { 1722 const entry = routerRegion.find(isDefaultDirectiveSuffix); 1723 if (!entry) { 1724 return; 1725 } 1726 if (entry.suffix) { 1727 if (true) { 1728 warn( 1729 `Suffixes for the data-wp-router-region directive are not supported. Ignoring the directive with suffix "$entry.suffix}".` 1730 ); 1731 } 1732 return; 1733 } 1734 if (entry.uniqueId) { 1735 if (true) { 1736 warnUniqueIdNotSupported("router-region", entry.uniqueId); 1737 } 1738 return; 1739 } 1740 const regionId = typeof entry.value === "string" ? entry.value : entry.value.id; 1741 if (!routerRegions.has(regionId)) { 1742 routerRegions.set(regionId, signals_core_module_d()); 1743 } 1744 const vdom = routerRegions.get(regionId).value; 1745 if (vdom && typeof vdom.type !== "string") { 1746 const previousScope = getScope(); 1747 return (0,preact_module/* cloneElement */.Ob)(vdom, { previousScope }); 1748 } 1749 return vdom; 1750 }, 1751 { priority: 1 } 1752 ); 1753 }; 1754 1755 1756 ;// ./node_modules/@wordpress/interactivity/build-module/vdom.js 1757 1758 1759 const directivePrefix = `data-wp-`; 1760 const namespaces = []; 1761 const currentNamespace = () => namespaces[namespaces.length - 1] ?? null; 1762 const isObject = (item) => Boolean(item && typeof item === "object" && item.constructor === Object); 1763 const invalidCharsRegex = /[^a-z0-9-_]/i; 1764 function parseDirectiveName(directiveName) { 1765 const name = directiveName.substring(8); 1766 if (invalidCharsRegex.test(name)) { 1767 return null; 1768 } 1769 const suffixIndex = name.indexOf("--"); 1770 if (suffixIndex === -1) { 1771 return { prefix: name, suffix: null, uniqueId: null }; 1772 } 1773 const prefix = name.substring(0, suffixIndex); 1774 const remaining = name.substring(suffixIndex); 1775 if (remaining.startsWith("---") && remaining[3] !== "-") { 1776 return { 1777 prefix, 1778 suffix: null, 1779 uniqueId: remaining.substring(3) || null 1780 }; 1781 } 1782 let suffix = remaining.substring(2); 1783 const uniqueIdIndex = suffix.indexOf("---"); 1784 if (uniqueIdIndex !== -1 && suffix.substring(uniqueIdIndex)[3] !== "-") { 1785 const uniqueId = suffix.substring(uniqueIdIndex + 3) || null; 1786 suffix = suffix.substring(0, uniqueIdIndex) || null; 1787 return { prefix, suffix, uniqueId }; 1788 } 1789 return { prefix, suffix: suffix || null, uniqueId: null }; 1790 } 1791 const nsPathRegExp = /^([\w_\/-]+)::(.+)$/; 1792 const hydratedIslands = /* @__PURE__ */ new WeakSet(); 1793 function toVdom(root) { 1794 const nodesToRemove = /* @__PURE__ */ new Set(); 1795 const nodesToReplace = /* @__PURE__ */ new Set(); 1796 const treeWalker = document.createTreeWalker( 1797 root, 1798 205 1799 // TEXT + CDATA_SECTION + COMMENT + PROCESSING_INSTRUCTION + ELEMENT 1800 ); 1801 function walk(node) { 1802 const { nodeType } = node; 1803 if (nodeType === 3) { 1804 return node.data; 1805 } 1806 if (nodeType === 4) { 1807 nodesToReplace.add(node); 1808 return node.nodeValue; 1809 } 1810 if (nodeType === 8 || nodeType === 7) { 1811 nodesToRemove.add(node); 1812 return null; 1813 } 1814 const elementNode = node; 1815 const { attributes } = elementNode; 1816 const localName = elementNode.localName; 1817 const props = {}; 1818 const children = []; 1819 const directives = []; 1820 let ignore = false; 1821 let island = false; 1822 for (let i = 0; i < attributes.length; i++) { 1823 const attributeName = attributes[i].name; 1824 const attributeValue = attributes[i].value; 1825 if (attributeName[directivePrefix.length] && attributeName.slice(0, directivePrefix.length) === directivePrefix) { 1826 if (attributeName === "data-wp-ignore") { 1827 ignore = true; 1828 } else { 1829 const regexResult = nsPathRegExp.exec(attributeValue); 1830 const namespace = regexResult?.[1] ?? null; 1831 let value = regexResult?.[2] ?? attributeValue; 1832 try { 1833 const parsedValue = JSON.parse(value); 1834 value = isObject(parsedValue) ? parsedValue : value; 1835 } catch { 1836 } 1837 if (attributeName === "data-wp-interactive") { 1838 island = true; 1839 const islandNamespace = ( 1840 // eslint-disable-next-line no-nested-ternary 1841 typeof value === "string" ? value : typeof value?.namespace === "string" ? value.namespace : null 1842 ); 1843 namespaces.push(islandNamespace); 1844 } else { 1845 directives.push([attributeName, namespace, value]); 1846 } 1847 } 1848 } else if (attributeName === "ref") { 1849 continue; 1850 } 1851 props[attributeName] = attributeValue; 1852 } 1853 if (ignore && !island) { 1854 return [ 1855 (0,preact_module.h)(localName, { 1856 ...props, 1857 innerHTML: elementNode.innerHTML, 1858 __directives: { ignore: true } 1859 }) 1860 ]; 1861 } 1862 if (island) { 1863 hydratedIslands.add(elementNode); 1864 } 1865 if (directives.length) { 1866 props.__directives = directives.reduce((obj, [name, ns, value]) => { 1867 const directiveParsed = parseDirectiveName(name); 1868 if (directiveParsed === null) { 1869 if (true) { 1870 warn(`Found malformed directive name: $name}.`); 1871 } 1872 return obj; 1873 } 1874 const { prefix, suffix, uniqueId } = directiveParsed; 1875 obj[prefix] = obj[prefix] || []; 1876 obj[prefix].push({ 1877 namespace: ns ?? currentNamespace(), 1878 value, 1879 suffix, 1880 uniqueId 1881 }); 1882 return obj; 1883 }, {}); 1884 for (const prefix in props.__directives) { 1885 props.__directives[prefix].sort( 1886 (a, b) => { 1887 const aSuffix = a.suffix ?? ""; 1888 const bSuffix = b.suffix ?? ""; 1889 if (aSuffix !== bSuffix) { 1890 return aSuffix < bSuffix ? -1 : 1; 1891 } 1892 const aId = a.uniqueId ?? ""; 1893 const bId = b.uniqueId ?? ""; 1894 return +(aId > bId) - +(aId < bId); 1895 } 1896 ); 1897 } 1898 } 1899 if (props.__directives?.["each-child"]) { 1900 props.dangerouslySetInnerHTML = { 1901 __html: elementNode.innerHTML 1902 }; 1903 } else if (localName === "template") { 1904 props.content = [ 1905 ...elementNode.content.childNodes 1906 ].map((childNode) => toVdom(childNode)); 1907 } else { 1908 let child = treeWalker.firstChild(); 1909 if (child) { 1910 while (child) { 1911 const vnode = walk(child); 1912 if (vnode) { 1913 children.push(vnode); 1914 } 1915 child = treeWalker.nextSibling(); 1916 } 1917 treeWalker.parentNode(); 1918 } 1919 } 1920 if (island) { 1921 namespaces.pop(); 1922 } 1923 return (0,preact_module.h)(localName, props, children); 1924 } 1925 const vdom = walk(treeWalker.currentNode); 1926 nodesToRemove.forEach( 1927 (node) => node.remove() 1928 ); 1929 nodesToReplace.forEach( 1930 (node) => node.replaceWith( 1931 new window.Text(node.nodeValue ?? "") 1932 ) 1933 ); 1934 return vdom; 1935 } 1936 1937 1938 ;// ./node_modules/@wordpress/interactivity/build-module/init.js 1939 1940 1941 1942 const regionRootFragments = /* @__PURE__ */ new WeakMap(); 1943 const getRegionRootFragment = (regions) => { 1944 const region = Array.isArray(regions) ? regions[0] : regions; 1945 if (!region.parentElement) { 1946 throw Error("The passed region should be an element with a parent."); 1947 } 1948 if (!regionRootFragments.has(region)) { 1949 regionRootFragments.set( 1950 region, 1951 createRootFragment(region.parentElement, regions) 1952 ); 1953 } 1954 return regionRootFragments.get(region); 1955 }; 1956 const initialVdom = /* @__PURE__ */ new WeakMap(); 1957 const init = async () => { 1958 const nodes = document.querySelectorAll(`[data-wp-interactive]`); 1959 await new Promise((resolve) => { 1960 setTimeout(resolve, 0); 1961 }); 1962 for (const node of nodes) { 1963 if (!hydratedIslands.has(node)) { 1964 await splitTask(); 1965 const fragment = getRegionRootFragment(node); 1966 const vdom = toVdom(node); 1967 initialVdom.set(node, vdom); 1968 await splitTask(); 1969 (0,preact_module/* hydrate */.Qv)(vdom, fragment); 1970 } 1971 } 1972 }; 1973 1974 1975 ;// ./node_modules/@wordpress/interactivity/build-module/index.js 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 const requiredConsent = "I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."; 1991 const privateApis = (lock) => { 1992 if (lock === requiredConsent) { 1993 return { 1994 getRegionRootFragment: getRegionRootFragment, 1995 initialVdom: initialVdom, 1996 toVdom: toVdom, 1997 directive: directive, 1998 getNamespace: getNamespace, 1999 h: preact_module.h, 2000 cloneElement: preact_module/* cloneElement */.Ob, 2001 render: preact_module/* render */.XX, 2002 proxifyState: proxifyState, 2003 parseServerData: parseServerData, 2004 populateServerData: populateServerData, 2005 batch: signals_core_module_r, 2006 routerRegions: routerRegions, 2007 deepReadOnly: deepReadOnly, 2008 navigationSignal: navigationSignal 2009 }; 2010 } 2011 throw new Error("Forbidden access."); 2012 }; 2013 directives_default(); 2014 init(); 2015 2016 2017 var __webpack_exports__getConfig = __webpack_exports__.zj; 2018 var __webpack_exports__getContext = __webpack_exports__.SD; 2019 var __webpack_exports__getElement = __webpack_exports__.V6; 2020 var __webpack_exports__getServerContext = __webpack_exports__.$K; 2021 var __webpack_exports__getServerState = __webpack_exports__.vT; 2022 var __webpack_exports__privateApis = __webpack_exports__.jb; 2023 var __webpack_exports__splitTask = __webpack_exports__.yT; 2024 var __webpack_exports__store = __webpack_exports__.M_; 2025 var __webpack_exports__useCallback = __webpack_exports__.hb; 2026 var __webpack_exports__useEffect = __webpack_exports__.vJ; 2027 var __webpack_exports__useInit = __webpack_exports__.ip; 2028 var __webpack_exports__useLayoutEffect = __webpack_exports__.Nf; 2029 var __webpack_exports__useMemo = __webpack_exports__.Kr; 2030 var __webpack_exports__useRef = __webpack_exports__.li; 2031 var __webpack_exports__useState = __webpack_exports__.J0; 2032 var __webpack_exports__useWatch = __webpack_exports__.FH; 2033 var __webpack_exports__withScope = __webpack_exports__.v4; 2034 var __webpack_exports__withSyncEvent = __webpack_exports__.mh; 2035 export { __webpack_exports__getConfig as getConfig, __webpack_exports__getContext as getContext, __webpack_exports__getElement as getElement, __webpack_exports__getServerContext as getServerContext, __webpack_exports__getServerState as getServerState, __webpack_exports__privateApis as privateApis, __webpack_exports__splitTask as splitTask, __webpack_exports__store as store, __webpack_exports__useCallback as useCallback, __webpack_exports__useEffect as useEffect, __webpack_exports__useInit as useInit, __webpack_exports__useLayoutEffect as useLayoutEffect, __webpack_exports__useMemo as useMemo, __webpack_exports__useRef as useRef, __webpack_exports__useState as useState, __webpack_exports__useWatch as useWatch, __webpack_exports__withScope as withScope, __webpack_exports__withSyncEvent as withSyncEvent };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Mon Oct 27 08:20:06 2025 | Cross-referenced by PHPXref |