var de,m,Ht,rt,Q,qt,Ft,Ye,nt,Ze,et,Lt,he={},At=[],Gr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,it=Array.isArray;function F(e,t){for(var r in t)e[r]=t[r];return e}function jt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function R(e,t,r){var n,i,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?de.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return _e(e,s,n,i,null)}function _e(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Ht,__i:-1,__u:0};return i==null&&m.vnode!=null&&m.vnode(o),o}function Be(e){return e.children}function oe(e,t){this.props=e,this.context=t}function se(e,t){if(t==null)return e.__?se(e.__,e.__i+1):null;for(var r;tt&&Q.sort(Ye));$e.__r=0}function zt(e,t,r,n,i,o,s,f,u,c,l){var a,h,p,w,P,d=n&&n.__k||At,_=t.length;for(r.__d=u,Or(r,t,d),u=r.__d,a=0;a<_;a++)(p=r.__k[a])!=null&&(h=p.__i===-1?he:d[p.__i]||he,p.__i=a,ot(e,p,h,i,o,s,f,u,c,l),w=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&st(h.ref,null,p),l.push(p.ref,p.__c||w,p)),P==null&&w!=null&&(P=w),65536&p.__u||h.__k===p.__k?u=Kt(p,u,e):typeof p.type=="function"&&p.__d!==void 0?u=p.__d:w&&(u=w.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=u,r.__e=P}function Or(e,t,r){var n,i,o,s,f,u=t.length,c=r.length,l=c,a=0;for(e.__k=[],n=0;n0?_e(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,(f=i.__i=$r(i,r,s,l))!==-1&&(l--,(o=r[f])&&(o.__u|=131072)),o==null||o.__v===null?(f==-1&&a--,typeof i.type!="function"&&(i.__u|=65536)):f!==s&&(f==s-1?a--:f==s+1?a++:(f>s?a--:a++,i.__u|=65536))):i=e.__k[n]=null;if(l)for(n=0;n(u!=null&&(131072&u.__u)==0?1:0))for(;s>=0||f=0){if((u=t[s])&&(131072&u.__u)==0&&i==u.key&&o===u.type)return s;s--}if(f2&&(f.children=arguments.length>3?de.call(arguments,2):r),_e(e.type,f,n||e.key,i||e.ref,null)}function Xt(e,t){var r={__c:t="__cC"+Lt++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(f){f.__e=!0,tt(f)})},this.sub=function(s){i.push(s);var f=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.splice(i.indexOf(s),1),f&&f.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}de=At.slice,m={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(f){e=f}throw e}},Ht=0,rt=function(e){return e!=null&&e.constructor==null},oe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=F({},this.state),typeof e=="function"&&(e=e(F({},r),this.props)),e&&F(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),tt(this))},oe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tt(this))},oe.prototype.render=Be,Q=[],Ft=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ye=function(e,t){return e.__v.__b-t.__v.__b},$e.__r=0,nt=0,Ze=Wt(!1),et=Wt(!0),Lt=0;var X,y,ct,Yt,ve=0,sr=[],b=m,Zt=b.__b,er=b.__r,tr=b.diffed,rr=b.__c,nr=b.unmount,ir=b.__;function me(e,t){b.__h&&b.__h(y,e,ve||t),ve=0;var r=y.__H||(y.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Mr(e){return ve=1,Wr(ar,e)}function Wr(e,t,r){var n=me(X++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ar(void 0,t),function(f){var u=n.__N?n.__N[0]:n.__[0],c=n.t(u,f);u!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=y,!y.u)){var i=function(f,u,c){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(h){return!!h.__c});if(l.every(function(h){return!h.__N}))return!o||o.call(this,f,u,c);var a=!1;return l.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(a=!0)}}),!(!a&&n.__c.props===f)&&(!o||o.call(this,f,u,c))};y.u=!0;var o=y.shouldComponentUpdate,s=y.componentWillUpdate;y.componentWillUpdate=function(f,u,c){if(this.__e){var l=o;o=void 0,i(f,u,c),o=l}s&&s.call(this,f,u,c)},y.shouldComponentUpdate=i}return n.__N||n.__}function ge(e,t){var r=me(X++,3);!b.__s&<(r.__H,t)&&(r.__=e,r.i=t,y.__H.__h.push(r))}function Me(e,t){var r=me(X++,4);!b.__s&<(r.__H,t)&&(r.__=e,r.i=t,y.__h.push(r))}function j(e){return ve=5,L(function(){return{current:e}},[])}function L(e,t){var r=me(X++,7);return lt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function We(e,t){return ve=8,L(function(){return e},t)}function ye(e){var t=y.context[e.__c],r=me(X++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(y)),t.props.value):e.__}function Hr(){for(var e;e=sr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qe),e.__H.__h.forEach(ut),e.__H.__h=[]}catch(t){e.__H.__h=[],b.__e(t,e.__v)}}b.__b=function(e){y=null,Zt&&Zt(e)},b.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ir&&ir(e,t)},b.__r=function(e){er&&er(e),X=0;var t=(y=e.__c).__H;t&&(ct===y?(t.__h=[],y.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(qe),t.__h.forEach(ut),t.__h=[],X=0)),ct=y},b.diffed=function(e){tr&&tr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(sr.push(t)!==1&&Yt===b.requestAnimationFrame||((Yt=b.requestAnimationFrame)||Fr)(Hr)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),ct=y=null},b.__c=function(e,t){t.some(function(r){try{r.__h.forEach(qe),r.__h=r.__h.filter(function(n){return!n.__||ut(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],b.__e(n,r.__v)}}),rr&&rr(e,t)},b.unmount=function(e){nr&&nr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{qe(n)}catch(i){t=i}}),r.__H=void 0,t&&b.__e(t,r.__v))};var or=typeof requestAnimationFrame=="function";function Fr(e){var t,r=function(){clearTimeout(n),or&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);or&&(t=requestAnimationFrame(r))}function qe(e){var t=y,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),y=t}function ut(e){var t=y;e.__c=e.__(),y=t}function lt(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ar(e,t){return typeof t=="function"?t(e):t}var Lr=Symbol.for("preact-signals");function Fe(){if(V>1)V--;else{for(var e,t=!1;we!==void 0;){var r=we;for(we=void 0,pt++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&cr(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(pt=0,V--,t)throw e}}function Y(e){if(V>0)return e();V++;try{return e()}finally{Fe()}}var g=void 0;var we=void 0,V=0,pt=0,He=0;function fr(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function E(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}E.prototype.brand=Lr;E.prototype.h=function(){return!0};E.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};E.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};E.prototype.subscribe=function(e){var t=this;return Z(function(){var r=t.value,n=g;g=void 0;try{e(r)}finally{g=n}})};E.prototype.valueOf=function(){return this.value};E.prototype.toString=function(){return this.value+""};E.prototype.toJSON=function(){return this.value};E.prototype.peek=function(){var e=g;g=void 0;try{return this.value}finally{g=e}};Object.defineProperty(E.prototype,"value",{get:function(){var e=fr(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(pt>100)throw new Error("Cycle detected");this.v=e,this.i++,He++,V++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Fe()}}}});function k(e){return new E(e)}function cr(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ur(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function lr(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function fe(e){E.call(this,void 0),this.x=e,this.s=void 0,this.g=He-1,this.f=4}(fe.prototype=new E).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===He))return!0;if(this.g=He,this.f|=1,this.i>0&&!cr(this))return this.f&=-2,!0;var e=g;try{ur(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,lr(this),this.f&=-2,!0};fe.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}E.prototype.S.call(this,e)};fe.prototype.U=function(e){if(this.t!==void 0&&(E.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};fe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(fe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=fr(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function be(e){return new fe(e)}function pr(e){var t=e.u;if(e.u=void 0,typeof t=="function"){V++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,_t(e),n}finally{g=r,Fe()}}}function _t(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,pr(e)}function Ar(e){if(g!==this)throw new Error("Out-of-order effect");lr(this),g=e,this.f&=-2,8&this.f&&_t(this),Fe()}function Se(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Se.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Se.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,pr(this),ur(this),V++;var e=g;return g=this,Ar.bind(this,e)};Se.prototype.N=function(){2&this.f||(this.f|=2,this.o=we,we=this)};Se.prototype.d=function(){this.f|=8,1&this.f||_t(this)};function Z(e){var t=new Se(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var dt,ht;function ce(e,t){m[e]=t.bind(null,m[e]||function(){})}function Le(e){ht&&ht(),ht=e&&e.S()}function _r(e){var t=this,r=e.data,n=Vr(r);n.value=r;var i=L(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!rt(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},be(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}_r.displayName="_st";Object.defineProperties(E.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:_r},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ce("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof E&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});ce("__r",function(e,t){Le();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(i){var o;return Z(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o})())),dt=n,Le(r),e(t)});ce("__e",function(e,t,r,n){Le(),dt=void 0,e(t,r,n)});ce("diffed",function(e,t){Le(),dt=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var s in o){var f=o[s];f!==void 0&&!(s in n)&&(f.d(),o[s]=void 0)}else r.U=o={};for(var u in n){var c=o[u],l=n[u];c===void 0?(c=jr(r,u,l,i),o[u]=c):c.o(l,i)}}}e(t)});function jr(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=k(r);return{o:function(s,f){o.value=s,n=f},d:Z(function(){var s=o.value.value;n[t]!==s&&(n[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}ce("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=t.__c;if(s){var f=s.__$u;f&&(s.__$u=void 0,f.d())}}e(t)});ce("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});oe.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function Vr(e){return L(function(){return k(e)},[])}var vt=[],q=()=>vt.slice(-1)[0],M=e=>{vt.push(e)},W=()=>{vt.pop()};var mt=[],D=()=>mt.slice(-1)[0],ee=e=>{mt.push(e)},A=()=>{mt.pop()};var zr=e=>D().context[e||q()],Kr=()=>{let e=D(),t={},{ref:r,attributes:n}=e;return Object.freeze({ref:r.current,attributes:xe(n,t)})},Ae=k(0);function gt(e){let t=D();return gt.subscribe=Ae.value,z(t.serverContext[e||q()])}gt.subscribe=0;var Jr=e=>new Promise(t=>{let r=()=>{clearTimeout(n),window.cancelAnimationFrame(i),setTimeout(()=>{e(),t()})},n=setTimeout(r,100),i=window.requestAnimationFrame(r)}),te=typeof window.scheduler?.yield=="function"?window.scheduler.yield.bind(window.scheduler):()=>new Promise(e=>{setTimeout(e,0)});function Qr(e,t){let r=()=>{},n=Z(function(){return r=this.c.bind(this),this.x=e,this.c=t,e()});return{flush:r,dispose:n}}function Xr(e){ge(()=>{let t=null,r=!1;return t=Qr(e,async()=>{t&&!r&&(r=!0,await Jr(t.flush),r=!1)}),t.dispose},[])}function O(e){let t=D(),r=q(),n;if(e?.constructor?.name==="GeneratorFunction"?n=async(...o)=>{let s=e(...o),f,u,c;for(;;){M(r),ee(t);try{u=c?s.throw(c):s.next(f),c=void 0}catch(l){throw l}finally{A(),W()}try{f=await u.value}catch(l){c=l}if(u.done){if(c)throw c;break}}return f}:n=(...o)=>{M(r),ee(t);try{return e(...o)}finally{W(),A()}},e.sync){let o=n;return o.sync=!0,o}return n}function wt(e){Xr(O(e))}function K(e){ge(O(e),[])}function Yr(e,t){ge(O(e),t)}function Zr(e,t){Me(O(e),t)}function en(e,t){return We(O(e),t)}function tn(e,t){return L(O(e),t)}var hr=(e,t)=>{t=[].concat(t);let r=t[t.length-1].nextSibling;function n(i,o){e.insertBefore(i,o||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild(i){e.removeChild(i)},contains(i){e.contains(i)}}};function dr(e){return e.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,function(t,r){return r.toUpperCase()})}var bt=e=>{},T=e=>!!(e&&typeof e=="object"&&e.constructor===Object);function rn(e){let t=e;return t.sync=!0,t}var yt=new WeakMap,nn=e=>{let t=()=>!1;return{get(r,n){let i=r[n];return i&&typeof i=="object"?xe(i,{errorMessage:e}):i},set:t,deleteProperty:t,defineProperty:t}};function xe(e,t){let r=t?.errorMessage??"Cannot modify read-only object";if(!yt.has(e)){let n=nn(r);yt.set(e,new Proxy(e,n))}return yt.get(e)}var je=k(0);function z(e){return T(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,z(r)])):Array.isArray(e)?e.map(t=>z(t)):e}var Ve=new WeakMap,vr=new WeakMap,St=new WeakMap,on=new Set([Object,Array]),ze=(e,t,r)=>{if(!re(t))throw Error("This object cannot be proxified.");if(!Ve.has(t)){let n=new Proxy(t,r);Ve.set(t,n),vr.set(n,t),St.set(n,e)}return Ve.get(t)},Ke=e=>Ve.get(e),$=e=>St.get(e),re=e=>typeof e!="object"||e===null?!1:!St.has(e)&&on.has(e.constructor),mr=e=>vr.get(e);var sn={},gr=class{owner;computedsByScope;valueSignal;getterSignal;pendingGetter;constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}setPendingGetter(e){this.pendingGetter=e,queueMicrotask(()=>this.consolidateGetter())}consolidateGetter(){let e=this.pendingGetter;e&&(this.pendingGetter=void 0,this.update({get:e}))}getComputed(){let e=D()||sn;if(!this.valueSignal&&!this.getterSignal&&this.update({}),this.pendingGetter&&this.consolidateGetter(),!this.computedsByScope.has(e)){let t=()=>{let r=this.getterSignal?.value;return r?r.call(this.owner):this.valueSignal?.value};M($(this.owner)),this.computedsByScope.set(e,be(O(t))),W()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?(t!==this.valueSignal.peek()||e!==this.getterSignal.peek())&&Y(()=>{this.valueSignal.value=t,this.getterSignal.value=e}):(this.valueSignal=k(t),this.getterSignal=k(e))}};var an=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e=="symbol")),ue=new WeakMap,fn=(e,t)=>ue.has(e)&&ue.get(e).has(t),Ee=(e,t,r)=>{ue.has(e)||ue.set(e,new Map),t=typeof t=="number"?`${t}`:t;let n=ue.get(e);if(!n.has(t)){let i=$(e),o=new gr(e);if(n.set(t,o),r){let{get:s,value:f}=r;s?o.setGetter(s):o.setValue(re(f)?G(i,f):f)}}return n.get(t)},H=new WeakMap,xt=!1,N=Symbol("PENDING_GETTER"),cn={get(e,t,r){if(xt||!e.hasOwnProperty(t)&&t in e||typeof t=="symbol"&&an.has(t))return Reflect.get(e,t,r);let n=Object.getOwnPropertyDescriptor(e,t),o=Ee(r,t,n).getComputed().value;if(o===N)throw N;if(typeof o=="function"){let s=$(r);return(...f)=>{M(s);try{return o.call(r,...f)}finally{W()}}}return o},set(e,t,r,n){M($(n));try{return Reflect.set(e,t,r,n)}finally{W()}},defineProperty(e,t,r){let n=!(t in e),i=Reflect.defineProperty(e,t,r);if(i){let o=Ke(e),s=Ee(o,t),{get:f,value:u}=r;if(f)s.setGetter(f);else{let c=$(o);s.setValue(re(u)?G(c,u):u)}n&&H.has(e)&&H.get(e).value++,Array.isArray(e)&&ue.get(o)?.has("length")&&Ee(o,"length").setValue(e.length)}return i},deleteProperty(e,t){let r=Reflect.deleteProperty(e,t);return r&&(Ee(Ke(e),t).setValue(void 0),H.has(e)&&H.get(e).value++),r},ownKeys(e){return H.has(e)||H.set(e,k(0)),H._=H.get(e).value,Reflect.ownKeys(e)}},G=(e,t)=>ze(e,t,cn),Pt=(e,t)=>{xt=!0;try{return e[t]}finally{xt=!1}},Et=(e,t,r=!0)=>{if(!(T(e)&&T(t)))return;let n=!1;for(let i in t){let o=!(i in e);n=n||o;let s=Object.getOwnPropertyDescriptor(t,i),f=Ke(e),u=!!f&&fn(f,i)&&Ee(f,i);if(typeof s.get=="function"||typeof s.set=="function")(r||o)&&(Object.defineProperty(e,i,{...s,configurable:!0,enumerable:!0}),s.get&&u&&u.setPendingGetter(s.get));else if(T(t[i])){let c=Object.getOwnPropertyDescriptor(e,i)?.value;if(o||r&&!T(c)){if(e[i]={},u){let l=$(f);u.setValue(G(l,e[i]))}Et(e[i],t[i],r)}else T(c)&&Et(e[i],t[i],r)}else if((r||o)&&(Object.defineProperty(e,i,s),u)){let{value:c}=s,l=$(f);u.setValue(re(c)?G(l,c):c)}}n&&H.has(e)&&H.get(e).value++},ne=(e,t,r=!0)=>Y(()=>Et(mr(e)||e,t,r));var yr=new WeakSet,un={get:(e,t,r)=>{let n=Reflect.get(e,t),i=$(r);if(typeof n>"u"&&yr.has(r)){let o={};return Reflect.set(e,t,o),Pe(i,o,!1)}if(typeof n=="function"){M(i);let o=O(n);return W(),o}return T(n)&&re(n)?Pe(i,n,!1):n}},Pe=(e,t,r=!0)=>{let n=ze(e,t,un);return n&&r&&yr.add(n),n};var Tt=new WeakMap,le=new WeakMap,wr=new WeakSet,br=Reflect.getOwnPropertyDescriptor,ln={get:(e,t)=>{let r=le.get(e),n=e[t];return t in e?n:r[t]},set:(e,t,r)=>{let n=le.get(e),i=t in e||!(t in n)?e:n;return i[t]=r,!0},ownKeys:e=>[...new Set([...Object.keys(le.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>br(e,t)||br(le.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(le.get(e),t)},Te=(e,t={})=>{if(wr.has(e))throw Error("This object cannot be proxified.");if(le.set(e,t),!Tt.has(e)){let r=new Proxy(e,ln);Tt.set(e,r),wr.add(r)}return Tt.get(e)};var Ie=new Map,Sr=new Map,Je=new Map,It=new Map,Ce=new Map,pn=e=>It.get(e||q())||{};function Ct(e){let t=e||q();return Ce.has(t)||Ce.set(t,{}),Ct.subscribe=je.value,z(Ce.get(t))}Ct.subscribe=0;var ie="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function ke(e,{state:t={},...r}={},{lock:n=!1}={}){if(Ie.has(e)){if(n!==ie&&!Je.has(e))Je.set(e,n);else{let o=Je.get(e);if(!(n===ie||n!==!0&&n===o))throw Error(o?"Cannot unlock a private store with an invalid lock code":"Cannot lock a public store")}let i=Sr.get(e);ne(i,r),ne(i.state,t)}else{n!==ie&&Je.set(e,n);let i={state:G(e,T(t)?t:{}),...r},o=Pe(e,i);Sr.set(e,i),Ie.set(e,o)}return Ie.get(e)}var kt=(e=document)=>{let t=e.getElementById("wp-script-module-data-@wordpress/interactivity")??e.getElementById("wp-interactivity-data");if(t?.textContent)try{return JSON.parse(t.textContent)}catch{}return{}},Nt=e=>{Ce.clear(),It.clear(),T(e?.state)&&Object.entries(e.state).forEach(([t,r])=>{let n=ke(t,{},{lock:ie});ne(n.state,r,!1),Ce.set(t,r)}),T(e?.config)&&Object.entries(e.config).forEach(([t,r])=>{It.set(t,r)}),T(e?.derivedStateClosures)&&Object.entries(e.derivedStateClosures).forEach(([t,r])=>{let n=ke(t,{},{lock:ie});r.forEach(i=>{let o=i.split("."),s=o.splice(-1,1)[0],f=o.reduce((c,l)=>Pt(c,l),n),u=Object.getOwnPropertyDescriptor(f,s);T(u?.value)&&(f[s]=N)})})},_n=kt();Nt(_n);function J(e){return e.suffix!==null}function pe(e){return e.suffix===null}var xr=Xt({client:{},server:{}}),Ut={},Pr={},S=(e,t,{priority:r=10}={})=>{Ut[e]=t,Pr[e]=r},hn=(e,t)=>{if(!t){bt(`Namespace missing for "${e}". The value for that path won't be resolved.`);return}let r=Ie.get(t);typeof r>"u"&&(r=ke(t,{},{lock:ie}));let n={...r,context:D().context[t]};try{return e.split(".").reduce((o,s)=>o[s],n)}catch(i){if(i===N)return N}},Rt=({scope:e})=>((t,...r)=>{let{value:n,namespace:i}=t;if(typeof n!="string")throw new Error("The `value` prop should be a string path");let o=n[0]==="!"&&!!(n=n.slice(1));ee(e);let s=hn(n,i);if(typeof s=="function"){if(o){bt("Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.");let c=!s(...r);return A(),c}A();let u=(...c)=>{ee(e);let l=s(...c);return A(),l};if(s.sync){let c=u;c.sync=!0}return u}let f=s;return A(),o&&s!==N?!f:f}),dn=e=>{let t=Object.keys(e).reduce((r,n)=>{if(Ut[n]){let i=Pr[n];(r[i]=r[i]||[]).push(n)}return r},{});return Object.entries(t).sort(([r],[n])=>parseInt(r)-parseInt(n)).map(([,r])=>r)},Tr=({directives:e,priorityLevels:[t,...r],element:n,originalProps:i,previousScope:o})=>{let s=j({}).current;s.evaluate=We(Rt({scope:s}),[]);let{client:f,server:u}=ye(xr);s.context=f,s.serverContext=u,s.ref=o?.ref||j(null),n=ae(n,{ref:s.ref}),s.attributes=n.props;let c=r.length>0?R(Tr,{directives:e,priorityLevels:r,element:n,originalProps:i,previousScope:s}):n,l={...i,children:c},a={directives:e,props:l,element:n,context:xr,evaluate:s.evaluate};ee(s);for(let h of t){let p=Ut[h]?.(a);p!==void 0&&(l.children=p)}return A(),l.children},Er=m.vnode;m.vnode=e=>{if(e.props.__directives){let t=e.props,r=t.__directives;r.key&&(e.key=r.key.find(pe).value),delete t.__directives;let n=dn(r);n.length>0&&(e.props={directives:r,priorityLevels:n,originalProps:t,type:e.type,element:R(e.type,t),top:!0},e.type=Tr)}Er&&Er(e)};function Ur(e){let t={get(r,n,i){let o=r[n];switch(n){case"currentTarget":break;case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":break}return o instanceof Function?function(...s){return o.apply(this===i?r:this,s)}:o}};return new Proxy(e,t)}var vn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,mn=/\/\*[^]*?\*\/| +/g,Ir=/\n+/g,Cr=" ",gn=e=>{let t=[{}],r,n;for(;r=vn.exec(e.replace(mn,""));)r[4]?t.shift():r[3]?(n=r[3].replace(Ir,Cr).trim(),t.unshift(t[0][n]=t[0][n]||{})):t[0][r[1]]=r[2].replace(Ir,Cr).trim();return t[0]},kr=e=>({directives:t,evaluate:r})=>{t[`on-${e}`].filter(J).forEach(n=>{let o=n.suffix.split("--",2)[0];K(()=>{let s=u=>{let c=r(n);typeof c=="function"&&(c?.sync||(u=Ur(u)),c(u))},f=e==="window"?window:document;return f.addEventListener(o,s),()=>f.removeEventListener(o,s)})})},yn=(e,t,r,n,i)=>{let o={...e.client,[t]:{...e.client[t],[n]:r}},s={...D(),context:o,serverContext:e.server};return i?Rt({scope:s})(i):r},wn=function*(e,t,r,n,i){let{current:o}=j(new Map);for(let s of r){let f=yn(e,t,s,n,i);o.has(f)||o.set(f,Te(G(t,{[n]:void 0}),e.client[t])),yield[s,o.get(f),f]}},Nr=e=>({directives:t,evaluate:r})=>{t[`on-async-${e}`].filter(J).forEach(n=>{let i=n.suffix.split("--",1)[0];K(()=>{let o=async f=>{await te();let u=r(n);typeof u=="function"&&u(f)},s=e==="window"?window:document;return s.addEventListener(i,o,{passive:!0}),()=>s.removeEventListener(i,o)})})},Ne=new Map,Rr=()=>{S("context",({directives:{context:e},props:{children:t},context:r})=>{let n=e.filter(pe).reverse();if(!n.length)return;let{Provider:i}=r,{client:o,server:s}=ye(r),f=j({}),u={},c={client:{...o},server:{...s}},l=new Set;return n.forEach(({value:a,namespace:h,uniqueId:p})=>{T(a)&&(f.current[h]||(f.current[h]=G(h,{})),ne(f.current[h],z(a),!1),u[h]=a,l.add(h))}),l.forEach(a=>{c.client[a]=Te(f.current[a],o[a]),c.server[a]=Te(u[a],s[a])}),R(i,{value:c},t)},{priority:5}),S("watch",({directives:{watch:e},evaluate:t})=>{e.forEach(r=>{wt(()=>{let n,i=t(r);return typeof i=="function"&&(i=i()),i})})}),S("init",({directives:{init:e},evaluate:t})=>{e.forEach(r=>{K(()=>{let n,i=t(r);return typeof i=="function"&&(i=i()),i})})}),S("on",({directives:{on:e},element:t,evaluate:r})=>{let n=new Map;e.filter(J).forEach(i=>{let o=i.suffix.split("--",2);n.has(o[0])||n.set(o[0],new Set),n.get(o[0]).add(i)}),n.forEach((i,o)=>{let s=t.props[`on${o}`];t.props[`on${o}`]=f=>{s&&s(f),i.forEach(u=>{let c,l=r(u);typeof l=="function"&&(l?.sync||(f=Ur(f)),l(f))})}})}),S("on-async",({directives:{"on-async":e},element:t,evaluate:r})=>{let n=new Map;e.filter(J).forEach(i=>{let o=i.suffix.split("--",1)[0];n.has(o)||n.set(o,new Set),n.get(o).add(i)}),n.forEach((i,o)=>{let s=t.props[`on${o}`];t.props[`on${o}`]=f=>{s&&s(f),i.forEach(async u=>{await te();let c=r(u);typeof c=="function"&&c(f)})}})}),S("on-window",kr("window")),S("on-document",kr("document")),S("on-async-window",Nr("window")),S("on-async-document",Nr("document")),S("class",({directives:{class:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{let i=n.uniqueId?`${n.suffix}---${n.uniqueId}`:n.suffix,o=r(n);if(o===N)return;typeof o=="function"&&(o=o());let s=t.props.class||"",f=new RegExp(`(^|\\s)${i}(\\s|$)`,"g");o?f.test(s)||(t.props.class=s?`${s} ${i}`:i):t.props.class=s.replace(f," ").trim(),K(()=>{o?t.ref.current.classList.add(i):t.ref.current.classList.remove(i)})})}),S("style",({directives:{style:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{if(n.uniqueId)return;let i=n.suffix,o=r(n);o!==N&&(typeof o=="function"&&(o=o()),t.props.style=t.props.style||{},typeof t.props.style=="string"&&(t.props.style=gn(t.props.style)),o?t.props.style[i]=o:delete t.props.style[i],K(()=>{o?t.ref.current.style.setProperty(i,o):t.ref.current.style.removeProperty(i)}))})}),S("bind",({directives:{bind:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{if(n.uniqueId)return;let i=n.suffix,o=r(n);o!==N&&(typeof o=="function"&&(o=o()),t.props[i]=o,K(()=>{let s=t.ref.current;if(i==="style"){typeof o=="string"&&(s.style.cssText=o);return}else if(i!=="width"&&i!=="height"&&i!=="href"&&i!=="list"&&i!=="form"&&i!=="tabIndex"&&i!=="download"&&i!=="rowSpan"&&i!=="colSpan"&&i!=="role"&&i in s)try{s[i]=o??"";return}catch{}o!=null&&(o!==!1||i[4]==="-")?s.setAttribute(i,o):s.removeAttribute(i)}))})}),S("ignore",({element:{type:e,props:{innerHTML:t,...r}}})=>{let n=L(()=>t,[]);return R(e,{dangerouslySetInnerHTML:{__html:n},...r})}),S("text",({directives:{text:e},element:t,evaluate:r})=>{let n=e.filter(pe);n.length&&n.forEach(i=>{if(!i.uniqueId)try{let o=r(i);if(o===N)return;typeof o=="function"&&(o=o()),t.props.children=typeof o=="object"?null:o.toString()}catch{t.props.children=null}})}),S("run",({directives:{run:e},evaluate:t})=>{e.forEach(r=>{let n=t(r);return typeof n=="function"&&(n=n()),n})}),S("each",({directives:{each:e,"each-key":t},context:r,element:n,evaluate:i})=>{if(n.type!=="template")return;let{Provider:o}=r,s=ye(r),[f]=e,{namespace:u,suffix:c,uniqueId:l}=f;if(e.length>1||l)return;let a=i(f);if(a===N||(typeof a=="function"&&(a=a()),typeof a?.[Symbol.iterator]!="function"))return;let h=c?dr(c):"item",p=[],w=wn(s,u,a,h,t?.[0]);for(let[P,d,_]of w){let v={client:{...s.client,[u]:d},server:{...s.server}};v.client[u][h]=P,p.push(R(o,{value:v,key:_},n.props.content))}return p},{priority:20}),S("each-child",({directives:{"each-child":e},element:t,evaluate:r})=>{let n=e.find(pe);return n?r(n)===N?t:null:void 0},{priority:1}),S("router-region",({directives:{"router-region":e}})=>{let t=e.find(pe);if(!t||t.suffix||t.uniqueId)return;let r=typeof t.value=="string"?t.value:t.value.id;Ne.has(r)||Ne.set(r,k());let n=Ne.get(r).value;if(Me(()=>{n&&typeof n.type!="string"&&(Ae.value=Ae.peek()+1)},[n]),n&&typeof n.type!="string"){let i=D();return ae(n,{previousScope:i})}return n},{priority:1})};var Dt="data-wp-",Qe=[],bn=()=>Qe[Qe.length-1]??null,Sn=e=>!!(e&&typeof e=="object"&&e.constructor===Object),xn=/[^a-z0-9-_]/i;function En(e){let t=e.substring(8);if(xn.test(t))return null;let r=t.indexOf("--");if(r===-1)return{prefix:t,suffix:null,uniqueId:null};let n=t.substring(0,r),i=t.substring(r);if(i.startsWith("---")&&i[3]!=="-")return{prefix:n,suffix:null,uniqueId:i.substring(3)||null};let o=i.substring(2),s=o.indexOf("---");if(s!==-1&&o.substring(s)[3]!=="-"){let f=o.substring(s+3)||null;return o=o.substring(0,s)||null,{prefix:n,suffix:o,uniqueId:f}}return{prefix:n,suffix:o||null,uniqueId:null}}var Pn=/^([\w_\/-]+)::(.+)$/,Gt=new WeakSet;function Ue(e){let t=new Set,r=new Set,n=document.createTreeWalker(e,205);function i(s){let{nodeType:f}=s;if(f===3)return s.data;if(f===4)return r.add(s),s.nodeValue;if(f===8||f===7)return t.add(s),null;let u=s,{attributes:c}=u,l=u.localName,a={},h=[],p=[],w=!1,P=!1;for(let d=0;d{let I=En(_);if(I===null)return d;let{prefix:x,suffix:C,uniqueId:Re}=I;return d[x]=d[x]||[],d[x].push({namespace:v??bn(),value:U,suffix:C,uniqueId:Re}),d},{});for(let d in a.__directives)a.__directives[d].sort((_,v)=>{let U=_.suffix??"",I=v.suffix??"";if(U!==I)return UC)-+(xUe(d));else{let d=n.firstChild();if(d){for(;d;){let _=i(d);_&&h.push(_),d=n.nextSibling()}n.parentNode()}}return P&&Qe.pop(),R(l,a,h)}let o=i(n.currentNode);return t.forEach(s=>s.remove()),r.forEach(s=>s.replaceWith(new window.Text(s.nodeValue??""))),o}var Ot=new WeakMap,$t=e=>{let t=Array.isArray(e)?e[0]:e;if(!t.parentElement)throw Error("The passed region should be an element with a parent.");return Ot.has(t)||Ot.set(t,hr(t.parentElement,e)),Ot.get(t)},Bt=new WeakMap,Dr=async()=>{let e=document.querySelectorAll("[data-wp-interactive]");await new Promise(t=>{setTimeout(t,0)});for(let t of e)if(!Gt.has(t)){await te();let r=$t(t),n=Ue(t);Bt.set(t,n),await te(),ft(n,r)}};var Tn="I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.",so=e=>{if(e===Tn)return{getRegionRootFragment:$t,initialVdom:Bt,toVdom:Ue,directive:S,getNamespace:q,h:R,cloneElement:ae,render:at,proxifyState:G,parseServerData:kt,populateServerData:Nt,batch:Y,routerRegions:Ne,deepReadOnly:xe,navigationSignal:je};throw new Error("Forbidden access.")};Rr();Dr();export{pn as getConfig,zr as getContext,Kr as getElement,gt as getServerContext,Ct as getServerState,so as privateApis,te as splitTask,ke as store,en as useCallback,Yr as useEffect,K as useInit,Zr as useLayoutEffect,tn as useMemo,j as useRef,Mr as useState,wt as useWatch,O as withScope,rn as withSyncEvent}; //# sourceMappingURL=index.min.js.map