@plitzi/plitzi-sdk 0.37.2 → 0.37.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1159 -0
- package/dist/index.d.ts +12 -4
- package/dist/index.html +2 -1
- package/dist/modules/App/SpaceThemeProvider.d.ts +19 -0
- package/dist/modules/Network/graphqlClient.d.ts +18 -0
- package/dist/plitzi-sdk-devtools-Q71kUXbL.js +294 -0
- package/dist/plitzi-sdk-devtools-Q71kUXbL.js.gz +0 -0
- package/dist/plitzi-sdk-devtools.css +1 -1
- package/dist/plitzi-sdk-devtools.css.gz +0 -0
- package/dist/plitzi-sdk.css +1 -1
- package/dist/plitzi-sdk.css.gz +0 -0
- package/dist/plitzi-sdk.js +146 -614
- package/dist/plitzi-sdk.js.gz +0 -0
- package/package.json +15 -17
- package/dist/modules/App/AppHelper.d.ts +0 -3
- package/dist/modules/Space/SpaceContext.d.ts +0 -2
- package/dist/modules/Space/SpaceContextProvider.d.ts +0 -6
- package/dist/rolldown-runtime-CxhCXM28.js +0 -1
- package/dist/withElement-DOJg5xqo.js +0 -5
- /package/dist/modules/{index.d.ts → Network/graphqlClient.test.d.ts} +0 -0
package/dist/plitzi-sdk.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/plitzi-sdk",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -28,24 +28,22 @@
|
|
|
28
28
|
"type": "module",
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@apollo/client": "^4.3.1",
|
|
32
31
|
"@dr.pogodin/react-helmet": "^3.3.2",
|
|
33
32
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
34
|
-
"@plitzi/nexus": "^1.
|
|
35
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
36
|
-
"@plitzi/sdk-auth": "0.37.
|
|
37
|
-
"@plitzi/sdk-dev-tools": "0.37.
|
|
38
|
-
"@plitzi/sdk-elements": "0.37.
|
|
39
|
-
"@plitzi/sdk-event-bridge": "0.37.
|
|
40
|
-
"@plitzi/sdk-interactions": "0.37.
|
|
41
|
-
"@plitzi/sdk-navigation": "0.37.
|
|
42
|
-
"@plitzi/sdk-plugins": "0.37.
|
|
43
|
-
"@plitzi/sdk-schema": "0.37.
|
|
44
|
-
"@plitzi/sdk-shared": "0.37.
|
|
45
|
-
"@plitzi/sdk-style": "0.37.
|
|
46
|
-
"@plitzi/sdk-variables": "0.37.
|
|
33
|
+
"@plitzi/nexus": "^1.3.1",
|
|
34
|
+
"@plitzi/plitzi-ui": "^1.6.24",
|
|
35
|
+
"@plitzi/sdk-auth": "0.37.3",
|
|
36
|
+
"@plitzi/sdk-dev-tools": "0.37.3",
|
|
37
|
+
"@plitzi/sdk-elements": "0.37.3",
|
|
38
|
+
"@plitzi/sdk-event-bridge": "0.37.3",
|
|
39
|
+
"@plitzi/sdk-interactions": "0.37.3",
|
|
40
|
+
"@plitzi/sdk-navigation": "0.37.3",
|
|
41
|
+
"@plitzi/sdk-plugins": "0.37.3",
|
|
42
|
+
"@plitzi/sdk-schema": "0.37.3",
|
|
43
|
+
"@plitzi/sdk-shared": "0.37.3",
|
|
44
|
+
"@plitzi/sdk-style": "0.37.3",
|
|
45
|
+
"@plitzi/sdk-variables": "0.37.3",
|
|
47
46
|
"clsx": "^2.1.1",
|
|
48
|
-
"graphql": "^17.0.2",
|
|
49
47
|
"immer": "^11.1.18",
|
|
50
48
|
"react-router-dom": "^7.18.4"
|
|
51
49
|
},
|
|
@@ -97,7 +95,7 @@
|
|
|
97
95
|
"stylelint-scss": "^7.3.0",
|
|
98
96
|
"terser": "^5.51.2",
|
|
99
97
|
"typescript": "^6.0.3",
|
|
100
|
-
"vite": "^8.3.
|
|
98
|
+
"vite": "^8.3.1",
|
|
101
99
|
"vite-plugin-compression": "^0.5.1",
|
|
102
100
|
"vite-plugin-dts": "^5.1.1",
|
|
103
101
|
"vite-plugin-ejs": "^2.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,r)=>{let o={};for(var l in e)t(o,l,{get:e[l],enumerable:!0});return r||t(o,Symbol.toStringTag,{value:"Module"}),o},p=(n,u,p)=>(p=null!=n?e(l(n)):{},((e,l,n,u)=>{if(l&&"object"==typeof l||"function"==typeof l)for(var p,b=o(l),c=0,f=b.length;c<f;c++)p=b[c],a.call(e,p)||void 0===p||t(e,p,{get:(e=>l[e]).bind(null,p),enumerable:!(u=r(l,p))||u.enumerable});return e})(!u&&n&&n.__esModule&&a.call(n,"default")?p:t(p,"default",{value:n,enumerable:!0}),n));export{u as n,p as r,n as t};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CxhCXM28.js";import{Component as t,Fragment as r,Profiler as n,Suspense as i,createContext as a,createElement as s,isValidElement as o,lazy as l,use as u,useCallback as c,useContext as d,useEffect as h,useId as f,useLayoutEffect as p,useMemo as m,useRef as y,useState as g,useSyncExternalStore as b}from"react";import{jsx as w}from"react/jsx-runtime";var v=a(void 0);v.displayName="ElementContext";var x=a(void 0);x.displayName="ElementParentContext";var k=e=>!1!==e&&"false"!==e,S=(e,t)=>{let r=new Set(t),n={};for(let i in e)!r.has(i)&&Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},M=()=>{},A=class{items=[];notifying=0;dead=0;get length(){return this.items.length-this.dead}add(e){return this.items.push(e),()=>this.remove(e)}remove(e){let t=this.items.indexOf(e);if(-1===t)return;if(this.notifying>0)return this.items[t]=M,void this.dead++;let r=this.items.pop();t<this.items.length&&(this.items[t]=r)}begin(){this.notifying++}end(){0===--this.notifying&&this.dead>0&&this.compact()}forEach(e,t){this.begin();try{let r,{items:n}=this,i=n.length,a=0,s=!1;for(;a<i;)try{for(;a<i;a++)e(n[a])}catch(e){s||(s=!0,r=e),a++}if(s){if(!t)throw r;t(r)}}finally{this.end()}}clear(){if(this.notifying>0){let{items:e}=this;for(let t=0,r=e.length;t<r;t++)e[t]=M;return void(this.dead=e.length)}this.items.length=0,this.dead=0}compact(){let{items:e}=this,t=0;for(let r=0;r<e.length;r++)e[r]!==M&&(e[t++]=e[r]);e.length=t,this.dead=0}},T=(e,t)=>"function"==typeof e?!e(t):!1===e,P=e=>"object"==typeof e&&!!e&&!Array.isArray(e),N=(e,t)=>{if(!P(e)||!P(t))return t;let r={...e};for(let n of Object.keys(t))"__proto__"!==n&&(r[n]=n in e?N(e[n],t[n]):t[n]);return r},D=/* @__PURE__ */new Map,_=e=>{let t=D.get(e);return void 0===t&&(t=e.split("."),D.size>=512&&D.delete(D.keys().next().value),D.set(e,t)),t},j=/* @__PURE__ */new Map;function C(e,t){let r=Array.isArray(t);if("string"!=typeof t&&!r||r&&!t.length||"string"==typeof t&&!t)return e;if("string"==typeof t&&-1===t.indexOf("."))return"object"==typeof e&&e&&t in e?e[t]:void 0;if("string"==typeof t)return(e=>{let t=j.get(e);if(!t){if(t=(e=>{if(1===e.length){let t=e[0];return e=>"object"==typeof e&&e&&t in e?e[t]:void 0}return t=>{let r=t;for(let n=0;n<e.length;n++){if("object"!=typeof r||!r)return;r=r[e[n]]}return r}})(_(e)),j.size>=512){let e=j.keys().next().value;j.delete(e)}j.set(e,t)}return t})(t)(e);let n=e;for(let i of t){if("object"!=typeof n||!n||!(i in n))return;n=n[i]}return n}var O,W=Symbol("unchanged"),E=e=>/^\d+$/.test(e),$=e=>Array.isArray(e)?e.slice():{...e},F=(e,t,r,n,i)=>{let a=t[r],s="object"==typeof e&&e?e:{};if(r===t.length-1){let e=s[a],t=i?n(e):n;if(e===t)return W;let r=$(s);return r[a]=t,r}let o=F(s[a],t,r+1,n,i);if(o===W)return W;let l=$(s);return l[a]=o,l},z=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,I=e=>z.test(e)?`.${e}`:`[${JSON.stringify(e)}]`,Y=e=>z.test(e)?e:JSON.stringify(e),H=e=>{let t=e.length,r="";for(let a=0;a<t-1;a++){let t=0===a?"o":"_"+(a-1);r+=`var _${a}=${t}==null?void 0:${t}${I(e[a])};\n`}let n=t>1?"_"+(t-2):"o";r+=`var _p=${n}==null?void 0:${n}${I(e[t-1])};\n`,r+="var _v=f?v(_p):v;\nif(_p===_v)return null;\n";let i="_v";for(let a=t-1;a>=0;a--)i=`{...${0===a?"o":`(_${a-1}||{})`},${Y(e[a])}:${i}}`;return r+=`return ${i};`,Function("o","v","f",r)},q=/* @__PURE__ */new Map,L=(e,t,r)=>{if("object"!=typeof e||!e)return W;let n=e,i=t[r];if(!Object.hasOwn(n,i))return W;if(r===t.length-1){let e=$(n);return Array.isArray(e)?e.splice(Number(i),1):delete e[i],e}let a=L(n[i],t,r+1);if(a===W)return W;let s=$(n);return s[i]=a,s},U=(e,t,r,n,i)=>{let a=((e,t)=>{if(!(()=>{if(typeof window>"u")return!1;if(void 0===O)try{H(["x","y"])({x:{}},1,!1),O=!0}catch{O=!1}return O})())return;let r=q.get(e);if(r)return r;if(t.some(E))return;let n=H(t);return q.size>=256&&q.delete(q.keys().next().value),q.set(e,n),n})(t,r);if(a){let t=a(e,n,i);return null===t?W:t}return F(e,r,0,n,i)},B=Symbol("@plitzi/nexus/cancel"),R=(()=>{try{return"production"}catch{}return"production"})(),V="production"===R,X=!V,Z="test"===R;var Q=e=>"number"==typeof e||""===e||isNaN(Number(e))?e:Number(e),G=e=>Array.isArray(e)?e.slice():{...e},J=(e,t,r,n)=>{let i=Q(t[r]),a=G(e);return a[i]=r===t.length-1?n:J(e[i]??{},t,r+1,n),a},K=Symbol("no-error"),ee=(e,t,r)=>{let n=0,i=K;for(;n<r;)try{for(;n<r;n++)e[n](t)}catch(e){i===K&&(i=e),n++}return i},te="__proto__";var re=(e,t)=>e===t||e.startsWith(`${t}.`),ne=class{reportError;records=/* @__PURE__ */new Map;listeners=/* @__PURE__ */new Set;announced=/* @__PURE__ */new Set;timer;snapshot;constructor(e){this.reportError=e}get size(){return this.records.size}getRecords(){return this.snapshot??=Object.fromEntries(this.records),this.snapshot}subscribe(e){return this.listeners.add(e),this.schedule(),()=>{this.listeners.delete(e),this.schedule()}}record(e,t,r,n){this.drop(e,n,!1);let i=Math.max(0,t),a={updatedAt:r,expiresAt:r+i,ttl:i};this.records.set(e,a),this.announced.delete(e),this.changed(),n||this.emit({path:e,type:"recorded",freshness:a})}drop(e,t,r=!0){if(0!==this.records.size)for(let n of[...this.records.keys()])(n===e?r:n.startsWith(`${e}.`))&&this.forget(n,t)}dropChanged(e,t,r){for(let n of[...this.records.keys()])C(e,n)!==C(t,n)&&this.forget(n,r)}get(e){if(0===this.records.size)return;let t=e;for(;;){let e=this.records.get(t);if(e)return e;let r=t.lastIndexOf(".");if(-1===r)return;t=t.slice(0,r)}}expire(e,t){let r=[];if(this.records.forEach((n,i)=>{(void 0===e||re(i,e)||re(e,i))&&(n.expiresAt>t&&this.records.set(i,{...n,expiresAt:t}),this.announced.add(i),r.push(i))}),r.length>0){this.changed();for(let e of r)this.emit({path:e,type:"expired",freshness:this.records.get(e)})}return r}forget(e,t){let r=this.records.get(e);this.records.delete(e),this.announced.delete(e),this.changed(),t||this.emit({path:e,type:"dropped",freshness:r})}changed(){this.snapshot=void 0,this.schedule()}emit(e){for(let t of[...this.listeners])try{t(e)}catch(Is){this.reportError(Is,e.path)}}schedule(){if(clearTimeout(this.timer),this.timer=void 0,0===this.listeners.size)return;let e=1/0;this.records.forEach((t,r)=>{!this.announced.has(r)&&t.expiresAt<e&&(e=t.expiresAt)}),e!==1/0&&(this.timer=setTimeout(()=>this.elapse(),Math.min(2147483647,Math.max(0,e-Date.now()))))}elapse(){let e=Date.now(),t=[];this.records.forEach((r,n)=>{!this.announced.has(n)&&r.expiresAt<=e&&(this.announced.add(n),t.push(n))});for(let r of t)this.emit({path:r,type:"elapsed",freshness:this.records.get(r)});this.schedule()}},ie=class{subscribers=null;children=null},ae=class{direct=/* @__PURE__ */new Map;descendants=/* @__PURE__ */new Map;root=new ie;size=0;add(e,t){let r=_(e),n=this.direct.get(e);if(!n){n=new A,this.direct.set(e,n);let t=this.root;for(let e of r){t.children||(t.children=/* @__PURE__ */new Map);let r=t.children.get(e);r||(r=new ie,t.children.set(e,r)),t=r}t.subscribers=n,this.size++;let i="";for(let n=0;n<r.length-1;n++){i=i?`${i}.${r[n]}`:r[n];let t=this.descendants.get(i);t||(t=/* @__PURE__ */new Set,this.descendants.set(i,t)),t.add(e)}}return n.add(t),()=>this.remove(e,n,t,r)}remove(e,t,r,n){if(this.direct.get(e)!==t||(t.remove(r),t.length>0))return;this.direct.delete(e),this.size--;let i=this.root;for(let s of n){if(!i.children)return;let e=i.children.get(s);if(!e)return;i=e}i.subscribers===t&&(i.subscribers=null);let a="";for(let s=0;s<n.length-1;s++){a=a?`${a}.${n[s]}`:n[s];let t=this.descendants.get(a);t&&(t.delete(e),0===t.size&&this.descendants.delete(a))}}walkAncestors(e,t){let r=this.root;for(let n of e){if(!r.children)return;let e=r.children.get(n);if(!e)return;r=e,r.subscribers&&t(r.subscribers)}}getDescendants(e){return this.descendants.get(e)}forEachAffected(e,t,r){let n=e=>{e&&e.forEach(t,r)};if("string"!=typeof e)return void this.direct.forEach(n);let i=_(e);this.walkAncestors(i,n),this.descendants.get(e)?.forEach(e=>n(this.direct.get(e)))}clear(){this.direct.clear(),this.descendants.clear(),this.root.children=null,this.root.subscribers=null,this.size=0}},se=0;function oe(e,t){let r,n,i,a={},s=new A,o=new A,l=new ae,u=new A,c=()=>{0!==u.length&&u.forEach(e=>e())},d=[],h=[],f=[],p=t?.parent,m=++se,y=(e,t,r)=>{if(0===h.length)throw e;let n={error:e,phase:t,path:r};for(let i=0,a=h.length;i<a;i++)h[i](n)},g=new ne((e,t)=>y(e,"notify",t)),b=()=>a,w=()=>r??={...a},{getState:v,getPath:x,invalidate:k,resetCache:S,getMergeCount:M}=function(e,t,r,n){if(!r)return{getState:t,getPath:t=>C(e(),t),invalidate:()=>{},resetCache:()=>{},getMergeCount:()=>0};let i,a=r,s=n&&n.length>0?new Set(n):void 0,o=!0,l=!1,u=0,c=/* @__PURE__ */new Map,d=/* @__PURE__ */new Map;return{getState:()=>((o||void 0===i)&&(i=(()=>{u++;let e=t(),r=N(a.getState(),e);if(s)for(let t of s)void 0!==e[t]&&(r[t]=e[t]);return r})(),o=!1),i),getPath:t=>{if(l)c.clear(),l=!1;else if(c.has(t))return c.get(t);let r=(t=>{if(s){let r=t.indexOf("."),n=-1===r?t:t.slice(0,r);if(s.has(n)&&void 0!==e()[n])return C(e(),t)}let r=C(e(),t);if(void 0===r)return a.getPath(t);let n=a.getPath(t);if(void 0===n||!P(r)||!P(n))return r;let i=d.get(t);if(i&&i.own===r&&i.parent===n)return i.value;u++;let o=N(n,r);return d.set(t,{own:r,parent:n,value:o}),o})(t);return c.set(t,r),r},invalidate:()=>{o=!0,l=!0},resetCache:()=>{c.clear(),d.clear(),i=void 0,o=!0,l=!1},getMergeCount:()=>u}}(b,w,p,t?.exclusive),T=()=>{k(),c()},D=!1;p&&(S(),i=p.subscribeInvalidate?.(T));let{setState:j,batch:O}=function(e){let{getOwnState:t,getOwnSnapshot:r,setOwnState:n,mutateOwnKey:i,deleteOwnKey:a,parent:s,listeners:o,pathListeners:l,changeListeners:u,interceptors:c,readOnly:d,freshness:h,reportError:f,invalidateDescendants:p,onDelegateToParent:m}=e,y=e=>{if(0===d.length||!(e=>{for(let t=0,r=d.length;t<r;t++){let r=d[t];if(e===r||e.startsWith(`${r}.`)||r.startsWith(`${e}.`))return!0}return!1})(e))return!1;if(X)throw Error(`@plitzi/nexus: refused to write to read-only path "${e}"`);return!0},g=(e,t,r)=>{let n=t;for(let i=0,a=c.length;i<a;i++){let a;try{a=c[i]({path:e,value:n,prev:r})}catch(t){return f(t,"beforeChange",e),B}if(a===B)return B;void 0!==a&&(n=a)}return n},b=(e,t,r)=>{void 0===t?h.size>0&&h.drop(e,r):h.record(e,t,Date.now(),r)},w=0,v=/* @__PURE__ */new Set,x=(e,t)=>{let{items:r}=e;if(w>0)for(let n=0,i=r.length;n<i;n++)v.add(r[n]);else if(0!==r.length){e.begin();try{let e=ee(r,t,r.length);e!==K&&f(e,"notify",t)}finally{e.end()}}},k=(e,t,r)=>{let n={path:e,prev:t,next:r,prevValue:void 0===e?t:C(t,e),nextValue:void 0===e?r:C(r,e)},{items:i}=u;u.begin();try{let t=ee(i,n,i.length);t!==K&&f(t,"onChange",e)}finally{u.end()}},S=(e,t,r,n)=>{let i=l.getDescendants(e);if(i)for(let a of i){let i=l.direct.get(a);if(!i)continue;let s=_(a).slice(n);C(t,s)!==C(r,s)&&x(i,e)}},M=(e,t,r,i,a)=>{let s=e?C(r,e):void 0,f=e?a?t(s):t:void 0;if(e&&c.length>0){let t=g(e,f,s);if(t===B)return;f=t}if(e&&s===f)return;let m=e?((e,t,r)=>{if("string"==typeof t){if(!t)return r;let n=_(t);if(1===n.length){let t=G(e);return t[Q(n[0])]=r,t}return J(e,n,0,r)}return Array.isArray(t)&&t.length?J(e,t,0,r):r})(r,e,f):a?t(r):{...r,...t};if(!e&&c.length>0){let e=g(void 0,m,r);if(e===B)return;m=e}if(m!==r){if(d.length>0)for(let e=0,t=d.length;e<t;e++){let t=d[e];if(C(r,t)!==C(m,t)){if(X)throw Error(`@plitzi/nexus: refused to write to read-only path "${d[e]}"`);return}}h.size>0&&h.dropChanged(r,m,!i),n(m),u.length>0&&k(e,r,m),p(),i&&(x(o,e),l.size>0&&l.direct.forEach((t,n)=>{C(r,n)!==C(m,n)&&x(t,e)}))}};return{setState:(e,d,f={})=>{let{canPropagate:w=!0,unmount:v=!1,raw:A=!1,ttl:T}=f,P=t(),N=!A&&"function"==typeof d;if("string"==typeof e&&-1!==e.indexOf(te)&&-1!==_(e).indexOf(te))throw Error(`@plitzi/nexus: refused to write to unsafe path "${e}" (\`__proto__\` segment)`);if("string"==typeof e&&y(e))return;if(s&&"string"==typeof e&&!(-1===e.indexOf(".")?Object.hasOwn(P,e):((e,t)=>{let r=e;for(let n=0,i=t.length;n<i;n++){if("object"!=typeof r||!r||!Object.hasOwn(r,t[n]))return!1;r=r[t[n]]}return!0})(P,_(e))))return m?.(e),void s.setState(e,d,{canPropagate:w,unmount:v,raw:A,ttl:T});if("string"!=typeof e)return void M(e,d,P,w,N);if(-1===e.indexOf(".")){if(v){if(!Object.hasOwn(P,e))return;let t=P[e];if(c.length>0&&g(e,void 0,t)===B)return;h.drop(e,!w);let n=u.length>0?r():void 0;if(a(e),void 0!==n&&k(e,n,r()),w&&(x(o,e),l.size>0)){let r=l.direct.get(e);r&&x(r,e),S(e,t,void 0,1)}return void p()}let t=P[e],n=N?d(t):d,s=n;if(c.length>0){let r=g(e,n,t);if(r===B)return;s=r}if(b(e,T,!w),t===s)return;let f=u.length>0?r():void 0;if(i(e,s),void 0!==f&&k(e,f,r()),w&&(x(o,e),l.size>0)){let r=l.direct.get(e);r&&x(r,e),S(e,t,s,1)}return void p()}let D,j=_(e);if(v){if(c.length>0&&g(e,void 0,C(P,e))===B)return;h.drop(e,!w),D=((e,t)=>L(e,t,0))(P,j)}else if(c.length>0){let t=C(P,e),r=N?d(t):d,n=g(e,r,t);if(n===B)return;D=U(P,e,j,n,!1)}else D=U(P,e,j,d,N);if(v||b(e,T,!w),D===W)return;let O=D;n(O),u.length>0&&k(e,P,O),w&&(x(o,e),l.size>0&&(((e,t)=>{l.walkAncestors(t,t=>x(t,e))})(e,j),S(e,P,O,0))),p()},batch:e=>{w++;try{return e()}finally{if(w--,0===w&&v.size>0){let e=[...v];v.clear();let t=ee(e,void 0,e.length);t!==K&&f(t,"notify",void 0)}}}}}({getOwnState:b,getOwnSnapshot:w,setOwnState:e=>{a=e,r=void 0,k()},mutateOwnKey:(e,t)=>{a[e]=t,k(),r=void 0},deleteOwnKey:e=>{delete a[e],k(),r=void 0},parent:p,listeners:s,pathListeners:l,changeListeners:o,interceptors:d,readOnly:t?.readOnly??[],freshness:g,reportError:y,invalidateDescendants:c,onDelegateToParent:X&&p?e=>p.scopeClaims?.claimDelegatedWrite(e,m):void 0}),E=()=>{n&&(n.unsubscribe(),n=void 0,S())},$=()=>{p&&(!D&&(s.length>0||l.size>0||o.length>0)?!n&&p&&(k(),S(),n=function(e,t,r,n,i,a,s){let o;return{unsubscribe:e.subscribe(e=>{s();let l=e;if(t.forEach(t=>t(e),e=>a(e,"notify",l)),r.size>0&&r.forEachAffected(e,t=>t(e),e=>a(e,"notify",l)),n.length>0){let e=i(),t=o??e,r={path:l,prev:t,next:e,prevValue:void 0===l?t:C(t,l),nextValue:void 0===l?e:C(e,l)};o=e,n.forEach(e=>e(r),e=>a(e,"onChange",l))}}),seedBaseline:()=>{o??=i()}}}(p,s,l,o,v,y,k),o.length>0&&n.seedBaseline()):E())},F=e=>($(),()=>{e(),$()}),z=e=>F(s.add(e)),I=(e,t)=>F(l.add(e,t)),Y=e=>{let t=F(o.add(e));return n?.seedBaseline(),t};a="function"==typeof e?e(j,v):e;let H=e=>g.get(e)??p?.getFreshness(e),q={id:t?.id,scopePath:t?.scopePath,getState:v,getOwnState:w,getPath:x,setState:j,get:e=>void 0===e?v():x(e),set:j,watch:(e,t)=>"function"==typeof e?z(e):I(e,t),withBase:e=>{let t=(t,r,n)=>j(void 0===t?e:`${e}.${t}`,r,n);return{getState:t=>{let r=x(e);return void 0===r&&void 0!==t?t:r},getPath:(t,r)=>{let n=x(`${e}.${t}`);return void 0===n&&void 0!==r?r:n},setState:t,subscribe:t=>I(e,t),subscribePath:(t,r)=>I(`${e}.${t}`,r),get:t=>x(void 0===t?e:`${e}.${t}`),set:t,watch:(t,r)=>"function"==typeof t?I(e,t):I(`${e}.${t}`,r)}},batch:O,subscribe:z,subscribePath:I,subscribeChange:Y,getFreshness:H,isStale:e=>{let t=H(e);return!t||Date.now()>=t.expiresAt},expire:e=>{let t=g.expire(e,Date.now()),r=p?p.expire(e):[];return 0===r.length?t:[...t,...r]},watchFreshness:(e,t)=>{let r="function"==typeof e?void 0:e,n="function"==typeof e?e:t,i=void 0===r?n:e=>{let t=e.path;(t===r||t.startsWith(`${r}.`)||r.startsWith(`${t}.`))&&n(e)},a=g.subscribe(i),s=p?.watchFreshness(i);return()=>{a(),s?.()}},getFreshnessRecords:()=>g.getRecords(),destroy:()=>{D=!0,E(),s.clear(),l.clear(),o.clear(),u.clear(),i?.(),X&&p&&p.scopeClaims?.releaseScope(m)},reconnect:()=>{D=!1,p&&(i?.(),i=p.subscribeInvalidate?.(T)),$()},subscribeInvalidate:e=>u.add(e),hydrate:()=>{for(let e of f)e()}};if(t?.middlewares)for(let A of t.middlewares){let e=A(q);e?.beforeChange&&d.push(e.beforeChange),e?.onChange&&Y(e.onChange),e?.onError&&h.push(e.onError);let r=e?.hydrate;r&&(t.deferHydrate?f.push(()=>r(q)):r(q))}return X&&(q.scopeClaims=(()=>{let e=/* @__PURE__ */new Map,t=/* @__PURE__ */new Map;return{claimDelegatedWrite(r,n){let i=e.get(r);if(void 0!==i){if(i===n)return;if(Z)throw Error((e=>`@plitzi/nexus: scope collision — two sibling scopes under the same parent both delegate a write to "${e}", clobbering each other through the shared parent. Write to a path each scope owns, or move the shared value into the parent and update it there.`)(r));return}e.set(r,n);let a=t.get(n);a?a.add(r):t.set(n,/* @__PURE__ */new Set([r]))},releaseScope(r){let n=t.get(r);if(n){for(let t of n)e.delete(t);t.delete(r)}}}})()),Z&&(q.listeners=s,q.pathListeners=l,q.changeListeners=o,q.interceptors=d,q.errorHandlers=h,q.invalidateListeners=u,q.getMergeCount=M),q}var le=a(void 0);le.displayName="StoreContext";var ue=a(void 0);ue.displayName="StoreRegistryContext";var ce=(e,t)=>{for(let r=e;r;r=r.parent)if(r.id===t)return r.store},de=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0};function he(e,t,r){let n=d(le),i=d(ue);if(e)return e;if(void 0!==r){let e=ce(i,r);if(!e)throw Error(`${t}: no store registered with id "${r}" in any ancestor StoreProvider`);return e}if(!n)throw Error(`${t} must be used inside a StoreProvider`);return n}function fe(e,t,r){let n=t.current.length;return m(()=>Array.from({length:n},(r,n)=>(r,i)=>{let a=t.current[n],s="function"==typeof a?a(e.getState()):a;e.setState(s,r,i)}),[e,r])}var pe=typeof window<"u"?p:h,me=(e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i of r)if(!Object.is(e[i],t[i]))return!1;return!0};function ye(e,t,r={}){let n=r,i=he(n.store,"useStoreSync",n.storeId);Array.isArray(e)?function(e,t,r,n){let{mode:i="sync",enabled:a=!0,syncStrategy:s="afterRender",raw:o=!1,ttl:l}=n,u=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),c=y(!1),d=!c.current;c.current=!0;let h=y(void 0),f=a&&(d||"sync"===i&&r.some((e,t)=>!Object.is(h.current?.[t],e))),p=(n=!0)=>{h.current=r,e.batch(()=>{t.forEach((t,i)=>{let a="function"==typeof t?t(e.getState()):t;e.setState(a,r[i],{canPropagate:n,raw:o,ttl:l})})})};"render"===s?f&&p():(f&&d&&p(!1),pe(()=>{f&&!d&&p()},[f,r,u]))}(i,e,t,r):function(e,t,r,n){let i=void 0===t,a="function"==typeof t,s=i?me:Object.is,{mode:o="sync",enabled:l=!0,equalityFn:u=s,syncStrategy:c="afterRender",raw:d=!1,ttl:h}=n,f=y(void 0),p=y(!1),m=!p.current;p.current=!0;let g=f.current,b=l&&(m||"sync"===o&&(void 0===g||!u(g,r))),w=(n=!0)=>{if(f.current=r,i)e.setState(void 0,e=>({...e,...r}),{canPropagate:n});else if(a){let i=t(e.getState());e.setState(i,r,{canPropagate:n,raw:d,ttl:h})}else e.setState(t,r,{canPropagate:n,raw:d,ttl:h})};"render"===c?b&&w():(b&&m&&w(!1),pe(()=>{b&&!m&&w()},[b,r,t]))}(i,e,t,r)}var ge=[];var be=()=>({useStore:function(e,t){return function(e,t={}){let r=he(t.store,"useStore",t.storeId),n=Array.isArray(e),i=function(e,t,r){let n=r.mode??"sync",i=r.enabled??!0,a=void 0===t,s=r.equalityFn??(a?me:Object.is),o=r.transformer,l=y(o);l.current=o;let u=m(()=>function(e,t){return()=>{if("string"==typeof t)return e.getPath(t);if("function"==typeof t){let r=e.getState();return C(r,t(r))}return e.getState()}}(e,t),[e,t]),d=y(u()),h=m(()=>r=>i&&"mount"!==n?"string"==typeof t?e.subscribePath(t,r):e.subscribe(r):()=>{},[i,n,t,e]),f=()=>{if(!i)return d.current;if("mount"===n)return u();let e=u();return s(d.current,e)?d.current:(d.current=e,e)},p=b(h,f,f);return[m(()=>l.current?l.current(p):p,[p]),c((r,n)=>{a?e.setState(void 0,r,n):"function"==typeof t?e.setState(t(e.getState()),r,n):e.setState(t,r,n)},[e,t])]}(r,n?void 0:e,n?{...t,enabled:!1,transformer:void 0}:t),a=function(e,t,r){let n=r.mode??"sync",i=r.enabled??!0,a=r.equalityFn??de,s=r.transformer,o=y(s);o.current=s;let l=y(t);l.current=t;let u=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),d=y(null),h=m(()=>function(e,t,r,n={}){let{equalityFn:i=de}=n;return()=>{let n=t.current,a=n.some(e=>"function"==typeof e)?e.getState():void 0,s=n.map(t=>"function"==typeof t?C(a,t(a)):e.getPath(t)),o=r.current;return null!==o&&i(o,s)?o:(r.current=s,s)}}(e,l,d,{equalityFn:a}),[e,u,a]),f=function(e,t,r,n,i){return m(()=>r=>{if(!n||"mount"===i)return()=>{};let a=t.current;if(a.some(e=>"function"==typeof e))return e.subscribe(r);let s=a.map(t=>e.subscribePath(t,r));return()=>s.forEach(e=>e())},[e,r,n,i])}(e,l,u,i,n),p=function(e,t,r,n){let i=c(()=>{if(!r){let e=n.current??t();return n.current=e,e}return t()},[r,t,n]);return b(e,i,i)}(f,h,i,d);return[m(()=>o.current?o.current(p):p,[p]),...fe(e,l,u)]}(r,n?e:ge,n?t:{...t,enabled:!1,transformer:void 0});return n?a:i}(e,t)},useStoreSync:function(e,t,r){ye(e,t,r)},useStoreGetter:function(e,t){return function(e,t){let r="string"==typeof e?e:void 0,n=Array.isArray(e)?e:void 0,i="object"!=typeof e||Array.isArray(e)?t:e,a=he(i?.store,"useStoreGetter",i?.storeId),s=n?.map(e=>"function"==typeof e?e.toString():e).join("|");return m(()=>{if(n)return n.map(e=>(t,r)=>{let n="function"==typeof e?e(a.getState()):C(a.getState(),e);if(void 0!==t){let e=C(n,t);return void 0===e&&void 0!==r?r:e}return void 0===n&&void 0!==r?r:n});if(void 0!==r){let e=a.withBase(r);return(t,r)=>void 0===t?void 0===r?e.getState():e.getState(r):void 0===r?e.getPath(t):e.getPath(t,r)}return(e,t)=>{let r=a.getState();if(void 0!==e){let n=C(r,e);return void 0===n&&void 0!==t?t:n}return r}},[a,r,s])}(e,t)},useStoreSetter:function(e,t){return function(e,t){let r="string"==typeof e?e:void 0,n="object"==typeof e?e:t,i=he(n?.store,"useStoreSetter",n?.storeId);return m(()=>void 0===r?i.setState:i.withBase(r).setState,[i,r])}(e,t)},useFreshness:function(e,t){return function(e,t={}){let{enabled:r=!0}=t,n=he(t.store,"useFreshness",t.storeId),i=y(void 0),a=c(t=>r?n.watchFreshness(e,t):()=>{},[n,e,r]),s=c(()=>{let t=(e=>({isStale:!e||Date.now()>=e.expiresAt,updatedAt:e?.updatedAt,expiresAt:e?.expiresAt}))(n.getFreshness(e));return i.current&&((e,t)=>e.isStale===t.isStale&&e.updatedAt===t.updatedAt&&e.expiresAt===t.expiresAt)(i.current,t)?i.current:(i.current=t,t)},[n,e]);return b(a,s,s)}(e,t)},useOnStale:function(e,t,r){!function(e,t,r={}){let{enabled:n=!0}=r,i=he(r.store,"useOnStale",r.storeId),a=y(t);h(()=>{a.current=t},[t]),h(()=>{if(n)return i.watchFreshness(e,e=>{("expired"===e.type||"elapsed"===e.type)&&a.current(e)})},[i,e,n])}(e,t,r)}});function we(e){return he(void 0,"useStoreById",e)}var{useStore:ve,useStoreSync:xe,useStoreGetter:ke,useStoreSetter:Se}=be(),{useStore:Me,useStoreSync:Ae,useStoreGetter:Te,useStoreSetter:Pe}=be(),{useStore:Ne,useStoreSync:De,useStoreGetter:_e,useStoreSetter:je}=be(),Ce=Symbol("twigArrowParams"),Oe=(e,t)=>e===t?0:null==e?-1:null==t?1:"number"==typeof e&&"number"==typeof t?e-t:String(e).localeCompare(String(t)),We=e=>null==e?"":String(e),Ee=e=>"object"==typeof e&&!!e&&"__PLITZI_RAW__"===e.__marker,$e=e=>Ee(e)?e.__raw:e,Fe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ze=/* @__PURE__ */new Map,Ie={raw:e=>(e=>({__raw:e,__marker:"__PLITZI_RAW__"}))(e),to_json:e=>"object"==typeof e&&e?JSON.stringify(e):We(e),json_encode:e=>"object"==typeof e&&e?JSON.stringify(e):We(e),object_as_json:e=>"object"==typeof e&&e?JSON.stringify(e):e,default:(e,t)=>(e=>null==e||""===e)(e)?t[0]:e,upper:e=>"string"==typeof e?e.toUpperCase():e,lower:e=>"string"==typeof e?e.toLowerCase():e,trim:e=>"string"==typeof e?e.trim():e,capitalize:e=>"string"==typeof e&&e.length>0?e[0].toUpperCase()+e.slice(1).toLowerCase():e,title:e=>"string"==typeof e?e.replace(/\b\w/g,e=>e.toUpperCase()):e,camelize:e=>"string"==typeof e?e.replace(/[-_]+(.)?/g,(e,t)=>t?t.toUpperCase():""):e,kebab:e=>"string"==typeof e?e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():e,snake:e=>"string"==typeof e?e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():e,ltrim:e=>"string"==typeof e?e.trimStart():e,rtrim:e=>"string"==typeof e?e.trimEnd():e,pad:(e,t)=>{if("string"!=typeof e)return e;let r=Number(t[0])||0,n=t.length>1?We(t[1]):" ";if(""===n)return e;let i=r-e.length;if(i<=0)return e;let a=Math.ceil(i/n.length);return n.repeat(a).slice(0,i)+e},padRight:(e,t)=>{if("string"!=typeof e)return e;let r=Number(t[0])||0,n=t.length>1?We(t[1]):" ";if(""===n)return e;let i=r-e.length;if(i<=0)return e;let a=Math.ceil(i/n.length);return e+n.repeat(a).slice(0,i)},number:(e,t)=>{if("number"==typeof e){let r=Number(t[0])||0;return e.toFixed(r)}if("string"!=typeof e)return e;let r=e.match(/-?\d+(?:\.\d+)?/);return r?Number(r[0]):0},replace:(e,t)=>"string"!=typeof e||0===t.length?e:e.split(We(t[0])).join(We(t[1])),slice:(e,t)=>{if(0===t.length)return e;let r=Number(t[0])||0,n=t.length>1&&Number.isFinite(Number(t[1]))?r+Number(t[1]):void 0;return"string"==typeof e||Array.isArray(e)?e.slice(r,n):e},split:(e,t)=>"string"==typeof e&&t.length>0?e.split(We(t[0])):e,join:(e,t)=>Array.isArray(e)?e.join(0===t.length?"":We(t[0])):e,reverse:e=>"string"==typeof e?e.split("").reverse().join(""):Array.isArray(e)?[...e].reverse():e,length:e=>"string"==typeof e||Array.isArray(e)?e.length:"number"==typeof e?We(e).length:"object"==typeof e&&e?Object.keys(e).length:0,first:e=>"string"==typeof e?e.length>0?e[0]:"":Array.isArray(e)?e.length>0?e[0]:void 0:e,last:e=>"string"==typeof e?e.length>0?e[e.length-1]:"":Array.isArray(e)?e.length>0?e[e.length-1]:void 0:e,contains:(e,t)=>{if(0===t.length)return!1;let r=t[0];return"string"==typeof e?e.includes(We(r)):!!Array.isArray(e)&&e.includes(r)},startswith:(e,t)=>"string"==typeof e&&t.length>0&&e.startsWith(We(t[0])),endswith:(e,t)=>"string"==typeof e&&t.length>0&&e.endsWith(We(t[0])),number_format:(e,t)=>{if("number"!=typeof e)return e;let r=Number(t[0])||0,n=null==t[1]?".":We(t[1]),i=null==t[2]?"":We(t[2]),a=e.toFixed(r);if(""===i)return a.replace(".",n);let s=a.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,i),s.join(n)},sort:(e,t)=>{if(!Array.isArray(e))return e;let r=[...e],n=t[0];if("function"==typeof n){let e=n;return(e[Ce]??1)>=2?r.sort((t,r)=>Number(e(t,r))):r.sort((t,r)=>Oe(e(t),e(r)))}return r.sort(Oe)},batch:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=Number(t[0]);if(r<=0)return e;let n=[];for(let i=0;i<e.length;i+=r)n.push(e.slice(i,i+r));return n},map:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=t[0];return"function"==typeof r?e.map((e,t)=>r(e,t)):e},reduce:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=t[0];if("function"!=typeof r)return e;let n=t[1],i=+(void 0===n),a=void 0===n?e[0]:n;for(let s=i;s<e.length;s++)a=r(a,e[s],s);return a},merge:(e,t)=>{if(0===t.length)return e;let r=t[0];return Array.isArray(e)&&Array.isArray(r)?[...e,...r]:"object"==typeof e&&e&&"object"==typeof r&&r&&!Array.isArray(r)?{...e,...r}:e},keys:e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.keys(e):e,values:e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.values(e):e,filter:(e,t)=>{if(!Array.isArray(e))return e;if(0===t.length)return e.filter(Boolean);let r=t[0];if("function"==typeof r)return e.filter((e,t)=>r(e,t));let n=We(r);return e.filter(e=>{if("object"==typeof e&&e){let t=e[n];return null!=t&&!1!==t&&""!==t}return!!e})},column:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=We(t[0]);return e.map(e=>"object"==typeof e&&e?e[r]:void 0)},url_encode:e=>"string"==typeof e?encodeURIComponent(e):"object"==typeof e&&e&&!Array.isArray(e)?new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,We(t)]))).toString():e,nl2br:e=>"string"==typeof e?e.replace(/\n/g,"<br>"):e,striptags:(e,t)=>{if("string"!=typeof e)return e;let r=t.length>0?We(t[0]).trim():"";if(r){let t=r.split(/(?:\s*>\s*<\s*|<\s*|>\s*)/).filter(Boolean).map(e=>e.replace(/[/>]/g,"").trim());if(t.length>0){let r=RegExp(`<(?!/?(?:${t.join("|")})\\b)[^>]+>`,"gi");return e.replace(r,"").replace(/\s+/g," ").trim()}}return e.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim()},abs:e=>"number"==typeof e?Math.abs(e):e,round:(e,t)=>{if("number"!=typeof e)return e;let r=Number(t[0])||0,n=null==t[1]?"common":We(t[1]),i=10**r;return"ceil"===n?Math.ceil(e*i)/i:"floor"===n?Math.floor(e*i)/i:Math.round(e*i)/i},format:(e,t)=>{if("string"!=typeof e)return e;let r=0;return e.replace(/%s|%d|%f|%%/g,e=>{if("%%"===e)return"%";let n=t[r];return r++,void 0===n?e:"%d"===e?String(Math.floor(Number(n))):"%f"===e?String(Number(n)):We(n)})},spaceless:e=>"string"==typeof e?e.replace(/>\s+</g,"><").trim():e,random:e=>Array.isArray(e)?e.length>0?e[Math.floor(Math.random()*e.length)]:void 0:"string"==typeof e?e.length>0?e[Math.floor(Math.random()*e.length)]:"":"number"==typeof e?Math.floor(Math.random()*e):e,date:(e,t)=>{if(0===t.length)return e;let r=We(t[0]),n=(e=>{if(e instanceof Date)return e;if("number"==typeof e)return new Date(e);let t=String(e).trim();return/^-?\d+$/.test(t)?new Date(Number(t)):new Date(t)})(e);if(Number.isNaN(n.getTime()))return"";let i=((e,t)=>{if(!t)return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),weekday:e.getDay()};let r=(e=>{if(!ze.has(e))try{ze.set(e,new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short"}))}catch{ze.set(e,null)}return ze.get(e)??null})(t);if(!r)return;let n=r.formatToParts(e),i=e=>n.find(t=>t.type===e)?.value??"";return{year:Number(i("year")),month:Number(i("month")),day:Number(i("day")),hours:Number(i("hour")),minutes:Number(i("minute")),seconds:Number(i("second")),weekday:Fe.indexOf(i("weekday"))}})(n,t.length>1?We(t[1]):"");if(!i)return"";let a=e=>String(e).padStart(2,"0"),s={Y:String(i.year),m:a(i.month),n:String(i.month),d:a(i.day),j:String(i.day),H:a(i.hours),G:String(i.hours),i:a(i.minutes),s:a(i.seconds),w:String(i.weekday),N:String(0===i.weekday?7:i.weekday),U:String(Math.floor(n.getTime()/1e3)),l:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][i.weekday],F:["January","February","March","April","May","June","July","August","September","October","November","December"][i.month-1],M:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i.month-1]},o="";for(let l of r)o+=Object.prototype.hasOwnProperty.call(s,l)?s[l]:l;return o},base64_encode:e=>"string"==typeof e?(e=>{let t=(new TextEncoder).encode(e),r="";for(let n=0;n<t.length;n++)r+=String.fromCharCode(t[n]);return btoa(r)})(e):e,base64_decode:e=>"string"==typeof e?(e=>{let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return(new TextDecoder).decode(r)})(e):e,md5:e=>"string"==typeof e?(e=>{let t=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],r=/* @__PURE__ */new Uint32Array(64);for(let p=0;p<64;p++)r[p]=Math.floor(4294967296*Math.abs(Math.sin(p+1)));let n=(new TextEncoder).encode(e),i=8*n.length,a=1+(n.length+8>>6)<<6,s=new Uint8Array(a);s.set(n),s[n.length]=128;let o=new DataView(s.buffer);o.setUint32(a-8,i>>>0,!0),o.setUint32(a-4,Math.floor(i/4294967296)>>>0,!0);let l=1732584193,u=4023233417,c=2562383102,d=271733878,h=(e,t)=>e<<t|e>>>32-t;for(let p=0;p<a;p+=64){let e=/* @__PURE__ */new Uint32Array(16);for(let t=0;t<16;t++)e[t]=o.getUint32(p+4*t,!0);let n=l,i=u,a=c,s=d;for(let o=0;o<64;o++){let l,u;o<16?(l=i&a|~i&s,u=o):o<32?(l=s&i|~s&a,u=(5*o+1)%16):o<48?(l=i^a^s,u=(3*o+5)%16):(l=a^(i|~s),u=7*o%16),l=l+n+r[o]+e[u]|0,n=s,s=a,a=i,i=i+h(l,t[o])|0}l=l+n|0,u=u+i|0,c=c+a|0,d=d+s|0}let f=e=>{let t="";for(let r=0;r<4;r++)t+=(e>>>8*r&255).toString(16).padStart(2,"0");return t};return f(l)+f(u)+f(c)+f(d)})(e):e,without:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let r=t.map(We),n={};for(let[i,a]of Object.entries(e))r.includes(i)||(n[i]=a);return n},only:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let r=t.map(We),n={};for(let[i,a]of Object.entries(e))r.includes(i)&&(n[i]=a);return n},find:(e,t)=>{if(!Array.isArray(e)||0===t.length)return;let r=t[0];if("function"==typeof r)return e.find((e,t)=>r(e,t));if(t.length<2)return;let n=We(r),i=t[1];return e.find(e=>"object"==typeof e&&e?e[n]===i:e===i)},pluck:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=We(t[0]);return e.map(e=>"object"==typeof e&&e?e[r]:void 0)},unique:e=>Array.isArray(e)?[...new Set(e)]:e,flatten:e=>Array.isArray(e)?e.flat():e,sum:e=>Array.isArray(e)?e.reduce((e,t)=>e+("number"==typeof t?t:0),0):e,chunk:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=Number(t[0]);if(r<=0)return e;let n=[];for(let i=0;i<e.length;i+=r)n.push(e.slice(i,i+r));return n},index_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=We(t[0]),n={};for(let i of e)"object"==typeof i&&i&&(n[String(i[r]??"")]=i);return n},group_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let r=We(t[0]),n={};for(let i of e)if("object"==typeof i&&i){let e=String(i[r]??"");n[e]=n[e]??[],n[e].push(i)}return n}},Ye=e=>!(null==e||!1===e||""===e||0===e||Array.isArray(e)&&0===e.length),He=(e,t)=>"string"==typeof t?t.includes(String(e)):Array.isArray(t)?t.includes(e):!("object"!=typeof t||!t)&&String(e)in t,qe={defined:e=>void 0!==e,null:e=>null==e,none:e=>null==e,empty:e=>null==e||""===e||!1===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length,iterable:e=>Array.isArray(e)||"object"==typeof e&&!!e,even:e=>"number"==typeof e&&e%2==0,odd:e=>"number"==typeof e&&1===Math.abs(e%2)},Le=e=>"path"===e.type||"filter"===e.type&&Le(e.subject),Ue=[],Be=class e{variables;keepEmptyTokens;breakFlag=!1;continueFlag=!1;hasSet=!1;constructor(e,t=!1){this.variables={...e},this.keepEmptyTokens=t}evalNodes(e){let t=e.length;if(0===t)return"";if(1===t)return this.evalNode(e[0]);let r="";for(let n=0;n<t&&(r+=this.evalNode(e[n]),!this.breakFlag&&!this.continueFlag);n++);return r}evalNode(e){switch(e.type){case"text":return e.value;case"variable":return this.evalVariable(e);case"if":return this.evalIf(e);case"for":return this.evalFor(e);case"set":return this.evalSet(e);case"apply":return this.evalApply(e);case"break":return this.breakFlag=!0,"";case"continue":return this.continueFlag=!0,""}}evalVariable(e){let t=this.evalExpression(e.expression);return this.keepEmptyTokens&&((e,t)=>null==t||""===t&&Le(e))(e.expression,t)?e.source:Ee(t)?String($e(t)):"function"==typeof t?"":null!=t&&"object"!=typeof t?String(t):e.raw?null==t?"":String(t):"object"==typeof t&&t?JSON.stringify(t):""}evalIf(e){if(Ye(this.evalExpression(e.condition)))return this.evalNodes(e.body);for(let t of e.elseifClauses)if(Ye(this.evalExpression(t.condition)))return this.evalNodes(t.body);return e.elseBody?this.evalNodes(e.elseBody):""}evalFor(e){let t=this.evalExpression(e.collection);if(void 0!==e.source&&void 0===t)return e.source;let r,n=null;if(null!==e.keyVar){let i=(e=>"object"==typeof e&&e&&!Array.isArray(e)?Object.entries(e):null)(t);if(!i||0===i.length)return e.elseBody?this.evalNodes(e.elseBody):"";let a=i.length;n=Array(a),r=Array(a);for(let e=0;e<a;e++)n[e]=i[e][0],r[e]=i[e][1]}else{let n=(e=>Array.isArray(e)?e:"object"==typeof e&&e?Object.values(e):null)(t);if(!n||0===n.length)return e.elseBody?this.evalNodes(e.elseBody):"";r=n}return this.runLoop(e,r,n)}runLoop(e,t,r){let{valueVar:n,keyVar:i,body:a}=e,s=t.length,o=this.variables.loop,l={index:0,index0:0,first:!1,last:!1,length:s,revindex:0};this.variables.loop=l;let u="";for(let c=0;c<s;c++){if(l.index=c+1,l.index0=c,l.first=0===c,l.last=c===s-1,l.revindex=s-c,null!==r&&null!==i&&(this.variables[i]=r[c]),this.variables[n]=t[c],u+=this.evalNodes(a),this.breakFlag){this.breakFlag=!1;break}this.continueFlag&&=!1}return void 0===o?delete this.variables.loop:this.variables.loop=o,u}evalSet(e){return this.hasSet=!0,this.variables[e.name]=Array.isArray(e.value)?this.evalNodes(e.value):this.evalExpression(e.value),""}evalApply(e){let t=this.applyFilters(this.evalNodes(e.body),e.filters);return Ee(t)?String($e(t)):"object"==typeof t&&t?JSON.stringify(t):null==t?"":String(t)}applyFilters(e,t){let r=e;for(let n of t){let e=Ie[n.name];void 0!==e&&(r=e(r,0===n.args.length?Ue:this.evalArgs(n.args)))}return r}evalArgs(e){let t=e.length,r=Array(t);for(let n=0;n<t;n++)r[n]=this.evalExpression(e[n]);return r}evalExpression(e){switch(e.type){case"literal":return e.value;case"array":{let t=e.elements,r=Array(t.length);for(let e=0;e<t.length;e++)r[e]=this.evalExpression(t[e]);return r}case"object":{let t={};for(let r of e.entries){let e=this.evalExpression(r.key);t["string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):""]=this.evalExpression(r.value)}return t}case"range":return this.evalRange(e.start,e.end);case"path":return this.resolvePath(e.segments);case"index":return this.resolveIndex(e.object,e.index);case"function":return this.evalFunction(e.name,e.args);case"filter":return this.applyFilters(this.evalExpression(e.subject),e.filters);case"concat":{let t=e.parts,r=t.length,n="";for(let e=0;e<r;e++){let r=this.evalExpression(t[e]);n+=null==r?"":String(r)}return n}case"unary":return"-"===e.operator?-Number(this.evalExpression(e.operand)):!Ye(this.evalExpression(e.operand));case"binary":return this.evalBinary(e.operator,e.left,e.right);case"default":return this.evalExpression(e.value)??this.evalExpression(e.defaultExpr);case"ternary":return Ye(this.evalExpression(e.condition))?this.evalExpression(e.trueExpr):this.evalExpression(e.falseExpr);case"arrow":return this.createArrowFunction(e.params,e.body)}}createArrowFunction(t,r){let n={...this.variables},i=this.keepEmptyTokens,a=(...a)=>{let s=new e(n,i);for(let e=0;e<t.length;e++)s.variables[t[e]]=a[e];return s.evalExpression(r)};return a[Ce]=t.length,a}resolvePath(e){let t=e.length;if(0===t)return;let r=this.variables[e[0]];for(let n=1;n<t;n++){if(null==r)return;r=r[e[n]]}return r}resolveIndex(e,t){let r=this.evalExpression(e);if(null==r)return;let n=this.evalExpression(t);return null!=n?r[String(n)]:void 0}evalRange(e,t){let r=Number(this.evalExpression(e)),n=Number(this.evalExpression(t)),i=r<=n,a=1+(i?n-r:r-n),s=Array(a);for(let o=0;o<a;o++)s[o]=i?r+o:r-o;return s}evalFunction(e,t){let r=this.evalArgs(t);switch(e){case"cycle":{let e=r[0],t=r[1];return Array.isArray(e)&&"number"==typeof t?e[t%e.length]:""}case"max":return this.minMax(r,Math.max);case"min":return this.minMax(r,Math.min);case"range":return this.rangeFunction(r);default:return""}}minMax(e,t){return 0===e.length?void 0:t(...1===e.length&&Array.isArray(e[0])?e[0]:e)}rangeFunction(e){if(0===e.length)return[];if(1===e.length){let t=Number(e[0]),r=Array(t+1);for(let e=0;e<=t;e++)r[e]=e;return r}let t=Number(e[0]),r=Number(e[1]),n=e.length>2?Number(e[2]):t<=r?1:-1;if(0===n)return[];let i=Math.floor((n>0?r-t:t-r)/Math.abs(n))+1;if(i<=0)return[];let a=Array(i);for(let s=0;s<i;s++)a[s]=t+s*n;return a}evalBinary(e,t,r){if(("is"===e||"is not"===e)&&"path"===r.type&&1===r.segments.length){let n=qe[r.segments[0]];if(n){let r=n(this.evalExpression(t));return"is"===e?r:!r}}if("or"===e)return Ye(this.evalExpression(t))||Ye(this.evalExpression(r));if("and"===e)return Ye(this.evalExpression(t))&&Ye(this.evalExpression(r));let n=this.evalExpression(t),i=this.evalExpression(r),a="number"==typeof n&&"number"==typeof i;switch(e){case"+":return a?n+i:Number(n)+Number(i);case"-":return a?n-i:Number(n)-Number(i);case"*":return a?n*i:Number(n)*Number(i);case"/":return a?n/i:Number(n)/Number(i);case"%":return a?n%i:Number(n)%Number(i);case"==":return n===i||String(n)===String(i);case"!=":return n!==i&&String(n)!==String(i);case">":return a?n>i:Number(n)>Number(i);case"<":return a?n<i:Number(n)<Number(i);case">=":return a?n>=i:Number(n)>=Number(i);case"<=":return a?n<=i:Number(n)<=Number(i);case"in":return He(n,i);case"not in":return!He(n,i);case"is":return n===i;case"is not":return n!==i;default:return!1}}},Re=(e,t)=>e[t],Ve=(e,t)=>{let r=t.indexOf(".");if(-1===r)return e[t];let n=e[t.slice(0,r)],i=r+1,a=t.length;for(;i<a;){if(null==n)return;let e=t.indexOf(".",i);if(-1===e)return n[t.slice(i)];n=n[t.slice(i,e)],i=e+1}return n},Xe=e=>null==e?"":"object"==typeof e?JSON.stringify(e):String(e),Ze=e=>{try{return JSON.parse(e)||e}catch{return e}},Qe=41,Ge=e=>e>=97&&e<=122||e>=65&&e<=90||95===e,Je=e=>Ge(e)||e>=48&&e<=57,Ke=e=>Je(e)||45===e,et=e=>e>=48&&e<=57,tt=e=>32===e||9===e||10===e||13===e,rt=e=>{let t=e.length;if(0===t||!Ge(e.charCodeAt(0)))return!1;for(let r=1;r<t;r++)if(!Je(e.charCodeAt(r)))return!1;return!0},nt=e=>{let t=e.length;if(0===t||!Ge(e.charCodeAt(0)))return!1;let r=!1,n=!1;for(let i=1;i<t;i++){let t=e.charCodeAt(i);if(46!==t){if(r){if(n=et(t),!n&&!Ge(t))return!1;r=!1}else if(n?!et(t):!Je(t))return!1}else{if(r)return!1;r=!0,n=!1}}return!r},it=e=>rt(e),at=(e,t)=>t?`{{{${e}}}}`:`{{${e}}}`,st=e=>{switch(e.type){case"text":return e.value;case"variable":return at(e.content,e.raw);case"tag":return`{%${e.content}%}`}},ot=class{src;pos=0;constructor(e){this.src=e}eof(){return this.pos>=this.src.length}peek(){return this.pos<this.src.length?this.src.charCodeAt(this.pos):-1}at(e){let t=this.pos+e;return t<this.src.length?this.src.charCodeAt(t):-1}skipWs(){for(;this.pos<this.src.length&&tt(this.src.charCodeAt(this.pos));)this.pos++}scanName(){let e=this.pos;if(!this.eof()&&Ge(this.src.charCodeAt(this.pos)))for(this.pos++;!this.eof()&&Ke(this.src.charCodeAt(this.pos));)this.pos++;return this.src.slice(e,this.pos)}scanIndex(){let e=this.pos;for(;!this.eof()&&et(this.src.charCodeAt(this.pos));)this.pos++;return this.src.slice(e,this.pos)}scanStringLiteral(){let e=this.src.charCodeAt(this.pos);this.pos++;let t="";for(;this.pos<this.src.length&&this.src.charCodeAt(this.pos)!==e;)if(92===this.src.charCodeAt(this.pos)&&this.pos+1<this.src.length){this.pos++;let r=this.src.charCodeAt(this.pos);t+=110===r?"\n":116===r?"\t":114===r?"\r":92===r?"\\":r===e?String.fromCharCode(r):String.fromCharCode(92)+String.fromCharCode(r),this.pos++}else t+=this.src[this.pos],this.pos++;return this.pos<this.src.length&&this.pos++,t}scanNumber(){let e=this.pos;for(45===this.src.charCodeAt(this.pos)&&this.pos++;this.pos<this.src.length&&et(this.src.charCodeAt(this.pos));)this.pos++;if(46===this.src.charCodeAt(this.pos))for(this.pos++;this.pos<this.src.length&&et(this.src.charCodeAt(this.pos));)this.pos++;return Number(this.src.slice(e,this.pos))}matchKeyword(e){let t=this.pos+e.length;if(t>this.src.length)return!1;for(let r=0;r<e.length;r++)if(this.src.charCodeAt(this.pos+r)!==e.charCodeAt(r))return!1;return!(t<this.src.length&&Je(this.src.charCodeAt(t))||(this.pos=t,this.skipWs(),0))}matchBinaryOp(){this.skipWs();let e=this.peek();if(61===this.at(1)){if(61===e)return this.pos+=2,"==";if(33===e)return this.pos+=2,"!=";if(62===e)return this.pos+=2,">=";if(60===e)return this.pos+=2,"<="}return 62===e?(this.pos++,">"):60===e?(this.pos++,"<"):null}},lt=e=>new ut(e).parseTernary(),ut=class extends ot{parseTernary(){let e=this.parseOr();if(this.skipWs(),63===this.peek()){this.pos++,this.skipWs();let t=this.parseOr();if(this.skipWs(),58===this.peek())return this.pos++,this.skipWs(),{type:"ternary",condition:e,trueExpr:t,falseExpr:this.parseTernary()}}return e}parseOr(){let e=this.parseAnd();for(this.skipWs();this.matchKeyword("or");)e={type:"binary",operator:"or",left:e,right:this.parseAnd()},this.skipWs();return e}parseAnd(){let e=this.parseNot();for(this.skipWs();this.matchKeyword("and");)e={type:"binary",operator:"and",left:e,right:this.parseNot()},this.skipWs();return e}parseNot(){return this.skipWs(),this.matchKeyword("not")?{type:"unary",operator:"not",operand:this.parseComparison()}:this.parseComparison()}parseComparison(){let e=this.parseConcat();for(this.skipWs();!this.eof();){if(this.matchKeyword("is")){this.skipWs(),e={type:"binary",operator:this.matchKeyword("not")?"is not":"is",left:e,right:this.parseConcat()},this.skipWs();continue}if(this.matchKeyword("not")){if(this.skipWs(),this.matchKeyword("in")){e={type:"binary",operator:"not in",left:e,right:this.parseConcat()},this.skipWs();continue}let t=this.src.slice(this.pos-4);return this.pos=this.src.length,{type:"unary",operator:"not",operand:lt(t)}}if(this.matchKeyword("in")){e={type:"binary",operator:"in",left:e,right:this.parseConcat()},this.skipWs();continue}let t=this.matchBinaryOp();if(!t)break;e={type:"binary",operator:t,left:e,right:this.parseConcat()},this.skipWs()}return e}parseConcat(){let e=this.parseAdditive();for(this.skipWs();126===this.peek();){this.pos++;let t=this.parseAdditive();e="concat"===e.type?{type:"concat",parts:[...e.parts,t]}:{type:"concat",parts:[e,t]},this.skipWs()}return e}parseAdditive(){let e=this.parseMultiplicative();this.skipWs();for(let t=this.peek();43===t||45===t;t=this.peek())this.pos++,e={type:"binary",operator:43===t?"+":"-",left:e,right:this.parseMultiplicative()},this.skipWs();return e}parseMultiplicative(){let e=this.parseDefault();this.skipWs();for(let t=this.peek();42===t||47===t||37===t;t=this.peek())this.pos++,e={type:"binary",operator:42===t?"*":47===t?"/":"%",left:e,right:this.parseDefault()},this.skipWs();return e}parseDefault(){if(this.skipWs(),45===this.peek()&&et(this.at(1)))return this.maybeTrailingFilters({type:"literal",value:this.scanNumber()});if(45===this.peek())return this.pos++,{type:"unary",operator:"-",operand:this.parseDefault()};let e=this.parseAtom();for(this.skipWs();63===this.peek()&&63===this.at(1);)this.pos+=2,this.skipWs(),e={type:"default",value:e,defaultExpr:this.parseAtom()},this.skipWs();return e}parseAtom(){this.skipWs();let e=this.peek();if(40===e){this.pos++,this.skipWs();let e=this.pos,t=this.tryParseArrowParams();if(null!==t)return this.maybeTrailingFilters({type:"arrow",params:t,body:this.parseTernary()});this.pos=e;let r=this.parseTernary();return this.skipWs(),this.peek()===Qe&&this.pos++,this.maybeTrailingFilters(this.parseAccessChain(r,null))}return 39===e||34===e?this.maybeTrailingFilters({type:"literal",value:this.scanStringLiteral()}):et(e)?this.maybeTrailingFilters({type:"literal",value:this.scanNumber()}):91===e?(this.pos++,this.maybeTrailingFilters({type:"array",elements:this.parseArgList(93)})):123===e?(this.pos++,this.maybeTrailingFilters(this.parseObjectLiteral())):this.parsePathOrFunctionOrArrow()}tryParseArrowParams(){let e=this.pos,t=[];for(this.skipWs();this.peek()!==Qe;){let r=this.scanName();if(!r)return this.pos=e,null;if(t.push(r),this.skipWs(),44!==this.peek())break;this.pos++,this.skipWs()}return this.skipWs(),this.peek()===Qe&&(this.pos++,this.skipWs(),61===this.peek()&&62===this.at(1))?(this.pos+=2,t):(this.pos=e,null)}parsePathOrFunctionOrArrow(){let e=this.scanName();if(!e)return this.pos++,{type:"literal",value:""};if("true"===e||"false"===e)return this.maybeTrailingFilters({type:"literal",value:"true"===e});if(this.skipWs(),61===this.peek()&&62===this.at(1))return this.pos+=2,this.maybeTrailingFilters({type:"arrow",params:[e],body:this.parseTernary()});if(40===this.peek()){this.pos++;let t=this.parseArgList(Qe);return this.maybeTrailingFilters(this.parseAccessChain({type:"function",name:e,args:t},null))}let t=[e];return this.maybeTrailingFilters(this.parseAccessChain({type:"path",segments:t},t))}parseAccessChain(e,t){let r=e,n=t;for(;;){let e=this.peek();if(46===e){let e=this.pos;this.pos++;let t=this.scanName()||this.scanIndex();if(!t){this.pos=e;break}n?n.push(t):r={type:"index",object:r,index:{type:"literal",value:t}};continue}if(91!==e)break;this.pos++;let t=this.parseTernary();this.skipWs(),93===this.peek()&&this.pos++,n&&"literal"===t.type&&"boolean"!=typeof t.value?n.push(String(t.value)):(n&&=(r={type:"path",segments:n},null),r={type:"index",object:r,index:t})}return n?{type:"path",segments:n}:r}maybeTrailingFilters(e){return this.skipWs(),124===this.peek()?{type:"filter",subject:e,filters:this.parseTrailingFilters()}:e}parseObjectLiteral(){let e=[];for(this.skipWs();!this.eof()&&125!==this.peek();){let t=this.parseObjectKey();this.skipWs(),58===this.peek()&&this.pos++,this.skipWs(),e.push({key:t,value:this.parseTernary()}),this.skipWs(),44===this.peek()&&(this.pos++,this.skipWs())}return 125===this.peek()&&this.pos++,{type:"object",entries:e}}parseObjectKey(){let e=this.peek();if(39===e||34===e)return{type:"literal",value:this.scanStringLiteral()};if(et(e))return{type:"literal",value:this.scanNumber()};if(40===e){this.pos++,this.skipWs();let e=this.parseTernary();return this.skipWs(),this.peek()===Qe&&this.pos++,e}return{type:"literal",value:this.scanName()}}parseArgList(e){let t=[];for(this.skipWs();!this.eof()&&this.peek()!==e;)t.push(this.parseTernary()),this.skipWs(),44===this.peek()&&(this.pos++,this.skipWs());return this.peek()===e&&this.pos++,t}parseTrailingFilters(){let e=[];for(;124===this.peek();)this.pos++,this.skipWs(),e.push(this.readFilter()),this.skipWs();return e}parseApplyChain(){this.skipWs();let e=[this.readFilter()];for(this.skipWs();124===this.peek();)this.pos++,this.skipWs(),e.push(this.readFilter()),this.skipWs();return e}readFilter(){let e=this.scanName();return this.skipWs(),40===this.peek()?(this.pos++,{name:e,args:this.parseArgList(Qe)}):{name:e,args:[]}}},ct=e=>{let t=0;for(;t<e.length&&!tt(e.charCodeAt(t));)t++;return e.slice(0,t)},dt=(e,t=!1)=>{let r=new ft(e,t),n=r.parseBody();if(!r.error){let e=r.peek();if(e&&"tag"===e.type){let t=ct(e.content.trim());ht.has(t)&&(r.error=`Orphan closing tag: {% ${t} %} without matching opening tag`)}}return{nodes:n,error:r.error}},ht=/* @__PURE__ */new Set(["endif","endfor","endset","endapply","else","elseif"]),ft=class{tokens;keepEmptyTokens;pos=0;error=null;constructor(e,t=!1){this.tokens=e,this.keepEmptyTokens=t}peek(){return this.tokens[this.pos]}advance(){let e=this.tokens[this.pos];return e&&this.pos++,e}isTag(e){let t=this.peek();if(!t||"tag"!==t.type)return!1;let r=t.content.trim();return r===e||r.startsWith(e+" ")||r.startsWith(e+"\t")}parseBody(){let e=[];for(;this.pos<this.tokens.length;){let t=this.peek();if(!t||"tag"===t.type&&ht.has(ct(t.content.trim())))break;let r=this.parseNode();r&&e.push(r)}return e}parseNode(){let e=this.peek();return e?"text"===e.type?(this.advance(),{type:"text",value:e.value}):"variable"===e.type?this.parseVariable():this.parseTag():null}parseVariable(){let e=this.advance();if(!e||"variable"!==e.type)return{type:"variable",raw:!1,expression:{type:"literal",value:""},source:""};let t=e.content.trim(),r=this.keepEmptyTokens?at(e.content,e.raw):"";if(rt(t))return{type:"variable",raw:e.raw,expression:{type:"path",segments:[t]},source:r};let n=lt(t);return{type:"variable",raw:e.raw,expression:n,source:r}}parseTag(){let e=this.peek();if(!e||"tag"!==e.type)return null;let t=e.content.trim();switch(ct(t)){case"if":return this.parseIf();case"for":return this.parseFor();case"set":return this.parseSet();case"apply":return this.parseApply();case"break":return this.advance(),{type:"break"};case"continue":return this.advance(),{type:"continue"};default:return this.advance(),null}}parseIf(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return this.error="Malformed {% if %} tag",{type:"if",condition:{type:"literal",value:!1},body:[],elseifClauses:[],elseBody:null};let t=e.content.trim(),r=-1===t.indexOf(" ")?"":t.slice(t.indexOf(" ")+1).trim();if(!r)return this.error="Malformed {% if %} tag: missing condition",{type:"if",condition:{type:"literal",value:!1},body:[],elseifClauses:[],elseBody:null};let n=lt(r),i=this.parseBody(),a=[],s=null,o=!1;for(;this.peek();){let e=this.peek();if(!e||"tag"!==e.type)break;let t=ct(e.content.trim());if("elseif"===t){this.advance();let t=e.content.trim(),r=t.slice(t.indexOf(" ")+1).trim(),n=lt(r),i=this.parseBody();a.push({condition:n,body:i})}else{if("else"!==t){if("endif"===t){this.advance(),o=!0;break}break}this.advance(),s=this.parseBody()}}return o||(this.error="Malformed {% if %} block: missing {% endif %}"),{type:"if",condition:n,body:i,elseifClauses:a,elseBody:s}}parseFor(){let e=this.pos;this.advance();let t=this.tokens[this.pos-1];if("tag"!==t.type)return{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let r=t.content.trim(),n=r.slice(r.indexOf(" ")+1).trim(),i=/\sin\s/.exec(n);if(!i)return this.error="Invalid {% for %} syntax: missing the `in` keyword",{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let a=n.slice(0,i.index).trim(),s=n.slice(i.index+i[0].length).trim(),o=(e=>{let t=0;for(let r=0;r+1<e.length;r++){let n=e.charCodeAt(r);if(0!==t)n===t&&(t=0);else if(39===n||34===n)t=n;else if(46===n&&46===e.charCodeAt(r+1))return[e.slice(0,r).trim(),e.slice(r+2).trim()]}return null})(s),l=o?{type:"range",start:lt(o[0]),end:lt(o[1])}:lt(s),u=a.indexOf(","),c=-1===u?null:a.slice(0,u).trim(),d=-1===u?a:a.slice(u+1).trim();if(!it(d))return this.error=`Invalid {% for %} variable name: "${d}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};if(null!==c&&!it(c))return this.error=`Invalid {% for %} key variable name: "${c}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let h=this.parseBody(),f=null;if(this.peek()){let e=this.peek();e&&"tag"===e.type&&"else"===ct(e.content.trim())&&(this.advance(),f=this.parseBody())}let p=this.peek();return p&&"tag"===p.type&&"endfor"===ct(p.content.trim())?this.advance():this.error="Malformed {% for %} block: missing {% endfor %}",{type:"for",valueVar:d,keyVar:c,collection:l,body:h,elseBody:f,source:this.keepEmptyTokens?this.reconstructRange(e,this.pos):void 0}}reconstructRange(e,t){let r="";for(let n=e;n<t;n++)r+=st(this.tokens[n]);return r}parseSet(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return{type:"set",name:"_unknown",value:{type:"literal",value:""}};let t=e.content.trim(),r=t.slice(t.indexOf(" ")+1).trim(),n=r.indexOf("=");if(-1===n){let e=r.trim(),t=this.parseBody(),n=this.peek();return n&&"tag"===n.type&&this.advance(),{type:"set",name:e,value:t}}let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();return{type:"set",name:i,value:lt(a)}}parseApply(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return{type:"apply",filters:[],body:[]};let t=e.content.trim(),r=(e=>new ut(e).parseApplyChain())(t.slice(t.indexOf(" ")+1).trim()),n=this.parseBody(),i=this.peek();return i&&"tag"===i.type&&this.advance(),{type:"apply",filters:r,body:n}}},pt=/* @__PURE__ */new Map,mt={hits:0,misses:0},yt=e=>{let t=pt.get(e);if(t)return mt.hits++,t;mt.misses++;let r=(e=>{let t=(e=>{let t=[],r=0;for(;r<e.length;){let n,i,a=e.indexOf("{{",r),s=e.indexOf("{%",r);if(-1===a&&-1===s)break;if(-1===a?(n=s,i=!0):-1===s||a<s?(n=a,i=!1):(n=s,i=!0),n>r&&t.push({type:"text",value:e.slice(r,n)}),i||123!==e.charCodeAt(n+2))if(i){let i=e.indexOf("%}",n+2);if(-1===i)return{tokens:t,error:"Unclosed tag"};t.push({type:"tag",content:e.slice(n+2,i)}),r=i+2}else{let i=e.indexOf("}}",n+2);if(-1===i)return{tokens:t,error:"Unclosed double-brace token"};t.push({type:"variable",content:e.slice(n+2,i),raw:!1}),r=i+2}else{let i=e.indexOf("}}}",n+3);if(-1===i)return{tokens:t,error:"Unclosed triple-brace token"};t.push({type:"variable",content:e.slice(n+3,i),raw:!0}),r=i+3}}return r<e.length&&t.push({type:"text",value:e.slice(r)}),{tokens:t,error:null}})(e);if(t.error)return null;let r=t.tokens,{hasTags:n,allSimpleOrDotted:i}=(e=>{let t=!1,r=!0;for(let n=0;n<e.length;n++){let i=e[n];if("tag"===i.type){t=!0;break}if("variable"===i.type&&!nt(i.content.trim())){r=!1;break}}return{hasTags:t,allSimpleOrDotted:r}})(r),a=null,s=null;if(n||!i){let e=dt(r,!1);if(e.error)return null;a=e.nodes;let t=dt(r,!0);t.error||(s=t.nodes)}else{let e=dt(r,!0);e.error||(s=e.nodes)}return{tokens:r,hasTags:n,allSimpleOrDotted:i,nodes:a,nodesWithSource:s}})(e);return r?((()=>{if(pt.size>=256){let e=pt.keys().next().value;void 0!==e&&pt.delete(e)}})(),pt.set(e,r),r):null},gt=(e,t={},r=!1,n=!1)=>{if("string"!=typeof e)return e;try{if(-1===e.indexOf("{%")&&-1===e.indexOf("{{"))return e;let i="variables"in t?(e=>{let t={},r=e.variables;for(let n in r)t[n]=r[n];for(let n in e)t[n]=e[n];return t})(t):t,a=yt(e);if(!a)return e;if(!r&&!a.hasTags&&a.allSimpleOrDotted){let e=((e,t)=>{let r="";for(let n of e.tokens)if("text"===n.type)r+=n.value;else if("variable"===n.type){let e=n.content.trim(),i=-1===n.content.indexOf(".")?Re(t,e):Ve(t,e);r+=n.raw?null==i?"":String(i):Xe(i)}return r})(a,i);return n?Ze(e):e}let s=((e,t)=>t?e.nodesWithSource:e.nodes)(a,r);if(!s)return e;let{output:o,variables:l,hasSet:u}=((e,t,r=!1)=>{let n=new Be(t,r);return{output:n.evalNodes(e),variables:n.variables,hasSet:n.hasSet}})(s,i,r);return u&&Object.assign(t,l),r&&o===e?e:n?Ze(o):o}catch{return e}},bt="[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*",wt=`(?:${bt}|\\d+)`,vt=`\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${bt}(?:\\.${wt})*)\\s*\\]`,xt=`${bt}(?:${vt})*(?:\\??\\.${wt}(?:${vt})*)*(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`,kt=`(?:\\{\\{\\{\\s*${xt}\\s*\\}\\}\\}|\\{\\{\\s*${xt}\\s*\\}\\})`,St=new RegExp(kt,"g"),Mt=RegExp(`^${kt}$`),At=(e,t=!1)=>{if("string"!=typeof e)return!1;let r=t?Mt:St;return r.lastIndex=0,r.test(e.trim())},Tt=(e,t)=>{if(Array.isArray(e))for(let r of e)Tt(r,t);else if("object"==typeof e&&e){if("type"in e&&"path"===e.type&&"segments"in e&&Array.isArray(e.segments)){let r=e.segments[0];return void("string"==typeof r&&t.add(r))}for(let r of Object.values(e))Tt(r,t)}},Pt=e=>{let t=yt(e);if(!t)return[];let r=/* @__PURE__ */new Set;return Tt(t.nodes??t.nodesWithSource,r),[...r]},Nt=({source:e,transformers:t})=>{let r=[];if(e){let t=e.indexOf(".");r.push(t>-1?e.substring(0,t):e)}for(let{action:n,params:i}of t??[])"twigTemplate"===n&&"string"==typeof i.template&&i.template&&r.push(...Pt(i.template));return r};function Dt(e){if("string"==typeof e||"number"==typeof e){let t=String(e);return""===t?null:/^[a-zA-Z0-9_-]+$/.test(t)||/^\d+$/.test(t)?t:null}return null}function _t(e,t=!0){return e?"string"==typeof e?function(e,t){if(!e||e.startsWith(".")||e.endsWith(".")||/[^a-zA-Z0-9_.[\]-]/.test(e)||t&&(/\.\.|(\[\])/g.test(e)||(e.match(/\[/g)||[]).length!==(e.match(/\]/g)||[]).length||/\][^.[]/.test(e)))return[];let r,n=[],i=/([^.[\]]+)|\[(\d+)\]/g;for(;r=i.exec(e);)if(r[1]){if(!t&&""===r[1])continue;let e=Dt(r[1]);if(null!==e)n.push(e);else if(t)return[]}else if(r[2]){let e=Dt(r[2]);if(null!==e)n.push(e);else if(t)return[]}return n.length?n:[]}(e,t):Array.isArray(e)?function(e,t){if(!Array.isArray(e))return[];let r=[];for(let n of e){let e=Dt(n);if(null!==e)r.push(e);else if(t)return[]}return r}(e,t):[]:[]}function jt(e,t,r){if(null==e||!t)return r;let n=_t(t);if(!n.length)return r;let i=e;for(let a of n){if("object"!=typeof i||!i)return r;i=Array.isArray(i)?i[Number(a)]:i[a]}return void 0===i?r:i}function Ct(e,t,r){let n=_t(t);if(!n.length)return e;let i=e;for(let s=0;s<n.length-1;s++){let t=n[s],r=n[s+1];if("object"!=typeof i||!i)return e;let a=i;(null==a[t]||"object"!=typeof a[t])&&(a[t]=/^\d+$/.test(r)?[]:{}),i=a[t]}let a=n[n.length-1];return"object"==typeof i&&i&&(i[a]=r),e}function Ot(e,t=/* @__PURE__ */new WeakMap){if("object"!=typeof e||!e)return e;if(t.has(e))return t.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){let r=/* @__PURE__ */new Map;return t.set(e,r),e.forEach((e,n)=>r.set(n,Ot(e,t))),r}if(e instanceof Set){let r=/* @__PURE__ */new Set;return t.set(e,r),e.forEach(e=>r.add(Ot(e,t))),r}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let r=new DataView(Ot(e.buffer,t),e.byteOffset,e.byteLength);return t.set(e,r),r}let r=new(0,e.constructor)(e.buffer.slice(0),e.byteOffset,e.length);return t.set(e,r),r}if(e instanceof ArrayBuffer){let r=e.slice(0);return t.set(e,r),r}if(Array.isArray(e)){let r=[];return t.set(e,r),e.forEach((e,n)=>r[n]=Ot(e,t)),r}let r=Object.getPrototypeOf(e),n=Object.create(r);t.set(e,n);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Ot(e[i],t));return n}var Wt=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e);function Et(e,t){let r=_t(t),n=Array.isArray(e)?[...e]:Wt(e);if(!r.length)return n;let i=e,a=n;for(let s=0;s<r.length;s++){let e=r[s],t=i?.[e];if(!t||"object"!=typeof t){a[e]=t;break}let n=Array.isArray(t)?[...t]:Wt(t);a[e]=n,i=t,a=n}return n}function $t(e,t){if(null===e)return!1;let r=_t(t),n=e;for(let i of r){if(null==n||!(i in n))return!1;n=n[i]}return!0}function Ft(e,t){let r=Array.isArray(t)?t:t?[t]:[];if(0===r.length)return{...e};let n=[],i=[];for(let s of r){let e=_t(s);0!==e.length&&(1===e.length?n.push(e[0]):i.push(s))}let a=e;if(n.length){let e;for(let t of n)Object.prototype.hasOwnProperty.call(a,t)&&(e??=Wt(a),delete e[t]);e&&(a=e)}for(let s of i){let e=_t(s);if(!$t(a,s))continue;let t=Et(a,s),r=t;for(let n=0;n<e.length-1&&r&&"object"==typeof r;n++)r=r[e[n]];if(r&&"object"==typeof r){let t=e[e.length-1];Object.prototype.hasOwnProperty.call(r,t)&&delete r[t]}a=t}return a}Math.pow(10,8);var zt=6048e5,It=6e4,Yt=36e5,Ht=Symbol.for("constructDateFrom");function qt(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Ht in e?e[Ht](t):e instanceof Date?new e.constructor(t):new Date(t)}function Lt(e,t){return qt(t||e,e)}function Ut(e,t,r){const n=Lt(e,r?.in);return isNaN(t)?qt(r?.in||e,NaN):t?(n.setDate(n.getDate()+t),n):n}var Bt={};function Rt(){return Bt}function Vt(e,t){const r=Rt(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Lt(e,t?.in),a=i.getDay(),s=(a<n?7:0)+a-n;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function Xt(e,t){return Vt(e,{...t,weekStartsOn:1})}function Zt(e,t){const r=Lt(e,t?.in),n=r.getFullYear(),i=qt(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=Xt(i),s=qt(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const o=Xt(s);return r.getTime()>=a.getTime()?n+1:r.getTime()>=o.getTime()?n:n-1}function Qt(e){const t=Lt(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Gt(e,...t){const r=qt.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function Jt(e,t){const r=Lt(e,t?.in);return r.setHours(0,0,0,0),r}function Kt(e,t){const r=+Lt(e)-+Lt(t);return r<0?-1:r>0?1:r}function er(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Lt(e)));var t}function tr(e,t){return+Lt(e)-+Lt(t)}function rr(e,t,r){const[n,i,a]=Gt(r?.in,e,e,t),s=Kt(i,a),o=Math.abs(function(e,t){const[r,n]=Gt(void 0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(i,a));if(o<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*o);let l=Kt(i,a)===-s;(function(e,t){const r=Lt(e,t?.in);return+function(e,t){const r=Lt(e,t?.in);return r.setHours(23,59,59,999),r}(r,t)===+function(e,t){const r=Lt(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(r,t)})(n)&&1===o&&1===Kt(n,a)&&(l=!1);const u=s*(o-+l);return 0===u?0:u}var nr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ir(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var ar={date:ir({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ir({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ir({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},sr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function or(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function lr(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(o,e=>e.test(s)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(o,e=>e.test(s));let u;return u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u,{value:u,rest:t.slice(s.length)}}}function ur(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];return s=r.valueCallback?r.valueCallback(s):s,{value:s,rest:t.slice(i.length)}}}var cr={code:"en-US",formatDistance:(e,t,r)=>{let n;const i=nr[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:ar,formatRelative:(e,t,r,n)=>sr[e],localize:{ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:or({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:or({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:or({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:or({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:or({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ur({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:lr({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lr({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lr({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lr({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lr({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function dr(e,t){const r=Lt(e,t?.in),n=+Xt(r)-+function(e,t){const r=Zt(e,t),n=qt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Xt(n)}(r);return Math.round(n/zt)+1}function hr(e,t){const r=Lt(e,t?.in),n=r.getFullYear(),i=Rt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=qt(t?.in||e,0);s.setFullYear(n+1,0,a),s.setHours(0,0,0,0);const o=Vt(s,t),l=qt(t?.in||e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const u=Vt(l,t);return+r>=+o?n+1:+r>=+u?n:n-1}function fr(e,t){const r=Lt(e,t?.in),n=+Vt(r,t)-+function(e,t){const r=Rt(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=hr(e,t),a=qt(t?.in||e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),Vt(a,t)}(r,t);return Math.round(n/zt)+1}function pr(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var mr={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return pr("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):pr(r+1,2)},d:(e,t)=>pr(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>pr(e.getHours()%12||12,t.length),H:(e,t)=>pr(e.getHours(),t.length),m:(e,t)=>pr(e.getMinutes(),t.length),s:(e,t)=>pr(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return pr(Math.trunc(n*Math.pow(10,r-3)),t.length)}},yr={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return mr.y(e,t)},Y:function(e,t,r,n){const i=hr(e,n),a=i>0?i:1-i;return"YY"===t?pr(a%100,2):"Yo"===t?r.ordinalNumber(a,{unit:"year"}):pr(a,t.length)},R:function(e,t){return pr(Zt(e),t.length)},u:function(e,t){return pr(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return pr(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return pr(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return mr.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return pr(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=fr(e,n);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):pr(i,t.length)},I:function(e,t,r){const n=dr(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):pr(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):mr.d(e,t)},D:function(e,t,r){const n=function(e,t){const r=Lt(e,t?.in);return function(e,t){const[r,n]=Gt(void 0,e,t),i=Jt(r),a=Jt(n),s=+i-Qt(i),o=+a-Qt(a);return Math.round((s-o)/864e5)}(r,function(e){const t=Lt(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):pr(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return pr(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return pr(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return pr(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(i=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(i=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return mr.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):mr.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):pr(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):pr(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):mr.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):mr.s(e,t)},S:function(e,t){return mr.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return br(n);case"XXXX":case"XX":return wr(n);default:return wr(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return br(n);case"xxxx":case"xx":return wr(n);default:return wr(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+gr(n,":");default:return"GMT"+wr(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+gr(n,":");default:return"GMT"+wr(n,":")}},t:function(e,t,r){return pr(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return pr(+e,t.length)}};function gr(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return 0===a?r+String(i):r+String(i)+t+pr(a,2)}function br(e,t){return e%60==0?(e>0?"-":"+")+pr(Math.abs(e)/60,2):wr(e,t)}function wr(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+pr(Math.trunc(n/60),2)+t+pr(n%60,2)}var vr=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},kr={p:xr,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return vr(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",vr(n,t)).replace("{{time}}",xr(i,t))}},Sr=/^D+$/,Mr=/^Y+$/,Ar=["D","DD","YY","YYYY"];function Tr(e){return Sr.test(e)}function Pr(e){return Mr.test(e)}function Nr(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(Ar.includes(e))throw new RangeError(n)}var Dr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_r=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jr=/^'([^]*?)'?$/,Cr=/''/g,Or=/[a-zA-Z]/;function Wr(e,t,r){const n=Rt(),i=r?.locale??n.locale??cr,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Lt(e,r?.in);if(!er(o))throw new RangeError("Invalid time value");let l=t.match(_r).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,kr[t])(e,i.formatLong):e}).join("").match(Dr).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Er(e)};if(yr[t])return{isToken:!0,value:e};if(t.match(Or))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return l.map(n=>{if(!n.isToken)return n.value;const a=n.value;return(!r?.useAdditionalWeekYearTokens&&Pr(a)||!r?.useAdditionalDayOfYearTokens&&Tr(a))&&Nr(a,t,String(e)),(0,yr[a[0]])(o,a,i.localize,u)}).join("")}function Er(e){const t=e.match(jr);return t?t[1].replace(Cr,"'"):e}function $r(e,t){return function(e,t,r){const n=Rt(),i=r?.locale??n.locale??cr,a=Kt(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:a}),[o,l]=Gt(r?.in,...a>0?[t,e]:[e,t]),u=function(e,t,r){const n=tr(e,t)/1e3;return(i=r?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(n);var i}(l,o),c=(Qt(l)-Qt(o))/1e3,d=Math.round((u-c)/60);let h;if(d<2)return r?.includeSeconds?u<5?i.formatDistance("lessThanXSeconds",5,s):u<10?i.formatDistance("lessThanXSeconds",10,s):u<20?i.formatDistance("lessThanXSeconds",20,s):u<40?i.formatDistance("halfAMinute",0,s):u<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):0===d?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",d,s);if(d<45)return i.formatDistance("xMinutes",d,s);if(d<90)return i.formatDistance("aboutXHours",1,s);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,s)}if(d<2520)return i.formatDistance("xDays",1,s);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,s)}if(d<86400)return h=Math.round(d/43200),i.formatDistance("aboutXMonths",h,s);if(h=rr(l,o),h<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,s)}{const e=h%12,t=Math.trunc(h/12);return e<3?i.formatDistance("aboutXYears",t,s):e<9?i.formatDistance("overXYears",t,s):i.formatDistance("almostXYears",t+1,s)}}(e,function(e){return qt(e,Date.now())}(e),t)}var Fr=class{subPriority=0;validate(e,t){return!0}},zr=class extends Fr{constructor(e,t,r,n,i){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=n,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}},Ir=class extends Fr{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>qt(t,e))}set(e,t){return t.timestampIsSet?e:qt(e,function(e,t){const r=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):qt(t,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}(e,this.context))}},Yr=class{run(e,t,r,n){const i=this.parse(e,t,r,n);return i?{setter:new zr(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,r){return!0}},Hr=/^(1[0-2]|0?\d)/,qr=/^(3[0-1]|[0-2]?\d)/,Lr=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ur=/^(5[0-3]|[0-4]?\d)/,Br=/^(2[0-3]|[0-1]?\d)/,Rr=/^(2[0-4]|[0-1]?\d)/,Vr=/^(1[0-1]|0?\d)/,Xr=/^(1[0-2]|0?\d)/,Zr=/^[0-5]?\d/,Qr=/^[0-5]?\d/,Gr=/^\d/,Jr=/^\d{1,2}/,Kr=/^\d{1,3}/,en=/^\d{1,4}/,tn=/^-?\d+/,rn=/^-?\d/,nn=/^-?\d{1,2}/,an=/^-?\d{1,3}/,sn=/^-?\d{1,4}/,on=/^([+-])(\d{2})(\d{2})?|Z/,ln=/^([+-])(\d{2})(\d{2})|Z/,un=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,cn=/^([+-])(\d{2}):(\d{2})|Z/,dn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function hn(e,t){return e?{value:t(e.value),rest:e.rest}:e}function fn(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function pn(e,t){const r=t.match(e);if(!r)return null;if("Z"===r[0])return{value:0,rest:t.slice(1)};const n="+"===r[1]?1:-1,i=r[2]?parseInt(r[2],10):0,a=r[3]?parseInt(r[3],10):0,s=r[5]?parseInt(r[5],10):0;return{value:n*(i*Yt+a*It+1e3*s),rest:t.slice(r[0].length)}}function mn(e){return fn(tn,e)}function yn(e,t){switch(e){case 1:return fn(Gr,t);case 2:return fn(Jr,t);case 3:return fn(Kr,t);case 4:return fn(en,t);default:return fn(new RegExp("^\\d{1,"+e+"}"),t)}}function gn(e,t){switch(e){case 1:return fn(rn,t);case 2:return fn(nn,t);case 3:return fn(an,t);case 4:return fn(sn,t);default:return fn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function bn(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function wn(e,t){const r=t>0,n=r?t:1-t;let i;if(n<=50)i=e||100;else{const t=n+50;i=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return r?i:1-i}function vn(e){return e%400==0||e%4==0&&e%100!=0}var xn=[31,28,31,30,31,30,31,31,30,31,30,31],kn=[31,29,31,30,31,30,31,31,30,31,30,31];function Sn(e,t,r){const n=Rt(),i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Lt(e,r?.in),s=a.getDay(),o=7-i;return Ut(a,t<0||t>6?t-(s+o)%7:((t%7+7)%7+o)%7-(s+o)%7,r)}var Mn={G:new class extends Yr{priority=140;parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends Yr{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,r){const n=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return hn(yn(4,e),n);case"yo":return hn(r.ordinalNumber(e,{unit:"year"}),n);default:return hn(yn(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const n=e.getFullYear();if(r.isTwoDigitYear){const t=wn(r.year,n);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const i="era"in t&&1!==t.era?1-r.year:r.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends Yr{priority=130;parse(e,t,r){const n=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return hn(yn(4,e),n);case"Yo":return hn(r.ordinalNumber(e,{unit:"year"}),n);default:return hn(yn(t.length,e),n)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,n){const i=hr(e,n);if(r.isTwoDigitYear){const t=wn(r.year,i);return e.setFullYear(t,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),Vt(e,n)}const a="era"in t&&1!==t.era?1-r.year:r.year;return e.setFullYear(a,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),Vt(e,n)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Yr{priority=130;parse(e,t){return gn("R"===t?4:t.length,e)}set(e,t,r){const n=qt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Xt(n)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Yr{priority=130;parse(e,t){return gn("u"===t?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends Yr{priority=120;parse(e,t,r){switch(t){case"Q":case"QQ":return yn(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth(3*(r-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends Yr{priority=120;parse(e,t,r){switch(t){case"q":case"qq":return yn(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth(3*(r-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends Yr{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,r){const n=e=>e-1;switch(t){case"M":return hn(fn(Hr,e),n);case"MM":return hn(yn(2,e),n);case"Mo":return hn(r.ordinalNumber(e,{unit:"month"}),n);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},L:new class extends Yr{priority=110;parse(e,t,r){const n=e=>e-1;switch(t){case"L":return hn(fn(Hr,e),n);case"LL":return hn(yn(2,e),n);case"Lo":return hn(r.ordinalNumber(e,{unit:"month"}),n);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends Yr{priority=100;parse(e,t,r){switch(t){case"w":return fn(Ur,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return yn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,n){return Vt(function(e,t,r){const n=Lt(e,r?.in),i=fr(n,r)-t;return n.setDate(n.getDate()-7*i),Lt(n,r?.in)}(e,r,n),n)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends Yr{priority=100;parse(e,t,r){switch(t){case"I":return fn(Ur,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return yn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return Xt(function(e,t,r){const n=Lt(e,r?.in),i=dr(n,r)-t;return n.setDate(n.getDate()-7*i),n}(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends Yr{priority=90;subPriority=1;parse(e,t,r){switch(t){case"d":return fn(qr,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return yn(t.length,e)}}validate(e,t){const r=vn(e.getFullYear()),n=e.getMonth();return r?t>=1&&t<=kn[n]:t>=1&&t<=xn[n]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends Yr{priority=90;subpriority=1;parse(e,t,r){switch(t){case"D":case"DD":return fn(Lr,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return yn(t.length,e)}}validate(e,t){return vn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends Yr{priority=90;parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=Sn(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Yr{priority=90;parse(e,t,r,n){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return hn(yn(t.length,e),i);case"eo":return hn(r.ordinalNumber(e,{unit:"day"}),i);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=Sn(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends Yr{priority=90;parse(e,t,r,n){const i=e=>{const t=7*Math.floor((e-1)/7);return(e+n.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return hn(yn(t.length,e),i);case"co":return hn(r.ordinalNumber(e,{unit:"day"}),i);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,n){return(e=Sn(e,r,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends Yr{priority=90;parse(e,t,r){const n=e=>0===e?7:e;switch(t){case"i":case"ii":return yn(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return hn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n);case"iiiii":return hn(r.day(e,{width:"narrow",context:"formatting"}),n);case"iiiiii":return hn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n);default:return hn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),n)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return(e=function(e,t,r){const n=Lt(e,r?.in),i=t-function(e,t){const r=Lt(e,t?.in).getDay();return 0===r?7:r}(n,r);return Ut(n,i,r)}(e,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends Yr{priority=80;parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(bn(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Yr{priority=80;parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(bn(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Yr{priority=80;parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(bn(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends Yr{priority=70;parse(e,t,r){switch(t){case"h":return fn(Xr,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return yn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const n=e.getHours()>=12;return n&&r<12?e.setHours(r+12,0,0,0):n||12!==r?e.setHours(r,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends Yr{priority=70;parse(e,t,r){switch(t){case"H":return fn(Br,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return yn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends Yr{priority=70;parse(e,t,r){switch(t){case"K":return fn(Vr,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return yn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends Yr{priority=70;parse(e,t,r){switch(t){case"k":return fn(Rr,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return yn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const n=r<=24?r%24:r;return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends Yr{priority=60;parse(e,t,r){switch(t){case"m":return fn(Zr,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return yn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]},s:new class extends Yr{priority=50;parse(e,t,r){switch(t){case"s":return fn(Qr,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return yn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]},S:new class extends Yr{priority=30;parse(e,t){return hn(yn(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]},X:new class extends Yr{priority=10;parse(e,t){switch(t){case"X":return pn(on,e);case"XX":return pn(ln,e);case"XXXX":return pn(un,e);case"XXXXX":return pn(dn,e);default:return pn(cn,e)}}set(e,t,r){return t.timestampIsSet?e:qt(e,e.getTime()-Qt(e)-r)}incompatibleTokens=["t","T","x"]},x:new class extends Yr{priority=10;parse(e,t){switch(t){case"x":return pn(on,e);case"xx":return pn(ln,e);case"xxxx":return pn(un,e);case"xxxxx":return pn(dn,e);default:return pn(cn,e)}}set(e,t,r){return t.timestampIsSet?e:qt(e,e.getTime()-Qt(e)-r)}incompatibleTokens=["t","T","X"]},t:new class extends Yr{priority=40;parse(e){return mn(e)}set(e,t,r){return[qt(e,1e3*r),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Yr{priority=20;parse(e){return mn(e)}set(e,t,r){return[qt(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}},An=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pn=/^'([^]*?)'?$/,Nn=/''/g,Dn=/\S/,_n=/[a-zA-Z]/;function jn(e){return e.match(Pn)[1].replace(Nn,"'")}function Cn(e,t){const r=()=>qt(t?.in,NaN),n=t?.additionalDigits??2,i=function(e){const t={},r=e.split(On.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],On.timeZoneDelimiter.test(t.date)&&(t.date=e.split(On.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const e=On.timezone.exec(n);e?(t.time=n.replace(e[1],""),t.timezone=e[1]):t.time=n}return t}(e);let a;if(i.date){const e=function(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((n[1]||n[2]).length)}}(i.date,n);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const r=e.match(Wn);if(!r)/* @__PURE__ */return new Date(NaN);const n=!!r[4],i=Fn(r[1]),a=Fn(r[2])-1,s=Fn(r[3]),o=Fn(r[4]),l=Fn(r[5])-1;if(n)return function(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}(0,o,l)?function(e,t,r){const n=/* @__PURE__ */new Date(0);n.setUTCFullYear(e,0,4);const i=7*(t-1)+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+i),n}(t,o,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(In[t]||(Yn(e)?29:28))}(t,a,s)&&function(e,t){return t>=1&&t<=(Yn(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,s)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return r();const s=+a;let o,l=0;if(i.time&&(l=function(e){const t=e.match(En);if(!t)return NaN;const r=zn(t[1]),n=zn(t[2]),i=zn(t[3]);return function(e,t,r){return 24===e?0===t&&0===r:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}(r,n,i)?r*Yt+n*It+1e3*i:NaN}(i.time),isNaN(l)))return r();if(!i.timezone){const e=new Date(s+l),r=Lt(0,t?.in);return r.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),r.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),r}return o=function(e){if("Z"===e)return 0;const t=e.match($n);if(!t)return 0;const r="+"===t[1]?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?r*(n*Yt+i*It):NaN}(i.timezone),isNaN(o)?r():Lt(s+l+o,t?.in)}var On={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Wn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,En=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,$n=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Fn(e){return e?parseInt(e):1}function zn(e){return e&&parseFloat(e.replace(",","."))||0}var In=[31,null,31,30,31,30,31,31,30,31,30,31];function Yn(e){return e%400==0||e%4==0&&e%100!=0}var Hn=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Cn(e):e,Math.floor((r=t,+Lt(r)/1e3)).toString();var r},qn=e=>!("string"!=typeof e||!/^\d{4}-\d{2}-\d{2}$/.test(e))&&er(function(e,t,r,n){const i=()=>qt(n?.in||r,NaN),a=Object.assign({},Rt()),s=n?.locale??a.locale??cr,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!t)return e?i():Lt(r,n?.in);const u={firstWeekContainsDate:o,weekStartsOn:l,locale:s},c=[new Ir(n?.in,r)],d=t.match(Tn).map(e=>{const t=e[0];return t in kr?(0,kr[t])(e,s.formatLong):e}).join("").match(An),h=[];for(let y of d){!n?.useAdditionalWeekYearTokens&&Pr(y)&&Nr(y,t,e),!n?.useAdditionalDayOfYearTokens&&Tr(y)&&Nr(y,t,e);const r=y[0],a=Mn[r];if(a){const{incompatibleTokens:t}=a;if(Array.isArray(t)){const e=h.find(e=>t.includes(e.token)||e.token===r);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${y}\` at the same time`)}else if("*"===a.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);h.push({token:r,fullToken:y});const n=a.run(e,y,s.match,u);if(!n)return i();c.push(n.setter),e=n.rest}else{if(r.match(_n))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");if("''"===y?y="'":"'"===r&&(y=jn(y)),0!==e.indexOf(y))return i();e=e.slice(y.length)}}if(e.length>0&&Dn.test(e))return i();const f=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,r)=>r.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let p=Lt(r,n?.in);if(isNaN(+p))return i();const m={};for(const y of f){if(!y.validate(p,u))return i();const e=y.set(p,m,u);Array.isArray(e)?(p=e[0],Object.assign(m,e[1])):p=e}return p}(e,"yyyy-MM-dd",/* @__PURE__ */new Date)),Ln={},Un=/* @__PURE__ */new Map,Bn=a({});function Rn(e){return e&&(e.displayName||e.name)||"Component"}Bn.displayName="ComponentContext";var Vn={};Object.freeze(Vn);var Xn=(e,t="",r=".",n=!1)=>e&&"object"==typeof e?Object.keys(e).reduce((i,a)=>{a=a.replaceAll(r,"").replaceAll(".","");let s=`${t}${t?r:""}${a}`;return"object"!=typeof e[a]||Array.isArray(e[a])&&n?[...i,s]:[...i,s,...Xn(e[a],s,r,n)]},[]):[],Zn=(e,t=!0,r=!0)=>{let n="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),r&&(i=`${i}0123456789`);let a=i.length;for(let s=0;s<e;s++)n+=i.charAt(Math.floor(Math.random()*a));return n};function Qn(e,t){if(!e)return 0;let r={};try{let t=e.split(".")[1],n=typeof window<"u"?window.atob(t):Buffer.from(t,"base64").toString();r=JSON.parse(n)}catch{return 0}return t?jt(r,"data.spaceId",0):r}function Gn(e){!e&&typeof window<"u"&&(e=window.location.search);let t={};if(!e||0===e.length)return t;let r=e.replace("?","").split("&");for(let n=0;n<r.length;n++){let e=r[n].split("="),i=decodeURIComponent(e[0]),a=decodeURIComponent(e[1]);void 0===t[i]?t[i]=decodeURIComponent(a):"string"==typeof t[i]?t[i]=[t[i],decodeURIComponent(a)]:t[i].push(decodeURIComponent(a))}return t}var Jn=({url:e="",internalProps:t,autoRegister:r=!0,plitziJsxSkipHOC:n=!1,plitziJsxProps:a=Vn})=>{let{register:s}=u(Bn),[o,c]=g(!1);h(()=>c(!0),[]);let d=m(()=>l(((e,t,r=!0,n=!1)=>async()=>{if(!Un.get(e)){let t=(async e=>{try{let t=await fetch(e),r=new Blob([await t.text()],{type:"text/javascript"});return await(import(
|
|
2
|
-
/* @vite-ignore */
|
|
3
|
-
/* webpackIgnore: true */
|
|
4
|
-
URL.createObjectURL(r)))}catch(e){return}})(e).finally(()=>{Un.delete(e)});Un.set(e,{promise:t,timestamp:Date.now()})}let i=await(Un.get(e)?.promise),[{default:a},{default:s},{nestedInject:o}]=await Promise.all([Promise.resolve().then(()=>co),import("./plitzi-sdk.js").then(e=>e.t),import("./plitzi-sdk.js").then(e=>e.n)]);if(!i)return{default:s};let{type:l,pluginSettings:u}=jt(i,"default",{}),{version:c,initialItems:d,plugins:h}=i;if(!l)return{default:s};let f=i.default;return n||(f=a(i.default)),f.version=c,f.origin="remote",f.type=l,f.initialItems=d,f.pluginSettings=u,f.plugins=o(h,"remote"),r&&t(f),{default:f}})(e,s,r,n)),[e]);return o?/* @__PURE__ */w(i,n?{children:/* @__PURE__ */w(d,{internalProps:t,plitziJsxSkipHOC:n,...a})}:{children:/* @__PURE__ */w(d,{internalProps:t})}):null},Kn=({type:e,plugins:t})=>{let r=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!r)return;let n=jt(r,"assets",[]).filter(e=>"script"===e.type);return{url:n.find(e=>e.isMain)?.params.src??jt(n,"0.params.src","")}},ei=({key:e,plitziElementLayout:t,type:r,internalProps:n,components:i,plugins:a})=>{let s={...n,plitziElementLayout:t},o=i.notFound?/* @__PURE__ */w(i.notFound,{internalProps:s},e):void 0;if(!r)return o;let l=i[r];if(l)/* @__PURE__ */return w(l,{internalProps:s,extraProps:l.extraProps},e);let u=Kn({type:r,plugins:a});return u?/* @__PURE__ */w(Jn,{url:u.url,internalProps:s},e):o},ti=a(void 0);ti.displayName="LayoutBodyContext";var ri=()=>{},ni=({body:e,children:t})=>{let[r]=g(()=>({current:e,listeners:/* @__PURE__ */new Set}));return p(()=>{r.current!==e&&(r.current=e,r.listeners.forEach(e=>e()))},[e,r]),/* @__PURE__ */w(ti,{value:r,children:t})},ii=e=>{let t={};for(let r of e.split(";")){let e=r.indexOf(":");if(-1===e)continue;let n=r.slice(0,e).trim(),i=r.slice(e+1).trim();if(n&&i){let e=n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},ai=({id:e,children:t})=>{let[r]=g(()=>{if(typeof document>"u")return null;let t=document.querySelector(`[data-rsc-id="${e}"]`);if(!t)return null;let r={};for(let e=0;e<t.attributes.length;e++){let{name:n,value:i}=t.attributes[e];"class"!==n&&"style"!==n&&"data-rsc-id"!==n&&(r[n]=i)}let n=t.getAttribute("style");return{tag:t.tagName.toLowerCase(),className:t.className,style:n?ii(n):void 0,attrs:r,html:t.innerHTML}});return r?s(r.tag,{"data-rsc-id":e,className:r.className||void 0,style:r.style,...r.attrs,dangerouslySetInnerHTML:{__html:r.html}}):t},si={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},oi={date:ir({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:ir({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ir({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},li={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},ui={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},ci={code:"es",formatDistance:(e,t,r)=>{let n;const i=si[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"en "+n:"hace "+n:n},formatLong:oi,formatRelative:(e,t,r,n)=>1!==t.getHours()?ui[e]:li[e],localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:or({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:or({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:or({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:or({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},defaultWidth:"wide"}),dayPeriod:or({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ur({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:lr({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:lr({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lr({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:lr({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lr({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},di={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"aproximadamente 1 hora",other:"aproximadamente {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"aproximadamente 1 semana",other:"aproximadamente {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"aproximadamente 1 mês",other:"aproximadamente {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"aproximadamente 1 ano",other:"aproximadamente {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},hi={date:ir({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d 'de' MMM 'de' y",short:"dd/MM/y"},defaultWidth:"full"}),time:ir({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ir({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fi={lastWeek:e=>{const t=e.getDay();return"'"+(0===t||6===t?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},pi={code:"pt",formatDistance:(e,t,r)=>{let n;const i=di[e];return n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),r?.addSuffix?r.comparison&&r.comparison>0?"daqui a "+n:"há "+n:n},formatLong:hi,formatRelative:(e,t,r,n)=>{const i=fi[e];return"function"==typeof i?i(t):i},localize:{ordinalNumber:(e,t)=>Number(e)+"º",era:or({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:or({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:or({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:or({values:{narrow:["d","s","t","q","q","s","s"],short:["dom","seg","ter","qua","qui","sex","sáb"],abbreviated:["dom","seg","ter","qua","qui","sex","sáb"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:or({values:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"noite",night:"madrugada"}},defaultWidth:"wide",formattingValues:{narrow:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"},wide:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da noite",night:"da madrugada"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ur({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:lr({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes da era comum|depois de cristo|era comum)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes da era comum)/i,/^(depois de cristo|era comum)/i]},defaultParseWidth:"any"}),quarter:lr({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º|ª)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lr({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ab/i,/^mai/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lr({matchPatterns:{narrow:/^[dstq]/i,short:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,wide:/^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^s/i,/^t/i,/^q/i,/^q/i,/^s/i,/^s/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[áa]/i]},defaultParseWidth:"any"}),dayPeriod:lr({matchPatterns:{narrow:/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,any:/^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^meia/i,noon:/^meio/i,morning:/manh[ãa]/i,afternoon:/tarde/i,evening:/noite/i,night:/madrugada/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:4}};var mi={year:0,month:1,day:2,hour:3,minute:4,second:5},yi={},gi=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(/* @__PURE__ */new Date("2014-06-25T04:00:00.123Z")),bi="06/25/2014, 00:00:00"===gi||"06/25/2014 00:00:00"===gi;function wi(e,t,r,n,i,a,s){const o=/* @__PURE__ */new Date(0);return o.setUTCFullYear(e,t,r),o.setUTCHours(n,i,a,s),o}var vi=36e5,xi={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ki(e,t,r){if(!e)return 0;let n,i,a=xi.timezoneZ.exec(e);if(a)return 0;if(a=xi.timezoneHH.exec(e),a)return n=parseInt(a[1],10),Mi(n)?-n*vi:NaN;if(a=xi.timezoneHHMM.exec(e),a){n=parseInt(a[2],10);const e=parseInt(a[3],10);return Mi(n,e)?(i=Math.abs(n)*vi+6e4*e,"+"===a[1]?-i:i):NaN}if(function(e){if(Ai[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Ai[e]=!0,!0}catch(t){return!1}}(e)){t=new Date(t||Date.now());const n=Si(r?t:function(e){return wi(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(r?n:function(e,t,r){let n=e.getTime()-t;const i=Si(new Date(n),r);if(t===i)return t;n-=i-t;const a=Si(new Date(n),r);return i===a?i:Math.max(i,a)}(t,n,e))}return NaN}function Si(e,t){const r=function(e,t){const r=function(e){return yi[e]||(yi[e]=bi?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),yi[e]}(t);return"formatToParts"in r?function(e,t){try{const r=e.formatToParts(t),n=[];for(let e=0;e<r.length;e++){const t=mi[r[e].type];void 0!==t&&(n[t]=parseInt(r[e].value,10))}return n}catch(r){if(r instanceof RangeError)return[NaN];throw r}}(r,e):function(e,t){const r=e.format(t),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);return[parseInt(n[3],10),parseInt(n[1],10),parseInt(n[2],10),parseInt(n[4],10),parseInt(n[5],10),parseInt(n[6],10)]}(r,e)}(e,t),n=wi(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime();let i=e.getTime();const a=i%1e3;return i-=a>=0?a:1e3+a,n-i}function Mi(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var Ai={};function Ti(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}var Pi=36e5,Ni={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Di(e,t,r){t=t||0,r=r||0;const n=/* @__PURE__ */new Date(0);n.setUTCFullYear(e,0,4);const i=7*t+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+i),n}var _i=[31,28,31,30,31,30,31,31,30,31,30,31],ji=[31,29,31,30,31,30,31,31,30,31,30,31];function Ci(e){return e%400==0||e%4==0&&e%100!=0}function Oi(e,t,r){if(t<0||t>11)return!1;if(null!=r){if(r<1)return!1;const n=Ci(e);if(n&&r>ji[t])return!1;if(!n&&r>_i[t])return!1}return!0}function Wi(e,t){return!(e<0||e>52||null!=t&&(t<0||t>6))}function Ei(e,t,r){return!(e<0||e>=25||null!=t&&(t<0||t>=60)||null!=r&&(r<0||r>=60))}var $i={en:cr,es:ci,pt:pi},Fi=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Cn(e):e,t};function zi(e,t="dd MMMM, yyyy",r="en"){return e?Wr(Fi(e),t,{locale:$i[r]}):""}function Ii(e,t="dd MMMM, yyyy",r="en"){return e?Wr(function(e){const t=ki("UTC",e=function(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)/* @__PURE__ */return new Date(NaN);const r=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))/* @__PURE__ */return new Date(NaN);const n=function(e){const t={};let r,n=Ni.dateTimePattern.exec(e);if(n?(t.date=n[1],r=n[3]):(n=Ni.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const e=Ni.timeZone.exec(r);e?(t.time=r.replace(e[1],""),t.timeZone=e[1].trim()):t.time=r}return t}(e),{year:i,restDateString:a}=function(e,t){if(e){const r=Ni.YYY[t],n=Ni.YYYYY[t];let i=Ni.YYYY.exec(e)||n.exec(e);if(i){const t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=Ni.YY.exec(e)||r.exec(e),i){const t=i[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(n.date,r),s=function(e,t){if(null===t)return null;let r,n,i;if(!e||!e.length)return r=/* @__PURE__ */new Date(0),r.setUTCFullYear(t),r;let a=Ni.MM.exec(e);if(a)return r=/* @__PURE__ */new Date(0),n=parseInt(a[1],10)-1,Oi(t,n)?(r.setUTCFullYear(t,n),r):/* @__PURE__ */new Date(NaN);if(a=Ni.DDD.exec(e),a){r=/* @__PURE__ */new Date(0);const e=parseInt(a[1],10);return function(e,t){if(t<1)return!1;const r=Ci(e);return!(r&&t>366||!r&&t>365)}(t,e)?(r.setUTCFullYear(t,0,e),r):/* @__PURE__ */new Date(NaN)}if(a=Ni.MMDD.exec(e),a){r=/* @__PURE__ */new Date(0),n=parseInt(a[1],10)-1;const e=parseInt(a[2],10);return Oi(t,n,e)?(r.setUTCFullYear(t,n,e),r):/* @__PURE__ */new Date(NaN)}if(a=Ni.Www.exec(e),a)return i=parseInt(a[1],10)-1,Wi(i)?Di(t,i):/* @__PURE__ */new Date(NaN);if(a=Ni.WwwD.exec(e),a){i=parseInt(a[1],10)-1;const e=parseInt(a[2],10)-1;return Wi(i,e)?Di(t,i,e):/* @__PURE__ */new Date(NaN)}return null}(a,i);if(null===s||isNaN(s.getTime()))/* @__PURE__ */return new Date(NaN);if(s){const e=s.getTime();let r,i=0;if(n.time&&(i=function(e){let t,r,n=Ni.HH.exec(e);if(n)return t=parseFloat(n[1].replace(",",".")),Ei(t)?t%24*Pi:NaN;if(n=Ni.HHMM.exec(e),n)return t=parseInt(n[1],10),r=parseFloat(n[2].replace(",",".")),Ei(t,r)?t%24*Pi+6e4*r:NaN;if(n=Ni.HHMMSS.exec(e),n){t=parseInt(n[1],10),r=parseInt(n[2],10);const e=parseFloat(n[3].replace(",","."));return Ei(t,r,e)?t%24*Pi+6e4*r+1e3*e:NaN}return null}(n.time),null===i||isNaN(i)))/* @__PURE__ */return new Date(NaN);if(n.timeZone||t.timeZone){if(r=ki(n.timeZone||t.timeZone,new Date(e+i)),isNaN(r))/* @__PURE__ */return new Date(NaN)}else r=Ti(new Date(e+i)),r=Ti(new Date(e+i+r));return new Date(e+i+r)}/* @__PURE__ */return new Date(NaN)}(e,void 0),!0),r=new Date(e.getTime()-t),n=/* @__PURE__ */new Date(0);return n.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),n.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),n}(Fi(e)),t,{locale:$i[r]}):""}function Yi(e,t){let r=Fi(e);return tr(Fi(t),r)}var Hi=e=>"number"==typeof e||"string"==typeof e&&!e.includes(",")&&!Number.isNaN(parseFloat(e)),qi=e=>{if(!e||"object"!=typeof e)return;let{combinator:t,enabled:r}=e,{rules:n}=e;return Array.isArray(n)?(n=n.map(e=>{if((e=>"rules"in e)(e))return qi(e);let{field:t,value:r,operator:n,enabled:i,isBinding:a}=e;return{field:t,value:r,operator:n,enabled:i,isBinding:a}}).filter(Boolean),{rules:n,combinator:t,enabled:r}):void 0},Li=(e,t="json")=>qi(e),Ui=(e,t)=>"boolean"==typeof e&&"string"==typeof t?e===(t="true"===(t=t.toLowerCase())||"1"===t):"string"==typeof e&&"boolean"==typeof t?(e="true"===(e=e.toLowerCase())||"1"===e)===t:("number"==typeof e&&(e=`${e}`),"number"==typeof t&&(t=`${t}`),e===t),Bi=(e,t)=>null!=e&&null!=t&&(qn(e)&&qn(t)?(e=Hn(e),t=Hn(t),parseFloat(t)>parseFloat(e)):Hi(e)?(e=parseFloat(e),t=parseFloat(t),Hi(t)&&t>e):t>e),Ri=(e,t)=>Bi(e,t)||Ui(e,t),Vi=(e,t)=>null!=e&&null!=t&&(qn(e)&&qn(t)?(e=Hn(e),t=Hn(t),parseFloat(t)<parseFloat(e)):Hi(e)?(e=parseFloat(e),t=parseFloat(t),Hi(t)&&t<e):t<e),Xi=(e,t)=>Vi(e,t)||Ui(e,t),Zi=(e,t)=>Array.isArray(t)?t.some(t=>Ui(e,t)):"string"==typeof e&&"string"==typeof t&&t.toLowerCase().includes(e.toLowerCase()),Qi=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().startsWith(e.toLowerCase()),Gi=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().endsWith(e.toLowerCase()),Ji=e=>{switch(typeof e){case"boolean":case"number":case"function":return!1;case"object":case"undefined":return null==e||0===Object.keys(e).length;default:return!e}},Ki=(e,t)=>("string"==typeof e&&e.includes(",")?e=e.split(",").map(e=>e.trim()):("string"==typeof e||"number"==typeof e)&&(e=[e]),!!Array.isArray(e)&&("string"==typeof t&&t.includes(",")&&(t=t.split(",").map(e=>e.trim())),Array.isArray(t)?t.some(t=>Hi(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t)):Hi(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t))),ea=(e,t)=>{let r=[];return"string"==typeof e&&(r=e.split(",").map(e=>e.trim())),!(r.length<2)&&Ri(r[0],t)&&Xi(r[1],t)},ta=(e,t={},r=!1,n=!1)=>{if(!e)return n;let{combinator:i,rules:a,enabled:s}=e;if(!Array.isArray(a))return n;if(!1===s)return!0;let o=a.filter(e=>!1!==e.enabled).map(e=>"rules"in e?ta(e,t,r):((e,t)=>{let{field:r,operator:n,isBinding:i}=e,{value:a}=e,s=jt(t,r);switch(i&&(a=jt(t,e.value)),n){case"=":return Ui(a,s);case"!=":return!Ui(a,s);case"<":return Vi(a,s);case">":return Bi(a,s);case"<=":return Xi(a,s);case">=":return Ri(a,s);case"contains":return Zi(a,s);case"doesNotContain":return!Zi(a,s);case"beginsWith":return Qi(a,s);case"doesNotBeginWith":return!Qi(a,s);case"endsWith":return Gi(a,s);case"doesNotEndWith":return!Gi(a,s);case"empty":return Ji(s);case"notEmpty":return!Ji(s);case"in":return Ki(a,s);case"notIn":return!Ki(a,s);case"between":return ea(a,s);case"notBetween":return!ea(a,s);default:return!1}})(e,t));return r?o:"and"===i?!o.includes(!1):o.includes(!0)},ra=(e,t={},r=!1,n=!1)=>ta(Li(e),t,r,n),na=(e,t,r,n=!1)=>{let{rules:i,enabled:a}=e;if(!Array.isArray(i)||!1===a)return{};let s=i.filter(e=>!1!==e.enabled).flatMap(e=>"rules"in e?na(e,t,r,!0):e);return n?s:s.reduce((e,n)=>{let{field:i,isBinding:a,value:s}=n;return a&&Ct(e,s,jt(t,s,r)),Ct(e,i,jt(t,i,r)),e},{})},ia=(e,t={},r=void 0)=>na(Li(e),t,r),aa={action:"arrayMap",title:"Array Map",type:"utility",params:{keys:{defaultValue:'[{"from": "", "to": ""}]',type:"textarea"}},preview:{sourceParsed:""},callback:(e,t)=>{let{keys:r}=t;if(!Array.isArray(e))return e;try{"string"==typeof r&&(r=JSON.parse(r))}catch{return e}return e.map(e=>{let t={};return r.forEach(r=>{"object"==typeof r&&r.from&&r.to&&Ct(t,r.to,jt(e,r.from,""))}),t})}},sa={action:"dateConverter",title:"Date Converter",type:"utility",params:{format:{defaultValue:"dd/MM/yyyy",type:"text"},asAge:{defaultValue:!1,type:"checkbox"},isUnix:{defaultValue:!0,type:"checkbox"},isUtc:{defaultValue:!1,type:"checkbox"},locale:{defaultValue:"en",type:"select",options:[{label:"en",value:"en"},{label:"es",value:"es"},{label:"pt",value:"pt"}]}},preview:{format:"",asAge:"",isUnix:"",isUtc:"",locale:""},callback:(e,{format:t="dd/MM/yyyy",asAge:r=!1,isUnix:n=!0,isUtc:i=!1,locale:a="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let s=Fi(n?Number(e):e);return isNaN(s.getTime())?e:r?function(e,t="en",r){if(!e)return"";let n=Fi(e);return isNaN(n.getTime())?"":$r(n,{...r,locale:$i[t]})}(s,a,{addSuffix:!0}):i?Ii(s,t,a):zi(s,t,a)}catch{return e}}},oa=/* @__PURE__ */new Set(["false","0",""]),la={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!(e=>"string"==typeof e?!oa.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e)(e)},ua={action:"styleSelector",title:"Style Selector",type:"utility",params:{originalSelector:{label:"Original Selector",description:"This will append the original selector (require append option enabled)",defaultValue:!1,disabled:({append:e})=>!e,type:"checkbox"},append:{label:"Append Selector",defaultValue:!1,type:"checkbox"},selector:{label:"Selector",defaultValue:"",type:"select",options:(e,t,r)=>{let n=r?.stylePlatform;return n?Object.keys(n).map(e=>({label:e,options:Object.values(n[e]).filter(e=>"class"===e.type).map(e=>({label:e.name,value:e.name}))})):[]}}},preview:{append:"",originalSelector:"",selector:""},callback:(e,t,r,n={})=>{let{originalSelector:i,append:a,selector:s}=t,o=[];if(a&&!i&&n.sourceTo)o.push(n.sourceTo,s);else if(i&&a){let e=jt(r,"definition.styleSelectors.base","");e?o.push(e,s):o.push(s)}return o.length?1===o.length?o[0]:o.join(" "):""}},ca={action:"styleVariant",title:"Style Variant",type:"utility",params:{key:{label:"Selector Key",defaultValue:"",type:"select",options:(e,t)=>{let r=t?.definition?.styleSelectors;if(!t||!t.definition||!r)return[];let n=t.definition.type;return(e=>{let t=e.reduce((e,{groupLabel:t,option:r})=>(t in e||(e[t]=[]),e[t].push(r),e),{});return Object.entries(t).map(([e,t])=>({label:e,options:t}))})(Object.entries(r).flatMap(([e,t])=>(t?[n,...t.split(" ")]:[n]).map(t=>({groupLabel:e,option:{value:`${t}.${e}`,label:`${t} (${e})`}}))))}},variant:{label:"Variant",defaultValue:"",type:"select",options:(e,t,r)=>{let n=t?.definition?.styleSelectors,i=e.key||"";if(!(t&&t.definition&&n&&r?.stylePlatform&&i.includes(".")))return[];let a=t.definition.type,s=i.split(".").pop()||"",o=n[s];if(!o)return[];let l=[],u=[a,...o.split(" ").filter(Boolean)];return Object.entries(r.stylePlatform).forEach(([e,t])=>{u.forEach(r=>{let n=t[r];if(!n)return;let i=n.attributes[s];Object.keys(i.variants||{}).forEach(t=>{l.push({value:t,label:`${e}: ${t}`})})})}),l}},append:{label:"Append to Variant",description:"Merge with existing variant values instead of replacing",defaultValue:!1,type:"checkbox"}},preview:{key:"",variant:"",append:""},callback:(e,t,r,n={})=>{let{key:i,variant:a,append:s}=t;if(!i)return n.sourceTo??{};let o=i||"base",l=a||e;return"object"!=typeof l||Array.isArray(l)?Ct(s?{...n.sourceTo}:{},o,l):l}},da={action:"twigTemplate",title:"Twig Template",type:"utility",params:{template:{label:"Template",defaultValue:"Tokens {{source}} from the value selected to bind previously, {{sourceTo}} is your original value, other tokens via autocomplete",type:"codemirror-text"}},preview:{template:""},callback:(e,t,r,n={})=>{let{template:i}=t,a=e;try{let t=gt(i,{source:e,...n});("string"==typeof t||"object"==typeof t&&t)&&(a=t)}catch{a=e}return a}},ha={twigTemplate:da,dateConverter:sa,staticValue:{action:"staticValue",title:"Static Value",type:"utility",params:{valueType:{label:"Value Type",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Long Text",value:"textarea"},{label:"Boolean",value:"select"}]},value:{defaultValue:"",type:({valueType:e})=>e,options:[{label:"True",value:"true"},{label:"False",value:"false"}]}},preview:{valueType:"",value:""},callback:(e,t)=>{let{valueType:r,value:n}=t;return"select"===r?"true"===n:n}},capitalize:{action:"capitalize",title:"Capitalize",type:"utility",params:{},preview:{content:""},callback:e=>"string"==typeof e?function(e){return null!=e&&"string"==typeof e&&e.trim()?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}(e):e},arrayMap:aa,stringToArray:{action:"stringToArray",title:"Text to List",type:"utility",params:{separator:{label:"Separator",defaultValue:",",type:"text"}},preview:{valueType:"",value:""},callback:(e,t)=>{let{separator:r}=t;return"string"==typeof e?e.split(r).map(e=>e.trim()):e}},not:la,styleSelector:ua,styleVariant:ca},fa=(Object.values(ha).map(({title:e,action:t})=>({label:e,value:t})),Symbol.for("immer-nothing")),pa=Symbol.for("immer-draftable"),ma=Symbol.for("immer-state");function ya(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ga=Object,ba=ga.getPrototypeOf,wa="constructor",va="prototype",xa="configurable",ka="enumerable",Sa="writable",Ma="value",Aa=e=>!!e&&!!e[ma];function Ta(e){return!!e&&(Da(e)||Ea(e)||!!e[pa]||!!e[wa]?.[pa]||$a(e)||Fa(e))}var Pa=ga[va][wa].toString(),Na=/* @__PURE__ */new WeakMap;function Da(e){if(!e||!za(e))return!1;const t=ba(e);if(null===t||t===ga[va])return!0;const r=ga.hasOwnProperty.call(t,wa)&&t[wa];if(r===Object)return!0;if(!Ia(r))return!1;let n=Na.get(r);return void 0===n&&(n=Function.toString.call(r),Na.set(r,n)),n===Pa}function _a(e,t,r=!0){0===ja(e)?(r?Reflect.ownKeys(e):ga.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function ja(e){const t=e[ma];return t?t.type_:Ea(e)?1:$a(e)?2:Fa(e)?3:0}var Ca=(e,t,r=ja(e))=>2===r?e.has(t):ga[va].hasOwnProperty.call(e,t),Oa=(e,t,r=ja(e))=>2===r?e.get(t):e[t],Wa=(e,t,r,n=ja(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},Ea=Array.isArray,$a=e=>e instanceof Map,Fa=e=>e instanceof Set,za=e=>"object"==typeof e,Ia=e=>"function"==typeof e,Ya=e=>"boolean"==typeof e,Ha=e=>e.copy_||e.base_,qa=e=>e.modified_?e.copy_:e.base_;function La(e,t){if($a(e))return new Map(e);if(Fa(e))return new Set(e);if(Ea(e))return Array[va].slice.call(e);const r=Da(e);if(!0===t||"class_only"===t&&!r){const t=ga.getOwnPropertyDescriptors(e);delete t[ma];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],a=t[i];!1===a[Sa]&&(a[Sa]=!0,a[xa]=!0),(a.get||a.set)&&(t[i]={[xa]:!0,[Sa]:!0,[ka]:a[ka],[Ma]:e[i]})}return ga.create(ba(e),t)}{const t=ba(e);if(null!==t&&r)return{...e};const n=ga.create(t);return ga.assign(n,e)}}function Ua(e,t=!1){return Ra(e)||Aa(e)||!Ta(e)||(ja(e)>1&&ga.defineProperties(e,{set:Ba,add:Ba,clear:Ba,delete:Ba}),ga.freeze(e),t&&_a(e,(e,t)=>{Ua(t,!0)},!1)),e}var Ba={[Ma]:function(){ya(2)}};function Ra(e){return null===e||!za(e)||ga.isFrozen(e)}var Va="MapSet",Xa="Patches",Za="ArrayMethods",Qa={};function Ga(e){const t=Qa[e];return t||ya(0),t}var Ja,Ka=e=>!!Qa[e],es=()=>Ja;function ts(e,t){t&&(e.patchPlugin_=Ga(Xa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rs(e){ns(e),e.drafts_.forEach(as),e.drafts_=null}function ns(e){e===Ja&&(Ja=e.parent_)}var is=e=>Ja={drafts_:[],parent_:Ja,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:Ka(Va)?Ga(Va):void 0,arrayMethodsPlugin_:Ka(Za)?Ga(Za):void 0};function as(e){const t=e[ma];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function ss(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(void 0!==e&&e!==r){r[ma].modified_&&(rs(t),ya(4)),Ta(e)&&(e=os(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[ma].base_,e,t)}else e=os(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ua(t,r)}(t,e,!0),rs(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==fa?e:void 0}function os(e,t){if(Ra(t))return t;const r=t[ma];if(!r)return fs(t,e.handledSet_,e);if(!us(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);hs(r,e)}return r.copy_}function ls(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var us=(e,t)=>e.scope_===t,cs=[];function ds(e,t,r,n){const i=Ha(e),a=e.type_;if(void 0!==n&&Oa(i,n,a)===t)return void Wa(i,n,r,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;_a(i,(e,r)=>{if(Aa(r)){const n=t.get(r)||[];n.push(e),t.set(r,n)}})}const s=e.draftLocations_.get(t)??cs;for(const o of s)Wa(i,o,r,a)}function hs(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const n=r.getPath(e);n&&r.generatePatches_(e,n,t)}ls(e)}}function fs(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Aa(e)||t.has(e)||!Ta(e)||Ra(e)||(t.add(e),_a(e,(n,i)=>{if(Aa(i)){const t=i[ma];us(t,r)&&(Wa(e,n,qa(t),e.type_),ls(t))}else Ta(i)&&fs(i,t,r)})),e}var ps={get(e,t){if(t===ma)return e;let r=e.scope_.arrayMethodsPlugin_;const n=1===e.type_&&"string"==typeof t;if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Ha(e);if(!Ca(i,t,e.type_))return function(e,t,r){const n=gs(t,r);return n?Ma in n?n[Ma]:n.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!Ta(a))return a;if(n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===ys(e.base_,t)||function(e,t,r){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Ta(r)||r[ma])&&e.baseRefs_.has(r)}(e,t,a)){ws(e);const r=1===e.type_?+t:t,n=vs(e.scope_,a,e,r);return e.copy_[r]=n}return a},has:(e,t)=>t in Ha(e),ownKeys:e=>Reflect.ownKeys(Ha(e)),set(e,t,r){const n=gs(Ha(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=ys(Ha(e),t),i=n?.[ma];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,n)&&(void 0!==r||Ca(e.base_,t,e.type_)))return!0;ws(e),bs(e)}return e.copy_[t]===r&&(void 0!==r||Ca(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),function(e,t,r){const{scope_:n}=e;if(Aa(r)){const i=r[ma];us(i,n)&&i.callbacks_.push(function(){ws(e),ds(e,r,qa(i),t)})}else Ta(r)&&e.callbacks_.push(function(){const i=Ha(e);3===e.type_?i.has(r)&&fs(r,n.handledSet_,n):Oa(i,t,e.type_)===r&&n.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&fs(Oa(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r)),!0},deleteProperty:(e,t)=>(ws(e),void 0!==ys(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),bs(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=Ha(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[Sa]:!0,[xa]:1!==e.type_||"length"!==t,[ka]:n[ka],[Ma]:r[t]}:n},defineProperty(){ya(11)},getPrototypeOf:e=>ba(e.base_),setPrototypeOf(){ya(12)}},ms={};for(let fo in ps){let e=ps[fo];ms[fo]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function ys(e,t){const r=e[ma];return(r?Ha(r):e)[t]}function gs(e,t){if(!(t in e))return;let r=ba(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=ba(r)}}function bs(e){e.modified_||(e.modified_=!0,e.parent_&&bs(e.parent_))}function ws(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=La(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function vs(e,t,r,n){const[i,a]=$a(t)?Ga(Va).proxyMap_(t,r):Fa(t)?Ga(Va).proxySet_(t,r):function(e,t){const r=Ea(e),n={type_:r?1:0,scope_:t?t.scope_:es(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=ps;r&&(i=[n],a=ms);const{revoke:s,proxy:o}=Proxy.revocable(i,a);return n.draft_=o,n.revoke_=s,[o,n]}(t,r);return(r?.scope_??es()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&void 0!==n?function(e,t,r){e.callbacks_.push(function(n){const i=t;if(!i||!us(i,n))return;n.mapSetPlugin_?.fixSetContents(i);const a=qa(i);ds(e,i.draft_??i,a,r),hs(i,n)})}(r,a,n):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function xs(e){if(!Ta(e)||Ra(e))return e;const t=e[ma];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=La(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=La(e,!0);return _a(r,(e,t)=>{Wa(r,e,xs(t))},n),t&&(t.finalized_=!1),r}ms.deleteProperty=function(e,t){return ms.set.call(this,e,t,void 0)},ms.set=function(e,t,r){return ps.set.call(this,e[0],t,r,e[0])},globalThis.Iterator;var ks=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{if(Ia(e)&&!Ia(t)){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}let n;if(Ia(t)||ya(6),void 0===r||Ia(r)||ya(7),Ta(e)){const i=is(this),a=vs(0,e,void 0);let s=!0;try{n=t(a),s=!1}finally{s?rs(i):ns(i)}return ts(i,r),ss(n,i)}if(!e||!za(e)){if(n=t(e),void 0===n&&(n=e),n===fa&&(n=void 0),this.autoFreeze_&&Ua(n,!0),r){const t=[],i=[];Ga(Xa).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}ya(1)},this.produceWithPatches=(e,t)=>{if(Ia(e))return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let r,n;return[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},Ya(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ya(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ya(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Ta(e)||ya(8),Aa(e)&&(Aa(t=e)||ya(10),e=xs(t));const r=is(this),n=vs(0,e,void 0);return n[ma].isManual_=!0,ns(r),n}finishDraft(e,t){const r=e&&e[ma];r&&r.isManual_||ya(9);const{scope_:n}=r;return ts(n,t),ss(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=Ga(Xa).applyPatches_;return Aa(e)?n(e,t):this.produce(e,e=>n(e,t))}},Ss=ks.produce,Ms=a({});Ms.displayName="PlitziServiceContext";var As=()=>{let e=u(Ms);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},Ts=e=>{let{children:t,value:r}=e;/* @__PURE__ */
|
|
5
|
-
return w(Ms,{value:r,children:t})},Ps=typeof window>"u",Ns=()=>()=>{},Ds=()=>!0,_s=()=>!1,js=({id:e,definition:t,plitziElementLayout:n,children:i,previewMode:a,visible:s=!0})=>{let[[l,d]]=ve(["schema.flat","rsc.enabled"],{mode:"mount"}),{components:h,componentDefinitions:f}=u(Bn),{contexts:{PluginsContext:p}}=As(),{plugins:g}=u(p),{items:v}=t,x=f.current[t.type],k=t.loadStrategy??x?.definition.loadStrategy??"eager",S=n||i||v?.length,M=y(!1);s&&(M.current=!0);let A=!a||"eager"===k||s||"lazy"===k&&M.current,T=n?`${n.type}:${n.rootId}:${n.containerId}`:"",P=b(Ns,Ds,_s),N=n?.containerId===e,D=(e=>{let t=u(ti),r=c(r=>e&&t?(t.listeners.add(r),()=>{t.listeners.delete(r)}):ri,[e,t]),n=c(()=>e&&t?t.current:void 0,[e,t]);return b(r,n,n)})(N);return m(()=>{if(!S||!A)return;let e=(v??[]).filter(e=>{let t=l[e];if(!t)return!1;if(!a||!d)return!0;let r=t.definition.runtime??"shared";return!(!P&&"client"===r)}).map(e=>{let{rootId:t,type:r,runtime:i}=jt(l,`${e}.definition`,{}),s=jt(n,"rootId",t),o=r in h.current||!!Kn({type:r,plugins:g}),u=ei({key:!a&&n?`${e}_${T}`:e,plitziElementLayout:n,type:r,internalProps:{id:e,rootId:s},components:h.current,plugins:g});return!d||"server"!==i||Ps||!a||P&&o?u:/* @__PURE__ */w(ai,{id:e,children:u},e)});return N&&e.push(/* @__PURE__ */w(r,{children:D},"#layout-body")),Array.isArray(i)?e.push(...i.filter(o)):o(i)&&e.push(/* @__PURE__ */w(r,{children:i},"#children")),v?1===e.length?e[0]:e:void 0},[S,A,v,n,i,l,a,d,P,T,h,g,e,N,D])},Cs=/* @__PURE__ */new Map,Os=(e,t,r={},n={})=>{let i,{attributes:a,definition:s}=e,{rootId:o,plitziElementLayout:l}=t;if(t.attributes&&(a={...a,...t.attributes}),Object.keys(r).length>0){let t=((e,t,r={})=>{let{attributes:n,definition:i}=t,{bindings:a}=i;return!a||"object"==typeof a&&!Object.keys(a).length?{attributes:n,style:{},definition:i}:Ss({attributes:n,style:r,definition:i},t=>{Object.keys(a).forEach(r=>{a[r]&&Array.isArray(a[r])&&a[r].length&&a[r].forEach(n=>{let{source:i,transformers:a,when:s,enabled:o=!0}=n,{to:l}=n;if(!l||s&&!ra(s,e,!1,!0)||!o)return;"style"===r&&(l=function(e){if(!e)return"";let t=e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/[_\s-]+/g," ").trim().split(/\s+/);return 0===t.length?"":t.map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}(l));let{fromValue:u,toValue:c}=((e,t,r,n,i)=>{let a="initialState"===n?`definition.${n}.${i}`:`${n}.${i}`;return{fromValue:t?jt(e,t,jt(r,a)):void 0,toValue:jt(r,a,t?jt(e,t):void 0)}})(e,i,t,r,l),d=u;a&&Array.isArray(a)&&a.length>0&&a.forEach(r=>{let{action:n,params:i,enabled:a=!0}=r;if(!a)return;let s=ha[n];s&&(d=s.callback(d,((e,t)=>{if(!t)return t;let r=t;for(let[n,i]of Object.entries(e.params)){let e=t[n];"true"!==e&&"false"!==e||"checkbox"!==("function"==typeof i.type?i.type(t):i.type)||(r===t&&(r={...t}),r[n]="true"===e)}return r})(s,i)??{},t,{...e,sourceTo:c}))}),("boolean"==typeof d||"number"==typeof d||d)&&Ct(t,"initialState"===r?`definition.${r}.${l}`:`${r}.${l}`,d)})})})})(r,{...e,attributes:a},i);({attributes:a,definition:s,style:i}=t)}let{queryParams:u={},routeParams:c={},variables:d={},origin:h=""}=r,f={...d,...c,...u,navigation:{routeParams:c,queryParams:u,origin:h}};if(Object.keys(f).length>0){let e={};for(let t of Object.keys(a)){let r=a[t];e[t]="string"==typeof r&&At(r)?gt(r,f,!0):r}a=e}return a={...a,...S(n,["visibility","styleSelectors"])},s={...s,styleSelectors:{...s.styleSelectors,...s.initialState?.styleSelectors,...n.styleSelectors??{}}},s.styleSelectors=(e=>{let t=e.initialState?.styleVariant;return Object.fromEntries(Object.entries(e.styleSelectors).map(([r,n])=>{let i="base"===r?`plitzi__${e.type}`:`plitzi__${e.type}-${r}`;if("string"!=typeof n)return[r,n];!(e=>{let t=Cs.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),Cs.set(e,t)),t})(e.type).test(n)&&t?.[e.type]?.[r]&&(n=n?`${e.type} ${n}`:e.type);let a=n.replace(/\S+/g,n=>{let i=t?.[n]?.[r];if(!i)return n;let a=Array.isArray(i)?i:[i];return n===e.type&&"base"===r?a.map(e=>`${n}--${e}`).join(" "):n===e.type&&"base"!==r?a.map(e=>`${n}-${r}--${e}`).join(" "):`${n} ${a.map(e=>`${n}--${e}`).join(" ")}`});return a?[r,`${i} ${a}`]:[r,i]}))})(s),{...t,rootId:jt(l,"rootId",o),attributes:{...a,...S(t,["id","rootId","attributes","definition","plitziElementLayout"])},definition:s,elementState:{...s.initialState,...n},style:i}},Ws=["variables"],Es=e=>Object.values(e??{}).some(e=>"string"==typeof e&&At(e)),$s=class extends t{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */w("div",{children:"Something broke! Please refresh and try again."}):e}},Fs=a({});Fs.displayName="EventBridgeContext";var zs=e=>{if(void 0===e)return"undefined";if(null===e)return"null";let t=typeof e;if("function"===t)return"ƒ";if("string"===t){let t=e;return JSON.stringify(t.length>40?`${t.slice(0,40)}…`:t)}return"symbol"===t?e.toString():"number"===t||"boolean"===t||"bigint"===t?`${e}`:Array.isArray(e)?0===e.length?"[]":`[…${e.length}]`:"$$typeof"in e?"<ReactElement>":"{…}"},Is=e=>{if("object"!=typeof e||!e)return zs(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(zs).join(", ")}${e.length>4?", …":""}]`;let t=e,r=Object.keys(t);return 0===r.length?"{}":`{ ${r.slice(0,4).map(e=>`${e}: ${zs(t[e])}`).join(", ")}${r.length>4?", …":""} }`},Ys=(e,t)=>{if(Object.is(e,t))return!0;if(null===e||null===t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>Object.is(e[r],t[r]))},Hs=oe({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),qs=((e={})=>{let{max:t=100,enabled:r}=e,n=new A,i=[],a=0,s=()=>{n.forEach(e=>e())},o=e=>{a+=1;let r={seq:a,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},n=i.length>=t?i.slice(i.length-t+1):i.slice();n.push(r),i=n,s()};return{middleware:e=>{if(!T(r,e.getState()))return{onChange:o}},record:o,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>a,subscribe:e=>n.add(e),clear:()=>{i=[],s()}}})({max:30}),Ls=[],Us=/* @__PURE__ */new Map,Bs=/* @__PURE__ */new Map,Rs=/* @__PURE__ */new Map,Vs=/* @__PURE__ */new Map,Xs=!0,Zs=/* @__PURE__ */new Map,Qs=/* @__PURE__ */new Map,Gs=0,Js=/* @__PURE__ */new Map,Ks=!1,eo=!1,to=0,ro=!1,no=!1,io="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},ao=()=>{Xs&&(Xs=!1,Hs.setState("tree",(()=>{let e={};for(let[t,r]of Vs)e[t]={parentId:Bs.get(t),baseDuration:r,elementId:Rs.get(t)??t,mountedAt:Zs.get(t),unmountedAt:Qs.get(t)};return e})())),Hs.setState("hydrated",no),Hs.setState("commits",Ls)},so=e=>{Bs.delete(e),Rs.delete(e),Vs.delete(e),Zs.delete(e),Qs.delete(e),Xs=!0},oo=()=>{if(ro=!1,Us.size>0){let e=[...Us.values()].sort((e,t)=>e.timestamp-t.timestamp);Us.clear(),(Ls=[...Ls,...e]).length>200&&(Ls=Ls.slice(Ls.length-200)),(e=>{for(let[t,r]of Qs)r<=e&&so(t)})(Ls[0].commitId)}eo&&ao()},lo=()=>{let e=qs.entriesSince(Gs);Gs=qs.lastSeq();let t=/* @__PURE__ */new Map;for(let r of e){if(void 0===r.path)continue;let e=t.get(r.path);e?e.next=r.nextValue:t.set(r.path,{prev:r.prevValue,next:r.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${Is(t.prev)} → ${Is(t.next)}`}))},uo={onRender:(e,t,r,n,i,a)=>{Ks||(Ks=!0,Hs.setState("enabled",!0));let s=!Vs.has(e);Vs.set(e,n);let o=Js.get(e);Js.delete(e);let l={id:e,elementId:Rs.get(e)??e,parentId:Bs.get(e),phase:t,actualDuration:r,baseDuration:n,changedProps:o},u=Us.get(a);u?(u.elements.push(l),u.elementCount+=1,u.duration=Math.max(u.duration,r)):(to+=1,Us.set(a,{commitId:to,timestamp:a,duration:r,elementCount:1,elements:[l],causes:lo()})),s&&(Zs.set(e,Us.get(a)?.commitId??to),Xs=!0),ro||(ro=!0,io(oo))},linkParent:(e,t,r)=>{(!Bs.has(e)||Bs.get(e)!==t)&&(Xs=!0),Bs.size>=2e4&&!Bs.has(e)&&(Bs.clear(),Rs.clear(),Vs.clear(),Zs.clear(),Qs.clear(),Xs=!0),Bs.set(e,t),Rs.set(e,r)},markMounted:e=>{Qs.delete(e)&&(Xs=!0)},markUnmounted:e=>{Vs.has(e)?(Qs.set(e,to),Xs=!0,ro||(ro=!0,io(oo))):so(e)},recordProps:(e,t)=>{Js.set(e,t)},recordStoreChange:e=>{qs.record(e)},setHydrated:()=>{no||(no=!0,eo&&Hs.setState("hydrated",!0))},start:()=>{eo=!0,oo(),ao()},stop:()=>{eo=!1},clear:()=>{Ls=[],Us.clear(),Gs=qs.lastSeq(),Js.clear(),to=0;for(let e of[...Qs.keys()])so(e);Zs.clear(),Xs=!0,ao()}},co=/* @__PURE__ */e({default:()=>ho}),ho=e=>{let t=e.displayName||e.name,r=t=>{let r=y(void 0),i=y(void 0),{id:a,rootId:s}=t.internalProps,o=u(x),l=o?.visible??!0,d=`${a}${f()}`,p=o?.traceId??d,g=m(()=>({id:a,rootId:s,visible:l,traceId:p,plitziJsxSkipHOC:!0}),[a,s,l,p]),b=m(()=>({visible:l,traceId:p}),[l,p]);if(t.plitziJsxSkipHOC)/* @__PURE__ */return w(x,{value:b,children:/* @__PURE__ */w(v,{value:g,children:/* @__PURE__ */w(e,{...t})})});let{settings:{previewMode:M,debugMode:A},root:{baseElementId:T}}=As();h(()=>{if(A)return uo.markMounted(d),()=>uo.markUnmounted(d)},[A,d]);let[P]=ve(`schema.flat.${a}`);if(!P)throw Error(`Element ${a} not found, Page ${T}`);let{internalProps:N,customProps:D,children:_}=(({element:e,children:t,internalProps:r,previewMode:n=!1,parentVisible:i=!0})=>{let{id:a}=r,{state:s,setElementState:o}=(({id:e,bindings:t,previewMode:r})=>{let{scopePath:n}=we(),i=m(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(e,n),[e,n]),[a]=ve(i),s=a??Ln,o=Se(),l=m(()=>(t?.attributes&&Array.isArray(t.attributes)?t.attributes:[]).filter(e=>!1!==e.enabled).map(e=>jt(e,"to","")),[t]),u=c(e=>!!r&&(o(i,t=>{if(!e)return{};let r="function"==typeof e?e(t??Ln):e;return l.length&&(r=Ft(r,l)),r}),!0),[l,i,r,o]);return h(()=>{if(r&&n)return()=>o(i,void 0)},[r,n,i,o,e]),{state:s,setElementState:u}})({id:a,bindings:e.definition.bindings,previewMode:n}),l=m(()=>Es(e.attributes)||Es(r.attributes),[e.attributes,r.attributes]),[[u,d,f]]=ve(["navigation.routeParams","navigation.queryParams","navigation.origin"],{enabled:l}),p=(({bindings:e,sources:t})=>{let r=m(()=>{let r=new Set(t??[]);for(let t of Object.values(e??{}))if(Array.isArray(t))for(let e of t)for(let t of Nt(e))r.add(t);return r.size>0&&!r.has("variables")&&r.add("variables"),[...r]},[e,t]),n=m(()=>r.map(e=>`runtime.sources.${e}`),[r]),[i]=ve(n);return m(()=>{let e={};return r.forEach((t,r)=>{void 0!==i[r]&&(e[t]=i[r])}),e},[r,i])})({bindings:e.definition.bindings,sources:l?Ws:void 0}),y=m(()=>({...Os(e,r,{...p,routeParams:u,queryParams:d,origin:f},s),setElementState:o}),[e,r,p,u,d,f,s,o]);return{internalProps:y,customProps:S(y,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"]),children:js({id:a,definition:y.definition,plitziElementLayout:y.plitziElementLayout,children:t,previewMode:n,visible:i&&k(y.elementState.visibility)})}})({element:P,internalProps:t.internalProps,children:t.children,previewMode:M,parentVisible:l}),{attributes:j,definition:C,style:O,plitziElementLayout:W,elementState:E,setElementState:$}=N;((e,t={},r={},n=Fs,i=!1)=>{let{eventBridge:a}=u(n);h(()=>{if(i||!a||!e)return;let n=Object.entries(t);for(let[t,i]of n)"function"==typeof i&&a.on(e,t,i,r);return()=>{for(let[t,r]of n)"function"==typeof r&&a.off(e,t,r)}},[e,t,a,r,i])})("element",m(()=>({[`${a}_setState`]:$}),[a,$]));let F=l&&k(E.visibility),z=m(()=>({id:a,rootId:s,visible:F,traceId:d,attributes:j,definition:C,plitziElementLayout:W,style:O,elementState:E,setElementState:$}),[j,C,E,a,W,s,O,$,F,d]),I=m(()=>({visible:F,traceId:d}),[F,d]),Y=m(()=>{let n={...N.attributes,...t.extraProps,...D,...S(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return _&&(n={...n,children:_}),/* @__PURE__ */w($s,{children:/* @__PURE__ */w(e,{...n,ref:r})})},[N.attributes,t,D,_]),H=/* @__PURE__ */w(x,{value:I,children:/* @__PURE__ */w(v,{value:z,children:Y})});if(A){uo.linkParent(d,o?.traceId,a);let e={attributes:j,definition:C,style:O,elementState:E,plitziElementLayout:W,children:_,...D,...t.extraProps,...S(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return uo.recordProps(d,((e,t)=>{if(!e)return[];let r=[],n=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of n){let n=e[i],a=t[i];if(!Object.is(n,a)&&(r.push({key:i,prev:Is(n),next:Is(a),ref:Ys(n,a)}),r.length>=12))break}return r})(i.current,e)),i.current=e,/* @__PURE__ */w(n,{id:d,onRender:uo.onRender,children:H})}return H};return r.displayName=`withElement(${t})`,r};export{k as $,gt as A,be as B,Bn as C,Ct as D,Ot as E,ve as F,ce as G,pe as H,Me as I,X as J,le as K,Pe as L,Se as M,Te as N,jt as O,xe as P,T as Q,Ae as R,Rn as S,Ft as T,he as U,ye as V,ue as W,C as X,V as Y,P as Z,Qn as _,Ts as a,Gn as b,ia as c,Yi as d,v as et,zi as f,Jn as g,Kn as h,Fs as i,De as j,At as k,ra as l,ei as m,uo as n,As as o,ni as p,oe as q,Hs as r,Ss as s,ho as t,Hi as u,Zn as v,qn as w,Xn as x,Vn as y,we as z};
|
|
File without changes
|