@plitzi/plitzi-sdk 0.38.3 → 0.38.4

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.
@@ -17,135 +17,135 @@ import*as e from"react";import t,{Children as n,Component as r,Fragment as i,Pro
17
17
  /* @__PURE__ */I("path",{fill:"currentColor",d:"M67.12,83.23c-0.251,4.695-10.719,13.862-14.292,16.887l-4.008-4.008 c2.94-3.723,11.57-14.256,16.276-14.751C66.352,81.226,67.185,82.018,67.12,83.23z"})]})]});function B(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=B(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function U(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=B(e))&&(r&&(r+=" "),r+=t);return r}var H=Symbol.for("plitzi.sharedContexts.v1"),W=(e,t)=>{let n=(e=>(e[H]??=/* @__PURE__ */new Map,e[H]))(globalThis),r=n.get(e);if(r)return r;let i=l(t);return i.displayName=e,n.set(e,i),i},V=W("ElementContext",void 0),G=W("ElementParentContext",void 0),K=e=>!1!==e&&"false"!==e,Y=(e,t)=>{let n=new Set(t),r={};for(let i in e)!n.has(i)&&Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},J={previewMode:!0,debugMode:!1,renderMode:"raw",environment:"main",isHydrating:!1,hydrated:!1,overQuota:!1,testAttributes:!0,ownsHead:!0},X=()=>{let[[e,t,n,r,i,a,o,s,l]]=Mt(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota","render.testAttributes","render.ownsHead"]);return k(()=>({previewMode:e??J.previewMode,debugMode:t??J.debugMode,renderMode:n??J.renderMode,environment:r??J.environment,isHydrating:i??J.isHydrating,hydrated:a??J.hydrated,overQuota:o??J.overQuota,testAttributes:s??J.testAttributes,ownsHead:l??J.ownsHead}),[e,t,n,r,i,a,o,s,l])},Z=()=>{},Q=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]=Z,void this.dead++;let n=this.items.pop();t<this.items.length&&(this.items[t]=n)}begin(){this.notifying++}end(){0===--this.notifying&&this.dead>0&&this.compact()}forEach(e,t){this.begin();try{let n,{items:r}=this,i=r.length,a=0,o=!1;for(;a<i;)try{for(;a<i;a++)e(r[a])}catch(e){o||(o=!0,n=e),a++}if(o){if(!t)throw n;t(n)}}finally{this.end()}}clear(){if(this.notifying>0){let{items:e}=this;for(let t=0,n=e.length;t<n;t++)e[t]=Z;return void(this.dead=e.length)}this.items.length=0,this.dead=0}compact(){let{items:e}=this,t=0;for(let n=0;n<e.length;n++)e[n]!==Z&&(e[t++]=e[n]);e.length=t,this.dead=0}},ee=(e,t)=>"function"==typeof e?!e(t):!1===e,te=e=>"object"==typeof e&&!!e&&!Array.isArray(e),ne=(e,t)=>{if(!te(e)||!te(t))return t;let n={...e};for(let r of Object.keys(t))"__proto__"!==r&&(n[r]=r in e?ne(e[r],t[r]):t[r]);return n},re=/* @__PURE__ */new Map,ie=e=>{let t=re.get(e);return void 0===t&&(t=e.split("."),re.size<4096&&re.set(e,t)),t},ae=/* @__PURE__ */new Map;function oe(e,t){let n=Array.isArray(t);if("string"!=typeof t&&!n||n&&!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=ae.get(e);return t||(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 n=t;for(let r=0;r<e.length;r++){if("object"!=typeof n||!n)return;n=n[e[r]]}return n}})(ie(e)),ae.size<4096&&ae.set(e,t)),t})(t)(e);let r=e;for(let i of t){if("object"!=typeof r||!r||!(i in r))return;r=r[i]}return r}var se=(e,t)=>"string"!=typeof e||e===t||e.length>t.length&&e.startsWith(t)&&"."===e[t.length]||t.length>e.length&&t.startsWith(e)&&"."===t[e.length],le=(e,t,n=12)=>{if(!Object.is(e,t)){if(n<=0||!te(e)||!te(t))return{path:"",value:t};for(let r of/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)])){if(Object.is(e[r],t[r]))continue;let i=le(e[r],t[r],n-1);if(i)return{path:i.path?`${r}.${i.path}`:r,value:i.value}}}},ce=/* @__PURE__ */new WeakMap;function ue(e){return ce.get(e)}var de,pe=e=>{let t=e?.enabled;return n=>{if(ee(t,n.getState()))return;let{handle:r,record:i}=function(e,t={}){let n=t.limit??100,r=t.path,i=t.shouldRecord,a=[{state:e.getState(),timestamp:Date.now()}],o=0,s=!1,l=()=>({entries:a,index:o,canUndo:o>0,canRedo:o<a.length-1}),c=l(),u=/* @__PURE__ */new Set,d=()=>{c=l(),u.forEach(e=>e())},p=t=>{if(t<0||t>=a.length||t===o)return;let n=a[t].state;if(s=!0,r){let t=oe(n,r);e.setState(r,()=>t)}else e.setState(void 0,()=>n);s=!1,o=t,d()};return{handle:{getSnapshot:()=>c,subscribe:e=>(u.add(e),()=>u.delete(e)),undo:()=>p(o-1),redo:()=>p(o+1),travelTo:p,clear:()=>{a=[{state:e.getState(),timestamp:Date.now()}],o=0,d()}},record:({path:t})=>{if(s||i&&!i(t)||r&&void 0!==t&&!se(t,r))return;let l,c=o<a.length-1?a.slice(0,o+1):a,u=c[c.length-1].state,p=e.getState(),f=t??r,h=t??r;if(h)try{let e=le(oe(u,h),oe(p,h));e&&(f=e.path?`${h}.${e.path}`:h,l=e.value)}catch{}let m=[...c,{path:f,value:l,state:p,timestamp:Date.now()}];a=m.length>n?m.slice(m.length-n):m,o=a.length-1,d()}}}(n,e);return ce.set(n,r),{onChange:i}}},fe=e=>{},he=e=>{console.error("[store]",`${e.phase} error at`,e.path??"(root)",e.error)},me=(e={})=>{let{filter:t,sink:n=fe,errorSink:r=he,enabled:i}="function"==typeof e?{sink:e}:e;return e=>{if(!ee(i,e.getState()))return{onChange:e=>{(!t||t(e))&&n(e)},onError:r}}},ge=(e="local")=>{if("string"!=typeof e)return e;try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}},ye=Symbol("unchanged"),be=e=>/^\d+$/.test(e),ve=e=>Array.isArray(e)?e.slice():{...e},we=(e,t,n,r,i)=>{let a=t[n],o="object"==typeof e&&e?e:{};if(n===t.length-1){let e=o[a],t=i?r(e):r;if(e===t)return ye;let n=ve(o);return n[a]=t,n}let s=we(o[a],t,n+1,r,i);if(s===ye)return ye;let l=ve(o);return l[a]=s,l},ke=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,xe=e=>ke.test(e)?`.${e}`:`[${JSON.stringify(e)}]`,Se=e=>ke.test(e)?e:JSON.stringify(e),Te=e=>{let t=e.length,n="";for(let a=0;a<t-1;a++){let t=0===a?"o":"_"+(a-1);n+=`var _${a}=${t}==null?void 0:${t}${xe(e[a])};\n`}let r=t>1?"_"+(t-2):"o";n+=`var _p=${r}==null?void 0:${r}${xe(e[t-1])};\n`,n+="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}||{})`},${Se(e[a])}:${i}}`;return n+=`return ${i};`,Function("o","v","f",n)},Ce=/* @__PURE__ */new Map,Ae=(e,t,n)=>{if("object"!=typeof e||!e)return ye;let r=e,i=t[n];if(!Object.hasOwn(r,i))return ye;if(n===t.length-1){let e=ve(r);return Array.isArray(e)?e.splice(Number(i),1):delete e[i],e}let a=Ae(r[i],t,n+1);if(a===ye)return ye;let o=ve(r);return o[i]=a,o},Ee=(e,t,n,r,i)=>{let a=((e,t)=>{if(!(()=>{if(typeof window>"u")return!1;if(void 0===de)try{Te(["x","y"])({x:{}},1,!1),de=!0}catch{de=!1}return de})())return;let n=Ce.get(e);if(n)return n;if(t.some(be))return;let r=Te(t);return Ce.size>=256&&Ce.delete(Ce.keys().next().value),Ce.set(e,r),r})(t,n);if(a){let t=a(e,r,i);return null===t?ye:t}return we(e,n,0,r,i)},Ie=Symbol("@plitzi/nexus/cancel"),_e=(()=>{try{return"production"}catch{}return"production"})(),Oe="production"===_e,Ne=!Oe,Me="test"===_e;var Pe=e=>"number"==typeof e||""===e||isNaN(Number(e))?e:Number(e),Le=e=>Array.isArray(e)?e.slice():{...e},De=(e,t,n,r)=>{let i=Pe(t[n]),a=Le(e);return a[i]=n===t.length-1?r:De(e[i]??{},t,n+1,r),a},ze=Symbol("no-error"),Re=(e,t,n)=>{let r=0,i=ze;for(;r<n;)try{for(;r<n;r++)e[r](t)}catch(e){i===ze&&(i=e),r++}return i},je="__proto__";var $e=(e,t)=>e===t||e.startsWith(`${t}.`),Fe=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,n,r){this.drop(e,r,!1);let i=Math.max(0,t),a={updatedAt:n,expiresAt:n+i,ttl:i};this.records.set(e,a),this.announced.delete(e),this.changed(),r||this.emit({path:e,type:"recorded",freshness:a})}drop(e,t,n=!0){if(0!==this.records.size)for(let r of[...this.records.keys()])(r===e?n:r.startsWith(`${e}.`))&&this.forget(r,t)}dropChanged(e,t,n){for(let r of[...this.records.keys()])oe(e,r)!==oe(t,r)&&this.forget(r,n)}get(e){if(0===this.records.size)return;let t=e;for(;;){let e=this.records.get(t);if(e)return e;let n=t.lastIndexOf(".");if(-1===n)return;t=t.slice(0,n)}}expire(e,t){let n=[];if(this.records.forEach((r,i)=>{(void 0===e||$e(i,e)||$e(e,i))&&(r.expiresAt>t&&this.records.set(i,{...r,expiresAt:t}),this.announced.add(i),n.push(i))}),n.length>0){this.changed();for(let e of n)this.emit({path:e,type:"expired",freshness:this.records.get(e)})}return n}forget(e,t){let n=this.records.get(e);this.records.delete(e),this.announced.delete(e),this.changed(),t||this.emit({path:e,type:"dropped",freshness:n})}changed(){this.snapshot=void 0,this.schedule()}emit(e){for(let t of[...this.listeners])try{t(e)}catch(jr){this.reportError(jr,e.path)}}schedule(){if(clearTimeout(this.timer),this.timer=void 0,0===this.listeners.size)return;let e=1/0;this.records.forEach((t,n)=>{!this.announced.has(n)&&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((n,r)=>{!this.announced.has(r)&&n.expiresAt<=e&&(this.announced.add(r),t.push(r))});for(let n of t)this.emit({path:n,type:"elapsed",freshness:this.records.get(n)});this.schedule()}},qe=class{subscribers=null;children=null},Be=class{direct=/* @__PURE__ */new Map;descendants=/* @__PURE__ */new Map;root=new qe;size=0;add(e,t){let n=ie(e),r=this.direct.get(e);if(!r){r=new Q,this.direct.set(e,r);let t=this.root;for(let e of n){t.children||(t.children=/* @__PURE__ */new Map);let n=t.children.get(e);n||(n=new qe,t.children.set(e,n)),t=n}t.subscribers=r,this.size++;let i="";for(let r=0;r<n.length-1;r++){i=i?`${i}.${n[r]}`:n[r];let t=this.descendants.get(i);t||(t=/* @__PURE__ */new Set,this.descendants.set(i,t)),t.add(e)}}return r.add(t),()=>this.remove(e,r,t,n)}remove(e,t,n,r){if(this.direct.get(e)!==t||(t.remove(n),t.length>0))return;this.direct.delete(e),this.size--;let i=this.root;for(let o of r){if(!i.children)return;let e=i.children.get(o);if(!e)return;i=e}i.subscribers===t&&(i.subscribers=null);let a="";for(let o=0;o<r.length-1;o++){a=a?`${a}.${r[o]}`:r[o];let t=this.descendants.get(a);t&&(t.delete(e),0===t.size&&this.descendants.delete(a))}}walkAncestors(e,t){let n=this.root;for(let r of e){if(!n.children)return;let e=n.children.get(r);if(!e)return;n=e,n.subscribers&&t(n.subscribers)}}getDescendants(e){return this.descendants.get(e)}forEachAffected(e,t,n){let r=e=>{e&&e.forEach(t,n)};if("string"!=typeof e)return void this.direct.forEach(r);let i=ie(e);this.walkAncestors(i,r),this.descendants.get(e)?.forEach(e=>r(this.direct.get(e)))}clear(){this.direct.clear(),this.descendants.clear(),this.root.children=null,this.root.subscribers=null,this.size=0}},Ue=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.`,He=0;function We(e,t){let n,r,i,a={},o=new Q,s=new Q,l=new Be,c=new Q,u=()=>{0!==c.length&&c.forEach(e=>e())},d=[],p=[],f=[],h=t?.parent,m=++He,g=(e,t,n)=>{if(0===p.length)throw e;let r={error:e,phase:t,path:n};for(let i=0,a=p.length;i<a;i++)p[i](r)},y=new Fe((e,t)=>g(e,"notify",t)),b=()=>a,v=()=>n??={...a},{getState:w,getPath:k,invalidate:x,resetCache:S,getMergeCount:T}=function(e,t,n,r){if(!n)return{getState:t,getPath:t=>oe(e(),t),invalidate:()=>{},resetCache:()=>{},getMergeCount:()=>0};let i,a=n,o=r&&r.length>0?new Set(r):void 0,s=!0,l=!1,c=0,u=/* @__PURE__ */new Map,d=/* @__PURE__ */new Map;return{getState:()=>((s||void 0===i)&&(i=(()=>{c++;let e=t(),n=ne(a.getState(),e);if(o)for(let t of o)void 0!==e[t]&&(n[t]=e[t]);return n})(),s=!1),i),getPath:t=>{if(l)u.clear(),l=!1;else if(u.has(t))return u.get(t);let n=(t=>{if(o){let n=t.indexOf("."),r=-1===n?t:t.slice(0,n);if(o.has(r)&&void 0!==e()[r])return oe(e(),t)}let n=oe(e(),t);if(void 0===n)return a.getPath(t);let r=a.getPath(t);if(void 0===r||!te(n)||!te(r))return n;let i=d.get(t);if(i&&i.own===n&&i.parent===r)return i.value;c++;let s=ne(r,n);return d.set(t,{own:n,parent:r,value:s}),s})(t);return u.set(t,n),n},invalidate:()=>{s=!0,l=!0},resetCache:()=>{u.clear(),d.clear(),i=void 0,s=!0,l=!1},getMergeCount:()=>c}}(b,v,h,t?.exclusive),C=()=>{x(),u()},A=!1;h&&(S(),i=h.subscribeInvalidate?.(C));let{setState:E,batch:I}=function(e){let{getOwnState:t,getOwnSnapshot:n,setOwnState:r,mutateOwnKey:i,deleteOwnKey:a,parent:o,listeners:s,pathListeners:l,changeListeners:c,interceptors:u,readOnly:d,freshness:p,reportError:f,invalidateDescendants:h,onDelegateToParent:m}=e,g=e=>{if(0===d.length||!(e=>{for(let t=0,n=d.length;t<n;t++){let n=d[t];if(e===n||e.startsWith(`${n}.`)||n.startsWith(`${e}.`))return!0}return!1})(e))return!1;if(Ne)throw Error(`@plitzi/nexus: refused to write to read-only path "${e}"`);return!0},y=(e,t,n)=>{let r=t;for(let i=0,a=u.length;i<a;i++){let a;try{a=u[i]({path:e,value:r,prev:n})}catch(t){return f(t,"beforeChange",e),Ie}if(a===Ie)return Ie;void 0!==a&&(r=a)}return r},b=(e,t,n)=>{void 0===t?p.size>0&&p.drop(e,n):p.record(e,t,Date.now(),n)},v=0,w=/* @__PURE__ */new Set,k=(e,t)=>{let{items:n}=e;if(v>0)for(let r=0,i=n.length;r<i;r++)w.add(n[r]);else if(0!==n.length){e.begin();try{let e=Re(n,t,n.length);e!==ze&&f(e,"notify",t)}finally{e.end()}}},x=(e,t,n)=>{let r={path:e,prev:t,next:n,prevValue:void 0===e?t:oe(t,e),nextValue:void 0===e?n:oe(n,e)},{items:i}=c;c.begin();try{let t=Re(i,r,i.length);t!==ze&&f(t,"onChange",e)}finally{c.end()}},S=(e,t,n,r)=>{let i=l.getDescendants(e);if(i)for(let a of i){let i=l.direct.get(a);if(!i)continue;let o=ie(a).slice(r);oe(t,o)!==oe(n,o)&&k(i,e)}},T=(e,t,n,i,a)=>{let o=e?oe(n,e):void 0,f=e?a?t(o):t:void 0;if(e&&u.length>0){let t=y(e,f,o);if(t===Ie)return;f=t}if(e&&o===f)return;let m=e?((e,t,n)=>{if("string"==typeof t){if(!t)return n;let r=ie(t);if(1===r.length){let t=Le(e);return t[Pe(r[0])]=n,t}return De(e,r,0,n)}return Array.isArray(t)&&t.length?De(e,t,0,n):n})(n,e,f):a?t(n):{...n,...t};if(!e&&u.length>0){let e=y(void 0,m,n);if(e===Ie)return;m=e}if(m!==n){if(d.length>0)for(let e=0,t=d.length;e<t;e++){let t=d[e];if(oe(n,t)!==oe(m,t)){if(Ne)throw Error(`@plitzi/nexus: refused to write to read-only path "${d[e]}"`);return}}p.size>0&&p.dropChanged(n,m,!i),r(m),c.length>0&&x(e,n,m),h(),i&&(k(s,e),l.size>0&&l.direct.forEach((t,r)=>{oe(n,r)!==oe(m,r)&&k(t,e)}))}};return{setState:(e,d,f={})=>{let{canPropagate:v=!0,unmount:w=!1,raw:C=!1,ttl:A}=f,E=t(),I=!C&&"function"==typeof d;if("string"==typeof e&&-1!==e.indexOf(je)&&-1!==ie(e).indexOf(je))throw Error(`@plitzi/nexus: refused to write to unsafe path "${e}" (\`__proto__\` segment)`);if("string"==typeof e&&g(e))return;if(o&&"string"==typeof e&&!(-1===e.indexOf(".")?Object.hasOwn(E,e):((e,t)=>{let n=e;for(let r=0,i=t.length;r<i;r++){if("object"!=typeof n||!n||!Object.hasOwn(n,t[r]))return!1;n=n[t[r]]}return!0})(E,ie(e))))return m?.(e),void o.setState(e,d,{canPropagate:v,unmount:w,raw:C,ttl:A});if("string"!=typeof e)return void T(e,d,E,v,I);if(-1===e.indexOf(".")){if(w){if(!Object.hasOwn(E,e))return;let t=E[e];if(u.length>0&&y(e,void 0,t)===Ie)return;p.drop(e,!v);let r=c.length>0?n():void 0;if(a(e),void 0!==r&&x(e,r,n()),v&&(k(s,e),l.size>0)){let n=l.direct.get(e);n&&k(n,e),S(e,t,void 0,1)}return void h()}let t=E[e],r=I?d(t):d,o=r;if(u.length>0){let n=y(e,r,t);if(n===Ie)return;o=n}if(b(e,A,!v),t===o)return;let f=c.length>0?n():void 0;if(i(e,o),void 0!==f&&x(e,f,n()),v&&(k(s,e),l.size>0)){let n=l.direct.get(e);n&&k(n,e),S(e,t,o,1)}return void h()}let _,O=ie(e);if(w){if(u.length>0&&y(e,void 0,oe(E,e))===Ie)return;p.drop(e,!v),_=((e,t)=>Ae(e,t,0))(E,O)}else if(u.length>0){let t=oe(E,e),n=I?d(t):d,r=y(e,n,t);if(r===Ie)return;_=Ee(E,e,O,r,!1)}else _=Ee(E,e,O,d,I);if(w||b(e,A,!v),_===ye)return;let N=_;r(N),c.length>0&&x(e,E,N),v&&(k(s,e),l.size>0&&(((e,t)=>{l.walkAncestors(t,t=>k(t,e))})(e,O),S(e,E,N,0))),h()},batch:e=>{v++;try{return e()}finally{if(v--,0===v&&w.size>0){let e=[...w];w.clear();let t=Re(e,void 0,e.length);t!==ze&&f(t,"notify",void 0)}}}}}({getOwnState:b,getOwnSnapshot:v,setOwnState:e=>{a=e,n=void 0,x()},mutateOwnKey:(e,t)=>{a[e]=t,x(),n=void 0},deleteOwnKey:e=>{delete a[e],x(),n=void 0},parent:h,listeners:o,pathListeners:l,changeListeners:s,interceptors:d,readOnly:t?.readOnly??[],freshness:y,reportError:g,invalidateDescendants:u,onDelegateToParent:Ne&&h?e=>h.scopeClaims?.claimDelegatedWrite(e,m):void 0}),_=()=>{r&&(r.unsubscribe(),r=void 0,S())},O=()=>{h&&(!A&&(o.length>0||l.size>0||s.length>0)?!r&&h&&(x(),S(),r=function(e,t,n,r,i,a,o){let s;return{unsubscribe:e.subscribe(e=>{o();let l=e;if(t.forEach(t=>t(e),e=>a(e,"notify",l)),n.size>0&&n.forEachAffected(e,t=>t(e),e=>a(e,"notify",l)),r.length>0){let e=i(),t=s??e,n={path:l,prev:t,next:e,prevValue:void 0===l?t:oe(t,l),nextValue:void 0===l?e:oe(e,l)};s=e,r.forEach(e=>e(n),e=>a(e,"onChange",l))}}),seedBaseline:()=>{s??=i()}}}(h,o,l,s,w,g,x),s.length>0&&r.seedBaseline()):_())},N=e=>(O(),()=>{e(),O()}),M=e=>N(o.add(e)),P=(e,t)=>N(l.add(e,t)),L=e=>{let t=N(s.add(e));return r?.seedBaseline(),t};a="function"==typeof e?e(E,w):e;let D=e=>y.get(e)??h?.getFreshness(e),z={id:t?.id,scopePath:t?.scopePath,getState:w,getOwnState:v,getPath:k,setState:E,get:e=>void 0===e?w():k(e),set:E,watch:(e,t)=>"function"==typeof e?M(e):P(e,t),withBase:e=>{let t=(t,n,r)=>E(void 0===t?e:`${e}.${t}`,n,r);return{getState:t=>{let n=k(e);return void 0===n&&void 0!==t?t:n},getPath:(t,n)=>{let r=k(`${e}.${t}`);return void 0===r&&void 0!==n?n:r},setState:t,subscribe:t=>P(e,t),subscribePath:(t,n)=>P(`${e}.${t}`,n),get:t=>k(void 0===t?e:`${e}.${t}`),set:t,watch:(t,n)=>"function"==typeof t?P(e,t):P(`${e}.${t}`,n)}},batch:I,subscribe:M,subscribePath:P,subscribeChange:L,getFreshness:D,isStale:e=>{let t=D(e);return!t||Date.now()>=t.expiresAt},expire:e=>{let t=y.expire(e,Date.now()),n=h?h.expire(e):[];return 0===n.length?t:[...t,...n]},watchFreshness:(e,t)=>{let n="function"==typeof e?void 0:e,r="function"==typeof e?e:t,i=void 0===n?r:e=>{let t=e.path;(t===n||t.startsWith(`${n}.`)||n.startsWith(`${t}.`))&&r(e)},a=y.subscribe(i),o=h?.watchFreshness(i);return()=>{a(),o?.()}},getFreshnessRecords:()=>y.getRecords(),destroy:()=>{A=!0,_(),o.clear(),l.clear(),s.clear(),c.clear(),i?.(),Ne&&h&&h.scopeClaims?.releaseScope(m)},reconnect:()=>{A=!1,h&&(i?.(),i=h.subscribeInvalidate?.(C)),O()},subscribeInvalidate:e=>c.add(e),hydrate:()=>{for(let e of f)e()}};if(t?.middlewares)for(let R of t.middlewares){let e=R(z);e?.beforeChange&&d.push(e.beforeChange),e?.onChange&&L(e.onChange),e?.onError&&p.push(e.onError);let n=e?.hydrate;n&&(t.deferHydrate?f.push(()=>n(z)):n(z))}return Ne&&(z.scopeClaims=(()=>{let e=/* @__PURE__ */new Map,t=/* @__PURE__ */new Map;return{claimDelegatedWrite(n,r){let i=e.get(n);if(void 0!==i){if(i===r)return;if(Me)throw Error(Ue(n));return void console.warn(Ue(n))}e.set(n,r);let a=t.get(r);a?a.add(n):t.set(r,/* @__PURE__ */new Set([n]))},releaseScope(n){let r=t.get(n);if(r){for(let t of r)e.delete(t);t.delete(n)}}}})()),Me&&(z.listeners=o,z.pathListeners=l,z.changeListeners=s,z.interceptors=d,z.errorHandlers=p,z.invalidateListeners=c,z.getMergeCount=T),z}var Ve=Symbol("@plitzi/nexus/ssr-snapshot");function Ge(e){return"object"==typeof e&&!!e&&Ve in e}var Ke,Ye=/* @__PURE__ */new Map,Je=/* @__PURE__ */new Set,Xe=0,Ze=()=>{Ke=void 0;for(let e of Je)e()},Qe=(e,t,n)=>{let r=e;return Ye.set(r,{uid:"dev-store-"+ ++Xe,store:r,scopeId:t,name:n}),Ze(),()=>{Ye.delete(r),Ze()}},et=e=>(Je.add(e),()=>{Je.delete(e)}),tt=()=>(Ke??=[...Ye.values()],Ke),nt=We({runs:[]},{id:"action-runs"}),rt=0,it=e=>nt.setState("runs",e),at=/* @__PURE__ */new Map,ot=e=>{at.get(e)?.()},st=e=>({id:`render-${e.runId}`,actionId:e.actionId,mode:"render",runId:e.runId,status:e.status,steps:e.steps,progress:[],startedAt:e.startedAt,endedAt:e.endedAt,...void 0===e.error?{}:{error:e.error},...void 0===e.elementId?{}:{elementId:e.elementId}}),lt=e=>{let{runs:t}=nt.getState(),n=new Set(t.map(e=>e.runId)),r=e.filter(e=>!n.has(e.runId)).map(st);0!==r.length&&it([...r.reverse(),...t].slice(0,100))},ct=(e,t)=>{let{runs:n}=nt.getState();n.some(t=>t.id===e)&&it(n.map(n=>n.id===e?{...n,...t}:n))},ut=()=>{let e=new Set(nt.getState().runs.filter(e=>e.cancellable).map(e=>e.id));[...at.keys()].forEach(t=>{e.has(t)||at.delete(t)}),it([])},dt=()=>({...T(nt.subscribe,nt.getState,nt.getState),clear:ut}),pt=Symbol.for("@plitzi/nexus.contexts.v1"),ft=(e,t)=>{let n=(e=>(e[pt]??=/* @__PURE__ */new Map,e[pt]))(globalThis),r=n.get(e);if(r)return r;let i=l(t);return i.displayName=e,n.set(e,i),i},ht=ft("DevStoreScopeContext",void 0),mt=ft("StoreContext",void 0),gt=ft("StoreRegistryContext",void 0),yt=(e,t)=>{for(let n=e;n;n=n.parent)if(n.id===t)return n.store},bt=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0};function vt(e,t,n){let r=m(mt),i=m(gt);if(e)return e;if(void 0!==n){let e=yt(i,n);if(!e)throw Error(`${t}: no store registered with id "${n}" in any ancestor StoreProvider`);return e}if(!r)throw Error(`${t} must be used inside a StoreProvider`);return r}var wt=typeof window<"u"?w:g,kt=(e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!Object.is(e[i],t[i]))return!1;return!0};function xt(e,t,n={}){let r=n,i=vt(r.store,"useStoreSync",r.storeId);Array.isArray(e)?function(e,t,n,r){let{mode:i="sync",enabled:a=!0,syncStrategy:o="afterRender",raw:s=!1,ttl:l}=r,c=t.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|"),u=x(!1),d=!u.current;u.current=!0;let p=x(void 0),f=a&&(d||"sync"===i&&n.some((e,t)=>!Object.is(p.current?.[t],e))),h=(r=!0)=>{p.current=n,e.batch(()=>{t.forEach((t,i)=>{let a="function"==typeof t?t(e.getState()):t;e.setState(a,n[i],{canPropagate:r,raw:s,ttl:l})})})};"render"===o?f&&h():(f&&d&&h(!1),wt(()=>{f&&!d&&h()},[f,n,c]))}(i,e,t,n):function(e,t,n,r){let i=void 0===t,a="function"==typeof t,o=i?kt:Object.is,{mode:s="sync",enabled:l=!0,equalityFn:c=o,syncStrategy:u="afterRender",raw:d=!1,ttl:p}=r,f=x(void 0),h=x(!1),m=!h.current;h.current=!0;let g=f.current,y=l&&(m||"sync"===s&&(void 0===g||!c(g,n))),b=(r=!0)=>{if(f.current=n,i)e.setState(void 0,e=>({...e,...n}),{canPropagate:r});else if(a){let i=t(e.getState());e.setState(i,n,{canPropagate:r,raw:d,ttl:p})}else e.setState(t,n,{canPropagate:r,raw:d,ttl:p})};"render"===u?y&&b():(y&&m&&b(!1),wt(()=>{y&&!m&&b()},[y,n,t]))}(i,e,t,n)}var St=We,Tt=ft("StoreMiddlewareContext",void 0),Ct=e=>!0===e.cascade,At=({store:e,id:t,segment:n,isolate:r,path:i,value:a,inherit:o,autoSync:s=!0,middlewares:l,name:c,children:u})=>{let d=m(mt),p=m(Tt),f=m(gt),h=m(ht),y=d?.scopePath??"",b=k(()=>void 0===n?y:y?`${y}/${n}`:n,[y,n]),v=x(void 0),w="live"===o,S=k(()=>{let e="snapshot"===o&&d?d.getState():{},t="function"==typeof a?a(e):{...e,...a};return Ge(t)?function(e){return Ge(e)?{...e}:e}(t):t},[o,d,a]),T=l??[],C=p?[...p,...T]:T,A=k(()=>{let e=T.filter(Ct);return 0===e.length?p:[...p??[],...e]},[p,l]);v.current||=e??St(()=>S,{id:t,scopePath:b,exclusive:w?r:void 0,parent:w?d:void 0,middlewares:C.length>0?C:void 0,deferHydrate:!0});let E=k(()=>t?{id:t,store:v.current,parent:f}:f,[t,f]),_=x(!1);g(()=>{Ne&&t&&!_.current&&yt(f,t)&&(_.current=!0,console.warn(`@plitzi/nexus: duplicate StoreProvider id "${t}" — it shadows an ancestor provider with the same id, so a descendant's { storeId: "${t}" } or useStoreById("${t}") resolves to this (nearer) store. Use a distinct id, or remove one of the providers.`))},[t,f]),g(()=>(w&&!e&&v.current?.reconnect?.(),()=>{w&&!e&&v.current?.destroy?.()}),[w,e]),g(()=>{if(Ne||void 0!==h)return Qe(v.current,h,c)},[h,c]);let O=x(!1);g(()=>{!O.current&&v.current?.hydrate&&(v.current.hydrate(),O.current=!0)},[]),xt(i,i?a:S,{enabled:!!a&&s,store:v.current});let N=/* @__PURE__ */I(mt,{value:v.current,children:u});return E!==f&&(N=/* @__PURE__ */I(gt,{value:E,children:N})),A!==p&&(N=/* @__PURE__ */I(Tt,{value:A,children:N})),N};var Et=Symbol("unset"),It=e=>Array.isArray(e),_t=(e,t,n,r)=>{void 0===t?e.setState(void 0,n,r):"function"==typeof t?e.setState(t(e.getState()),n,r):e.setState(t,n,r)};var Ot=()=>({useStore:function(e,t){return function(e,t={}){let n=vt(t.store,"useStore",t.storeId),r=It(e),i=t.mode??"sync",a=t.enabled??!0,o=t.equalityFn??(r?bt:void 0===e?kt:Object.is),s=x(t.transformer);s.current=t.transformer;let l=x(e);l.current=e;let c=x(Et),u=x(r);u.current!==r&&(u.current=r,c.current=Et);let d=(e=>It(e)?`[${e.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|")}]`:e)(e),p=k(()=>()=>{let e=l.current;if(!a&&c.current!==Et)return c.current;let t=It(e)?((e,t)=>{let n=t.some(e=>"function"==typeof e)?e.getState():void 0;return t.map(t=>"function"==typeof t?oe(n,t(n)):e.getPath(t))})(n,e):((e,t)=>{if("string"==typeof t)return e.getPath(t);if("function"==typeof t){let n=e.getState();return oe(n,t(n))}return e.getState()})(n,e);return c.current!==Et&&("mount"!==i||It(e))&&o(c.current,t)?c.current:(c.current=t,t)},[n,d,a,i,o]),f=k(()=>e=>{let t=l.current;if(!a||"mount"===i)return()=>{};if("string"==typeof t)return n.subscribePath(t,e);if(!It(t)||t.some(e=>"function"==typeof e))return n.subscribe(e);let r=t.map(t=>n.subscribePath(t,e));return()=>r.forEach(e=>e())},[n,d,a,i]),h=T(f,p,p);return[k(()=>s.current?s.current(h):h,[h]),...k(()=>{let e=l.current;return It(e)?e.map((e,t)=>(e,r)=>{let i=l.current;_t(n,i[t],e,r)}):[(e,t)=>_t(n,l.current,e,t)]},[n,d])]}(e,t)},useStoreSync:function(e,t,n){xt(e,t,n)},useStoreGetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r=Array.isArray(e)?e:void 0,i="object"!=typeof e||Array.isArray(e)?t:e,a=vt(i?.store,"useStoreGetter",i?.storeId),o=x(r);o.current=r;let s=r?.map((e,t)=>"function"==typeof e?`fn_${t}`:e).join("|");return k(()=>{if(r)return r.map((e,t)=>(e,n)=>{let i=(o.current??r)[t],s="function"==typeof i?i(a.getState()):oe(a.getState(),i);if(void 0!==e){let t=oe(s,e);return void 0===t&&void 0!==n?n:t}return void 0===s&&void 0!==n?n:s});if(void 0!==n){let e=a.withBase(n);return(t,n)=>void 0===t?void 0===n?e.getState():e.getState(n):void 0===n?e.getPath(t):e.getPath(t,n)}return(e,t)=>{let n=a.getState();if(void 0!==e){let r=oe(n,e);return void 0===r&&void 0!==t?t:r}return n}},[a,n,s])}(e,t)},useStoreSetter:function(e,t){return function(e,t){let n="string"==typeof e?e:void 0,r="object"==typeof e?e:t,i=vt(r?.store,"useStoreSetter",r?.storeId);return k(()=>void 0===n?i.setState:i.withBase(n).setState,[i,n])}(e,t)},useFreshness:function(e,t){return function(e,t={}){let{enabled:n=!0}=t,r=vt(t.store,"useFreshness",t.storeId),i=x(void 0),a=h(t=>n?r.watchFreshness(e,t):()=>{},[r,e,n]),o=h(()=>{let t=(e=>({isStale:!e||Date.now()>=e.expiresAt,updatedAt:e?.updatedAt,expiresAt:e?.expiresAt}))(r.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)},[r,e]);return T(a,o,o)}(e,t)},useOnStale:function(e,t,n){!function(e,t,n={}){let{enabled:r=!0}=n,i=vt(n.store,"useOnStale",n.storeId),a=x(t);g(()=>{a.current=t},[t]),g(()=>{if(r)return i.watchFreshness(e,e=>{("expired"===e.type||"elapsed"===e.type)&&a.current(e)})},[i,e,r])}(e,t,n)}});function Nt(e){return vt(void 0,"useStoreById",e)}var{useStore:Mt,useStoreSync:Pt,useStoreGetter:Lt,useStoreSetter:Dt}=Ot(),{useStore:zt,useStoreSync:Rt,useStoreGetter:jt,useStoreSetter:$t}=Ot(),{useStore:Ft,useStoreSync:qt,useStoreGetter:Bt,useStoreSetter:Ut}=Ot(),Ht=Symbol("twigArrowParams"),Wt=(e,t)=>e===t?0:null==e?-1:null==t?1:"number"==typeof e&&"number"==typeof t?e-t:String(e).localeCompare(String(t)),Vt=e=>void 0===e||"function"==typeof e||"symbol"==typeof e?"null":"bigint"==typeof e?e.toString():JSON.stringify(e),Gt=e=>null==e?"":String(e),Kt=e=>"object"==typeof e&&!!e&&"__PLITZI_RAW__"===e.__marker,Yt=e=>Kt(e)?e.__raw:e,Jt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xt=/* @__PURE__ */new Map,Zt=e=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){let t=Number(e);return Number.isFinite(t)?t:void 0}},Qt=(e,t,n)=>{for(let r of[null==t?"en":Gt(t),"en"])try{return new Intl.NumberFormat(r,n).format(e)}catch{continue}return String(e)},en={raw:e=>(e=>({__raw:e,__marker:"__PLITZI_RAW__"}))(e),to_json:e=>Vt(e),json_encode:e=>Vt(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 n=Number(t[0])||0,r=t.length>1?Gt(t[1]):" ";if(""===r)return e;let i=n-e.length;if(i<=0)return e;let a=Math.ceil(i/r.length);return r.repeat(a).slice(0,i)+e},padRight:(e,t)=>{if("string"!=typeof e)return e;let n=Number(t[0])||0,r=t.length>1?Gt(t[1]):" ";if(""===r)return e;let i=n-e.length;if(i<=0)return e;let a=Math.ceil(i/r.length);return e+r.repeat(a).slice(0,i)},number:(e,t)=>{if("number"==typeof e){let n=Number(t[0])||0;return e.toFixed(n)}if("string"!=typeof e)return e;let n=e.match(/-?\d+(?:\.\d+)?/);return n?Number(n[0]):0},replace:(e,t)=>"string"!=typeof e||0===t.length?e:e.split(Gt(t[0])).join(Gt(t[1])),slice:(e,t)=>{if(0===t.length)return e;let n=Number(t[0])||0,r=t.length>1&&Number.isFinite(Number(t[1]))?n+Number(t[1]):void 0;return"string"==typeof e||Array.isArray(e)?e.slice(n,r):e},split:(e,t)=>"string"==typeof e&&t.length>0?e.split(Gt(t[0])):e,join:(e,t)=>Array.isArray(e)?e.join(0===t.length?"":Gt(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?Gt(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 n=t[0];return"string"==typeof e?e.includes(Gt(n)):!!Array.isArray(e)&&e.includes(n)},startswith:(e,t)=>"string"==typeof e&&t.length>0&&e.startsWith(Gt(t[0])),endswith:(e,t)=>"string"==typeof e&&t.length>0&&e.endsWith(Gt(t[0])),number_format:(e,t)=>{if("number"!=typeof e)return e;let n=Number(t[0])||0,r=null==t[1]?".":Gt(t[1]),i=null==t[2]?"":Gt(t[2]),a=e.toFixed(n);if(""===i)return a.replace(".",r);let o=a.split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,i),o.join(r)},currency:(e,t)=>{let n=Zt(e);if(void 0===n||0===t.length)return e;let r=t[2],i="object"==typeof r&&!!r&&"trimZeros"in r&&!0===r.trimZeros&&Number.isInteger(n);return Qt(n,t[1],{style:"currency",currency:Gt(t[0]),...i?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})},percent:(e,t)=>{let n=Zt(e);if(void 0===n)return e;let r=Number(t[0])||0;return Qt(n,t[1],{style:"percent",minimumFractionDigits:0,maximumFractionDigits:r})},sort:(e,t)=>{if(!Array.isArray(e))return e;let n=[...e],r=t[0];if("function"==typeof r){let e=r;return(e[Ht]??1)>=2?n.sort((t,n)=>Number(e(t,n))):n.sort((t,n)=>Wt(e(t),e(n)))}return n.sort(Wt)},batch:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Number(t[0]);if(n<=0)return e;let r=[];for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},map:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=t[0];return"function"==typeof n?e.map((e,t)=>n(e,t)):e},reduce:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=t[0];if("function"!=typeof n)return e;let r=t[1],i=+(void 0===r),a=void 0===r?e[0]:r;for(let o=i;o<e.length;o++)a=n(a,e[o],o);return a},merge:(e,t)=>{if(0===t.length)return e;let n=t[0];return Array.isArray(e)&&Array.isArray(n)?[...e,...n]:"object"==typeof e&&e&&"object"==typeof n&&n&&!Array.isArray(n)?{...e,...n}: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 n=t[0];if("function"==typeof n)return e.filter((e,t)=>n(e,t));let r=Gt(n);return e.filter(e=>{if("object"==typeof e&&e){let t=e[r];return null!=t&&!1!==t&&""!==t}return!!e})},column:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]);return e.map(e=>"object"==typeof e&&e?e[n]: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,Gt(t)]))).toString():e,nl2br:e=>"string"==typeof e?e.replace(/\n/g,"<br>"):e,striptags:(e,t)=>{if("string"!=typeof e)return e;let n=t.length>0?Gt(t[0]).trim():"";if(n){let t=n.split(/(?:\s*>\s*<\s*|<\s*|>\s*)/).filter(Boolean).map(e=>e.replace(/[/>]/g,"").trim());if(t.length>0){let n=RegExp(`<(?!/?(?:${t.join("|")})\\b)[^>]+>`,"gi");return e.replace(n,"").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 n=Number(t[0])||0,r=null==t[1]?"common":Gt(t[1]),i=10**n;return"ceil"===r?Math.ceil(e*i)/i:"floor"===r?Math.floor(e*i)/i:Math.round(e*i)/i},format:(e,t)=>{if("string"!=typeof e)return e;let n=0;return e.replace(/%((?:[-+ 0]|'.)*)(\d*)(?:\.(\d+))?([sdf%])/g,(e,r,i,a,o)=>{if("%"===o)return"%";let s=t[n];if(n++,void 0===s)return e;let l,c=r.includes("+");if("d"===o){let e=Math.trunc(Number(s));l=`${c&&e>=0?"+":""}${e}`}else if("f"===o){let e=Number(s);l=`${c&&e>=0?"+":""}${void 0===a?String(e):e.toFixed(Number(a))}`}else l=Gt(s),l=void 0===a?l:l.slice(0,Number(a));let u=Number(i||0);if(l.length>=u)return l;let d=/'(.)/.exec(r),p=d?d[1]:r.includes("0")?"0":" ";return r.includes("-")?l.padEnd(u,"0"===p?" ":p):"0"===p&&"s"!==o&&/^[+-]/.test(l)?l[0]+l.slice(1).padStart(u-1,"0"):l.padStart(u,p)})},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 n=Gt(t[0]),r=(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(r.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 n=(e=>{if(!Xt.has(e))try{Xt.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{Xt.set(e,null)}return Xt.get(e)??null})(t);if(!n)return;let r=n.formatToParts(e),i=e=>r.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:Jt.indexOf(i("weekday"))}})(r,t.length>1?Gt(t[1]):"");if(!i)return"";let a=e=>String(e).padStart(2,"0"),o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s={Y:String(i.year),y:a(i.year%100),m:a(i.month),n:String(i.month),d:a(i.day),j:String(i.day),H:a(i.hours),G:String(i.hours),h:a(i.hours%12||12),g:String(i.hours%12||12),A:i.hours<12?"AM":"PM",a:i.hours<12?"am":"pm",i:a(i.minutes),s:a(i.seconds),w:String(i.weekday),N:String(0===i.weekday?7:i.weekday),U:String(Math.floor(r.getTime()/1e3)),l:o[i.weekday],D:o[i.weekday].slice(0,3),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]},l="",c=!1;for(let u of n)c?(l+=u,c=!1):"\\"===u?c=!0:l+=Object.prototype.hasOwnProperty.call(s,u)?s[u]:u;return l},base64_encode:e=>"string"==typeof e?(e=>{let t=(new TextEncoder).encode(e),n="";for(let r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);return btoa(n)})(e):e,base64_decode:e=>"string"==typeof e?(e=>{let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return(new TextDecoder).decode(n)})(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],n=/* @__PURE__ */new Uint32Array(64);for(let h=0;h<64;h++)n[h]=Math.floor(4294967296*Math.abs(Math.sin(h+1)));let r=(new TextEncoder).encode(e),i=8*r.length,a=1+(r.length+8>>6)<<6,o=new Uint8Array(a);o.set(r),o[r.length]=128;let s=new DataView(o.buffer);s.setUint32(a-8,i>>>0,!0),s.setUint32(a-4,Math.floor(i/4294967296)>>>0,!0);let l=1732584193,c=4023233417,u=2562383102,d=271733878,p=(e,t)=>e<<t|e>>>32-t;for(let h=0;h<a;h+=64){let e=/* @__PURE__ */new Uint32Array(16);for(let t=0;t<16;t++)e[t]=s.getUint32(h+4*t,!0);let r=l,i=c,a=u,o=d;for(let s=0;s<64;s++){let l,c;s<16?(l=i&a|~i&o,c=s):s<32?(l=o&i|~o&a,c=(5*s+1)%16):s<48?(l=i^a^o,c=(3*s+5)%16):(l=a^(i|~o),c=7*s%16),l=l+r+n[s]+e[c]|0,r=o,o=a,a=i,i=i+p(l,t[s])|0}l=l+r|0,c=c+i|0,u=u+a|0,d=d+o|0}let f=e=>{let t="";for(let n=0;n<4;n++)t+=(e>>>8*n&255).toString(16).padStart(2,"0");return t};return f(l)+f(c)+f(u)+f(d)})(e):e,without:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let n=t.map(Gt),r={};for(let[i,a]of Object.entries(e))n.includes(i)||(r[i]=a);return r},only:(e,t)=>{if("object"!=typeof e||!e||Array.isArray(e))return e;let n=t.map(Gt),r={};for(let[i,a]of Object.entries(e))n.includes(i)&&(r[i]=a);return r},find:(e,t)=>{if(!Array.isArray(e)||0===t.length)return;let n=t[0];if("function"==typeof n)return e.find((e,t)=>n(e,t));if(t.length<2)return;let r=Gt(n),i=t[1];return e.find(e=>"object"==typeof e&&e?e[r]===i:e===i)},pluck:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]);return e.map(e=>"object"==typeof e&&e?e[n]: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 n=Number(t[0]);if(n<=0)return e;let r=[];for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},index_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]),r={};for(let i of e)"object"==typeof i&&i&&(r[String(i[n]??"")]=i);return r},group_by:(e,t)=>{if(!Array.isArray(e)||0===t.length)return e;let n=Gt(t[0]),r={};for(let i of e)if("object"==typeof i&&i){let e=String(i[n]??"");r[e]=r[e]??[],r[e].push(i)}return r}},tn=(e,t)=>e[t],nn=(e,t)=>{let n=t.indexOf(".");if(-1===n)return e[t];let r=e[t.slice(0,n)],i=n+1,a=t.length;for(;i<a;){if(null==r)return;let e=t.indexOf(".",i);if(-1===e)return r[t.slice(i)];r=r[t.slice(i,e)],i=e+1}return r},rn=e=>null==e?"":"object"==typeof e?JSON.stringify(e):String(e),an=e=>{try{let t=JSON.parse(e);return"number"==typeof t&&String(t)!==e.trim()?e:t||e}catch{return e}},on=e=>{let t={},n=e.variables;for(let r in n)t[r]=n[r];for(let r in e)t[r]=e[r];return t},sn=e=>!(null==e||!1===e||""===e||0===e||Array.isArray(e)&&0===e.length),ln=(e,t)=>"string"==typeof t?t.includes(String(e)):Array.isArray(t)?t.includes(e):!("object"!=typeof t||!t)&&String(e)in t,cn={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)},un=e=>"path"===e.type||"filter"===e.type&&un(e.subject),dn=e=>"path"===e.type?e.segments[0]:"filter"===e.type?dn(e.subject):void 0,pn=[],fn=(e,t,n=!1,r=!1)=>{let i=new mn(t,n,r);return{output:i.evalNodes(e),variables:i.variables,hasSet:i.hasSet}},hn=(e,t)=>new mn(t).evalExpression(e),mn=class e{variables;keepEmptyTokens;jsonStrings;inString=!1;escaping=!1;breakFlag=!1;continueFlag=!1;hasSet=!1;constructor(e,t=!1,n=!1){this.variables={...e},this.keepEmptyTokens=t,this.jsonStrings=n}keeps(e){if("boolean"==typeof this.keepEmptyTokens)return this.keepEmptyTokens;let t=dn(e);return void 0===t||!this.keepEmptyTokens.settled.has(t)}evalNodes(e){let t=e.length;if(0===t)return"";if(1===t)return this.evalNode(e[0]);let n="";for(let r=0;r<t&&(n+=this.evalNode(e[r]),!this.breakFlag&&!this.continueFlag);r++);return n}evalNode(e){switch(e.type){case"text":return this.jsonStrings&&this.followQuotes(e.value),e.value;case"variable":return this.jsonStrings&&this.inString?JSON.stringify(this.evalVariable(e)).slice(1,-1):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.keeps(e.expression)&&((e,t)=>null==t||""===t&&un(e))(e.expression,t)?e.source:Kt(t)?String(Yt(t)):"function"==typeof t?"":null!=t&&"object"!=typeof t?String(t):e.raw?null==t?"":String(t):"object"==typeof t&&t?JSON.stringify(t):""}followQuotes(e){for(let t=0;t<e.length;t++){let n=e[t];this.escaping?this.escaping=!1:this.inString&&"\\"===n?this.escaping=!0:'"'===n&&(this.inString=!this.inString)}}evalIf(e){if(sn(this.evalExpression(e.condition)))return this.evalNodes(e.body);for(let t of e.elseifClauses)if(sn(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&&this.keeps(e.collection))return e.source;let n,r=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;r=Array(a),n=Array(a);for(let e=0;e<a;e++)r[e]=i[e][0],n[e]=i[e][1]}else{let r=(e=>Array.isArray(e)?e:"object"==typeof e&&e?Object.values(e):null)(t);if(!r||0===r.length)return e.elseBody?this.evalNodes(e.elseBody):"";n=r}return this.runLoop(e,n,r)}runLoop(e,t,n){let{valueVar:r,keyVar:i,body:a}=e,o=t.length,s=this.variables.loop,l={index:0,index0:0,first:!1,last:!1,length:o,revindex:0};this.variables.loop=l;let c="";for(let u=0;u<o;u++){if(l.index=u+1,l.index0=u,l.first=0===u,l.last=u===o-1,l.revindex=o-u,null!==n&&null!==i&&(this.variables[i]=n[u]),this.variables[r]=t[u],c+=this.evalNodes(a),this.breakFlag){this.breakFlag=!1;break}this.continueFlag&&=!1}return void 0===s?delete this.variables.loop:this.variables.loop=s,c}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 Kt(t)?String(Yt(t)):"object"==typeof t&&t?JSON.stringify(t):null==t?"":String(t)}applyFilters(e,t){let n=e;for(let r of t){let e=en[r.name];void 0!==e&&(n=e(n,0===r.args.length?pn:this.evalArgs(r.args)))}return n}evalArgs(e){let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=this.evalExpression(e[r]);return n}evalExpression(e){switch(e.type){case"literal":return e.value;case"array":{let t=e.elements,n=Array(t.length);for(let e=0;e<t.length;e++)n[e]=this.evalExpression(t[e]);return n}case"object":{let t={};for(let n of e.entries){let e=this.evalExpression(n.key);t["string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):""]=this.evalExpression(n.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,n=t.length,r="";for(let e=0;e<n;e++){let n=this.evalExpression(t[e]);r+=null==n?"":String(n)}return r}case"unary":return"-"===e.operator?-Number(this.evalExpression(e.operand)):!sn(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":{let t=this.evalExpression(e.condition);return sn(t)?e.trueExpr?this.evalExpression(e.trueExpr):t:this.evalExpression(e.falseExpr)}case"arrow":return this.createArrowFunction(e.params,e.body)}}createArrowFunction(t,n){let r={...this.variables},i=this.keepEmptyTokens,a=(...a)=>{let o=new e(r,i);for(let e=0;e<t.length;e++)o.variables[t[e]]=a[e];return o.evalExpression(n)};return a[Ht]=t.length,a}resolvePath(e){let t=e.length;if(0===t)return;let n=this.variables[e[0]];for(let r=1;r<t;r++){if(null==n)return;n=n[e[r]]}return n}resolveIndex(e,t){let n=this.evalExpression(e);if(null==n)return;let r=this.evalExpression(t);return null!=r?n[String(r)]:void 0}evalRange(e,t){let n=Number(this.evalExpression(e)),r=Number(this.evalExpression(t)),i=n<=r,a=1+(i?r-n:n-r),o=Array(a);for(let s=0;s<a;s++)o[s]=i?n+s:n-s;return o}evalFunction(e,t){let n=this.evalArgs(t);switch(e){case"cycle":{let e=n[0],t=n[1];return Array.isArray(e)&&"number"==typeof t?e[t%e.length]:""}case"max":return this.minMax(n,Math.max);case"min":return this.minMax(n,Math.min);case"range":return this.rangeFunction(n);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]),n=Array(t+1);for(let e=0;e<=t;e++)n[e]=e;return n}let t=Number(e[0]),n=Number(e[1]),r=e.length>2?Number(e[2]):t<=n?1:-1;if(0===r)return[];let i=Math.floor((r>0?n-t:t-n)/Math.abs(r))+1;if(i<=0)return[];let a=Array(i);for(let o=0;o<i;o++)a[o]=t+o*r;return a}evalBinary(e,t,n){let r=(e=>"path"===e.type&&1===e.segments.length?e.segments[0]:"literal"===e.type&&null===e.value?"null":void 0)(n);if(("is"===e||"is not"===e)&&void 0!==r){let n=cn[r];if(n){let r=n(this.evalExpression(t));return"is"===e?r:!r}}if("or"===e)return sn(this.evalExpression(t))||sn(this.evalExpression(n));if("and"===e)return sn(this.evalExpression(t))&&sn(this.evalExpression(n));let i=this.evalExpression(t),a=this.evalExpression(n),o="number"==typeof i&&"number"==typeof a;switch(e){case"+":return o?i+a:Number(i)+Number(a);case"-":return o?i-a:Number(i)-Number(a);case"*":return o?i*a:Number(i)*Number(a);case"/":return o?i/a:Number(i)/Number(a);case"//":return Math.floor(Number(i)/Number(a));case"**":return Number(i)**Number(a);case"starts with":return"string"==typeof i&&i.startsWith(rn(a));case"ends with":return"string"==typeof i&&i.endsWith(rn(a));case"%":return o?i%a:Number(i)%Number(a);case"==":return i===a||String(i)===String(a);case"!=":return i!==a&&String(i)!==String(a);case">":return o?i>a:Number(i)>Number(a);case"<":return o?i<a:Number(i)<Number(a);case">=":return o?i>=a:Number(i)>=Number(a);case"<=":return o?i<=a:Number(i)<=Number(a);case"in":return ln(i,a);case"not in":return!ln(i,a);case"same as":case"is":return i===a;case"divisible by":{let e=Number(a);return 0!==e&&Number.isFinite(e)&&Number(i)%e===0}case"is not":return i!==a;default:return!1}}},gn=41,yn=42,bn=45,vn=e=>e>=97&&e<=122||e>=65&&e<=90||95===e,wn=e=>vn(e)||e>=48&&e<=57,kn=e=>wn(e)||e===bn,xn=e=>e>=48&&e<=57,Sn=e=>32===e||9===e||10===e||13===e,Tn=e=>{let t=e.length;if(0===t||!vn(e.charCodeAt(0)))return!1;for(let n=1;n<t;n++)if(!wn(e.charCodeAt(n)))return!1;return!0},Cn=e=>{let t=e.length;if(0===t||!vn(e.charCodeAt(0)))return!1;let n=!1,r=!1;for(let i=1;i<t;i++){let t=e.charCodeAt(i);if(46!==t){if(n){if(r=xn(t),!r&&!vn(t))return!1;n=!1}else if(r?!xn(t):!wn(t))return!1}else{if(n)return!1;n=!0,r=!1}}return!n},An=e=>Tn(e),En=(e,t)=>t?`{{{${e}}}}`:`{{${e}}}`,In=e=>{switch(e.type){case"text":return e.value;case"variable":return En(e.content,e.raw);case"tag":return`{%${e.content}%}`}},_n=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&&Sn(this.src.charCodeAt(this.pos));)this.pos++}scanName(){let e=this.pos;if(!this.eof()&&vn(this.src.charCodeAt(this.pos)))for(this.pos++;!this.eof()&&kn(this.src.charCodeAt(this.pos));)this.pos++;return this.src.slice(e,this.pos)}scanIndex(){let e=this.pos;for(;!this.eof()&&xn(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 n=this.src.charCodeAt(this.pos);t+=110===n?"\n":116===n?"\t":114===n?"\r":92===n?"\\":n===e?String.fromCharCode(n):String.fromCharCode(92)+String.fromCharCode(n),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(this.src.charCodeAt(this.pos)===bn&&this.pos++;this.pos<this.src.length&&xn(this.src.charCodeAt(this.pos));)this.pos++;if(46===this.src.charCodeAt(this.pos))for(this.pos++;this.pos<this.src.length&&xn(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 n=0;n<e.length;n++)if(this.src.charCodeAt(this.pos+n)!==e.charCodeAt(n))return!1;return!(t<this.src.length&&wn(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}},On=(e,t)=>{let n=new Mn(e,t),r=n.parseTernary();return n.expectEnd(),r},Nn=["same as","divisible by"],Mn=class extends _n{issues;constructor(e,t){super(e),this.issues=t}report(e){this.issues?.push(e)}expectEnd(){this.skipWs(),this.eof()||this.report(`Unexpected "${this.src.slice(this.pos).trim()}" in "${this.src.trim()}"`)}expectChar(e,t){this.skipWs(),this.peek()!==e?this.report(`Missing ${t} in "${this.src.trim()}"`):this.pos++}parseTernary(){let e=this.parseOr();if(this.skipWs(),63!==this.peek())return e;if(this.pos++,this.skipWs(),58===this.peek())return this.pos++,this.skipWs(),{type:"ternary",condition:e,trueExpr:null,falseExpr:this.parseTernary()};let t=this.parseOr();return this.skipWs(),58===this.peek()?(this.pos++,this.skipWs(),{type:"ternary",condition:e,trueExpr:t,falseExpr:this.parseTernary()}):{type:"ternary",condition:e,trueExpr:t,falseExpr:{type:"literal",value:""}}}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();let t=this.matchKeyword("not");this.skipWs();let n=this.matchWordedTest();if(n){let r={type:"binary",operator:n,left:e,right:this.parseConcat()};e=t?{type:"unary",operator:"not",operand:r}:r,this.skipWs();continue}e={type:"binary",operator:t?"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:On(t,this.issues)}}if(this.matchKeyword("in")){e={type:"binary",operator:"in",left:e,right:this.parseConcat()},this.skipWs();continue}let t=this.matchAffixTest();if(t){e={type:"binary",operator:t,left:e,right:this.parseConcat()},this.skipWs();continue}if(this.matchKeyword("matches")){this.report("`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`."),e={type:"binary",operator:"matches",left:e,right:this.parseConcat()},this.skipWs();continue}let n=this.matchBinaryOp();if(!n)break;e={type:"binary",operator:n,left:e,right:this.parseConcat()},this.skipWs()}return e}matchWordedTest(){let e=this.pos;for(let t of Nn){let[n,r]=t.split(" ");if(this.matchKeyword(n)){if(this.skipWs(),this.matchKeyword(r))return t;this.pos=e}}return null}matchAffixTest(){let e=this.pos;for(let t of["starts","ends"])if(this.matchKeyword(t)){if(this.matchKeyword("with"))return"starts"===t?"starts with":"ends with";this.pos=e}return null}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||t===bn;t=this.peek())this.pos++,e={type:"binary",operator:43===t?"+":"-",left:e,right:this.parseMultiplicative()},this.skipWs();return e}parseMultiplicative(){let e=this.parsePower();this.skipWs();for(let t=this.peek();!(t!==yn&&47!==t&&37!==t||t===yn&&this.at(1)===yn);t=this.peek()){let n=47===t&&47===this.at(1);this.pos+=n?2:1,e={type:"binary",operator:n?"//":t===yn?"*":47===t?"/":"%",left:e,right:this.parsePower()},this.skipWs()}return e}parsePower(){let e=this.parseDefault();return this.skipWs(),this.peek()!==yn||this.at(1)!==yn?e:(this.pos+=2,{type:"binary",operator:"**",left:e,right:this.parsePower()})}parseSignedAtom(){return this.peek()===bn&&xn(this.at(1))?this.maybeTrailingFilters({type:"literal",value:this.scanNumber()}):this.peek()===bn?(this.pos++,this.skipWs(),{type:"unary",operator:"-",operand:this.parseSignedAtom()}):this.parseAtom()}parseDefault(){if(this.skipWs(),this.peek()===bn&&xn(this.at(1)))return this.maybeTrailingFilters({type:"literal",value:this.scanNumber()});if(this.peek()===bn)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.parseSignedAtom()},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 n=this.parseTernary();return this.expectChar(gn,'a closing ")"'),this.maybeTrailingFilters(this.parseAccessChain(n,null))}if(39===e||34===e)return this.maybeTrailingFilters({type:"literal",value:this.scanStringLiteral()});if(xn(e))return this.maybeTrailingFilters({type:"literal",value:this.scanNumber()});if(91===e){this.pos++;let e={type:"array",elements:this.parseArgList(93)};return this.maybeTrailingFilters(this.parseAccessChain(e,null))}return 123===e?(this.pos++,this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(),null))):this.parsePathOrFunctionOrArrow()}tryParseArrowParams(){let e=this.pos,t=[];for(this.skipWs();this.peek()!==gn;){let n=this.scanName();if(!n)return this.pos=e,null;if(t.push(n),this.skipWs(),44!==this.peek())break;this.pos++,this.skipWs()}return this.skipWs(),this.peek()===gn&&(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.report(this.eof()?`Missing a value at the end of "${this.src.trim()}"`:`Unexpected "${this.src.slice(this.pos).trim()}" in "${this.src.trim()}"`),this.pos++,{type:"literal",value:""};if("true"===e||"false"===e)return this.maybeTrailingFilters({type:"literal",value:"true"===e});if("null"===e||"none"===e)return this.maybeTrailingFilters({type:"literal",value:null});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(gn);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 n=e,r=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}r?r.push(t):n={type:"index",object:n,index:{type:"literal",value:t}};continue}if(91!==e)break;this.pos++;let t=this.parseTernary();this.expectChar(93,'a closing "]"'),!r||"literal"!==t.type||"string"!=typeof t.value&&"number"!=typeof t.value?(r&&=(n={type:"path",segments:r},null),n={type:"index",object:n,index:t}):r.push(String(t.value))}return r?{type:"path",segments:r}:n}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 this.expectChar(125,'a closing "}"'),{type:"object",entries:e}}parseObjectKey(){let e=this.peek();if(39===e||34===e)return{type:"literal",value:this.scanStringLiteral()};if(xn(e))return{type:"literal",value:this.scanNumber()};if(40===e){this.pos++,this.skipWs();let e=this.parseTernary();return this.skipWs(),this.peek()===gn&&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.expectChar(e,e===gn?'a closing ")"':'a closing "]"'),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 e||this.report(`A "|" with no filter name after it in "${this.src.trim()}"`),this.skipWs(),40===this.peek()?(this.pos++,{name:e,args:this.parseArgList(gn)}):{name:e,args:[]}}},Pn=e=>{let t=0;for(;t<e.length&&!Sn(e.charCodeAt(t));)t++;return e.slice(0,t)},Ln=(e,t=!1,n)=>{let r=new zn(e,t,n),i=r.parseBody();if(!r.error){let e=r.peek();if(e&&"tag"===e.type){let t=Pn(e.content.trim());Dn.has(t)&&(r.error=`Orphan closing tag: {% ${t} %} without matching opening tag`)}}return{nodes:i,error:r.error}},Dn=/* @__PURE__ */new Set(["endif","endfor","endset","endapply","else","elseif"]),zn=class{tokens;keepEmptyTokens;issues;pos=0;error=null;constructor(e,t=!1,n){this.tokens=e,this.keepEmptyTokens=t,this.issues=n}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 n=t.content.trim();return n===e||n.startsWith(e+" ")||n.startsWith(e+"\t")}parseBody(){let e=[];for(;this.pos<this.tokens.length;){let t=this.peek();if(!t||"tag"===t.type&&Dn.has(Pn(t.content.trim())))break;let n=this.parseNode();n&&e.push(n)}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(),n=this.keepEmptyTokens?En(e.content,e.raw):"";if(Tn(t))return{type:"variable",raw:e.raw,expression:{type:"path",segments:[t]},source:n};let r=On(t,this.issues);return{type:"variable",raw:e.raw,expression:r,source:n}}parseTag(){let e=this.peek();if(!e||"tag"!==e.type)return null;let t=e.content.trim(),n=Pn(t);switch(n){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.issues?.push(`Unknown tag {% ${n} %}: the tags are if, for, set, apply, break and continue`),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(),n=-1===t.indexOf(" ")?"":t.slice(t.indexOf(" ")+1).trim();if(!n)return this.error="Malformed {% if %} tag: missing condition",{type:"if",condition:{type:"literal",value:!1},body:[],elseifClauses:[],elseBody:null};let r=On(n,this.issues),i=this.parseBody(),a=[],o=null,s=!1;for(;this.peek();){let e=this.peek();if(!e||"tag"!==e.type)break;let t=Pn(e.content.trim());if("elseif"===t){this.advance();let t=e.content.trim(),n=t.slice(t.indexOf(" ")+1).trim(),r=On(n,this.issues),i=this.parseBody();a.push({condition:r,body:i})}else{if("else"!==t){if("endif"===t){this.advance(),s=!0;break}break}this.advance(),o=this.parseBody()}}return s||(this.error="Malformed {% if %} block: missing {% endif %}"),{type:"if",condition:r,body:i,elseifClauses:a,elseBody:o}}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 n=t.content.trim(),r=n.slice(n.indexOf(" ")+1).trim(),i=/\sin\s/.exec(r);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=r.slice(0,i.index).trim(),o=r.slice(i.index+i[0].length).trim(),s=(e=>{let t=0;for(let n=0;n+1<e.length;n++){let r=e.charCodeAt(n);if(0!==t)r===t&&(t=0);else if(39===r||34===r)t=r;else if(46===r&&46===e.charCodeAt(n+1))return[e.slice(0,n).trim(),e.slice(n+2).trim()]}return null})(o),l=s?{type:"range",start:On(s[0],this.issues),end:On(s[1],this.issues)}:On(o,this.issues),c=a.indexOf(","),u=-1===c?null:a.slice(0,c).trim(),d=-1===c?a:a.slice(c+1).trim();if(!An(d))return this.error=`Invalid {% for %} variable name: "${d}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};if(null!==u&&!An(u))return this.error=`Invalid {% for %} key variable name: "${u}"`,{type:"for",valueVar:"_item",keyVar:null,collection:{type:"literal",value:""},body:[],elseBody:null};let p=this.parseBody(),f=null;if(this.peek()){let e=this.peek();e&&"tag"===e.type&&"else"===Pn(e.content.trim())&&(this.advance(),f=this.parseBody())}let h=this.peek();return h&&"tag"===h.type&&"endfor"===Pn(h.content.trim())?this.advance():this.error="Malformed {% for %} block: missing {% endfor %}",{type:"for",valueVar:d,keyVar:u,collection:l,body:p,elseBody:f,source:this.keepEmptyTokens?this.reconstructRange(e,this.pos):void 0}}reconstructRange(e,t){let n="";for(let r=e;r<t;r++)n+=In(this.tokens[r]);return n}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(),n=t.slice(t.indexOf(" ")+1).trim(),r=n.indexOf("=");if(-1===r){let e=n.trim(),t=this.parseBody(),r=this.peek();return r&&"tag"===r.type&&this.advance(),{type:"set",name:e,value:t}}let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();return{type:"set",name:i,value:On(a,this.issues)}}parseApply(){this.advance();let e=this.tokens[this.pos-1];if("tag"!==e.type)return{type:"apply",filters:[],body:[]};let t=e.content.trim(),n=((e,t)=>{let n=new Mn(e,t),r=n.parseApplyChain();return n.expectEnd(),r})(t.slice(t.indexOf(" ")+1).trim(),this.issues),r=this.parseBody(),i=this.peek();return i&&"tag"===i.type&&this.advance(),{type:"apply",filters:n,body:r}}},Rn=/* @__PURE__ */new Map,jn={hits:0,misses:0},$n=e=>{let t=Rn.get(e);if(t)return jn.hits++,t;jn.misses++;let n=(e=>{let t=(e=>{let t=[],n=0;for(;n<e.length;){let r,i,a=e.indexOf("{{",n),o=e.indexOf("{%",n);if(-1===a&&-1===o)break;if(-1===a?(r=o,i=!0):-1===o||a<o?(r=a,i=!1):(r=o,i=!0),r>n&&t.push({type:"text",value:e.slice(n,r)}),i||123!==e.charCodeAt(r+2))if(i){let i=e.indexOf("%}",r+2);if(-1===i)return{tokens:t,error:"Unclosed tag"};t.push({type:"tag",content:e.slice(r+2,i)}),n=i+2}else{let i=e.indexOf("}}",r+2);if(-1===i)return{tokens:t,error:"Unclosed double-brace token"};t.push({type:"variable",content:e.slice(r+2,i),raw:!1}),n=i+2}else{let i=e.indexOf("}}}",r+3);if(-1===i)return{tokens:t,error:"Unclosed triple-brace token"};t.push({type:"variable",content:e.slice(r+3,i),raw:!0}),n=i+3}}return n<e.length&&t.push({type:"text",value:e.slice(n)}),{tokens:t,error:null}})(e);if(t.error)return null;let n=t.tokens,{hasTags:r,allSimpleOrDotted:i}=(e=>{let t=!1,n=!0;for(let r=0;r<e.length;r++){let i=e[r];if("tag"===i.type){t=!0;break}if("variable"===i.type&&!Cn(i.content.trim())){n=!1;break}}return{hasTags:t,allSimpleOrDotted:n}})(n),a=null,o=null;if(r||!i){let e=Ln(n,!1);if(e.error)return null;a=e.nodes;let t=Ln(n,!0);t.error||(o=t.nodes)}else{let e=Ln(n,!0);e.error||(o=e.nodes)}return{tokens:n,hasTags:r,allSimpleOrDotted:i,nodes:a,nodesWithSource:o}})(e);return n?((()=>{if(Rn.size>=1024){let e=Rn.keys().next().value;void 0!==e&&Rn.delete(e)}})(),Rn.set(e,n),n):null},Fn=(e,t={},n=!1,r=!1)=>{if("string"!=typeof e)return e;try{if(-1===e.indexOf("{%")&&-1===e.indexOf("{{"))return e;let i="variables"in t?on(t):t,a=$n(e);if(!a)return e;if(!1===n&&!a.hasTags&&a.allSimpleOrDotted){let e=((e,t)=>{let n="";for(let r of e.tokens)if("text"===r.type)n+=r.value;else if("variable"===r.type){let e=r.content.trim(),i=-1===r.content.indexOf(".")?tn(t,e):nn(t,e);n+=r.raw?null==i?"":String(i):rn(i)}return n})(a,i);return r?an(e):e}let o=((e,t)=>t?e.nodesWithSource:e.nodes)(a,!1!==n);if(!o)return e;let{output:s,variables:l,hasSet:c}=fn(o,i,n);return c&&Object.assign(t,l),!1!==n&&s===e?e:r?an(s):s}catch{return e}},qn=(e,t={})=>{if("string"!=typeof e)return e;let n=$n(e),r=(n?n.nodes??n.nodesWithSource:null)?.filter(e=>"text"!==e.type||""!==e.value.trim());if(1!==r?.length||"variable"!==r[0].type)return Fn(e,t);try{let e="variables"in t?on(t):t;return hn(r[0].expression,e)}catch{return e}},Bn=/* @__PURE__ */new Set(["json_encode","to_json","object_as_json"]),Un=(e,t={})=>{if("string"!=typeof e)return e;let n=$n(e),r=(n?n.nodes??n.nodesWithSource:null)?.filter(e=>"text"!==e.type||""!==e.value.trim());if(1!==r?.length||"variable"!==r[0].type){let n=e.includes('"')?((e,t)=>{let n=$n(e),r=n?n.nodes??n.nodesWithSource:null;if(r)try{let e="variables"in t?on(t):t,{output:n,variables:i,hasSet:a}=fn(r,e,!1,!0);if(!(e=>{let t=e.trimStart();return t.startsWith("{")||t.startsWith("[")})(n))return;let o=JSON.parse(n);return a&&Object.assign(t,i),o}catch{return}})(e,t):void 0;if(void 0!==n)return n;let r=Fn(e,t);return"string"==typeof r?(e=>{let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return e;try{return JSON.parse(t)}catch{return e}})(r):r}let{expression:i}=r[0];try{let e="variables"in t?on(t):t,n=hn(i,e);if(void 0===n)return"";if("string"==typeof n&&(e=>"filter"===e.type&&Bn.has(e.filters[e.filters.length-1]?.name??""))(i))try{return JSON.parse(n)}catch{return n}return n}catch{return e}},Hn="[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*",Wn=`(?:${Hn}|\\d+)`,Vn=`\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${Hn}(?:\\.${Wn})*)\\s*\\]`,Gn=`${Hn}(?:${Vn})*(?:\\??\\.${Wn}(?:${Vn})*)*(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`,Kn=`(?:\\{\\{\\{\\s*${Gn}\\s*\\}\\}\\}|\\{\\{\\s*${Gn}\\s*\\}\\})`,Yn=new RegExp(Kn,"g"),Jn=RegExp(`^${Kn}$`),Xn=(e,t=!1)=>{if("string"!=typeof e)return!1;let n=t?Jn:Yn;return n.lastIndex=0,n.test(e.trim())},Zn=(e,t)=>{if(Array.isArray(e))for(let n of e)Zn(n,t);else if("object"==typeof e&&e){if("type"in e&&"path"===e.type&&"segments"in e&&Array.isArray(e.segments)){let n=e.segments.filter(e=>"string"==typeof e);return void(n.length>0&&t.add(n.join(".")))}for(let n of Object.values(e))Zn(n,t)}},Qn=e=>{let t=$n(e);if(!t)return[];let n=/* @__PURE__ */new Set;return Zn(t.nodes??t.nodesWithSource,n),[...n]},er=e=>"object"==typeof e&&!!e&&!Array.isArray(e),tr=({source:e,transformers:t,when:n})=>{let r=e?[e]:[];for(let{action:i,params:a}of t??[])"twigTemplate"===i&&"string"==typeof a.template&&a.template&&r.push(...Qn(a.template).filter(e=>"source"!==e&&!e.startsWith("source.")));return n&&r.push(...nr(n)),r},nr=e=>e.rules.flatMap(e=>"rules"in e?nr(e):[e.field,...e.isBinding&&"string"==typeof e.value?[e.value]:[]]);function rr(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 ir(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 n,r=[],i=/([^.[\]]+)|\[(\d+)\]/g;for(;n=i.exec(e);)if(n[1]){if(!t&&""===n[1])continue;let e=rr(n[1]);if(null!==e)r.push(e);else if(t)return[]}else if(n[2]){let e=rr(n[2]);if(null!==e)r.push(e);else if(t)return[]}return r.length?r:[]}(e,t):Array.isArray(e)?function(e,t){if(!Array.isArray(e))return[];let n=[];for(let r of e){let e=rr(r);if(null!==e)n.push(e);else if(t)return[]}return n}(e,t):[]:[]}function ar(e,t,n){if(null==e||!t)return n;let r=ir(t);if(!r.length)return n;let i=e;for(let a of r){if("object"!=typeof i||!i)return n;i=Array.isArray(i)?i[Number(a)]:i[a]}return void 0===i?n:i}function or(e,t,n){let r=ir(t);if(!r.length)return e;let i=e;for(let o=0;o<r.length-1;o++){let t=r[o],n=r[o+1];if("object"!=typeof i||!i)return e;let a=i;(null==a[t]||"object"!=typeof a[t])&&(a[t]=/^\d+$/.test(n)?[]:{}),i=a[t]}let a=r[r.length-1];return"object"==typeof i&&i&&(i[a]=n),e}function sr(e,t){let n={},r=Array.isArray(t)?t:[t];for(let i of r){let t=ar(e,i);void 0!==t&&or(n,i,t)}return n}function lr(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 n=/* @__PURE__ */new Map;return t.set(e,n),e.forEach((e,r)=>n.set(r,lr(e,t))),n}if(e instanceof Set){let n=/* @__PURE__ */new Set;return t.set(e,n),e.forEach(e=>n.add(lr(e,t))),n}if(ArrayBuffer.isView(e)){if(e instanceof DataView){let n=new DataView(lr(e.buffer,t),e.byteOffset,e.byteLength);return t.set(e,n),n}let n=new(0,e.constructor)(e.buffer.slice(0),e.byteOffset,e.length);return t.set(e,n),n}if(e instanceof ArrayBuffer){let n=e.slice(0);return t.set(e,n),n}if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach((e,r)=>n[r]=lr(e,t)),n}let n=Object.getPrototypeOf(e),r=Object.create(n);t.set(e,r);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=lr(e[i],t));return r}var cr=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),e);function ur(e,t){let n=ir(t),r=Array.isArray(e)?[...e]:cr(e);if(!n.length)return r;let i=e,a=r;for(let o=0;o<n.length;o++){let e=n[o],t=i?.[e];if(!t||"object"!=typeof t){a[e]=t;break}let r=Array.isArray(t)?[...t]:cr(t);a[e]=r,i=t,a=r}return r}function dr(e,t){if(null===e)return!1;let n=ir(t),r=e;for(let i of n){if(null==r||!(i in r))return!1;r=r[i]}return!0}function pr(e,t){let n=Array.isArray(t)?t:t?[t]:[];if(0===n.length)return{...e};let r=[],i=[];for(let o of n){let e=ir(o);0!==e.length&&(1===e.length?r.push(e[0]):i.push(o))}let a=e;if(r.length){let e;for(let t of r)Object.prototype.hasOwnProperty.call(a,t)&&(e??=cr(a),delete e[t]);e&&(a=e)}for(let o of i){let e=ir(o);if(!dr(a,o))continue;let t=ur(a,o),n=t;for(let r=0;r<e.length-1&&n&&"object"==typeof n;r++)n=n[e[r]];if(n&&"object"==typeof n){let t=e[e.length-1];Object.prototype.hasOwnProperty.call(n,t)&&delete n[t]}a=t}return a}function fr(e,t=0,n={}){let r,i,a,o,s,l=0,c=n.leading??!1,u=n.trailing??!0,d=n.maxWait,p=()=>Date.now();function f(t){if(!r)return a;l=t;let n=r,o=i;return r=void 0,i=void 0,a=e.apply(o,n),a}function h(e){o=setTimeout(g,e)}function m(e){if(void 0===s)return!0;let n=e-s;return n>=t||n<0||void 0!==d&&e-l>=d}function g(){let e=p();if(m(e))return b(e);h(function(e){let n=e-l,r=t-(e-(s??0));return void 0===d?r:Math.min(r,d-n)}(e))}function y(e){return l=e,h(t),c?f(e):a}function b(e){return o=void 0,u&&r?f(e):(r=i=void 0,a)}function v(...e){let n=p(),l=m(n);if(r=e,i=this,s=n,l){if(!o)return y(n);if(void 0!==d)return clearTimeout(o),h(t),f(n)}return o||h(t),a}return v.cancel=()=>{void 0!==o&&clearTimeout(o),l=0,r=s=i=o=void 0},v.flush=()=>void 0===o?a:b(p()),v.pending=()=>void 0!==o,v}function hr(e,t=0,n={}){return fr(e,t,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:t})}var mr=/* @__PURE__ */$({cva:()=>br,cx:()=>yr}),gr=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,yr=U,br=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return yr(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const o=gr(t)||gr(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return yr(e,o,l,null==n?void 0:n.class,null==n?void 0:n.className)},{cva:vr}=mr,wr=(Math.pow(10,8),6048e5),kr=36e5,xr=Symbol.for("constructDateFrom");function Sr(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xr in e?e[xr](t):e instanceof Date?new e.constructor(t):new Date(t)}function Tr(e,t){return Sr(t||e,e)}function Cr(e,t){const n=()=>Sr(t?.in,NaN),r=t?.additionalDigits??2,i=function(e){const t={},n=e.split(Ar.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ar.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ar.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const e=Ar.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let a;if(i.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?i:100*a,restDateString:e.slice((r[1]||r[2]).length)}}(i.date,r);a=function(e,t){if(null===t)/* @__PURE__ */return new Date(NaN);const n=e.match(Er);if(!n)/* @__PURE__ */return new Date(NaN);const r=!!n[4],i=Or(n[1]),a=Or(n[2])-1,o=Or(n[3]),s=Or(n[4]),l=Or(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=/* @__PURE__ */new Date(0);r.setUTCFullYear(e,0,4);const i=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}(t,s,l):/* @__PURE__ */new Date(NaN);{const e=/* @__PURE__ */new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Mr[t]||(Pr(e)?29:28))}(t,a,o)&&function(e,t){return t>=1&&t<=(Pr(e)?366:365)}(t,i)?(e.setUTCFullYear(t,a,Math.max(i,o)),e):/* @__PURE__ */new Date(NaN)}}(e.restDateString,e.year)}if(!a||isNaN(+a))return n();const o=+a;let s,l=0;if(i.time&&(l=function(e){const t=e.match(Ir);if(!t)return NaN;const n=Nr(t[1]),r=Nr(t[2]),i=Nr(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i)?n*kr+6e4*r+1e3*i:NaN}(i.time),isNaN(l)))return n();if(!i.timezone){const e=new Date(o+l),n=Tr(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return s=function(e){if("Z"===e)return 0;const t=e.match(_r);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(r*kr+6e4*i):NaN}(i.timezone),isNaN(s)?n():Tr(o+l+s,t?.in)}var Ar={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Er=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ir=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_r=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Or(e){return e?parseInt(e):1}function Nr(e){return e&&parseFloat(e.replace(",","."))||0}var Mr=[31,null,31,30,31,30,31,31,30,31,30,31];function Pr(e){return e%400==0||e%4==0&&e%100!=0}var Lr=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Cr(e):e,Math.floor((n=t,+Tr(n)/1e3)).toString();var n},Dr=e=>{if("string"!=typeof e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let[t,n,r]=e.split("-").map(Number),i=/* @__PURE__ */new Date(0);return i.setFullYear(t,n-1,r),i.getFullYear()===t&&i.getMonth()===n-1&&i.getDate()===r},zr={},Rr=/* @__PURE__ */new Map,jr=W("ComponentContext",{}),$r={};Object.freeze($r);var Fr,qr=(e,t="",n=".",r=!1)=>e&&"object"==typeof e?Object.keys(e).reduce((i,a)=>{a=a.replaceAll(n,"").replaceAll(".","");let o=`${t}${t?n:""}${a}`;return"object"!=typeof e[a]||Array.isArray(e[a])&&(r||e[a].length>5)?[...i,o]:[...i,o,...qr(e[a],o,n,r)]},[]):[],Br=({url:e="",type:t,internalProps:n,autoRegister:r=!0,plitziJsxSkipHOC:i=!1,plitziJsxProps:a=$r})=>{let{register:s}=f(jr),[l,c]=S(!1);g(()=>c(!0),[]);let u=k(()=>d(((e,t,n=!0,r=!1,i)=>async()=>{if(!Rr.get(e)){let t=(async e=>{try{let t=await fetch(e),n=new Blob([await t.text()],{type:"text/javascript"});return await(import(
18
18
  /* @vite-ignore */
19
19
  /* webpackIgnore: true */
20
- URL.createObjectURL(n)))}catch(e){return void console.error(e)}})(e).finally(()=>{Rr.delete(e)});Rr.set(e,{promise:t,timestamp:Date.now()})}let a=await(Rr.get(e)?.promise),[{default:o},{default:s},{nestedInject:l}]=await Promise.all([Promise.resolve().then(()=>sd),Promise.resolve().then(()=>KT),Promise.resolve().then(()=>q_)]);if(!a)return{default:s};let{type:c,pluginSettings:u}=ar(a,"default",{}),{version:d,initialItems:p,plugins:f}=a;if(!c)return{default:s};let h=a.default;return r||(h=o(a.default)),h.version=d,h.origin="remote",h.type=c,h.initialItems=p,h.pluginSettings=u,h.plugins=l(f,"remote"),n&&t(h),i&&i!==c?{default:(r?f?.[i]:h.plugins[i])??s}:{default:h}})(e,s,r,i,t)),[e,t]);return l?/* @__PURE__ */I(o,i?{children:/* @__PURE__ */I(u,{internalProps:n,plitziJsxSkipHOC:i,...a})}:{children:/* @__PURE__ */I(u,{internalProps:n})}):null},Ur=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=ar(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??ar(r,"0.params.src","")}},Hr=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:a})=>{let o={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */I(i.notFound,{internalProps:o},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return I(l,{internalProps:o,extraProps:l.extraProps},e);let c=Ur({type:n,plugins:a});return c?/* @__PURE__ */I(Br,{url:c.url,type:n,internalProps:o},e):s},Wr=W("LayoutBodyContext",void 0),Vr=()=>{},Gr=({bodies:e,children:t})=>{let[n]=S(()=>({current:e,listeners:/* @__PURE__ */new Set}));return w(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */I(Wr,{value:n,children:t})},Kr=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Yr=({id:e,children:t})=>{let[n]=S(()=>{if(typeof document>"u")return null;let t=document.querySelector(`[data-rsc-id="${e}"]`);if(!t)return null;let n={};for(let e=0;e<t.attributes.length;e++){let{name:r,value:i}=t.attributes[e];"class"!==r&&"style"!==r&&"data-rsc-id"!==r&&(n[r]=i)}let r=t.getAttribute("style");return{tag:t.tagName.toLowerCase(),className:t.className,style:r?Kr(r):void 0,attrs:n,html:t.innerHTML}});return n?c(n.tag,{"data-rsc-id":e,className:n.className||void 0,style:n.style,...n.attrs,dangerouslySetInnerHTML:{__html:n.html}}):t},Jr=/* @__PURE__ */new Set,Xr=async e=>(await Promise.all([...Jr].map(async t=>t(e)))).some(e=>!0===e),Zr=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],Qr=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&Zr.includes(n)?n:"expired"},ei=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e,ti=["variables","navigation","auth","state","host","theme","flags","computed"].filter(e=>"state"!==e&&"computed"!==e),ni=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,ri=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:a=!1}=r;if(e===t&&"soft"===n)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let a,o,s=[];if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(!ri(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.values())if(!t.has(o))return!1;for(o of e.entries())if(!ri(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.lastIndex===t.lastIndex&&e.sticky===t.sticky;if((e.valueOf!==Object.prototype.valueOf||t.valueOf!==Object.prototype.valueOf)&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if((e.toString!==Object.prototype.toString||t.toString!==Object.prototype.toString)&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if(s="soft"===n?Object.keys(e):Object.getOwnPropertyNames(e),a=s.length,a!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(o=a;0!==o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!==o--;){let a=s[o];if("_owner"===a&&e.$$typeof)continue;let l="soft"===n||ni(e,a)||!i.includes(a);if(!ri(e[a],t[a],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||a&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t},ii=ri,ai=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[a,o]of Object.entries(e)){let e=qn(o,{...t,computed:{...r}}),s=n?.[a],l=void 0!==n&&Object.hasOwn(n,a)&&(s===e||ii(s,e));r[a]=l?s:e,i&&=l}return i&&n?n:r},oi=(e,t,n)=>{let r=ti.map(e=>t[e]);if(Fr?.definitions===e&&Fr.state===n&&Fr.globals.every((e,t)=>e===r[t]))return Fr.computed;let i=ai(e,{...Object.fromEntries(ti.map((e,t)=>[e,r[t]])),state:n},Fr?.definitions===e?Fr.computed:void 0);return Fr={definitions:e,state:n,globals:r,computed:i},i},si=(e,t)=>{if(e)for(let n of e.split(";")){let e=n.indexOf("=");if(e>-1&&n.slice(0,e).trim()===t)try{return decodeURIComponent(n.slice(e+1).trim())}catch{return}}},li=()=>{try{return typeof document>"u"?void 0:document.cookie}catch{return}};function ci(e,t){return+Tr(e)-+Tr(t)}var ui={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 di(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var pi={date:di({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:di({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:di({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function hi(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var mi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:hi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})};function gi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(o));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(o.length)}}}function yi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];return o=n.valueCallback?n.valueCallback(o):o,{value:o,rest:t.slice(i.length)}}}var bi={ordinalNumber:yi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},vi={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=ui[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:pi,formatRelative:(e,t,n,r)=>fi[e],localize:mi,match:bi,options:{weekStartsOn:0,firstWeekContainsDate:1}},wi={};function ki(){return wi}function xi(e){const t=Tr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Si(e,...t){const n=Sr.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Ti(e,t){const n=Tr(e,t?.in);return n.setHours(0,0,0,0),n}function Ci(e,t){const n=ki(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Tr(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ai(e,t){return Ci(e,{...t,weekStartsOn:1})}function Ei(e,t){const n=Tr(e,t?.in),r=n.getFullYear(),i=Sr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Ai(i),o=Sr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=Ai(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ii(e,t){const n=Tr(e,t?.in),r=n.getFullYear(),i=ki(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=Sr(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Ci(o,t),l=Sr(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Ci(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function _i(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var Oi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _i("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):_i(n+1,2)},d:(e,t)=>_i(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>_i(e.getHours()%12||12,t.length),H:(e,t)=>_i(e.getHours(),t.length),m:(e,t)=>_i(e.getMinutes(),t.length),s:(e,t)=>_i(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return _i(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ni={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Oi.y(e,t)},Y:function(e,t,n,r){const i=Ii(e,r),a=i>0?i:1-i;return"YY"===t?_i(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):_i(a,t.length)},R:function(e,t){return _i(Ei(e),t.length)},u:function(e,t){return _i(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _i(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _i(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Oi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _i(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Tr(e,t?.in),r=+Ci(n,t)-+function(e,t){const n=ki(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ii(e,t),a=Sr(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ci(a,t)}(n,t);return Math.round(r/wr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):_i(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=Tr(e,t?.in),r=+Ai(n)-+function(e){const t=Ei(e,void 0),n=Sr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Ai(n)}(n);return Math.round(r/wr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):_i(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Oi.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Tr(e,t?.in);return function(e,t){const[n,r]=Si(void 0,e,t),i=Ti(n),a=Ti(r),o=+i-xi(i),s=+a-xi(a);return Math.round((o-s)/864e5)}(n,function(e){const t=Tr(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):_i(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return _i(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return _i(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return _i(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Oi.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Oi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):_i(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):_i(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Oi.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Oi.s(e,t)},S:function(e,t){return Oi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Pi(r);case"XXXX":case"XX":return Li(r);default:return Li(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Pi(r);case"xxxx":case"xx":return Li(r);default:return Li(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mi(r,":");default:return"GMT"+Li(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mi(r,":");default:return"GMT"+Li(r,":")}},t:function(e,t,n){return _i(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return _i(+e,t.length)}};function Mi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+_i(a,2)}function Pi(e,t){return e%60==0?(e>0?"-":"+")+_i(Math.abs(e)/60,2):Li(e,t)}function Li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+_i(Math.trunc(r/60),2)+t+_i(r%60,2)}var Di=(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"})}},zi=(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"})}},Ri={p:zi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Di(e,t);let a;switch(r){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}}",Di(r,t)).replace("{{time}}",zi(i,t))}},ji=/^D+$/,$i=/^Y+$/,Fi=["D","DD","YY","YYYY"];var qi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ui=/^'([^]*?)'?$/,Hi=/''/g,Wi=/[a-zA-Z]/;function Vi(e,t,n){const r=ki(),i=n?.locale??r.locale??vi,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Tr(e,n?.in);if(!function(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Tr(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(Bi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Ri[t])(e,i.formatLong):e}).join("").match(qi).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Gi(e)};if(Ni[t])return{isToken:!0,value:e};if(t.match(Wi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return $i.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return ji.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Fi.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,Ni[a[0]])(s,a,i.localize,c)}).join("")}function Gi(e){const t=e.match(Ui);return t?t[1].replace(Hi,"'"):e}function Ki(e,t){const n=+Tr(e)-+Tr(t);return n<0?-1:n>0?1:n}function Yi(e,t,n){const[r,i,a]=Si(n?.in,e,e,t),o=Ki(i,a),s=Math.abs(function(e,t){const[n,r]=Si(void 0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,a));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let l=Ki(i,a)===-o;(function(e,t){const n=Tr(e,t?.in);return+function(e,t){const n=Tr(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=Tr(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(n,t)})(r)&&1===s&&1===Ki(r,a)&&(l=!1);const c=o*(s-+l);return 0===c?0:c}function Ji(e,t){return function(e,t,n){const r=ki(),i=n?.locale??r.locale??vi,a=Ki(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,l]=Si(n?.in,...a>0?[t,e]:[e,t]),c=function(e,t,n){const r=ci(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(xi(l)-xi(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,o):c<10?i.formatDistance("lessThanXSeconds",10,o):c<20?i.formatDistance("lessThanXSeconds",20,o):c<40?i.formatDistance("halfAMinute",0,o):c<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):0===d?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",d,o);if(d<45)return i.formatDistance("xMinutes",d,o);if(d<90)return i.formatDistance("aboutXHours",1,o);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,o)}if(d<2520)return i.formatDistance("xDays",1,o);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,o)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,o);if(p=Yi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,o)}{const e=p%12,t=Math.trunc(p/12);return e<3?i.formatDistance("aboutXYears",t,o):e<9?i.formatDistance("overXYears",t,o):i.formatDistance("almostXYears",t+1,o)}}(e,function(e){return Sr(e,Date.now())}(e),t)}var Xi={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"}},Zi={date:di({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:di({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:di({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qi={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"},ea={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"},ta={ordinalNumber:(e,t)=>Number(e)+"º",era:hi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})},na={ordinalNumber:yi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},ra={code:"es",formatDistance:(e,t,n)=>{let r;const i=Xi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:Zi,formatRelative:(e,t,n,r)=>1!==t.getHours()?ea[e]:Qi[e],localize:ta,match:na,options:{weekStartsOn:1,firstWeekContainsDate:1}},ia={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"}},aa={date:di({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:di({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:di({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oa={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"},sa={ordinalNumber:(e,t)=>Number(e)+"º",era:hi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})},la={ordinalNumber:yi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},ca={code:"pt",formatDistance:(e,t,n)=>{let r;const i=ia[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:aa,formatRelative:(e,t,n,r)=>{const i=oa[e];return"function"==typeof i?i(t):i},localize:sa,match:la,options:{weekStartsOn:0,firstWeekContainsDate:4}},ua={en:vi,es:ra,pt:ca},da=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Cr(e):e,t};function pa(e,t="dd MMMM, yyyy",n="en"){return e?Vi(da(e),t,{locale:ua[n]}):""}function fa(e,t){let n=da(e);return ci(da(t),n)}var ha=e=>{let t="string"==typeof e&&""!==e.trim()?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>=250?t:void 0},ma=e=>"number"==typeof e||"string"==typeof e&&!e.includes(",")&&!Number.isNaN(parseFloat(e)),ga=e=>{if(!e||"object"!=typeof e)return;let{combinator:t,enabled:n}=e,{rules:r}=e;return Array.isArray(r)?(r=r.map(e=>{if((e=>"rules"in e)(e))return ga(e);let{field:t,value:n,operator:r,enabled:i,isBinding:a}=e;return{field:t,value:n,operator:r,enabled:i,isBinding:a}}).filter(Boolean),{rules:r,combinator:t,enabled:n}):void 0},ya=(e,t="json")=>ga(e),ba=(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),va=(e,t)=>null!=e&&null!=t&&(Dr(e)&&Dr(t)?(e=Lr(e),t=Lr(t),parseFloat(t)>parseFloat(e)):ma(e)?(e=parseFloat(e),t=parseFloat(t),ma(t)&&t>e):t>e),wa=(e,t)=>va(e,t)||ba(e,t),ka=(e,t)=>null!=e&&null!=t&&(Dr(e)&&Dr(t)?(e=Lr(e),t=Lr(t),parseFloat(t)<parseFloat(e)):ma(e)?(e=parseFloat(e),t=parseFloat(t),ma(t)&&t<e):t<e),xa=(e,t)=>ka(e,t)||ba(e,t),Sa=(e,t)=>Array.isArray(t)?t.some(t=>ba(e,t)):"string"==typeof e&&"string"==typeof t&&t.toLowerCase().includes(e.toLowerCase()),Ta=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().startsWith(e.toLowerCase()),Ca=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().endsWith(e.toLowerCase()),Aa=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}},Ea=(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=>ma(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t)):ma(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t))),Ia=(e,t)=>{let n=[];return"string"==typeof e&&(n=e.split(",").map(e=>e.trim())),!(n.length<2)&&wa(n[0],t)&&xa(n[1],t)},_a=(e,t={},n=!1,r=!1)=>{if(!e)return r;let{combinator:i,rules:a,enabled:o}=e;if(!Array.isArray(a))return r;if(!1===o)return!0;let s=a.filter(e=>!1!==e.enabled).map(e=>"rules"in e?_a(e,t,n):((e,t)=>{let{field:n,operator:r,isBinding:i}=e,{value:a}=e,o=ar(t,n);switch(i&&(a=ar(t,e.value)),r){case"=":return ba(a,o);case"!=":return!ba(a,o);case"<":return ka(a,o);case">":return va(a,o);case"<=":return xa(a,o);case">=":return wa(a,o);case"contains":return Sa(a,o);case"doesNotContain":return!Sa(a,o);case"beginsWith":return Ta(a,o);case"doesNotBeginWith":return!Ta(a,o);case"endsWith":return Ca(a,o);case"doesNotEndWith":return!Ca(a,o);case"empty":return Aa(o);case"notEmpty":return!Aa(o);case"in":return Ea(a,o);case"notIn":return!Ea(a,o);case"between":return Ia(a,o);case"notBetween":return!Ia(a,o);default:return!1}})(e,t));return n?s:"and"===i?!s.includes(!1):s.includes(!0)},Oa=(e,t={},n=!1,r=!1)=>_a(ya(e),t,n,r),Na=(e,t,n,r=!1)=>{let{rules:i,enabled:a}=e;if(!Array.isArray(i)||!1===a)return{};let o=i.filter(e=>!1!==e.enabled).flatMap(e=>"rules"in e?Na(e,t,n,!0):e);return r?o:o.reduce((e,r)=>{let{field:i,isBinding:a,value:o}=r;return a&&or(e,o,ar(t,o,n)),or(e,i,ar(t,i,n)),e},{})},Ma=(e,t={},n=void 0)=>Na(ya(e),t,n),Pa={action:"arrayMap",title:"Array Map",type:"utility",params:{keys:{defaultValue:'[{"from": "", "to": ""}]',type:"textarea"}},preview:{sourceParsed:""},callback:(e,t)=>{let{keys:n}=t;if(!Array.isArray(e))return e;try{"string"==typeof n&&(n=JSON.parse(n))}catch{return e}return e.map(e=>{let t={};return n.forEach(n=>{"object"==typeof n&&n.from&&n.to&&or(t,n.to,ar(e,n.from,""))}),t})}},La={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:n=!1,isUnix:r=!0,isUtc:i=!1,locale:a="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let o=da(r?Number(e):e);return isNaN(o.getTime())?e:n?function(e,t="en",n){if(!e)return"";let r=da(e);return isNaN(r.getTime())?"":Ji(r,{...n,locale:ua[t]})}(o,a,{addSuffix:!0}):i?function(e,t="dd MMMM, yyyy",n="en"){return e?Vi((e=>{let t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t.setFullYear(e.getUTCFullYear()),t})(da(e)),t,{locale:ua[n]}):""}(o,t,a):pa(o,t,a)}catch{return e}}},Da=/* @__PURE__ */new Set(["false","0",""]),za=e=>"string"==typeof e?!Da.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e,Ra={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!za(e)},ja={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,n)=>{let r=n?.stylePlatform;return r?Object.keys(r).map(e=>({label:e,options:Object.values(r[e]).filter(e=>"class"===e.type).map(e=>({label:e.name,value:e.name}))})):[]}}},preview:{append:"",originalSelector:"",selector:""},callback:(e,t,n,r={})=>{let{originalSelector:i,append:a,selector:o}=t,s=[];if(a&&!i&&r.sourceTo)s.push(r.sourceTo,o);else if(i&&a){let e=ar(n,"definition.styleSelectors.base","");e?s.push(e,o):s.push(o)}return s.length?1===s.length?s[0]:s.join(" "):""}},$a={action:"styleVariant",title:"Style Variant",type:"utility",params:{key:{label:"Selector Key",defaultValue:"",type:"select",options:(e,t)=>{let n=t?.definition?.styleSelectors;if(!t||!t.definition||!n)return[];let r=t.definition.type;return(e=>{let t=e.reduce((e,{groupLabel:t,option:n})=>(t in e||(e[t]=[]),e[t].push(n),e),{});return Object.entries(t).map(([e,t])=>({label:e,options:t}))})(Object.entries(n).flatMap(([e,t])=>(t?[r,...t.split(" ")]:[r]).map(t=>({groupLabel:e,option:{value:`${t}.${e}`,label:`${t} (${e})`}}))))}},variant:{label:"Variant",defaultValue:"",type:"select",options:(e,t,n)=>{let r=t?.definition?.styleSelectors,i=e.key||"";if(!(t&&t.definition&&r&&n?.stylePlatform&&i.includes(".")))return[];let a=t.definition.type,o=i.split(".").pop()||"",s=r[o];if(!s)return[];let l=[],c=[a,...s.split(" ").filter(Boolean)];return Object.entries(n.stylePlatform).forEach(([e,t])=>{c.forEach(n=>{let r=t[n];if(!r)return;let i=r.attributes[o];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,n,r={})=>{let{key:i,variant:a,append:o}=t;if(!i)return r.sourceTo??{};let s=i||"base",l=a||e;return"object"!=typeof l||Array.isArray(l)?or(o?{...r.sourceTo}:{},s,l):l}},Fa={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"},returnMode:{label:"Returns",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Value (a single {{ expression }})",value:"value"}]}},preview:{template:""},callback:(e,t,n,r={})=>{let{template:i,returnMode:a="text"}=t,o={source:e,...r};try{return"value"===a?qn(i,o):Fn(i,o)}catch{return e}}},qa={twigTemplate:Fa,dateConverter:La,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:n,value:r}=t;return"select"===n?"true"===r:r}},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:Pa,stringToArray:{action:"stringToArray",title:"Text to List",type:"utility",params:{separator:{label:"Separator",defaultValue:",",type:"text"}},preview:{valueType:"",value:""},callback:(e,t)=>{let{separator:n}=t;return"string"==typeof e?e.split(n).map(e=>e.trim()):e}},not:Ra,styleSelector:ja,styleVariant:$a},Ba=(Object.values(qa).map(({title:e,action:t})=>({label:e,value:t})),(e,t)=>{if(e&&typeof localStorage<"u")try{let t=localStorage.getItem(e);if("dark"===t||"light"===t)return t}catch{}return"system"===t?(()=>{if(typeof window>"u")return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():t}),Ua=l({theme:{components:{}},colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{}});Ua.displayName="ThemeContext";var Ha=(e,t="soft",n={})=>{let r=x(e);return ii(r.current,e,t,n)?r.current:(r.current=e,e)},Wa=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Va="-",Ga=[],Ka=e=>{const t=Xa(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Ja(e);const n=e.split(Va),r=""===n[0]&&n.length>1?1:0;return Ya(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||Ga}return n[e]||Ga}}},Ya=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=Ya(e,t+1,i);if(n)return n}const a=n.validators;if(null===a)return;const o=0===t?e.join(Va):e.slice(t).join(Va),s=a.length;for(let l=0;l<s;l++){const e=a[l];if(e.validator(o))return e.classGroupId}},Ja=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Xa=e=>{const{theme:t,classGroups:n}=e;return Za(n,t)},Za=(e,t)=>{const n=Wa();for(const r in e){const i=e[r];Qa(i,n,r,t)}return n},Qa=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const i=e[a];eo(i,t,n,r)}},eo=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?ro(e,t,n,r):no(e,t,n,r):to(e,t,n)},to=(e,t,n)=>{(""===e?t:io(t,e)).classGroupId=n},no=(e,t,n,r)=>{ao(e)?Qa(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},ro=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[e,a]=i[o];Qa(a,io(t,e),n,r)}},io=(e,t)=>{let n=e;const r=t.split(Va),i=r.length;for(let a=0;a<i;a++){const e=r[a];let t=n.nextPart.get(e);t||(t=Wa(),n.nextPart.set(e,t)),n=t}return n},ao=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,oo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},so=[],lo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),co=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,a=0;const o=e.length;for(let u=0;u<o;u++){const o=e[u];if(0===r&&0===i){if(":"===o){t.push(e.slice(a,u)),a=u+1;continue}if("/"===o){n=u;continue}}"["===o?r++:"]"===o?r--:"("===o?i++:")"===o&&i--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),lo(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):lo(so,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},uo=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const a=e[i],o="["===a[0],s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},po=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},fo=/\s+/,ho=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ho(e[r]))&&(n&&(n+=" "),n+=t);return n},mo=(e,...t)=>{let n,r,i,a;const o=e=>{const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(fo);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:h}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!h;if(g){m=r(f.substring(0,h));const e=m&&o[m]?r(f):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(f);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(f),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=p?y+"!":y,v=b+m;if(s.indexOf(v)>-1)continue;s.push(v);const w=i(m,g);for(let n=0;n<w.length;++n){const e=w[n];s.push(b+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return i(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:oo(e.cacheSize),parseClassName:co(e),sortModifiers:uo(e),postfixLookupClassGroupIds:po(e),...Ka(e)}))(l),r=n.cache.get,i=n.cache.set,a=o,o(s)},(...e)=>a(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=ho(t))&&(i&&(i+=" "),i+=n);return i})(...e))},go=[],yo=e=>{const t=t=>t[e]||go;return t.isThemeGetter=!0,t.themeKey=e,t},bo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ko=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,So=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,To=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Co=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ao=e=>wo.test(e),Eo=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>!!e&&Number.isInteger(Number(e)),_o=e=>e.endsWith("%")&&Eo(e.slice(0,-1)),Oo=e=>ko.test(e),No=()=>!0,Mo=e=>xo.test(e)&&!So.test(e),Po=()=>!1,Lo=e=>To.test(e),Do=e=>Co.test(e),zo=e=>!$o(e)&&!Go(e),Ro=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),jo=e=>ts(e,as,Po),$o=e=>bo.test(e),Fo=e=>ts(e,os,Mo),qo=e=>ts(e,ss,Eo),Bo=e=>ts(e,cs,No),Uo=e=>ts(e,ls,Po),Ho=e=>ts(e,rs,Po),Wo=e=>ts(e,is,Do),Vo=e=>ts(e,us,Lo),Go=e=>vo.test(e),Ko=e=>ns(e,os),Yo=e=>ns(e,ls),Jo=e=>ns(e,rs),Xo=e=>ns(e,as),Zo=e=>ns(e,is),Qo=e=>ns(e,us,!0),es=e=>ns(e,cs,!0),ts=(e,t,n)=>{const r=bo.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ns=(e,t,n=!1)=>{const r=vo.exec(e);return!!r&&(r[1]?t(r[1]):n)},rs=e=>"position"===e||"percentage"===e,is=e=>"image"===e||"url"===e,as=e=>"length"===e||"size"===e||"bg-size"===e,os=e=>"length"===e,ss=e=>"number"===e,ls=e=>"family-name"===e,cs=e=>"number"===e||"weight"===e,us=e=>"shadow"===e,ds=/*#__PURE__*/mo(()=>{const e=yo("color"),t=yo("font"),n=yo("text"),r=yo("font-weight"),i=yo("tracking"),a=yo("leading"),o=yo("breakpoint"),s=yo("container"),l=yo("spacing"),c=yo("radius"),u=yo("shadow"),d=yo("inset-shadow"),p=yo("text-shadow"),f=yo("drop-shadow"),h=yo("blur"),m=yo("perspective"),g=yo("aspect"),y=yo("ease"),b=yo("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Go,$o],w=()=>[Go,$o,l],k=()=>[Ao,"full","auto",...w()],x=()=>[Io,"none","subgrid",Go,$o],S=()=>["auto",{span:["full",Io,Go,$o]},Io,Go,$o],T=()=>[Io,"auto",Go,$o],C=()=>["auto","min","max","fr",Go,$o],A=()=>["auto",...w()],E=()=>[Ao,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],I=()=>[s,Ao,"screen","full","dvw","lvw","svw","min","max","fit",...w()],_=()=>[Ao,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],O=()=>[e,Go,$o],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Jo,Ho,{position:[Go,$o]}],M=()=>["auto","cover","contain",Xo,jo,{size:[Go,$o]}],P=()=>[_o,Ko,Fo],L=()=>["","none","full",c,Go,$o],D=()=>["",Eo,Ko,Fo],z=()=>[Eo,_o,Jo,Ho],R=()=>["","none",h,Go,$o],j=()=>["none",Eo,Go,$o],$=()=>["none",Eo,Go,$o],F=()=>[Eo,Go,$o],q=()=>[Ao,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oo],breakpoint:[Oo],color:[No],container:[Oo],"drop-shadow":[Oo],ease:["in","out","in-out"],font:[zo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oo],shadow:[Oo],spacing:["px",Eo],text:[Oo],"text-shadow":[Oo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ao,$o,Go,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Go,$o]}],"container-named":[Ro],columns:[{columns:[Eo,"auto",$o,Go,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Io,"auto",Go,$o]}],basis:[{basis:[Ao,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Eo,Ao,"auto","initial","none",$o]}],grow:[{grow:["",Eo,Go,$o]}],shrink:[{shrink:["",Eo,Go,$o]}],order:[{order:[Io,"first","last","none",Go,$o]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",..._()]}],"min-block-size":[{"min-block":["auto",..._()]}],"max-block-size":[{"max-block":["none",..._()]}],w:[{w:[s,"screen",...E()]}],"min-w":[{"min-w":[s,"screen","none",...E()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh","none",...E()]}],"font-size":[{text:["base",n,Ko,Fo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,es,Bo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_o,$o]}],"font-family":[{font:[Yo,Uo,t]}],"font-features":[{"font-features":[$o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Go,$o]}],"line-clamp":[{"line-clamp":[Eo,"none",Go,qo]}],leading:[{leading:["none",a,...w()]}],"list-image":[{"list-image":["none",Go,$o]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Go,$o]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Eo,"from-font","auto",Go,Fo]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Eo,"auto",Go,$o]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[Io,Go,$o]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Go,$o]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Go,$o]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Io,Go,$o],radial:["",Go,$o],conic:["",Io,Go,$o]},Zo,Wo]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Eo,Go,$o]}],"outline-w":[{outline:["",Eo,Ko,Fo]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","inner","none",u,Qo,Vo]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,Qo,Vo]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Eo,Fo]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,Qo,Vo]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Eo,Go,$o]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Eo]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Go,$o]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Eo]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Go,$o]}],filter:[{filter:["","none",Go,$o]}],blur:[{blur:R()}],brightness:[{brightness:[Eo,Go,$o]}],contrast:[{contrast:[Eo,Go,$o]}],"drop-shadow":[{"drop-shadow":["","none",f,Qo,Vo]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Eo,Go,$o]}],"hue-rotate":[{"hue-rotate":[Eo,Go,$o]}],invert:[{invert:["",Eo,Go,$o]}],saturate:[{saturate:[Eo,Go,$o]}],sepia:[{sepia:["",Eo,Go,$o]}],"backdrop-filter":[{"backdrop-filter":["","none",Go,$o]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Eo,Go,$o]}],"backdrop-contrast":[{"backdrop-contrast":[Eo,Go,$o]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Eo,Go,$o]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Eo,Go,$o]}],"backdrop-invert":[{"backdrop-invert":["",Eo,Go,$o]}],"backdrop-opacity":[{"backdrop-opacity":[Eo,Go,$o]}],"backdrop-saturate":[{"backdrop-saturate":[Eo,Go,$o]}],"backdrop-sepia":[{"backdrop-sepia":["",Eo,Go,$o]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Go,$o]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Eo,"initial",Go,$o]}],ease:[{ease:["linear","initial",y,Go,$o]}],delay:[{delay:[Eo,Go,$o]}],animate:[{animate:["none",b,Go,$o]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Go,$o]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Go,$o,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],zoom:[{zoom:[Io,Go,$o]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Go,$o]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Go,$o]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Eo,Ko,Fo,qo]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),ps=function(e,{componentKey:t,className:n,variants:r}){let{theme:i}=f(Ua);e=Ha(e);let a=Ha(n),o=h((t,n={},r="")=>(n={...n,className:r},"string"==typeof e?ar(i.components[e],t,void 0)?.(n)??r:e.map(e=>ar(i.components[e],t,void 0)?.(n)).filter(Boolean).join(" ")||r),[i.components,e]);return t=k(()=>void 0!==t?t:e&&"string"==typeof e?Object.keys(i.components[e]):Array.isArray(e)&&e.length>0?e.map(e=>Object.keys(i.components[e])).flat():void 0,[e,i.components]),k(()=>{if(t&&"string"==typeof t)return ds(o(t,r,a&&"object"==typeof a?ar(a,t,""):a));if(t&&Array.isArray(t)){let e={};return t.forEach((t,n)=>{let i;"object"==typeof a?i=ar(a,t):"string"==typeof a&&0===n&&(i=a);let s=ds(o(t,r,i));t.split(".").length>1?or(e,t.split(".").slice(1).join("."),s):or(e,t,s)}),e}return""},[t,a,o,r])},fs=({ref:e,className:t,children:n,testId:r,direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,alignItems:d,shrink:p,...f})=>(t=ps("Flex",{className:t,componentKey:"root",variants:{direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,shrink:p,alignItems:d}}),/* @__PURE__ */I("div",{...f,"data-testid":r,className:t,ref:e,children:n})),hs=(e,t,n="primary")=>e?"disabled":t&&"primary"===n?"primaryActive":t&&"secondary"===n?"secondaryActive":t&&"tertiary"===n?"tertiaryActive":n,ms=({className:e,children:t,icon:r,active:i=!1,disabled:a=!1,testId:o,intent:l,size:c,cursor:d,title:p,...f})=>{let h=ps("Icon",{className:e,componentKey:"root",variants:{intent:hs(a,i,l),size:c,cursor:a?"disabled":d}}),{iconChildren:m}=k(()=>{let e={iconChildren:void 0};return n.forEach(t,t=>{u(t)&&(e.iconChildren=s(t,{...f,className:U({"h-[1em] w-[1em]":"custom"!==c},h,t.props.className),title:p}))}),e},[t,h,f,c,p]);return m||/* @__PURE__ */I("i",{...f,title:p,"data-testid":o,className:U(r,h)})},gs=({ref:e,children:t,testId:r,className:i="",iconPlacement:a="none",loading:o=!1,disabled:l=!1,type:c="button",size:d,intent:p,border:f,justify:h,items:m,aspect:g,...y})=>{let b=ps("Button",{className:i,componentKey:["root","icon"],variants:{intent:p,size:d,border:f,justify:h,items:m,disabled:l,aspect:g}}),{iconChildren:v,contentChildren:w}=k(()=>{let e={iconChildren:void 0,contentChildren:void 0};return n.forEach(t,t=>{if("string"!=typeof t){if(u(t))if(t.type===ms){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,testId:r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else if("i"===t.type){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,"data-testid":r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else e.contentChildren=t}else e.contentChildren=t}),e},[t,b.icon,d,r]);/* @__PURE__ */
20
+ URL.createObjectURL(n)))}catch(e){return void console.error(e)}})(e).finally(()=>{Rr.delete(e)});Rr.set(e,{promise:t,timestamp:Date.now()})}let a=await(Rr.get(e)?.promise),[{default:o},{default:s},{nestedInject:l}]=await Promise.all([Promise.resolve().then(()=>sd),Promise.resolve().then(()=>XT),Promise.resolve().then(()=>V_)]);if(!a)return{default:s};let{type:c,pluginSettings:u}=ar(a,"default",{}),{version:d,initialItems:p,plugins:f}=a;if(!c)return{default:s};let h=a.default;return r||(h=o(a.default)),h.version=d,h.origin="remote",h.type=c,h.initialItems=p,h.pluginSettings=u,h.plugins=l(f,"remote"),n&&t(h),i&&i!==c?{default:(r?f?.[i]:h.plugins[i])??s}:{default:h}})(e,s,r,i,t)),[e,t]);return l?/* @__PURE__ */I(o,i?{children:/* @__PURE__ */I(u,{internalProps:n,plitziJsxSkipHOC:i,...a})}:{children:/* @__PURE__ */I(u,{internalProps:n})}):null},Ur=({type:e,plugins:t})=>{let n=(e?t[e]:void 0)??((e,t)=>Object.values(e).find(e=>e.subPlugins.find(e=>e===t)))(t,e);if(!n)return;let r=ar(n,"assets",[]).filter(e=>"script"===e.type);return{url:r.find(e=>e.isMain)?.params.src??ar(r,"0.params.src","")}},Hr=({key:e,plitziElementLayout:t,type:n,internalProps:r,components:i,plugins:a})=>{let o={...r,plitziElementLayout:t},s=i.notFound?/* @__PURE__ */I(i.notFound,{internalProps:o},e):void 0;if(!n)return s;let l=i[n];if(l)/* @__PURE__ */return I(l,{internalProps:o,extraProps:l.extraProps},e);let c=Ur({type:n,plugins:a});return c?/* @__PURE__ */I(Br,{url:c.url,type:n,internalProps:o},e):s},Wr=W("LayoutBodyContext",void 0),Vr=()=>{},Gr=({bodies:e,children:t})=>{let[n]=S(()=>({current:e,listeners:/* @__PURE__ */new Set}));return w(()=>{n.current!==e&&(n.current=e,n.listeners.forEach(e=>e()))},[e,n]),/* @__PURE__ */I(Wr,{value:n,children:t})},Kr=e=>{let t={};for(let n of e.split(";")){let e=n.indexOf(":");if(-1===e)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();if(r&&i){let e=r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());t[e]=i}}return t},Yr=({id:e,children:t})=>{let[n]=S(()=>{if(typeof document>"u")return null;let t=document.querySelector(`[data-rsc-id="${e}"]`);if(!t)return null;let n={};for(let e=0;e<t.attributes.length;e++){let{name:r,value:i}=t.attributes[e];"class"!==r&&"style"!==r&&"data-rsc-id"!==r&&(n[r]=i)}let r=t.getAttribute("style");return{tag:t.tagName.toLowerCase(),className:t.className,style:r?Kr(r):void 0,attrs:n,html:t.innerHTML}});return n?c(n.tag,{"data-rsc-id":e,className:n.className||void 0,style:n.style,...n.attrs,dangerouslySetInnerHTML:{__html:n.html}}):t},Jr=/* @__PURE__ */new Set,Xr=async e=>(await Promise.all([...Jr].map(async t=>t(e)))).some(e=>!0===e),Zr=["missing","expired","revoked","inactive","unverified","malformed","outdated","network"],Qr=(e,t)=>{if(401!==e)return;let n=t?.reason;return"string"==typeof n&&Zr.includes(n)?n:"expired"},ei=e=>/([^.]+\.[^.]+)$/.exec(e)?.[1]??e,ti=["variables","navigation","auth","state","host","theme","flags","computed"].filter(e=>"state"!==e&&"computed"!==e),ni=(e,t)=>Object.getOwnPropertyDescriptor(e,t)?.enumerable,ri=(e,t,n="soft",r={})=>{let{skip:i=[],skipFunctions:a=!1}=r;if(e===t&&"soft"===n)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let a,o,s=[];if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(!ri(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.values())if(!t.has(o))return!1;for(o of e.entries())if(!ri(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(a=e.length,a!=t.length)return!1;for(o=a;0!==o--;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.unicode===t.unicode&&e.lastIndex===t.lastIndex&&e.sticky===t.sticky;if((e.valueOf!==Object.prototype.valueOf||t.valueOf!==Object.prototype.valueOf)&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if((e.toString!==Object.prototype.toString||t.toString!==Object.prototype.toString)&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if(s="soft"===n?Object.keys(e):Object.getOwnPropertyNames(e),a=s.length,a!==("soft"===n?Object.keys(t).length:Object.getOwnPropertyNames(t).length))return!1;for(o=a;0!==o--;)if(!Object.prototype.hasOwnProperty.call(t,s[o]))return!1;for(o=a;0!==o--;){let a=s[o];if("_owner"===a&&e.$$typeof)continue;let l="soft"===n||ni(e,a)||!i.includes(a);if(!ri(e[a],t[a],n,r)&&l)return!1}return!0}return!!("hard"===n&&e===t||a&&"function"==typeof e&&"function"==typeof t)||e!=e&&t!=t},ii=ri,ai=(e,t,n)=>{let r={},i=void 0!==n&&Object.keys(n).length===Object.keys(e).length;for(let[a,o]of Object.entries(e)){let e=qn(o,{...t,computed:{...r}}),s=n?.[a],l=void 0!==n&&Object.hasOwn(n,a)&&(s===e||ii(s,e));r[a]=l?s:e,i&&=l}return i&&n?n:r},oi=(e,t,n)=>{let r=ti.map(e=>t[e]);if(Fr?.definitions===e&&Fr.state===n&&Fr.globals.every((e,t)=>e===r[t]))return Fr.computed;let i=ai(e,{...Object.fromEntries(ti.map((e,t)=>[e,r[t]])),state:n},Fr?.definitions===e?Fr.computed:void 0);return Fr={definitions:e,state:n,globals:r,computed:i},i},si=(e,t)=>{if(e)for(let n of e.split(";")){let e=n.indexOf("=");if(e>-1&&n.slice(0,e).trim()===t)try{return decodeURIComponent(n.slice(e+1).trim())}catch{return}}},li=()=>{try{return typeof document>"u"?void 0:document.cookie}catch{return}};function ci(e,t){return+Tr(e)-+Tr(t)}var ui={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 di(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var pi={date:di({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:di({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:di({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function hi(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var mi={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:hi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})};function gi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(o));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(o.length)}}}function yi(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];return o=n.valueCallback?n.valueCallback(o):o,{value:o,rest:t.slice(i.length)}}}var bi={ordinalNumber:yi({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},vi={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=ui[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:pi,formatRelative:(e,t,n,r)=>fi[e],localize:mi,match:bi,options:{weekStartsOn:0,firstWeekContainsDate:1}},wi={};function ki(){return wi}function xi(e){const t=Tr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Si(e,...t){const n=Sr.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Ti(e,t){const n=Tr(e,t?.in);return n.setHours(0,0,0,0),n}function Ci(e,t){const n=ki(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Tr(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ai(e,t){return Ci(e,{...t,weekStartsOn:1})}function Ei(e,t){const n=Tr(e,t?.in),r=n.getFullYear(),i=Sr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=Ai(i),o=Sr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=Ai(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ii(e,t){const n=Tr(e,t?.in),r=n.getFullYear(),i=ki(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=Sr(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Ci(o,t),l=Sr(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Ci(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function _i(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}var Oi={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _i("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):_i(n+1,2)},d:(e,t)=>_i(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>_i(e.getHours()%12||12,t.length),H:(e,t)=>_i(e.getHours(),t.length),m:(e,t)=>_i(e.getMinutes(),t.length),s:(e,t)=>_i(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return _i(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ni={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Oi.y(e,t)},Y:function(e,t,n,r){const i=Ii(e,r),a=i>0?i:1-i;return"YY"===t?_i(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):_i(a,t.length)},R:function(e,t){return _i(Ei(e),t.length)},u:function(e,t){return _i(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _i(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _i(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Oi.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _i(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=function(e,t){const n=Tr(e,t?.in),r=+Ci(n,t)-+function(e,t){const n=ki(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ii(e,t),a=Sr(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ci(a,t)}(n,t);return Math.round(r/wr)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):_i(i,t.length)},I:function(e,t,n){const r=function(e,t){const n=Tr(e,t?.in),r=+Ai(n)-+function(e){const t=Ei(e,void 0),n=Sr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Ai(n)}(n);return Math.round(r/wr)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):_i(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Oi.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Tr(e,t?.in);return function(e,t){const[n,r]=Si(void 0,e,t),i=Ti(n),a=Ti(r),o=+i-xi(i),s=+a-xi(a);return Math.round((o-s)/864e5)}(n,function(e){const t=Tr(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):_i(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return _i(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return _i(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return _i(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Oi.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Oi.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):_i(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):_i(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Oi.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Oi.s(e,t)},S:function(e,t){return Oi.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Pi(r);case"XXXX":case"XX":return Li(r);default:return Li(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Pi(r);case"xxxx":case"xx":return Li(r);default:return Li(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mi(r,":");default:return"GMT"+Li(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mi(r,":");default:return"GMT"+Li(r,":")}},t:function(e,t,n){return _i(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return _i(+e,t.length)}};function Mi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+_i(a,2)}function Pi(e,t){return e%60==0?(e>0?"-":"+")+_i(Math.abs(e)/60,2):Li(e,t)}function Li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+_i(Math.trunc(r/60),2)+t+_i(r%60,2)}var Di=(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"})}},zi=(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"})}},Ri={p:zi,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Di(e,t);let a;switch(r){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}}",Di(r,t)).replace("{{time}}",zi(i,t))}},ji=/^D+$/,$i=/^Y+$/,Fi=["D","DD","YY","YYYY"];var qi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ui=/^'([^]*?)'?$/,Hi=/''/g,Wi=/[a-zA-Z]/;function Vi(e,t,n){const r=ki(),i=n?.locale??r.locale??vi,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Tr(e,n?.in);if(!function(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Tr(e)));var t}(s))throw new RangeError("Invalid time value");let l=t.match(Bi).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Ri[t])(e,i.formatLong):e}).join("").match(qi).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Gi(e)};if(Ni[t])return{isToken:!0,value:e};if(t.match(Wi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return $i.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return ji.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Fi.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,Ni[a[0]])(s,a,i.localize,c)}).join("")}function Gi(e){const t=e.match(Ui);return t?t[1].replace(Hi,"'"):e}function Ki(e,t){const n=+Tr(e)-+Tr(t);return n<0?-1:n>0?1:n}function Yi(e,t,n){const[r,i,a]=Si(n?.in,e,e,t),o=Ki(i,a),s=Math.abs(function(e,t){const[n,r]=Si(void 0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,a));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*s);let l=Ki(i,a)===-o;(function(e,t){const n=Tr(e,t?.in);return+function(e,t){const n=Tr(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=Tr(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(n,t)})(r)&&1===s&&1===Ki(r,a)&&(l=!1);const c=o*(s-+l);return 0===c?0:c}function Ji(e,t){return function(e,t,n){const r=ki(),i=n?.locale??r.locale??vi,a=Ki(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,l]=Si(n?.in,...a>0?[t,e]:[e,t]),c=function(e,t,n){const r=ci(e,t)/1e3;return(i=n?.roundingMethod,e=>{const t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})(r);var i}(l,s),u=(xi(l)-xi(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?i.formatDistance("lessThanXSeconds",5,o):c<10?i.formatDistance("lessThanXSeconds",10,o):c<20?i.formatDistance("lessThanXSeconds",20,o):c<40?i.formatDistance("halfAMinute",0,o):c<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):0===d?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",d,o);if(d<45)return i.formatDistance("xMinutes",d,o);if(d<90)return i.formatDistance("aboutXHours",1,o);if(d<1440){const e=Math.round(d/60);return i.formatDistance("aboutXHours",e,o)}if(d<2520)return i.formatDistance("xDays",1,o);if(d<43200){const e=Math.round(d/1440);return i.formatDistance("xDays",e,o)}if(d<86400)return p=Math.round(d/43200),i.formatDistance("aboutXMonths",p,o);if(p=Yi(l,s),p<12){const e=Math.round(d/43200);return i.formatDistance("xMonths",e,o)}{const e=p%12,t=Math.trunc(p/12);return e<3?i.formatDistance("aboutXYears",t,o):e<9?i.formatDistance("overXYears",t,o):i.formatDistance("almostXYears",t+1,o)}}(e,function(e){return Sr(e,Date.now())}(e),t)}var Xi={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"}},Zi={date:di({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:di({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:di({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qi={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"},ea={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"},ta={ordinalNumber:(e,t)=>Number(e)+"º",era:hi({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})},na={ordinalNumber:yi({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},ra={code:"es",formatDistance:(e,t,n)=>{let r;const i=Xi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},formatLong:Zi,formatRelative:(e,t,n,r)=>1!==t.getHours()?ea[e]:Qi[e],localize:ta,match:na,options:{weekStartsOn:1,firstWeekContainsDate:1}},ia={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"}},aa={date:di({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:di({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:di({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oa={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"},sa={ordinalNumber:(e,t)=>Number(e)+"º",era:hi({values:{narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["antes de Cristo","depois de Cristo"]},defaultWidth:"wide"}),quarter:hi({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:hi({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:hi({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:hi({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"})},la={ordinalNumber:yi({matchPattern:/^(\d+)(º|ª)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:gi({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:gi({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:gi({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:gi({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:gi({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"})},ca={code:"pt",formatDistance:(e,t,n)=>{let r;const i=ia[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"daqui a "+r:"há "+r:r},formatLong:aa,formatRelative:(e,t,n,r)=>{const i=oa[e];return"function"==typeof i?i(t):i},localize:sa,match:la,options:{weekStartsOn:0,firstWeekContainsDate:4}},ua={en:vi,es:ra,pt:ca},da=e=>{let t;return t="number"==typeof e?e<1e12?/* @__PURE__ */new Date(1e3*e):new Date(e):"string"==typeof e?Cr(e):e,t};function pa(e,t="dd MMMM, yyyy",n="en"){return e?Vi(da(e),t,{locale:ua[n]}):""}function fa(e,t){let n=da(e);return ci(da(t),n)}var ha=e=>{let t="string"==typeof e&&""!==e.trim()?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>=250?t:void 0},ma=e=>"number"==typeof e||"string"==typeof e&&!e.includes(",")&&!Number.isNaN(parseFloat(e)),ga=e=>{if(!e||"object"!=typeof e)return;let{combinator:t,enabled:n}=e,{rules:r}=e;return Array.isArray(r)?(r=r.map(e=>{if((e=>"rules"in e)(e))return ga(e);let{field:t,value:n,operator:r,enabled:i,isBinding:a}=e;return{field:t,value:n,operator:r,enabled:i,isBinding:a}}).filter(Boolean),{rules:r,combinator:t,enabled:n}):void 0},ya=(e,t="json")=>ga(e),ba=(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),va=(e,t)=>null!=e&&null!=t&&(Dr(e)&&Dr(t)?(e=Lr(e),t=Lr(t),parseFloat(t)>parseFloat(e)):ma(e)?(e=parseFloat(e),t=parseFloat(t),ma(t)&&t>e):t>e),wa=(e,t)=>va(e,t)||ba(e,t),ka=(e,t)=>null!=e&&null!=t&&(Dr(e)&&Dr(t)?(e=Lr(e),t=Lr(t),parseFloat(t)<parseFloat(e)):ma(e)?(e=parseFloat(e),t=parseFloat(t),ma(t)&&t<e):t<e),xa=(e,t)=>ka(e,t)||ba(e,t),Sa=(e,t)=>Array.isArray(t)?t.some(t=>ba(e,t)):"string"==typeof e&&"string"==typeof t&&t.toLowerCase().includes(e.toLowerCase()),Ta=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().startsWith(e.toLowerCase()),Ca=(e,t)=>"string"==typeof t&&"string"==typeof e&&t.toLowerCase().endsWith(e.toLowerCase()),Aa=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}},Ea=(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=>ma(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t)):ma(t)?e.includes(`${t}`)||e.includes(parseFloat(t)):e.includes(t))),Ia=(e,t)=>{let n=[];return"string"==typeof e&&(n=e.split(",").map(e=>e.trim())),!(n.length<2)&&wa(n[0],t)&&xa(n[1],t)},_a=(e,t={},n=!1,r=!1)=>{if(!e)return r;let{combinator:i,rules:a,enabled:o}=e;if(!Array.isArray(a))return r;if(!1===o)return!0;let s=a.filter(e=>!1!==e.enabled).map(e=>"rules"in e?_a(e,t,n):((e,t)=>{let{field:n,operator:r,isBinding:i}=e,{value:a}=e,o=ar(t,n);switch(i&&(a=ar(t,e.value)),r){case"=":return ba(a,o);case"!=":return!ba(a,o);case"<":return ka(a,o);case">":return va(a,o);case"<=":return xa(a,o);case">=":return wa(a,o);case"contains":return Sa(a,o);case"doesNotContain":return!Sa(a,o);case"beginsWith":return Ta(a,o);case"doesNotBeginWith":return!Ta(a,o);case"endsWith":return Ca(a,o);case"doesNotEndWith":return!Ca(a,o);case"empty":return Aa(o);case"notEmpty":return!Aa(o);case"in":return Ea(a,o);case"notIn":return!Ea(a,o);case"between":return Ia(a,o);case"notBetween":return!Ia(a,o);default:return!1}})(e,t));return n?s:"and"===i?!s.includes(!1):s.includes(!0)},Oa=(e,t={},n=!1,r=!1)=>_a(ya(e),t,n,r),Na=(e,t,n,r=!1)=>{let{rules:i,enabled:a}=e;if(!Array.isArray(i)||!1===a)return{};let o=i.filter(e=>!1!==e.enabled).flatMap(e=>"rules"in e?Na(e,t,n,!0):e);return r?o:o.reduce((e,r)=>{let{field:i,isBinding:a,value:o}=r;return a&&or(e,o,ar(t,o,n)),or(e,i,ar(t,i,n)),e},{})},Ma=(e,t={},n=void 0)=>Na(ya(e),t,n),Pa={action:"arrayMap",title:"Array Map",type:"utility",params:{keys:{defaultValue:'[{"from": "", "to": ""}]',type:"textarea"}},preview:{sourceParsed:""},callback:(e,t)=>{let{keys:n}=t;if(!Array.isArray(e))return e;try{"string"==typeof n&&(n=JSON.parse(n))}catch{return e}return e.map(e=>{let t={};return n.forEach(n=>{"object"==typeof n&&n.from&&n.to&&or(t,n.to,ar(e,n.from,""))}),t})}},La={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:n=!1,isUnix:r=!0,isUtc:i=!1,locale:a="en"})=>{if("string"!=typeof e&&"number"!=typeof e)return e;try{let o=da(r?Number(e):e);return isNaN(o.getTime())?e:n?function(e,t="en",n){if(!e)return"";let r=da(e);return isNaN(r.getTime())?"":Ji(r,{...n,locale:ua[t]})}(o,a,{addSuffix:!0}):i?function(e,t="dd MMMM, yyyy",n="en"){return e?Vi((e=>{let t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t.setFullYear(e.getUTCFullYear()),t})(da(e)),t,{locale:ua[n]}):""}(o,t,a):pa(o,t,a)}catch{return e}}},Da=/* @__PURE__ */new Set(["false","0",""]),za=e=>"string"==typeof e?!Da.has(e.trim().toLowerCase()):Array.isArray(e)?e.length>0:!!e,Ra={action:"not",title:"Not",type:"utility",params:{},preview:{content:""},callback:e=>!za(e)},ja={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,n)=>{let r=n?.stylePlatform;return r?Object.keys(r).map(e=>({label:e,options:Object.values(r[e]).filter(e=>"class"===e.type).map(e=>({label:e.name,value:e.name}))})):[]}}},preview:{append:"",originalSelector:"",selector:""},callback:(e,t,n,r={})=>{let{originalSelector:i,append:a,selector:o}=t,s=[];if(a&&!i&&r.sourceTo)s.push(r.sourceTo,o);else if(i&&a){let e=ar(n,"definition.styleSelectors.base","");e?s.push(e,o):s.push(o)}return s.length?1===s.length?s[0]:s.join(" "):""}},$a={action:"styleVariant",title:"Style Variant",type:"utility",params:{key:{label:"Selector Key",defaultValue:"",type:"select",options:(e,t)=>{let n=t?.definition?.styleSelectors;if(!t||!t.definition||!n)return[];let r=t.definition.type;return(e=>{let t=e.reduce((e,{groupLabel:t,option:n})=>(t in e||(e[t]=[]),e[t].push(n),e),{});return Object.entries(t).map(([e,t])=>({label:e,options:t}))})(Object.entries(n).flatMap(([e,t])=>(t?[r,...t.split(" ")]:[r]).map(t=>({groupLabel:e,option:{value:`${t}.${e}`,label:`${t} (${e})`}}))))}},variant:{label:"Variant",defaultValue:"",type:"select",options:(e,t,n)=>{let r=t?.definition?.styleSelectors,i=e.key||"";if(!(t&&t.definition&&r&&n?.stylePlatform&&i.includes(".")))return[];let a=t.definition.type,o=i.split(".").pop()||"",s=r[o];if(!s)return[];let l=[],c=[a,...s.split(" ").filter(Boolean)];return Object.entries(n.stylePlatform).forEach(([e,t])=>{c.forEach(n=>{let r=t[n];if(!r)return;let i=r.attributes[o];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,n,r={})=>{let{key:i,variant:a,append:o}=t;if(!i)return r.sourceTo??{};let s=i||"base",l=a||e;return"object"!=typeof l||Array.isArray(l)?or(o?{...r.sourceTo}:{},s,l):l}},Fa={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"},returnMode:{label:"Returns",defaultValue:"text",type:"select",options:[{label:"Text",value:"text"},{label:"Value (a single {{ expression }})",value:"value"}]}},preview:{template:""},callback:(e,t,n,r={})=>{let{template:i,returnMode:a="text"}=t,o={source:e,...r};try{return"value"===a?qn(i,o):Fn(i,o)}catch{return e}}},qa={twigTemplate:Fa,dateConverter:La,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:n,value:r}=t;return"select"===n?"true"===r:r}},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:Pa,stringToArray:{action:"stringToArray",title:"Text to List",type:"utility",params:{separator:{label:"Separator",defaultValue:",",type:"text"}},preview:{valueType:"",value:""},callback:(e,t)=>{let{separator:n}=t;return"string"==typeof e?e.split(n).map(e=>e.trim()):e}},not:Ra,styleSelector:ja,styleVariant:$a},Ba=(Object.values(qa).map(({title:e,action:t})=>({label:e,value:t})),(e,t)=>{if(e&&typeof localStorage<"u")try{let t=localStorage.getItem(e);if("dark"===t||"light"===t)return t}catch{}return"system"===t?(()=>{if(typeof window>"u")return"light";try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():t}),Ua=l({theme:{components:{}},colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{}});Ua.displayName="ThemeContext";var Ha=(e,t="soft",n={})=>{let r=x(e);return ii(r.current,e,t,n)?r.current:(r.current=e,e)},Wa=(e=/* @__PURE__ */new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Va="-",Ga=[],Ka=e=>{const t=Xa(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Ja(e);const n=e.split(Va),r=""===n[0]&&n.length>1?1:0;return Ya(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],i=n[e];return t?i?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(i,t):t:i||Ga}return n[e]||Ga}}},Ya=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const n=Ya(e,t+1,i);if(n)return n}const a=n.validators;if(null===a)return;const o=0===t?e.join(Va):e.slice(t).join(Va),s=a.length;for(let l=0;l<s;l++){const e=a[l];if(e.validator(o))return e.classGroupId}},Ja=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Xa=e=>{const{theme:t,classGroups:n}=e;return Za(n,t)},Za=(e,t)=>{const n=Wa();for(const r in e){const i=e[r];Qa(i,n,r,t)}return n},Qa=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const i=e[a];eo(i,t,n,r)}},eo=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?ro(e,t,n,r):no(e,t,n,r):to(e,t,n)},to=(e,t,n)=>{(""===e?t:io(t,e)).classGroupId=n},no=(e,t,n,r)=>{ao(e)?Qa(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},ro=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[e,a]=i[o];Qa(a,io(t,e),n,r)}},io=(e,t)=>{let n=e;const r=t.split(Va),i=r.length;for(let a=0;a<i;a++){const e=r[a];let t=n.nextPart.get(e);t||(t=Wa(),n.nextPart.set(e,t)),n=t}return n},ao=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,oo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}},so=[],lo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),co=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,i=0,a=0;const o=e.length;for(let u=0;u<o;u++){const o=e[u];if(0===r&&0===i){if(":"===o){t.push(e.slice(a,u)),a=u+1;continue}if("/"===o){n=u;continue}}"["===o?r++:"]"===o?r--:"("===o?i++:")"===o&&i--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;return s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0),lo(t,c,l,n&&n>a?n-a:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):lo(so,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},uo=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let i=0;i<e.length;i++){const a=e[i],o="["===a[0],s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},po=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},fo=/\s+/,ho=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ho(e[r]))&&(n&&(n+=" "),n+=t);return n},mo=(e,...t)=>{let n,r,i,a;const o=e=>{const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(fo);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:h}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!h;if(g){m=r(f.substring(0,h));const e=m&&o[m]?r(f):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(f);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(f),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=p?y+"!":y,v=b+m;if(s.indexOf(v)>-1)continue;s.push(v);const w=i(m,g);for(let n=0;n<w.length;++n){const e=w[n];s.push(b+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return i(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:oo(e.cacheSize),parseClassName:co(e),sortModifiers:uo(e),postfixLookupClassGroupIds:po(e),...Ka(e)}))(l),r=n.cache.get,i=n.cache.set,a=o,o(s)},(...e)=>a(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=ho(t))&&(i&&(i+=" "),i+=n);return i})(...e))},go=[],yo=e=>{const t=t=>t[e]||go;return t.isThemeGetter=!0,t.themeKey=e,t},bo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ko=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,So=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,To=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Co=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ao=e=>wo.test(e),Eo=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>!!e&&Number.isInteger(Number(e)),_o=e=>e.endsWith("%")&&Eo(e.slice(0,-1)),Oo=e=>ko.test(e),No=()=>!0,Mo=e=>xo.test(e)&&!So.test(e),Po=()=>!1,Lo=e=>To.test(e),Do=e=>Co.test(e),zo=e=>!$o(e)&&!Go(e),Ro=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),jo=e=>ts(e,as,Po),$o=e=>bo.test(e),Fo=e=>ts(e,os,Mo),qo=e=>ts(e,ss,Eo),Bo=e=>ts(e,cs,No),Uo=e=>ts(e,ls,Po),Ho=e=>ts(e,rs,Po),Wo=e=>ts(e,is,Do),Vo=e=>ts(e,us,Lo),Go=e=>vo.test(e),Ko=e=>ns(e,os),Yo=e=>ns(e,ls),Jo=e=>ns(e,rs),Xo=e=>ns(e,as),Zo=e=>ns(e,is),Qo=e=>ns(e,us,!0),es=e=>ns(e,cs,!0),ts=(e,t,n)=>{const r=bo.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ns=(e,t,n=!1)=>{const r=vo.exec(e);return!!r&&(r[1]?t(r[1]):n)},rs=e=>"position"===e||"percentage"===e,is=e=>"image"===e||"url"===e,as=e=>"length"===e||"size"===e||"bg-size"===e,os=e=>"length"===e,ss=e=>"number"===e,ls=e=>"family-name"===e,cs=e=>"number"===e||"weight"===e,us=e=>"shadow"===e,ds=/*#__PURE__*/mo(()=>{const e=yo("color"),t=yo("font"),n=yo("text"),r=yo("font-weight"),i=yo("tracking"),a=yo("leading"),o=yo("breakpoint"),s=yo("container"),l=yo("spacing"),c=yo("radius"),u=yo("shadow"),d=yo("inset-shadow"),p=yo("text-shadow"),f=yo("drop-shadow"),h=yo("blur"),m=yo("perspective"),g=yo("aspect"),y=yo("ease"),b=yo("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Go,$o],w=()=>[Go,$o,l],k=()=>[Ao,"full","auto",...w()],x=()=>[Io,"none","subgrid",Go,$o],S=()=>["auto",{span:["full",Io,Go,$o]},Io,Go,$o],T=()=>[Io,"auto",Go,$o],C=()=>["auto","min","max","fr",Go,$o],A=()=>["auto",...w()],E=()=>[Ao,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],I=()=>[s,Ao,"screen","full","dvw","lvw","svw","min","max","fit",...w()],_=()=>[Ao,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],O=()=>[e,Go,$o],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Jo,Ho,{position:[Go,$o]}],M=()=>["auto","cover","contain",Xo,jo,{size:[Go,$o]}],P=()=>[_o,Ko,Fo],L=()=>["","none","full",c,Go,$o],D=()=>["",Eo,Ko,Fo],z=()=>[Eo,_o,Jo,Ho],R=()=>["","none",h,Go,$o],j=()=>["none",Eo,Go,$o],$=()=>["none",Eo,Go,$o],F=()=>[Eo,Go,$o],q=()=>[Ao,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oo],breakpoint:[Oo],color:[No],container:[Oo],"drop-shadow":[Oo],ease:["in","out","in-out"],font:[zo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oo],shadow:[Oo],spacing:["px",Eo],text:[Oo],"text-shadow":[Oo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ao,$o,Go,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Go,$o]}],"container-named":[Ro],columns:[{columns:[Eo,"auto",$o,Go,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Io,"auto",Go,$o]}],basis:[{basis:[Ao,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Eo,Ao,"auto","initial","none",$o]}],grow:[{grow:["",Eo,Go,$o]}],shrink:[{shrink:["",Eo,Go,$o]}],order:[{order:[Io,"first","last","none",Go,$o]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",..._()]}],"min-block-size":[{"min-block":["auto",..._()]}],"max-block-size":[{"max-block":["none",..._()]}],w:[{w:[s,"screen",...E()]}],"min-w":[{"min-w":[s,"screen","none",...E()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh","none",...E()]}],"font-size":[{text:["base",n,Ko,Fo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,es,Bo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_o,$o]}],"font-family":[{font:[Yo,Uo,t]}],"font-features":[{"font-features":[$o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Go,$o]}],"line-clamp":[{"line-clamp":[Eo,"none",Go,qo]}],leading:[{leading:["none",a,...w()]}],"list-image":[{"list-image":["none",Go,$o]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Go,$o]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Eo,"from-font","auto",Go,Fo]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Eo,"auto",Go,$o]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"tab-size":[{tab:[Io,Go,$o]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Go,$o]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Go,$o]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Io,Go,$o],radial:["",Go,$o],conic:["",Io,Go,$o]},Zo,Wo]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Eo,Go,$o]}],"outline-w":[{outline:["",Eo,Ko,Fo]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","inner","none",u,Qo,Vo]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,Qo,Vo]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Eo,Fo]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,Qo,Vo]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Eo,Go,$o]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Eo]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Go,$o]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Eo]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Go,$o]}],filter:[{filter:["","none",Go,$o]}],blur:[{blur:R()}],brightness:[{brightness:[Eo,Go,$o]}],contrast:[{contrast:[Eo,Go,$o]}],"drop-shadow":[{"drop-shadow":["","none",f,Qo,Vo]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Eo,Go,$o]}],"hue-rotate":[{"hue-rotate":[Eo,Go,$o]}],invert:[{invert:["",Eo,Go,$o]}],saturate:[{saturate:[Eo,Go,$o]}],sepia:[{sepia:["",Eo,Go,$o]}],"backdrop-filter":[{"backdrop-filter":["","none",Go,$o]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[Eo,Go,$o]}],"backdrop-contrast":[{"backdrop-contrast":[Eo,Go,$o]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Eo,Go,$o]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Eo,Go,$o]}],"backdrop-invert":[{"backdrop-invert":["",Eo,Go,$o]}],"backdrop-opacity":[{"backdrop-opacity":[Eo,Go,$o]}],"backdrop-saturate":[{"backdrop-saturate":[Eo,Go,$o]}],"backdrop-sepia":[{"backdrop-sepia":["",Eo,Go,$o]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Go,$o]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Eo,"initial",Go,$o]}],ease:[{ease:["linear","initial",y,Go,$o]}],delay:[{delay:[Eo,Go,$o]}],animate:[{animate:["none",b,Go,$o]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Go,$o]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Go,$o,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],zoom:[{zoom:[Io,Go,$o]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Go,$o]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Go,$o]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Eo,Ko,Fo,qo]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),ps=function(e,{componentKey:t,className:n,variants:r}){let{theme:i}=f(Ua);e=Ha(e);let a=Ha(n),o=h((t,n={},r="")=>(n={...n,className:r},"string"==typeof e?ar(i.components[e],t,void 0)?.(n)??r:e.map(e=>ar(i.components[e],t,void 0)?.(n)).filter(Boolean).join(" ")||r),[i.components,e]);return t=k(()=>void 0!==t?t:e&&"string"==typeof e?Object.keys(i.components[e]):Array.isArray(e)&&e.length>0?e.map(e=>Object.keys(i.components[e])).flat():void 0,[e,i.components]),k(()=>{if(t&&"string"==typeof t)return ds(o(t,r,a&&"object"==typeof a?ar(a,t,""):a));if(t&&Array.isArray(t)){let e={};return t.forEach((t,n)=>{let i;"object"==typeof a?i=ar(a,t):"string"==typeof a&&0===n&&(i=a);let s=ds(o(t,r,i));t.split(".").length>1?or(e,t.split(".").slice(1).join("."),s):or(e,t,s)}),e}return""},[t,a,o,r])},fs=({ref:e,className:t,children:n,testId:r,direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,alignItems:d,shrink:p,...f})=>(t=ps("Flex",{className:t,componentKey:"root",variants:{direction:i,wrap:a,items:o,gap:s,justify:l,grow:c,basis:u,shrink:p,alignItems:d}}),/* @__PURE__ */I("div",{...f,"data-testid":r,className:t,ref:e,children:n})),hs=(e,t,n="primary")=>e?"disabled":t&&"primary"===n?"primaryActive":t&&"secondary"===n?"secondaryActive":t&&"tertiary"===n?"tertiaryActive":n,ms=({className:e,children:t,icon:r,active:i=!1,disabled:a=!1,testId:o,intent:l,size:c,cursor:d,title:p,...f})=>{let h=ps("Icon",{className:e,componentKey:"root",variants:{intent:hs(a,i,l),size:c,cursor:a?"disabled":d}}),{iconChildren:m}=k(()=>{let e={iconChildren:void 0};return n.forEach(t,t=>{u(t)&&(e.iconChildren=s(t,{...f,className:U({"h-[1em] w-[1em]":"custom"!==c},h,t.props.className),title:p}))}),e},[t,h,f,c,p]);return m||/* @__PURE__ */I("i",{...f,title:p,"data-testid":o,className:U(r,h)})},gs=({ref:e,children:t,testId:r,className:i="",iconPlacement:a="none",loading:o=!1,disabled:l=!1,type:c="button",size:d,intent:p,border:f,justify:h,items:m,aspect:g,...y})=>{let b=ps("Button",{className:i,componentKey:["root","icon"],variants:{intent:p,size:d,border:f,justify:h,items:m,disabled:l,aspect:g}}),{iconChildren:v,contentChildren:w}=k(()=>{let e={iconChildren:void 0,contentChildren:void 0};return n.forEach(t,t=>{if("string"!=typeof t){if(u(t))if(t.type===ms){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,testId:r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else if("i"===t.type){let n=t.props;e.iconChildren=s(t,{className:U(b.icon,n.className),size:d,"data-testid":r?`${r}-icon`:void 0,...n,intent:n.intent??"custom"})}else e.contentChildren=t}else e.contentChildren=t}),e},[t,b.icon,d,r]);/* @__PURE__ */
21
21
  return _("button",{ref:e,type:c,"data-testid":r,className:b.root,disabled:l,...y,children:[!o&&w&&/* @__PURE__ */_(E,{children:[("before"===a||"both"===a)&&w&&v,w,("after"===a||"both"===a)&&w&&v]}),!o&&!w&&v,o&&/* @__PURE__ */I("i",{className:"fa-solid fa-sync fa-spin text-base"})]})};gs.Icon=ms;var ys={root:vr("flex outline-none select-none border transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{primary:["border-transparent bg-primary-500 text-white","hover:bg-primary-600","focus-visible:ring-primary-500","dark:bg-primary-400 dark:hover:bg-primary-500 dark:focus-visible:ring-primary-300"],secondary:["border-gray-300 text-zinc-700 hover:border-gray-400 hover:bg-gray-50 hover:text-zinc-900","focus-visible:ring-gray-400","dark:border-zinc-700 dark:text-zinc-300 dark:hover:border-zinc-400 dark:hover:bg-zinc-700/50 dark:hover:text-white dark:focus-visible:ring-zinc-500"],danger:["border-transparent bg-red-500 text-white hover:bg-red-600","focus-visible:ring-red-500","dark:bg-red-600 dark:hover:bg-red-700"],custom:""},disabled:{true:["disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none"],false:"cursor-pointer"},aspect:{square:"aspect-square",custom:""},size:{md:"py-2 px-4 gap-2 text-sm rounded-lg",sm:"py-1.5 px-3 gap-1.5 text-sm rounded-md",xs:"py-1 px-2 gap-1 text-xs rounded-sm min-w-6",custom:""},border:{solid:"border-solid",none:"border-none",custom:""},items:{start:"",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},justify:{normal:"justify-normal",start:"",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"}},compoundVariants:[],defaultVariants:{items:"center",justify:"center",intent:"primary",border:"solid",size:"md",disabled:!1,aspect:"custom"}}),icon:vr("shrink-0",{variants:{intent:{default:""},size:{md:"text-sm",sm:"text-xs",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"default",size:"md"}})},bs=gs,vs=e=>({labelId:`${e}-label`,errorId:`${e}-error`}),ws=({className:e,id:t,message:n,disabled:r=!1,error:i=!1,intent:a,size:o})=>(e=ps("ErrorMessage",{className:e,componentKey:"root",variants:{intent:a,size:o,error:i,disabled:r}}),/* @__PURE__ */I("p",{id:t,className:e,children:n})),ks=({className:e,children:t,disabled:n=!1,error:r=!1,intent:i,size:a,...o})=>(e=ps("Label",{className:e,componentKey:"root",variants:{intent:i,size:a,error:r,disabled:n}}),/* @__PURE__ */I("label",{className:e,...o,children:t})),xs=({ref:e,className:t,id:r,labelledByControl:i=!1,label:a,error:o,disabled:l,intent:c,size:d,prefix:p,children:f,loading:m,clearable:g,inline:y,value:b,onClear:v,...w})=>{let x=ps("Input",{className:t,componentKey:["root","label","inputContainer","iconFloatingContainer","icon","iconError","iconClear"],variants:{intent:c,size:d,disabled:l||m,error:!!o,inline:y}}),S=h(e=>v?.(e),[v]),{labelId:T,errorId:C}=r?vs(r):{labelId:void 0,errorId:void 0},A=i?void 0:r,{iconChildren:E,inputChildren:O}=k(()=>{let e={iconChildren:void 0,inputChildren:[]};return n.forEach(f,t=>{if(u(t))if(t.type===ms){let n=t.props;e.iconChildren=s(t,{className:U(x.icon,n.className),size:d,...n,intent:n.intent??"custom"})}else e.inputChildren.push(t)}),e},[f,x.icon,d]);/* @__PURE__ */
22
22
  return _("div",{className:x.root,ref:e,...w,children:[a&&!y&&/* @__PURE__ */I(ks,{error:!!o,disabled:l,intent:c,size:d,id:T,htmlFor:A,className:x.label,children:a}),
23
23
  /* @__PURE__ */_("div",{className:x.inputContainer,children:[E,!!p&&p,!y&&O,y&&/* @__PURE__ */_(ks,{error:!!o,disabled:l,intent:c,size:d,id:T,htmlFor:A,className:x.label,children:[O,a]}),!l&&(!!o||m||g&&!!b)&&/* @__PURE__ */_("div",{className:x.iconFloatingContainer,children:[o&&!m&&/* @__PURE__ */I(ms,{intent:"custom",icon:"fa-solid fa-circle-exclamation",className:x.iconError}),m&&/* @__PURE__ */I(ms,{icon:"fa-solid fa-sync fa-spin",className:x.iconLoading}),!m&&g&&!!b&&/* @__PURE__ */I(ms,{className:x.iconClear,icon:"fa-solid fa-xmark",onClick:S})]})]}),o&&/* @__PURE__ */I(ws,{id:C,message:"boolean"==typeof o?"":o,intent:c,size:d,error:!!o})]})},Ss=(e,t,n=!1)=>{let r=x(n),i=x(t);g(()=>{if(r.current){let n=i.current;return i.current=t,e(n)}r.current=!0,i.current=t},t)},Ts=Object.assign(p(({ref:e,children:t,className:n="",id:r,label:i="",placeholder:a="",loading:o=!1,disabled:s=!1,clearable:l=!1,inline:c=!1,prefix:u="",type:d="text",size:p,intent:f="primary",value:m="",error:g=!1,containerProps:y,onChange:v,...w})=>{let k=ps("Input",{className:n&&"object"==typeof n?n.input:"",componentKey:"input",variants:{intent:f,size:p,disabled:s||o,error:!!g,inline:c}}),x=(({id:e,error:t})=>{let n=b(),r=e??n,{labelId:i,errorId:a}=vs(r),o=(e=>"string"==typeof e&&""!==e)(t)?a:void 0;return{id:r,labelId:i,describedBy:o,controlProps:{id:r,"aria-describedby":o,"aria-invalid":!!t||void 0}}})({id:r,error:g}),S=h(e=>v?.(e.target.value),[v]),T=h(()=>v?.(""),[v]);/* @__PURE__ */
24
- return _(xs,{className:n,id:x.id,label:i,loading:o,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:f,size:p,onClear:T,...y,children:[t,/* @__PURE__ */I("input",{ref:e,...x.controlProps,type:d,placeholder:a,className:k,disabled:s||o,value:m,onChange:S,...w})]})}),{Icon:ms}),Cs={root:vr("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:vr("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded-md",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:vr("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:vr("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:vr("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:vr("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:vr("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:vr("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:vr("text-zinc-400 dark:text-zinc-500")},As=Ts,Es=Symbol.for("immer-nothing"),Is=Symbol.for("immer-draftable"),_s=Symbol.for("immer-state");function Os(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ns=Object,Ms=Ns.getPrototypeOf,Ps="constructor",Ls="prototype",Ds="configurable",zs="enumerable",Rs="writable",js="value",$s=e=>!!e&&!!e[_s];function Fs(e){return!!e&&(Us(e)||Ys(e)||!!e[Is]||!!e[Ps]?.[Is]||Js(e)||Xs(e))}var qs=Ns[Ls][Ps].toString(),Bs=/* @__PURE__ */new WeakMap;function Us(e){if(!e||!Zs(e))return!1;const t=Ms(e);if(null===t||t===Ns[Ls])return!0;const n=Ns.hasOwnProperty.call(t,Ps)&&t[Ps];if(n===Object)return!0;if(!Qs(n))return!1;let r=Bs.get(n);return void 0===r&&(r=Function.toString.call(n),Bs.set(n,r)),r===qs}function Hs(e,t,n=!0){0===Ws(e)?(n?Reflect.ownKeys(e):Ns.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ws(e){const t=e[_s];return t?t.type_:Ys(e)?1:Js(e)?2:Xs(e)?3:0}var Vs=(e,t,n=Ws(e))=>2===n?e.has(t):Ns[Ls].hasOwnProperty.call(e,t),Gs=(e,t,n=Ws(e))=>2===n?e.get(t):e[t],Ks=(e,t,n,r=Ws(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},Ys=Array.isArray,Js=e=>e instanceof Map,Xs=e=>e instanceof Set,Zs=e=>"object"==typeof e,Qs=e=>"function"==typeof e,el=e=>"boolean"==typeof e,tl=e=>e.copy_||e.base_,nl=e=>e.modified_?e.copy_:e.base_;function rl(e,t){if(Js(e))return new Map(e);if(Xs(e))return new Set(e);if(Ys(e))return Array[Ls].slice.call(e);const n=Us(e);if(!0===t||"class_only"===t&&!n){const t=Ns.getOwnPropertyDescriptors(e);delete t[_s];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[Rs]&&(a[Rs]=!0,a[Ds]=!0),(a.get||a.set)&&(t[i]={[Ds]:!0,[Rs]:!0,[zs]:a[zs],[js]:e[i]})}return Ns.create(Ms(e),t)}{const t=Ms(e);if(null!==t&&n)return{...e};const r=Ns.create(t);return Ns.assign(r,e)}}function il(e,t=!1){return ol(e)||$s(e)||!Fs(e)||(Ws(e)>1&&Ns.defineProperties(e,{set:al,add:al,clear:al,delete:al}),Ns.freeze(e),t&&Hs(e,(e,t)=>{il(t,!0)},!1)),e}var al={[js]:function(){Os(2)}};function ol(e){return null===e||!Zs(e)||Ns.isFrozen(e)}var sl="MapSet",ll="Patches",cl="ArrayMethods",ul={};function dl(e){const t=ul[e];return t||Os(0),t}var pl,fl=e=>!!ul[e],hl=()=>pl;function ml(e,t){t&&(e.patchPlugin_=dl(ll),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gl(e){yl(e),e.drafts_.forEach(vl),e.drafts_=null}function yl(e){e===pl&&(pl=e.parent_)}var bl=e=>pl={drafts_:[],parent_:pl,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:fl(sl)?dl(sl):void 0,arrayMethodsPlugin_:fl(cl)?dl(cl):void 0};function vl(e){const t=e[_s];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function wl(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[_s].modified_&&(gl(t),Os(4)),Fs(e)&&(e=kl(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[_s].base_,e,t)}else e=kl(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&il(t,n)}(t,e,!0),gl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Es?e:void 0}function kl(e,t){if(ol(t))return t;const n=t[_s];if(!n)return El(t,e.handledSet_,e);if(!Sl(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Al(n,e)}return n.copy_}function xl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Sl=(e,t)=>e.scope_===t,Tl=[];function Cl(e,t,n,r){const i=tl(e),a=e.type_;if(void 0!==r&&Gs(i,r,a)===t)return void Ks(i,r,n,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;Hs(i,(e,n)=>{if($s(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??Tl;for(const s of o)Ks(i,s,n,a)}function Al(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}xl(e)}}function El(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||$s(e)||t.has(e)||!Fs(e)||ol(e)||(t.add(e),Hs(e,(r,i)=>{if($s(i)){const t=i[_s];Sl(t,n)&&(Ks(e,r,nl(t),e.type_),xl(t))}else Fs(i)&&El(i,t,n)})),e}var Il={get(e,t){if(t===_s)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=tl(e);if(!Vs(i,t,e.type_))return function(e,t,n){const r=Nl(t,n);return r?js in r?r[js]:r.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!Fs(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===Ol(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Fs(n)||n[_s])&&e.baseRefs_.has(n)}(e,t,a)){Pl(e);const n=1===e.type_?+t:t,r=Ll(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in tl(e),ownKeys:e=>Reflect.ownKeys(tl(e)),set(e,t,n){const r=Nl(tl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ol(tl(e),t),i=r?.[_s];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Vs(e.base_,t,e.type_)))return!0;Pl(e),Ml(e)}return e.copy_[t]===n&&(void 0!==n||Vs(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if($s(n)){const i=n[_s];Sl(i,r)&&i.callbacks_.push(function(){Pl(e),Cl(e,n,nl(i),t)})}else Fs(n)&&e.callbacks_.push(function(){const i=tl(e);3===e.type_?i.has(n)&&El(n,r.handledSet_,r):Gs(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&El(Gs(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Pl(e),void 0!==Ol(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Ml(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=tl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Rs]:!0,[Ds]:1!==e.type_||"length"!==t,[zs]:r[zs],[js]:n[t]}:r},defineProperty(){Os(11)},getPrototypeOf:e=>Ms(e.base_),setPrototypeOf(){Os(12)}},_l={};for(let xO in Il){let e=Il[xO];_l[xO]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function Ol(e,t){const n=e[_s];return(n?tl(n):e)[t]}function Nl(e,t){if(!(t in e))return;let n=Ms(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ms(n)}}function Ml(e){e.modified_||(e.modified_=!0,e.parent_&&Ml(e.parent_))}function Pl(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=rl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Ll(e,t,n,r){const[i,a]=Js(t)?dl(sl).proxyMap_(t,n):Xs(t)?dl(sl).proxySet_(t,n):function(e,t){const n=Ys(e),r={type_:n?1:0,scope_:t?t.scope_:hl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=Il;n&&(i=[r],a=_l);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return(n?.scope_??hl()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Sl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const a=nl(i);Cl(e,i.draft_??i,a,n),Al(i,r)})}(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Dl(e){if(!Fs(e)||ol(e))return e;const t=e[_s];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rl(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=rl(e,!0);return Hs(n,(e,t)=>{Ks(n,e,Dl(t))},r),t&&(t.finalized_=!1),n}_l.deleteProperty=function(e,t){return _l.set.call(this,e,t,void 0)},_l.set=function(e,t,n){return Il.set.call(this,e[0],t,n,e[0])},globalThis.Iterator;var zl=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Qs(e)&&!Qs(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(Qs(t)||Os(6),void 0===n||Qs(n)||Os(7),Fs(e)){const i=bl(this),a=Ll(0,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?gl(i):yl(i)}return ml(i,n),wl(r,i)}if(!e||!Zs(e)){if(r=t(e),void 0===r&&(r=e),r===Es&&(r=void 0),this.autoFreeze_&&il(r,!0),n){const t=[],i=[];dl(ll).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Os(1)},this.produceWithPatches=(e,t)=>{if(Qs(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},el(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),el(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),el(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Fs(e)||Os(8),$s(e)&&($s(t=e)||Os(10),e=Dl(t));const n=bl(this),r=Ll(0,e,void 0);return r[_s].isManual_=!0,yl(n),r}finishDraft(e,t){const n=e&&e[_s];n&&n.isManual_||Os(9);const{scope_:r}=n;return ml(r,t),wl(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=dl(ll).applyPatches_;return $s(e)?r(e,t):this.produce(e,e=>r(e,t))}},Rl=zl.produce,jl=(e,t)=>`${e}_${t}`,$l=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=Ot(),a=i(),o=k(()=>`${e}_${((e,t=!0,n=!0)=>{let r="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),n&&(i=`${i}0123456789`);let a=i.length;for(let o=0;o<e;o++)r+=i.charAt(Math.floor(Math.random()*a));return r})(8)}`,[e]);g(()=>{if(t)return a(`sources.${o}`,{id:o,meta:{id:e,source:t,name:n,fields:r}}),()=>a(`sources.${o}`,void 0,{unmount:!0})},[o,t]),g(()=>{t&&a(`sources.${o}.meta.fields`,r,{raw:!0})},[r,t,o,a])},Fl=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>Oa(e.when,t));return{...e,[r]:o?o.value:i}},{}):{},ql=W("DevToolsContext",{logs:[],providers:{}}),Bl=(e,t=2)=>String(e).padStart(t,"0"),Ul=()=>typeof window<"u",Hl=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;#n=/* @__PURE__ */new Set;#r=[];recentLimit=200;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}addListener(e,{replay:t=!1}={}){if(t)for(let n of this.#r)e(n);return this.#n.add(e),()=>{this.#n.delete(e)}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#i(e,t,n,r){if(!this.callbackInternal&&!Ul())return;let i=this.getTime(!0);if(Ul()){let a={logType:e,category:t,message:n,params:r,time:i};this.#r.push(a),this.#r.length>this.recentLimit&&this.#r.shift();for(let e of this.#n)e(a)}if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#a()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#a(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?(e=>`${Bl(e.getHours())}:${Bl(e.getMinutes())}:${Bl(e.getSeconds())}.${Bl(e.getMilliseconds(),3)}`)(t):t}info(e,t,n){this.#i("info",e,t,n)}warning(e,t,n){this.#i("warning",e,t,n)}danger(e,t,n){this.#i("danger",e,t,n)}success(e,t,n){this.#i("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Wl(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Hl.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Vl="[A-Za-z_][A-Za-z0-9_]*",Gl=RegExp(`^${Vl}$`),Kl=(/* @__PURE__ */RegExp(`^!?${Vl}$`),new Set(["__proto__","constructor","prototype"])),Yl=e=>Gl.test(e)&&!Kl.has(e),Jl=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},Xl=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},Zl=(e,t)=>{let n=Jl(e),r=(e=>Object.entries(e).filter(([e])=>Yl(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},Ql=["server","sdk","qa"],ec=(e,t)=>{let n=((e,t)=>Array.isArray(e.rules)?e.rules.findIndex(e=>(e=>"object"==typeof e&&!!e&&"rules"in e&&Array.isArray(e.rules)&&e.rules.some(e=>!("object"!=typeof e||!e||"enabled"in e&&!1===e.enabled)))(e.when)&&((e,t)=>!!Oa(e,t))(e.when,t)):-1)(e,t);return-1===n?{value:e.value,layer:"space"}:{value:e.rules[n].value,layer:"space",rule:n}},tc=(e,t={},n={})=>Object.fromEntries(Object.entries(e??{}).map(([e,r])=>[e,Ql.reduce((t,r)=>{let i=n[r]?.[e];return"boolean"==typeof i?{value:i,layer:r}:t},ec(r,t))])),nc=e=>Object.fromEntries(Object.entries(e).map(([e,{value:t}])=>[e,t])),rc=(e,t)=>!e||(t[e.name]??!1)===e.is,ic=e=>{let t=x(e);return t.current!==e&&!ii(t.current,e)&&(t.current=e),t.current},ac="data-plitzi-fonts",oc=W("PlitziServiceContext",{}),sc=()=>{let e=f(oc);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},lc=e=>{let{children:t,value:n}=e;/* @__PURE__ */
25
- return I(oc,{value:n,children:t})},cc={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},uc=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",MASK_SIZE:"mask-size",MASK_POSITION:"mask-position",MASK_REPEAT:"mask-repeat",MASK_COMPOSITE:"mask-composite",WEBKIT_MASK_IMAGE:"-webkit-mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",TRANSITION_BEHAVIOR:"transition-behavior",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",ANIMATION_TIMELINE:"animation-timeline",ANIMATION_RANGE:"animation-range",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",PERSPECTIVE:"perspective",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",SCROLL_SNAP_TYPE:"scroll-snap-type",SCROLL_SNAP_ALIGN:"scroll-snap-align",SCROLL_SNAP_STOP:"scroll-snap-stop",SCROLL_PADDING_TOP:"scroll-padding-top",SCROLL_MARGIN_TOP:"scroll-margin-top",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",SCROLLBAR_WIDTH:"scrollbar-width",SCROLLBAR_COLOR:"scrollbar-color",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",FONT_VARIANT_NUMERIC:"font-variant-numeric",FONT_FEATURE_SETTINGS:"font-feature-settings",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",WEBKIT_TEXT_FILL_COLOR:"-webkit-text-fill-color",WEBKIT_BACKGROUND_CLIP:"-webkit-background-clip",BOX_DECORATION_BREAK:"box-decoration-break",WEBKIT_BOX_DECORATION_BREAK:"-webkit-box-decoration-break",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{})),dc="https://fonts.googleapis.com",pc={woff2:"font/woff2",woff:"font/woff"},fc=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},hc=e=>{try{return new URL(e).origin}catch{return}},mc={"<":"\\3c ",">":"\\3e "},gc=e=>`"${e.replace(/[\\"<>]/g,e=>mc[e]??`\\${e}`)}"`,yc=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,bc=e=>encodeURIComponent(e).replace(/%20/g,"+"),vc=(e,t)=>["@font-face{",`font-family:${gc(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${gc(t.url)}) format(${gc(t.format)});`,t.unicodeRange&&yc.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),wc="/*plitzi:style-cache*/",kc="/*plitzi:style-cache-end*/",xc="plitzi-component--hidden",Sc="props",Tc={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[],components:{}},Cc=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},Ac=(e,t,n)=>{let r=[],i=/* @__PURE__ */new Set,a=t,o=n;for(;a&&!i.has(a)&&r.length<16;){let t=e(a);if("layoutContainer"!==t?.definition.type)break;i.add(a),r.push({layout:a,slot:o||a}),a=Cc(t,"layout"),o=Cc(t,"layoutContainer")}return r},Ec=W("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"}),Ic=W("NetworkInternalContext",{}),_c=e=>({...e.enter?{enter:e.enter}:{},...e.on?{on:e.on}:{},..."number"==typeof e.duration?{duration:e.duration}:{},..."number"==typeof e.delay?{delay:e.delay}:{},..."number"==typeof e.stagger?{stagger:e.stagger}:{},...e.loop?{loop:e.loop}:{}}),Oc=({definition:e,...t})=>{let{parentId:n,items:r,bindings:i,interactions:a,initialState:o,runtime:s,loadStrategy:l,flag:c,anchor:u,motion:d,...p}=e;return{...t,definition:{...p,...null==n?{}:{parentId:n},...null==r?{}:{items:r},...null==i?{}:{bindings:i},...null==a?{}:{interactions:a},...null==o?{}:{initialState:o},...null==s?{}:{runtime:s},...null==l?{}:{loadStrategy:l},...null==c?{}:{flag:c},...null==u?{}:{anchor:u},...null==d?{}:{motion:_c(d)}}}},Nc=e=>({...e,flat:Object.fromEntries(e.flat.map(e=>[e.id,Oc(e)]))}),Mc={},Pc={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n variables\n cache\n }\n # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it\n # would have been handed in an SSR bootstrap travels here instead.\n render {\n overQuota\n }\n }\n }\n"},Lc="theme",Dc=["dark","light"],zc=[...Dc,"system"],Rc=(e="theme")=>We({mode:"system",scheme:"light",areas:{}},{id:e}),jc=Rc(),$c=(e,t)=>"system"===e?t:e,Fc=(e,t=jc)=>{t.batch(()=>{t.setState("mode",e),t.setState("areas",{})})},qc=(e,t=jc)=>{t.setState("scheme",e)},Bc=W("ThemeScopeContext",void 0),Uc="(prefers-color-scheme: dark)",Hc=({state:e})=>(Pt(["theme.mode","theme.resolved","theme.areas"],[e.mode,$c(e.mode,e.scheme),e.areas]),null),Wc=({defaultTheme:e="system",theme:t,scope:n="document",cookieName:r=Lc,children:i})=>{let a="container"===n,o=b(),[s]=S(()=>a?Rc(`theme${o}`):void 0),l=s??jc,c=x({mode:e,remembered:!1});wt(()=>{let n=a?void 0:((e=Lc)=>{try{return((e,t=Lc)=>{let n=si(e,t);return(e=>zc.includes(e))(n)?n:void 0})(document.cookie,e)}catch{return}})(r),i=t??n??e;c.current={mode:i,remembered:void 0!==n},l.batch(()=>{qc(window.matchMedia(Uc).matches?"dark":"light",l),Fc(i,l)})},[e,t,r,a,l]);let u=T(l.subscribe,l.getState,l.getState),d=void 0!==f(mt);g(()=>{let e=window.matchMedia(Uc),t=()=>qc(e.matches?"dark":"light",l);return e.addEventListener("change",t),t(),()=>e.removeEventListener("change",t)},[l]),g(()=>{if(a)return;let e=()=>{let{mode:e}=l.getState();(c.current.remembered||e!==c.current.mode)&&(((e,t=Lc)=>{try{document.cookie=`${t}=${encodeURIComponent(e)};path=/;max-age=31536000;SameSite=Lax`}catch{}})(e,r),c.current.remembered=!0),((e,t)=>{for(let n of Dc)t.classList.toggle(n,e===n)})(e,document.documentElement)};return e(),l.subscribe(e)},[r,a,l]);let p=d?/* @__PURE__ */I(Hc,{state:u}):null;return a?/* @__PURE__ */_(Bc,{value:s,children:[p,i]}):/* @__PURE__ */_(E,{children:[p,i]})},Vc="canvas",Gc=e=>{let t=f(Bc)??jc,n=T(t.subscribe,t.getState,t.getState),r=((e,t)=>(t?e.areas[t]:void 0)??e.mode)(n,e),i=$c(r,n.scheme),a=h(n=>e?((e,t,n=jc)=>{n.setState(`areas.${e}`,t)})(e,n,t):Fc(n,t),[e,t]),o=h(()=>a("dark"===i?"light":"dark"),[i,a]);return k(()=>({theme:r,resolvedTheme:i,setTheme:a,toggleTheme:o}),[r,i,a,o])},Kc=e=>/^https?:\/\//i.test(e),Yc=e=>e.replaceAll(/\/+/g,"/"),Jc=e=>Yc(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi,":$1")),Xc=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${Xc(e,r)}/${n}`:n};function Zc(e,t,n,r=!1){let i=n.replace(/^\/+/,""),{slug:a="",folder:o,default:s}=e[i]?.attributes??{slug:i,folder:"",default:!1};if(s&&!r)return{"/":n,[`/${n}`]:n};if(s&&r)return"/";if(!o&&!r)return{[Jc(`/${a}`)]:n,[Jc(`/${n}`)]:n};if(!o&&r)return Yc(`/${a}`);if(!t.find(e=>e.id===o))return r?Yc(`/${a}`):{[Jc(`/${a}`)]:n,[Jc(`/${n}`)]:n};let l=[Xc(t.reduce((e,t)=>({...e,[t.id]:t}),{}),o),a].filter(Boolean).join("/");return r?Yc(`/${l}`):{[Jc(`/${l}`)]:n,[Jc(`/${n}`)]:n}}var Qc=(e,t,n)=>{let r=n.indexOf("#");if(r>0)return`${Qc(e,t,n.slice(0,r))}${n.slice(r)}`;let i=e[n];if(!i)return n;let{slug:a,default:o}=i.attributes;return"string"==typeof a?Zc(e,t,n,!0):o?"/":`/${n}`},eu=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),tu=(e={},t=[],n,r="",i=!0,a=!0)=>{let o=Object.keys(e).reduce((a,o)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[o],u=e[o].attributes.unauthorizedPageRedirect;if(!l&&i)return a;u&&=(e=>Kc(e)||e.includes("{{"))(u)?u:Zc(e,t,u,!0);let d=Zc(e,t,o),p=Object.keys(d).map(e=>({pageId:o,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${o}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:eu(s,n,i)}));return[...a,...p]},[]).filter(e=>"*"!==e.path||e.hasAccess).sort((e,t)=>e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1);if(!o.find(e=>"*"===e.path)&&!a){let e=o.find(e=>"/"===e.path&&e.hasAccess);e&&"redirect"===e.unauthorizedBehaviour&&e.unauthorizedPageRedirect&&o.push({...e,path:"*",hasAccess:!1,isRaw:!0,unauthorizedBehaviour:"redirect",unauthorizedPageRedirect:"/"})}return o},nu=(e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=((e,t)=>{let n="string"==typeof e?{path:e,caseSensitive:!1,end:!0}:{path:e.path,caseSensitive:e.caseSensitive??!1,end:e.end??!0},[r,i]=((e,t,n)=>{let r=[],i=`^${e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:void 0!==n}),void 0===n)return"/([^\\/]+)";let o=a.charAt(i+e.length);return o&&"/"!==o?"/([^\\/]*)":"(?:/([^\\/]*))?"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2")}`;return e.endsWith("*")?(r.push({paramName:"*",isOptional:!1}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]})(n.path,n.caseSensitive,n.end),a=t.match(r);if(!a)return null;let o=a[0],s=a.slice(1),l=o.replace(/(.)\/+$/,"$1");return{params:i.reduce((e,{paramName:t,isOptional:n},r)=>{let i=s[r];if("*"===t){let e=i??"";l=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return n&&!i?(e[t]=void 0,e):(e[t]=(i??"").replace(/%2F/g,"/"),e)},{}),pathname:o,pathnameBase:l,pattern:n}})({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e);if(i||=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),!i&&e.find(e=>"/"===e.path&&e.hasAccess))return{action:{type:"redirect",path:"/"},pathMatch:void 0};if(!i)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:a,matchResult:o,path:{hasAccess:s,unauthorizedBehaviour:l,unauthorizedPageRedirect:c}}=i;return!s&&"redirect"===l&&c?{action:{type:"redirect",path:c},pathMatch:void 0}:s?{action:{type:"normal",path:void 0},pathMatch:o,pageId:a}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}},ru=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],iu=e=>`rsc.data.${e}`,au=()=>typeof window>"u"?"":`${window.location.pathname}${window.location.search}`,ou=async(e,t,n,r,i=!1)=>{let{enabled:a,endpoint:o}=e.get("rsc")??{};if(!a||!o||typeof window>"u")return;let s=r??au(),l=e.get("schema"),c=e.get("runtime.sources.auth"),u=r?((e,t,n)=>{if(!e)return;let r=e.pages.reduce((t,n)=>(n in e.flat&&(t[n]=e.flat[n]),t),{});return nu(tu(r,e.pageFolders,n),t.split("?")[0],n).pageId})(l,r,!!c?.details):e.get("navigation.currentPageId"),d=r?void 0:e.get("runtime.sources.flags");if(l&&((e,t,n)=>((e,t,n,r)=>{if(void 0===t)return[];let i,a=[],o=/* @__PURE__ */new Set,s=e.flat[t],l=e=>"string"==typeof e?e:"",c=[t,...s?Ac(t=>e.flat[t],l(s.attributes.layout),l(s.attributes.layoutContainer)).map(e=>e.layout):[]];for(;c.length>0;){let t=c.pop();if(void 0===t||o.has(t))continue;o.add(t);let n=e.flat[t];if(!n||r&&!rc(n.definition.flag,r))continue;"server"===n.definition.runtime&&(!i||i.has(n.id))&&a.push(n);let{items:s}=n.definition;s&&c.push(...s)}return a})(e,t,0,n).length>0)(l,u,d))try{let a=new URLSearchParams({location:s});t?.length&&a.set("ids",t.join(",")),Object.entries(n??{}).forEach(([e,t])=>a.set(e,t));let l=await fetch(`${o}?${a.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){let a=Qr(l.status,await l.json().catch(()=>{}));return a&&await Xr({reason:a,url:o})&&!i?await ou(e,t,n,r,!0):void e.set("rsc.stale",!0)}let{serverData:c,actionRuns:u}=await l.json();u?.length&&lt(u),e.batch(()=>{t?.length?Object.entries(c??{}).forEach(([t,n])=>e.set(iu(t),n)):e.set("rsc.data",c??{}),e.set("rsc.loaded",!0),e.set("rsc.stale",!1),e.set("rsc.location",s)})}catch{e.set("rsc.stale",!0)}},su=()=>{let e=Nt();return h((t,n)=>ou(e,t,n),[e])},lu=e=>new Set(Array.isArray(e?.paintedState)?e.paintedState.filter(e=>"string"==typeof e&&""!==e):[]),cu=(e,t)=>er(e)?Object.fromEntries(Object.entries(e).filter(([e,n])=>t.has(e)&&void 0!==n)):{},uu=e=>{try{document.cookie=`${e}=;path=/;max-age=0;SameSite=Lax`}catch{}},du=/* @__PURE__ */new Set(["init","initLoading","authenticating"]),pu=e=>{let t=e.runtime?.sources.auth;if(t){if(void 0===t.status)return{kind:"browser"};if(!du.has(t.status))return t.isAuthenticated&&void 0!==t.details?.id?{kind:"account",id:String(t.details.id)}:{kind:"guest"}}},fu=e=>{switch(e.kind){case"account":return`user:${e.id}`;case"guest":return"guest";case"browser":return""}},hu=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))),mu=(e,t)=>er(e)?Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))):{},gu=e=>e.schema?.settings,yu=e=>new Set((e?.transientState??[]).filter(e=>"string"==typeof e&&""!==e)),bu=(e,t)=>{let n,r=((e,t)=>{let n=t?.split(":")[1];return n?`plitzi_${e}_painted_${n}`:`plitzi_${e}_painted`})(t,typeof window>"u"?void 0:window.location.host),i=!1;return()=>{let t=e.getState();if(typeof document>"u"||t.render?.isHydrating&&!t.render.hydrated)return;let a=gu(t),o=lu(a),s=pu(t);if(!a?.keepState||0===o.size||void 0===s)return;let l=fu(s),c=t.runtime?.state;if(!i){i=!0;let t=(e=>((e,t)=>{let n=si(e,t);if(void 0!==n)try{let e=JSON.parse(n);return er(e)&&"string"==typeof e.owner&&er(e.values)?{owner:e.owner,values:e.values}:void 0}catch{return}})(li(),e))(r);if(t&&t.owner!==l&&(uu(r),er(c)&&[...o].some(e=>e in c)))return void e.setState("runtime.state",hu(c,o));n=t?.owner===l?JSON.stringify(cu(t.values,o)):void 0}let u=cu(c,o),d=JSON.stringify(u);if(d!==n){if(n=d,0===Object.keys(u).length)return void uu(r);"too-large"===((e,t)=>{let n=encodeURIComponent(JSON.stringify(t));if(n.length>3072)return uu(e),"too-large";try{return document.cookie=`${e}=${n};path=/;max-age=31536000;SameSite=Lax`,"written"}catch{return"unavailable"}})(r,{owner:l,values:u})&&Hl.warning("store",`settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...o].join(", ")}. Declare only what the first paint shows.`,{storeName:"runtime",path:"runtime.state",prev:void 0,next:u})}}},vu=e=>{let t=(e=>{let{key:t,storage:n,paths:r,partialize:i,partializePath:a,version:o=0,migrate:s,merge:l,mergePath:c,enabled:u}=e,d="function"==typeof n?n:void 0,p="function"==typeof n?void 0:ge(n);if(!d&&!p)return()=>{};let f=e=>{if(!d)return p;let t=d(e);return t?ge(t):void 0},h=e=>{if(r){let t={};for(let n of r){let r=oe(e,n);t[n]=a?a(n,r,e):r}return t}return i?i(e):e};return e=>{if(ee(u,e.getState()))return;let n=!1,i=()=>{if(n)return;let i=f(e.getState());i&&(n=!0,function(e,t,n,{version:r,paths:i,migrate:a,merge:o,mergePath:s}){let l=n?.getItem(t);if(l)try{let t=JSON.parse(l),n=t.version!==r;if(n&&!a)return;let c=n&&a?a(t.state,t.version):t.state;if(i){let t=c;return void e.batch(()=>{for(let n of i)if(n in t){let r=s?s(n,t[n],oe(e.getState(),n),e.getState()):t[n];e.setState(n,r)}})}let u=c;e.setState(void 0,o?o(u,e.getState()):u)}catch{n?.removeItem(t)}}(e,t,i,{version:o,paths:r,migrate:s,merge:l,mergePath:c}))};return{hydrate:i,onChange:n=>{i(),(e=>!r||r.some(t=>se(e,t)))(n.path)&&(e=>{let n=e.getState(),r=f(n);if(!r)return;let i={version:o,state:h(n)};r.setItem(t,JSON.stringify(i))})(e)}}}})({key:`plitzi_${e}_state`,paths:["runtime.state"],partializePath:(e,t,n)=>er(t)?hu(t,yu(gu(n))):t,mergePath:(e,t,n,r)=>{let i=yu(gu(r));return i.size>0&&er(t)?{...hu(t,i),...mu(n,i)}:t},storage:e=>{let{render:t}=e;if(t?.isHydrating&&!t.hydrated)return!1;let n=gu(e),r=pu(e);if(!n?.keepState||void 0===r)return!1;let i=(e=>{try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}})("sessionStorage"===n.stateStorage?"session":"local");return!!i&&((e,t)=>({getItem:n=>{let r=e.getItem(n);if(null===r)return null;try{let e=JSON.parse(r);if(e.owner===t&&"string"==typeof e.payload)return e.payload}catch{}return e.removeItem(n),null},setItem:(n,r)=>e.setItem(n,JSON.stringify({owner:t,payload:r})),removeItem:t=>e.removeItem(t)}))(i,fu(r))}});return n=>{let r=t(n),i=n.getState().runtime?.state,a=pu(n.getState()),o=bu(n,e);return{...r,onChange:e=>{let t=a,s=pu(n.getState());if(void 0!==s&&(a=s),"account"===t?.kind&&void 0!==s&&fu(s)!==fu(t)){let e=er(i)?hu(i,lu(gu(n.getState()))):i;n.setState("runtime.state",e)}r?.onChange?.(e),o()}}}},wu=typeof window>"u",ku={},xu=()=>()=>{},Su=()=>!0,Tu=()=>!1,Cu=({id:e,definition:t,plitziElementLayout:n,children:r,previewMode:a,visible:o=!0})=>{let[[s,l]]=Mt(["schema.flat","rsc.enabled"],{mode:"mount"}),[c=ku]=Mt("runtime.sources.flags"),{components:d,componentDefinitions:p}=f(jr),{contexts:{PluginsContext:m}}=sc(),{plugins:g}=f(m),{items:y}=t,b=p.current[t.type],v=t.loadStrategy??b?.definition.loadStrategy??"eager",w=n||r||y?.length,S=x(!1);o&&(S.current=!0);let C=!a||"eager"===v||o||"lazy"===v&&S.current,A=n?`${n.type}:${n.rootId}:${n.slots.join(",")}`:"",E=T(xu,Su,Tu),_=n?.slots.includes(e)??!1,O=(e=>{let t=f(Wr),n=h(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):Vr,[e,t]),r=h(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return T(n,r,r)})(_?e:void 0);return k(()=>{if(!w||!C)return;let e=(y??[]).filter(e=>{let t=s[e];if(!t||!rc(t.definition.flag,c))return!1;if(!a||!l)return!0;let n=t.definition.runtime??"shared";return!(!E&&"client"===n)}).map(e=>{let{rootId:t,type:r,runtime:i}=ar(s,`${e}.definition`,{}),o=ar(n,"rootId",t),c=r in d.current||!!Ur({type:r,plugins:g}),u=Hr({key:!a&&n?`${e}_${A}`:e,plitziElementLayout:n,type:r,internalProps:{id:e,rootId:o},components:d.current,plugins:g});return!l||"server"!==i||wu||!a||E&&c?u:/* @__PURE__ */I(Yr,{id:e,children:u},e)});return _&&e.push(/* @__PURE__ */I(i,{children:O},"#layout-body")),Array.isArray(r)?e.push(...r.filter(u)):u(r)&&e.push(/* @__PURE__ */I(i,{children:r},"#children")),y?1===e.length?e[0]:e:void 0},[w,C,y,c,n,r,s,a,l,E,A,d,g,e,_,O])},Au=/* @__PURE__ */new Map,Eu={settled:/* @__PURE__ */new Set([Sc])},Iu=(e,t,n={},r={})=>{let i,{attributes:a,definition:o}=e,{rootId:s,plitziElementLayout:l}=t;t.attributes&&(a={...a,...t.attributes});let c=a;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(o.bindings)){let t=((e,t,n={})=>{let{attributes:r,definition:i}=t,{bindings:a}=i;return!a||"object"==typeof a&&!Object.keys(a).length?{attributes:r,style:{},definition:i}:Rl({attributes:r,style:n,definition:i},t=>{Object.keys(a).forEach(n=>{a[n]&&Array.isArray(a[n])&&a[n].length&&a[n].forEach(r=>{let{source:i,transformers:a,when:o,enabled:s=!0}=r,{to:l}=r;if(!l||o&&!Oa(o,e,!1,!0)||!s)return;"style"===n&&(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:c,toValue:u}=((e,t,n,r,i)=>{let a="initialState"===r?`definition.${r}.${i}`:`${r}.${i}`;return{fromValue:t?ar(e,t,ar(n,a)):void 0,toValue:ar(n,a,t?ar(e,t):void 0)}})(e,i,t,n,l),d=c;a&&Array.isArray(a)&&a.length>0&&a.forEach(n=>{let{action:r,params:i,enabled:a=!0}=n;if(!a)return;let o=qa[r];o&&(d=o.callback(d,((e,t)=>{if(!t)return t;let n=t;for(let[r,i]of Object.entries(e.params)){let e=t[r];"true"!==e&&"false"!==e||"checkbox"!==("function"==typeof i.type?i.type(t):i.type)||(n===t&&(n={...t}),n[r]="true"===e)}return n})(o,i)??{},t,{...e,sourceTo:u}))}),"initialState"===n&&"visibility"===l&&i&&void 0!==ar(e,i)&&(d=za(d)),("boolean"==typeof d||"number"==typeof d||d)&&or(t,"initialState"===n?`definition.${n}.${l}`:`${n}.${l}`,d)})})})})(n,{...e,attributes:a},i);({attributes:a,definition:o,style:i}=t)}else i={};let u=Object.keys(a).filter(e=>{let t=a[e];return"string"==typeof t&&t===c[e]&&Xn(t)});return u.length>0&&(a=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:a={},origin:o="",navigation:s,...l}=n,c={...a,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:o}},u={...e};for(let d of t)u[d]=Fn(e[d],c,Eu);return u})(a,u,n)),a={...a,...Y(r,["visibility","styleSelectors"])},o={...o,styleSelectors:{...o.styleSelectors,...o.initialState?.styleSelectors,...r.styleSelectors??{}}},o.styleSelectors=(e=>{let t=e.initialState?.styleVariant;return Object.fromEntries(Object.entries(e.styleSelectors).map(([n,r])=>{let i="base"===n?`plitzi__${e.type}`:`plitzi__${e.type}-${n}`;if("string"!=typeof r)return[n,r];!(e=>{let t=Au.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),Au.set(e,t)),t})(e.type).test(r)&&t?.[e.type]?.[n]&&(r=r?`${e.type} ${r}`:e.type);let a=r.replace(/\S+/g,r=>{let i=t?.[r]?.[n];if(!i)return r;let a=Array.isArray(i)?i:[i];return r===e.type&&"base"===n?a.map(e=>`${r}--${e}`).join(" "):r===e.type&&"base"!==n?a.map(e=>`${r}-${n}--${e}`).join(" "):`${r} ${a.map(e=>`${r}--${e}`).join(" ")}`});return a?[n,`${i} ${a}`]:[n,i]}))})(o),{...t,rootId:ar(l,"rootId",s),attributes:{...a,...Y(t,["id","rootId","attributes","definition","plitziElementLayout"])},definition:o,elementState:{...o.initialState,...r},style:i}},_u=e=>Object.values(e??{}).filter(e=>"string"==typeof e&&Xn(e)),Ou=({element:e,children:t,internalProps:n,previewMode:r=!1,parentVisible:i=!0})=>{let{id:a}=n,{state:o,setElementState:s}=(({id:e,bindings:t,previewMode:n})=>{let{scopePath:r}=Nt(),i=k(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(e,r),[e,r]),[a]=Mt(i),o=a??zr,s=Dt(),l=k(()=>(t?.attributes&&Array.isArray(t.attributes)?t.attributes:[]).filter(e=>!1!==e.enabled).map(e=>ar(e,"to","")),[t]),c=h(e=>!!n&&(s(i,t=>{if(!e)return{};let n="function"==typeof e?e(t??zr):e;return l.length&&(n=pr(n,l)),n}),!0),[l,i,n,s]);return g(()=>{if(n&&r)return()=>s(i,void 0)},[n,r,i,s,e]),{state:o,setElementState:c}})({id:a,bindings:e.definition.bindings,previewMode:r}),l=k(()=>{let t=[..._u(e.attributes),..._u(n.attributes)];return t.length>0?(e=>["variables",...new Set(e.flatMap(e=>Qn(e)))])(t):void 0},[e.attributes,n.attributes]),[[c,u,d]]=Mt(["navigation.routeParams","navigation.queryParams","navigation.origin"],{enabled:void 0!==l}),p=(({bindings:e,sources:t})=>{let n=k(()=>{let n=new Set(t??[]);for(let t of Object.values(e??{}))if(Array.isArray(t))for(let e of t)for(let t of tr(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},[e,t]),r=k(()=>n.map(e=>`runtime.sources.${e}`),[n]),[i]=Mt(r);return k(()=>{let e={};return n.forEach((t,n)=>{void 0!==i[n]&&((e,t,n)=>{let r=t.split("."),i=e;for(let a of r.slice(0,-1)){let e=i[a],t=er(e)?e:{};i[a]=t,i=t}i[r[r.length-1]]=n})(e,t,i[n])}),e},[n,i])})({bindings:e.definition.bindings,sources:l}),f=k(()=>({...Iu(e,n,{...p,routeParams:c,queryParams:u,origin:d},o),setElementState:s}),[e,n,p,c,u,d,o,s]);return{internalProps:f,customProps:k(()=>Y(f,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"]),[f]),children:Cu({id:a,definition:f.definition,plitziElementLayout:f.plitziElementLayout,children:t,previewMode:r,visible:i&&K(f.elementState.visibility)})}},Nu=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */I("div",{children:"Something broke! Please refresh and try again."}):e}},Mu=W("EventBridgeContext",{}),Pu=Object.freeze({}),Lu=Object.freeze({}),Du=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>":"{…}"},zu=e=>{if("object"!=typeof e||!e)return Du(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(Du).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${Du(t[e])}`).join(", ")}${n.length>4?", …":""} }`},Ru=(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 n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.is(e[n],t[n]))},ju=We({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),$u=((e={})=>{let{max:t=100,enabled:n}=e,r=new Q,i=[],a=0,o=()=>{r.forEach(e=>e())},s=e=>{a+=1;let n={seq:a,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},r=i.length>=t?i.slice(i.length-t+1):i.slice();r.push(n),i=r,o()};return{middleware:e=>{if(!ee(n,e.getState()))return{onChange:s}},record:s,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>a,subscribe:e=>r.add(e),clear:()=>{i=[],o()}}})({max:30}),Fu=[],qu=/* @__PURE__ */new Map,Bu=/* @__PURE__ */new Map,Uu=/* @__PURE__ */new Map,Hu=/* @__PURE__ */new Map,Wu=!0,Vu=/* @__PURE__ */new Map,Gu=/* @__PURE__ */new Map,Ku=0,Yu=/* @__PURE__ */new Map,Ju=!1,Xu=!1,Zu=0,Qu=!1,ed=!1,td="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},nd=()=>{Wu&&(Wu=!1,ju.setState("tree",(()=>{let e={};for(let[t,n]of Hu)e[t]={parentId:Bu.get(t),baseDuration:n,elementId:Uu.get(t)??t,mountedAt:Vu.get(t),unmountedAt:Gu.get(t)};return e})())),ju.setState("hydrated",ed),ju.setState("commits",Fu)},rd=e=>{Bu.delete(e),Uu.delete(e),Hu.delete(e),Vu.delete(e),Gu.delete(e),Wu=!0},id=()=>{if(Qu=!1,qu.size>0){let e=[...qu.values()].sort((e,t)=>e.timestamp-t.timestamp);qu.clear(),(Fu=[...Fu,...e]).length>200&&(Fu=Fu.slice(Fu.length-200)),(e=>{for(let[t,n]of Gu)n<=e&&rd(t)})(Fu[0].commitId)}Xu&&nd()},ad=()=>{let e=$u.entriesSince(Ku);Ku=$u.lastSeq();let t=/* @__PURE__ */new Map;for(let n of e){if(void 0===n.path)continue;let e=t.get(n.path);e?e.next=n.nextValue:t.set(n.path,{prev:n.prevValue,next:n.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${zu(t.prev)} → ${zu(t.next)}`}))},od={onRender:(e,t,n,r,i,a)=>{Ju||(Ju=!0,ju.setState("enabled",!0));let o=!Hu.has(e);Hu.set(e,r);let s=Yu.get(e);Yu.delete(e);let l={id:e,elementId:Uu.get(e)??e,parentId:Bu.get(e),phase:t,actualDuration:n,baseDuration:r,changedProps:s},c=qu.get(a);c?(c.elements.push(l),c.elementCount+=1,c.duration=Math.max(c.duration,n)):(Zu+=1,qu.set(a,{commitId:Zu,timestamp:a,duration:n,elementCount:1,elements:[l],causes:ad()})),o&&(Vu.set(e,qu.get(a)?.commitId??Zu),Wu=!0),Qu||(Qu=!0,td(id))},lastCommitId:()=>Zu,commitsSince:e=>{let t=[...qu.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...Fu,...t].filter(t=>t.commitId>e)},linkParent:(e,t,n)=>{(!Bu.has(e)||Bu.get(e)!==t)&&(Wu=!0),Bu.size>=2e4&&!Bu.has(e)&&(Bu.clear(),Uu.clear(),Hu.clear(),Vu.clear(),Gu.clear(),Wu=!0),Bu.set(e,t),Uu.set(e,n)},markMounted:e=>{Gu.delete(e)&&(Wu=!0)},markUnmounted:e=>{Hu.has(e)?(Gu.set(e,Zu),Wu=!0,Qu||(Qu=!0,td(id))):rd(e)},recordProps:(e,t)=>{Yu.set(e,t)},recordStoreChange:e=>{$u.record(e)},setHydrated:()=>{ed||(ed=!0,Xu&&ju.setState("hydrated",!0))},start:()=>{Xu=!0,id(),nd()},stop:()=>{Xu=!1},clear:()=>{Fu=[],qu.clear(),Ku=$u.lastSeq(),Yu.clear(),Zu=0;for(let e of[...Gu.keys()])rd(e);Vu.clear(),Wu=!0,nd()}},sd=/* @__PURE__ */$({default:()=>ld}),ld=e=>{let t=e.displayName||e.name,n=t=>{let n=x(void 0),r=x(void 0),{id:i,rootId:o}=t.internalProps,s=f(G),l=s?.visible??!0,c=`${i}${b()}`,u=s?.traceId??c,d=k(()=>({id:i,rootId:o,visible:l,traceId:u,plitziJsxSkipHOC:!0}),[i,o,l,u]),p=k(()=>({visible:l,traceId:u}),[l,u]);if(t.plitziJsxSkipHOC)/* @__PURE__ */return I(G,{value:p,children:/* @__PURE__ */I(V,{value:d,children:/* @__PURE__ */I(e,{...t})})});let{settings:{previewMode:h,debugMode:m},root:{baseElementId:y}}=sc();g(()=>{if(m)return od.markMounted(c),()=>od.markUnmounted(c)},[m,c]);let[v]=Mt(`schema.flat.${i}`);if(!v)throw Error(`Element ${i} not found, Page ${y}`);let{internalProps:w,customProps:S,children:T}=Ou({element:v,internalProps:t.internalProps,children:t.children,previewMode:h,parentVisible:l}),{attributes:C,definition:A,style:E,plitziElementLayout:_,elementState:O,setElementState:N}=w;((e,t=Pu,n=Lu,r=Mu,i=!1)=>{let{eventBridge:a}=f(r);g(()=>{if(i||!a||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&a.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&a.off(e,t,n)}},[e,t,a,n,i])})("element",k(()=>({[`${i}_setState`]:N}),[i,N]));let M=l&&K(O.visibility),P=k(()=>({id:i,rootId:o,visible:M,traceId:c,attributes:C,definition:A,plitziElementLayout:_,style:E,elementState:O,setElementState:N}),[C,A,O,i,_,o,E,N,M,c]),L=k(()=>({visible:M,traceId:c}),[M,c]),D=k(()=>{let r={...w.attributes,...t.extraProps,...S,...Y(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return T&&(r={...r,children:T}),/* @__PURE__ */I(Nu,{children:/* @__PURE__ */I(e,{...r,ref:n})})},[w.attributes,t,S,T]),z=/* @__PURE__ */I(G,{value:L,children:/* @__PURE__ */I(V,{value:P,children:D})});if(m){od.linkParent(c,s?.traceId,i);let e={attributes:C,definition:A,style:E,elementState:O,plitziElementLayout:_,children:T,...S,...t.extraProps,...Y(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return od.recordProps(c,((e,t)=>{if(!e)return[];let n=[],r=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r){let r=e[i],a=t[i];if(!Object.is(r,a)&&(n.push({key:i,prev:zu(r),next:zu(a),ref:Ru(r,a)}),n.length>=12))break}return n})(r.current,e)),r.current=e,/* @__PURE__ */I(a,{id:c,onRender:od.onRender,children:z})}return z};return n.displayName=`withElement(${t})`,n},cd=()=>{let e=f(V);if(void 0===e)throw Error("Element data not found. Make sure the element is rendered under withElement.");return e},ud=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:a,params:o,serverMarker:s,motion:l,testMarker:u,events:d,children:p})=>""===e?p:c(e,{ref:t,style:n,className:r,...i,...a?{id:a}:{},...o,...l,...d,...s,...u},p),dd={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},pd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),fd=(e,t)=>({type:t.builderType??dd[t.type],label:t.label??pd(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??pd(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),hd=/* @__PURE__ */new WeakMap,md=e=>{let t=hd.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,fd(e,t)])),hd.set(e,t)),t},gd=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:md(t.params),...r}),yd=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,gd(r,e[r],t[r],n[r]??{})])),bd=["smooth","auto"],vd=["start","center","end","nearest"],wd=/^(-?\d+(?:\.\d+)?)(px|%)?$/,kd=(e,t)=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;let n=wd.exec(e.trim());if(!n)return;let r=Number(n[1]);return"%"===n[2]?r/100*t:r},xd=(e,t,n)=>{let r=Math.max(t-n,0);if("start"===e)return 0;if("end"===e)return r;let i=kd(e,r);return void 0===i?void 0:Math.min(Math.max(i,0),r)},Sd={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...bd]},Td={scrollBy:{title:"Scroll By",type:"callback",strictParams:!0,params:{x:{type:"text",description:'How far across: pixels ("240") or a share of what the box shows ("80%"); negative goes back.',default:""},y:{type:"text",description:"How far down, the same way; negative goes up.",default:""},behavior:Sd}},scrollTo:{title:"Scroll To",type:"callback",strictParams:!0,params:{x:{type:"text",description:'Where across: "start", "end", pixels from the start, or a share of the way ("50%"). Empty stays.',default:""},y:{type:"text",description:"Where down, the same way. Empty stays.",default:""},behavior:Sd}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...vd]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...vd]},behavior:Sd}}},Cd={setState:{title:"Update Element (set attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to change on the element: "attribute" sets one of its props (the common case — e.g. content, disabled); "state" sets element state (visibility or a style selector). REQUIRED — always set it.',default:"attribute",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to set. When category="attribute", an attribute/prop key of THIS element (e.g. "content", "disabled"). When category="state", "visibility" or "styleSelectors.<selector>". REQUIRED.',required:!0},value:{type:"scalar",description:'The value to set — its type follows the target attribute: a real boolean (true/false) for a boolean attribute, a number for a numeric one, otherwise a string (the strings "true"/"false" also coerce). There is NO separate `type` param (that belongs to the global state setState, not this one). REQUIRED.',when:e=>!!e.category,required:!0},revertOnFinish:{type:"boolean",description:'When true, this change is UNDONE automatically when the whole flow finishes. Use it for a TEMPORARY change (a "loading…" label, disabling a button while it works) instead of adding manual restore steps at the end of the flow.',default:!1,label:"Revert changes after interaction"}}},toggleState:{title:"Toggle Element (flip attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to flip on the element: "attribute" flips one of its props (e.g. disabled); "state" flips element state ("visibility", or "styleSelectors.<selector>" for an expanded/collapsed look). REQUIRED.',default:"state",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to flip. When category="attribute", an attribute/prop key of THIS element. When category="state", "visibility" or "styleSelectors.<selector>". Anything not already true counts as false, so a field that has never been set flips ON first. REQUIRED.',required:!0},revertOnFinish:{type:"boolean",description:"When true, the flip is UNDONE automatically when the whole flow finishes — a change that lasts only as long as the flow does.",default:!1,label:"Revert changes after interaction"}}},...Td},Ad=(e,t)=>n=>{let{category:r}=n;return"attribute"===r?Object.keys(e).map(e=>({value:e,label:e})):"state"===r?[{value:"visibility",label:"Visibility"},...Object.keys(t.styleSelectors).map(e=>({value:`styleSelectors.${e}`,label:`Selector - ${e}`}))]:[]},Ed=e=>{if("string"!=typeof e)return e;let t=e.toLowerCase();return"true"===t||"false"===t||"yes"===t||"no"===t?"true"===t||"yes"===t:e},Id=["ctrl","alt","shift","meta"],_d={ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",shift:"shift",meta:"meta",cmd:"meta",command:"meta",mod:"mod"},Od={esc:"escape",space:"space",spacebar:"space",plus:"+",minus:"-",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",return:"enter"},Nd=/* @__PURE__ */new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown",...Array.from({length:12},(e,t)=>`f${t+1}`)]),Md=(e,t)=>[...Id.filter(t=>e.has(t)),t].join("+"),Pd=(e,t=!1)=>{let n=e.split(",").map(e=>((e,t)=>{let n=e.trim().toLowerCase();if(!n)return{problem:"an empty shortcut (two commas in a row, or one at the end)"};let r=n.endsWith("++")?[...n.slice(0,-2).split("+"),"+"]:n.split("+"),i="+"===n?["+"]:r.filter(e=>""!==e),a=/* @__PURE__ */new Set,o=[];for(let l of i){if(Object.hasOwn(_d,l)){let e=_d[l];a.add("mod"===e?t?"meta":"ctrl":e);continue}o.push(Object.hasOwn(Od,l)?Od[l]:l)}if(1!==o.length)return{problem:`"${e.trim()}" names ${o.length?`${o.length} keys (${o.join(", ")})`:"no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"`};let[s]=o;return 1===s.length||Nd.has(s)?{combo:Md(a,s)}:{problem:`"${s}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...Nd].slice(0,15).join(", ")}, f1…f12)`}})(e,t));return{combos:n.flatMap(e=>e.combo?[e.combo]:[]),problems:n.flatMap(e=>e.problem?[e.problem]:[])}},Ld=/* @__PURE__ */new Set(["a","z","y","c","x","v"]),Dd=/* @__PURE__ */new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","backspace","delete"]),zd=e=>bd.find(t=>t===e)??"smooth",Rd=(e,t)=>vd.find(t=>t===e)??t,jd={onLoad:{action:"onLoad",title:"On Load",type:"trigger",preview:{},params:{}},onClick:{action:"onClick",title:"On Click",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onPointerDown:{action:"onPointerDown",title:"On Pointer Down",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseEnter:{action:"onMouseEnter",title:"On Mouse Enter",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseLeave:{action:"onMouseLeave",title:"On Mouse Leave",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onHover:{action:"onHover",title:"On Hover",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onFocus:{action:"onFocus",title:"On Focus",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onBlur:{action:"onBlur",title:"On Blur",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onInterval:{action:"onInterval",title:"On Interval",type:"trigger",preview:{interval:"",count:""},params:{interval:{canBind:!1,defaultValue:"5000",type:"text",label:"Every (milliseconds, at least 250)"}}},onKey:{action:"onKey",title:"On Key",type:"trigger",preview:{key:"",shortcuts:""},params:{keys:{canBind:!1,defaultValue:"",type:"text",label:"Keys (e.g. f, shift+f, mod+k, escape)"}}},onScroll:{action:"onScroll",title:"On Scroll",type:"trigger",preview:{x:"",y:"",atStart:"",atEnd:""},params:{}},onFlowEnd:{action:"onFlowEnd",title:"On Server Action End",type:"trigger",preview:{actionId:"",runId:"",status:"",output:{}},params:{}},onFlowError:{action:"onFlowError",title:"On Server Action Error",type:"trigger",preview:{actionId:"",runId:"",error:"",reason:""},params:{}},onFlowProgress:{action:"onFlowProgress",title:"On Server Action Progress",type:"trigger",preview:{actionId:"",runId:"",chunk:""},params:{}}},$d=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"],Fd=/* @__PURE__ */new WeakSet,qd=({elementContext:e,InteractionsContext:t,previewMode:n,debugMode:r,baseElementId:i,className:a,interactionTriggers:o,interactionCallbacks:s,otherProps:l,ref:c})=>{let{id:u,className:d,attributes:p,definition:y,definition:{interactions:b},plitziElementLayout:v,elementState:w,setElementState:S}=e,{interactionsManager:T,useInteractions:C}=f(t),A=h((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e);let a=(e=>"nativeEvent"in e&&er(e.nativeEvent)?e.nativeEvent:e)(e);Fd.has(a)||(i||Fd.add(a),T.interactionTrigger(t,n,{event:e}))},[T]),E=k(()=>n&&b?Object.values(b).filter(e=>"trigger"===e.type&&e.action&&$d.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=ar(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>A(e,u,t.action,l[t.action],n)}},{}):{},[u,b,l,n,A]),I=m(mt),_=h(()=>{let e=I?.getPath("runtime.sources");return((e,t,n)=>{let r=er(t)?t:{};return(e=>er(e)&&Object.values(e).every(e=>"string"==typeof e))(n)?{...e,state:r,computed:oi(n,e,r)}:{...e,state:r}})(er(e)?e:$r,I?.getPath("runtime.state"),I?.getPath("schema.settings.computed"))},[I]),O=h(()=>({dataSource:_()}),[_]),N=k(()=>({...jd,...o}),[o]),M=x(null),P=c??M,L=(({attributes:e,definition:t,setElementState:n})=>{let r=h((e,t)=>{let r,i;return n(n=>(r=n,i=Rl(n,r=>or(r,e,t(ar(n,e)))),i)),{prevState:r,nextState:i}},[n]),i=h(e=>{if(!e.key||void 0===e.value)return{prevState:void 0,nextState:void 0};let{key:t}=e,n=Ed(e.value);return r(t,()=>n)},[r]),a=h(e=>{if(!e.key)return{prevState:void 0,nextState:void 0};let{key:t}=e;return r(t,e=>!0!==Ed(e))},[r]),o=h((e,t)=>{let r=t?.prevState;e.revertOnFinish&&r&&n(r)},[n]);return k(()=>((e,t,n,r,i)=>{let a=Cd.setState,o=md(a.params),s=Cd.toggleState,l=md(s.params),c={type:"select",options:Ad(e,t),when:e=>"attribute"===e.category||"state"===e.category};return{setState:gd("setState",a,n,{title:`Update ${t.label}`,postCallback:r,params:{...o,key:{...o.key,...c},value:{...o.value,type:t=>"boolean"==typeof e[t.key]?"select":"text",options:t=>{let{key:n}=t;return"boolean"==typeof e[n]?[{value:"true",label:"True"},{value:"false",label:"False"}]:Object.keys(e).map(e=>({value:e,label:e}))}}}}),toggleState:gd("toggleState",s,i,{title:`Toggle ${t.label}`,postCallback:r,params:{...l,key:{...l.key,...c}}})}})(e,t,i,o,a),[e,t,i,o,a])})({attributes:p,definition:y,setElementState:S}),D=(({id:e,label:t,nodeRef:n,interactions:r,previewMode:i,interactionsManager:a})=>{let o=k(()=>yd(Td,{scrollBy:e=>{let t=n.current;t?.scrollBy({left:kd(e.x,t.clientWidth)??0,top:kd(e.y,t.clientHeight)??0,behavior:zd(e.behavior)})},scrollTo:e=>{let t=n.current;t&&t.scrollTo({left:xd(e.x,t.scrollWidth,t.clientWidth)??t.scrollLeft,top:xd(e.y,t.scrollHeight,t.clientHeight)??t.scrollTop,behavior:zd(e.behavior)})},scrollIntoView:e=>{n.current?.scrollIntoView({block:Rd(e.block,"start"),inline:Rd(e.inline,"nearest"),behavior:zd(e.behavior)})}},{scrollBy:{title:`Scroll ${t} by`},scrollTo:{title:`Scroll ${t} to`},scrollIntoView:{title:`Scroll to ${t}`}}),[t,n]),s=k(()=>Object.values(r??{}).some(e=>"trigger"===e.type&&"onScroll"===e.action&&e.enabled),[r]);return g(()=>{let t=n.current;if(!i||!s||!t||typeof window>"u")return;let r=0,o=()=>{r=0;let n=(e=>{let t=e.scrollWidth-e.clientWidth>1,n=t?e.scrollLeft:e.scrollTop,r=t?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;return{x:Math.round(e.scrollLeft),y:Math.round(e.scrollTop),atStart:n<=1,atEnd:n>=r-1}})(t);a.interactionTrigger(e,"onScroll",n)},l=()=>{0===r&&(r=window.requestAnimationFrame(o))};return t.addEventListener("scroll",l,{passive:!0}),r=window.requestAnimationFrame(o),()=>{t.removeEventListener("scroll",l),window.cancelAnimationFrame(r)}},[e,a,s,n,i]),o})({id:u,label:y.label,nodeRef:P,interactions:b,previewMode:n,interactionsManager:T});C({id:u,interactions:b,triggers:N,callbacks:k(()=>({...s,...D,...L}),[s,D,L]),getAdditionalParams:O}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let{keys:t}=e.params;return"trigger"===e.type&&"onKey"===e.action&&e.enabled&&"string"==typeof t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length)return;let t=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),a=i.map(e=>({spec:e,combos:Pd(e,t).combos})),o=t=>{if(t.isComposing)return;let n=(e=>{let t=e.ctrlKey||e.altKey||e.metaKey,n=/^(?:Key|Digit)([A-Z0-9])$/.exec(e.code),r=t&&n?n[1]:e.key,i=" "===r?"space":r.toLowerCase(),a=1===i.length&&!/[a-z0-9]/.test(i),o=/* @__PURE__ */new Set;return e.ctrlKey&&o.add("ctrl"),e.altKey&&o.add("alt"),e.shiftKey&&!a&&o.add("shift"),e.metaKey&&o.add("meta"),Md(o,i)})(t),i=t.ctrlKey||t.metaKey||t.altKey;if((e=>e instanceof Element&&null!==e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))(t.target)&&(!i&&"escape"!==n||(e=>{let t=e.split("+"),n=e.endsWith("++")?"+":t[t.length-1];return Dd.has(n)||Ld.has(n)&&(e.includes("ctrl+")||e.includes("meta+"))})(n)))return;let o=a.filter(e=>e.combos.includes(n)).map(e=>e.spec);if(!o.length)return;t.preventDefault();let s={key:n,shortcuts:o};r.interactionTrigger(e,"onKey",s)};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let t=ha(e.params.interval);return"trigger"===e.type&&"onInterval"===e.action&&e.enabled&&t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length||typeof document>"u")return;let t=new Map(i.map(e=>[e,0])),a=[],o=()=>{a.forEach(e=>clearInterval(e)),a=[]},s=()=>{o(),"visible"===document.visibilityState&&(a=i.map(n=>setInterval(()=>{let i=(t.get(n)??0)+1;t.set(n,i);let a={interval:n,count:i};r.interactionTrigger(e,"onInterval",a)},n)))};return s(),document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s),o()}},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),g(()=>{if(!n||!b||!Object.keys(b).length)return;let e=!1;return queueMicrotask(()=>{e||T.interactionTrigger(u,"onLoad",{})}),()=>{e=!0}},[]),g(()=>{if(r)return Hl.addProviderMethod(`getElementDataSource-${u}`,_),()=>{Hl.removeProviderMethod(`getElementDataSource-${u}`)}},[r,_,u]);let z=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:a,elementState:o})=>{let{items:s}=a,l=K(o.visibility);return k(()=>U(t,{[xc]:!l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i?.slots.includes(e)},a.styleSelectors.base),[t,l,n,i,s,r,e,a.styleSelectors.base])})({id:u,className:a,previewMode:n,baseElementId:i,definition:y,elementState:w,plitziElementLayout:v});return{className:U(d,z),events:E,nodeRef:P}},Bd=(["[data-motion-loop] { animation-play-state: running, running !important; }",'[data-motion-on="view"][data-motion-enter], [data-motion-on="view"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }'].join("\n"),e=>"animationName"in e&&"string"==typeof e.animationName&&e.animationName.startsWith("plitzi-motion-")),Ud=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:a,style:o,...s})=>{let l=k(()=>((e="")=>{if(e)return"object"==typeof e?e:Object.fromEntries(e.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n]=e.split(":").map(e=>e.trim());return[t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),n]}))})(o),[o]),c=cd(),u=sc(),d=u.settings.previewMode??!0,p=!!u.settings.debugMode;if(c.plitziJsxSkipHOC)return ud({tag:n,refProp:e,style:l,className:r,otherProps:s,children:t});let{root:{baseElementId:f},contexts:h}=u,m=h.InteractionsContext,{id:g,rootId:y,style:b,plitziElementLayout:v,definition:{type:w,label:x,runtime:S,anchor:T,parentId:C,motion:A}}=c,E=(e=>{if(!e)return{attributes:{},style:{}};let t={},n={};return e.enter&&(t[void 0===e.stagger?"data-motion-enter":"data-motion-stagger"]=e.enter,t["data-motion-on"]=e.on??"load"),e.loop&&(t["data-motion-loop"]=e.loop),void 0!==e.duration&&(n["--plitzi-motion-duration"]=`${String(e.duration)}ms`),void 0!==e.delay&&(n["--plitzi-motion-delay"]=`${String(e.delay)}ms`),void 0!==e.stagger&&(n["--plitzi-motion-stagger"]=`${String(e.stagger)}ms`),{attributes:t,style:n}})(A),I="server"===S?{"data-rsc-id":g}:void 0,_="component"!==v?.type||C||v.rootId===g?void 0:v.rootId,O=!1===u.settings.testAttributes?void 0:{"data-plitzi-el":g,...void 0===_?{}:{"data-plitzi-instance":_}},N=p||!d&&w&&y===f?{"data-id":g,"data-name":x||w||"unknown","data-root-id":y,"data-type":w||"unknown","data-root-render-element":!0}:{};if(!m)return ud({tag:n,refProp:e,style:{...b,...l,...E.style},className:r,otherProps:s,anchor:T,params:N,serverMarker:I,motion:E.attributes,testMarker:O,children:t});let M=qd({elementContext:c,InteractionsContext:m,previewMode:d,debugMode:p,baseElementId:f,className:r,interactionTriggers:i,interactionCallbacks:a,otherProps:s,ref:e});return ud({tag:n,refProp:M.nodeRef,style:{...b,...l,...E.style},className:M.className,otherProps:s,anchor:T,params:N,serverMarker:I,motion:E.attributes,testMarker:O,events:M.events,children:t})},Hd=/*#__PURE__*/function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),Wd=/*#__PURE__*/function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),Vd={rel:["amphtml","canonical","alternate"]},Gd={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},Kd={type:["application/ld+json"]},Yd=Object.values(Wd),Jd={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Xd=(()=>{const e={};for(const[t,n]of Object.entries(Jd))e[n]=t;return e})(),Zd="data-rh",Qd=!("undefined"==typeof window||!window.document.createElement);function ep(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function tp(e){let t=ep(e,Wd.TITLE);const n=ep(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=ep(e,"defaultTitle");return(t||r)??void 0}function np(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function rp(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function ip(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&console.warn(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===Hd.REL&&"canonical"===e[n].toLowerCase()||i===Hd.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==Hd.INNER_HTML&&i!==Hd.CSS_TEXT&&i!==Hd.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const a=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][a]&&(i[n][a]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const a=Object.keys(i);for(const t of a){const e={...r[t],...i[t]};r[t]=e}return e},[]).reverse()}function ap(e){return Array.isArray(e)?e.join(""):e}function op(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function sp(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)op(r,t)?n.priority.push(r):n.default.push(r);return n}function lp(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function cp(e){let t=ip(Wd.LINK,[Hd.REL,Hd.HREF],e),n=ip("meta",[Hd.NAME,"charSet","httpEquiv",Hd.PROPERTY,"itemProp"],e),r=ip("script",[Hd.SRC,Hd.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let a;if(i){const e=sp(t,Vd);t=e.default;const i=sp(n,Gd);n=i.default;const o=sp(r,Kd);r=o.default,a={links:e.priority,meta:i.priority,script:o.priority}}return{base:rp(e),bodyAttributes:np("bodyAttributes",e),defer:ep(e,"defer"),encodeSpecialCharacters:ep(e,"encodeSpecialCharacters")??!0,htmlAttributes:np("htmlAttributes",e),links:t,meta:n,noscript:ip("noscript",[Hd.INNER_HTML],e),onChangeClientState:ep(e,"onChangeClientState"),priority:a,script:r,style:ip("style",[Hd.CSS_TEXT],e),title:tp(e),titleAttributes:np("titleAttributes",e)}}function up(e){return Xd[e]??e}function dp(e,t){const n=document.head||document.querySelector(Wd.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${Zd}]`)],a=[];for(const o of t){const t=document.createElement(e);for(const[e,r]of Object.entries(o))if(Object.prototype.hasOwnProperty.call(o,e)){const n=Xd[e]??e;n===Hd.INNER_HTML?t.innerHTML=r:n===Hd.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=o.cssText:t.appendChild(document.createTextNode(o.cssText)):t.setAttribute(n,r??"")}t.setAttribute(Zd,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){a.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),a.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:a,oldTags:i}}function pp(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(Zd),i=r?r.split(","):[],a=[...i],o=[];for(const s of Object.keys(t))o.push(Xd[s]??s);for(const[s,l]of Object.entries(t)){const e=Xd[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=a.indexOf(e);-1!==t&&a.splice(t,1)}for(let s=a.length-1;s>=0;s-=1)n.removeAttribute(a[s]);i.length===a.length?n.removeAttribute(Zd):n.getAttribute("data-rh")!==o.join(",")&&n.setAttribute(Zd,o.join(","))}function fp(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:a,links:o,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:f,titleAttributes:h}=e;pp(Wd.BODY,r??{}),pp(Wd.HTML,a??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=ap(e)),pp(Wd.TITLE,t)}(f,h);const m={baseTag:dp(Wd.BASE,n?[n]:[]),linkTags:dp(Wd.LINK,[...u?.links??[],...o??[]]),metaTags:dp(Wd.META,[...u?.meta??[],...s??[]]),noscriptTags:dp(Wd.NOSCRIPT,l??[]),scriptTags:dp(Wd.SCRIPT,[...u?.script??[],...d??[]]),styleTags:dp(Wd.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:f??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var hp=[Wd.NOSCRIPT,Wd.SCRIPT,Wd.STYLE],mp=(e,t=!0)=>t?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e;function gp(e){let t="";for(const[n,r]of Object.entries(e)){const e=up(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function yp(e,t,n){let r="";for(const i of t){let t="";const a=Object.entries(i);for(const[e,r]of a)if(e!==Hd.INNER_HTML&&e!==Hd.CSS_TEXT){const i=Xd[e]??e;let a;a=void 0===r?i:`${i}="${mp("string"==typeof r?r:String(r),n)}"`,t?t+=` ${a}`:t=a}const o=i.innerHTML??i.cssText??"",s=!hp.includes(e);r+=`<${e} ${Zd}="true" ${t}${s?"/>":`>${o}</${e}>`}`}return r}function bp(e,t={}){const n={};t.addHelmetDataAttr&&(n[Zd]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=Jd[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function vp(e,t,n){/*#__PURE__*/
26
- return c(e,bp(t,{addHelmetDataAttr:!0,addKey:n}))}function wp(e,t){const n=[];for(let r=0;r<t.length;++r)n.push(vp(e,t[r],r));return n}var kp=/*#__PURE__*/l(void 0),xp=({children:e,onServerState:t})=>{const n=x(null);if(null===n.current){const e={firstRender:!0,helmets:[],state:void 0};t&&(e.serverState??=function(e){const t=()=>(e.state??=cp(e.helmets),e.state);return{base:{toComponent(){const e=t().base;return e?wp("base",[e]):[]},toString(){const e=t();return e.base?yp("base",[e.base],e.encodeSpecialCharacters):""}},bodyAttributes:{toComponent:()=>bp(t().bodyAttributes??{}),toString:()=>gp(t().bodyAttributes??{})},htmlAttributes:{toComponent:()=>bp(t().htmlAttributes??{}),toString:()=>gp(t().htmlAttributes??{})},link:{toComponent:()=>wp("link",t().links??[]),toString(){const e=t();return yp("link",e.links??[],e.encodeSpecialCharacters)}},meta:{toComponent:()=>wp("meta",t().meta??[]),toString(){const e=t();return yp("meta",e.meta??[],e.encodeSpecialCharacters)}},noscript:{toComponent:()=>wp("noscript",t().noscript??[]),toString(){const e=t();return yp("noscript",e.noscript??[],e.encodeSpecialCharacters)}},priority:{toComponent(){const e=t();return[...wp("meta",e.priority?.meta??[]),...wp("link",e.priority?.links??[]),...wp("script",e.priority?.script??[])]},toString(){const e=t(),n=yp("meta",e.priority?.meta??[],e.encodeSpecialCharacters),r=yp("link",e.priority?.links??[],e.encodeSpecialCharacters),i=yp("script",e.priority?.script??[],e.encodeSpecialCharacters);let a=n;return r&&(a&&(a+=" "),a+=r),i&&(a&&(a+=" "),a+=i),a}},script:{toComponent:()=>wp("script",t().script??[]),toString(){const e=t();return yp("script",e.script??[],e.encodeSpecialCharacters)}},style:{toComponent:()=>wp("style",t().style??[]),toString(){const e=t();return yp("style",e.style??[],e.encodeSpecialCharacters)}},title:{toComponent(){const e=t();return n=e.title??"",r=e.titleAttributes??{},[/*#__PURE__*/I("title",{...bp(r,{addHelmetDataAttr:!0}),children:n},n)];var n,r},toString(){const e=t();return((e,t,n)=>{let r=gp(t);r&&(r=` ${r}`);const i=ap(e);return`<title ${Zd}="true"${r}>${mp(i,n)}</title>`})(e.title??"",e.titleAttributes??{},e.encodeSpecialCharacters)}}}}(e),t(e.serverState)),n.current=e}const r=n.current,[i]=S(()=>({clientApply(){Qd&&!r.state&&(r.state=cp(r.helmets),r.state.defer?r.nextAnimFrameId??=requestAnimationFrame(()=>{r.state??=cp(r.helmets),fp(r.state,r.firstRender),r.firstRender=!1,delete r.nextAnimFrameId}):(void 0!==r.nextAnimFrameId&&(cancelAnimationFrame(r.nextAnimFrameId),delete r.nextAnimFrameId),fp(r.state,r.firstRender),r.firstRender=!1))},update(e,t){const n=r.helmets.findIndex(t=>t[0]===e);n>=0?(delete r.state,t?r.helmets[n][1]=t:r.helmets.splice(n,1)):t&&(delete r.state,r.helmets.push([e,t]))}}));/*#__PURE__*/
27
- return I(kp,{value:i,children:e})};function Sp(e){const t=Jd[e];return t&&console.warn(`"${e}" is not a valid JSX prop, replace it by "${t}"`),t??e}function Tp(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.slice():r;return t}(e);for(const n of Object.values(e))if(Array.isArray(n)){for(const e of n)if(e)for(const t of Object.keys(e)){const n=Sp(t);n!==t&&(e[n]=e[t],delete e[t])}}else if(n&&"object"==typeof n){const e=n;for(const t of Object.keys(e)){const n=Sp(t);n!==t&&(e[n]=e[t],delete e[t])}}return n.forEach(e.children,e=>{if(null==e)return;if("object"!=typeof e||!("props"in e))throw Error(`"${typeof e}" is not a valid <Helmet> descendant`);let n;const r={};if(e.props)for(const[t,o]of Object.entries(e.props))"children"===t?n=o:r[Sp(t)]=o;let{type:i}=e;function a(e){"string"!=typeof e&&console.error(`child of ${i} element should be a string`)}switch("symbol"==typeof i&&(i=i.toString()),function(e,t){if("string"!=typeof e)throw Error("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");if(!Yd.includes(e))throw Error(`Only elements types ${Yd.join(", ")} are allowed. Helmet does not support rendering <${e}> elements. Refer to our API for more information.`);if(t&&"string"!=typeof t&&!Array.isArray(t))throw Error(`Helmet expects a string as a child of <${e}>. Did you forget to wrap your children in braces? ( <${e}>{\`\`}</${e}> ) Refer to our API for more information.`)}(i,n),i){case Wd.BASE:t.base=r;break;case Wd.BODY:t.bodyAttributes=r;break;case Wd.FRAGMENT:!function(e,t){const n=e;for(const[r,i]of Object.entries(t))if(Array.isArray(i)){const e=n[r];n[r]=e?e.concat(i):i}else n[r]=i}(t,Tp({children:n}));break;case Wd.HTML:t.htmlAttributes=r;break;case Wd.LINK:case Wd.META:if(n)throw Error(`<${i} /> elements are self-closing and can not contain children. Refer to our API for more information.`);lp(t,i,r);break;case Wd.NOSCRIPT:case Wd.SCRIPT:void 0!==n&&(a(n),r.innerHTML=n),lp(t,i,r);break;case Wd.STYLE:a(n),r.cssText=n,lp(t,i,r);break;case Wd.TITLE:t.titleAttributes=r,"string"==typeof n?t.title=n:Array.isArray(n)&&(t.title=n.join(""));case Wd.HEAD:}}),delete t.children,t}var Cp=e=>{const t=N(8),n=f(kp);if(!n)throw Error("<Helmet> component must be within a <HelmetProvider> children tree");const r=b();let i,a,o;return n.update(r,Tp(e)),t[0]!==n||t[1]!==r||t[2]!==e?(i=()=>{n.update(r,Tp(e)),n.clientApply()},t[0]=n,t[1]=r,t[2]=e,t[3]=i):i=t[3],g(i),t[4]!==n||t[5]!==r?(a=()=>()=>{n.update(r,void 0),n.clientApply()},o=[n,r],t[4]=n,t[5]=r,t[6]=a,t[7]=o):(a=t[6],o=t[7]),g(a,o),null},Ap=({className:e,children:t,direction:n="column",wrap:r,items:i,justify:a,gap:o,grow:s,shrink:l,basis:c,...u})=>(e=ps("ContainerCollapsable",{className:e,componentKey:"content"}),/* @__PURE__ */I(fs,{className:e,direction:n,wrap:r,items:i,justify:a,gap:o,shrink:l,basis:c,grow:s,...u,children:t})),Ep=/* @__PURE__ */I("i",{className:"fas fa-plus"}),Ip=/* @__PURE__ */I("i",{className:"fas fa-minus"}),_p=({children:e,className:t,title:n="Title",collapsed:r=!1,iconCollapsed:i=Ep,iconExpanded:a=Ip,placement:o="left",onClick:s,...l})=>{let c=ps("ContainerCollapsable",{className:t,componentKey:["header","headerContainer","headerTitle","headerIconContainer","headerSlot","headerSlotContainer"]});/* @__PURE__ */
28
- return _("div",{className:c.header,onClick:s,...l,children:[/* @__PURE__ */_("div",{className:c.headerContainer,children:["left"===o&&/* @__PURE__ */_("div",{className:c.headerIconContainer,children:[r&&i,!r&&a]}),/* @__PURE__ */I("div",{className:c.headerTitle,children:n})]}),/* @__PURE__ */_("div",{className:c.headerSlotContainer,children:[/* @__PURE__ */I("div",{className:c.headerSlot,children:e}),"right"===o&&/* @__PURE__ */_("div",{className:c.headerIconContainer,children:[r&&i,!r&&a]})]})]})},Op=({className:e="",collapsed:t=!1,children:r,direction:i="column",wrap:a,items:o,justify:l,gap:c,grow:d,shrink:p,basis:f,onChange:m,...g})=>{let[y,b]=S(t);e=ps("ContainerCollapsable",{className:e,componentKey:"root"}),Ss(()=>{b(t)},[t]);let v=h(e=>{e.stopPropagation(),b(!y),m?.(!y)},[y,m]),{header:w,content:x}=k(()=>{let e={header:void 0,content:void 0};return n.forEach(r,t=>{u(t)&&(t.type===_p?e.header=s(t,{...t.props,collapsed:y,onClick:v}):t.type===Ap&&(e.content=s(t)))}),e},[r,y,v]);/* @__PURE__ */
29
- return _(fs,{className:e,direction:i,wrap:a,items:o,justify:l,gap:c,shrink:p,basis:f,grow:!!d&&!y,...g,children:[w,!y&&x]})};Op.Header=_p,Op.Content=Ap;var Np={root:vr(""),header:vr("flex justify-between items-center cursor-pointer select-none gap-2 px-2 py-1 transition-colors duration-150 hover:bg-gray-50 dark:hover:bg-zinc-800/60 text-zinc-800 dark:text-zinc-200"),headerContainer:vr("flex items-center gap-2 min-w-0"),headerSlot:vr(""),headerSlotContainer:vr("flex items-center gap-2 shrink-0"),headerTitle:vr("m-0 flex items-center grow cursor-pointer truncate text-sm font-medium text-zinc-700 dark:text-zinc-300"),headerIconContainer:vr("flex items-center justify-center w-4 shrink-0 text-zinc-400 dark:text-zinc-500"),content:vr("")},Mp=Op,Pp={root:vr("relative flex flex-col"),rootInternal:vr("flex flex-col grow overflow-auto"),handlerContainer:vr("absolute flex justify-center items-center z-40",{variants:{intent:{},position:{n:"w-auto h-1 left-0 right-0 top-0 bg-gray-200 dark:bg-zinc-800",s:"w-auto h-1 left-0 right-0 bottom-0 bg-gray-200 dark:bg-zinc-800",e:"h-auto w-1 top-0 bottom-0 right-0 bg-gray-200 dark:bg-zinc-800",w:"h-auto w-1 top-0 left-0 bottom-0 bg-gray-200 dark:bg-zinc-800",sw:"",nw:"",se:"-right-4 -bottom-4",ne:""},hover:{true:"hidden group-5-hover:flex",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}}),handler:vr("transition-[width,background-color] duration-500",{variants:{intent:{},position:{n:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",s:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",e:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ew-resize",w:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-ui cursor-ew-resize",sw:"",nw:"",se:"h-3 w-3 cursor-se-resize border-b-4 border-r-4 border-zinc-400 dark:border-zinc-700 hover:border-primary-ui hover:dark:border-primary-ui active:pointer-events-none rounded-br-lg",ne:""},hover:{true:"",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}})},Lp=["se"],Dp=({ref:e,className:t,parentRef:n,hoverMode:r=!1,autoGrow:i=!0,width:a=1/0,height:o=1/0,grid:s,resizeHandles:l=Lp,transformScale:c=1,axis:u="both",lockAspectRatio:d=!1,minConstraintsX:p=100,minConstraintsY:f=100,maxConstraintsX:m=1/0,maxConstraintsY:y=1/0,children:b,handle:w,onChange:T,...C})=>{let A=ps("ContainerResizable",{className:t,componentKey:["root","rootInternal"]}),[E,O]=S(a),[N,M]=S(o),[P,L]=S(0),[D,z]=S(),[R,j]=S(0),[$,F]=S(0),[q,B]=S(0),H=x(null);v(e,()=>H.current,[H]);let W=x(null),V=k(()=>T?fr(T,150):void 0,[T]),G=h(()=>!n?.current&&typeof document<"u"?document.body:n?.current,[n]),K=h((e,t,n=!1)=>{let[r,i]=[[p,f],[m,y]];if(d)if(t===N){let n=E/N;e=(t=e/n)*n}else{let n=N/E;t=(e=t/n)*n}r[0]&&r[1]&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i[0]&&i[1]&&(e=Math.min(i[0],e),t=Math.min(i[1],t));let a=H.current?.getBoundingClientRect();return!n&&a&&(a.x+e>window.innerWidth&&(e=window.innerWidth-a.x),a.y+t>window.innerHeight&&(t=window.innerHeight-a.y)),[e,t]},[N,d,m,y,p,f,E]),Y=h(e=>{e.stopPropagation(),e.preventDefault();let t=e.clientX,n=e.clientY,r=(t-P)/c,i=(n-q)/c,a=("both"===u||"x"===u)&&-1===["n","s"].indexOf(D??""),o=("both"===u||"y"===u)&&-1===["e","w"].indexOf(D??""),l=D?.includes("w")||D?.includes("n");if(Array.isArray(s)&&([r,i]=((e,t,n)=>[Math.round(e/n[0])*n[0],Math.round(t/n[1])*n[1]])(r,i,s),!r&&!i))return;let d=R+(a?r:0),p=$+(o?i:0);l&&(d=R-(a?r:0),p=$-(o?i:0)),(d!==R||p!==$)&&([d,p]=K(d,p,l),V?.(d,p),R!==1/0&&W.current&&(W.current.style.width=`${d}px`),$!==1/0&&W.current&&(W.current.style.height=`${p}px`))},[u,P,q,D,s,$,R,K,c,V]),J=h(e=>{e.stopPropagation(),e.preventDefault(),z(void 0),E!==1/0&&O(W.current?.offsetWidth??E),N!==1/0&&M(W.current?.offsetHeight??N),typeof document<"u"&&(document.body.style.userSelect=""),G()?.classList.remove("resizing")},[G,N,E]),X=h(e=>t=>{if(!H.current)return;t.preventDefault(),typeof document<"u"&&(document.body.style.userSelect="none"),G()?.classList.add("resizing"),z(e),L(t.clientX),B(t.clientY);let{width:n,height:r}=H.current.getBoundingClientRect();j(-1===E?n:E),F(-1===N?r:N)},[G,N,E]);g(()=>(D&&(window.addEventListener("mousemove",Y,!1),window.addEventListener("mouseup",J,!1)),()=>{D&&(window.removeEventListener("mousemove",Y,!1),window.removeEventListener("mouseup",J,!1))}),[D]),g(()=>{O(a),M(o)},[a,o]);let Z=h(e=>w?"function"==typeof w?w(e):w:/* @__PURE__ */I("div",{className:Pp.handlerContainer({position:e,hover:r}),onMouseDown:X(e),children:/* @__PURE__ */I("div",{className:Pp.handler({position:e})})},e),[w,X,r]),Q=k(()=>l.map(e=>Z(e)),[l,Z]),ee={};return N!==1/0&&(ee.height=`${N}px`),E!==1/0&&(ee.width=`${E}px`),/* @__PURE__ */_("div",{...C,ref:H,className:U(A.root,{"group-5":r,grow:i}),children:[/* @__PURE__ */I("div",{ref:W,className:U(A.rootInternal,{"pt-1":l.includes("n"),"pb-1":l.includes("s"),"pl-1":l.includes("w"),"pr-1":l.includes("e")}),style:ee,children:b}),Q]})},zp=({children:e,className:t,size:n})=>(t=ps("ContainerTabs",{className:t,componentKey:"content",variants:{size:n}}),/* @__PURE__ */I("div",{className:t,children:e})),Rp=({className:e,label:t="Tab Name",active:n,index:r=0,size:i,onSelect:a})=>{e=ps("ContainerTabs",{className:e,componentKey:"tab",variants:{active:n,size:i}});let o=h(()=>a?.(r),[r,a]);/* @__PURE__ */
30
- return I("div",{className:e,onClick:o,children:t})},jp=({className:e,items:t=[],tabSelected:n=0,size:r,onSelect:i})=>(e=ps("ContainerTabs",{className:e,componentKey:"tabs",variants:{size:r}}),/* @__PURE__ */I("div",{className:e,children:t.map((e,t)=>/* @__PURE__ */I(Rp,{label:e.label,active:n===t,index:t,size:r,onSelect:i},t))})),$p=({children:e,className:t,size:r})=>{t=ps("ContainerTabs",{className:t,componentKey:"root",variants:{size:r}});let[i,a]=S(0),o=h(e=>a(e),[]),{tabs:l,content:c}=k(()=>{let t={tabs:/* @__PURE__ */I(jp,{tabSelected:i,size:r,onSelect:o}),content:/* @__PURE__ */I(zp,{})},a=0;return n.forEach(e,e=>{if(u(e))if(e.type===jp){let n=e.props;t.tabs=s(e,{...n,key:"tabs",tabSelected:i,size:r,onSelect:o})}else if(e.type===zp&&a++===i){let n=e.props;t.content=s(e,{...n,key:`content-${i}`,size:r})}}),t},[i,o,e,r]);/* @__PURE__ */
31
- return _("div",{className:t,children:[l,c]})};$p.Tabs=jp,$p.TabContent=zp;var Fp={root:vr("flex flex-col"),content:vr("flex"),tabs:vr("flex bg-gray-100 dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg p-1 select-none gap-0.5"),tab:vr("flex items-center justify-center rounded-md basis-0 grow cursor-pointer py-1 px-3 text-sm font-medium transition-colors duration-150 select-none",{variants:{active:{true:"bg-white dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100 shadow-sm",false:"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{active:!1,size:"md"}})},qp=$p,Bp={root:vr("",{variants:{size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{size:"md"}})},Up=({className:e="focus-visible:px-1 focus-visible:m-px focus-visible:outline-dashed focus-visible:outline-1",myWindow:t,value:n="",exitOnEnter:r=!0,exitOnEscape:i=!0,updateMode:a="blur",openMode:o="click",size:s,onChange:l,onEditOpen:c,onEditClose:u})=>{e=ps("ContentEditable",{className:e,componentKey:"root",variants:{size:s}});let d=x(null),p=k(()=>t||(typeof window<"u"?window:void 0),[t]);g(()=>{d.current&&d.current.textContent!==n&&(d.current.textContent=n)},[n]);let f=h(e=>{"change"===a&&l?.(e.target.textContent)},[l,a]),m=h(e=>{if(!p)return;let t=p.document.createRange(),n=p.getSelection();t.setStart(e,e.childNodes.length),t.collapse(!0),n?.removeAllRanges(),n?.addRange(t)},[p]),y=h(()=>{let e=d.current;e&&(("inherit"===e.contentEditable||"false"===e.contentEditable)&&m(e),"click"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.()))},[o,m,c]),b=h(()=>{let e=d.current;e&&"doubleClick"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.())},[o,c]),v=h(()=>{let e=d.current;e&&(e.setAttribute("contenteditable","false"),"blur"===a&&e.textContent!==n&&l?.(e.textContent),u?.())},[l,a,n,u]),w=h(e=>{e.stopPropagation(),r&&13===e.keyCode?(e.preventDefault(),e.target.blur()):i&&27===e.keyCode&&(e.preventDefault(),e.target.textContent=n,e.target.blur())},[r,i,n]);/* @__PURE__ */
32
- return I("div",{className:e,ref:d,onClick:y,onDoubleClick:b,onBlur:v,onInput:f,onKeyDown:w})},Hp={root:vr("text-zinc-900 dark:text-zinc-100",{variants:{as:{h1:"text-5xl font-extrabold",h2:"text-4xl font-extrabold",h3:"text-3xl font-bold",h4:"text-2xl font-bold",h5:"text-xl font-bold",h6:"text-lg font-bold"}},compoundVariants:[],defaultVariants:{as:"h1"}})};function Wp(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var Vp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kp={};function Yp(e,t){return((t||Kp).jsx?Gp:Vp).test(e)}var Jp=/[ \t\n\f\r]/g;function Xp(e){return""===e.replace(Jp,"")}var Zp=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function Qp(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Zp(n,r,t)}function ef(e){return e.toLowerCase()}Zp.prototype.normal={},Zp.prototype.property={},Zp.prototype.space=void 0;var tf=class{constructor(e,t){this.attribute=t,this.property=e}};tf.prototype.attribute="",tf.prototype.booleanish=!1,tf.prototype.boolean=!1,tf.prototype.commaOrSpaceSeparated=!1,tf.prototype.commaSeparated=!1,tf.prototype.defined=!1,tf.prototype.mustUseProperty=!1,tf.prototype.number=!1,tf.prototype.overloadedBoolean=!1,tf.prototype.property="",tf.prototype.spaceSeparated=!1,tf.prototype.space=void 0;var nf=/* @__PURE__ */$({boolean:()=>af,booleanish:()=>of,commaOrSpaceSeparated:()=>df,commaSeparated:()=>uf,number:()=>lf,overloadedBoolean:()=>sf,spaceSeparated:()=>cf}),rf=0,af=pf(),of=pf(),sf=pf(),lf=pf(),cf=pf(),uf=pf(),df=pf();function pf(){return 2**++rf}var ff=Object.keys(nf),hf=class extends tf{constructor(e,t,n,r){let i=-1;if(super(e,t),mf(this,"space",r),"number"==typeof n)for(;++i<ff.length;){const e=ff[i];mf(this,ff[i],(n&nf[e])===nf[e])}}};function mf(e,t,n){n&&(e[t]=n)}function gf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new hf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ef(r)]=r,n[ef(a.attribute)]=r}return new Zp(t,n,e.space)}hf.prototype.defined=!0;var yf=gf({properties:{ariaActiveDescendant:null,ariaAtomic:of,ariaAutoComplete:null,ariaBusy:of,ariaChecked:of,ariaColCount:lf,ariaColIndex:lf,ariaColSpan:lf,ariaControls:cf,ariaCurrent:null,ariaDescribedBy:cf,ariaDetails:null,ariaDisabled:of,ariaDropEffect:cf,ariaErrorMessage:null,ariaExpanded:of,ariaFlowTo:cf,ariaGrabbed:of,ariaHasPopup:null,ariaHidden:of,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:cf,ariaLevel:lf,ariaLive:null,ariaModal:of,ariaMultiLine:of,ariaMultiSelectable:of,ariaOrientation:null,ariaOwns:cf,ariaPlaceholder:null,ariaPosInSet:lf,ariaPressed:of,ariaReadOnly:of,ariaRelevant:null,ariaRequired:of,ariaRoleDescription:cf,ariaRowCount:lf,ariaRowIndex:lf,ariaRowSpan:lf,ariaSelected:of,ariaSetSize:lf,ariaSort:null,ariaValueMax:lf,ariaValueMin:lf,ariaValueNow:lf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function bf(e,t){return t in e?e[t]:t}function vf(e,t){return bf(e,t.toLowerCase())}var wf=gf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:uf,acceptCharset:cf,accessKey:cf,action:null,allow:null,allowFullScreen:af,allowPaymentRequest:af,allowUserMedia:af,alpha:af,alt:null,as:null,async:af,autoCapitalize:null,autoComplete:cf,autoFocus:af,autoPlay:af,blocking:cf,capture:null,charSet:null,checked:af,cite:null,className:cf,closedBy:null,colorSpace:null,cols:lf,colSpan:lf,command:null,commandFor:null,content:null,contentEditable:of,controls:af,controlsList:cf,coords:lf|uf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:af,defer:af,dir:null,dirName:null,disabled:af,download:sf,draggable:of,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:af,formTarget:null,headers:cf,height:lf,hidden:sf,high:lf,href:null,hrefLang:null,htmlFor:cf,httpEquiv:cf,id:null,imageSizes:null,imageSrcSet:null,inert:af,inputMode:null,integrity:null,is:null,isMap:af,itemId:null,itemProp:cf,itemRef:cf,itemScope:af,itemType:cf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:af,low:lf,manifest:null,max:null,maxLength:lf,media:null,method:null,min:null,minLength:lf,multiple:af,muted:af,name:null,nonce:null,noModule:af,noValidate:af,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:af,optimum:lf,pattern:null,ping:cf,placeholder:null,playsInline:af,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:af,referrerPolicy:null,rel:cf,required:af,reversed:af,rows:lf,rowSpan:lf,sandbox:cf,scope:null,scoped:af,seamless:af,selected:af,shadowRootClonable:af,shadowRootCustomElementRegistry:af,shadowRootDelegatesFocus:af,shadowRootMode:null,shadowRootSerializable:af,shape:null,size:lf,sizes:null,slot:null,span:lf,spellCheck:of,src:null,srcDoc:null,srcLang:null,srcSet:null,start:lf,step:null,style:null,tabIndex:lf,target:null,title:null,translate:null,type:null,typeMustMatch:af,useMap:null,value:of,width:lf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:cf,axis:null,background:null,bgColor:null,border:lf,borderColor:null,bottomMargin:lf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:af,declare:af,event:null,face:null,frame:null,frameBorder:null,hSpace:lf,leftMargin:lf,link:null,longDesc:null,lowSrc:null,marginHeight:lf,marginWidth:lf,noResize:af,noHref:af,noShade:af,noWrap:af,object:null,profile:null,prompt:null,rev:null,rightMargin:lf,rules:null,scheme:null,scrolling:of,standby:null,summary:null,text:null,topMargin:lf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:lf,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:af,disablePictureInPicture:af,disableRemotePlayback:af,exportParts:uf,part:cf,prefix:null,property:null,results:lf,security:null,unselectable:null},space:"html",transform:vf}),kf=gf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:df,accentHeight:lf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:lf,amplitude:lf,arabicForm:null,ascent:lf,attributeName:null,attributeType:null,azimuth:lf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:lf,by:null,calcMode:null,capHeight:lf,className:cf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:lf,diffuseConstant:lf,direction:null,display:null,dur:null,divisor:lf,dominantBaseline:null,download:af,dx:null,dy:null,edgeMode:null,editable:null,elevation:lf,enableBackground:null,end:null,event:null,exponent:lf,externalResourcesRequired:null,fill:null,fillOpacity:lf,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:uf,g2:uf,glyphName:uf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:lf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:lf,horizOriginX:lf,horizOriginY:lf,id:null,ideographic:lf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:lf,k:lf,k1:lf,k2:lf,k3:lf,k4:lf,kernelMatrix:df,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:lf,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:lf,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:lf,overlineThickness:lf,paintOrder:null,panose1:null,path:null,pathLength:lf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:cf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:lf,pointsAtY:lf,pointsAtZ:lf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:df,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:df,rev:df,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:df,requiredFeatures:df,requiredFonts:df,requiredFormats:df,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:lf,specularExponent:lf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:lf,strikethroughThickness:lf,string:null,stroke:null,strokeDashArray:df,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:lf,strokeOpacity:lf,strokeWidth:null,style:null,surfaceScale:lf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:df,tabIndex:lf,tableValues:null,target:null,targetX:lf,targetY:lf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:df,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:lf,underlineThickness:lf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:lf,values:null,vAlphabetic:lf,vMathematical:lf,vectorEffect:null,vHanging:lf,vIdeographic:lf,version:null,vertAdvY:lf,vertOriginX:lf,vertOriginY:lf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:lf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bf}),xf=gf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Sf=gf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vf}),Tf=gf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Cf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Af=/[A-Z]/g,Ef=/-[a-z]/g,If=/^data[-\w.:]+$/i;function _f(e,t){const n=ef(t);let r=t,i=tf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&If.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Ef,Nf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Ef.test(e)){let n=e.replace(Af,Of);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=hf}return new i(r,t)}function Of(e){return"-"+e.toLowerCase()}function Nf(e){return e.charAt(1).toUpperCase()}var Mf=Qp([yf,wf,xf,Sf,Tf],"html"),Pf=Qp([yf,kf,xf,Sf,Tf],"svg");function Lf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}var Df=/* @__PURE__ */j((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function f(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function k(){var e=h(),t=y(a);if(t){if(w(),!y(o))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=k();)!1!==e&&(t.push(e),v(t));return t}()}}),zf=/* @__PURE__ */j(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),a="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;a?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(Df())}),Rf=/* @__PURE__ */j(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(a,s):e.replace(i,s)).replace(n,o))}}),jf=/* @__PURE__ */j((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(zf()),r=Rf();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),$f=qf("end"),Ff=qf("start");function qf(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Bf(e){return e&&"object"==typeof e?"position"in e||"type"in e?Hf(e.position):"start"in e||"end"in e?Hf(e):"line"in e||"column"in e?Uf(e):"":""}function Uf(e){return Wf(e&&e.line)+":"+Wf(e&&e.column)}function Hf(e){return Uf(e&&e.start)+"-"+Uf(e&&e.end)}function Wf(e){return e&&"number"==typeof e?e:1}var Vf=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Bf(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Vf.prototype.file="",Vf.prototype.name="",Vf.prototype.reason="",Vf.prototype.message="",Vf.prototype.stack="",Vf.prototype.column=void 0,Vf.prototype.line=void 0,Vf.prototype.ancestors=void 0,Vf.prototype.cause=void 0,Vf.prototype.fatal=void 0,Vf.prototype.place=void 0,Vf.prototype.ruleId=void 0,Vf.prototype.source=void 0;var Gf=/* @__PURE__ */F(jf(),1),Kf={}.hasOwnProperty,Yf=/* @__PURE__ */new Map,Jf=/[A-Z]/g,Xf=/* @__PURE__ */new Set(["table","tbody","thead","tfoot","tr"]),Zf=/* @__PURE__ */new Set(["td","th"]),Qf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eh(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=Pf,e.schema=i),e.ancestors.push(t);const a=ah(e,t.tagName,!1),o=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&Kf.call(t.properties,i)){const a=ih(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&Zf.has(t.tagName)?r=o:n[i]=o}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=rh(e,t);return Xf.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Xp(t.value):Xp(t));var t})),th(e,o,a,t),nh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
33
- /* @__PURE__ */return n.type,e.evaluater.evaluateExpression(n.expression)}oh(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=Pf,e.schema=i),e.ancestors.push(t);const a=null===t.name?e.Fragment:ah(e,t.name,!0),o=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];
24
+ return _(xs,{className:n,id:x.id,label:i,loading:o,clearable:l,value:m,prefix:u,disabled:s,error:g,intent:f,size:p,onClear:T,...y,children:[t,/* @__PURE__ */I("input",{ref:e,...x.controlProps,type:d,placeholder:a,className:k,disabled:s||o,value:m,onChange:S,...w})]})}),{Icon:ms}),Cs={root:vr("flex flex-col",{variants:{intent:{primary:"",custom:""},disabled:{true:"opacity-60 pointer-events-none",false:""},size:{md:"gap-1.5",sm:"gap-1 text-sm",xs:"gap-1 text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),inputContainer:vr("flex items-center border relative transition-colors duration-150 focus-within:ring-2 focus-within:ring-offset-0",{variants:{intent:{primary:"bg-white text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",custom:""},error:{true:"border-red-500 focus-within:ring-red-500/30",false:"border-gray-300 dark:border-zinc-700 focus-within:ring-primary-500/30 dark:focus-within:ring-primary-400/30 hover:border-gray-400 dark:hover:border-zinc-500"},disabled:{true:"cursor-not-allowed opacity-60 pointer-events-none",false:""},size:{md:"py-2 px-3 gap-2 rounded-lg",sm:"py-1.5 px-2.5 gap-1.5 rounded-md",xs:"py-1 px-2 gap-1 rounded-sm",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",error:!1,disabled:!1,size:"md"}}),input:vr("p-0 border-0 outline-none focus:ring-0 w-full bg-transparent",{variants:{intent:{primary:"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-200 dark:placeholder:text-zinc-500"},error:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:""},size:{md:"text-sm",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md",disabled:!1,error:!1}}),label:vr("text-sm font-medium text-zinc-700 dark:text-zinc-300",{variants:{inline:{true:"flex select-none items-center",false:""},disabled:{true:"",false:""},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[{inline:!0,disabled:!0,className:"cursor-not-allowed"},{inline:!0,disabled:!1,className:"cursor-pointer"},{inline:!0,size:"md",className:"gap-2"},{inline:!0,size:"sm",className:"gap-1.5"},{inline:!0,size:"xs",className:"gap-1"}],defaultVariants:{inline:!1,disabled:!1,size:"md"}}),iconFloatingContainer:vr("flex items-center justify-center",{variants:{intent:{primary:""},size:{md:"gap-2",sm:"gap-1.5",xs:"gap-1",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),icon:vr("border-r border-gray-300 dark:border-zinc-700 text-zinc-400 dark:text-zinc-500 shrink-0",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""},size:{md:"pr-2.5 mr-0.5",sm:"pr-2 mr-0.5",xs:"pr-1.5 mr-0.5",custom:""}},compoundVariants:[],defaultVariants:{intent:"primary",size:"md"}}),iconError:vr("",{variants:{intent:{primary:""},error:{true:"text-red-500 dark:text-red-400",false:""}},compoundVariants:[],defaultVariants:{intent:"primary"}}),iconClear:vr("cursor-pointer text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors duration-150"),iconLoading:vr("text-zinc-400 dark:text-zinc-500")},As=Ts,Es=Symbol.for("immer-nothing"),Is=Symbol.for("immer-draftable"),_s=Symbol.for("immer-state");function Os(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ns=Object,Ms=Ns.getPrototypeOf,Ps="constructor",Ls="prototype",Ds="configurable",zs="enumerable",Rs="writable",js="value",$s=e=>!!e&&!!e[_s];function Fs(e){return!!e&&(Us(e)||Ys(e)||!!e[Is]||!!e[Ps]?.[Is]||Js(e)||Xs(e))}var qs=Ns[Ls][Ps].toString(),Bs=/* @__PURE__ */new WeakMap;function Us(e){if(!e||!Zs(e))return!1;const t=Ms(e);if(null===t||t===Ns[Ls])return!0;const n=Ns.hasOwnProperty.call(t,Ps)&&t[Ps];if(n===Object)return!0;if(!Qs(n))return!1;let r=Bs.get(n);return void 0===r&&(r=Function.toString.call(n),Bs.set(n,r)),r===qs}function Hs(e,t,n=!0){0===Ws(e)?(n?Reflect.ownKeys(e):Ns.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ws(e){const t=e[_s];return t?t.type_:Ys(e)?1:Js(e)?2:Xs(e)?3:0}var Vs=(e,t,n=Ws(e))=>2===n?e.has(t):Ns[Ls].hasOwnProperty.call(e,t),Gs=(e,t,n=Ws(e))=>2===n?e.get(t):e[t],Ks=(e,t,n,r=Ws(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},Ys=Array.isArray,Js=e=>e instanceof Map,Xs=e=>e instanceof Set,Zs=e=>"object"==typeof e,Qs=e=>"function"==typeof e,el=e=>"boolean"==typeof e,tl=e=>e.copy_||e.base_,nl=e=>e.modified_?e.copy_:e.base_;function rl(e,t){if(Js(e))return new Map(e);if(Xs(e))return new Set(e);if(Ys(e))return Array[Ls].slice.call(e);const n=Us(e);if(!0===t||"class_only"===t&&!n){const t=Ns.getOwnPropertyDescriptors(e);delete t[_s];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const i=n[r],a=t[i];!1===a[Rs]&&(a[Rs]=!0,a[Ds]=!0),(a.get||a.set)&&(t[i]={[Ds]:!0,[Rs]:!0,[zs]:a[zs],[js]:e[i]})}return Ns.create(Ms(e),t)}{const t=Ms(e);if(null!==t&&n)return{...e};const r=Ns.create(t);return Ns.assign(r,e)}}function il(e,t=!1){return ol(e)||$s(e)||!Fs(e)||(Ws(e)>1&&Ns.defineProperties(e,{set:al,add:al,clear:al,delete:al}),Ns.freeze(e),t&&Hs(e,(e,t)=>{il(t,!0)},!1)),e}var al={[js]:function(){Os(2)}};function ol(e){return null===e||!Zs(e)||Ns.isFrozen(e)}var sl="MapSet",ll="Patches",cl="ArrayMethods",ul={};function dl(e){const t=ul[e];return t||Os(0),t}var pl,fl=e=>!!ul[e],hl=()=>pl;function ml(e,t){t&&(e.patchPlugin_=dl(ll),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gl(e){yl(e),e.drafts_.forEach(vl),e.drafts_=null}function yl(e){e===pl&&(pl=e.parent_)}var bl=e=>pl={drafts_:[],parent_:pl,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:/* @__PURE__ */new Set,processedForPatches_:/* @__PURE__ */new Set,mapSetPlugin_:fl(sl)?dl(sl):void 0,arrayMethodsPlugin_:fl(cl)?dl(cl):void 0};function vl(e){const t=e[_s];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function wl(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[_s].modified_&&(gl(t),Os(4)),Fs(e)&&(e=kl(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[_s].base_,e,t)}else e=kl(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&il(t,n)}(t,e,!0),gl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Es?e:void 0}function kl(e,t){if(ol(t))return t;const n=t[_s];if(!n)return El(t,e.handledSet_,e);if(!Sl(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Al(n,e)}return n.copy_}function xl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Sl=(e,t)=>e.scope_===t,Tl=[];function Cl(e,t,n,r){const i=tl(e),a=e.type_;if(void 0!==r&&Gs(i,r,a)===t)return void Ks(i,r,n,a);if(!e.draftLocations_){const t=e.draftLocations_=/* @__PURE__ */new Map;Hs(i,(e,n)=>{if($s(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const o=e.draftLocations_.get(t)??Tl;for(const s of o)Ks(i,s,n,a)}function Al(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}xl(e)}}function El(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||$s(e)||t.has(e)||!Fs(e)||ol(e)||(t.add(e),Hs(e,(r,i)=>{if($s(i)){const t=i[_s];Sl(t,n)&&(Ks(e,r,nl(t),e.type_),xl(t))}else Fs(i)&&El(i,t,n)})),e}var Il={get(e,t){if(t===_s)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=tl(e);if(!Vs(i,t,e.type_))return function(e,t,n){const r=Nl(t,n);return r?js in r?r[js]:r.get?.call(e.draft_):void 0}(e,i,t);const a=i[t];if(e.finalized_||!Fs(a))return a;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===Ol(e.base_,t)||function(e,t,n){return!(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Fs(n)||n[_s])&&e.baseRefs_.has(n)}(e,t,a)){Pl(e);const n=1===e.type_?+t:t,r=Ll(e.scope_,a,e,n);return e.copy_[n]=r}return a},has:(e,t)=>t in tl(e),ownKeys:e=>Reflect.ownKeys(tl(e)),set(e,t,n){const r=Nl(tl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ol(tl(e),t),i=r?.[_s];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Vs(e.base_,t,e.type_)))return!0;Pl(e),Ml(e)}return e.copy_[t]===n&&(void 0!==n||Vs(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if($s(n)){const i=n[_s];Sl(i,r)&&i.callbacks_.push(function(){Pl(e),Cl(e,n,nl(i),t)})}else Fs(n)&&e.callbacks_.push(function(){const i=tl(e);3===e.type_?i.has(n)&&El(n,r.handledSet_,r):Gs(i,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&El(Gs(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Pl(e),void 0!==Ol(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Ml(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=tl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[Rs]:!0,[Ds]:1!==e.type_||"length"!==t,[zs]:r[zs],[js]:n[t]}:r},defineProperty(){Os(11)},getPrototypeOf:e=>Ms(e.base_),setPrototypeOf(){Os(12)}},_l={};for(let EO in Il){let e=Il[EO];_l[EO]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function Ol(e,t){const n=e[_s];return(n?tl(n):e)[t]}function Nl(e,t){if(!(t in e))return;let n=Ms(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ms(n)}}function Ml(e){e.modified_||(e.modified_=!0,e.parent_&&Ml(e.parent_))}function Pl(e){e.copy_||(e.assigned_=/* @__PURE__ */new Map,e.copy_=rl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Ll(e,t,n,r){const[i,a]=Js(t)?dl(sl).proxyMap_(t,n):Xs(t)?dl(sl).proxySet_(t,n):function(e,t){const n=Ys(e),r={type_:n?1:0,scope_:t?t.scope_:hl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=Il;n&&(i=[r],a=_l);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}(t,n);return(n?.scope_??hl()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Sl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const a=nl(i);Cl(e,i.draft_??i,a,n),Al(i,r)})}(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Dl(e){if(!Fs(e)||ol(e))return e;const t=e[_s];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rl(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=rl(e,!0);return Hs(n,(e,t)=>{Ks(n,e,Dl(t))},r),t&&(t.finalized_=!1),n}_l.deleteProperty=function(e,t){return _l.set.call(this,e,t,void 0)},_l.set=function(e,t,n){return Il.set.call(this,e[0],t,n,e[0])},globalThis.Iterator;var zl=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Qs(e)&&!Qs(t)){const n=t;t=e;const r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}let r;if(Qs(t)||Os(6),void 0===n||Qs(n)||Os(7),Fs(e)){const i=bl(this),a=Ll(0,e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?gl(i):yl(i)}return ml(i,n),wl(r,i)}if(!e||!Zs(e)){if(r=t(e),void 0===r&&(r=e),r===Es&&(r=void 0),this.autoFreeze_&&il(r,!0),n){const t=[],i=[];dl(ll).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Os(1)},this.produceWithPatches=(e,t)=>{if(Qs(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},el(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),el(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),el(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Fs(e)||Os(8),$s(e)&&($s(t=e)||Os(10),e=Dl(t));const n=bl(this),r=Ll(0,e,void 0);return r[_s].isManual_=!0,yl(n),r}finishDraft(e,t){const n=e&&e[_s];n&&n.isManual_||Os(9);const{scope_:r}=n;return ml(r,t),wl(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=dl(ll).applyPatches_;return $s(e)?r(e,t):this.produce(e,e=>r(e,t))}},Rl=zl.produce,jl=(e,t)=>`${e}_${t}`,$l=({id:e="",source:t,name:n,fields:r=[]})=>{let{useStoreSetter:i}=Ot(),a=i(),o=k(()=>`${e}_${((e,t=!0,n=!0)=>{let r="",i="abcdefghijklmnopqrstuvwxyz";t&&(i=`ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`),n&&(i=`${i}0123456789`);let a=i.length;for(let o=0;o<e;o++)r+=i.charAt(Math.floor(Math.random()*a));return r})(8)}`,[e]);g(()=>{if(t)return a(`sources.${o}`,{id:o,meta:{id:e,source:t,name:n,fields:r}}),()=>a(`sources.${o}`,void 0,{unmount:!0})},[o,t]),g(()=>{t&&a(`sources.${o}.meta.fields`,r,{raw:!0})},[r,t,o,a])},Fl=(e,t={})=>Array.isArray(e)?e.reduce((e,n)=>{let{name:r,value:i,subValues:a}=n;if(!Array.isArray(a)||0===a.length)return{...e,[r]:i};let o=a.find(e=>Oa(e.when,t));return{...e,[r]:o?o.value:i}},{}):{},ql=W("DevToolsContext",{logs:[],providers:{}}),Bl=(e,t=2)=>String(e).padStart(t,"0"),Ul=()=>typeof window<"u",Hl=new class{callbackInternal;callbackAddProvider;callbackRemoveProvider;pendingLimit=100;logsListenedLimit=1e3;pendingLogs=[];listening=!1;listeningCategory;logsListened=[];listeningParams;#e=[];#t=!1;#n=/* @__PURE__ */new Set;#r=[];recentLimit=200;constructor(e,t=100){this.callbackInternal=e,this.pendingLimit=t}setCallback(e){this.callbackInternal=e}processPendingLogs(){if(this.pendingLogs.length&&this.callbackInternal){for(let e of this.pendingLogs)this.callbackInternal(e.logType,e.category,e.message,e.params,e.time);this.pendingLogs=[]}}addListener(e,{replay:t=!1}={}){if(t)for(let n of this.#r)e(n);return this.#n.add(e),()=>{this.#n.delete(e)}}setCallbackAddProvider(e){this.callbackAddProvider=e}setCallbackRemoveProvider(e){this.callbackRemoveProvider=e}flush(e=!1){this.logsListened=[],e&&(this.pendingLogs=[])}#i(e,t,n,r){if(!this.callbackInternal&&!Ul())return;let i=this.getTime(!0);if(Ul()){let a={logType:e,category:t,message:n,params:r,time:i};this.#r.push(a),this.#r.length>this.recentLimit&&this.#r.shift();for(let e of this.#n)e(a)}if(!this.callbackInternal)return this.pendingLogs.push({logType:e,category:t,message:n,params:r,time:i}),void(this.pendingLogs.length>this.pendingLimit&&this.pendingLogs.shift());this.listening?this.logsListened.push({logType:e,category:t,message:n,params:r,time:i}):(this.#e.push({logType:e,category:t,message:n,params:r,time:i}),this.#a()),this.logsListened.length>this.logsListenedLimit&&this.logsListened.shift()}#a(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1;let e=this.callbackInternal,t=this.#e;if(this.#e=[],e)for(let n of t)e(n.logType,n.category,n.message,n.params,n.time)}))}addProviderMethod(e,t){this.callbackAddProvider?.(e,t)}removeProviderMethod(e){"function"==typeof this.callbackRemoveProvider&&this.callbackRemoveProvider(e)}getTime(e=!1){let t=/* @__PURE__ */new Date;return e?(e=>`${Bl(e.getHours())}:${Bl(e.getMinutes())}:${Bl(e.getSeconds())}.${Bl(e.getMilliseconds(),3)}`)(t):t}info(e,t,n){this.#i("info",e,t,n)}warning(e,t,n){this.#i("warning",e,t,n)}danger(e,t,n){this.#i("danger",e,t,n)}success(e,t,n){this.#i("success",e,t,n)}begin(e){this.listening=!0,this.listeningParams={category:e}}end(){this.listening=!1,this.listeningCategory&&this.logsListened.length>0&&this.callbackInternal?.("info",this.listeningCategory,`${this.logsListened.length} Log${1===this.logsListened.length?"":"s"}`,{logs:this.logsListened}),this.logsListened=[],this.listeningCategory=void 0}};function Wl(e="store"){return({path:t,prevValue:n,nextValue:r})=>{Hl.info("store",e,{storeName:e,path:t,prev:n,next:r})}}var Vl="[A-Za-z_][A-Za-z0-9_]*",Gl=RegExp(`^${Vl}$`),Kl=(/* @__PURE__ */RegExp(`^!?${Vl}$`),new Set(["__proto__","constructor","prototype"])),Yl=e=>Gl.test(e)&&!Kl.has(e),Jl=e=>{let t=e?.split(":")[1];return t?`plitzi_flags_${t}`:"plitzi_flags"},Xl=(e,t,n)=>{let{[t]:r,...i}=e;return void 0===n?i:{...i,[t]:n}},Zl=(e,t)=>{let n=Jl(e),r=(e=>Object.entries(e).filter(([e])=>Yl(e)).map(([e,t])=>`${e}:${t?"1":"0"}`).join(","))(t);try{document.cookie=r?`${n}=${encodeURIComponent(r)};path=/;SameSite=Lax`:`${n}=;path=/;max-age=0;SameSite=Lax`}catch{}},Ql=["server","sdk","qa"],ec=(e,t)=>{let n=((e,t)=>Array.isArray(e.rules)?e.rules.findIndex(e=>(e=>"object"==typeof e&&!!e&&"rules"in e&&Array.isArray(e.rules)&&e.rules.some(e=>!("object"!=typeof e||!e||"enabled"in e&&!1===e.enabled)))(e.when)&&((e,t)=>!!Oa(e,t))(e.when,t)):-1)(e,t);return-1===n?{value:e.value,layer:"space"}:{value:e.rules[n].value,layer:"space",rule:n}},tc=(e,t={},n={})=>Object.fromEntries(Object.entries(e??{}).map(([e,r])=>[e,Ql.reduce((t,r)=>{let i=n[r]?.[e];return"boolean"==typeof i?{value:i,layer:r}:t},ec(r,t))])),nc=e=>Object.fromEntries(Object.entries(e).map(([e,{value:t}])=>[e,t])),rc=(e,t)=>!e||(t[e.name]??!1)===e.is,ic=e=>{let t=x(e);return t.current!==e&&!ii(t.current,e)&&(t.current=e),t.current},ac="data-plitzi-fonts",oc=W("PlitziServiceContext",{}),sc=()=>{let e=f(oc);if(void 0===e)throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");return e},lc=e=>{let{children:t,value:n}=e;/* @__PURE__ */
25
+ return I(oc,{value:n,children:t})},cc={platform:{desktop:{},tablet:{},mobile:{}},mode:"desktop-first",theme:{default:"system",schemes:["light","dark"]},variables:{},fonts:[],cache:""},uc=(Object.values({DISPLAY:"display",FLEX_WRAP:"flex-wrap",FLEX_DIRECTION:"flex-direction",ALIGN_ITEMS:"align-items",JUSTIFY_ITEMS:"justify-items",JUSTIFY_CONTENT:"justify-content",ALIGN_CONTENT:"align-content",ROW_GAP:"row-gap",COLUMN_GAP:"column-gap",GRID_ROW_GAP:"grid-row-gap",GRID_COLUMN_GAP:"grid-column-gap",GRID_TEMPLATE_AREAS:"grid-template-areas",GRID_TEMPLATE_COLUMNS:"grid-template-columns",GRID_TEMPLATE_ROWS:"grid-template-rows",GRID_AUTO_FLOW:"grid-auto-flow",GRID_AUTO_ROWS:"grid-auto-rows",GRID_AUTO_COLUMNS:"grid-auto-columns",GRID_ROW_START:"grid-row-start",GRID_COLUMN_START:"grid-column-start",GRID_ROW_END:"grid-row-end",GRID_COLUMN_END:"grid-column-end",ALIGN_SELF:"align-self",JUSTIFY_SELF:"justify-self",ORDER:"order",FLEX_GROW:"flex-grow",FLEX_SHRINK:"flex-shrink",FLEX_BASIS:"flex-basis",LIST_STYLE:"list-style",LIST_STYLE_TYPE:"list-style-type",LIST_STYLE_POSITION:"list-style-position",LIST_STYLE_IMAGE:"list-style-image",BACKGROUND_COLOR:"background-color",BACKGROUND_IMAGE:"background-image",BACKGROUND_POSITION:"background-position",BACKGROUND_SIZE:"background-size",BACKGROUND_REPEAT:"background-repeat",BACKGROUND_ORIGIN:"background-origin",BACKGROUND_CLIP:"background-clip",BACKGROUND_ATTACHMENT:"background-attachment",BACKGROUND_BLEND_MODE:"background-blend-mode",MASK_IMAGE:"mask-image",MASK_SIZE:"mask-size",MASK_POSITION:"mask-position",MASK_REPEAT:"mask-repeat",MASK_COMPOSITE:"mask-composite",WEBKIT_MASK_IMAGE:"-webkit-mask-image",BORDER_TOP_STYLE:"border-top-style",BORDER_TOP_WIDTH:"border-top-width",BORDER_TOP_COLOR:"border-top-color",BORDER_BOTTOM_STYLE:"border-bottom-style",BORDER_BOTTOM_WIDTH:"border-bottom-width",BORDER_BOTTOM_COLOR:"border-bottom-color",BORDER_LEFT_STYLE:"border-left-style",BORDER_LEFT_WIDTH:"border-left-width",BORDER_LEFT_COLOR:"border-left-color",BORDER_RIGHT_STYLE:"border-right-style",BORDER_RIGHT_WIDTH:"border-right-width",BORDER_RIGHT_COLOR:"border-right-color",BORDER_TOP_LEFT_RADIUS:"border-top-left-radius",BORDER_TOP_RIGHT_RADIUS:"border-top-right-radius",BORDER_BOTTOM_LEFT_RADIUS:"border-bottom-left-radius",BORDER_BOTTOM_RIGHT_RADIUS:"border-bottom-right-radius",BORDER_COLLAPSE:"border-collapse",BORDER_SPACING:"border-spacing",TABLE_LAYOUT:"table-layout",OPACITY:"opacity",VISIBILITY:"visibility",CURSOR:"cursor",TRANSITION:"transition",TRANSITION_PROPERTY:"transition-property",TRANSITION_DURATION:"transition-duration",TRANSITION_TIMING_FUNCTION:"transition-timing-function",TRANSITION_DELAY:"transition-delay",TRANSITION_BEHAVIOR:"transition-behavior",ANIMATION:"animation",ANIMATION_NAME:"animation-name",ANIMATION_DURATION:"animation-duration",ANIMATION_TIMING_FUNCTION:"animation-timing-function",ANIMATION_DELAY:"animation-delay",ANIMATION_ITERATION_COUNT:"animation-iteration-count",ANIMATION_DIRECTION:"animation-direction",ANIMATION_FILL_MODE:"animation-fill-mode",ANIMATION_PLAY_STATE:"animation-play-state",ANIMATION_TIMELINE:"animation-timeline",ANIMATION_RANGE:"animation-range",BOX_SHADOW:"box-shadow",FILTER:"filter",BACKDROP_FILTER:"backdrop-filter",MIX_BLEND_MODE:"mix-blend-mode",ISOLATION:"isolation",CLIP_PATH:"clip-path",TRANSFORM:"transform",TRANSFORM_ORIGIN:"transform-origin",TRANSLATE:"translate",ROTATE:"rotate",SCALE:"scale",TRANSFORM_STYLE:"transform-style",PERSPECTIVE:"perspective",PERSPECTIVE_ORIGIN:"perspective-origin",BACKFACE_VISIBILITY:"backface-visibility",WILL_CHANGE:"will-change",OUTLINE_WIDTH:"outline-width",OUTLINE_STYLE:"outline-style",OUTLINE_COLOR:"outline-color",OUTLINE_OFFSET:"outline-offset",POINTER_EVENTS:"pointer-events",USER_SELECT:"user-select",TOUCH_ACTION:"touch-action",RESIZE:"resize",APPEARANCE:"appearance",SCROLL_BEHAVIOR:"scroll-behavior",OVERSCROLL_BEHAVIOR:"overscroll-behavior",SCROLL_SNAP_TYPE:"scroll-snap-type",SCROLL_SNAP_ALIGN:"scroll-snap-align",SCROLL_SNAP_STOP:"scroll-snap-stop",SCROLL_PADDING_TOP:"scroll-padding-top",SCROLL_MARGIN_TOP:"scroll-margin-top",ACCENT_COLOR:"accent-color",CARET_COLOR:"caret-color",COLOR_SCHEME:"color-scheme",POSITION:"position",FLOAT:"float",CLEAR:"clear",Z_INDEX:"z-index",TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",BOX_SIZING:"box-sizing",ASPECT_RATIO:"aspect-ratio",WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",OVERFLOW:"overflow",OVERFLOW_X:"overflow-x",OVERFLOW_Y:"overflow-y",SCROLLBAR_WIDTH:"scrollbar-width",SCROLLBAR_COLOR:"scrollbar-color",CONTAINER_TYPE:"container-type",CONTAINER_NAME:"container-name",OBJECT_FIT:"object-fit",OBJECT_POSITION:"object-position",COLUMN_WIDTH:"column-width",COLUMN_COUNT:"column-count",MARGIN_TOP:"margin-top",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",PADDING_TOP:"padding-top",PADDING_BOTTOM:"padding-bottom",PADDING_LEFT:"padding-left",PADDING_RIGHT:"padding-right",FONT_FAMILY:"font-family",FONT_WEIGHT:"font-weight",FONT_SIZE:"font-size",LINE_HEIGHT:"line-height",COLOR:"color",TEXT_ALIGN:"text-align",FONT_STYLE:"font-style",FONT_VARIANT:"font-variant",FONT_VARIANT_NUMERIC:"font-variant-numeric",FONT_FEATURE_SETTINGS:"font-feature-settings",TEXT_DECORATION:"text-decoration",TEXT_DECORATION_LINE:"text-decoration-line",TEXT_DECORATION_COLOR:"text-decoration-color",TEXT_DECORATION_STYLE:"text-decoration-style",TEXT_DECORATION_THICKNESS:"text-decoration-thickness",TEXT_UNDERLINE_OFFSET:"text-underline-offset",LETTER_SPACING:"letter-spacing",WORD_SPACING:"word-spacing",TEXT_INDENT:"text-indent",TEXT_TRANSFORM:"text-transform",DIRECTION:"direction",WHITE_SPACE:"white-space",TEXT_WRAP:"text-wrap",WORD_BREAK:"word-break",OVERFLOW_WRAP:"overflow-wrap",HYPHENS:"hyphens",VERTICAL_ALIGN:"vertical-align",TEXT_OVERFLOW:"text-overflow",TEXT_SHADOW:"text-shadow",LINE_CLAMP:"line-clamp",WEBKIT_LINE_CLAMP:"-webkit-line-clamp",WEBKIT_BOX_ORIENT:"-webkit-box-orient",WEBKIT_TEXT_FILL_COLOR:"-webkit-text-fill-color",WEBKIT_BACKGROUND_CLIP:"-webkit-background-clip",BOX_DECORATION_BREAK:"box-decoration-break",WEBKIT_BOX_DECORATION_BREAK:"-webkit-box-decoration-break",FILL:"fill",STROKE:"stroke",STROKE_WIDTH:"stroke-width"}).map(e=>({path:e,label:e})),e=>e.links.filter(e=>"stylesheet"===e.rel).reduce((e,t,n)=>{let r=`font-${n}`;return{...e,[r]:{type:"link",id:r,params:{href:t.href,type:"text/css",rel:"stylesheet"}}}},{})),dc="https://fonts.googleapis.com",pc={woff2:"font/woff2",woff:"font/woff"},fc=e=>{try{let t=new URL(e);return"https:"===t.protocol&&!t.username&&!t.password}catch{return!1}},hc=e=>{try{return new URL(e).origin}catch{return}},mc={"<":"\\3c ",">":"\\3e "},gc=e=>`"${e.replace(/[\\"<>]/g,e=>mc[e]??`\\${e}`)}"`,yc=/^U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?(\s*,\s*U\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?)*$/,bc=e=>encodeURIComponent(e).replace(/%20/g,"+"),vc=(e,t)=>["@font-face{",`font-family:${gc(e.family)};`,`font-style:${"italic"===t.style?"italic":"normal"};`,`font-weight:${Number.parseInt(String(t.weight),10)||400};`,`font-display:${e.display??"swap"};`,`src:url(${gc(t.url)}) format(${gc(t.format)});`,t.unicodeRange&&yc.test(t.unicodeRange)?`unicode-range:${t.unicodeRange};`:"","}"].join(""),wc="/*plitzi:style-cache*/",kc="/*plitzi:style-cache-end*/",xc="plitzi-component--hidden",Sc="props",Tc={definition:{name:"",permanentUrl:""},flat:{},variables:[],settings:{customCss:""},pages:[],pageFolders:[],components:{}},Cc=(e,t)=>{let n=e?.attributes[t];return"string"==typeof n?n:""},Ac=(e,t,n)=>{let r=[],i=/* @__PURE__ */new Set,a=t,o=n;for(;a&&!i.has(a)&&r.length<16;){let t=e(a);if("layoutContainer"!==t?.definition.type)break;i.add(a),r.push({layout:a,slot:o||a}),a=Cc(t,"layout"),o=Cc(t,"layoutContainer")}return r},Ec=W("NetworkContext",{mutate:async()=>{},query:async()=>{},subscribe:()=>{},subscriptionManager:{subscribe:()=>{},unsubscribe:()=>{},stop:()=>{}},webKey:"",instanceId:"",server:{},userKey:"",webId:"",environment:"development"}),Ic=W("NetworkInternalContext",{}),_c=e=>({...e.enter?{enter:e.enter}:{},...e.on?{on:e.on}:{},..."number"==typeof e.duration?{duration:e.duration}:{},..."number"==typeof e.delay?{delay:e.delay}:{},..."number"==typeof e.stagger?{stagger:e.stagger}:{},...e.loop?{loop:e.loop}:{}}),Oc=({definition:e,...t})=>{let{parentId:n,items:r,bindings:i,interactions:a,initialState:o,runtime:s,loadStrategy:l,flag:c,anchor:u,motion:d,quiet:p,...f}=e;return{...t,definition:{...f,...null==n?{}:{parentId:n},...null==r?{}:{items:r},...null==i?{}:{bindings:i},...null==a?{}:{interactions:a},...null==o?{}:{initialState:o},...null==s?{}:{runtime:s},...null==l?{}:{loadStrategy:l},...null==c?{}:{flag:c},...null==u?{}:{anchor:u},...null==d?{}:{motion:_c(d)},...null==p?{}:{quiet:p}}}},Nc=e=>({...e,flat:Object.fromEntries(e.flat.map(e=>[e.id,Oc(e)]))}),Mc={},Pc={Init:"\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n variables\n cache\n }\n # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it\n # would have been handed in an SSR bootstrap travels here instead.\n render {\n overQuota\n }\n }\n }\n"},Lc="theme",Dc=["dark","light"],zc=[...Dc,"system"],Rc=(e="theme")=>We({mode:"system",scheme:"light",areas:{}},{id:e}),jc=Rc(),$c=(e,t)=>"system"===e?t:e,Fc=(e,t=jc)=>{t.batch(()=>{t.setState("mode",e),t.setState("areas",{})})},qc=(e,t=jc)=>{t.setState("scheme",e)},Bc=W("ThemeScopeContext",void 0),Uc="(prefers-color-scheme: dark)",Hc=({state:e})=>(Pt(["theme.mode","theme.resolved","theme.areas"],[e.mode,$c(e.mode,e.scheme),e.areas]),null),Wc=({defaultTheme:e="system",theme:t,scope:n="document",cookieName:r=Lc,children:i})=>{let a="container"===n,o=b(),[s]=S(()=>a?Rc(`theme${o}`):void 0),l=s??jc,c=x({mode:e,remembered:!1});wt(()=>{let n=a?void 0:((e=Lc)=>{try{return((e,t=Lc)=>{let n=si(e,t);return(e=>zc.includes(e))(n)?n:void 0})(document.cookie,e)}catch{return}})(r),i=t??n??e;c.current={mode:i,remembered:void 0!==n},l.batch(()=>{qc(window.matchMedia(Uc).matches?"dark":"light",l),Fc(i,l)})},[e,t,r,a,l]);let u=T(l.subscribe,l.getState,l.getState),d=void 0!==f(mt);g(()=>{let e=window.matchMedia(Uc),t=()=>qc(e.matches?"dark":"light",l);return e.addEventListener("change",t),t(),()=>e.removeEventListener("change",t)},[l]),g(()=>{if(a)return;let e=()=>{let{mode:e}=l.getState();(c.current.remembered||e!==c.current.mode)&&(((e,t=Lc)=>{try{document.cookie=`${t}=${encodeURIComponent(e)};path=/;max-age=31536000;SameSite=Lax`}catch{}})(e,r),c.current.remembered=!0),((e,t)=>{for(let n of Dc)t.classList.toggle(n,e===n)})(e,document.documentElement)};return e(),l.subscribe(e)},[r,a,l]);let p=d?/* @__PURE__ */I(Hc,{state:u}):null;return a?/* @__PURE__ */_(Bc,{value:s,children:[p,i]}):/* @__PURE__ */_(E,{children:[p,i]})},Vc="canvas",Gc=e=>{let t=f(Bc)??jc,n=T(t.subscribe,t.getState,t.getState),r=((e,t)=>(t?e.areas[t]:void 0)??e.mode)(n,e),i=$c(r,n.scheme),a=h(n=>e?((e,t,n=jc)=>{n.setState(`areas.${e}`,t)})(e,n,t):Fc(n,t),[e,t]),o=h(()=>a("dark"===i?"light":"dark"),[i,a]);return k(()=>({theme:r,resolvedTheme:i,setTheme:a,toggleTheme:o}),[r,i,a,o])},Kc=e=>/^https?:\/\//i.test(e),Yc=e=>e.replaceAll(/\/+/g,"/"),Jc=e=>Yc(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi,":$1")),Xc=(e,t)=>{if(!t||!e[t])return"";let{slug:n,parentId:r}=e[t];return r?`${Xc(e,r)}/${n}`:n};function Zc(e,t,n,r=!1){let i=n.replace(/^\/+/,""),{slug:a="",folder:o,default:s}=e[i]?.attributes??{slug:i,folder:"",default:!1};if(s&&!r)return{"/":n,[`/${n}`]:n};if(s&&r)return"/";if(!o&&!r)return{[Jc(`/${a}`)]:n,[Jc(`/${n}`)]:n};if(!o&&r)return Yc(`/${a}`);if(!t.find(e=>e.id===o))return r?Yc(`/${a}`):{[Jc(`/${a}`)]:n,[Jc(`/${n}`)]:n};let l=[Xc(t.reduce((e,t)=>({...e,[t.id]:t}),{}),o),a].filter(Boolean).join("/");return r?Yc(`/${l}`):{[Jc(`/${l}`)]:n,[Jc(`/${n}`)]:n}}var Qc=(e,t,n)=>{let r=n.indexOf("#");if(r>0)return`${Qc(e,t,n.slice(0,r))}${n.slice(r)}`;let i=e[n];if(!i)return n;let{slug:a,default:o}=i.attributes;return"string"==typeof a?Zc(e,t,n,!0):o?"/":`/${n}`},eu=(e,t,n=!0)=>!(e&&n&&void 0!==t&&(!t||"authenticated"!==e)&&(t||"public"!==e)&&(t&&"public"===e||e)),tu=(e={},t=[],n,r="",i=!0,a=!0)=>{let o=Object.keys(e).reduce((a,o)=>{let{attributes:{accessLevel:s,enabled:l=!0,unauthorizedBehaviour:c}}=e[o],u=e[o].attributes.unauthorizedPageRedirect;if(!l&&i)return a;u&&=(e=>Kc(e)||e.includes("{{"))(u)?u:Zc(e,t,u,!0);let d=Zc(e,t,o),p=Object.keys(d).map(e=>({pageId:o,path:`${r}${e}`.replaceAll("//","/"),accessLevel:s,enabled:l,isRaw:`/${o}`===e,unauthorizedBehaviour:c,unauthorizedPageRedirect:u,hasAccess:eu(s,n,i)}));return[...a,...p]},[]).filter(e=>"*"!==e.path||e.hasAccess).sort((e,t)=>e.path===t.path?"authenticated"===e.accessLevel?-1:1:e.path>t.path?-1:1);if(!o.find(e=>"*"===e.path)&&!a){let e=o.find(e=>"/"===e.path&&e.hasAccess);e&&"redirect"===e.unauthorizedBehaviour&&e.unauthorizedPageRedirect&&o.push({...e,path:"*",hasAccess:!1,isRaw:!0,unauthorizedBehaviour:"redirect",unauthorizedPageRedirect:"/"})}return o},nu=(e,t,n)=>{if(!t)return{action:{type:"accessDenied",path:void 0},pathMatch:void 0};let r=[];e.forEach(e=>{let n=((e,t)=>{let n="string"==typeof e?{path:e,caseSensitive:!1,end:!0}:{path:e.path,caseSensitive:e.caseSensitive??!1,end:e.end??!0},[r,i]=((e,t,n)=>{let r=[],i=`^${e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:void 0!==n}),void 0===n)return"/([^\\/]+)";let o=a.charAt(i+e.length);return o&&"/"!==o?"/([^\\/]*)":"(?:/([^\\/]*))?"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2")}`;return e.endsWith("*")?(r.push({paramName:"*",isOptional:!1}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]})(n.path,n.caseSensitive,n.end),a=t.match(r);if(!a)return null;let o=a[0],s=a.slice(1),l=o.replace(/(.)\/+$/,"$1");return{params:i.reduce((e,{paramName:t,isOptional:n},r)=>{let i=s[r];if("*"===t){let e=i??"";l=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return n&&!i?(e[t]=void 0,e):(e[t]=(i??"").replace(/%2F/g,"/"),e)},{}),pathname:o,pathnameBase:l,pattern:n}})({path:e.path,end:"*"!==e.path},t);n&&r.push({matchResult:n,path:e,pageId:e.pageId})});let i=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&n||"public"===e&&!n||!e);if(i||=r.find(({path:{accessLevel:e}})=>"authenticated"===e&&!n||"public"===e&&n),!i&&e.find(e=>"/"===e.path&&e.hasAccess))return{action:{type:"redirect",path:"/"},pathMatch:void 0};if(!i)return{action:{type:"notFound",path:void 0},pathMatch:void 0};let{pageId:a,matchResult:o,path:{hasAccess:s,unauthorizedBehaviour:l,unauthorizedPageRedirect:c}}=i;return!s&&"redirect"===l&&c?{action:{type:"redirect",path:c},pathMatch:void 0}:s?{action:{type:"normal",path:void 0},pathMatch:o,pageId:a}:{action:{type:"accessDenied",path:void 0},pathMatch:void 0}},ru=e=>e&&"string"==typeof e?(e.match(/:[a-zA-Z0-9-_:*]+/gim)||[]).map(e=>e.replace(":","")):[],iu=e=>`rsc.data.${e}`,au=()=>typeof window>"u"?"":`${window.location.pathname}${window.location.search}`,ou=async(e,t,n,r,i=!1)=>{let{enabled:a,endpoint:o}=e.get("rsc")??{};if(!a||!o||typeof window>"u")return;let s=r??au(),l=e.get("schema"),c=e.get("runtime.sources.auth"),u=r?((e,t,n)=>{if(!e)return;let r=e.pages.reduce((t,n)=>(n in e.flat&&(t[n]=e.flat[n]),t),{});return nu(tu(r,e.pageFolders,n),t.split("?")[0],n).pageId})(l,r,!!c?.details):e.get("navigation.currentPageId"),d=r?void 0:e.get("runtime.sources.flags");if(l&&((e,t,n)=>((e,t,n,r)=>{if(void 0===t)return[];let i,a=[],o=/* @__PURE__ */new Set,s=e.flat[t],l=e=>"string"==typeof e?e:"",c=[t,...s?Ac(t=>e.flat[t],l(s.attributes.layout),l(s.attributes.layoutContainer)).map(e=>e.layout):[]];for(;c.length>0;){let t=c.pop();if(void 0===t||o.has(t))continue;o.add(t);let n=e.flat[t];if(!n||r&&!rc(n.definition.flag,r))continue;"server"===n.definition.runtime&&(!i||i.has(n.id))&&a.push(n);let{items:s}=n.definition;s&&c.push(...s)}return a})(e,t,0,n).length>0)(l,u,d))try{let a=new URLSearchParams({location:s});t?.length&&a.set("ids",t.join(",")),Object.entries(n??{}).forEach(([e,t])=>a.set(e,t));let l=await fetch(`${o}?${a.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){let a=Qr(l.status,await l.json().catch(()=>{}));return a&&await Xr({reason:a,url:o})&&!i?await ou(e,t,n,r,!0):void e.set("rsc.stale",!0)}let{serverData:c,actionRuns:u}=await l.json();u?.length&&lt(u),e.batch(()=>{t?.length?Object.entries(c??{}).forEach(([t,n])=>e.set(iu(t),n)):e.set("rsc.data",c??{}),e.set("rsc.loaded",!0),e.set("rsc.stale",!1),e.set("rsc.location",s)})}catch{e.set("rsc.stale",!0)}},su=()=>{let e=Nt();return h((t,n)=>ou(e,t,n),[e])},lu=e=>new Set(Array.isArray(e?.paintedState)?e.paintedState.filter(e=>"string"==typeof e&&""!==e):[]),cu=(e,t)=>er(e)?Object.fromEntries(Object.entries(e).filter(([e,n])=>t.has(e)&&void 0!==n)):{},uu=e=>{try{document.cookie=`${e}=;path=/;max-age=0;SameSite=Lax`}catch{}},du=/* @__PURE__ */new Set(["init","initLoading","authenticating"]),pu=e=>{let t=e.runtime?.sources.auth;if(t){if(void 0===t.status)return{kind:"browser"};if(!du.has(t.status))return t.isAuthenticated&&void 0!==t.details?.id?{kind:"account",id:String(t.details.id)}:{kind:"guest"}}},fu=e=>{switch(e.kind){case"account":return`user:${e.id}`;case"guest":return"guest";case"browser":return""}},hu=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))),mu=(e,t)=>er(e)?Object.fromEntries(Object.entries(e).filter(([e])=>t.has(e))):{},gu=e=>e.schema?.settings,yu=e=>new Set((e?.transientState??[]).filter(e=>"string"==typeof e&&""!==e)),bu=(e,t)=>{let n,r=((e,t)=>{let n=t?.split(":")[1];return n?`plitzi_${e}_painted_${n}`:`plitzi_${e}_painted`})(t,typeof window>"u"?void 0:window.location.host),i=!1;return()=>{let t=e.getState();if(typeof document>"u"||t.render?.isHydrating&&!t.render.hydrated)return;let a=gu(t),o=lu(a),s=pu(t);if(!a?.keepState||0===o.size||void 0===s)return;let l=fu(s),c=t.runtime?.state;if(!i){i=!0;let t=(e=>((e,t)=>{let n=si(e,t);if(void 0!==n)try{let e=JSON.parse(n);return er(e)&&"string"==typeof e.owner&&er(e.values)?{owner:e.owner,values:e.values}:void 0}catch{return}})(li(),e))(r);if(t&&t.owner!==l&&(uu(r),er(c)&&[...o].some(e=>e in c)))return void e.setState("runtime.state",hu(c,o));n=t?.owner===l?JSON.stringify(cu(t.values,o)):void 0}let u=cu(c,o),d=JSON.stringify(u);if(d!==n){if(n=d,0===Object.keys(u).length)return void uu(r);"too-large"===((e,t)=>{let n=encodeURIComponent(JSON.stringify(t));if(n.length>3072)return uu(e),"too-large";try{return document.cookie=`${e}=${n};path=/;max-age=31536000;SameSite=Lax`,"written"}catch{return"unavailable"}})(r,{owner:l,values:u})&&Hl.warning("store",`settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...o].join(", ")}. Declare only what the first paint shows.`,{storeName:"runtime",path:"runtime.state",prev:void 0,next:u})}}},vu=e=>{let t=(e=>{let{key:t,storage:n,paths:r,partialize:i,partializePath:a,version:o=0,migrate:s,merge:l,mergePath:c,enabled:u}=e,d="function"==typeof n?n:void 0,p="function"==typeof n?void 0:ge(n);if(!d&&!p)return()=>{};let f=e=>{if(!d)return p;let t=d(e);return t?ge(t):void 0},h=e=>{if(r){let t={};for(let n of r){let r=oe(e,n);t[n]=a?a(n,r,e):r}return t}return i?i(e):e};return e=>{if(ee(u,e.getState()))return;let n=!1,i=()=>{if(n)return;let i=f(e.getState());i&&(n=!0,function(e,t,n,{version:r,paths:i,migrate:a,merge:o,mergePath:s}){let l=n?.getItem(t);if(l)try{let t=JSON.parse(l),n=t.version!==r;if(n&&!a)return;let c=n&&a?a(t.state,t.version):t.state;if(i){let t=c;return void e.batch(()=>{for(let n of i)if(n in t){let r=s?s(n,t[n],oe(e.getState(),n),e.getState()):t[n];e.setState(n,r)}})}let u=c;e.setState(void 0,o?o(u,e.getState()):u)}catch{n?.removeItem(t)}}(e,t,i,{version:o,paths:r,migrate:s,merge:l,mergePath:c}))};return{hydrate:i,onChange:n=>{i(),(e=>!r||r.some(t=>se(e,t)))(n.path)&&(e=>{let n=e.getState(),r=f(n);if(!r)return;let i={version:o,state:h(n)};r.setItem(t,JSON.stringify(i))})(e)}}}})({key:`plitzi_${e}_state`,paths:["runtime.state"],partializePath:(e,t,n)=>er(t)?hu(t,yu(gu(n))):t,mergePath:(e,t,n,r)=>{let i=yu(gu(r));return i.size>0&&er(t)?{...hu(t,i),...mu(n,i)}:t},storage:e=>{let{render:t}=e;if(t?.isHydrating&&!t.hydrated)return!1;let n=gu(e),r=pu(e);if(!n?.keepState||void 0===r)return!1;let i=(e=>{try{return"session"===e?globalThis.sessionStorage:globalThis.localStorage}catch{return}})("sessionStorage"===n.stateStorage?"session":"local");return!!i&&((e,t)=>({getItem:n=>{let r=e.getItem(n);if(null===r)return null;try{let e=JSON.parse(r);if(e.owner===t&&"string"==typeof e.payload)return e.payload}catch{}return e.removeItem(n),null},setItem:(n,r)=>e.setItem(n,JSON.stringify({owner:t,payload:r})),removeItem:t=>e.removeItem(t)}))(i,fu(r))}});return n=>{let r=t(n),i=n.getState().runtime?.state,a=pu(n.getState()),o=bu(n,e);return{...r,onChange:e=>{let t=a,s=pu(n.getState());if(void 0!==s&&(a=s),"account"===t?.kind&&void 0!==s&&fu(s)!==fu(t)){let e=er(i)?hu(i,lu(gu(n.getState()))):i;n.setState("runtime.state",e)}r?.onChange?.(e),o()}}}},wu=typeof window>"u",ku={},xu=()=>()=>{},Su=()=>!0,Tu=()=>!1,Cu=({id:e,definition:t,plitziElementLayout:n,children:r,previewMode:a,visible:o=!0})=>{let[[s,l]]=Mt(["schema.flat","rsc.enabled"],{mode:"mount"}),[c=ku]=Mt("runtime.sources.flags"),{components:d,componentDefinitions:p}=f(jr),{contexts:{PluginsContext:m}}=sc(),{plugins:g}=f(m),{items:y}=t,b=p.current[t.type],v=t.loadStrategy??b?.definition.loadStrategy??"eager",w=n||r||y?.length,S=x(!1);o&&(S.current=!0);let C=!a||"eager"===v||o||"lazy"===v&&S.current,A=n?`${n.type}:${n.rootId}:${n.slots.join(",")}`:"",E=T(xu,Su,Tu),_=n?.slots.includes(e)??!1,O=(e=>{let t=f(Wr),n=h(n=>void 0!==e&&t?(t.listeners.add(n),()=>{t.listeners.delete(n)}):Vr,[e,t]),r=h(()=>void 0!==e&&t?t.current[e]:void 0,[e,t]);return T(n,r,r)})(_?e:void 0);return k(()=>{if(!w||!C)return;let e=(y??[]).filter(e=>{let t=s[e];if(!t||!rc(t.definition.flag,c))return!1;if(!a||!l)return!0;let n=t.definition.runtime??"shared";return!(!E&&"client"===n)}).map(e=>{let{rootId:t,type:r,runtime:i}=ar(s,`${e}.definition`,{}),o=ar(n,"rootId",t),c=r in d.current||!!Ur({type:r,plugins:g}),u=Hr({key:!a&&n?`${e}_${A}`:e,plitziElementLayout:n,type:r,internalProps:{id:e,rootId:o},components:d.current,plugins:g});return!l||"server"!==i||wu||!a||E&&c?u:/* @__PURE__ */I(Yr,{id:e,children:u},e)});return _&&e.push(/* @__PURE__ */I(i,{children:O},"#layout-body")),Array.isArray(r)?e.push(...r.filter(u)):u(r)&&e.push(/* @__PURE__ */I(i,{children:r},"#children")),y?1===e.length?e[0]:e:void 0},[w,C,y,c,n,r,s,a,l,E,A,d,g,e,_,O])},Au=/* @__PURE__ */new Map,Eu={settled:/* @__PURE__ */new Set([Sc])},Iu=(e,t,n={},r={})=>{let i,{attributes:a,definition:o}=e,{rootId:s,plitziElementLayout:l}=t;t.attributes&&(a={...a,...t.attributes});let c=a;if(Object.keys(n).length>0)if((e=>!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0))(o.bindings)){let t=((e,t,n={})=>{let{attributes:r,definition:i}=t,{bindings:a}=i;return!a||"object"==typeof a&&!Object.keys(a).length?{attributes:r,style:{},definition:i}:Rl({attributes:r,style:n,definition:i},t=>{Object.keys(a).forEach(n=>{a[n]&&Array.isArray(a[n])&&a[n].length&&a[n].forEach(r=>{let{source:i,transformers:a,when:o,enabled:s=!0}=r,{to:l}=r;if(!l||o&&!Oa(o,e,!1,!0)||!s)return;"style"===n&&(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:c,toValue:u}=((e,t,n,r,i)=>{let a="initialState"===r?`definition.${r}.${i}`:`${r}.${i}`;return{fromValue:t?ar(e,t):void 0,toValue:ar(n,a,t?ar(e,t):void 0)}})(e,i,t,n,l),d=c;a&&Array.isArray(a)&&a.length>0&&a.forEach(n=>{let{action:r,params:i,enabled:a=!0}=n;if(!a)return;let o=qa[r];o&&(d=o.callback(d,((e,t)=>{if(!t)return t;let n=t;for(let[r,i]of Object.entries(e.params)){let e=t[r];"true"!==e&&"false"!==e||"checkbox"!==("function"==typeof i.type?i.type(t):i.type)||(n===t&&(n={...t}),n[r]="true"===e)}return n})(o,i)??{},t,{...e,sourceTo:u}))}),"initialState"===n&&"visibility"===l&&i&&void 0!==ar(e,i)&&(d=za(d)),("boolean"==typeof d||"number"==typeof d||d)&&or(t,"initialState"===n?`definition.${n}.${l}`:`${n}.${l}`,d)})})})})(n,{...e,attributes:a},i);({attributes:a,definition:o,style:i}=t)}else i={};let u=Object.keys(a).filter(e=>{let t=a[e];return"string"==typeof t&&t===c[e]&&Xn(t)});return u.length>0&&(a=((e,t,n)=>{let{queryParams:r={},routeParams:i={},variables:a={},origin:o="",navigation:s,...l}=n,c={...a,...i,...r,...l,navigation:{...s,routeParams:i,queryParams:r,origin:o}},u={...e};for(let d of t)u[d]=Fn(e[d],c,Eu);return u})(a,u,n)),a={...a,...Y(r,["visibility","styleSelectors"])},o={...o,styleSelectors:{...o.styleSelectors,...o.initialState?.styleSelectors,...r.styleSelectors??{}}},o.styleSelectors=(e=>{let t=e.initialState?.styleVariant;return Object.fromEntries(Object.entries(e.styleSelectors).map(([n,r])=>{let i="base"===n?`plitzi__${e.type}`:`plitzi__${e.type}-${n}`;if("string"!=typeof r)return[n,r];!(e=>{let t=Au.get(e);return t||(t=RegExp(`(^|\\s)${e}(?=\\s|$)`),Au.set(e,t)),t})(e.type).test(r)&&t?.[e.type]?.[n]&&(r=r?`${e.type} ${r}`:e.type);let a=r.replace(/\S+/g,r=>{let i=t?.[r]?.[n];if(!i)return r;let a=Array.isArray(i)?i:[i];return r===e.type&&"base"===n?a.map(e=>`${r}--${e}`).join(" "):r===e.type&&"base"!==n?a.map(e=>`${r}-${n}--${e}`).join(" "):`${r} ${a.map(e=>`${r}--${e}`).join(" ")}`});return a?[n,`${i} ${a}`]:[n,i]}))})(o),{...t,rootId:ar(l,"rootId",s),attributes:{...a,...Y(t,["id","rootId","attributes","definition","plitziElementLayout"])},definition:o,elementState:{...o.initialState,...r},style:i}},_u=e=>Object.values(e??{}).filter(e=>"string"==typeof e&&Xn(e)),Ou=({element:e,children:t,internalProps:n,previewMode:r=!1,parentVisible:i=!0})=>{let{id:a}=n,{state:o,setElementState:s}=(({id:e,bindings:t,previewMode:n})=>{let{scopePath:r}=Nt(),i=k(()=>((e,t)=>t?`runtime.elements.${e}.${t}`:`runtime.elements.${e}`)(e,r),[e,r]),[a]=Mt(i),o=a??zr,s=Dt(),l=k(()=>(t?.attributes&&Array.isArray(t.attributes)?t.attributes:[]).filter(e=>!1!==e.enabled).map(e=>ar(e,"to","")),[t]),c=h(e=>!!n&&(s(i,t=>{if(!e)return{};let n="function"==typeof e?e(t??zr):e;return l.length&&(n=pr(n,l)),n}),!0),[l,i,n,s]);return g(()=>{if(n&&r)return()=>s(i,void 0)},[n,r,i,s,e]),{state:o,setElementState:c}})({id:a,bindings:e.definition.bindings,previewMode:r}),l=k(()=>{let t=[..._u(e.attributes),..._u(n.attributes)];return t.length>0?(e=>["variables",...new Set(e.flatMap(e=>Qn(e)))])(t):void 0},[e.attributes,n.attributes]),[[c,u,d]]=Mt(["navigation.routeParams","navigation.queryParams","navigation.origin"],{enabled:void 0!==l}),p=(({bindings:e,sources:t})=>{let n=k(()=>{let n=new Set(t??[]);for(let t of Object.values(e??{}))if(Array.isArray(t))for(let e of t)for(let t of tr(e))n.add(t);return n.size>0&&n.add("variables"),(e=>{let t=[];for(let n of[...new Set(e)].filter(Boolean).sort((e,t)=>e.length-t.length))t.some(e=>n.startsWith(`${e}.`))||t.push(n);return t})(n)},[e,t]),r=k(()=>n.map(e=>`runtime.sources.${e}`),[n]),[i]=Mt(r);return k(()=>{let e={};return n.forEach((t,n)=>{void 0!==i[n]&&((e,t,n)=>{let r=t.split("."),i=e;for(let a of r.slice(0,-1)){let e=i[a],t=er(e)?e:{};i[a]=t,i=t}i[r[r.length-1]]=n})(e,t,i[n])}),e},[n,i])})({bindings:e.definition.bindings,sources:l}),f=k(()=>({...Iu(e,n,{...p,routeParams:c,queryParams:u,origin:d},o),setElementState:s}),[e,n,p,c,u,d,o,s]);return{internalProps:f,customProps:k(()=>Y(f,["id","rootId","plitziElementLayout","attributes","definition","style","elementState","setElementState"]),[f]),children:Cu({id:a,definition:f.definition,plitziElementLayout:f.plitziElementLayout,children:t,previewMode:r,visible:i&&K(f.elementState.visibility)})}},Nu=class extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){let{children:e}=this.props,{hasError:t}=this.state;return t?/* @__PURE__ */I("div",{children:"Something broke! Please refresh and try again."}):e}},Mu=W("EventBridgeContext",{}),Pu=Object.freeze({}),Lu=Object.freeze({}),Du=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>":"{…}"},zu=e=>{if("object"!=typeof e||!e)return Du(e);if("$$typeof"in e)return"<ReactElement>";if(Array.isArray(e))return 0===e.length?"[]":`[${e.slice(0,4).map(Du).join(", ")}${e.length>4?", …":""}]`;let t=e,n=Object.keys(t);return 0===n.length?"{}":`{ ${n.slice(0,4).map(e=>`${e}: ${Du(t[e])}`).join(", ")}${n.length>4?", …":""} }`},Ru=(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 n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.is(e[n],t[n]))},ju=We({enabled:!1,hydrated:!1,commits:[],tree:{}},{id:"tracing"}),$u=((e={})=>{let{max:t=100,enabled:n}=e,r=new Q,i=[],a=0,o=()=>{r.forEach(e=>e())},s=e=>{a+=1;let n={seq:a,time:typeof performance<"u"?performance.now():Date.now(),path:e.path,prevValue:e.prevValue,nextValue:e.nextValue},r=i.length>=t?i.slice(i.length-t+1):i.slice();r.push(n),i=r,o()};return{middleware:e=>{if(!ee(n,e.getState()))return{onChange:s}},record:s,getEntries:()=>i,entriesSince:e=>i.filter(t=>t.seq>e),lastSeq:()=>a,subscribe:e=>r.add(e),clear:()=>{i=[],o()}}})({max:30}),Fu=[],qu=/* @__PURE__ */new Map,Bu=/* @__PURE__ */new Map,Uu=/* @__PURE__ */new Map,Hu=/* @__PURE__ */new Map,Wu=!0,Vu=/* @__PURE__ */new Map,Gu=/* @__PURE__ */new Map,Ku=0,Yu=/* @__PURE__ */new Map,Ju=!1,Xu=!1,Zu=0,Qu=!1,ed=!1,td="function"==typeof requestAnimationFrame?e=>{requestAnimationFrame(e)}:e=>{setTimeout(e,16)},nd=()=>{Wu&&(Wu=!1,ju.setState("tree",(()=>{let e={};for(let[t,n]of Hu)e[t]={parentId:Bu.get(t),baseDuration:n,elementId:Uu.get(t)??t,mountedAt:Vu.get(t),unmountedAt:Gu.get(t)};return e})())),ju.setState("hydrated",ed),ju.setState("commits",Fu)},rd=e=>{Bu.delete(e),Uu.delete(e),Hu.delete(e),Vu.delete(e),Gu.delete(e),Wu=!0},id=()=>{if(Qu=!1,qu.size>0){let e=[...qu.values()].sort((e,t)=>e.timestamp-t.timestamp);qu.clear(),(Fu=[...Fu,...e]).length>200&&(Fu=Fu.slice(Fu.length-200)),(e=>{for(let[t,n]of Gu)n<=e&&rd(t)})(Fu[0].commitId)}Xu&&nd()},ad=()=>{let e=$u.entriesSince(Ku);Ku=$u.lastSeq();let t=/* @__PURE__ */new Map;for(let n of e){if(void 0===n.path)continue;let e=t.get(n.path);e?e.next=n.nextValue:t.set(n.path,{prev:n.prevValue,next:n.nextValue})}return[...t.entries()].map(([e,t])=>({path:e,preview:`${zu(t.prev)} → ${zu(t.next)}`}))},od={onRender:(e,t,n,r,i,a)=>{Ju||(Ju=!0,ju.setState("enabled",!0));let o=!Hu.has(e);Hu.set(e,r);let s=Yu.get(e);Yu.delete(e);let l={id:e,elementId:Uu.get(e)??e,parentId:Bu.get(e),phase:t,actualDuration:n,baseDuration:r,changedProps:s},c=qu.get(a);c?(c.elements.push(l),c.elementCount+=1,c.duration=Math.max(c.duration,n)):(Zu+=1,qu.set(a,{commitId:Zu,timestamp:a,duration:n,elementCount:1,elements:[l],causes:ad()})),o&&(Vu.set(e,qu.get(a)?.commitId??Zu),Wu=!0),Qu||(Qu=!0,td(id))},lastCommitId:()=>Zu,commitsSince:e=>{let t=[...qu.values()].sort((e,t)=>e.timestamp-t.timestamp);return[...Fu,...t].filter(t=>t.commitId>e)},linkParent:(e,t,n)=>{(!Bu.has(e)||Bu.get(e)!==t)&&(Wu=!0),Bu.size>=2e4&&!Bu.has(e)&&(Bu.clear(),Uu.clear(),Hu.clear(),Vu.clear(),Gu.clear(),Wu=!0),Bu.set(e,t),Uu.set(e,n)},markMounted:e=>{Gu.delete(e)&&(Wu=!0)},markUnmounted:e=>{Hu.has(e)?(Gu.set(e,Zu),Wu=!0,Qu||(Qu=!0,td(id))):rd(e)},recordProps:(e,t)=>{Yu.set(e,t)},recordStoreChange:e=>{$u.record(e)},setHydrated:()=>{ed||(ed=!0,Xu&&ju.setState("hydrated",!0))},start:()=>{Xu=!0,id(),nd()},stop:()=>{Xu=!1},clear:()=>{Fu=[],qu.clear(),Ku=$u.lastSeq(),Yu.clear(),Zu=0;for(let e of[...Gu.keys()])rd(e);Vu.clear(),Wu=!0,nd()}},sd=/* @__PURE__ */$({default:()=>ld}),ld=e=>{let t=e.displayName||e.name,n=t=>{let n=x(void 0),r=x(void 0),{id:i,rootId:o}=t.internalProps,s=f(G),l=s?.visible??!0,c=`${i}${b()}`,u=s?.traceId??c,d=k(()=>({id:i,rootId:o,visible:l,traceId:u,plitziJsxSkipHOC:!0}),[i,o,l,u]),p=k(()=>({visible:l,traceId:u}),[l,u]);if(t.plitziJsxSkipHOC)/* @__PURE__ */return I(G,{value:p,children:/* @__PURE__ */I(V,{value:d,children:/* @__PURE__ */I(e,{...t})})});let{settings:{previewMode:h,debugMode:m},root:{baseElementId:y}}=sc();g(()=>{if(m)return od.markMounted(c),()=>od.markUnmounted(c)},[m,c]);let[v]=Mt(`schema.flat.${i}`);if(!v)throw Error(`Element ${i} not found, Page ${y}`);let{internalProps:w,customProps:S,children:T}=Ou({element:v,internalProps:t.internalProps,children:t.children,previewMode:h,parentVisible:l}),{attributes:C,definition:A,style:E,plitziElementLayout:_,elementState:O,setElementState:N}=w;((e,t=Pu,n=Lu,r=Mu,i=!1)=>{let{eventBridge:a}=f(r);g(()=>{if(i||!a||!e)return;let r=Object.entries(t);for(let[t,i]of r)"function"==typeof i&&a.on(e,t,i,n);return()=>{for(let[t,n]of r)"function"==typeof n&&a.off(e,t,n)}},[e,t,a,n,i])})("element",k(()=>({[`${i}_setState`]:N}),[i,N]));let M=l&&K(O.visibility),P=k(()=>({id:i,rootId:o,visible:M,traceId:c,attributes:C,definition:A,plitziElementLayout:_,style:E,elementState:O,setElementState:N}),[C,A,O,i,_,o,E,N,M,c]),L=k(()=>({visible:M,traceId:c}),[M,c]),D=k(()=>{let r={...w.attributes,...t.extraProps,...S,...Y(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return T&&(r={...r,children:T}),/* @__PURE__ */I(Nu,{children:/* @__PURE__ */I(e,{...r,ref:n})})},[w.attributes,t,S,T]),z=/* @__PURE__ */I(G,{value:L,children:/* @__PURE__ */I(V,{value:P,children:D})});if(m){od.linkParent(c,s?.traceId,i);let e={attributes:C,definition:A,style:E,elementState:O,plitziElementLayout:_,children:T,...S,...t.extraProps,...Y(t,["plitziJsxSkipHOC","internalProps","className","children","extraProps"])};return od.recordProps(c,((e,t)=>{if(!e)return[];let n=[],r=/* @__PURE__ */new Set([...Object.keys(e),...Object.keys(t)]);for(let i of r){let r=e[i],a=t[i];if(!Object.is(r,a)&&(n.push({key:i,prev:zu(r),next:zu(a),ref:Ru(r,a)}),n.length>=12))break}return n})(r.current,e)),r.current=e,/* @__PURE__ */I(a,{id:c,onRender:od.onRender,children:z})}return z};return n.displayName=`withElement(${t})`,n},cd=()=>{let e=f(V);if(void 0===e)throw Error("Element data not found. Make sure the element is rendered under withElement.");return e},ud=({tag:e="div",refProp:t,style:n,className:r,otherProps:i,anchor:a,params:o,serverMarker:s,motion:l,testMarker:u,events:d,children:p})=>""===e?p:c(e,{ref:t,style:n,className:r,...i,...a?{id:a}:{},...o,...l,...d,...s,...u},p),dd={text:"text",textarea:"textarea",select:"select",boolean:"boolean",number:"text",scalar:"text",json:"codemirror-json",elementIds:"elements"},pd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "),fd=(e,t)=>({type:t.builderType??dd[t.type],label:t.label??pd(e),...void 0===t.default?{}:{defaultValue:t.default},...t.options?{options:t.options.map(e=>({value:e,label:t.optionLabels?.[e]??pd(e)}))}:{},...t.when?{when:t.when}:{},...void 0===t.canBind?{}:{canBind:t.canBind},...void 0===t.elementType?{}:{elementType:t.elementType}}),hd=/* @__PURE__ */new WeakMap,md=e=>{let t=hd.get(e);return t||(t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,fd(e,t)])),hd.set(e,t)),t},gd=(e,t,n,r={})=>({action:e,title:t.title,type:t.type??"globalCallback",callback:n,preview:t.preview??{},params:md(t.params),...r}),yd=(e,t,n={})=>Object.fromEntries(Object.keys(e).map(r=>[r,gd(r,e[r],t[r],n[r]??{})])),bd=["smooth","auto"],vd=["start","center","end","nearest"],wd=/^(-?\d+(?:\.\d+)?)(px|%)?$/,kd=(e,t)=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"!=typeof e)return;let n=wd.exec(e.trim());if(!n)return;let r=Number(n[1]);return"%"===n[2]?r/100*t:r},xd=(e,t,n)=>{let r=Math.max(t-n,0);if("start"===e)return 0;if("end"===e)return r;let i=kd(e,r);return void 0===i?void 0:Math.min(Math.max(i,0),r)},Sd={type:"select",description:'How it moves: "smooth" glides there, "auto" jumps.',default:"smooth",options:[...bd]},Td={scrollBy:{title:"Scroll By",type:"callback",strictParams:!0,params:{x:{type:"text",description:'How far across: pixels ("240") or a share of what the box shows ("80%"); negative goes back.',default:""},y:{type:"text",description:"How far down, the same way; negative goes up.",default:""},behavior:Sd}},scrollTo:{title:"Scroll To",type:"callback",strictParams:!0,params:{x:{type:"text",description:'Where across: "start", "end", pixels from the start, or a share of the way ("50%"). Empty stays.',default:""},y:{type:"text",description:"Where down, the same way. Empty stays.",default:""},behavior:Sd}},scrollIntoView:{title:"Scroll Into View",type:"callback",strictParams:!0,params:{block:{type:"select",description:"Where the element lands, top to bottom.",default:"start",options:[...vd]},inline:{type:"select",description:"Where it lands, side to side.",default:"nearest",options:[...vd]},behavior:Sd}}},Cd={setState:{title:"Update Element (set attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to change on the element: "attribute" sets one of its props (the common case — e.g. content, disabled); "state" sets element state (visibility or a style selector). REQUIRED — always set it.',default:"attribute",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to set. When category="attribute", an attribute/prop key of THIS element (e.g. "content", "disabled"). When category="state", "visibility" or "styleSelectors.<selector>". REQUIRED.',required:!0},value:{type:"scalar",description:'The value to set — its type follows the target attribute: a real boolean (true/false) for a boolean attribute, a number for a numeric one, otherwise a string (the strings "true"/"false" also coerce). There is NO separate `type` param (that belongs to the global state setState, not this one). REQUIRED.',when:e=>!!e.category,required:!0},revertOnFinish:{type:"boolean",description:'When true, this change is UNDONE automatically when the whole flow finishes. Use it for a TEMPORARY change (a "loading…" label, disabling a button while it works) instead of adding manual restore steps at the end of the flow.',default:!1,label:"Revert changes after interaction"}}},toggleState:{title:"Toggle Element (flip attribute / state)",type:"callback",strictParams:!0,params:{category:{type:"select",description:'What to flip on the element: "attribute" flips one of its props (e.g. disabled); "state" flips element state ("visibility", or "styleSelectors.<selector>" for an expanded/collapsed look). REQUIRED.',default:"state",options:["attribute","state"],required:!0},key:{type:"text",description:'The field to flip. When category="attribute", an attribute/prop key of THIS element. When category="state", "visibility" or "styleSelectors.<selector>". Anything not already true counts as false, so a field that has never been set flips ON first. REQUIRED.',required:!0},revertOnFinish:{type:"boolean",description:"When true, the flip is UNDONE automatically when the whole flow finishes — a change that lasts only as long as the flow does.",default:!1,label:"Revert changes after interaction"}}},...Td},Ad=(e,t)=>n=>{let{category:r}=n;return"attribute"===r?Object.keys(e).map(e=>({value:e,label:e})):"state"===r?[{value:"visibility",label:"Visibility"},...Object.keys(t.styleSelectors).map(e=>({value:`styleSelectors.${e}`,label:`Selector - ${e}`}))]:[]},Ed=e=>{if("string"!=typeof e)return e;let t=e.toLowerCase();return"true"===t||"false"===t||"yes"===t||"no"===t?"true"===t||"yes"===t:e},Id=["ctrl","alt","shift","meta"],_d={ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",shift:"shift",meta:"meta",cmd:"meta",command:"meta",mod:"mod"},Od={esc:"escape",space:"space",spacebar:"space",plus:"+",minus:"-",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",return:"enter"},Nd=/* @__PURE__ */new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown",...Array.from({length:12},(e,t)=>`f${t+1}`)]),Md=(e,t)=>[...Id.filter(t=>e.has(t)),t].join("+"),Pd=(e,t=!1)=>{let n=e.split(",").map(e=>((e,t)=>{let n=e.trim().toLowerCase();if(!n)return{problem:"an empty shortcut (two commas in a row, or one at the end)"};let r=n.endsWith("++")?[...n.slice(0,-2).split("+"),"+"]:n.split("+"),i="+"===n?["+"]:r.filter(e=>""!==e),a=/* @__PURE__ */new Set,o=[];for(let l of i){if(Object.hasOwn(_d,l)){let e=_d[l];a.add("mod"===e?t?"meta":"ctrl":e);continue}o.push(Object.hasOwn(Od,l)?Od[l]:l)}if(1!==o.length)return{problem:`"${e.trim()}" names ${o.length?`${o.length} keys (${o.join(", ")})`:"no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"`};let[s]=o;return 1===s.length||Nd.has(s)?{combo:Md(a,s)}:{problem:`"${s}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...Nd].slice(0,15).join(", ")}, f1…f12)`}})(e,t));return{combos:n.flatMap(e=>e.combo?[e.combo]:[]),problems:n.flatMap(e=>e.problem?[e.problem]:[])}},Ld=/* @__PURE__ */new Set(["a","z","y","c","x","v"]),Dd=/* @__PURE__ */new Set(["arrowleft","arrowright","arrowup","arrowdown","home","end","backspace","delete"]),zd=e=>bd.find(t=>t===e)??"smooth",Rd=(e,t)=>vd.find(t=>t===e)??t,jd={onLoad:{action:"onLoad",title:"On Load",type:"trigger",preview:{},params:{}},onClick:{action:"onClick",title:"On Click",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onPointerDown:{action:"onPointerDown",title:"On Pointer Down",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseEnter:{action:"onMouseEnter",title:"On Mouse Enter",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onMouseLeave:{action:"onMouseLeave",title:"On Mouse Leave",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onHover:{action:"onHover",title:"On Hover",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onFocus:{action:"onFocus",title:"On Focus",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onBlur:{action:"onBlur",title:"On Blur",type:"trigger",preview:{propagateEvent:""},params:{propagateEvent:{canBind:!1,defaultValue:!1,type:"boolean",label:"Propagate Event"}}},onInterval:{action:"onInterval",title:"On Interval",type:"trigger",preview:{interval:"",count:""},params:{interval:{canBind:!1,defaultValue:"5000",type:"text",label:"Every (milliseconds, at least 250)"}}},onKey:{action:"onKey",title:"On Key",type:"trigger",preview:{key:"",shortcuts:""},params:{keys:{canBind:!1,defaultValue:"",type:"text",label:"Keys (e.g. f, shift+f, mod+k, escape)"}}},onScroll:{action:"onScroll",title:"On Scroll",type:"trigger",preview:{x:"",y:"",atStart:"",atEnd:""},params:{}},onFlowEnd:{action:"onFlowEnd",title:"On Server Action End",type:"trigger",preview:{actionId:"",runId:"",status:"",output:{}},params:{}},onFlowError:{action:"onFlowError",title:"On Server Action Error",type:"trigger",preview:{actionId:"",runId:"",error:"",reason:""},params:{}},onFlowProgress:{action:"onFlowProgress",title:"On Server Action Progress",type:"trigger",preview:{actionId:"",runId:"",chunk:""},params:{}}},$d=["onClick","onPointerDown","onHover","onFocus","onBlur","onMouseEnter","onMouseLeave"],Fd=/* @__PURE__ */new WeakSet,qd=({elementContext:e,InteractionsContext:t,previewMode:n,debugMode:r,baseElementId:i,className:a,interactionTriggers:o,interactionCallbacks:s,otherProps:l,ref:c})=>{let{id:u,className:d,attributes:p,definition:y,definition:{interactions:b},plitziElementLayout:v,elementState:w,setElementState:S}=e,{interactionsManager:T,useInteractions:C}=f(t),A=h((e,t,n,r,i=!1)=>{i||e.preventDefault(),r&&r(e);let a=(e=>"nativeEvent"in e&&er(e.nativeEvent)?e.nativeEvent:e)(e);Fd.has(a)||(i||Fd.add(a),T.interactionTrigger(t,n,{event:e}))},[T]),E=k(()=>n&&b?Object.values(b).filter(e=>"trigger"===e.type&&e.action&&$d.includes(e.action)&&e.enabled).reduce((e,t)=>{let n=ar(t,"params.propagateEvent",!1);return{...e,[t.action]:e=>A(e,u,t.action,l[t.action],n)}},{}):{},[u,b,l,n,A]),I=m(mt),_=h(()=>{let e=I?.getPath("runtime.sources");return((e,t,n)=>{let r=er(t)?t:{};return(e=>er(e)&&Object.values(e).every(e=>"string"==typeof e))(n)?{...e,state:r,computed:oi(n,e,r)}:{...e,state:r}})(er(e)?e:$r,I?.getPath("runtime.state"),I?.getPath("schema.settings.computed"))},[I]),O=h(()=>({dataSource:_()}),[_]),N=k(()=>({...jd,...o}),[o]),M=x(null),P=c??M,L=(({attributes:e,definition:t,setElementState:n})=>{let r=h((e,t)=>{let r,i;return n(n=>(r=n,i=Rl(n,r=>or(r,e,t(ar(n,e)))),i)),{prevState:r,nextState:i}},[n]),i=h(e=>{if(!e.key||void 0===e.value)return{prevState:void 0,nextState:void 0};let{key:t}=e,n=Ed(e.value);return r(t,()=>n)},[r]),a=h(e=>{if(!e.key)return{prevState:void 0,nextState:void 0};let{key:t}=e;return r(t,e=>!0!==Ed(e))},[r]),o=h((e,t)=>{let r=t?.prevState;e.revertOnFinish&&r&&n(r)},[n]);return k(()=>((e,t,n,r,i)=>{let a=Cd.setState,o=md(a.params),s=Cd.toggleState,l=md(s.params),c={type:"select",options:Ad(e,t),when:e=>"attribute"===e.category||"state"===e.category};return{setState:gd("setState",a,n,{title:`Update ${t.label}`,postCallback:r,params:{...o,key:{...o.key,...c},value:{...o.value,type:t=>"boolean"==typeof e[t.key]?"select":"text",options:t=>{let{key:n}=t;return"boolean"==typeof e[n]?[{value:"true",label:"True"},{value:"false",label:"False"}]:Object.keys(e).map(e=>({value:e,label:e}))}}}}),toggleState:gd("toggleState",s,i,{title:`Toggle ${t.label}`,postCallback:r,params:{...l,key:{...l.key,...c}}})}})(e,t,i,o,a),[e,t,i,o,a])})({attributes:p,definition:y,setElementState:S}),D=(({id:e,label:t,nodeRef:n,interactions:r,previewMode:i,interactionsManager:a})=>{let o=k(()=>yd(Td,{scrollBy:e=>{let t=n.current;t?.scrollBy({left:kd(e.x,t.clientWidth)??0,top:kd(e.y,t.clientHeight)??0,behavior:zd(e.behavior)})},scrollTo:e=>{let t=n.current;t&&t.scrollTo({left:xd(e.x,t.scrollWidth,t.clientWidth)??t.scrollLeft,top:xd(e.y,t.scrollHeight,t.clientHeight)??t.scrollTop,behavior:zd(e.behavior)})},scrollIntoView:e=>{n.current?.scrollIntoView({block:Rd(e.block,"start"),inline:Rd(e.inline,"nearest"),behavior:zd(e.behavior)})}},{scrollBy:{title:`Scroll ${t} by`},scrollTo:{title:`Scroll ${t} to`},scrollIntoView:{title:`Scroll to ${t}`}}),[t,n]),s=k(()=>Object.values(r??{}).some(e=>"trigger"===e.type&&"onScroll"===e.action&&e.enabled),[r]);return g(()=>{let t=n.current;if(!i||!s||!t||typeof window>"u")return;let r=0,o=()=>{r=0;let n=(e=>{let t=e.scrollWidth-e.clientWidth>1,n=t?e.scrollLeft:e.scrollTop,r=t?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;return{x:Math.round(e.scrollLeft),y:Math.round(e.scrollTop),atStart:n<=1,atEnd:n>=r-1}})(t);a.interactionTrigger(e,"onScroll",n)},l=()=>{0===r&&(r=window.requestAnimationFrame(o))};return t.addEventListener("scroll",l,{passive:!0}),r=window.requestAnimationFrame(o),()=>{t.removeEventListener("scroll",l),window.cancelAnimationFrame(r)}},[e,a,s,n,i]),o})({id:u,label:y.label,nodeRef:P,interactions:b,previewMode:n,interactionsManager:T});C({id:u,interactions:b,triggers:N,callbacks:k(()=>({...s,...D,...L}),[s,D,L]),getAdditionalParams:O}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let{keys:t}=e.params;return"trigger"===e.type&&"onKey"===e.action&&e.enabled&&"string"==typeof t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length)return;let t=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),a=i.map(e=>({spec:e,combos:Pd(e,t).combos})),o=t=>{if(t.isComposing)return;let n=(e=>{let t=e.ctrlKey||e.altKey||e.metaKey,n=/^(?:Key|Digit)([A-Z0-9])$/.exec(e.code),r=t&&n?n[1]:e.key,i=" "===r?"space":r.toLowerCase(),a=1===i.length&&!/[a-z0-9]/.test(i),o=/* @__PURE__ */new Set;return e.ctrlKey&&o.add("ctrl"),e.altKey&&o.add("alt"),e.shiftKey&&!a&&o.add("shift"),e.metaKey&&o.add("meta"),Md(o,i)})(t),i=t.ctrlKey||t.metaKey||t.altKey;if((e=>e instanceof Element&&null!==e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'))(t.target)&&(!i&&"escape"!==n||(e=>{let t=e.split("+"),n=e.endsWith("++")?"+":t[t.length-1];return Dd.has(n)||Ld.has(n)&&(e.includes("ctrl+")||e.includes("meta+"))})(n)))return;let o=a.filter(e=>e.combos.includes(n)).map(e=>e.spec);if(!o.length)return;t.preventDefault();let s={key:n,shortcuts:o};r.interactionTrigger(e,"onKey",s)};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),(({id:e,interactions:t,previewMode:n,interactionsManager:r})=>{let i=k(()=>[...new Set(Object.values(t??{}).flatMap(e=>{let t=ha(e.params.interval);return"trigger"===e.type&&"onInterval"===e.action&&e.enabled&&t?[t]:[]}))],[t]);g(()=>{if(!n||!i.length||typeof document>"u")return;let t=new Map(i.map(e=>[e,0])),a=[],o=()=>{a.forEach(e=>clearInterval(e)),a=[]},s=()=>{o(),"visible"===document.visibilityState&&(a=i.map(n=>setInterval(()=>{let i=(t.get(n)??0)+1;t.set(n,i);let a={interval:n,count:i};r.interactionTrigger(e,"onInterval",a)},n)))};return s(),document.addEventListener("visibilitychange",s),()=>{document.removeEventListener("visibilitychange",s),o()}},[e,r,n,i])})({id:u,interactions:b,previewMode:n,interactionsManager:T}),g(()=>{if(!n||!b||!Object.keys(b).length)return;let e=!1;return queueMicrotask(()=>{e||T.interactionTrigger(u,"onLoad",{})}),()=>{e=!0}},[]),g(()=>{if(r)return Hl.addProviderMethod(`getElementDataSource-${u}`,_),()=>{Hl.removeProviderMethod(`getElementDataSource-${u}`)}},[r,_,u]);let z=(({id:e,className:t,previewMode:n,baseElementId:r,plitziElementLayout:i,definition:a,elementState:o})=>{let{items:s}=a,l=K(o.visibility);return k(()=>U(t,{[xc]:!l,"plitzi-component":!n&&!i,"plitzi-component--layout":!n&&!!i,with__container:!n&&!!s,"container--empty":!n&&!!s&&0===s.length&&!i,"container--base-element":!n&&!!s&&r===e,"plitzi-component--layout-body":i?.slots.includes(e)},a.styleSelectors.base),[t,l,n,i,s,r,e,a.styleSelectors.base])})({id:u,className:a,previewMode:n,baseElementId:i,definition:y,elementState:w,plitziElementLayout:v});return{className:U(d,z),events:E,nodeRef:P}},Bd={fade:[{at:0,opacity:0}],"fade-up":[{at:0,opacity:0,translate:"0 24px"}],"fade-down":[{at:0,opacity:0,translate:"0 -24px"}],"slide-left":[{at:0,opacity:0,translate:"32px 0"}],"slide-right":[{at:0,opacity:0,translate:"-32px 0"}],"slide-up":[{at:0,opacity:0,translate:"0 72px"}],scale:[{at:0,opacity:0,scale:"0.94"}],"zoom-in":[{at:0,opacity:0,scale:"0.6"}],"zoom-out":[{at:0,opacity:0,scale:"1.25"}],pop:[{at:0,opacity:0,scale:"0.5"},{at:55,opacity:1,scale:"1.08"},{at:78,scale:"0.97"}],"bounce-in":[{at:0,opacity:0,translate:"0 -64px"},{at:55,opacity:1,translate:"0 10px"},{at:75,translate:"0 -5px"},{at:90,translate:"0 2px"}],tilt:[{at:0,opacity:0,translate:"0 32px",rotate:"-6deg"}],"spin-in":[{at:0,opacity:0,scale:"0.4",rotate:"-180deg"}]},Ud=(Object.fromEntries(["fade","fade-up","fade-down","slide-left","slide-right","slide-up","scale","zoom-in","zoom-out","pop","bounce-in","tilt","spin-in"].map(e=>{let[{at:t,...n}]=Bd[e];return[e,n]})),(e,t)=>{let n=2*t*Math.PI,r=Math.round(Math.sin(n)*e*10)/10,i=Math.round(-Math.cos(n)*e*10)/10;return`translate(${String(r)}px, ${String(i)}px)`}),Hd=(Array.from({length:9},(e,t)=>({at:100*t/8,transform:Ud(6,t/8)})),"data-motion-seen"),Wd=(["[data-motion-loop] { animation-play-state: running, running !important; }",'[data-motion-on="view"][data-motion-enter], [data-motion-on="view"][data-motion-stagger] > * { animation-play-state: running, running !important; }','[data-motion-on="scroll"][data-motion-enter], [data-motion-on="scroll"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }'].join("\n"),e=>"animationName"in e&&"string"==typeof e.animationName&&e.animationName.startsWith("plitzi-motion-")),Vd=({ref:e,children:t,tag:n="div",className:r="",interactionTriggers:i,interactionCallbacks:a,style:o,...s})=>{let l=k(()=>((e="")=>{if(e)return"object"==typeof e?e:Object.fromEntries(e.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,n]=e.split(":").map(e=>e.trim());return[t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),n]}))})(o),[o]),c=cd(),u=sc(),d=u.settings.previewMode??!0,p=!!u.settings.debugMode;if(c.plitziJsxSkipHOC)return ud({tag:n,refProp:e,style:l,className:r,otherProps:s,children:t});let{root:{baseElementId:f},contexts:h}=u,m=h.InteractionsContext,{id:g,rootId:y,style:b,plitziElementLayout:v,definition:{type:w,label:x,runtime:S,anchor:T,parentId:C,motion:A}}=c,E=(e=>{if(!e)return{attributes:{},style:{}};let t={},n={};return e.enter&&(t[void 0===e.stagger?"data-motion-enter":"data-motion-stagger"]=e.enter,t["data-motion-on"]=e.on??"load"),e.loop&&(t["data-motion-loop"]=e.loop),void 0!==e.duration&&(n["--plitzi-motion-duration"]=`${String(e.duration)}ms`),void 0!==e.delay&&(n["--plitzi-motion-delay"]=`${String(e.delay)}ms`),void 0!==e.stagger&&(n["--plitzi-motion-stagger"]=`${String(e.stagger)}ms`),{attributes:t,style:n}})(A),I="server"===S?{"data-rsc-id":g}:void 0,_="component"!==v?.type||C||v.rootId===g?void 0:v.rootId,O=!1===u.settings.testAttributes?void 0:{"data-plitzi-el":g,...void 0===_?{}:{"data-plitzi-instance":_}},N=p||!d&&w&&y===f?{"data-id":g,"data-name":x||w||"unknown","data-root-id":y,"data-type":w||"unknown","data-root-render-element":!0}:{};if(!m)return ud({tag:n,refProp:e,style:{...b,...l,...E.style},className:r,otherProps:s,anchor:T,params:N,serverMarker:I,motion:E.attributes,testMarker:O,children:t});let M=qd({elementContext:c,InteractionsContext:m,previewMode:d,debugMode:p,baseElementId:f,className:r,interactionTriggers:i,interactionCallbacks:a,otherProps:s,ref:e});return ud({tag:n,refProp:M.nodeRef,style:{...b,...l,...E.style},className:M.className,otherProps:s,anchor:T,params:N,serverMarker:I,motion:E.attributes,testMarker:O,events:M.events,children:t})},Gd=/*#__PURE__*/function(e){return e.CHARSET="charset",e.CSS_TEXT="cssText",e.HREF="href",e.HTTPEQUIV="http-equiv",e.INNER_HTML="innerHTML",e.ITEM_PROP="itemprop",e.NAME="name",e.PROPERTY="property",e.REL="rel",e.SRC="src",e.TARGET="target",e}({}),Kd=/*#__PURE__*/function(e){return e.BASE="base",e.BODY="body",e.FRAGMENT="Symbol(react.fragment)",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e}({}),Yd={rel:["amphtml","canonical","alternate"]},Jd={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},Xd={type:["application/ld+json"]},Zd=Object.values(Kd),Qd={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ep=(()=>{const e={};for(const[t,n]of Object.entries(Qd))e[n]=t;return e})(),tp="data-rh",np=!("undefined"==typeof window||!window.document.createElement);function rp(e,t){for(let n=e.length-1;n>=0;--n){const r=e[n][1][t];if(void 0!==r)return r}}function ip(e){let t=rp(e,Kd.TITLE);const n=rp(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=rp(e,"defaultTitle");return(t||r)??void 0}function ap(e,t){const n={};for(const r of t){const t=r[1][e];t&&Object.assign(n,t)}return n}function op(e){for(let t=e.length-1;t>=0;--t){const n=e[t][1].base;if(n?.href||n?.target)return n}}function sp(e,t,n){const r={};return n.map(([,e])=>e).filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&console.warn(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{const n=function(e,t){let n;for(const r of Object.keys(e)){const i=r;!t.includes(i)||n===Gd.REL&&"canonical"===e[n].toLowerCase()||i===Gd.REL&&"stylesheet"===e[i].toLowerCase()||(n=i),!t.includes(i)||i!==Gd.INNER_HTML&&i!==Gd.CSS_TEXT&&i!==Gd.ITEM_PROP||(n=i)}return n??null}(e,t);if(!n||!e[n])return!1;const a=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][a]&&(i[n][a]=!0,!0)}).reverse().forEach(t=>{e.push(t)});const a=Object.keys(i);for(const t of a){const e={...r[t],...i[t]};r[t]=e}return e},[]).reverse()}function lp(e){return Array.isArray(e)?e.join(""):e}function cp(e,t){for(const n of Object.keys(e))if(t[n]?.includes(e[n]))return!0;return!1}function up(e,t){const n={default:Array(),priority:Array()};if(e)for(const r of e)cp(r,t)?n.priority.push(r):n.default.push(r);return n}function dp(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function pp(e){let t=sp(Kd.LINK,[Gd.REL,Gd.HREF],e),n=sp("meta",[Gd.NAME,"charSet","httpEquiv",Gd.PROPERTY,"itemProp"],e),r=sp("script",[Gd.SRC,Gd.INNER_HTML],e);const i=function(e){for(const[,t]of e)if(t.prioritizeSeoTags)return!0;return!1}(e);let a;if(i){const e=up(t,Yd);t=e.default;const i=up(n,Jd);n=i.default;const o=up(r,Xd);r=o.default,a={links:e.priority,meta:i.priority,script:o.priority}}return{base:op(e),bodyAttributes:ap("bodyAttributes",e),defer:rp(e,"defer"),encodeSpecialCharacters:rp(e,"encodeSpecialCharacters")??!0,htmlAttributes:ap("htmlAttributes",e),links:t,meta:n,noscript:sp("noscript",[Gd.INNER_HTML],e),onChangeClientState:rp(e,"onChangeClientState"),priority:a,script:r,style:sp("style",[Gd.CSS_TEXT],e),title:ip(e),titleAttributes:ap("titleAttributes",e)}}function fp(e){return ep[e]??e}function hp(e,t){const n=document.head||document.querySelector(Kd.HEAD),r=[],i=[...n.querySelectorAll(`${e}[${tp}]`)],a=[];for(const o of t){const t=document.createElement(e);for(const[e,r]of Object.entries(o))if(Object.prototype.hasOwnProperty.call(o,e)){const n=ep[e]??e;n===Gd.INNER_HTML?t.innerHTML=r:n===Gd.CSS_TEXT?t.styleSheet?t.styleSheet.cssText=o.cssText:t.appendChild(document.createTextNode(o.cssText)):t.setAttribute(n,r??"")}t.setAttribute(tp,"true");const n={};for(const{name:e,value:r}of t.attributes)n[e]=r;r.push(n);for(let e=0;;++e){if(t.isEqualNode(i[e])){i.splice(e,1);break}if(e>=i.length){a.push(t);break}}}return i.forEach(e=>{e.parentNode?.removeChild(e)}),a.forEach(e=>{n.appendChild(e)}),{allTags:r,newTags:a,oldTags:i}}function mp(e,t){const[n]=document.getElementsByTagName(e);if(!n)return;const r=n.getAttribute(tp),i=r?r.split(","):[],a=[...i],o=[];for(const s of Object.keys(t))o.push(ep[s]??s);for(const[s,l]of Object.entries(t)){const e=ep[s]??s;n.getAttribute(e)!==l&&n.setAttribute(e,l??""),i.includes(e)||i.push(e);const t=a.indexOf(e);-1!==t&&a.splice(t,1)}for(let s=a.length-1;s>=0;s-=1)n.removeAttribute(a[s]);i.length===a.length?n.removeAttribute(tp):n.getAttribute("data-rh")!==o.join(",")&&n.setAttribute(tp,o.join(","))}function gp(e,t){const{base:n,bodyAttributes:r,defer:i,htmlAttributes:a,links:o,meta:s,noscript:l,onChangeClientState:c,priority:u,script:d,style:p,title:f,titleAttributes:h}=e;mp(Kd.BODY,r??{}),mp(Kd.HTML,a??{}),function(e,t){void 0!==e&&document.title!==e&&(document.title=lp(e)),mp(Kd.TITLE,t)}(f,h);const m={baseTag:hp(Kd.BASE,n?[n]:[]),linkTags:hp(Kd.LINK,[...u?.links??[],...o??[]]),metaTags:hp(Kd.META,[...u?.meta??[],...s??[]]),noscriptTags:hp(Kd.NOSCRIPT,l??[]),scriptTags:hp(Kd.SCRIPT,[...u?.script??[],...d??[]]),styleTags:hp(Kd.STYLE,p??[])},g={baseTag:[],bodyAttributes:{},defer:i??!1,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],onChangeClientState:c??(()=>{}),scriptTags:[],styleTags:[],title:f??"",titleAttributes:{}},y={},b={};Object.keys(m).forEach(e=>{const{allTags:t,newTags:n,oldTags:r}=m[e];g[e]=t,n.length&&(y[e]=n),r.length&&(b[e]=m[e].oldTags)}),(t||Object.keys(y).length||Object.keys(b).length)&&c?.(g,y,b)}var yp=[Kd.NOSCRIPT,Kd.SCRIPT,Kd.STYLE],bp=(e,t=!0)=>t?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):e;function vp(e){let t="";for(const[n,r]of Object.entries(e)){const e=fp(n),i=void 0===r?e:`${e}="${r}"`;i&&t&&(t+=" "),t+=i}return t}function wp(e,t,n){let r="";for(const i of t){let t="";const a=Object.entries(i);for(const[e,r]of a)if(e!==Gd.INNER_HTML&&e!==Gd.CSS_TEXT){const i=ep[e]??e;let a;a=void 0===r?i:`${i}="${bp("string"==typeof r?r:String(r),n)}"`,t?t+=` ${a}`:t=a}const o=i.innerHTML??i.cssText??"",s=!yp.includes(e);r+=`<${e} ${tp}="true" ${t}${s?"/>":`>${o}</${e}>`}`}return r}function kp(e,t={}){const n={};t.addHelmetDataAttr&&(n[tp]=!0),void 0!==t.addKey&&(n.key=t.addKey);for(const[r,i]of Object.entries(e)){const e=Qd[r]??r;switch(e){case"cssText":case"innerHTML":n.dangerouslySetInnerHTML={__html:i};break;default:n[e]=i}}return n}function xp(e,t,n){/*#__PURE__*/
26
+ return c(e,kp(t,{addHelmetDataAttr:!0,addKey:n}))}function Sp(e,t){const n=[];for(let r=0;r<t.length;++r)n.push(xp(e,t[r],r));return n}var Tp=/*#__PURE__*/l(void 0),Cp=({children:e,onServerState:t})=>{const n=x(null);if(null===n.current){const e={firstRender:!0,helmets:[],state:void 0};t&&(e.serverState??=function(e){const t=()=>(e.state??=pp(e.helmets),e.state);return{base:{toComponent(){const e=t().base;return e?Sp("base",[e]):[]},toString(){const e=t();return e.base?wp("base",[e.base],e.encodeSpecialCharacters):""}},bodyAttributes:{toComponent:()=>kp(t().bodyAttributes??{}),toString:()=>vp(t().bodyAttributes??{})},htmlAttributes:{toComponent:()=>kp(t().htmlAttributes??{}),toString:()=>vp(t().htmlAttributes??{})},link:{toComponent:()=>Sp("link",t().links??[]),toString(){const e=t();return wp("link",e.links??[],e.encodeSpecialCharacters)}},meta:{toComponent:()=>Sp("meta",t().meta??[]),toString(){const e=t();return wp("meta",e.meta??[],e.encodeSpecialCharacters)}},noscript:{toComponent:()=>Sp("noscript",t().noscript??[]),toString(){const e=t();return wp("noscript",e.noscript??[],e.encodeSpecialCharacters)}},priority:{toComponent(){const e=t();return[...Sp("meta",e.priority?.meta??[]),...Sp("link",e.priority?.links??[]),...Sp("script",e.priority?.script??[])]},toString(){const e=t(),n=wp("meta",e.priority?.meta??[],e.encodeSpecialCharacters),r=wp("link",e.priority?.links??[],e.encodeSpecialCharacters),i=wp("script",e.priority?.script??[],e.encodeSpecialCharacters);let a=n;return r&&(a&&(a+=" "),a+=r),i&&(a&&(a+=" "),a+=i),a}},script:{toComponent:()=>Sp("script",t().script??[]),toString(){const e=t();return wp("script",e.script??[],e.encodeSpecialCharacters)}},style:{toComponent:()=>Sp("style",t().style??[]),toString(){const e=t();return wp("style",e.style??[],e.encodeSpecialCharacters)}},title:{toComponent(){const e=t();return n=e.title??"",r=e.titleAttributes??{},[/*#__PURE__*/I("title",{...kp(r,{addHelmetDataAttr:!0}),children:n},n)];var n,r},toString(){const e=t();return((e,t,n)=>{let r=vp(t);r&&(r=` ${r}`);const i=lp(e);return`<title ${tp}="true"${r}>${bp(i,n)}</title>`})(e.title??"",e.titleAttributes??{},e.encodeSpecialCharacters)}}}}(e),t(e.serverState)),n.current=e}const r=n.current,[i]=S(()=>({clientApply(){np&&!r.state&&(r.state=pp(r.helmets),r.state.defer?r.nextAnimFrameId??=requestAnimationFrame(()=>{r.state??=pp(r.helmets),gp(r.state,r.firstRender),r.firstRender=!1,delete r.nextAnimFrameId}):(void 0!==r.nextAnimFrameId&&(cancelAnimationFrame(r.nextAnimFrameId),delete r.nextAnimFrameId),gp(r.state,r.firstRender),r.firstRender=!1))},update(e,t){const n=r.helmets.findIndex(t=>t[0]===e);n>=0?(delete r.state,t?r.helmets[n][1]=t:r.helmets.splice(n,1)):t&&(delete r.state,r.helmets.push([e,t]))}}));/*#__PURE__*/
27
+ return I(Tp,{value:i,children:e})};function Ap(e){const t=Qd[e];return t&&console.warn(`"${e}" is not a valid JSX prop, replace it by "${t}"`),t??e}function Ep(e){const t=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=Array.isArray(r)?r.slice():r;return t}(e);for(const n of Object.values(e))if(Array.isArray(n)){for(const e of n)if(e)for(const t of Object.keys(e)){const n=Ap(t);n!==t&&(e[n]=e[t],delete e[t])}}else if(n&&"object"==typeof n){const e=n;for(const t of Object.keys(e)){const n=Ap(t);n!==t&&(e[n]=e[t],delete e[t])}}return n.forEach(e.children,e=>{if(null==e)return;if("object"!=typeof e||!("props"in e))throw Error(`"${typeof e}" is not a valid <Helmet> descendant`);let n;const r={};if(e.props)for(const[t,o]of Object.entries(e.props))"children"===t?n=o:r[Ap(t)]=o;let{type:i}=e;function a(e){"string"!=typeof e&&console.error(`child of ${i} element should be a string`)}switch("symbol"==typeof i&&(i=i.toString()),function(e,t){if("string"!=typeof e)throw Error("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.");if(!Zd.includes(e))throw Error(`Only elements types ${Zd.join(", ")} are allowed. Helmet does not support rendering <${e}> elements. Refer to our API for more information.`);if(t&&"string"!=typeof t&&!Array.isArray(t))throw Error(`Helmet expects a string as a child of <${e}>. Did you forget to wrap your children in braces? ( <${e}>{\`\`}</${e}> ) Refer to our API for more information.`)}(i,n),i){case Kd.BASE:t.base=r;break;case Kd.BODY:t.bodyAttributes=r;break;case Kd.FRAGMENT:!function(e,t){const n=e;for(const[r,i]of Object.entries(t))if(Array.isArray(i)){const e=n[r];n[r]=e?e.concat(i):i}else n[r]=i}(t,Ep({children:n}));break;case Kd.HTML:t.htmlAttributes=r;break;case Kd.LINK:case Kd.META:if(n)throw Error(`<${i} /> elements are self-closing and can not contain children. Refer to our API for more information.`);dp(t,i,r);break;case Kd.NOSCRIPT:case Kd.SCRIPT:void 0!==n&&(a(n),r.innerHTML=n),dp(t,i,r);break;case Kd.STYLE:a(n),r.cssText=n,dp(t,i,r);break;case Kd.TITLE:t.titleAttributes=r,"string"==typeof n?t.title=n:Array.isArray(n)&&(t.title=n.join(""));case Kd.HEAD:}}),delete t.children,t}var Ip=e=>{const t=N(8),n=f(Tp);if(!n)throw Error("<Helmet> component must be within a <HelmetProvider> children tree");const r=b();let i,a,o;return n.update(r,Ep(e)),t[0]!==n||t[1]!==r||t[2]!==e?(i=()=>{n.update(r,Ep(e)),n.clientApply()},t[0]=n,t[1]=r,t[2]=e,t[3]=i):i=t[3],g(i),t[4]!==n||t[5]!==r?(a=()=>()=>{n.update(r,void 0),n.clientApply()},o=[n,r],t[4]=n,t[5]=r,t[6]=a,t[7]=o):(a=t[6],o=t[7]),g(a,o),null},_p=({className:e,children:t,direction:n="column",wrap:r,items:i,justify:a,gap:o,grow:s,shrink:l,basis:c,...u})=>(e=ps("ContainerCollapsable",{className:e,componentKey:"content"}),/* @__PURE__ */I(fs,{className:e,direction:n,wrap:r,items:i,justify:a,gap:o,shrink:l,basis:c,grow:s,...u,children:t})),Op=/* @__PURE__ */I("i",{className:"fas fa-plus"}),Np=/* @__PURE__ */I("i",{className:"fas fa-minus"}),Mp=({children:e,className:t,title:n="Title",collapsed:r=!1,iconCollapsed:i=Op,iconExpanded:a=Np,placement:o="left",onClick:s,...l})=>{let c=ps("ContainerCollapsable",{className:t,componentKey:["header","headerContainer","headerTitle","headerIconContainer","headerSlot","headerSlotContainer"]});/* @__PURE__ */
28
+ return _("div",{className:c.header,onClick:s,...l,children:[/* @__PURE__ */_("div",{className:c.headerContainer,children:["left"===o&&/* @__PURE__ */_("div",{className:c.headerIconContainer,children:[r&&i,!r&&a]}),/* @__PURE__ */I("div",{className:c.headerTitle,children:n})]}),/* @__PURE__ */_("div",{className:c.headerSlotContainer,children:[/* @__PURE__ */I("div",{className:c.headerSlot,children:e}),"right"===o&&/* @__PURE__ */_("div",{className:c.headerIconContainer,children:[r&&i,!r&&a]})]})]})},Pp=({className:e="",collapsed:t=!1,children:r,direction:i="column",wrap:a,items:o,justify:l,gap:c,grow:d,shrink:p,basis:f,onChange:m,...g})=>{let[y,b]=S(t);e=ps("ContainerCollapsable",{className:e,componentKey:"root"}),Ss(()=>{b(t)},[t]);let v=h(e=>{e.stopPropagation(),b(!y),m?.(!y)},[y,m]),{header:w,content:x}=k(()=>{let e={header:void 0,content:void 0};return n.forEach(r,t=>{u(t)&&(t.type===Mp?e.header=s(t,{...t.props,collapsed:y,onClick:v}):t.type===_p&&(e.content=s(t)))}),e},[r,y,v]);/* @__PURE__ */
29
+ return _(fs,{className:e,direction:i,wrap:a,items:o,justify:l,gap:c,shrink:p,basis:f,grow:!!d&&!y,...g,children:[w,!y&&x]})};Pp.Header=Mp,Pp.Content=_p;var Lp={root:vr(""),header:vr("flex justify-between items-center cursor-pointer select-none gap-2 px-2 py-1 transition-colors duration-150 hover:bg-gray-50 dark:hover:bg-zinc-800/60 text-zinc-800 dark:text-zinc-200"),headerContainer:vr("flex items-center gap-2 min-w-0"),headerSlot:vr(""),headerSlotContainer:vr("flex items-center gap-2 shrink-0"),headerTitle:vr("m-0 flex items-center grow cursor-pointer truncate text-sm font-medium text-zinc-700 dark:text-zinc-300"),headerIconContainer:vr("flex items-center justify-center w-4 shrink-0 text-zinc-400 dark:text-zinc-500"),content:vr("")},Dp=Pp,zp={root:vr("relative flex flex-col"),rootInternal:vr("flex flex-col grow overflow-auto"),handlerContainer:vr("absolute flex justify-center items-center z-40",{variants:{intent:{},position:{n:"w-auto h-1 left-0 right-0 top-0 bg-gray-200 dark:bg-zinc-800",s:"w-auto h-1 left-0 right-0 bottom-0 bg-gray-200 dark:bg-zinc-800",e:"h-auto w-1 top-0 bottom-0 right-0 bg-gray-200 dark:bg-zinc-800",w:"h-auto w-1 top-0 left-0 bottom-0 bg-gray-200 dark:bg-zinc-800",sw:"",nw:"",se:"-right-4 -bottom-4",ne:""},hover:{true:"hidden group-5-hover:flex",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}}),handler:vr("transition-[width,background-color] duration-500",{variants:{intent:{},position:{n:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",s:"h-0.5 hover:h-1 w-full bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ns-resize",e:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-500 cursor-ew-resize",w:"h-full w-0.5 hover:w-1 bg-gray-300 dark:bg-zinc-700 hover:bg-primary-ui cursor-ew-resize",sw:"",nw:"",se:"h-3 w-3 cursor-se-resize border-b-4 border-r-4 border-zinc-400 dark:border-zinc-700 hover:border-primary-ui hover:dark:border-primary-ui active:pointer-events-none rounded-br-lg",ne:""},hover:{true:"",false:""}},compoundVariants:[],defaultVariants:{hover:!1,position:"se"}})},Rp=["se"],jp=({ref:e,className:t,parentRef:n,hoverMode:r=!1,autoGrow:i=!0,width:a=1/0,height:o=1/0,grid:s,resizeHandles:l=Rp,transformScale:c=1,axis:u="both",lockAspectRatio:d=!1,minConstraintsX:p=100,minConstraintsY:f=100,maxConstraintsX:m=1/0,maxConstraintsY:y=1/0,children:b,handle:w,onChange:T,...C})=>{let A=ps("ContainerResizable",{className:t,componentKey:["root","rootInternal"]}),[E,O]=S(a),[N,M]=S(o),[P,L]=S(0),[D,z]=S(),[R,j]=S(0),[$,F]=S(0),[q,B]=S(0),H=x(null);v(e,()=>H.current,[H]);let W=x(null),V=k(()=>T?fr(T,150):void 0,[T]),G=h(()=>!n?.current&&typeof document<"u"?document.body:n?.current,[n]),K=h((e,t,n=!1)=>{let[r,i]=[[p,f],[m,y]];if(d)if(t===N){let n=E/N;e=(t=e/n)*n}else{let n=N/E;t=(e=t/n)*n}r[0]&&r[1]&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i[0]&&i[1]&&(e=Math.min(i[0],e),t=Math.min(i[1],t));let a=H.current?.getBoundingClientRect();return!n&&a&&(a.x+e>window.innerWidth&&(e=window.innerWidth-a.x),a.y+t>window.innerHeight&&(t=window.innerHeight-a.y)),[e,t]},[N,d,m,y,p,f,E]),Y=h(e=>{e.stopPropagation(),e.preventDefault();let t=e.clientX,n=e.clientY,r=(t-P)/c,i=(n-q)/c,a=("both"===u||"x"===u)&&-1===["n","s"].indexOf(D??""),o=("both"===u||"y"===u)&&-1===["e","w"].indexOf(D??""),l=D?.includes("w")||D?.includes("n");if(Array.isArray(s)&&([r,i]=((e,t,n)=>[Math.round(e/n[0])*n[0],Math.round(t/n[1])*n[1]])(r,i,s),!r&&!i))return;let d=R+(a?r:0),p=$+(o?i:0);l&&(d=R-(a?r:0),p=$-(o?i:0)),(d!==R||p!==$)&&([d,p]=K(d,p,l),V?.(d,p),R!==1/0&&W.current&&(W.current.style.width=`${d}px`),$!==1/0&&W.current&&(W.current.style.height=`${p}px`))},[u,P,q,D,s,$,R,K,c,V]),J=h(e=>{e.stopPropagation(),e.preventDefault(),z(void 0),E!==1/0&&O(W.current?.offsetWidth??E),N!==1/0&&M(W.current?.offsetHeight??N),typeof document<"u"&&(document.body.style.userSelect=""),G()?.classList.remove("resizing")},[G,N,E]),X=h(e=>t=>{if(!H.current)return;t.preventDefault(),typeof document<"u"&&(document.body.style.userSelect="none"),G()?.classList.add("resizing"),z(e),L(t.clientX),B(t.clientY);let{width:n,height:r}=H.current.getBoundingClientRect();j(-1===E?n:E),F(-1===N?r:N)},[G,N,E]);g(()=>(D&&(window.addEventListener("mousemove",Y,!1),window.addEventListener("mouseup",J,!1)),()=>{D&&(window.removeEventListener("mousemove",Y,!1),window.removeEventListener("mouseup",J,!1))}),[D]),g(()=>{O(a),M(o)},[a,o]);let Z=h(e=>w?"function"==typeof w?w(e):w:/* @__PURE__ */I("div",{className:zp.handlerContainer({position:e,hover:r}),onMouseDown:X(e),children:/* @__PURE__ */I("div",{className:zp.handler({position:e})})},e),[w,X,r]),Q=k(()=>l.map(e=>Z(e)),[l,Z]),ee={};return N!==1/0&&(ee.height=`${N}px`),E!==1/0&&(ee.width=`${E}px`),/* @__PURE__ */_("div",{...C,ref:H,className:U(A.root,{"group-5":r,grow:i}),children:[/* @__PURE__ */I("div",{ref:W,className:U(A.rootInternal,{"pt-1":l.includes("n"),"pb-1":l.includes("s"),"pl-1":l.includes("w"),"pr-1":l.includes("e")}),style:ee,children:b}),Q]})},$p=({children:e,className:t,size:n})=>(t=ps("ContainerTabs",{className:t,componentKey:"content",variants:{size:n}}),/* @__PURE__ */I("div",{className:t,children:e})),Fp=({className:e,label:t="Tab Name",active:n,index:r=0,size:i,onSelect:a})=>{e=ps("ContainerTabs",{className:e,componentKey:"tab",variants:{active:n,size:i}});let o=h(()=>a?.(r),[r,a]);/* @__PURE__ */
30
+ return I("div",{className:e,onClick:o,children:t})},qp=({className:e,items:t=[],tabSelected:n=0,size:r,onSelect:i})=>(e=ps("ContainerTabs",{className:e,componentKey:"tabs",variants:{size:r}}),/* @__PURE__ */I("div",{className:e,children:t.map((e,t)=>/* @__PURE__ */I(Fp,{label:e.label,active:n===t,index:t,size:r,onSelect:i},t))})),Bp=({children:e,className:t,size:r})=>{t=ps("ContainerTabs",{className:t,componentKey:"root",variants:{size:r}});let[i,a]=S(0),o=h(e=>a(e),[]),{tabs:l,content:c}=k(()=>{let t={tabs:/* @__PURE__ */I(qp,{tabSelected:i,size:r,onSelect:o}),content:/* @__PURE__ */I($p,{})},a=0;return n.forEach(e,e=>{if(u(e))if(e.type===qp){let n=e.props;t.tabs=s(e,{...n,key:"tabs",tabSelected:i,size:r,onSelect:o})}else if(e.type===$p&&a++===i){let n=e.props;t.content=s(e,{...n,key:`content-${i}`,size:r})}}),t},[i,o,e,r]);/* @__PURE__ */
31
+ return _("div",{className:t,children:[l,c]})};Bp.Tabs=qp,Bp.TabContent=$p;var Up={root:vr("flex flex-col"),content:vr("flex"),tabs:vr("flex bg-gray-100 dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg p-1 select-none gap-0.5"),tab:vr("flex items-center justify-center rounded-md basis-0 grow cursor-pointer py-1 px-3 text-sm font-medium transition-colors duration-150 select-none",{variants:{active:{true:"bg-white dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100 shadow-sm",false:"text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200"},size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{active:!1,size:"md"}})},Hp=Bp,Wp={root:vr("",{variants:{size:{md:"",sm:"text-sm",xs:"text-xs",custom:""}},compoundVariants:[],defaultVariants:{size:"md"}})},Vp=({className:e="focus-visible:px-1 focus-visible:m-px focus-visible:outline-dashed focus-visible:outline-1",myWindow:t,value:n="",exitOnEnter:r=!0,exitOnEscape:i=!0,updateMode:a="blur",openMode:o="click",size:s,onChange:l,onEditOpen:c,onEditClose:u})=>{e=ps("ContentEditable",{className:e,componentKey:"root",variants:{size:s}});let d=x(null),p=k(()=>t||(typeof window<"u"?window:void 0),[t]);g(()=>{d.current&&d.current.textContent!==n&&(d.current.textContent=n)},[n]);let f=h(e=>{"change"===a&&l?.(e.target.textContent)},[l,a]),m=h(e=>{if(!p)return;let t=p.document.createRange(),n=p.getSelection();t.setStart(e,e.childNodes.length),t.collapse(!0),n?.removeAllRanges(),n?.addRange(t)},[p]),y=h(()=>{let e=d.current;e&&(("inherit"===e.contentEditable||"false"===e.contentEditable)&&m(e),"click"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.()))},[o,m,c]),b=h(()=>{let e=d.current;e&&"doubleClick"===o&&(e.setAttribute("contenteditable","true"),e.focus(),c?.())},[o,c]),v=h(()=>{let e=d.current;e&&(e.setAttribute("contenteditable","false"),"blur"===a&&e.textContent!==n&&l?.(e.textContent),u?.())},[l,a,n,u]),w=h(e=>{e.stopPropagation(),r&&13===e.keyCode?(e.preventDefault(),e.target.blur()):i&&27===e.keyCode&&(e.preventDefault(),e.target.textContent=n,e.target.blur())},[r,i,n]);/* @__PURE__ */
32
+ return I("div",{className:e,ref:d,onClick:y,onDoubleClick:b,onBlur:v,onInput:f,onKeyDown:w})},Gp={root:vr("text-zinc-900 dark:text-zinc-100",{variants:{as:{h1:"text-5xl font-extrabold",h2:"text-4xl font-extrabold",h3:"text-3xl font-bold",h4:"text-2xl font-bold",h5:"text-xl font-bold",h6:"text-lg font-bold"}},compoundVariants:[],defaultVariants:{as:"h1"}})};function Kp(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(i,r).trim();!e&&a||t.push(e),i=r+1,r=n.indexOf(",",i)}return t}var Yp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xp={};function Zp(e,t){return((t||Xp).jsx?Jp:Yp).test(e)}var Qp=/[ \t\n\f\r]/g;function ef(e){return""===e.replace(Qp,"")}var tf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new tf(n,r,t)}function rf(e){return e.toLowerCase()}tf.prototype.normal={},tf.prototype.property={},tf.prototype.space=void 0;var af=class{constructor(e,t){this.attribute=t,this.property=e}};af.prototype.attribute="",af.prototype.booleanish=!1,af.prototype.boolean=!1,af.prototype.commaOrSpaceSeparated=!1,af.prototype.commaSeparated=!1,af.prototype.defined=!1,af.prototype.mustUseProperty=!1,af.prototype.number=!1,af.prototype.overloadedBoolean=!1,af.prototype.property="",af.prototype.spaceSeparated=!1,af.prototype.space=void 0;var of=/* @__PURE__ */$({boolean:()=>lf,booleanish:()=>cf,commaOrSpaceSeparated:()=>hf,commaSeparated:()=>ff,number:()=>df,overloadedBoolean:()=>uf,spaceSeparated:()=>pf}),sf=0,lf=mf(),cf=mf(),uf=mf(),df=mf(),pf=mf(),ff=mf(),hf=mf();function mf(){return 2**++sf}var gf=Object.keys(of),yf=class extends af{constructor(e,t,n,r){let i=-1;if(super(e,t),bf(this,"space",r),"number"==typeof n)for(;++i<gf.length;){const e=gf[i];bf(this,gf[i],(n&of[e])===of[e])}}};function bf(e,t,n){n&&(e[t]=n)}function vf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new yf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[rf(r)]=r,n[rf(a.attribute)]=r}return new tf(t,n,e.space)}yf.prototype.defined=!0;var wf=vf({properties:{ariaActiveDescendant:null,ariaAtomic:cf,ariaAutoComplete:null,ariaBusy:cf,ariaChecked:cf,ariaColCount:df,ariaColIndex:df,ariaColSpan:df,ariaControls:pf,ariaCurrent:null,ariaDescribedBy:pf,ariaDetails:null,ariaDisabled:cf,ariaDropEffect:pf,ariaErrorMessage:null,ariaExpanded:cf,ariaFlowTo:pf,ariaGrabbed:cf,ariaHasPopup:null,ariaHidden:cf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pf,ariaLevel:df,ariaLive:null,ariaModal:cf,ariaMultiLine:cf,ariaMultiSelectable:cf,ariaOrientation:null,ariaOwns:pf,ariaPlaceholder:null,ariaPosInSet:df,ariaPressed:cf,ariaReadOnly:cf,ariaRelevant:null,ariaRequired:cf,ariaRoleDescription:pf,ariaRowCount:df,ariaRowIndex:df,ariaRowSpan:df,ariaSelected:cf,ariaSetSize:df,ariaSort:null,ariaValueMax:df,ariaValueMin:df,ariaValueNow:df,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function kf(e,t){return t in e?e[t]:t}function xf(e,t){return kf(e,t.toLowerCase())}var Sf=vf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ff,acceptCharset:pf,accessKey:pf,action:null,allow:null,allowFullScreen:lf,allowPaymentRequest:lf,allowUserMedia:lf,alpha:lf,alt:null,as:null,async:lf,autoCapitalize:null,autoComplete:pf,autoFocus:lf,autoPlay:lf,blocking:pf,capture:null,charSet:null,checked:lf,cite:null,className:pf,closedBy:null,colorSpace:null,cols:df,colSpan:df,command:null,commandFor:null,content:null,contentEditable:cf,controls:lf,controlsList:pf,coords:df|ff,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lf,defer:lf,dir:null,dirName:null,disabled:lf,download:uf,draggable:cf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lf,formTarget:null,headers:pf,height:df,hidden:uf,high:df,href:null,hrefLang:null,htmlFor:pf,httpEquiv:pf,id:null,imageSizes:null,imageSrcSet:null,inert:lf,inputMode:null,integrity:null,is:null,isMap:lf,itemId:null,itemProp:pf,itemRef:pf,itemScope:lf,itemType:pf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lf,low:df,manifest:null,max:null,maxLength:df,media:null,method:null,min:null,minLength:df,multiple:lf,muted:lf,name:null,nonce:null,noModule:lf,noValidate:lf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:lf,optimum:df,pattern:null,ping:pf,placeholder:null,playsInline:lf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lf,referrerPolicy:null,rel:pf,required:lf,reversed:lf,rows:df,rowSpan:df,sandbox:pf,scope:null,scoped:lf,seamless:lf,selected:lf,shadowRootClonable:lf,shadowRootCustomElementRegistry:lf,shadowRootDelegatesFocus:lf,shadowRootMode:null,shadowRootSerializable:lf,shape:null,size:df,sizes:null,slot:null,span:df,spellCheck:cf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:df,step:null,style:null,tabIndex:df,target:null,title:null,translate:null,type:null,typeMustMatch:lf,useMap:null,value:cf,width:df,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pf,axis:null,background:null,bgColor:null,border:df,borderColor:null,bottomMargin:df,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lf,declare:lf,event:null,face:null,frame:null,frameBorder:null,hSpace:df,leftMargin:df,link:null,longDesc:null,lowSrc:null,marginHeight:df,marginWidth:df,noResize:lf,noHref:lf,noShade:lf,noWrap:lf,object:null,profile:null,prompt:null,rev:null,rightMargin:df,rules:null,scheme:null,scrolling:cf,standby:null,summary:null,text:null,topMargin:df,valueType:null,version:null,vAlign:null,vLink:null,vSpace:df,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:lf,disablePictureInPicture:lf,disableRemotePlayback:lf,exportParts:ff,part:pf,prefix:null,property:null,results:df,security:null,unselectable:null},space:"html",transform:xf}),Tf=vf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:hf,accentHeight:df,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:df,amplitude:df,arabicForm:null,ascent:df,attributeName:null,attributeType:null,azimuth:df,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:df,by:null,calcMode:null,capHeight:df,className:pf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:df,diffuseConstant:df,direction:null,display:null,dur:null,divisor:df,dominantBaseline:null,download:lf,dx:null,dy:null,edgeMode:null,editable:null,elevation:df,enableBackground:null,end:null,event:null,exponent:df,externalResourcesRequired:null,fill:null,fillOpacity:df,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ff,g2:ff,glyphName:ff,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:df,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:df,horizOriginX:df,horizOriginY:df,id:null,ideographic:df,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:df,k:df,k1:df,k2:df,k3:df,k4:df,kernelMatrix:hf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:df,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:df,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:df,overlineThickness:df,paintOrder:null,panose1:null,path:null,pathLength:df,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:df,pointsAtY:df,pointsAtZ:df,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hf,rev:hf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hf,requiredFeatures:hf,requiredFonts:hf,requiredFormats:hf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:df,specularExponent:df,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:df,strikethroughThickness:df,string:null,stroke:null,strokeDashArray:hf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:df,strokeOpacity:df,strokeWidth:null,style:null,surfaceScale:df,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hf,tabIndex:df,tableValues:null,target:null,targetX:df,targetY:df,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:df,underlineThickness:df,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:df,values:null,vAlphabetic:df,vMathematical:df,vectorEffect:null,vHanging:df,vIdeographic:df,version:null,vertAdvY:df,vertOriginX:df,vertOriginY:df,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:df,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kf}),Cf=vf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Af=vf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xf}),Ef=vf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),If={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_f=/[A-Z]/g,Of=/-[a-z]/g,Nf=/^data[-\w.:]+$/i;function Mf(e,t){const n=rf(t);let r=t,i=af;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Nf.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Of,Lf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Of.test(e)){let n=e.replace(_f,Pf);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=yf}return new i(r,t)}function Pf(e){return"-"+e.toLowerCase()}function Lf(e){return e.charAt(1).toUpperCase()}var Df=nf([wf,Sf,Cf,Af,Ef],"html"),zf=nf([wf,Tf,Cf,Af,Ef],"svg");function Rf(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}var jf=/* @__PURE__ */j((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function f(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:c,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=/* @__PURE__ */new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(i)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function k(){var e=h(),t=y(a);if(t){if(w(),!y(o))return g("property missing ':'");var r=y(s),i=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),i}}return m.prototype.content=e,b(),function(){var e,t=[];for(v(t);e=k();)!1!==e&&(t.push(e),v(t));return t}()}}),$f=/* @__PURE__ */j(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const i=(0,n.default)(e),a="function"==typeof t;return i.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:i}=e;a?t(n,i,e):i&&(r=r||{},r[n]=i)}),r};var n=t(jf())}),Ff=/* @__PURE__ */j(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(a,s):e.replace(i,s)).replace(n,o))}}),qf=/* @__PURE__ */j((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})($f()),r=Ff();function i(e,t){var i={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i):i}i.default=i,t.exports=i}),Bf=Hf("end"),Uf=Hf("start");function Hf(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Wf(e){return e&&"object"==typeof e?"position"in e||"type"in e?Gf(e.position):"start"in e||"end"in e?Gf(e):"line"in e||"column"in e?Vf(e):"":""}function Vf(e){return Kf(e&&e.line)+":"+Kf(e&&e.column)}function Gf(e){return Vf(e&&e.start)+"-"+Vf(e&&e.end)}function Kf(e){return e&&"number"==typeof e?e:1}var Yf=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Wf(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Yf.prototype.file="",Yf.prototype.name="",Yf.prototype.reason="",Yf.prototype.message="",Yf.prototype.stack="",Yf.prototype.column=void 0,Yf.prototype.line=void 0,Yf.prototype.ancestors=void 0,Yf.prototype.cause=void 0,Yf.prototype.fatal=void 0,Yf.prototype.place=void 0,Yf.prototype.ruleId=void 0,Yf.prototype.source=void 0;var Jf=/* @__PURE__ */F(qf(),1),Xf={}.hasOwnProperty,Zf=/* @__PURE__ */new Map,Qf=/[A-Z]/g,eh=/* @__PURE__ */new Set(["table","tbody","thead","tfoot","tr"]),th=/* @__PURE__ */new Set(["td","th"]),nh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function rh(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=zf,e.schema=i),e.ancestors.push(t);const a=lh(e,t.tagName,!1),o=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&Xf.call(t.properties,i)){const a=sh(e,i,t.properties[i]);if(a){const[i,o]=a;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof o&&th.has(t.tagName)?r=o:n[i]=o}}return r&&((n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),n}(e,t);let s=oh(e,t);return eh.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&ef(t.value):ef(t));var t})),ih(e,o,a,t),ah(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];
33
+ /* @__PURE__ */return n.type,e.evaluater.evaluateExpression(n.expression)}ch(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=zf,e.schema=i),e.ancestors.push(t);const a=null===t.name?e.Fragment:lh(e,t.name,!0),o=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];
34
34
  /* @__PURE__ */t.type;const i=t.expression;
35
35
  /* @__PURE__ */i.type;const a=i.properties[0];
36
- /* @__PURE__ */a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else oh(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];
37
- /* @__PURE__ */t.type,a=e.evaluater.evaluateExpression(t.expression)}else oh(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),s=rh(e,t);return th(e,o,a,t),nh(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oh(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return nh(r,rh(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function th(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function nh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rh(e,t){const n=[];let r=-1;const i=e.passKeys?/* @__PURE__ */new Map:Yf;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}const s=eh(e,a,o);void 0!==s&&n.push(s)}return n}function ih(e,t,n){const r=_f(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,Gf.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Vf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Qf+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Kf.call(e,n)&&(t[sh(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Cf[r.property]||r.property:r.attribute,n]}}function ah(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=Yp(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}
38
- /* @__PURE__ */r=n}else r=Yp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Kf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);oh(e)}function oh(e,t){const n=new Vf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Qf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sh(e){let t=e.replace(Jf,lh);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function lh(e){return"-"+e.toLowerCase()}var ch={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},uh={};function dh(e,t){const n=t||uh;return ph(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ph(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fh(e.children,t,n)}return Array.isArray(e)?fh(e,t,n):""}function fh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ph(e[i],t,n);return r.join("")}var hh={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},mh={}.hasOwnProperty;function gh(e){return!!mh.call(hh,e)&&hh[e]}function yh(e,t,n,r){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function bh(e,t){return e.length>0?(yh(e,e.length,0,t),e):t}var vh={}.hasOwnProperty;function wh(e){const t={};let n=-1;for(;++n<e.length;)kh(t,e[n]);return t}function kh(e,t){let n;for(n in t){const r=(vh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){vh.call(r,a)||(r[a]=[]);const e=i[a];xh(r[a],Array.isArray(e)?e:e?[e]:[])}}}function xh(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);yh(e,0,0,r)}function Sh(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Th(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ch=Rh(/[A-Za-z]/),Ah=Rh(/[\dA-Za-z]/),Eh=Rh(/[#-'*+\--9=?A-Z^-~]/);function Ih(e){return null!==e&&(e<32||127===e)}var _h=Rh(/\d/),Oh=Rh(/[\dA-Fa-f]/),Nh=Rh(/[!-/:-@[-`{-~]/);function Mh(e){return null!==e&&e<-2}function Ph(e){return null!==e&&(e<0||32===e)}function Lh(e){return-2===e||-1===e||32===e}var Dh=Rh(/\p{P}|\p{S}/u),zh=Rh(/\s/);function Rh(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function jh(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(37===a&&Ah(e.charCodeAt(n+1))&&Ah(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function $h(e,t,n,r){const i=r?r-1:1/0;let a=0;return function(r){return Lh(r)?(e.enter(n),o(r)):t(r)};function o(r){return Lh(r)&&a++<i?(e.consume(r),o):(e.exit(n),t(r))}}function Fh(e,t,n,r,i,a){let o=0;return function(t){return a>0&&Lh(t)?(e.enter(r),s(t)):l(t)};function s(t){return Lh(t)&&o<a?(e.consume(t),o++,s):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var qh={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),$h(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Mh(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},Bh=class{constructor(){this.index=/* @__PURE__ */new Map,this.map=[]}add(e,t,n){Uh(this,e,t,n,!1)}addBefore(e,t,n){Uh(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Uh(e,t,n,r,i){if(0===n&&0===r.length)return;const a=e.index.get(t);if(a)return a[1]+=n,void(i?(r.push(...a[2]),a[2]=r):a[2].push(...r));const o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Hh={tokenize:function(e){const t=this,n=[];let r,i,a,o=0;return s;function s(r){if(o<n.length){const i=n[o];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}y(o);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;const l=new Bh;return l.add(a+1,0,t.events.slice(n)),l.add(n,s-n,[]),l.consume(t.events),c(e)}return s(e)}function c(i){if(o===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return h(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wh,u,d)(i)}function u(e){return r&&b(),y(o),p(e)}function d(e){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Wh,f,h)(n)}function f(e){return o++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Mh(n)?(e.consume(n),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(o),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;const c=new Bh;c.add(l+1,0,t.events.slice(n)),c.add(n,e-n,[]),c.consume(t.events)}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Wh={tokenize:function(e,t,n){return $h(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Vh(e){return null===e||Ph(e)||zh(e)?1:Dh(e)?2:void 0}function Gh(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Kh={name:"attention",resolveAll:function(e,t){let n,r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._close){let i=r;for(;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[r][1].start};Yh(o,-a),Yh(s,a);const l={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={type:a>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:s},u={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},d={type:a>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[i][1].end={...l.start},e[r][1].start={...c.end},n=[],e[i][1].end.offset-e[i][1].start.offset&&(n=bh(n,[["enter",e[i][1],t],["exit",e[i][1],t]])),n=bh(n,[["enter",d,t],["enter",l,t],["exit",l,t],["enter",u,t]]),n=bh(n,Gh(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=bh(n,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",d,t]]);let p=0;e[r][1].end.offset-e[r][1].start.offset&&(p=2,n=bh(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),yh(e,i-1,r-i+3,n),r=i+n.length-p-2;break}}for(r=-1;++r<e.length;)"attentionSequence"===e[r][1].type&&(e[r][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Vh(r);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const l=e.exit("attentionSequence"),c=Vh(s),u=!c||2===c&&i||n.includes(s)&&42!==s&&95!==s,d=!i||2===i&&c||n.includes(r)&&42!==r&&95!==r;return l._open=Boolean(42===a?u:u&&(i||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function Yh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Jh={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Ch(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||Ah(e)?(r=1,o(e)):l(e)}function o(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Ah(t))&&r++<32?(e.consume(t),o):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Ih(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Eh(t)?(e.consume(t),l):n(t)}function c(e){return Ah(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Ah(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Xh={partial:!0,tokenize:function(e,t,n){return function(t){return Lh(t)?$h(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Mh(e)?t(e):n(e)}}},Zh={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Lh(t)?$h(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(Zh,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Lh(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},Qh={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Nh(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},em={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Ah,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Oh,c):(e.enter("characterReferenceValue"),i=7,a=_h,c(t))}function c(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==Ah||gh(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&o++<i?(e.consume(s),c):n(s)}}},tm={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},nm={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),Lh(t)?$h(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Lh(t)?$h(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Mh(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,o=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return o=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Lh(t)?$h(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Mh(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(tm,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Mh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Lh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$h(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Mh(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Mh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(i,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return o>0&&Lh(t)?$h(e,g,"linePrefix",o+1)(t):g(t)}function g(t){return null===t||Mh(t)?e.check(tm,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Mh(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},rm={name:"codeIndented",tokenize:function(e,t,n){return function(t){return e.enter("codeIndented"),Fh(e,r,n,"linePrefix",4,4)(t)};function r(t){return null===t?a(t):Mh(t)?e.attempt(im,r,a)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Mh(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),i)}function a(n){return e.exit("codeIndented"),t(n)}}},im={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Mh(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Fh(e,t,a,"linePrefix",4,4)(o)}function a(e){return Mh(e)?i(e):n(e)}}},am={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Mh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Mh(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},om=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&sm(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),sm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),sm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);sm(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);sm(this.left,t.reverse())}}};function sm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function lm(e){const t={};let n,r,i,a,o,s,l,c=-1;const u=new om(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,cm(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(a=u.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},o=u.slice(r,c),o.unshift(n),u.splice(r,c-r+1,o))}}return yh(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function cm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}var um={resolve:function(e){return lm(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Mh(t)?e.check(dm,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},dm={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$h(e,i,"linePrefix")};function i(i){if(null===i||Mh(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function pm(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d):null===t||32===t||41===t||Ih(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Mh(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return u||null!==i&&41!==i&&!Ph(i)?u<c&&40===i?(e.consume(i),u++,h):41===i?(e.consume(i),u--,h):null===i||32===i||40===i||Ih(i)?n(i):(e.consume(i),92===i?m:h):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function fm(e,t,n,r,i,a){const o=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Mh(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Mh(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Lh(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function hm(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):Mh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$h(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||Mh(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function mm(e,t){let n;return function r(i){return Mh(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Lh(i)?$h(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var gm={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return fm.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=Th(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return Ph(t)?mm(e,s)(t):s(t)}function s(t){return pm(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(ym,c,c)(t)}function c(t){return Lh(t)?$h(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Mh(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},ym={partial:!0,tokenize:function(e,t,n){return function(t){return Ph(t)?mm(e,r)(t):n(t)};function r(t){return hm(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Lh(t)?$h(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Mh(e)?t(e):n(e)}}},bm={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Mh(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},vm={name:"headingAtx",resolve:function(e,t){let n=e.length-2,r=3;if("whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};yh(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Ph(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),o(n)):null===n||Mh(n)?(e.exit("atxHeading"),t(n)):Lh(n)?$h(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||Ph(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}},wm=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],km=["pre","script","style","textarea"],xm={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,a,o,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),i=3,r.interrupt?t:L):Ch(s)?(e.consume(s),o=String.fromCharCode(s),h):n(s)}function u(a){return 45===a?(e.consume(a),i=2,d):91===a?(e.consume(a),i=5,s=0,p):Ch(a)?(e.consume(a),i=4,r.interrupt?t:L):n(a)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:L):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:A:p):n(i)}function f(t){return Ch(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Ph(s)){const l=47===s,c=o.toLowerCase();return l||a||!km.includes(c)?wm.includes(o.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):A(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?g(s):y(s)):(i=1,r.interrupt?t(s):A(s))}return 45===s||Ah(s)?(e.consume(s),o+=String.fromCharCode(s),h):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:A):n(i)}function g(t){return Lh(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||Ch(t)?(e.consume(t),b):Lh(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||Ah(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):Lh(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):Lh(t)?(e.consume(t),w):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||Mh(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Ph(t)?v(t):(e.consume(t),x)}function S(e){return 47===e||62===e||Lh(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||Mh(t)?A(t):Lh(t)?(e.consume(t),C):n(t)}function A(t){return 45===t&&2===i?(e.consume(t),O):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),D):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),P):!Mh(t)||6!==i&&7!==i?null===t||Mh(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(Sm,z,E)(t))}function E(t){return e.check(tm,I,z)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||Mh(t)?E(t):(e.enter("htmlFlowData"),A(t))}function O(t){return 45===t?(e.consume(t),L):A(t)}function N(t){return 47===t?(e.consume(t),o="",M):A(t)}function M(t){if(62===t){const n=o.toLowerCase();return km.includes(n)?(e.consume(t),D):A(t)}return Ch(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):A(t)}function P(t){return 93===t?(e.consume(t),L):A(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===i?(e.consume(t),L):A(t)}function D(t){return null===t||Mh(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),D)}function z(n){return e.exit("htmlFlow"),t(n)}}},Sm={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Xh,t,n)}}},Tm={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):Ch(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Ch(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Mh(t)?(o=u,M(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(a++)?(e.consume(t),6===a?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Mh(t)?(o=h,M(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?N(t):Mh(t)?(o=y,M(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Mh(t)?(o=b,M(t)):(e.consume(t),b)}function v(e){return 62===e?N(e):b(e)}function w(t){return Ch(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||Ah(t)?(e.consume(t),k):x(t)}function x(t){return Mh(t)?(o=x,M(t)):Lh(t)?(e.consume(t),x):N(t)}function S(t){return 45===t||Ah(t)?(e.consume(t),S):47===t||62===t||Ph(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),N):58===t||95===t||Ch(t)?(e.consume(t),C):Mh(t)?(o=T,M(t)):Lh(t)?(e.consume(t),T):N(t)}function C(t){return 45===t||46===t||58===t||95===t||Ah(t)?(e.consume(t),C):A(t)}function A(t){return 61===t?(e.consume(t),E):Mh(t)?(o=A,M(t)):Lh(t)?(e.consume(t),A):T(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,I):Mh(t)?(o=E,M(t)):Lh(t)?(e.consume(t),E):(e.consume(t),_)}function I(t){return t===i?(e.consume(t),i=void 0,O):null===t?n(t):Mh(t)?(o=I,M(t)):(e.consume(t),I)}function _(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Ph(t)?T(t):(e.consume(t),_)}function O(e){return 47===e||62===e||Ph(e)?T(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Lh(t)?$h(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),o(t)}}},Cm={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&yh(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a=e.length,o=0;for(;a--;){const t=e[a][1];if(n){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[a][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[a][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(n=a,"labelLink"!==t.type)){o=2;break}}else"labelEnd"===t.type&&(r=a)}const s={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[r][1].end}},c={type:"labelText",start:{...e[n+o+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",s,t],["enter",l,t]],i=bh(i,e.slice(n+1,n+o+3)),i=bh(i,[["enter",c,t]]),i=bh(i,Gh(t.parser.constructs.insideSpan.null,e.slice(n+o+4,r-3),t)),i=bh(i,[["exit",c,t],e[r-2],e[r-1],["exit",l,t]]),i=bh(i,e.slice(r+1)),i=bh(i,[["exit",s,t]]),yh(e,n,e.length,i),e},tokenize:function(e,t,n){const r=this,i=r._labelStarts;let a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return function(t){return a?a._inactive?u(t):(o=r.parser.defined.includes(Th(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(Am,c,o?c:u)(t):91===t?e.attempt(Em,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(Im,c,u)(t)}function c(e){return i.pop(),t(e)}function u(e){return a._balanced=!0,n(e)}}},Am={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Ph(t)?mm(e,i)(t):i(t)}function i(t){return 41===t?c(t):pm(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return Ph(t)?mm(e,s)(t):c(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?hm(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Ph(t)?mm(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Em={tokenize:function(e,t,n){const r=this;return function(t){return fm.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(Th(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Im={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},_m={name:"labelStartImage",resolveAll:Cm.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},Om={name:"labelStartLink",resolveAll:Cm.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},Nm={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),$h(e,t,"linePrefix")}}},Mm={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Mh(a))?(e.exit("thematicBreak"),t(a)):n(a)}function o(t){return t===r?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),Lh(t)?$h(e,a,"whitespace")(t):a(t))}}},Pm={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Xh,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$h(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Lh(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Dm,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$h(e,e.attempt(Pm,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:_h(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Mm,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return _h(t)&&++o<10?(e.consume(t),s):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Xh,r.interrupt?n:c,e.attempt(Lm,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return Lh(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Lm={partial:!0,tokenize:function(e,t,n){const r=this;return $h(e,function(e){const i=r.events[r.events.length-1];return!Lh(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Dm={partial:!0,tokenize:function(e,t,n){const r=this;return $h(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},zm={name:"setextUnderline",resolveTo:function(e,t){const n=new Bh;let r,i,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(i=o)}else"content"===e[o][1].type&&n.add(o,1,[]),a||"definition"!==e[o][1].type||(a=o);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(n.add(i,0,[["enter",s,t]]),n.add(a+1,0,[["exit",e[r][1],t]]),e[r][1].end={...e[a][1].end}):e[r][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let o,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){o="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!o?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t))};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Lh(t)?$h(e,o,"lineSuffix")(t):o(t))}function o(r){return null===r||Mh(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Rm={tokenize:function(e){const t=this,n=e.attempt(Xh,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,$h(e,e.attempt(this.parser.constructs.flow,r,e.attempt(um,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},jm={resolveAll:Bm()},$m=qm("string"),Fm=qm("text");function qm(e){return{resolveAll:Bm("text"===e?Um:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Bm(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Um(e,t){const n=new Bh;let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const i=e[r-1][1],a=t.sliceStream(i);let o,s=a.length,l=-1,c=0;for(;s--;){const e=a[s];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)o=!0,c++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const a={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[["enter",a,t],["exit",a,t]])}r++}return n.consume(e),e}var Hm=/* @__PURE__ */$({attentionMarkers:()=>Zm,contentInitial:()=>Vm,disable:()=>Qm,document:()=>Wm,flow:()=>Km,flowInitial:()=>Gm,insideSpan:()=>Xm,string:()=>Ym,text:()=>Jm}),Wm={42:Pm,43:Pm,45:Pm,48:Pm,49:Pm,50:Pm,51:Pm,52:Pm,53:Pm,54:Pm,55:Pm,56:Pm,57:Pm,62:Zh},Vm={91:gm},Gm={[-2]:rm,[-1]:rm,32:rm},Km={35:vm,42:Mm,45:[zm,Mm],60:xm,61:zm,95:Mm,96:nm,126:nm},Ym={38:em,92:Qh},Jm={[-5]:Nm,[-4]:Nm,[-3]:Nm,33:_m,38:em,42:Kh,60:[Jh,Tm],91:Om,92:[bm,Qh],93:Cm,95:Kh,96:am},Xm={null:[Kh,jm]},Zm={null:[42,95]},Qm={null:[]};function eg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(h),consume:function(e){Mh(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,r.push(o)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return o=bh(o,e),function(){for(;r._index<o.length;){const e=o[r._index];if("string"==typeof e){const t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)f(e.charCodeAt(r._bufferIndex))}else f(e)}}(),null!==o[o.length-1]?[]:(g(t,0),c.events=Gh(a,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function f(e){u=u(e)}function h(e,t){t.restore()}function m(e,t){return function(n,i,a){let o,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return o=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){return f=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=a,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,f),i}function b(e){return f.restore(),++u<o.length?m(o[u]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&yh(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var tg=/[\0\t\n\r]/g,ng=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rg(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Sh(n.slice(t?2:1),t?16:10)}return gh(n)||e}var ig={}.hasOwnProperty;function ag(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(v),autolinkProtocol:d,autolinkEmail:d,atxHeading:a(g),blockQuote:a(function(){return{type:"blockquote",children:[],position:void 0}}),characterEscape:d,characterReference:d,codeFenced:a(m),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(m,o),codeText:a(function(){return{type:"inlineCode",value:"",position:void 0}},o),codeTextData:d,data:d,codeFlowValue:d,definition:a(function(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(function(){return{type:"emphasis",children:[],position:void 0}}),hardBreakEscape:a(y),hardBreakTrailing:a(y),htmlFlow:a(b,o),htmlFlowData:d,htmlText:a(b,o),htmlTextData:d,image:a(function(){return{type:"image",title:null,url:"",alt:null,position:void 0}}),label:o,link:a(v),listItem:a(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[],position:void 0}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:a(w,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:a(w),paragraph:a(function(){return{type:"paragraph",children:[],position:void 0}}),reference:function(){this.data.referenceType="collapsed"},referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(g),strong:a(function(){return{type:"strong",children:[],position:void 0}}),thematicBreak:a(function(){return{type:"thematicBreak",position:void 0}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Sh(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=gh(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=og(e.end)},codeFenced:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:l(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Th(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(f),hardBreakTrailing:l(f),htmlFlow:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(ng,rg)}(t),n.identifier=Th(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=og(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Th(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};sg(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let a={type:"root",children:[],position:void 0};const l={stack:[a],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},d=[],p=[];let f=-1;for(;++f<e.length;)p.push(e[f]),"listOrdered"!==e[f][1].type&&"listUnordered"!==e[f][1].type||("enter"===e[f][0]?d.push(p.length-1):i(p,d.pop()));for(e=p,f=-1;++f<e.length;){const n=t[e[f][0]];"enter"===e[f][0]&&t.beforeEnter.length>0&&r(t.beforeEnter,{...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1]),ig.call(n,e[f][1].type)&&n[e[f][1].type].call({...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1]),"exit"===e[f][0]&&t.afterExit.length>0&&r(t.afterExit,{...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1])}if(l.tokenStack.length>0){const e=l.tokenStack[l.tokenStack.length-1];(e[1]||cg).call(l,void 0,e[0])}for(a.position={start:og(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:og(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)a=t.transforms[f](a)||a;return a};function r(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function i(e,t){const n=e.length-1;let r,i,a,o,s=t-1,l=-1,c=!1;const u=[];for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let n=s;for(i=void 0;n--;){const t=e[n];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=n}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),u.push({at:i||s,event:["exit",r,t[2]]})}if("listItemPrefix"===t[1].type){const e={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=e,u.push({at:s,event:["enter",e,t[2]]}),a=void 0,o=!0}}}const d=e.splice(t);let p=0;for(s=-1;++s<d.length;){for(;p<u.length&&u[p].at===t+s;)e.push(u[p++].event);e.push(d[s])}e[t][1]._spread=c}function a(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:og(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Bf({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||cg).call(this,e,r[0])),n.position.end=og(e.end)}function u(){return dh(this.stack.pop())}function d(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:"",position:void 0},n.position={start:og(e.start),end:void 0},t.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=og(e.end)}function f(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function g(){return{type:"heading",depth:0,children:[],position:void 0}}function y(){return{type:"break",position:void 0}}function b(){return{type:"html",value:"",position:void 0}}function v(){return{type:"link",title:null,url:"",children:[],position:void 0}}function w(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[],position:void 0}}}(n)(function(e){for(;!lm(e););return e}(function(e){const t={constructs:wh([Hm,...(e||{}).extensions||[]]),content:n(qh),defined:[],document:n(Hh),flow:n(Rm),lazy:{},string:n($m),text:n(Fm)};return t;function n(e){return function(n){return eg(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,o){i=n+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i));const s=[];let l=0;for(n="",r&&(65279===i.charCodeAt(0)&&l++,r=void 0);l<i.length;){tg.lastIndex=l;const r=tg.exec(i),a=r&&void 0!==r.index?r.index:i.length,o=i.charCodeAt(a);if(!r){n=i.slice(l);break}if(10===o&&l===a&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<a&&(s.push(i.slice(l,a)),t+=a-l),o){case 0:s.push(65533),t++;break;case 9:{const e=4*Math.ceil(t/4);for(s.push(-2);t++<e;)s.push(-1);break}case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=a+1}return o&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function og(e){return{line:e.line,column:e.column,offset:e.offset}}function sg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sg(e,r):lg(e,r)}}function lg(e,t){let n;for(n in t)if(ig.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function cg(e,t){if(e)throw new Error("Cannot close `"+e.type+"` ("+Bf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bf({start:t.start,end:t.end})+") is open");throw new Error("Cannot close document, a token (`"+t.type+"`, "+Bf({start:t.start,end:t.end})+") is still open")}function ug(e){const t=this;t.parser=function(n){return ag(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dg(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function pg(e){const t=e.spread;return null==t?e.children.length>1:t}function fg(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(hg(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(hg(t.slice(i),i>0,!1)),a.join("")}function hg(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var mg={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=jh(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dg(e,t);const i={src:jh(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:jh(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dg(e,t);const i={href:jh(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:jh(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=pg(n[r])}return t}(n):pg(t),a={},o=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ff(t.children[1]),o=$f(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<o;){const n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:fg(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:gg,yaml:gg,definition:gg,footnoteDefinition:gg};function gg(){}var{defineProperty:yg}=Object,bg="object"==typeof self?self:globalThis,vg=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new bg[e](t)},wg=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{const e=n([],i);for(const t of o)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of o){const i=r(t),a=r(n);"__proto__"===i?yg(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{const{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of o)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of o)e.add(r(t));return e}case 7:{const{name:e,message:t}=o;return n("function"==typeof bg[e]?vg(e,t):new Error(t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case"-0":return-0}return n(vg(a,o),i)};return r})(/* @__PURE__ */new Map,e)(0),kg="",{toString:xg}={},{keys:Sg,is:Tg}=Object,Cg=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=xg.call(e).slice(8,-1);switch(n){case"Array":return[1,kg];case"Object":return[2,kg];case"Date":return[3,kg];case"RegExp":return[4,kg];case"Map":return[5,kg];case"Set":return[6,kg];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:e instanceof Error?[7,e.name||"Error"]:[2,n]},Ag=([e,t])=>0===e&&("function"===t||"symbol"===t),Eg=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,l]=Cg(o);switch(s){case 0:{let t=o;switch(l){case"bigint":s=8,t=o.toString();break;case"number":if(!o&&Tg(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return i([-1],o)}return i([s,t],o)}case 1:{if(l){let e=o;return"DataView"===l?e=new Uint8Array(o.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(o)),i([l,[...e]],o)}const e=[],t=i([s,e],o);for(const n of o)e.push(a(n));return t}case 2:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const n=[],r=i([s,n],o);for(const t of Sg(o))!e&&Ag(Cg(o[t]))||n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?kg:o.toISOString()],o);case 4:{const{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{const t=[],n=i([s,t],o);for(const[r,i]of o)(e||!Ag(Cg(r))&&!Ag(Cg(i)))&&t.push([a(r),a(i)]);return n}case 6:{const t=[],n=i([s,t],o);for(const r of o)!e&&Ag(Cg(r))||t.push(a(r));return n}}const{message:c}=o;return i([s,{name:l,message:c}],o)};return a})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},Ig="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?wg(Eg(e,t)):structuredClone(e):(e,t)=>wg(Eg(e,t));function _g(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Og(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var Ng=function(e){if(null==e)return Pg;if("function"==typeof e)return Mg(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ng(e[n]);return Mg(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return Mg(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return t=e,Mg(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function Mg(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Pg(){return!0}var Lg=[];function Dg(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const a=Ng(i),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Lg;if((!t||a(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Lg:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+o,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}}return p}}(e,void 0,[])()}function zg(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Dg(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}var Rg={}.hasOwnProperty,jg={};function $g(e,t){const n=t||jg,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Hg(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Hg(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:qg,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...mg,...n.handlers},one:function(e,t){const n=e.type,r=a.handlers[n];if(Rg.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Ig(n);return r.children=a.all(e),r}return Ig(e)}return(a.options.unknownHandler||Bg)(a,e,t)},options:n,patch:Fg,wrap:Ug};return zg(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Fg(e,t){e.position&&(t.position=function(e){const t=Ff(e),n=$f(e);if(t&&n)return{start:t,end:n}}(e))}function qg(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,Ig(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Bg(e,t){const n=t.data||{},r=!("value"in t)||Rg.call(n,"hProperties")||Rg.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ug(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Hg(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wg(e,t){const n=$g(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_g,r=e.options.footnoteBackLabel||Og,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),c=jh(o.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ig(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function Vg(e,t){return e&&"run"in e?async function(n,r){const i=Wg(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Wg(n,{file:r,...e||t})}}function Gg(e){if(e)throw e}var Kg=/* @__PURE__ */j((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function Yg(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Jg=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');ty(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},Xg=function(e){if(ty(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},Zg=function(e){ty(e);let t,n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=n+1;break}}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},Qg=function(...e){let t,n=-1;for(;++n<e.length;)ty(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){ty(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},ey="/";function ty(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var ny=function(){return"/"};function ry(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var iy=["history","path","basename","stem","extname","dirname"],ay=class{constructor(e){let t;t=e?ry(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":ny(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<iy.length;){const e=iy[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)iy.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Jg(this.path):void 0}set basename(e){sy(e,"basename"),oy(e,"basename"),this.path=Qg(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Xg(this.path):void 0}set dirname(e){ly(this.basename,"dirname"),this.path=Qg(e||"",this.basename)}get extname(){return"string"==typeof this.path?Zg(this.path):void 0}set extname(e){if(oy(e,"extname"),ly(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qg(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ry(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!ry(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),sy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Jg(this.path,this.extname):void 0}set stem(e){sy(e,"stem"),oy(e,"stem"),this.path=Qg(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Vf(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function oy(e,t){if(e&&e.includes(ey))throw new Error("`"+t+"` cannot be a path: did not expect `"+ey+"`")}function sy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ly(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var cy=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},uy=/* @__PURE__ */F(Kg(),1),dy={}.hasOwnProperty,py=(new class e extends cy{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(a,...o){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==o[l]&&void 0!==o[l]||(o[l]=t[l]);t=o,s?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(r);try{s=e.apply(this,t)}catch(a){if(o&&n)throw a;return r(a)}o||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...o):r(null,...o)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,uy.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(my("data",this.frozen),this.namespace[e]=t,this):dy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(my("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=by(e),n=this.parser||this.Parser;return fy("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),fy("process",this.parser||this.Parser),hy("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=by(e),o=n.parse(a);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);const i=t,a=n.stringify(i,r);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),fy("processSync",this.parser||this.Parser),hy("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Gg(e),t=r}),yy("processSync","process",n),t}run(e,t,n){gy(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const o=by(t);r.run(e,o,function(t,r,o){const s=r||e;t?a(t):i?i(s):n(void 0,s,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Gg(e),n=t,r=!0}),yy("runSync","run",r),n}stringify(e,t){this.freeze();const n=by(t),r=this.compiler||this.Compiler;return hy("stringify",r),gy(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(my("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,uy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const o=n[i][1];Yg(o)&&Yg(r)&&(r=(0,uy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}).freeze();function fy(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function hy(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function my(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gy(e){if(!Yg(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function yy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function by(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ay(e)}var vy=[],wy={allowDangerousHtml:!0},ky=/^(https?|ircs?|mailto|xmpp)$/i,xy=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Sy(e){const t=function(e){const t=e.rehypePlugins||vy,n=e.remarkPlugins||vy,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wy}:wy;return py().use(ug).use(n).use(Vg,r).use(t)}(e),n=function(e){const t=e.children||"",n=new ay;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Ty;for(const c of xy)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return zg(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in ch)if(Object.hasOwn(ch,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=ch[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,a){const o=Array.isArray(i.children),s=Ff(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,a){const o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Pf:Mf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=eh(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}(e,{Fragment:E,components:i,ignoreInvalidStyle:!0,jsx:I,jsxs:_,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function Ty(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||ky.test(e.slice(0,t))?e:""}function Cy(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Ay(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ey(e){return function(e){if(Array.isArray(e))return Ay(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ay(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ay(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iy(e){return Iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iy(e)}function _y(e,t,n){return(t=function(e){var t=function(e){if("object"!=Iy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Iy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Iy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(null,arguments)}function Ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function My(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ny(Object(n),!0).forEach(function(t){_y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Py={};function Ly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Py[r]||(Py[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Py[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return My(My({},e),n[t])},t)}function Dy(e){return e.join(" ")}function zy(e){var n=e.node,r=e.stylesheet,i=e.style,a=void 0===i?{}:i,o=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return zy({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,o);if(o){var h=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&m.concat(l.className.filter(function(e){return!h.includes(e)}));p=My(My({},l),{},{className:Dy(g)||void 0,style:Ly(l.className,Object.assign({},l.style,a),r)})}else p=My(My({},l),{},{className:Dy(l.className)});var y=f(n.children);/*#__PURE__*/
39
- return t.createElement(u,Oy({key:s},p),y)}}var Ry=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jy(Object(n),!0).forEach(function(t){_y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fy=/\n/g;function qy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,a=void 0===i?{float:"left",paddingRight:"10px"}:i,o=e.numberStyle,s=void 0===o?{}:o,l=e.startingLineNumber;/*#__PURE__*/
36
+ /* @__PURE__ */a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ch(e,t.position);else{const i=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];
37
+ /* @__PURE__ */t.type,a=e.evaluater.evaluateExpression(t.expression)}else ch(e,t.position);else a=null===r.value||r.value;n[i]=a}return n}(e,t),s=oh(e,t);return ih(e,o,a,t),ah(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ch(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return ah(r,oh(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function ih(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ah(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function oh(e,t){const n=[];let r=-1;const i=e.passKeys?/* @__PURE__ */new Map:Zf;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=i.get(e)||0;o=e+"-"+t,i.set(e,t+1)}}const s=rh(e,a,o);void 0!==s&&n.push(s)}return n}function sh(e,t,n){const r=Mf(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,Jf.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Yf("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=nh+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Xf.call(e,n)&&(t[uh(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?If[r.property]||r.property:r.attribute,n]}}function lh(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=Zp(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}
38
+ /* @__PURE__ */r=n}else r=Zp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Xf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ch(e)}function ch(e,t){const n=new Yf("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=nh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function uh(e){let t=e.replace(Qf,dh);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function dh(e){return"-"+e.toLowerCase()}var ph={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},fh={};function hh(e,t){const n=t||fh;return mh(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function mh(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gh(e.children,t,n)}return Array.isArray(e)?gh(e,t,n):""}function gh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=mh(e[i],t,n);return r.join("")}var yh={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},bh={}.hasOwnProperty;function vh(e){return!!bh.call(yh,e)&&yh[e]}function wh(e,t,n,r){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function kh(e,t){return e.length>0?(wh(e,e.length,0,t),e):t}var xh={}.hasOwnProperty;function Sh(e){const t={};let n=-1;for(;++n<e.length;)Th(t,e[n]);return t}function Th(e,t){let n;for(n in t){const r=(xh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){xh.call(r,a)||(r[a]=[]);const e=i[a];Ch(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ch(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);wh(e,0,0,r)}function Ah(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Eh(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ih=Fh(/[A-Za-z]/),_h=Fh(/[\dA-Za-z]/),Oh=Fh(/[#-'*+\--9=?A-Z^-~]/);function Nh(e){return null!==e&&(e<32||127===e)}var Mh=Fh(/\d/),Ph=Fh(/[\dA-Fa-f]/),Lh=Fh(/[!-/:-@[-`{-~]/);function Dh(e){return null!==e&&e<-2}function zh(e){return null!==e&&(e<0||32===e)}function Rh(e){return-2===e||-1===e||32===e}var jh=Fh(/\p{P}|\p{S}/u),$h=Fh(/\s/);function Fh(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function qh(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(37===a&&_h(e.charCodeAt(n+1))&&_h(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Bh(e,t,n,r){const i=r?r-1:1/0;let a=0;return function(r){return Rh(r)?(e.enter(n),o(r)):t(r)};function o(r){return Rh(r)&&a++<i?(e.consume(r),o):(e.exit(n),t(r))}}function Uh(e,t,n,r,i,a){let o=0;return function(t){return a>0&&Rh(t)?(e.enter(r),s(t)):l(t)};function s(t){return Rh(t)&&o<a?(e.consume(t),o++,s):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Hh={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Bh(e,t,"linePrefix");e.consume(n)},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Dh(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},Wh=class{constructor(){this.index=/* @__PURE__ */new Map,this.map=[]}add(e,t,n){Vh(this,e,t,n,!1)}addBefore(e,t,n){Vh(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Vh(e,t,n,r,i){if(0===n&&0===r.length)return;const a=e.index.get(t);if(a)return a[1]+=n,void(i?(r.push(...a[2]),a[2]=r):a[2].push(...r));const o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Gh={tokenize:function(e){const t=this,n=[];let r,i,a,o=0;return s;function s(r){if(o<n.length){const i=n[o];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let i,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}y(o);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;const l=new Wh;return l.add(a+1,0,t.events.slice(n)),l.add(n,s-n,[]),l.consume(t.events),c(e)}return s(e)}function c(i){if(o===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return h(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Kh,u,d)(i)}function u(e){return r&&b(),y(o),p(e)}function d(e){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Kh,f,h)(n)}function f(e){return o++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Dh(n)?(e.consume(n),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(y(o),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;const c=new Wh;c.add(l+1,0,t.events.slice(n)),c.add(n,e-n,[]),c.consume(t.events)}}function y(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Kh={tokenize:function(e,t,n){return Bh(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Yh(e){return null===e||zh(e)||$h(e)?1:jh(e)?2:void 0}function Jh(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Xh={name:"attention",resolveAll:function(e,t){let n,r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._close){let i=r;for(;i--;)if("exit"===e[i][0]&&"attentionSequence"===e[i][1].type&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[r][1].start};Zh(o,-a),Zh(s,a);const l={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={type:a>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:s},u={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},d={type:a>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[i][1].end={...l.start},e[r][1].start={...c.end},n=[],e[i][1].end.offset-e[i][1].start.offset&&(n=kh(n,[["enter",e[i][1],t],["exit",e[i][1],t]])),n=kh(n,[["enter",d,t],["enter",l,t],["exit",l,t],["enter",u,t]]),n=kh(n,Jh(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=kh(n,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",d,t]]);let p=0;e[r][1].end.offset-e[r][1].start.offset&&(p=2,n=kh(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),wh(e,i-1,r-i+3,n),r=i+n.length-p-2;break}}for(r=-1;++r<e.length;)"attentionSequence"===e[r][1].type&&(e[r][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yh(r);let a;return function(t){return a=t,e.enter("attentionSequence"),o(t)};function o(s){if(s===a)return e.consume(s),o;const l=e.exit("attentionSequence"),c=Yh(s),u=!c||2===c&&i||n.includes(s)&&42!==s&&95!==s,d=!i||2===i&&c||n.includes(r)&&42!==r&&95!==r;return l._open=Boolean(42===a?u:u&&(i||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function Zh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Qh={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return Ih(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||_h(e)?(r=1,o(e)):l(e)}function o(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||_h(t))&&r++<32?(e.consume(t),o):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Nh(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Oh(t)?(e.consume(t),l):n(t)}function c(e){return _h(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||_h(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},em={partial:!0,tokenize:function(e,t,n){return function(t){return Rh(t)?Bh(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Dh(e)?t(e):n(e)}}},tm={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Rh(t)?Bh(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(tm,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Rh(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},nm={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Lh(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},rm={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,a,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=_h,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Ph,c):(e.enter("characterReferenceValue"),i=7,a=Mh,c(t))}function c(s){if(59===s&&o){const i=e.exit("characterReferenceValue");return a!==_h||vh(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&o++<i?(e.consume(s),c):n(s)}}},im={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},am={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),Rh(t)?Bh(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===a?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===a?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Rh(t)?Bh(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Dh(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,o=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return o=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Rh(t)?Bh(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Dh(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(im,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Dh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Rh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Bh(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Dh(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Dh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(i,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return o>0&&Rh(t)?Bh(e,g,"linePrefix",o+1)(t):g(t)}function g(t){return null===t||Dh(t)?e.check(im,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Dh(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}},om={name:"codeIndented",tokenize:function(e,t,n){return function(t){return e.enter("codeIndented"),Uh(e,r,n,"linePrefix",4,4)(t)};function r(t){return null===t?a(t):Dh(t)?e.attempt(sm,r,a)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Dh(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),i)}function a(n){return e.exit("codeIndented"),t(n)}}},sm={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Dh(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Uh(e,t,a,"linePrefix",4,4)(o)}function a(e){return Dh(e)?i(e):n(e)}}},lm={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Dh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Dh(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}},cm=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&um(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),um(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),um(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);um(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);um(this.left,t.reverse())}}};function um(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function dm(e){const t={};let n,r,i,a,o,s,l,c=-1;const u=new cm(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,pm(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(a=u.get(i),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=i);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},o=u.slice(r,c),o.unshift(n),u.splice(r,c-r+1,o))}}return wh(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function pm(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}var fm={resolve:function(e){return dm(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Dh(t)?e.check(hm,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},hm={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Bh(e,i,"linePrefix")};function i(i){if(null===i||Dh(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function mm(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d):null===t||32===t||41===t||Nh(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Dh(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return u||null!==i&&41!==i&&!zh(i)?u<c&&40===i?(e.consume(i),u++,h):41===i?(e.consume(i),u--,h):null===i||32===i||40===i||Nh(i)?n(i):(e.consume(i),92===i?m:h):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function gm(e,t,n,r,i,a){const o=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Dh(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Dh(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Rh(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function ym(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):Dh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Bh(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||Dh(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function bm(e,t){let n;return function r(i){return Dh(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Rh(i)?Bh(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var vm={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return gm.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return i=Eh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return zh(t)?bm(e,s)(t):s(t)}function s(t){return mm(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(wm,c,c)(t)}function c(t){return Rh(t)?Bh(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Dh(a)?(e.exit("definition"),r.parser.defined.push(i),t(a)):n(a)}}},wm={partial:!0,tokenize:function(e,t,n){return function(t){return zh(t)?bm(e,r)(t):n(t)};function r(t){return ym(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Rh(t)?Bh(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Dh(e)?t(e):n(e)}}},km={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Dh(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},xm={name:"headingAtx",resolve:function(e,t){let n=e.length-2,r=3;if("whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};wh(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||zh(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),o(n)):null===n||Dh(n)?(e.exit("atxHeading"),t(n)):Rh(n)?Bh(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function o(t){return 35===t?(e.consume(t),o):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||zh(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}},Sm=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Tm=["pre","script","style","textarea"],Cm={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let i,a,o,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),i=3,r.interrupt?t:L):Ih(s)?(e.consume(s),o=String.fromCharCode(s),h):n(s)}function u(a){return 45===a?(e.consume(a),i=2,d):91===a?(e.consume(a),i=5,s=0,p):Ih(a)?(e.consume(a),i=4,r.interrupt?t:L):n(a)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:L):n(i)}function p(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:A:p):n(i)}function f(t){return Ih(t)?(e.consume(t),o=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||zh(s)){const l=47===s,c=o.toLowerCase();return l||a||!Tm.includes(c)?Sm.includes(o.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):A(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?g(s):y(s)):(i=1,r.interrupt?t(s):A(s))}return 45===s||_h(s)?(e.consume(s),o+=String.fromCharCode(s),h):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:A):n(i)}function g(t){return Rh(t)?(e.consume(t),g):T(t)}function y(t){return 47===t?(e.consume(t),T):58===t||95===t||Ih(t)?(e.consume(t),b):Rh(t)?(e.consume(t),y):T(t)}function b(t){return 45===t||46===t||58===t||95===t||_h(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):Rh(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):Rh(t)?(e.consume(t),w):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||Dh(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||zh(t)?v(t):(e.consume(t),x)}function S(e){return 47===e||62===e||Rh(e)?y(e):n(e)}function T(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||Dh(t)?A(t):Rh(t)?(e.consume(t),C):n(t)}function A(t){return 45===t&&2===i?(e.consume(t),O):60===t&&1===i?(e.consume(t),N):62===t&&4===i?(e.consume(t),D):63===t&&3===i?(e.consume(t),L):93===t&&5===i?(e.consume(t),P):!Dh(t)||6!==i&&7!==i?null===t||Dh(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(Am,z,E)(t))}function E(t){return e.check(im,I,z)(t)}function I(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||Dh(t)?E(t):(e.enter("htmlFlowData"),A(t))}function O(t){return 45===t?(e.consume(t),L):A(t)}function N(t){return 47===t?(e.consume(t),o="",M):A(t)}function M(t){if(62===t){const n=o.toLowerCase();return Tm.includes(n)?(e.consume(t),D):A(t)}return Ih(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):A(t)}function P(t){return 93===t?(e.consume(t),L):A(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===i?(e.consume(t),L):A(t)}function D(t){return null===t||Dh(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),D)}function z(n){return e.exit("htmlFlow"),t(n)}}},Am={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(em,t,n)}}},Em={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,a,o;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):Ih(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Ih(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Dh(t)?(o=u,M(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(a++)?(e.consume(t),6===a?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Dh(t)?(o=h,M(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?N(t):Dh(t)?(o=y,M(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Dh(t)?(o=b,M(t)):(e.consume(t),b)}function v(e){return 62===e?N(e):b(e)}function w(t){return Ih(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||_h(t)?(e.consume(t),k):x(t)}function x(t){return Dh(t)?(o=x,M(t)):Rh(t)?(e.consume(t),x):N(t)}function S(t){return 45===t||_h(t)?(e.consume(t),S):47===t||62===t||zh(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),N):58===t||95===t||Ih(t)?(e.consume(t),C):Dh(t)?(o=T,M(t)):Rh(t)?(e.consume(t),T):N(t)}function C(t){return 45===t||46===t||58===t||95===t||_h(t)?(e.consume(t),C):A(t)}function A(t){return 61===t?(e.consume(t),E):Dh(t)?(o=A,M(t)):Rh(t)?(e.consume(t),A):T(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,I):Dh(t)?(o=E,M(t)):Rh(t)?(e.consume(t),E):(e.consume(t),_)}function I(t){return t===i?(e.consume(t),i=void 0,O):null===t?n(t):Dh(t)?(o=I,M(t)):(e.consume(t),I)}function _(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||zh(t)?T(t):(e.consume(t),_)}function O(e){return 47===e||62===e||zh(e)?T(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Rh(t)?Bh(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),o(t)}}},Im={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&wh(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a=e.length,o=0;for(;a--;){const t=e[a][1];if(n){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[a][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[a][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(n=a,"labelLink"!==t.type)){o=2;break}}else"labelEnd"===t.type&&(r=a)}const s={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[r][1].end}},c={type:"labelText",start:{...e[n+o+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",s,t],["enter",l,t]],i=kh(i,e.slice(n+1,n+o+3)),i=kh(i,[["enter",c,t]]),i=kh(i,Jh(t.parser.constructs.insideSpan.null,e.slice(n+o+4,r-3),t)),i=kh(i,[["exit",c,t],e[r-2],e[r-1],["exit",l,t]]),i=kh(i,e.slice(r+1)),i=kh(i,[["exit",s,t]]),wh(e,n,e.length,i),e},tokenize:function(e,t,n){const r=this,i=r._labelStarts;let a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return function(t){return a?a._inactive?u(t):(o=r.parser.defined.includes(Eh(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(_m,c,o?c:u)(t):91===t?e.attempt(Om,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(Nm,c,u)(t)}function c(e){return i.pop(),t(e)}function u(e){return a._balanced=!0,n(e)}}},_m={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return zh(t)?bm(e,i)(t):i(t)}function i(t){return 41===t?c(t):mm(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return zh(t)?bm(e,s)(t):c(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?ym(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return zh(t)?bm(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Om={tokenize:function(e,t,n){const r=this;return function(t){return gm.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(Eh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Nm={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},Mm={name:"labelStartImage",resolveAll:Im.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},Pm={name:"labelStartLink",resolveAll:Im.resolveAll,tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),i=e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}},Lm={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Bh(e,t,"linePrefix")}}},Dm={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),o(a)):i>=3&&(null===a||Dh(a))?(e.exit("thematicBreak"),t(a)):n(a)}function o(t){return t===r?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),Rh(t)?Bh(e,a,"whitespace")(t):a(t))}}},zm={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(em,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Bh(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Rh(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jm,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Bh(e,e.attempt(zm,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Mh(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Dm,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Mh(t)&&++o<10?(e.consume(t),s):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(em,r.interrupt?n:c,e.attempt(Rm,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return Rh(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Rm={partial:!0,tokenize:function(e,t,n){const r=this;return Bh(e,function(e){const i=r.events[r.events.length-1];return!Rh(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},jm={partial:!0,tokenize:function(e,t,n){const r=this;return Bh(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},$m={name:"setextUnderline",resolveTo:function(e,t){const n=new Wh;let r,i,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(i=o)}else"content"===e[o][1].type&&n.add(o,1,[]),a||"definition"!==e[o][1].type||(a=o);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(n.add(i,0,[["enter",s,t]]),n.add(a+1,0,[["exit",e[r][1],t]]),e[r][1].end={...e[a][1].end}):e[r][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let o,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){o="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!o?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t))};function a(t){return t===i?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Rh(t)?Bh(e,o,"lineSuffix")(t):o(t))}function o(r){return null===r||Dh(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},Fm={tokenize:function(e){const t=this,n=e.attempt(em,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,Bh(e,e.attempt(this.parser.constructs.flow,r,e.attempt(fm,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},qm={resolveAll:Wm()},Bm=Hm("string"),Um=Hm("text");function Hm(e){return{resolveAll:Wm("text"===e?Vm:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Wm(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Vm(e,t){const n=new Wh;let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const i=e[r-1][1],a=t.sliceStream(i);let o,s=a.length,l=-1,c=0;for(;s--;){const e=a[s];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)o=!0,c++;else if(-1!==e){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const a={type:r===e.length||o||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[["enter",a,t],["exit",a,t]])}r++}return n.consume(e),e}var Gm=/* @__PURE__ */$({attentionMarkers:()=>tg,contentInitial:()=>Ym,disable:()=>ng,document:()=>Km,flow:()=>Xm,flowInitial:()=>Jm,insideSpan:()=>eg,string:()=>Zm,text:()=>Qm}),Km={42:zm,43:zm,45:zm,48:zm,49:zm,50:zm,51:zm,52:zm,53:zm,54:zm,55:zm,56:zm,57:zm,62:tm},Ym={91:vm},Jm={[-2]:om,[-1]:om,32:om},Xm={35:xm,42:Dm,45:[$m,Dm],60:Cm,61:$m,95:Dm,96:am,126:am},Zm={38:rm,92:nm},Qm={[-5]:Lm,[-4]:Lm,[-3]:Lm,33:Mm,38:rm,42:Xh,60:[Qh,Em],91:Pm,92:[km,nm],93:Im,95:Xh,96:lm},eg={null:[Xh,qm]},tg={null:[42,95]},ng={null:[]};function rg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(h),consume:function(e){Dh(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,r.push(o)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){return o=kh(o,e),function(){for(;r._index<o.length;){const e=o[r._index];if("string"==typeof e){const t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)f(e.charCodeAt(r._bufferIndex))}else f(e)}}(),null!==o[o.length-1]?[]:(g(t,0),c.events=Jh(a,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}(o,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function f(e){u=u(e)}function h(e,t){t.restore()}function m(e,t){return function(n,i,a){let o,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return o=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){return f=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(s);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=a,y()}}}(),d=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,b)(n)}}function g(t){return e(d,f),i}function b(e){return f.restore(),++u<o.length?m(o[u]):a}}}function g(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&wh(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var ig=/[\0\t\n\r]/g,ag=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function og(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Ah(n.slice(t?2:1),t?16:10)}return vh(n)||e}var sg={}.hasOwnProperty;function lg(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(v),autolinkProtocol:d,autolinkEmail:d,atxHeading:a(g),blockQuote:a(function(){return{type:"blockquote",children:[],position:void 0}}),characterEscape:d,characterReference:d,codeFenced:a(m),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(m,o),codeText:a(function(){return{type:"inlineCode",value:"",position:void 0}},o),codeTextData:d,data:d,codeFlowValue:d,definition:a(function(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(function(){return{type:"emphasis",children:[],position:void 0}}),hardBreakEscape:a(y),hardBreakTrailing:a(y),htmlFlow:a(b,o),htmlFlowData:d,htmlText:a(b,o),htmlTextData:d,image:a(function(){return{type:"image",title:null,url:"",alt:null,position:void 0}}),label:o,link:a(v),listItem:a(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[],position:void 0}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:a(w,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:a(w),paragraph:a(function(){return{type:"paragraph",children:[],position:void 0}}),reference:function(){this.data.referenceType="collapsed"},referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(g),strong:a(function(){return{type:"strong",children:[],position:void 0}}),thematicBreak:a(function(){return{type:"thematicBreak",position:void 0}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Ah(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=vh(t),this.stack[this.stack.length-1].value+=r},characterReference:function(e){this.stack.pop().position.end=cg(e.end)},codeFenced:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:l(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Eh(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(f),hardBreakTrailing:l(f),htmlFlow:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:l(function(){const e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(ag,og)}(t),n.identifier=Eh(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=cg(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:l(function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Eh(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};ug(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let a={type:"root",children:[],position:void 0};const l={stack:[a],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},d=[],p=[];let f=-1;for(;++f<e.length;)p.push(e[f]),"listOrdered"!==e[f][1].type&&"listUnordered"!==e[f][1].type||("enter"===e[f][0]?d.push(p.length-1):i(p,d.pop()));for(e=p,f=-1;++f<e.length;){const n=t[e[f][0]];"enter"===e[f][0]&&t.beforeEnter.length>0&&r(t.beforeEnter,{...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1]),sg.call(n,e[f][1].type)&&n[e[f][1].type].call({...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1]),"exit"===e[f][0]&&t.afterExit.length>0&&r(t.afterExit,{...l,sliceSerialize:e[f][2].sliceSerialize},e[f][1])}if(l.tokenStack.length>0){const e=l.tokenStack[l.tokenStack.length-1];(e[1]||pg).call(l,void 0,e[0])}for(a.position={start:cg(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:cg(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f<t.transforms.length;)a=t.transforms[f](a)||a;return a};function r(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function i(e,t){const n=e.length-1;let r,i,a,o,s=t-1,l=-1,c=!1;const u=[];for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let n=s;for(i=void 0;n--;){const t=e[n];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=n}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),u.push({at:i||s,event:["exit",r,t[2]]})}if("listItemPrefix"===t[1].type){const e={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=e,u.push({at:s,event:["enter",e,t[2]]}),a=void 0,o=!0}}}const d=e.splice(t);let p=0;for(s=-1;++s<d.length;){for(;p<u.length&&u[p].at===t+s;)e.push(u[p++].event);e.push(d[s])}e[t][1]._spread=c}function a(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:cg(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Wf({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||pg).call(this,e,r[0])),n.position.end=cg(e.end)}function u(){return hh(this.stack.pop())}function d(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:"",position:void 0},n.position={start:cg(e.start),end:void 0},t.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=cg(e.end)}function f(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function g(){return{type:"heading",depth:0,children:[],position:void 0}}function y(){return{type:"break",position:void 0}}function b(){return{type:"html",value:"",position:void 0}}function v(){return{type:"link",title:null,url:"",children:[],position:void 0}}function w(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[],position:void 0}}}(n)(function(e){for(;!dm(e););return e}(function(e){const t={constructs:Sh([Gm,...(e||{}).extensions||[]]),content:n(Hh),defined:[],document:n(Gh),flow:n(Fm),lazy:{},string:n(Bm),text:n(Um)};return t;function n(e){return function(n){return rg(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,a,o){i=n+("string"==typeof i?i.toString():new TextDecoder(a||void 0).decode(i));const s=[];let l=0;for(n="",r&&(65279===i.charCodeAt(0)&&l++,r=void 0);l<i.length;){ig.lastIndex=l;const r=ig.exec(i),a=r&&void 0!==r.index?r.index:i.length,o=i.charCodeAt(a);if(!r){n=i.slice(l);break}if(10===o&&l===a&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<a&&(s.push(i.slice(l,a)),t+=a-l),o){case 0:s.push(65533),t++;break;case 9:{const e=4*Math.ceil(t/4);for(s.push(-2);t++<e;)s.push(-1);break}case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=a+1}return o&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function cg(e){return{line:e.line,column:e.column,offset:e.offset}}function ug(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ug(e,r):dg(e,r)}}function dg(e,t){let n;for(n in t)if(sg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pg(e,t){if(e)throw new Error("Cannot close `"+e.type+"` ("+Wf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wf({start:t.start,end:t.end})+") is open");throw new Error("Cannot close document, a token (`"+t.type+"`, "+Wf({start:t.start,end:t.end})+") is still open")}function fg(e){const t=this;t.parser=function(n){return lg(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function hg(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function mg(e){const t=e.spread;return null==t?e.children.length>1:t}function gg(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(yg(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(yg(t.slice(i),i>0,!1)),a.join("")}function yg(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}var bg={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qh(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hg(e,t);const i={src:qh(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:qh(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hg(e,t);const i={href:qh(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:qh(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=mg(n[r])}return t}(n):mg(t),a={},o=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Uf(t.children[1]),o=Bf(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<o;){const n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:gg(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:vg,yaml:vg,definition:vg,footnoteDefinition:vg};function vg(){}var{defineProperty:wg}=Object,kg="object"==typeof self?self:globalThis,xg=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new kg[e](t)},Sg=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{const e=n([],i);for(const t of o)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of o){const i=r(t),a=r(n);"__proto__"===i?wg(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{const{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{const e=n(/* @__PURE__ */new Map,i);for(const[t,n]of o)e.set(r(t),r(n));return e}case 6:{const e=n(/* @__PURE__ */new Set,i);for(const t of o)e.add(r(t));return e}case 7:{const{name:e,message:t}=o;return n("function"==typeof kg[e]?xg(e,t):new Error(t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case"-0":return-0}return n(xg(a,o),i)};return r})(/* @__PURE__ */new Map,e)(0),Tg="",{toString:Cg}={},{keys:Ag,is:Eg}=Object,Ig=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Cg.call(e).slice(8,-1);switch(n){case"Array":return[1,Tg];case"Object":return[2,Tg];case"Date":return[3,Tg];case"RegExp":return[4,Tg];case"Map":return[5,Tg];case"Set":return[6,Tg];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:e instanceof Error?[7,e.name||"Error"]:[2,n]},_g=([e,t])=>0===e&&("function"===t||"symbol"===t),Og=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,l]=Ig(o);switch(s){case 0:{let t=o;switch(l){case"bigint":s=8,t=o.toString();break;case"number":if(!o&&Eg(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return i([-1],o)}return i([s,t],o)}case 1:{if(l){let e=o;return"DataView"===l?e=new Uint8Array(o.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(o)),i([l,[...e]],o)}const e=[],t=i([s,e],o);for(const n of o)e.push(a(n));return t}case 2:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const n=[],r=i([s,n],o);for(const t of Ag(o))!e&&_g(Ig(o[t]))||n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Tg:o.toISOString()],o);case 4:{const{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{const t=[],n=i([s,t],o);for(const[r,i]of o)(e||!_g(Ig(r))&&!_g(Ig(i)))&&t.push([a(r),a(i)]);return n}case 6:{const t=[],n=i([s,t],o);for(const r of o)!e&&_g(Ig(r))||t.push(a(r));return n}}const{message:c}=o;return i([s,{name:l,message:c}],o)};return a})(!(t||n),!!t,/* @__PURE__ */new Map,r)(e),r},Ng="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Sg(Og(e,t)):structuredClone(e):(e,t)=>Sg(Og(e,t));function Mg(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Pg(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var Lg=function(e){if(null==e)return zg;if("function"==typeof e)return Dg(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Lg(e[n]);return Dg(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return Dg(function(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return t=e,Dg(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function Dg(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function zg(){return!0}var Rg=[];function jg(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const a=Lg(i),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Rg;if((!t||a(i,s,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?Rg:[e]}(n(i,l)),!1===p[0]))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+o,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}}return p}}(e,void 0,[])()}function $g(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),jg(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}var Fg={}.hasOwnProperty,qg={};function Bg(e,t){const n=t||qg,r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Gg(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Gg(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Hg,definitionById:r,footnoteById:i,footnoteCounts:/* @__PURE__ */new Map,footnoteOrder:[],handlers:{...bg,...n.handlers},one:function(e,t){const n=e.type,r=a.handlers[n];if(Fg.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Ng(n);return r.children=a.all(e),r}return Ng(e)}return(a.options.unknownHandler||Wg)(a,e,t)},options:n,patch:Ug,wrap:Vg};return $g(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Ug(e,t){e.position&&(t.position=function(e){const t=Uf(e),n=Bf(e);if(t&&n)return{start:t,end:n}}(e))}function Hg(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,Ng(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Wg(e,t){const n=t.data||{},r=!("value"in t)||Fg.call(n,"hProperties")||Fg.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Vg(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Gg(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Kg(e,t){const n=Bg(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mg,r=e.options.footnoteBackLabel||Pg,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const a=e.all(i),o=String(i.identifier).toUpperCase(),c=qh(o.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ng(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function Yg(e,t){return e&&"run"in e?async function(n,r){const i=Kg(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Kg(n,{file:r,...e||t})}}function Jg(e){if(e)throw e}var Xg=/* @__PURE__ */j((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&l(d,{name:n,newValue:i}));return d}});function Zg(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Qg=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');iy(e);let n,r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(i=a):(s=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},ey=function(e){if(iy(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},ty=function(e){iy(e);let t,n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1);else if(t){i=n+1;break}}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},ny=function(...e){let t,n=-1;for(;++n<e.length;)iy(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){iy(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",a=0):(i=i.slice(0,r),a=i.length-1-i.lastIndexOf("/")),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},ry="/";function iy(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var ay=function(){return"/"};function oy(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}var sy=["history","path","basename","stem","extname","dirname"],ly=class{constructor(e){let t;t=e?oy(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":ay(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<sy.length;){const e=sy[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)sy.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Qg(this.path):void 0}set basename(e){uy(e,"basename"),cy(e,"basename"),this.path=ny(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ey(this.path):void 0}set dirname(e){dy(this.basename,"dirname"),this.path=ny(e||"",this.basename)}get extname(){return"string"==typeof this.path?ty(this.path):void 0}set extname(e){if(cy(e,"extname"),dy(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ny(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){oy(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!oy(e)){const t=/* @__PURE__ */new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=/* @__PURE__ */new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=/* @__PURE__ */new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=/* @__PURE__ */new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),uy(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Qg(this.path,this.extname):void 0}set stem(e){uy(e,"stem"),cy(e,"stem"),this.path=ny(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Yf(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}};function cy(e,t){if(e&&e.includes(ry))throw new Error("`"+t+"` cannot be a path: did not expect `"+ry+"`")}function uy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var py=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},fy=/* @__PURE__ */F(Xg(),1),hy={}.hasOwnProperty,my=(new class e extends py{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(a,...o){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==o[l]&&void 0!==o[l]||(o[l]=t[l]);t=o,s?function(e,t){let n;return function(...t){const o=e.length>t.length;let s;o&&t.push(r);try{s=e.apply(this,t)}catch(a){if(o&&n)throw a;return r(a)}o||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...r){n||(n=!0,t(e,...r))}function i(e){r(null,e)}}(s,i)(...o):r(null,...o)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,fy.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?(by("data",this.frozen),this.namespace[e]=t,this):hy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(by("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=ky(e),n=this.parser||this.Parser;return gy("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),gy("process",this.parser||this.Parser),yy("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const a=ky(e),o=n.parse(a);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);const i=t,a=n.stringify(i,r);var o;"string"==typeof(o=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(o)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),gy("processSync",this.parser||this.Parser),yy("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Jg(e),t=r}),wy("processSync","process",n),t}run(e,t,n){vy(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){const o=ky(t);r.run(e,o,function(t,r,o){const s=r||e;t?a(t):i?i(s):n(void 0,s,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Jg(e),n=t,r=!0}),wy("runSync","run",r),n}stringify(e,t){this.freeze();const n=ky(t),r=this.compiler||this.Compiler;return yy("stringify",r),vy(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(by("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?o(e):a(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,fy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)i(e[t])}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const o=n[i][1];Zg(o)&&Zg(r)&&(r=(0,fy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}).freeze();function gy(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function yy(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function by(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function vy(e){if(!Zg(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function wy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ky(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ly(e)}var xy=[],Sy={allowDangerousHtml:!0},Ty=/^(https?|ircs?|mailto|xmpp)$/i,Cy=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ay(e){const t=function(e){const t=e.rehypePlugins||xy,n=e.remarkPlugins||xy,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sy}:Sy;return my().use(fg).use(n).use(Yg,r).use(t)}(e),n=function(e){const t=e.children||"",n=new ly;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Ey;for(const c of Cy)Object.hasOwn(t,c.from)&&(c.from,c.to&&c.to,c.id);return $g(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in ph)if(Object.hasOwn(ph,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=ph[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return function(n,r,i,a){const o=Array.isArray(i.children),s=Uf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return function(e,r,i,a){const o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}(0,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?zf:Df,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=rh(i,e,void 0);return a&&"string"!=typeof a?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}(e,{Fragment:E,components:i,ignoreInvalidStyle:!0,jsx:I,jsxs:_,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function Ey(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||Ty.test(e.slice(0,t))?e:""}function Iy(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oy(e){return function(e){if(Array.isArray(e))return _y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ny(e){return Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(e)}function My(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ny(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ny(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ny(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Py(){return Py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Py.apply(null,arguments)}function Ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ly(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ly(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zy={};function Ry(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return zy[r]||(zy[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),zy[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Dy(Dy({},e),n[t])},t)}function jy(e){return e.join(" ")}function $y(e){var n=e.node,r=e.stylesheet,i=e.style,a=void 0===i?{}:i,o=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return $y({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,o);if(o){var h=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&m.concat(l.className.filter(function(e){return!h.includes(e)}));p=Dy(Dy({},l),{},{className:jy(g)||void 0,style:Ry(l.className,Object.assign({},l.style,a),r)})}else p=Dy(Dy({},l),{},{className:jy(l.className)});var y=f(n.children);/*#__PURE__*/
39
+ return t.createElement(u,Py({key:s},p),y)}}var Fy=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function qy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function By(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qy(Object(n),!0).forEach(function(t){My(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Uy=/\n/g;function Hy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,a=void 0===i?{float:"left",paddingRight:"10px"}:i,o=e.numberStyle,s=void 0===o?{}:o,l=e.startingLineNumber;/*#__PURE__*/
40
40
  return t.createElement("code",{style:Object.assign({},r,a)},function(e){var n=e.startingLineNumber,r=e.style;return e.lines.map(function(e,i){var a=i+n;/*#__PURE__*/
41
- return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(a):r},"".concat(a,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function By(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Uy(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return $y($y({},i),a)}function Hy(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?$y({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(Ey(f.className.trim().split(/\s+/)),Ey(c)):c,n&&a){var h=Uy(r,n,i);t.unshift(By(n,h))}return d&u&&(f.style=$y({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function Wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(Hy({children:[i],className:Ey(new Set(t))}));else if(i.children){var a,o=t.concat((null===(a=i.properties)||void 0===a?void 0:a.className)||[]);Wy(i.children,o).forEach(function(e){return n.push(e)})}}return n}function Vy(e,t,n,r,i,a,o,s,l){var c,u=Wy(e.value),d=[],p=-1,f=0;function h(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,a){return Hy({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,a,c):function(e,t){if(r&&t&&i){var n=Uy(s,t,o);e.unshift(By(t,n))}return e}(e,a)}for(var m=function(){var e=u[f],t=e.children[0].value;if(t.match(Fy)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=h(u.slice(p+1,f).concat(Hy({children:[s],className:e.properties.className})),o);d.push(l)}else if(i===n.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var g=Hy({children:[m],className:e.properties.className});u.splice(f+1,0,g)}else{var y=h([m],o,e.properties.className);d.push(y)}}else{var b=h([s],o,e.properties.className);d.push(b)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var g=u.slice(p+1,u.length);if(g&&g.length){var y=h(g,r&&d.length+a);d.push(y)}}return t?d:(c=[]).concat.apply(c,d)}function Gy(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return zy({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function Ky(e){return e&&void 0!==e.highlightAuto}var Yy=/[#.]/g;function Jy(e,t,n){const r=n?function(e){const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...a){let o;if(null==n){o={type:"root",children:[]};const e=i;a.unshift(e)}else{o=function(e,t){const n=e||"",r={};let i,a,o=0;for(;o<n.length;){Yy.lastIndex=o;const e=Yy.exec(n),t=n.slice(o,e?e.index:n.length);t&&(i?"#"===i?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:a=t,o+=t.length),e&&(i=e[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}(n,t);const s=o.tagName.toLowerCase(),l=r?r.get(s):void 0;if(o.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!(!("children"in e)||!Array.isArray(e.children))}(i))a.unshift(i);else for(const[t,n]of Object.entries(i))Xy(e,o.properties,t,n)}for(const e of a)Zy(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function Xy(e,t,n,r){const i=_f(e,n);let a;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;a=r}else a="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?Lf(r):i.commaSeparated?Wp(r):i.commaOrSpaceSeparated?Lf(Wp(r).join(" ")):Qy(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(a)){const e=[];for(const t of a)e.push(Qy(i,i.property,t));a=e}"className"===i.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Zy(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Zy(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Zy(e,t.children):e.push(t)}}function Qy(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||ef(n)===ef(t)))return!0}return n}var eb=Jy(Mf,"div"),tb=(Jy(Pf,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]),nb={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function rb(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function ib(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function ab(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||rb(e)}var ob=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function sb(e,t){const n=t||{},r="string"==typeof n.additional?n.additional.charCodeAt(0):n.additional,i=[];let a,o,s=0,l=-1,c="";n.position&&("start"in n.position||"indent"in n.position?(o=n.position.indent,a=n.position.start):a=n.position);let u,d=(a?a.line:0)||1,p=(a?a.column:0)||1,f=h();for(s--;++s<=e.length;)if(10===u&&(p=(o?o[l]:0)||1),u=e.charCodeAt(s),38===u){const t=e.charCodeAt(s+1);if(9===t||10===t||12===t||32===t||38===t||60===t||Number.isNaN(t)||r&&t===r){c+=String.fromCharCode(u),p++;continue}const a=s+1;let o,l=a,d=a;if(35===t){d=++l;const t=e.charCodeAt(d);88===t||120===t?(o="hexadecimal",d=++l):o="decimal"}else o="named";let y="",b="",v="";const w="named"===o?ab:"decimal"===o?rb:ib;for(d--;++d<=e.length;){const t=e.charCodeAt(d);if(!w(t))break;v+=String.fromCharCode(t),"named"===o&&tb.includes(v)&&(y=v,b=gh(v))}let k=59===e.charCodeAt(d);if(k){d++;const e="named"===o&&gh(v);e&&(y=v,b=e)}let x=1+d-a,S="";if(k||!1!==n.nonTerminated)if(v)if("named"===o){if(k&&!b)m(5,1);else if(y!==v&&(d=l+y.length,x=1+d-l,k=!1),!k){const t=y?1:3;if(n.attribute){const n=e.charCodeAt(d);61===n?(m(t,x),b=""):ab(n)?b="":m(t,x)}else m(t,x)}S=b}else{k||m(2,x);let e=Number.parseInt(v,"hexadecimal"===o?16:10);if(lb(e))m(7,x),S=String.fromCharCode(65533);else if(e in nb)m(6,x),S=nb[e];else{let t="";cb(e)&&m(6,x),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==o&&m(4,x);if(S){g(),f=h(),s=d-1,p+=d-a+1,i.push(S);const t=h();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,S,{start:f,end:t},e.slice(a-1,d)),f=t}else v=e.slice(a-1,d),c+=v,p+=v.length,s=d-1}else 10===u&&(d++,l++,p=0),Number.isNaN(u)?g():(c+=String.fromCharCode(u),p++);return i.join("");function h(){return{line:d,column:p,offset:s+((a?a.offset:0)||0)}}function m(e,t){let r;n.warning&&(r=h(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,ob[e],r,e))}function g(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:f,end:h()}),c="")}}function lb(e){return e>=55296&&e<=57343||e>1114111}function cb(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var ub=0,db={},pb={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++ub}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},pb.util.type(t)){case"Object":if(i=pb.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=pb.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:db,plaintext:db,text:db,txt:db,extend:function(e,t){var n=pb.util.clone(pb.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||pb.languages)[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var l=r[e];return r[e]=a,pb.languages.DFS(pb.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=pb.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],l=pb.util.type(s);"Object"!==l||i[a(s)]?"Array"!==l||i[a(s)]||(i[a(s)]=!0,e(s,n,o,i)):(i[a(s)]=!0,e(s,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(pb.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=pb.tokenize(r.code,r.grammar),pb.hooks.run("after-tokenize",r),fb.stringify(pb.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new gb;return yb(i,i.head,e),mb(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=pb.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=pb.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:fb};function fb(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function hb(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function mb(e,t,n,r,i,a){for(var o in n)if(n.hasOwnProperty(o)&&n[o]){var s=n[o];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(a&&a.cause==o+","+l)return;var c=s[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,f=c.alias;if(p&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}for(var m=c.pattern||c,g=r.next,y=i;g!==t.tail&&!(a&&y>=a.reach);y+=g.value.length,g=g.next){var b=g.value;if(t.length>e.length)return;if(!(b instanceof fb)){var v,w=1;if(p){if(!(v=hb(m,y,e,d))||v.index>=e.length)break;var k=v.index,x=v.index+v[0].length,S=y;for(S+=g.value.length;k>=S;)S+=(g=g.next).value.length;if(y=S-=g.value.length,g.value instanceof fb)continue;for(var T=g;T!==t.tail&&(S<x||"string"==typeof T.value);T=T.next)w++,S+=T.value.length;w--,b=e.slice(y,S),v.index-=y}else if(!(v=hb(m,0,b,d)))continue;k=v.index;var C=v[0],A=b.slice(0,k),E=b.slice(k+C.length),I=y+b.length;a&&I>a.reach&&(a.reach=I);var _=g.prev;if(A&&(_=yb(t,_,A),y+=A.length),bb(t,_,w),g=yb(t,_,new fb(o,u?pb.tokenize(C,u):C,f,C)),E&&yb(t,g,E),w>1){var O={cause:o+","+l,reach:I};mb(e,t,n,g.prev,y,O),a&&O.reach>a.reach&&(a.reach=O.reach)}}}}}}function gb(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function yb(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function bb(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}var vb=pb;function wb(){}wb.prototype=vb;var kb=new wb;kb.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Object.hasOwn(kb.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=kb.languages[r]}return{type:"root",children:vb.highlight.call(kb,e,n,r)}},kb.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(kb.languages,e.displayName)||e(kb)},kb.alias=function(e,t){const n=kb.languages;let r,i={};for(r in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,r)){const e=i[r],t="string"==typeof e?[e]:e;let a=-1;for(;++a<t.length;)n[t[a]]=n[r]}},kb.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(kb.languages,e)},kb.listLanguages=function(){const e=kb.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&"object"==typeof e[n]&&t.push(n);return t},kb.util.encode=function(e){return e},kb.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}const r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),kb.hooks.run("wrap",r),eb(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=sb(e[t]));return e}(r.attributes),r.content)};var xb,Sb,Tb=(xb=kb,Sb={},function(e){var n,r,i=e.language,a=e.children,o=e.style,s=void 0===o?Sb:o,l=e.customStyle,c=void 0===l?{}:l,u=e.codeTagProps,d=void 0===u?{className:i?"language-".concat(i):void 0,style:$y($y({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:u,p=e.useInlineStyles,f=void 0===p||p,h=e.showLineNumbers,m=void 0!==h&&h,g=e.showInlineLineNumbers,y=void 0===g||g,b=e.startingLineNumber,v=void 0===b?1:b,w=e.lineNumberContainerStyle,k=e.lineNumberStyle,x=void 0===k?{}:k,S=e.wrapLines,T=e.wrapLongLines,C=void 0!==T&&T,A=e.lineProps,E=void 0===A?{}:A,I=e.renderer,_=e.PreTag,O=void 0===_?"pre":_,N=e.CodeTag,M=void 0===N?"code":N,P=e.code,L=void 0===P?(Array.isArray(a)?a[0]:a)||"":P,D=e.astGenerator,z=function(e,t){if(null==e)return{};var n,r,i=Cy(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ry);D=D||xb;var R=m?/*#__PURE__*/t.createElement(qy,{containerStyle:w,codeStyle:d.style||{},numberStyle:x,startingLineNumber:v,codeString:L}):null,j=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},$=Ky(D)?"hljs":"prismjs",F=f?Object.assign({},z,{style:Object.assign({},j,c)}):Object.assign({},z,{className:z.className?"".concat($," ").concat(z.className):$,style:Object.assign({},c)});if(d.style=$y(C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},d.style),!D)/*#__PURE__*/return t.createElement(O,F,R,/*#__PURE__*/t.createElement(M,d,L));(void 0===S&&I||C)&&(S=!0),I=I||Gy;var q=[{type:"text",value:L}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Ky(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(nO){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:q});null===B.language&&(B.value=q);var U=Vy(B,S,E,m,y,v,v+(null!==(n=null===(r=L.match(/\n/g))||void 0===r?void 0:r.length)&&void 0!==n?n:0),x,C);/*#__PURE__*/
42
- return t.createElement(O,F,/*#__PURE__*/t.createElement(M,d,!y&&R,I({rows:U,stylesheet:s,useInlineStyles:f})))});function Cb(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}function Ab(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}function Eb(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function Ib(e){e.register(Eb),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}function _b(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=e.languages.bash[i[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}function Ob(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}function Nb(e){e.register(Ib),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}function Mb(e){e.register(Ib),e.register(Cb),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(i);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=o(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=o(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(e)}function Pb(e){e.register(Mb),e.register(Nb),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(e)}Tb.registerLanguage=function(e,t){return kb.register(t)},Tb.alias=function(e,t){return kb.alias(e,t)},Cb.displayName="markup",Cb.aliases=["atom","html","mathml","rss","ssml","svg","xml"],Ab.displayName="css",Ab.aliases=[],Eb.displayName="clike",Eb.aliases=[],Ib.displayName="javascript",Ib.aliases=["js"],_b.displayName="bash",_b.aliases=["sh","shell"],Ob.displayName="json",Ob.aliases=["webmanifest"],Nb.displayName="typescript",Nb.aliases=["ts"],Mb.displayName="jsx",Mb.aliases=[],Pb.displayName="tsx",Pb.aliases=[];var Lb=_b,Db=Ab,zb=Ib,Rb=Ob,jb=Mb,$b=Cb,Fb=Pb,qb=Nb,Bb={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}};function Ub(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function Hb(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Wb(e){return"function"==typeof e?e:function(){return e}}var Vb="phrasing",Gb=["autolink","link","image","label"];function Kb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yb(e){this.config.enter.autolinkProtocol.call(this,e)}function Jb(e){this.config.exit.autolinkProtocol.call(this,e)}function Xb(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];
43
- /* @__PURE__ */t.type,t.url="http://"+this.sliceSerialize(e)}function Zb(e){this.config.exit.autolinkEmail.call(this,e)}function Qb(e){this.exit(e)}function ev(e){!function(e,t,n){const r=Ng((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Hb(e[0]),Wb(e[1])])}return t}(t);let a=-1;for(;++a<i.length;)Dg(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){const e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[a][0],o=i[a][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let a=o(...d,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tv],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nv]],{ignore:["link","linkReference"]})}function tv(e,t,n,r,i){let a="";if(!rv(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ub(e,"(");let a=Ub(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function nv(e,t,n,r){return!(!rv(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rv(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||zh(n)||Dh(n))&&(!t||47!==n)}function iv(){this.buffer()}function av(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ov(){this.buffer()}function sv(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Th(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cv(e){this.exit(e)}function uv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Th(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dv(e){this.exit(e)}function pv(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function fv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const a=r.createTracker(i);let o=a.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");return o+=a.move(r.safe(r.associationId(e),{before:o,after:"]"})),l(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?mv:hv))),s(),o},footnoteReference:pv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function hv(e,t,n){return 0===t?e:mv(e,0,n)}function mv(e,t,n){return(n?"":" ")+e}pv.peek=function(){return"["};var gv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function yv(e){this.enter({type:"delete",children:[],position:void 0},e)}function bv(e){this.exit(e)}function vv(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(a),o(),s}function wv(e){return e.length}function kv(e){return null==e?"":String(e)}function xv(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}vv.attention=function(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}},vv.peek=function(){return"~"};var Sv=Ng(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tv(e,t,n){return">"+(n?"":" ")+e}function Cv(e,t){return Av(e,t.inConstruct,!0)&&!Av(e,t.notInConstruct,!1)}function Av(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ev(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const e=n.unsafe[i];if("\n"===e.character&&!e.before&&!e.after&&Cv(n.stack,e))return/[\t ]/.test(r.before)?"":" "}return"\\\n"}function Iv(e,t,n){return(n?"":" ")+e}function _v(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ov(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Nv(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}function Mv(e){return e.value||""}function Pv(e,t,n,r){const i=_v(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function Lv(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Dv(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function zv(e,t){const n=dh(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Rv(e,t,n,r){const i=_v(n),a='"'===i?"Quote":"Apostrophe",o=n.createTracker(r);if(zv(e,n)){const t=n.stack;n.stack=t.filter(function(e){return"phrasing"!==e});const r=n.enter("autolink");let i=o.move("<");return i+=o.move(n.containerPhrasing(e,{before:i,after:">",...o.current()})),i+=o.move(">"),r(),n.stack=t,i}const s=n.enter("link");let l=n.enter("label"),c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),s(),c}function jv(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function $v(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Fv(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qv(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}function Bv(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}Nv.attention=function(e,t){return{construct:"emphasis",markers:"*"===Ov(t)?["*","_"]:["_","*"],sizes:[1]}},Nv.peek=function(e,t,n){return n.options.emphasis||"*"},Mv.peek=function(){return"<"},Pv.peek=function(){return"!"},Lv.peek=function(){return"!"},Dv.peek=function(){return"`"},Rv.peek=function(e,t,n){return zv(e,n)?"<":"["},jv.peek=function(){return"["},Bv.attention=function(e,t){return{construct:"strong",markers:"*"===qv(t)?["*","_"]:["_","*"],sizes:[2]}},Bv.peek=function(e,t,n){return n.options.strong||"*"};var Uv={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Tv);return i(),o},break:Ev,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,Iv);return e(),t}const o=n.createTracker(r),s=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}(a,i)+1,3)),l=n.enter("codeFenced"),c="`"===i?"GraveAccent":"Tilde";let u=o.move(s);if(e.lang){const t=n.enter(`codeFencedLang${c}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${c}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...o.current()})),t()}return u+=o.move("\n"),a&&(u+=o.move(a+"\n")),u+=o.move(s),l(),u},definition:function(e,t,n,r){const i=_v(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c},emphasis:Nv,hardBreak:Ev,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return zg(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),Boolean((!e.depth||e.depth<3)&&dh(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),o=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});const u=c.charCodeAt(0);return 9!==u&&32!==u||(c=function(e){return"&#x"+e.toString(16).toUpperCase()+";"}(u)+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c},html:Mv,image:Pv,imageReference:Lv,inlineCode:Dv,link:Rv,linkReference:jv,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):$v(n);const s=e.ordered?"."===o?")":".":function(e){const t=$v(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&o===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Fv(n)===o&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||$v(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o},root:function(e,t,n,r){if(!e.children.some(function(e){return Sv(e)}))return n.containerFlow(e,r);const i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),a},strong:Bv,text:function(e,t,n,r){const i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})},thematicBreak:function(e,t,n){const r=(Fv(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Hv(e){const t=e._align;
44
- /* @__PURE__ */this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Wv(e){this.exit(e),this.data.inTable=void 0}function Vv(e){this.enter({type:"tableRow",children:[]},e)}function Gv(e){this.exit(e)}function Kv(e){this.enter({type:"tableCell",children:[]},e)}function Yv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jv));const n=this.stack[this.stack.length-1];
45
- /* @__PURE__ */n.type,n.value=t,this.exit(e)}function Jv(e,t){return"|"===t?t:e}function Xv(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Uv.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const a=[],o=t.enter("table");for(;++i<r.length;)a[i]=l(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){const i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){const i=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||wv,a=[],o=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let a=-1;for(e[u].length>c&&(c=e[u].length);++a<e[u].length;){const o=kv(e[u][a]);if(!1!==n.alignDelimiters){const e=i(o);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)a[d]=xv(r[d]);else{const e=xv(r);for(;++d<c;)a[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>l[d]&&(l[d]=i),f[d]=i),p[d]=o}o.splice(1,0,p),s.splice(1,0,f),u=-1;const h=[];for(;++u<o.length;){const e=o[u],t=s[u];d=-1;const r=[];for(;++d<c;){const i=e[d]||"";let o="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=a[d];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(o=" ".repeat(e/2),s=o):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],0,t,n);return s(),a}}function Zv(e){const t=this.stack[this.stack.length-2];
46
- /* @__PURE__ */t.type,t.checked="taskListCheckValueChecked"===e.type}function Qv(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];
47
- /* @__PURE__ */e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ew(e,t,n,r){const i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=Uv.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),l}for(var tw={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},nw={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(iw,l,s)(t):null===t||Ph(t)||zh(t)||45!==t&&Dh(t)?l(t):(a=!0,e.consume(t),o)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function l(e){return i||r||!a?n(e):t(e)}},partial:!0},rw={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(iw,t,a)(o):null===o||Ph(o)||zh(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},iw={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||Ph(o)||zh(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||Ph(e)||zh(e)?t(e):r(e)}function a(e){return Ch(e)?o(e):n(e)}function o(t){return 59===t?(e.consume(t),r):Ch(t)?(e.consume(t),o):n(t)}},partial:!0},aw={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Ah(e)?n(e):t(e)}},partial:!0},ow={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!dw.call(r,r.previous)||mw(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tw,e.attempt(nw,e.attempt(rw,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:dw},sw={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",a=!1;return function(t){return 72!==t&&104!==t||!pw.call(r,r.previous)||mw(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o)};function o(t){if(Ch(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),a?l:(a=!0,s)):n(t)}function l(t){return null===t||Ih(t)||Ph(t)||zh(t)||Dh(t)?n(t):e.attempt(nw,e.attempt(rw,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:pw},lw={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,a;return function(t){return hw(t)&&fw.call(r,r.previous)&&!mw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)):n(t)};function o(t){return hw(t)?(e.consume(t),o):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(aw,c,l)(t):45===t||95===t||Ah(t)?(a=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(o){return a&&i&&Ch(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:fw},cw={},uw=48;uw<123;)cw[uw]=lw,58===++uw?uw=65:91===uw&&(uw=97);function dw(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Ph(e)}function pw(e){return!Ch(e)}function fw(e){return!(47===e||hw(e))}function hw(e){return 43===e||45===e||46===e||95===e||Ah(e)}function mw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}cw[43]=lw,cw[45]=lw,cw[46]=lw,cw[95]=lw,cw[72]=[lw,sw],cw[104]=[lw,sw],cw[87]=[lw,ow],cw[119]=[lw,ow];var gw={tokenize:function(e,t,n){const r=this;return $h(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function yw(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return n(i);const s=Th(r.sliceSerialize({start:o.end,end:r.now()}));return 94===s.codePointAt(0)&&a.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function bw(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function vw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(o>999||93===s&&!a||null===s||91===s||Ph(s))return n(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(Th(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Ph(s)||(a=!0),o++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}}function ww(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!o||null===t||91===t||Ph(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=Th(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Ph(t)||(o=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),$h(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function kw(e,t,n){return e.check(Xh,t,e.attempt(gw,t,n))}function xw(e){e.exit("gfmFootnoteDefinition")}function Sw(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let o=0;return function(t){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),s(t))};function s(a){const l=Vh(i);if(126===a)return o>1?r(a):(e.consume(a),o++,s);if(o<2&&!t)return r(a);const c=e.exit("strikethroughSequenceTemporary"),u=Vh(a);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&yh(o,o.length,0,Gh(s,e.slice(r+1,n),t)),yh(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),yh(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}var Tw=class{constructor(){this.map=[],this.index=/* @__PURE__ */new Map}add(e,t,n){!function(e,t,n,r){if(0===n&&0===r.length)return;const i=e.index.get(t);if(i)return i[1]+=n,void i[2].push(...r);const a=[t,n,r];e.map.push(a),e.index.set(t,a)}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Cw(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function Aw(e,t,n){const r=this;let i,a=0,o=0;return function(e){let t=r.events.length-1;for(;t>-1;){const{type:e}=r.events[t][1];if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?w:s;return a===w&&r.parser.lazy[r.now().line]?n(e):a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,o+=1),l(e)}(t)}function l(t){return null===t?n(t):Mh(t)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Lh(t)?$h(e,l,"whitespace")(t):(o+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Ph(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Lh(t)?$h(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return Lh(t)?$h(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||Mh(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Lh(t)?$h(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||Mh(n))&&i&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||Mh(n)?(e.exit("tableRow"),t(n)):Lh(n)?$h(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Ph(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function Ew(e,t){let n,r,i,a=-1,o=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Tw;for(;++a<e.length;){const f=e[a],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(_w(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(a,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(o=!0,i=void 0,l=[0,0,0,0],c=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(o?o=!1:(0!==l[1]&&(c[0]=c[1],i=Iw(p,t,l,s,void 0,i)),l=c,c=[l[1],a,0,0])):(o=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=Iw(p,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=a)):"tableHead"===h.type?(u=!0,d=a):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=a,0!==l[1]?(c[0]=c[1],i=Iw(p,t,l,s,a,i)):0!==c[1]&&(i=Iw(p,t,c,s,a,i)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=a)}for(0!==d&&_w(p,t,d,n,r),p.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Cw(t.events,a))}return e}function Iw(e,t,n,r,i,a){const o=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},Ow(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=Ow(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const i=Ow(t.events,n[2]),a=Ow(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},Ow(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function _w(e,t,n,r,i){const a=[],o=Ow(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ow(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var Nw={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return Ph(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return Mh(r)?t(r):Lh(r)?e.check({tokenize:Mw},t,n)(r):n(r)}}};function Mw(e,t,n){return $h(e,function(e){return null===e?n(e):t(e)},"whitespace")}var Pw={},Lw=[function(e){const t=e||Pw,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return wh([{text:cw},{document:{91:{name:"gfmFootnoteDefinition",tokenize:ww,continuation:{tokenize:kw},exit:xw}},text:{91:{name:"gfmFootnoteCall",tokenize:vw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yw,resolveTo:bw}}},Sw(e),{flow:{null:{name:"table",tokenize:Aw,resolveAll:Ew}}},{text:{91:Nw}}])}(t)),i.push([{transforms:[ev],enter:{literalAutolink:Kb,literalAutolinkEmail:Yb,literalAutolinkHttp:Yb,literalAutolinkWww:Yb},exit:{literalAutolink:Qb,literalAutolinkEmail:Zb,literalAutolinkHttp:Jb,literalAutolinkWww:Xb}},{enter:{gfmFootnoteCallString:iv,gfmFootnoteCall:av,gfmFootnoteDefinitionLabelString:ov,gfmFootnoteDefinition:sv},exit:{gfmFootnoteCallString:lv,gfmFootnoteCall:cv,gfmFootnoteDefinitionLabelString:uv,gfmFootnoteDefinition:dv}},{canContainEols:["delete"],enter:{strikethrough:yv},exit:{strikethrough:bv}},{enter:{table:Hv,tableData:Kv,tableHeader:Kv,tableRow:Vv},exit:{codeText:Yv,table:Wv,tableData:Gv,tableHeader:Gv,tableRow:Gv}},{exit:{taskListCheckValueChecked:Zv,taskListCheckValueUnchecked:Zv,paragraph:Qv}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vb,notInConstruct:Gb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vb,notInConstruct:Gb},{character:":",before:"[ps]",after:"\\/",inConstruct:Vb,notInConstruct:Gb}]},fv(e),{handlers:{delete:vv},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gv}]},Xv(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ew}}]}}(t))}],Dw=e=>e?.default||e;Tb.registerLanguage("javascript",Dw(zb)),Tb.registerLanguage("typescript",Dw(qb)),Tb.registerLanguage("jsx",Dw(jb)),Tb.registerLanguage("tsx",Dw(Fb)),Tb.registerLanguage("bash",Dw(Lb)),Tb.registerLanguage("json",Dw(Rb)),Tb.registerLanguage("css",Dw(Db)),Tb.registerLanguage("html",Dw($b)),Tb.registerLanguage("markdown",Dw($b));var zw={root:vr("")},Rw=({className:e,children:t="",wrapLines:n=!0,showLineNumbers:r=!0})=>(e=ps("Markdown",{className:e,componentKey:"root"}),/* @__PURE__ */I("div",{className:U("markdown",e),children:/* @__PURE__ */I(Sy,{remarkPlugins:Lw,components:{code(e){let{children:t,className:i,...a}=e,o=pr(a,["node"]),s=/language-(\w+)/.exec(i||"");return s?/* @__PURE__ */I(Tb,{...o,PreTag:"div",language:s[1],style:Bb,wrapLines:n,showLineNumbers:r,children:"string"==typeof t?t.replace(/\n$/,""):""}):/* @__PURE__ */I("code",{...o,className:i,children:t})}},children:t})})),jw=({children:e,components:t,defaultColorMode:n="light",colorModeStorageKey:r,applyColorModeClass:i=!0,colorModeRoot:a})=>{let o="system"===n,[s,l]=S(()=>Ba(r,n));g(()=>{if(!o||typeof window>"u")return;let e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>l(e.matches?"dark":"light");return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[o]),g(()=>{if(!i||typeof document>"u")return;let e=a??document.documentElement;"dark"===s?e.classList.add("dark"):e.classList.remove("dark")},[s,i,a]);let c=h(()=>{o||l(e=>{let t="dark"===e?"light":"dark";if(r)try{localStorage.setItem(r,t)}catch{}return t})},[o,r]),u=h(e=>{if(!o&&(l(e),r))try{localStorage.setItem(r,e)}catch{}},[o,r]),d=k(()=>({theme:{components:t&&Object.keys(t).length>0?t:{}},colorMode:s,toggleColorMode:c,setColorMode:u}),[t,s,c,u]);/* @__PURE__ */
48
- return I(Ua,{value:d,children:e})},$w=({children:e,components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:a})=>/* @__PURE__ */I(jw,{components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:a,children:e}),Fw={root:vr("",{variants:{intent:{primary:"text-primary-text",custom:""},size:{xs:"text-xs",sm:"text-sm",md:"",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl",custom:""},weight:{100:"font-thin",thin:"font-thin",200:"font-extralight",extralight:"font-extralight",300:"font-light",light:"font-light",400:"",normal:"",500:"font-medium",medium:"font-medium",600:"font-semibold",semibold:"font-semibold",700:"font-bold",bold:"font-bold",800:"font-extrabold",extrabold:"font-extrabold",900:"font-black",black:"font-black"}},compoundVariants:[],defaultVariants:{intent:"custom",size:"md",weight:400}})},qw=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Bw=/^[\\/]{2}/,Uw="popstate";function Hw(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ww(e,t){if(!1===e||null==e)throw new Error(t)}function Vw(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(nO){}}}function Gw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Kw(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Jw(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function Yw({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Jw(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Xw(e,t,n="/"){return Zw(e,t,n,!1)}function Zw(e,t,n,r,i){let a=fk(("string"==typeof t?Jw(t):t).pathname||"/",n);if(null==a)return null;let o=i??function(e){let t=Qw(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Vw(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let c=0;null==s&&c<o.length;++c)s=ck(o[c],l,r);return s}function Qw(e,t=[],n=[],r="",i=!1){let a=(e,a,o=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&o)return;Ww(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=vk([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(Ww(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Qw(e.children,t,u,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:lk(c,e.index),routesMeta:u.map((e,t)=>{let[n,r]=pk(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of ek(e.path))a(e,t,!0,n);else a(e,t)}),t}function ek(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=ek(r.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var tk=/^:[\w-]+$/,nk=3,rk=2,ik=1,ak=10,ok=-2,sk=e=>"*"===e;function lk(e,t){let n=e.split("/"),r=n.length;return n.some(sk)&&(r+=ok),t&&(r+=rk),n.filter(e=>!sk(e)).reduce((e,t)=>e+(tk.test(t)?nk:""===t?ik:ak),r)}function ck(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===a?t:t.slice(a.length)||"/",u={path:e.relativePath,caseSensitive:e.caseSensitive,end:l},d=e.matcher&&e.compiledParams?dk(u,c,e.matcher,e.compiledParams):uk(u,c),p=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=uk({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:vk([a,d.pathname]),pathnameBase:kk(vk([a,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(a=vk([a,d.pathnameBase]))}return o}function uk(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pk(e.path,e.caseSensitive,e.end);return dk(e,t,n,r)}function dk(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=wk(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";o=wk(a.slice(0,a.length-e.length),1)}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function pk(e,t=!1,n=!0){Vw("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function fk(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function hk(e,t){let n=wk(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function mk(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gk(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function yk(e,t,n,r=!1){let i;"string"==typeof e?i=Jw(e):(i={...e},Ww(!i.pathname||!i.pathname.includes("?"),mk("?","pathname","search",i)),Ww(!i.pathname||!i.pathname.includes("#"),mk("#","pathname","hash",i)),Ww(!i.search||!i.search.includes("#"),mk("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:a=""}="string"==typeof e?Jw(e):e;return r?(r=bk(r),n=r.startsWith("/")||r.startsWith("\\")?hk(r.substring(1),"/"):hk(r,t)):n=t,{pathname:n,search:xk(i),hash:Sk(a)}}(i,a),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var bk=e=>e.replace(/[\\/]{2,}/g,"/"),vk=e=>bk(e.join("/"));function wk(e,t=0){let n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var kk=e=>wk(e).replace(/^\/*/,"/"),xk=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Sk=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Tk=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ck(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Ak(e){return vk(e.map(e=>e.route.path).filter(Boolean))||"/"}var Ek="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Ik(e,t){let n=e;if("string"!=typeof n||!qw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ek)try{let e=new URL(window.location.href),r=Bw.test(n)?new URL((a=n,e.protocol+a.replace(/\\/g,"/"))):new URL(n),o=fk(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:i=!0}catch(nO){Vw(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var a;return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _k=new URL("http://localhost");function Ok(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),_k)}catch{return _k}}function Nk(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function Mk(e,t,n,r){let i=null;try{i=null==e?null:new URL(e,n)}catch{}let a=new URL(t,n),o=null!=i&&!Nk(i,n),s=!Nk(a,n);if("reject"===r){if(o||s)throw new Error("External navigation is not allowed")}else if(s&&(null==i||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}(e,i)||!Nk(i,a)))throw new Error("External navigation is not allowed")}var Pk=["POST","PUT","PATCH","DELETE"],Lk=(new Set(Pk),["GET",...Pk]);new Set(Lk);var Dk=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],zk=e.createContext(null);zk.displayName="DataRouter";var Rk=e.createContext(null);Rk.displayName="DataRouterState";var jk=e.createContext(!1);function $k(){return e.useContext(jk)}var Fk=e.createContext({isTransitioning:!1});Fk.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var qk=e.createContext(null);qk.displayName="Navigation";var Bk=e.createContext(null);Bk.displayName="Location";var Uk=e.createContext({outlet:null,matches:[],isDataRoute:!1});Uk.displayName="Route";var Hk=e.createContext(null);Hk.displayName="RouteError";var Wk="REACT_ROUTER_ERROR";function Vk(){return null!=e.useContext(Bk)}function Gk(){return Ww(Vk(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(Bk).location}var Kk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yk(t){e.useContext(qk).static||e.useLayoutEffect(t)}function Jk(){let{isDataRoute:t}=e.useContext(Uk);return t?function(){let{router:t}=function(){let t=e.useContext(zk);return Ww(t,ix("useNavigate")),t}(),n=ax("useNavigate"),r=e.useRef(!1);return Yk(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{Vw(r.current,Kk),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){Ww(Vk(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(zk),{basename:n,navigator:r}=e.useContext(qk),{matches:i}=e.useContext(Uk),{pathname:a}=Gk(),o=JSON.stringify(gk(i)),s=e.useRef(!1);return Yk(()=>{s.current=!0}),e.useCallback((e,i={})=>{if(Vw(s.current,Kk),!s.current)return;if("number"==typeof e)return void r.go(e);let l=yk(e,JSON.parse(o),a,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:vk([n,l.pathname])),Mk("string"==typeof e?e:Yw(e),r.createHref(l),Ok(r),"reject"),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,o,a,t])}()}function Xk(t,{relative:n}={}){let{matches:r}=e.useContext(Uk),{pathname:i}=Gk(),a=JSON.stringify(gk(r));return e.useMemo(()=>yk(t,JSON.parse(a),i,"path"===n),[t,a,i,n])}function Zk(){let t=function(){let t=e.useContext(Hk),n=function(t){let n=e.useContext(Rk);return Ww(n,ix(t)),n}("useRouteError"),r=ax("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=Ck(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:o},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:o},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:a},r):null,s)}e.createContext(null);var Qk=/* @__PURE__ */e.createElement(Zk,null),ex=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${Wk}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Tk(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(Uk.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(Hk.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(nx,{error:t},n):n}};ex.contextType=jk;var tx=/* @__PURE__ */new WeakMap;function nx({children:t,error:n}){let{basename:r,navigator:i}=e.useContext(qk);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${Wk}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let a=tx.get(n);if(a)throw a;let o=Ik(t.location,r),s=o.absoluteURL||o.to;if(Mk(t.location,s,Ok(i),"allow-explicit"),function(e){try{return Dk.includes(new URL(e).protocol)}catch{return!1}}(s))throw new Error("Invalid redirect location");if(Ek&&!tx.get(n)){if(!o.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:t.replace}));throw tx.set(n,e),e}window.location.href=s}/* @__PURE__ */
49
- return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return t}function rx({routeContext:t,match:n,children:r}){let i=e.useContext(zk);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(Uk.Provider,{value:t},r)}function ix(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ax(t){let n=function(t){let n=e.useContext(Uk);return Ww(n,ix(t)),n}(t),r=n.matches[n.matches.length-1];return Ww(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var ox={};function sx(e,t,n){t||ox[e]||(ox[e]=!0,Vw(!1,n))}function lx({basename:t,children:n,initialEntries:r,initialIndex:i,useTransitions:a}){let o=e.useRef();null==o.current&&(o.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let a=l(null==r?t.length-1:r),o="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[a]}function u(e,n=null,r,i){let a=Kw(t?c().pathname:"/",e,n,r,i);return Vw("/"===a.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),a}function d(e){return"string"==typeof e?e:Yw(e)}return{get index(){return a},get action(){return o},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?Jw(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){o="PUSH";let r=Hw(e)?e:u(e,n);a+=1,t.splice(a,t.length,r),i&&s&&s({action:o,location:r,delta:1})},replace(e,n){o="REPLACE";let r=Hw(e)?e:u(e,n);t[a]=r,i&&s&&s({action:o,location:r,delta:0})},go(e){o="POP";let n=l(a+e),r=t[n];a=n,s&&s({action:o,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}({initialEntries:r,initialIndex:i,v5Compat:!0}));let s=o.current,[l,c]=e.useState({action:s.action,location:s.location}),u=e.useCallback(t=>{!1===a?c(t):e.startTransition(()=>c(t))},[a]);return e.useLayoutEffect(()=>s.listen(u),[s,u]),/* @__PURE__ */e.createElement(ux,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,useTransitions:a})}function cx({to:t,replace:n,state:r,relative:i}){Ww(Vk(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:o}=e.useContext(qk);Vw(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=e.useContext(Uk),{pathname:l}=Gk(),c=Jk(),u=yk(t,gk(s),l,"path"===i);Mk("string"==typeof t?t:Yw(t),o.createHref(u),Ok(o),"reject");let d=JSON.stringify(u);return e.useEffect(()=>{c(JSON.parse(d),{replace:n,state:r,relative:i})},[c,d,i,n,r]),null}function ux({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:a,static:o=!1,useTransitions:s}){Ww(!Vk(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:s,future:{}}),[l,a,o,s]);"string"==typeof r&&(r=Jw(r));let{pathname:u="/",search:d="",hash:p="",state:f=null,key:h="default",mask:m}=r,g=e.useMemo(()=>{let e=fk(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:f,key:h,mask:m},navigationType:i}},[l,u,d,p,f,h,i,m]);return Vw(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(qk.Provider,{value:c},/* @__PURE__ */e.createElement(Bk.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:a,onError:o}){return function(t,n,r){Ww(Vk(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(qk),{matches:a}=e.useContext(Uk),o=a[a.length-1],s=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";sx(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=Gk();if(n){let e="string"==typeof n?Jw(n):n;Ww("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let f=d.pathname||"/",h=f;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):Xw(t,{pathname:h});Vw(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Vw(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let a=t,o=i?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);Ww(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){r.isStatic&&(s=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Ak(i.matches),errorInfo:t})}:void 0;return a.reduceRight((t,r,c)=>{let d,p=!1,f=null,h=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||Qk,s&&(l<0&&0===c?(sx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,c+1)),g=()=>{let n;return n=d?f:p?h:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(rx,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(ex,{location:i.location,revalidation:i.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:vk([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:vk([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,r);return n&&g?/* @__PURE__ */e.createElement(Bk.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:a,onError:o,future:r})}),e.Component;var dx="get",px="application/x-www-form-urlencoded";function fx(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var hx=null,mx=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gx(e){return null==e||mx.has(e)?e:(Vw(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${px}"`),null)}function yx(e,t){if(!1===e||null==e)throw new Error(t)}function bx(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===fk(i.pathname,t)?i.pathname=`${wk(t)}/_root.${r}`:i.pathname=`${wk(i.pathname)}.${r}`,i}function vx(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function wx(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function kx(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function xx(){let t=e.useContext(zk);return yx(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Sx(){let t=e.useContext(Rk);return yx(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tx=e.createContext(void 0);function Cx(){let t=e.useContext(Tx);return yx(t,"You must render this element inside a <HydratedRouter> element"),t}function Ax(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ex({page:t,...n}){let r=$k(),{nonce:i}=Cx(),{router:a}=xx(),o=e.useMemo(()=>Xw(a.routes,t,a.basename),[a.routes,t,a.basename]);return o?(null==n.nonce&&i&&(n={...n,nonce:i}),r?/* @__PURE__ */e.createElement(Ix,{page:t,matches:o,...n}):/* @__PURE__ */e.createElement(_x,{page:t,matches:o,...n})):null}function Ix({page:t,matches:n,...r}){let i=Gk(),{future:a}=Cx(),{basename:o}=xx(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=bx(t,o,a.v8_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[o,a.v8_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
50
- return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function _x({page:t,matches:n,...r}){let i=Gk(),{future:a,manifest:o,routeModules:s}=Cx(),{basename:l}=xx(),{loaderData:c,matches:u}=Sx(),d=e.useMemo(()=>wx(t,n,u,o,i,"data"),[t,n,u,o,i]),p=e.useMemo(()=>wx(t,n,u,o,i,"assets"),[t,n,u,o,i]),f=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=/* @__PURE__ */new Set,r=!1;if(n.forEach(t=>{let n=o.routes[t.route.id];n&&n.hasLoader&&(!d.some(e=>e.route.id===t.route.id)&&t.route.id in c&&s[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let u=bx(t,l,a.v8_trailingSlashAwareDataRequests,"data");return r&&e.size>0&&u.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,a.v8_trailingSlashAwareDataRequests,c,i,o,d,n,t,s]),h=e.useMemo(()=>kx(p,o),[p,o]),m=function(t){let{manifest:n,routeModules:r}=Cx(),[i,a]=e.useState([]);return e.useEffect(()=>{let e=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await(import(
41
+ return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(a):r},"".concat(a,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Wy(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Vy(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return By(By({},i),a)}function Gy(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?By({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(Oy(f.className.trim().split(/\s+/)),Oy(c)):c,n&&a){var h=Vy(r,n,i);t.unshift(Wy(n,h))}return d&u&&(f.style=By({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function Ky(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(Gy({children:[i],className:Oy(new Set(t))}));else if(i.children){var a,o=t.concat((null===(a=i.properties)||void 0===a?void 0:a.className)||[]);Ky(i.children,o).forEach(function(e){return n.push(e)})}}return n}function Yy(e,t,n,r,i,a,o,s,l){var c,u=Ky(e.value),d=[],p=-1,f=0;function h(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,a){return Gy({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,a,c):function(e,t){if(r&&t&&i){var n=Vy(s,t,o);e.unshift(Wy(t,n))}return e}(e,a)}for(var m=function(){var e=u[f],t=e.children[0].value;if(t.match(Uy)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=h(u.slice(p+1,f).concat(Gy({children:[s],className:e.properties.className})),o);d.push(l)}else if(i===n.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var g=Gy({children:[m],className:e.properties.className});u.splice(f+1,0,g)}else{var y=h([m],o,e.properties.className);d.push(y)}}else{var b=h([s],o,e.properties.className);d.push(b)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var g=u.slice(p+1,u.length);if(g&&g.length){var y=h(g,r&&d.length+a);d.push(y)}}return t?d:(c=[]).concat.apply(c,d)}function Jy(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return $y({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function Xy(e){return e&&void 0!==e.highlightAuto}var Zy=/[#.]/g;function Qy(e,t,n){const r=n?function(e){const t=/* @__PURE__ */new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...a){let o;if(null==n){o={type:"root",children:[]};const e=i;a.unshift(e)}else{o=function(e,t){const n=e||"",r={};let i,a,o=0;for(;o<n.length;){Zy.lastIndex=o;const e=Zy.exec(n),t=n.slice(o,e?e.index:n.length);t&&(i?"#"===i?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:a=t,o+=t.length),e&&(i=e[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}(n,t);const s=o.tagName.toLowerCase(),l=r?r.get(s):void 0;if(o.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!(!("children"in e)||!Array.isArray(e.children))}(i))a.unshift(i);else for(const[t,n]of Object.entries(i))eb(e,o.properties,t,n)}for(const e of a)tb(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function eb(e,t,n,r){const i=Mf(e,n);let a;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;a=r}else a="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?Rf(r):i.commaSeparated?Kp(r):i.commaOrSpaceSeparated?Rf(Kp(r).join(" ")):nb(i,i.property,r):Array.isArray(r)?[...r]:"style"===i.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(a)){const e=[];for(const t of a)e.push(nb(i,i.property,t));a=e}"className"===i.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function tb(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)tb(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?tb(e,t.children):e.push(t)}}function nb(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||rf(n)===rf(t)))return!0}return n}var rb=Qy(Df,"div"),ib=(Qy(zf,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]),ab={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function ob(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function sb(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function lb(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||ob(e)}var cb=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ub(e,t){const n=t||{},r="string"==typeof n.additional?n.additional.charCodeAt(0):n.additional,i=[];let a,o,s=0,l=-1,c="";n.position&&("start"in n.position||"indent"in n.position?(o=n.position.indent,a=n.position.start):a=n.position);let u,d=(a?a.line:0)||1,p=(a?a.column:0)||1,f=h();for(s--;++s<=e.length;)if(10===u&&(p=(o?o[l]:0)||1),u=e.charCodeAt(s),38===u){const t=e.charCodeAt(s+1);if(9===t||10===t||12===t||32===t||38===t||60===t||Number.isNaN(t)||r&&t===r){c+=String.fromCharCode(u),p++;continue}const a=s+1;let o,l=a,d=a;if(35===t){d=++l;const t=e.charCodeAt(d);88===t||120===t?(o="hexadecimal",d=++l):o="decimal"}else o="named";let y="",b="",v="";const w="named"===o?lb:"decimal"===o?ob:sb;for(d--;++d<=e.length;){const t=e.charCodeAt(d);if(!w(t))break;v+=String.fromCharCode(t),"named"===o&&ib.includes(v)&&(y=v,b=vh(v))}let k=59===e.charCodeAt(d);if(k){d++;const e="named"===o&&vh(v);e&&(y=v,b=e)}let x=1+d-a,S="";if(k||!1!==n.nonTerminated)if(v)if("named"===o){if(k&&!b)m(5,1);else if(y!==v&&(d=l+y.length,x=1+d-l,k=!1),!k){const t=y?1:3;if(n.attribute){const n=e.charCodeAt(d);61===n?(m(t,x),b=""):lb(n)?b="":m(t,x)}else m(t,x)}S=b}else{k||m(2,x);let e=Number.parseInt(v,"hexadecimal"===o?16:10);if(db(e))m(7,x),S=String.fromCharCode(65533);else if(e in ab)m(6,x),S=ab[e];else{let t="";pb(e)&&m(6,x),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==o&&m(4,x);if(S){g(),f=h(),s=d-1,p+=d-a+1,i.push(S);const t=h();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,S,{start:f,end:t},e.slice(a-1,d)),f=t}else v=e.slice(a-1,d),c+=v,p+=v.length,s=d-1}else 10===u&&(d++,l++,p=0),Number.isNaN(u)?g():(c+=String.fromCharCode(u),p++);return i.join("");function h(){return{line:d,column:p,offset:s+((a?a.offset:0)||0)}}function m(e,t){let r;n.warning&&(r=h(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,cb[e],r,e))}function g(){c&&(i.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:f,end:h()}),c="")}}function db(e){return e>=55296&&e<=57343||e>1114111}function pb(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var fb=0,hb={},mb={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++fb}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},mb.util.type(t)){case"Object":if(i=mb.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=mb.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:hb,plaintext:hb,text:hb,txt:hb,extend:function(e,t){var n=mb.util.clone(mb.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||mb.languages)[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var l=r[e];return r[e]=a,mb.languages.DFS(mb.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=mb.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],l=mb.util.type(s);"Object"!==l||i[a(s)]?"Array"!==l||i[a(s)]||(i[a(s)]=!0,e(s,n,o,i)):(i[a(s)]=!0,e(s,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(mb.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=mb.tokenize(r.code,r.grammar),mb.hooks.run("after-tokenize",r),gb.stringify(mb.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new vb;return wb(i,i.head,e),bb(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=mb.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=mb.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:gb};function gb(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function yb(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function bb(e,t,n,r,i,a){for(var o in n)if(n.hasOwnProperty(o)&&n[o]){var s=n[o];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(a&&a.cause==o+","+l)return;var c=s[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,f=c.alias;if(p&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}for(var m=c.pattern||c,g=r.next,y=i;g!==t.tail&&!(a&&y>=a.reach);y+=g.value.length,g=g.next){var b=g.value;if(t.length>e.length)return;if(!(b instanceof gb)){var v,w=1;if(p){if(!(v=yb(m,y,e,d))||v.index>=e.length)break;var k=v.index,x=v.index+v[0].length,S=y;for(S+=g.value.length;k>=S;)S+=(g=g.next).value.length;if(y=S-=g.value.length,g.value instanceof gb)continue;for(var T=g;T!==t.tail&&(S<x||"string"==typeof T.value);T=T.next)w++,S+=T.value.length;w--,b=e.slice(y,S),v.index-=y}else if(!(v=yb(m,0,b,d)))continue;k=v.index;var C=v[0],A=b.slice(0,k),E=b.slice(k+C.length),I=y+b.length;a&&I>a.reach&&(a.reach=I);var _=g.prev;if(A&&(_=wb(t,_,A),y+=A.length),kb(t,_,w),g=wb(t,_,new gb(o,u?mb.tokenize(C,u):C,f,C)),E&&wb(t,g,E),w>1){var O={cause:o+","+l,reach:I};bb(e,t,n,g.prev,y,O),a&&O.reach>a.reach&&(a.reach=O.reach)}}}}}}function vb(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function wb(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function kb(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}var xb=mb;function Sb(){}Sb.prototype=xb;var Tb=new Sb;Tb.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Object.hasOwn(Tb.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=Tb.languages[r]}return{type:"root",children:xb.highlight.call(Tb,e,n,r)}},Tb.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(Tb.languages,e.displayName)||e(Tb)},Tb.alias=function(e,t){const n=Tb.languages;let r,i={};for(r in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,r)){const e=i[r],t="string"==typeof e?[e]:e;let a=-1;for(;++a<t.length;)n[t[a]]=n[r]}},Tb.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(Tb.languages,e)},Tb.listLanguages=function(){const e=Tb.languages,t=[];let n;for(n in e)Object.hasOwn(e,n)&&"object"==typeof e[n]&&t.push(n);return t},Tb.util.encode=function(e){return e},Tb.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}const r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),Tb.hooks.run("wrap",r),rb(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=ub(e[t]));return e}(r.attributes),r.content)};var Cb,Ab,Eb=(Cb=Tb,Ab={},function(e){var n,r,i=e.language,a=e.children,o=e.style,s=void 0===o?Ab:o,l=e.customStyle,c=void 0===l?{}:l,u=e.codeTagProps,d=void 0===u?{className:i?"language-".concat(i):void 0,style:By(By({},s['code[class*="language-"]']),s['code[class*="language-'.concat(i,'"]')])}:u,p=e.useInlineStyles,f=void 0===p||p,h=e.showLineNumbers,m=void 0!==h&&h,g=e.showInlineLineNumbers,y=void 0===g||g,b=e.startingLineNumber,v=void 0===b?1:b,w=e.lineNumberContainerStyle,k=e.lineNumberStyle,x=void 0===k?{}:k,S=e.wrapLines,T=e.wrapLongLines,C=void 0!==T&&T,A=e.lineProps,E=void 0===A?{}:A,I=e.renderer,_=e.PreTag,O=void 0===_?"pre":_,N=e.CodeTag,M=void 0===N?"code":N,P=e.code,L=void 0===P?(Array.isArray(a)?a[0]:a)||"":P,D=e.astGenerator,z=function(e,t){if(null==e)return{};var n,r,i=Iy(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Fy);D=D||Cb;var R=m?/*#__PURE__*/t.createElement(Hy,{containerStyle:w,codeStyle:d.style||{},numberStyle:x,startingLineNumber:v,codeString:L}):null,j=s.hljs||s['pre[class*="language-"]']||{backgroundColor:"#fff"},$=Xy(D)?"hljs":"prismjs",F=f?Object.assign({},z,{style:Object.assign({},j,c)}):Object.assign({},z,{className:z.className?"".concat($," ").concat(z.className):$,style:Object.assign({},c)});if(d.style=By(C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},d.style),!D)/*#__PURE__*/return t.createElement(O,F,R,/*#__PURE__*/t.createElement(M,d,L));(void 0===S&&I||C)&&(S=!0),I=I||Jy;var q=[{type:"text",value:L}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Xy(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(sO){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:q});null===B.language&&(B.value=q);var U=Yy(B,S,E,m,y,v,v+(null!==(n=null===(r=L.match(/\n/g))||void 0===r?void 0:r.length)&&void 0!==n?n:0),x,C);/*#__PURE__*/
42
+ return t.createElement(O,F,/*#__PURE__*/t.createElement(M,d,!y&&R,I({rows:U,stylesheet:s,useInlineStyles:f})))});function Ib(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}function _b(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}function Ob(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function Nb(e){e.register(Ob),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}function Mb(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=e.languages.bash[i[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}function Pb(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}function Lb(e){e.register(Nb),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}function Db(e){e.register(Nb),e.register(Ib),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(i);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=o(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=o(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(e)}function zb(e){e.register(Db),e.register(Lb),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(e)}Eb.registerLanguage=function(e,t){return Tb.register(t)},Eb.alias=function(e,t){return Tb.alias(e,t)},Ib.displayName="markup",Ib.aliases=["atom","html","mathml","rss","ssml","svg","xml"],_b.displayName="css",_b.aliases=[],Ob.displayName="clike",Ob.aliases=[],Nb.displayName="javascript",Nb.aliases=["js"],Mb.displayName="bash",Mb.aliases=["sh","shell"],Pb.displayName="json",Pb.aliases=["webmanifest"],Lb.displayName="typescript",Lb.aliases=["ts"],Db.displayName="jsx",Db.aliases=[],zb.displayName="tsx",zb.aliases=[];var Rb=Mb,jb=_b,$b=Nb,Fb=Pb,qb=Db,Bb=Ib,Ub=zb,Hb=Lb,Wb={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}};function Vb(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function Gb(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Kb(e){return"function"==typeof e?e:function(){return e}}var Yb="phrasing",Jb=["autolink","link","image","label"];function Xb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zb(e){this.config.enter.autolinkProtocol.call(this,e)}function Qb(e){this.config.exit.autolinkProtocol.call(this,e)}function ev(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];
43
+ /* @__PURE__ */t.type,t.url="http://"+this.sliceSerialize(e)}function tv(e){this.config.exit.autolinkEmail.call(this,e)}function nv(e){this.exit(e)}function rv(e){!function(e,t,n){const r=Lg((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Gb(e[0]),Kb(e[1])])}return t}(t);let a=-1;for(;++a<i.length;)jg(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){const e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[a][0],o=i[a][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let a=o(...d,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,iv],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,av]],{ignore:["link","linkReference"]})}function iv(e,t,n,r,i){let a="";if(!ov(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Vb(e,"(");let a=Vb(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function av(e,t,n,r){return!(!ov(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ov(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||$h(n)||jh(n))&&(!t||47!==n)}function sv(){this.buffer()}function lv(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function cv(){this.buffer()}function uv(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Eh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pv(e){this.exit(e)}function fv(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Eh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hv(e){this.exit(e)}function mv(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function gv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const a=r.createTracker(i);let o=a.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");return o+=a.move(r.safe(r.associationId(e),{before:o,after:"]"})),l(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?bv:yv))),s(),o},footnoteReference:mv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function yv(e,t,n){return 0===t?e:bv(e,0,n)}function bv(e,t,n){return(n?"":" ")+e}mv.peek=function(){return"["};var vv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function wv(e){this.enter({type:"delete",children:[],position:void 0},e)}function kv(e){this.exit(e)}function xv(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(a),o(),s}function Sv(e){return e.length}function Tv(e){return null==e?"":String(e)}function Cv(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}xv.attention=function(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}},xv.peek=function(){return"~"};var Av=Lg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ev(e,t,n){return">"+(n?"":" ")+e}function Iv(e,t){return _v(e,t.inConstruct,!0)&&!_v(e,t.notInConstruct,!1)}function _v(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ov(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const e=n.unsafe[i];if("\n"===e.character&&!e.before&&!e.after&&Iv(n.stack,e))return/[\t ]/.test(r.before)?"":" "}return"\\\n"}function Nv(e,t,n){return(n?"":" ")+e}function Mv(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Pv(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Lv(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}function Dv(e){return e.value||""}function zv(e,t,n,r){const i=Mv(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function Rv(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jv(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function $v(e,t){const n=hh(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Fv(e,t,n,r){const i=Mv(n),a='"'===i?"Quote":"Apostrophe",o=n.createTracker(r);if($v(e,n)){const t=n.stack;n.stack=t.filter(function(e){return"phrasing"!==e});const r=n.enter("autolink");let i=o.move("<");return i+=o.move(n.containerPhrasing(e,{before:i,after:">",...o.current()})),i+=o.move(">"),r(),n.stack=t,i}const s=n.enter("link");let l=n.enter("label"),c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),s(),c}function qv(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=u.filter(function(e){return"phrasing"!==e}),o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Bv(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Uv(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Hv(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}function Wv(e,t,n,r){const i=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return i(),a}Lv.attention=function(e,t){return{construct:"emphasis",markers:"*"===Pv(t)?["*","_"]:["_","*"],sizes:[1]}},Lv.peek=function(e,t,n){return n.options.emphasis||"*"},Dv.peek=function(){return"<"},zv.peek=function(){return"!"},Rv.peek=function(){return"!"},jv.peek=function(){return"`"},Fv.peek=function(e,t,n){return $v(e,n)?"<":"["},qv.peek=function(){return"["},Wv.attention=function(e,t){return{construct:"strong",markers:"*"===Hv(t)?["*","_"]:["_","*"],sizes:[2]}},Wv.peek=function(e,t,n){return n.options.strong||"*"};var Vv={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Ev);return i(),o},break:Ov,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,Nv);return e(),t}const o=n.createTracker(r),s=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}(a,i)+1,3)),l=n.enter("codeFenced"),c="`"===i?"GraveAccent":"Tilde";let u=o.move(s);if(e.lang){const t=n.enter(`codeFencedLang${c}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${c}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...o.current()})),t()}return u+=o.move("\n"),a&&(u+=o.move(a+"\n")),u+=o.move(s),l(),u},definition:function(e,t,n,r){const i=Mv(n),a='"'===i?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c},emphasis:Lv,hardBreak:Ov,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return $g(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),Boolean((!e.depth||e.depth<3)&&hh(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),o=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});const u=c.charCodeAt(0);return 9!==u&&32!==u||(c=function(e){return"&#x"+e.toString(16).toUpperCase()+";"}(u)+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c},html:Dv,image:zv,imageReference:Rv,inlineCode:jv,link:Fv,linkReference:qv,list:function(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Bv(n);const s=e.ordered?"."===o?")":".":function(e){const t=Bv(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&o===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Uv(n)===o&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||Bv(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o},root:function(e,t,n,r){if(!e.children.some(function(e){return Av(e)}))return n.containerFlow(e,r);const i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),a},strong:Wv,text:function(e,t,n,r){const i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})},thematicBreak:function(e,t,n){const r=(Uv(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Gv(e){const t=e._align;
44
+ /* @__PURE__ */this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Kv(e){this.exit(e),this.data.inTable=void 0}function Yv(e){this.enter({type:"tableRow",children:[]},e)}function Jv(e){this.exit(e)}function Xv(e){this.enter({type:"tableCell",children:[]},e)}function Zv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qv));const n=this.stack[this.stack.length-1];
45
+ /* @__PURE__ */n.type,n.value=t,this.exit(e)}function Qv(e,t){return"|"===t?t:e}function ew(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Vv.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const a=[],o=t.enter("table");for(;++i<r.length;)a[i]=l(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){const i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){const i=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Sv,a=[],o=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let a=-1;for(e[u].length>c&&(c=e[u].length);++a<e[u].length;){const o=Tv(e[u][a]);if(!1!==n.alignDelimiters){const e=i(o);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)a[d]=Cv(r[d]);else{const e=Cv(r);for(;++d<c;)a[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>l[d]&&(l[d]=i),f[d]=i),p[d]=o}o.splice(1,0,p),s.splice(1,0,f),u=-1;const h=[];for(;++u<o.length;){const e=o[u],t=s[u];d=-1;const r=[];for(;++d<c;){const i=e[d]||"";let o="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=a[d];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(o=" ".repeat(e/2),s=o):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const a=[],s=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],0,t,n);return s(),a}}function tw(e){const t=this.stack[this.stack.length-2];
46
+ /* @__PURE__ */t.type,t.checked="taskListCheckValueChecked"===e.type}function nw(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];
47
+ /* @__PURE__ */e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rw(e,t,n,r){const i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=Vv.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),l}for(var iw={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},aw={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(sw,l,s)(t):null===t||zh(t)||$h(t)||45!==t&&jh(t)?l(t):(a=!0,e.consume(t),o)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function l(e){return i||r||!a?n(e):t(e)}},partial:!0},ow={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(sw,t,a)(o):null===o||zh(o)||$h(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},sw={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||zh(o)||$h(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||zh(e)||$h(e)?t(e):r(e)}function a(e){return Ih(e)?o(e):n(e)}function o(t){return 59===t?(e.consume(t),r):Ih(t)?(e.consume(t),o):n(t)}},partial:!0},lw={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return _h(e)?n(e):t(e)}},partial:!0},cw={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!hw.call(r,r.previous)||bw(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iw,e.attempt(aw,e.attempt(ow,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:hw},uw={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",a=!1;return function(t){return 72!==t&&104!==t||!mw.call(r,r.previous)||bw(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o)};function o(t){if(Ih(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),a?l:(a=!0,s)):n(t)}function l(t){return null===t||Nh(t)||zh(t)||$h(t)||jh(t)?n(t):e.attempt(aw,e.attempt(ow,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:mw},dw={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,a;return function(t){return yw(t)&&gw.call(r,r.previous)&&!bw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)):n(t)};function o(t){return yw(t)?(e.consume(t),o):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(lw,c,l)(t):45===t||95===t||_h(t)?(a=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(o){return a&&i&&Ih(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:gw},pw={},fw=48;fw<123;)pw[fw]=dw,58===++fw?fw=65:91===fw&&(fw=97);function hw(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||zh(e)}function mw(e){return!Ih(e)}function gw(e){return!(47===e||yw(e))}function yw(e){return 43===e||45===e||46===e||95===e||_h(e)}function bw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}pw[43]=dw,pw[45]=dw,pw[46]=dw,pw[95]=dw,pw[72]=[dw,uw],pw[104]=[dw,uw],pw[87]=[dw,cw],pw[119]=[dw,cw];var vw={tokenize:function(e,t,n){const r=this;return Bh(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function ww(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return n(i);const s=Eh(r.sliceSerialize({start:o.end,end:r.now()}));return 94===s.codePointAt(0)&&a.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function kw(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function xw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(o>999||93===s&&!a||null===s||91===s||zh(s))return n(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return i.includes(Eh(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return zh(s)||(a=!0),o++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,l):l(t)}}function Sw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!o||null===t||91===t||zh(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=Eh(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return zh(t)||(o=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(a)||i.push(a),Bh(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function Tw(e,t,n){return e.check(em,t,e.attempt(vw,t,n))}function Cw(e){e.exit("gfmFootnoteDefinition")}function Aw(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,a=this.events;let o=0;return function(t){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),s(t))};function s(a){const l=Yh(i);if(126===a)return o>1?r(a):(e.consume(a),o++,s);if(o<2&&!t)return r(a);const c=e.exit("strikethroughSequenceTemporary"),u=Yh(a);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&wh(o,o.length,0,Jh(s,e.slice(r+1,n),t)),wh(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),wh(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}var Ew=class{constructor(){this.map=[],this.index=/* @__PURE__ */new Map}add(e,t,n){!function(e,t,n,r){if(0===n&&0===r.length)return;const i=e.index.get(t);if(i)return i[1]+=n,void i[2].push(...r);const a=[t,n,r];e.map.push(a),e.index.set(t,a)}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Iw(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function _w(e,t,n){const r=this;let i,a=0,o=0;return function(e){let t=r.events.length-1;for(;t>-1;){const{type:e}=r.events[t][1];if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,a="tableHead"===i||"tableRow"===i?w:s;return a===w&&r.parser.lazy[r.now().line]?n(e):a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,o+=1),l(e)}(t)}function l(t){return null===t?n(t):Dh(t)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Rh(t)?Bh(e,l,"whitespace")(t):(o+=1,i&&(i=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||zh(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Rh(t)?Bh(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return Rh(t)?Bh(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||Dh(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Rh(t)?Bh(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||Dh(n))&&i&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||Dh(n)?(e.exit("tableRow"),t(n)):Rh(n)?Bh(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||zh(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function Ow(e,t){let n,r,i,a=-1,o=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Ew;for(;++a<e.length;){const f=e[a],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(Mw(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(a,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(o=!0,i=void 0,l=[0,0,0,0],c=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(o?o=!1:(0!==l[1]&&(c[0]=c[1],i=Nw(p,t,l,s,void 0,i)),l=c,c=[l[1],a,0,0])):(o=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=Nw(p,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=a)):"tableHead"===h.type?(u=!0,d=a):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=a,0!==l[1]?(c[0]=c[1],i=Nw(p,t,l,s,a,i)):0!==c[1]&&(i=Nw(p,t,c,s,a,i)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=a)}for(0!==d&&Mw(p,t,d,n,r),p.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Iw(t.events,a))}return e}function Nw(e,t,n,r,i,a){const o=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},Pw(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=Pw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const i=Pw(t.events,n[2]),a=Pw(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},Pw(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Mw(e,t,n,r,i){const a=[],o=Pw(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Pw(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var Lw={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return zh(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return Dh(r)?t(r):Rh(r)?e.check({tokenize:Dw},t,n)(r):n(r)}}};function Dw(e,t,n){return Bh(e,function(e){return null===e?n(e):t(e)},"whitespace")}var zw={},Rw=[function(e){const t=e||zw,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Sh([{text:pw},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Sw,continuation:{tokenize:Tw},exit:Cw}},text:{91:{name:"gfmFootnoteCall",tokenize:xw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ww,resolveTo:kw}}},Aw(e),{flow:{null:{name:"table",tokenize:_w,resolveAll:Ow}}},{text:{91:Lw}}])}(t)),i.push([{transforms:[rv],enter:{literalAutolink:Xb,literalAutolinkEmail:Zb,literalAutolinkHttp:Zb,literalAutolinkWww:Zb},exit:{literalAutolink:nv,literalAutolinkEmail:tv,literalAutolinkHttp:Qb,literalAutolinkWww:ev}},{enter:{gfmFootnoteCallString:sv,gfmFootnoteCall:lv,gfmFootnoteDefinitionLabelString:cv,gfmFootnoteDefinition:uv},exit:{gfmFootnoteCallString:dv,gfmFootnoteCall:pv,gfmFootnoteDefinitionLabelString:fv,gfmFootnoteDefinition:hv}},{canContainEols:["delete"],enter:{strikethrough:wv},exit:{strikethrough:kv}},{enter:{table:Gv,tableData:Xv,tableHeader:Xv,tableRow:Yv},exit:{codeText:Zv,table:Kv,tableData:Jv,tableHeader:Jv,tableRow:Jv}},{exit:{taskListCheckValueChecked:tw,taskListCheckValueUnchecked:tw,paragraph:nw}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yb,notInConstruct:Jb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yb,notInConstruct:Jb},{character:":",before:"[ps]",after:"\\/",inConstruct:Yb,notInConstruct:Jb}]},gv(e),{handlers:{delete:xv},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vv}]},ew(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rw}}]}}(t))}],jw=e=>e?.default||e;Eb.registerLanguage("javascript",jw($b)),Eb.registerLanguage("typescript",jw(Hb)),Eb.registerLanguage("jsx",jw(qb)),Eb.registerLanguage("tsx",jw(Ub)),Eb.registerLanguage("bash",jw(Rb)),Eb.registerLanguage("json",jw(Fb)),Eb.registerLanguage("css",jw(jb)),Eb.registerLanguage("html",jw(Bb)),Eb.registerLanguage("markdown",jw(Bb));var $w={root:vr("")},Fw=({className:e,children:t="",wrapLines:n=!0,showLineNumbers:r=!0})=>(e=ps("Markdown",{className:e,componentKey:"root"}),/* @__PURE__ */I("div",{className:U("markdown",e),children:/* @__PURE__ */I(Ay,{remarkPlugins:Rw,components:{code(e){let{children:t,className:i,...a}=e,o=pr(a,["node"]),s=/language-(\w+)/.exec(i||"");return s?/* @__PURE__ */I(Eb,{...o,PreTag:"div",language:s[1],style:Wb,wrapLines:n,showLineNumbers:r,children:"string"==typeof t?t.replace(/\n$/,""):""}):/* @__PURE__ */I("code",{...o,className:i,children:t})}},children:t})})),qw=({children:e,components:t,defaultColorMode:n="light",colorModeStorageKey:r,applyColorModeClass:i=!0,colorModeRoot:a})=>{let o="system"===n,[s,l]=S(()=>Ba(r,n));g(()=>{if(!o||typeof window>"u")return;let e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>l(e.matches?"dark":"light");return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[o]),g(()=>{if(!i||typeof document>"u")return;let e=a??document.documentElement;"dark"===s?e.classList.add("dark"):e.classList.remove("dark")},[s,i,a]);let c=h(()=>{o||l(e=>{let t="dark"===e?"light":"dark";if(r)try{localStorage.setItem(r,t)}catch{}return t})},[o,r]),u=h(e=>{if(!o&&(l(e),r))try{localStorage.setItem(r,e)}catch{}},[o,r]),d=k(()=>({theme:{components:t&&Object.keys(t).length>0?t:{}},colorMode:s,toggleColorMode:c,setColorMode:u}),[t,s,c,u]);/* @__PURE__ */
48
+ return I(Ua,{value:d,children:e})},Bw=({children:e,components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:a})=>/* @__PURE__ */I(qw,{components:t,defaultColorMode:n,colorModeStorageKey:r,applyColorModeClass:i,colorModeRoot:a,children:e}),Uw={root:vr("",{variants:{intent:{primary:"text-primary-text",custom:""},size:{xs:"text-xs",sm:"text-sm",md:"",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl",custom:""},weight:{100:"font-thin",thin:"font-thin",200:"font-extralight",extralight:"font-extralight",300:"font-light",light:"font-light",400:"",normal:"",500:"font-medium",medium:"font-medium",600:"font-semibold",semibold:"font-semibold",700:"font-bold",bold:"font-bold",800:"font-extrabold",extrabold:"font-extrabold",900:"font-black",black:"font-black"}},compoundVariants:[],defaultVariants:{intent:"custom",size:"md",weight:400}})},Hw=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ww=/^[\\/]{2}/,Vw="popstate";function Gw(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Kw(e,t){if(!1===e||null==e)throw new Error(t)}function Yw(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(sO){}}}function Jw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Xw(e,t,n=null,r,i){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Qw(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:i}}function Zw({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Qw(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ek(e,t,n="/"){return tk(e,t,n,!1)}function tk(e,t,n,r,i){let a=gk(("string"==typeof t?Qw(t):t).pathname||"/",n);if(null==a)return null;let o=i??function(e){let t=nk(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),s=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Yw(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let c=0;null==s&&c<o.length;++c)s=pk(o[c],l,r);return s}function nk(e,t=[],n=[],r="",i=!1){let a=(e,a,o=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&o)return;Kw(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=xk([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(Kw(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),nk(e.children,t,u,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:dk(c,e.index),routesMeta:u.map((e,t)=>{let[n,r]=mk(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of rk(e.path))a(e,t,!0,n);else a(e,t)}),t}function rk(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=rk(r.join("/")),s=[];return s.push(...o.map(e=>""===e?a:[a,e].join("/"))),i&&s.push(...o),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var ik=/^:[\w-]+$/,ak=3,ok=2,sk=1,lk=10,ck=-2,uk=e=>"*"===e;function dk(e,t){let n=e.split("/"),r=n.length;return n.some(uk)&&(r+=ck),t&&(r+=ok),n.filter(e=>!uk(e)).reduce((e,t)=>e+(ik.test(t)?ak:""===t?sk:lk),r)}function pk(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===a?t:t.slice(a.length)||"/",u={path:e.relativePath,caseSensitive:e.caseSensitive,end:l},d=e.matcher&&e.compiledParams?hk(u,c,e.matcher,e.compiledParams):fk(u,c),p=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=fk({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:xk([a,d.pathname]),pathnameBase:Tk(xk([a,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(a=xk([a,d.pathnameBase]))}return o}function fk(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=mk(e.path,e.caseSensitive,e.end);return hk(e,t,n,r)}function hk(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Sk(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";o=Sk(a.slice(0,a.length-e.length),1)}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:o,pattern:e}}function mk(e,t=!1,n=!0){Yw("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(i+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function gk(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function yk(e,t){let n=Sk(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function bk(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vk(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function wk(e,t,n,r=!1){let i;"string"==typeof e?i=Qw(e):(i={...e},Kw(!i.pathname||!i.pathname.includes("?"),bk("?","pathname","search",i)),Kw(!i.pathname||!i.pathname.includes("#"),bk("#","pathname","hash",i)),Kw(!i.search||!i.search.includes("#"),bk("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let n,{pathname:r,search:i="",hash:a=""}="string"==typeof e?Qw(e):e;return r?(r=kk(r),n=r.startsWith("/")||r.startsWith("\\")?yk(r.substring(1),"/"):yk(r,t)):n=t,{pathname:n,search:Ck(i),hash:Ak(a)}}(i,a),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var kk=e=>e.replace(/[\\/]{2,}/g,"/"),xk=e=>kk(e.join("/"));function Sk(e,t=0){let n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var Tk=e=>Sk(e).replace(/^\/*/,"/"),Ck=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ak=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Ek=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ik(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function _k(e){return xk(e.map(e=>e.route.path).filter(Boolean))||"/"}var Ok="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Nk(e,t){let n=e;if("string"!=typeof n||!Hw.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ok)try{let e=new URL(window.location.href),r=Ww.test(n)?new URL((a=n,e.protocol+a.replace(/\\/g,"/"))):new URL(n),o=gk(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:i=!0}catch(sO){Yw(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var a;return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Mk=new URL("http://localhost");function Pk(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Mk)}catch{return Mk}}function Lk(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function Dk(e,t,n,r){let i=null;try{i=null==e?null:new URL(e,n)}catch{}let a=new URL(t,n),o=null!=i&&!Lk(i,n),s=!Lk(a,n);if("reject"===r){if(o||s)throw new Error("External navigation is not allowed")}else if(s&&(null==i||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}(e,i)||!Lk(i,a)))throw new Error("External navigation is not allowed")}var zk=["POST","PUT","PATCH","DELETE"],Rk=(new Set(zk),["GET",...zk]);new Set(Rk);var jk=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],$k=e.createContext(null);$k.displayName="DataRouter";var Fk=e.createContext(null);Fk.displayName="DataRouterState";var qk=e.createContext(!1);function Bk(){return e.useContext(qk)}var Uk=e.createContext({isTransitioning:!1});Uk.displayName="ViewTransition",e.createContext(/* @__PURE__ */new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var Hk=e.createContext(null);Hk.displayName="Navigation";var Wk=e.createContext(null);Wk.displayName="Location";var Vk=e.createContext({outlet:null,matches:[],isDataRoute:!1});Vk.displayName="Route";var Gk=e.createContext(null);Gk.displayName="RouteError";var Kk="REACT_ROUTER_ERROR";function Yk(){return null!=e.useContext(Wk)}function Jk(){return Kw(Yk(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(Wk).location}var Xk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zk(t){e.useContext(Hk).static||e.useLayoutEffect(t)}function Qk(){let{isDataRoute:t}=e.useContext(Vk);return t?function(){let{router:t}=function(){let t=e.useContext($k);return Kw(t,sx("useNavigate")),t}(),n=lx("useNavigate"),r=e.useRef(!1);return Zk(()=>{r.current=!0}),e.useCallback(async(e,i={})=>{Yw(r.current,Xk),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...i}))},[t,n])}():function(){Kw(Yk(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext($k),{basename:n,navigator:r}=e.useContext(Hk),{matches:i}=e.useContext(Vk),{pathname:a}=Jk(),o=JSON.stringify(vk(i)),s=e.useRef(!1);return Zk(()=>{s.current=!0}),e.useCallback((e,i={})=>{if(Yw(s.current,Xk),!s.current)return;if("number"==typeof e)return void r.go(e);let l=wk(e,JSON.parse(o),a,"path"===i.relative);null==t&&"/"!==n&&(l.pathname="/"===l.pathname?n:xk([n,l.pathname])),Dk("string"==typeof e?e:Zw(e),r.createHref(l),Pk(r),"reject"),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,o,a,t])}()}function ex(t,{relative:n}={}){let{matches:r}=e.useContext(Vk),{pathname:i}=Jk(),a=JSON.stringify(vk(r));return e.useMemo(()=>wk(t,JSON.parse(a),i,"path"===n),[t,a,i,n])}function tx(){let t=function(){let t=e.useContext(Gk),n=function(t){let n=e.useContext(Fk);return Kw(n,sx(t)),n}("useRouteError"),r=lx("useRouteError");return void 0!==t?t:n.errors?.[r]}(),n=Ik(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */e.createElement("code",{style:o},"ErrorBoundary")," or"," ",/* @__PURE__ */e.createElement("code",{style:o},"errorElement")," prop on your route.")),/* @__PURE__ */e.createElement(e.Fragment,null,/* @__PURE__ */e.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */e.createElement("h3",{style:{fontStyle:"italic"}},n),r?/* @__PURE__ */e.createElement("pre",{style:a},r):null,s)}e.createContext(null);var nx=/* @__PURE__ */e.createElement(tx,null),rx=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${Kk}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Ek(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?/* @__PURE__ */e.createElement(Vk.Provider,{value:this.props.routeContext},/* @__PURE__ */e.createElement(Gk.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */e.createElement(ax,{error:t},n):n}};rx.contextType=qk;var ix=/* @__PURE__ */new WeakMap;function ax({children:t,error:n}){let{basename:r,navigator:i}=e.useContext(Hk);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${Kk}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let a=ix.get(n);if(a)throw a;let o=Nk(t.location,r),s=o.absoluteURL||o.to;if(Dk(t.location,s,Pk(i),"allow-explicit"),function(e){try{return jk.includes(new URL(e).protocol)}catch{return!1}}(s))throw new Error("Invalid redirect location");if(Ok&&!ix.get(n)){if(!o.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:t.replace}));throw ix.set(n,e),e}window.location.href=s}/* @__PURE__ */
49
+ return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return t}function ox({routeContext:t,match:n,children:r}){let i=e.useContext($k);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),/* @__PURE__ */e.createElement(Vk.Provider,{value:t},r)}function sx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lx(t){let n=function(t){let n=e.useContext(Vk);return Kw(n,sx(t)),n}(t),r=n.matches[n.matches.length-1];return Kw(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}var cx={};function ux(e,t,n){t||cx[e]||(cx[e]=!0,Yw(!1,n))}function dx({basename:t,children:n,initialEntries:r,initialIndex:i,useTransitions:a}){let o=e.useRef();null==o.current&&(o.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let a=l(null==r?t.length-1:r),o="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[a]}function u(e,n=null,r,i){let a=Xw(t?c().pathname:"/",e,n,r,i);return Yw("/"===a.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),a}function d(e){return"string"==typeof e?e:Zw(e)}return{get index(){return a},get action(){return o},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?Qw(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){o="PUSH";let r=Gw(e)?e:u(e,n);a+=1,t.splice(a,t.length,r),i&&s&&s({action:o,location:r,delta:1})},replace(e,n){o="REPLACE";let r=Gw(e)?e:u(e,n);t[a]=r,i&&s&&s({action:o,location:r,delta:0})},go(e){o="POP";let n=l(a+e),r=t[n];a=n,s&&s({action:o,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}({initialEntries:r,initialIndex:i,v5Compat:!0}));let s=o.current,[l,c]=e.useState({action:s.action,location:s.location}),u=e.useCallback(t=>{!1===a?c(t):e.startTransition(()=>c(t))},[a]);return e.useLayoutEffect(()=>s.listen(u),[s,u]),/* @__PURE__ */e.createElement(fx,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,useTransitions:a})}function px({to:t,replace:n,state:r,relative:i}){Kw(Yk(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:o}=e.useContext(Hk);Yw(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=e.useContext(Vk),{pathname:l}=Jk(),c=Qk(),u=wk(t,vk(s),l,"path"===i);Dk("string"==typeof t?t:Zw(t),o.createHref(u),Pk(o),"reject");let d=JSON.stringify(u);return e.useEffect(()=>{c(JSON.parse(d),{replace:n,state:r,relative:i})},[c,d,i,n,r]),null}function fx({basename:t="/",children:n=null,location:r,navigationType:i="POP",navigator:a,static:o=!1,useTransitions:s}){Kw(!Yk(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=e.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:s,future:{}}),[l,a,o,s]);"string"==typeof r&&(r=Qw(r));let{pathname:u="/",search:d="",hash:p="",state:f=null,key:h="default",mask:m}=r,g=e.useMemo(()=>{let e=gk(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:f,key:h,mask:m},navigationType:i}},[l,u,d,p,f,h,i,m]);return Yw(null!=g,`<Router basename="${l}"> is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g?null:/* @__PURE__ */e.createElement(Hk.Provider,{value:c},/* @__PURE__ */e.createElement(Wk.Provider,{children:n,value:g}))}e.memo(function({routes:t,manifest:n,future:r,state:i,isStatic:a,onError:o}){return function(t,n,r){Kw(Yk(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=e.useContext(Hk),{matches:a}=e.useContext(Vk),o=a[a.length-1],s=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";ux(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let d,p=Jk();if(n){let e="string"==typeof n?Qw(n):n;Kw("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=p;let f=d.pathname||"/",h=f;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):ek(t,{pathname:h});Yw(u||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Yw(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(t,n=[],r){let i=r?.state;if(null==t){if(!i)return null;if(i.errors)t=i.matches;else{if(0!==n.length||i.initialized||!(i.matches.length>0))return null;t=i.matches}}let a=t,o=i?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);Kw(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,l=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){r.isStatic&&(s=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let c=r?.onError,u=i&&c?(e,t)=>{c(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:_k(i.matches),errorInfo:t})}:void 0;return a.reduceRight((t,r,c)=>{let d,p=!1,f=null,h=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||nx,s&&(l<0&&0===c?(ux("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):l===c&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,c+1)),g=()=>{let n;return n=d?f:p?h:r.route.Component?/* @__PURE__ */e.createElement(r.route.Component,null):r.route.element?r.route.element:t,/* @__PURE__ */e.createElement(ox,{match:r,routeContext:{outlet:t,matches:m,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?/* @__PURE__ */e.createElement(rx,{location:i.location,revalidation:i.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:xk([c,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:xk([c,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,r);return n&&g?/* @__PURE__ */e.createElement(Wk.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},g):g}(t,void 0,{manifest:n,state:i,isStatic:a,onError:o,future:r})}),e.Component;var hx="get",mx="application/x-www-form-urlencoded";function gx(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var yx=null,bx=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vx(e){return null==e||bx.has(e)?e:(Yw(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mx}"`),null)}function wx(e,t){if(!1===e||null==e)throw new Error(t)}function kx(e,t,n,r){let i="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:"/"===i.pathname?i.pathname=`_root.${r}`:t&&"/"===gk(i.pathname,t)?i.pathname=`${Sk(t)}/_root.${r}`:i.pathname=`${Sk(i.pathname)}.${r}`,i}function xx(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Sx(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>o(e,t)||s(e,t)):"data"===a?t.filter((t,a)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Tx(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Cx(){let t=e.useContext($k);return wx(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Ax(){let t=e.useContext(Fk);return wx(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ex=e.createContext(void 0);function Ix(){let t=e.useContext(Ex);return wx(t,"You must render this element inside a <HydratedRouter> element"),t}function _x(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ox({page:t,...n}){let r=Bk(),{nonce:i}=Ix(),{router:a}=Cx(),o=e.useMemo(()=>ek(a.routes,t,a.basename),[a.routes,t,a.basename]);return o?(null==n.nonce&&i&&(n={...n,nonce:i}),r?/* @__PURE__ */e.createElement(Nx,{page:t,matches:o,...n}):/* @__PURE__ */e.createElement(Mx,{page:t,matches:o,...n})):null}function Nx({page:t,matches:n,...r}){let i=Jk(),{future:a}=Ix(),{basename:o}=Cx(),s=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=kx(t,o,a.v8_trailingSlashAwareDataRequests,"rsc"),r=!1,s=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?r=!0:s.push(t.route.id);return r&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[o,a.v8_trailingSlashAwareDataRequests,t,i,n]);/* @__PURE__ */
50
+ return e.createElement(e.Fragment,null,s.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})))}function Mx({page:t,matches:n,...r}){let i=Jk(),{future:a,manifest:o,routeModules:s}=Ix(),{basename:l}=Cx(),{loaderData:c,matches:u}=Ax(),d=e.useMemo(()=>Sx(t,n,u,o,i,"data"),[t,n,u,o,i]),p=e.useMemo(()=>Sx(t,n,u,o,i,"assets"),[t,n,u,o,i]),f=e.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=/* @__PURE__ */new Set,r=!1;if(n.forEach(t=>{let n=o.routes[t.route.id];n&&n.hasLoader&&(!d.some(e=>e.route.id===t.route.id)&&t.route.id in c&&s[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let u=kx(t,l,a.v8_trailingSlashAwareDataRequests,"data");return r&&e.size>0&&u.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[l,a.v8_trailingSlashAwareDataRequests,c,i,o,d,n,t,s]),h=e.useMemo(()=>Tx(p,o),[p,o]),m=function(t){let{manifest:n,routeModules:r}=Ix(),[i,a]=e.useState([]);return e.useEffect(()=>{let e=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await(import(
51
51
  /* @vite-ignore */
52
52
  /* webpackIgnore: true */
53
- e.module));return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(vx).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(t,n,r).then(t=>{e||a(t)}),()=>{e=!0}},[t,n,r]),i}(p);/* @__PURE__ */
54
- return e.createElement(e.Fragment,null,f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}Tx.displayName="FrameworkContext";function Ox(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}e.Component;var Nx="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Nx&&(window.__reactRouterVersion="7.18.4")}catch(nO){}function Mx({basename:t,children:n,useTransitions:r,window:i}){let a=e.useRef();null==a.current&&(a.current=function(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=u();function u(){return(o.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),Ww(r,"No window.location.(origin|href) available to create URL");let i="string"==typeof t?t:Yw(t);return i=i.replace(/ $/,"%20"),!n&&Bw.test(i)&&(i=r+i),new URL(i,r)}(i,e)}null==c&&(c=0,o.replaceState({...o.state,idx:c},""));let f={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Uw,d),l=e,()=>{i.removeEventListener(Uw,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=Hw(e)?e:Kw(f.location,e,t);n&&n(r,e),c=u()+1;let d=Gw(r,c),p=f.createHref(r.mask||r);try{o.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}a&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=Hw(e)?e:Kw(f.location,e,t);n&&n(r,e),c=u();let i=Gw(r,c),d=f.createHref(r.mask||r);o.replaceState(i,"",d),a&&l&&l({action:s,location:f.location,delta:0})},go:e=>o.go(e)};return f}(function(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Kw("",{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:Yw(t)},null,e)}({window:i,v5Compat:!0}));let o=a.current,[s,l]=e.useState({action:o.action,location:o.location}),c=e.useCallback(t=>{!1===r?l(t):e.startTransition(()=>l(t))},[r]);return e.useLayoutEffect(()=>o.listen(c),[o,c]),/* @__PURE__ */e.createElement(ux,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,useTransitions:r})}var Px=e.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:c,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m){let{basename:g,navigator:y,useTransitions:b}=e.useContext(qk),v="string"==typeof u&&qw.test(u),w=Ik(u,g),k=function(t,{relative:n}={}){Ww(Vk(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=e.useContext(qk),{hash:a,pathname:o,search:s}=Xk(t,{relative:n}),l=o;return"/"!==r&&(l="/"===o?r:vk([r,o])),i.createHref({pathname:l,search:s,hash:a})}(u=w.to,{relative:i}),x=Gk(),S=null;if(s){let e=yk(s,[],x.mask?x.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:vk([g,e.pathname])),S=y.createHref(e)}let[T,C,A]=function(t,n){let r=e.useContext(Tx),[i,a]=e.useState(!1),[o,s]=e.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=e.useRef(null);e.useEffect(()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let h=()=>{a(!0)},m=()=>{a(!1),s(!1)};return r?"intent"!==t?[o,f,{}]:[o,f,{onFocus:Ax(l,h),onBlur:Ax(c,m),onMouseEnter:Ax(u,h),onMouseLeave:Ax(d,m),onTouchStart:Ax(p,h)}]:[!1,f,{}]}(r,h),E=function(t,{target:n,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Jk(),p=Gk(),f=Xk(t,{relative:s});return e.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,n)){h.preventDefault();let n=void 0!==r?r:Yw(p)===Yw(f),m=()=>d(t,{replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?e.startTransition(()=>m()):m()}},[p,d,f,r,i,a,n,t,o,s,l,c,u])}(u,{replace:o,mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,defaultShouldRevalidate:f,useTransitions:b}),I=!(w.isExternal||a),_=/* @__PURE__ */e.createElement("a",{...h,...A,href:(I?S:void 0)||w.absoluteURL||k,onClick:I?function(e){t&&t(e),e.defaultPrevented||E(e)}:t,ref:Ox(m,C),target:c,"data-discover":v||"render"!==n?void 0:"true"});return T&&!v?/* @__PURE__ */e.createElement(e.Fragment,null,_,/* @__PURE__ */e.createElement(Ex,{page:k})):_});Px.displayName="Link";var Lx=e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:s,children:l,...c},u){let d=Xk(o,{relative:c.relative}),p=Gk(),f=e.useContext(Rk),{navigator:h,basename:m}=e.useContext(qk),g=null!=f&&function(t,{relative:n}={}){let r=e.useContext(Fk);Ww(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=zx("useViewTransitionState"),a=Xk(t,{relative:n});if(!r.isTransitioning)return!1;let o=fk(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=fk(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=uk(a.pathname,s)||null!=uk(a.pathname,o)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,b=p.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(b=b.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&m&&(v=fk(v,m)||v);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,x=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(w),S=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),T={isActive:x,isPending:S,isTransitioning:g},C=x?t:void 0;k="function"==typeof r?r(T):[r,x?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let A="function"==typeof a?a(T):a;/* @__PURE__ */
55
- return e.createElement(Px,{...c,"aria-current":C,className:k,ref:u,style:A,to:o,viewTransition:s},"function"==typeof l?l(T):l)});Lx.displayName="NavLink";var Dx=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=dx,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m)=>{let{useTransitions:g}=e.useContext(qk),y=function(){let{router:t}=zx("useSubmit"),{basename:n}=e.useContext(qk),r=ax("useRouteId"),i=t.fetch,a=t.navigate;return e.useCallback(async(e,t={})=>{let{action:o,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,a,o;if(fx(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?fk(o,t):null,n=e.getAttribute("method")||dx,i=gx(e.getAttribute("enctype"))||px,a=new FormData(e)}else if(function(e){return fx(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return fx(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(r=s?fk(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||dx,i=gx(e.getAttribute("formenctype"))||gx(o.getAttribute("enctype"))||px,a=new FormData(o,e),!function(){if(null===hx)try{new FormData(document.createElement("form"),0),hx=!1}catch(nO){hx=!0}return hx}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(fx(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=dx,r=null,i=px,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}(e,n);if(!1===t.navigate){let e=t.fetcherKey||jx();await i(e,r,t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync})}else await a(t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,a,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(qk),i=e.useContext(Uk);Ww(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),o={...Xk(t||".",{relative:n})},s=Gk();if(null==t){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return t&&"."!==t||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(o.pathname="/"===o.pathname?r:vk([r,o.pathname])),Yw(o)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",w="string"==typeof l&&qw.test(l);/* @__PURE__ */
56
- return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,h=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f});g&&!1!==r?e.startTransition(()=>h()):h()},...h,"data-discover":w||"render"!==t?void 0:"true"})});function zx(t){let n=e.useContext(zk);return Ww(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}Dx.displayName="Form";var Rx=0,jx=()=>`__${String(++Rx)}__`;function $x({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=Jw(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},a={createHref:Fx,encodeLocation:qx,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
57
- return e.createElement(ux,{basename:t,children:n,location:i,navigationType:"POP",navigator:a,static:!0,useTransitions:!1})}function Fx(e){return"string"==typeof e?e:Yw(e)}function qx(e){let t="string"==typeof e?e:Yw(e);t=t.replace(/ $/,"%20");let n=qw.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var Bx,Ux=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],Hx=()=>{const e=new URLSearchParams(window.location.search),t={};for(const n of Ux){const r=e.get(n);r&&(t[n.slice(4)]=r)}return Object.keys(t).length>0?t:void 0},Wx=()=>"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,Vx=e=>{Bx=e},Gx=(e,t)=>{Bx?.track(e,t)},Kx=({analytics:e})=>{const t=Gk(),n=x(!0===e?.firstViewCounted);return g(()=>{if(!e?.endpoint||!e.key)return;const t=((e,t=20,n=5e3)=>{const r=[],i=`${e.endpoint.replace(/\/+$/,"")}/batch?k=${encodeURIComponent(e.key)}`;let a;const o=()=>{0!==r.length&&(e=>{const t=JSON.stringify({events:e});"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(i,t)||fetch(i,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:t,keepalive:!0,mode:"no-cors"}).catch(()=>{})})(r.splice(0,r.length))},s=e=>{r.push(e),r.length>=t&&o()},l=()=>({path:window.location.pathname,title:document.title||void 0});return"undefined"!=typeof window&&(a=setInterval(o,n),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&o()}),window.addEventListener("pagehide",o)),{trackRender:()=>{s({id:Wx(),type:"render",ts:Date.now(),page:l(),ref:{referrer:document.referrer||void 0,utm:Hx()}})},track:(e,t)=>{s({id:Wx(),type:"interaction",ts:Date.now(),page:l(),name:e,props:t})},flush:o,stop:()=>{a&&(clearInterval(a),a=void 0),o()}}})(e);return Vx(t),()=>{Vx(void 0),t.stop()}},[e]),g(()=>{n.current?n.current=!1:Bx?.trackRender()},[t.pathname,t.search]),null},Yx=W("AuthContext",{}),Jx=({server:e,routerLocation:t})=>{let n=k(()=>typeof window<"u"?window.location:ar(e,"location",{pathname:"/"}),[e]),r=k(()=>{if(!t)return n;let{origin:e,host:r,hostname:i,protocol:a,href:o}=n,{pathname:s,search:l}=t;return{origin:e,host:r,hostname:i,protocol:a,pathname:s,search:l,hash:"",href:e?`${e}${s}${l}`:o}},[n,t]),i=k(()=>function(e){!e&&typeof window<"u"&&(e=window.location.search);let t={};if(!e||0===e.length)return t;let n=e.replace("?","").split("&");for(let r=0;r<n.length;r++){let e=n[r].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}(r.search),[r.search]),a=k(()=>r.hostname?r.hostname:"localhost",[r.hostname]),o=r.origin||"";return k(()=>({queryParams:i,hostname:a,origin:o,location:r}),[i,a,o,r])},Xx=({authenticated:e,user:t})=>{let n=t?.details,r={authenticated:!0===e};return n?{...r,email:n.email,username:n.username,roles:n.roles}:r},Zx=["wheel","touchmove","keydown","pointerdown"],Qx=e=>{const t=document.getElementById(e);return t?.scrollIntoView({block:"start"}),null!==t},eS=({children:e,currentPageId:t})=>{const{server:n}=f(Ec),r=Nt(),{renderMode:i,previewMode:a,environment:o}=X(),[[s,l,c,u,d]]=zt(["schema.pageFolders","pageDefinitions","schema.variables","schema.flags","flags.overrides"]),p=n.ssr?.renderResult,m="widget"!==i?Gk():void 0,{queryParams:y,hostname:b,origin:v,location:w}=Jx({server:n,routerLocation:m}),S=x(l);S.current=l;const T=x(s);T.current=s;const{authenticated:C,user:A}=f(Yx),E="widget"!==i?Jk():void 0,O=x(E);g(()=>{O.current=E},[E]);const N=k(()=>tu(l,s,C,n.basePath,a),[l,s,C,n.basePath,a]),{action:M,pageId:P="",pathMatch:L}=k(()=>"widget"===i?{action:{type:"normal",path:""},pageId:t}:nu(N,w.pathname,C),[N,w.pathname,C,i,t]),D=t||P;(({hash:e,navigationKey:t,enabled:n})=>{g(()=>{const t=(e=>{const t=e.replace(/^#/,"");try{return decodeURIComponent(t)}catch{return t}})(e);if(!n||!t||"undefined"==typeof document||Qx(t))return;const r=new AbortController,i=new MutationObserver(()=>{Qx(t)&&r.abort()}),a=setTimeout(()=>r.abort(),3e3);return r.signal.addEventListener("abort",()=>{i.disconnect(),clearTimeout(a)}),i.observe(document.body,{childList:!0,subtree:!0}),Zx.forEach(e=>window.addEventListener(e,()=>r.abort(),{once:!0,passive:!0,signal:r.signal})),()=>r.abort()},[e,t,n])})({hash:m?.hash??"",navigationKey:m?.key,enabled:a&&"widget"!==i}),g(()=>{Hl.info("navigation",/* @__PURE__ */_("span",{children:["Navigated to page"," ",
58
- /* @__PURE__ */I("b",{children:ar(l,`${D}.attributes.name`,D||"Unknown")})]}),{status:M.type,elementId:D})},[M.type,D,l]);const z=h(e=>Qc(S.current,T.current,e),[]),R=h((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=z(e);if(!r.get("rsc.enabled"))return void O.current?.(n);const i=()=>O.current?.(n);Promise.race([ou(r,void 0,void 0,n),new Promise(e=>setTimeout(e,1500))]).then(i,i)},[z,r]),j=k(()=>{const e=N.find(e=>e.pageId===D&&!e.isRaw);return e?{...ru(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...ar(L,"params",{})}:ar(L,"params",{})},[N,L,D]),$=ic(j),F=ic(y),q=k(()=>new URLSearchParams(w.search),[w.search]),B=v?`${v}${w.pathname}${w.search}`:"";Rt(["navigation.urlSearchParams","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId","navigation.navigate"],[q,$,F,b,v,B,D,R],{raw:!0});const U=Object.hasOwn(l,D)?l[D].definition.flag:void 0,H=void 0!==U&&!rc(U,nc(tc(u,{environment:o,hostname:b,routeParams:$,queryParams:F,user:Xx({authenticated:C,user:A})},d)));if("notFound"===M.type||H)return p&&(p.status=404),"Not Found";if("accessDenied"===M.type)return p&&(p.status=403),"Access Denied";if("redirect"===M.type){const e=Fl(c,{queryParams:y,routeParams:$,hostname:b,environment:o}),t=M.path?String(Fn(M.path,{variables:e},!1,!0)):"";if(t&&Kc(t)){const e=new URL(t);return e.searchParams.has("redirect")||e.searchParams.set("redirect",(e=>e.href?e.href:`${e.protocol||"https:"}//${e.host||e.hostname}${e.pathname}${e.search}`)(w)),p?(p.redirect=e.toString(),null):(window.location.assign(e.toString()),null)}return p?(p.redirect=M.path??"",null):/* @__PURE__ */I(cx,{to:M.path??"",replace:!0})}return e},tS=(e,{src:t,type:n,isMain:r},i=!1)=>{let a,o=`${e}/${t}`,s=btoa(o);return a="style"===n&&o.endsWith(".css")?{type:"link",id:s,params:{href:o,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:o,type:"text/javascript"},isMain:r},i&&delete a.isMain,a},nS=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{definition:{name:a="Plitzi's Demo Plugin",owner:o="Plitzi",verified:s=!1,license:l="MIT",website:c="https://plitzi.com",backgroundColor:u="#4422ee",icon:d="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:p,assetsSettings:f,pluginSchema:h}=t;return Object.values(ar(t,"pluginSchema",{})).reduce((e,m)=>{let{definition:g,builder:y,defaultStyle:b,attributes:v}=m,w=[];return g.type===i&&(w=Object.keys(pr(h,[i]))),{...e,[g.type]:{attributes:v,builder:y,defaultStyle:b,definition:g,market:{owner:o,verified:s,license:l,website:c,backgroundColor:u,icon:d,category:a},resource:n,isMain:g.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(f).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>tS(n,e,!0)),assets:Object.values(p).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>tS(n,e)),subPlugins:w}}},{})}catch{return{}}},rS=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[ar(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=ar(n,r);t={...t,...nS(e,i)}}),t},iS=class extends Error{failure;statusCode;constructor(e,t,n){super(e),this.name="GraphqlRequestError",this.failure=t,this.statusCode=n}},aS=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:a="",instanceId:o,offlineMode:s=!1,offlineData:l,offlineDataType:c="json"})=>{const{environment:u,debugMode:d}=X(),p=$t(),m=s&&!!l&&!!l.schema,y=k(()=>((e,t)=>({request:async(n,r)=>{let i;try{i=await fetch(e,{method:"POST",headers:{accept:"application/graphql-response+json, application/json;q=0.9","content-type":"application/json","sdk-version":"0.38.3",authorization:t?`Bearer ${t}`:""},body:JSON.stringify({query:n,variables:r})})}catch(nO){throw new iS(nO instanceof Error?nO.message:"Network request failed","network")}const a=(e=>{try{return JSON.parse(e)}catch{return}})(await i.text());if(!i.ok){const t=Qr(i.status,a);throw t&&Xr({reason:t,url:e}),new iS(`Response not successful: Received status code ${i.status}`,"http",i.status)}const o=(e=>{const t=er(e)?e.errors:void 0;return Array.isArray(t)?t.map(e=>er(e)&&"string"==typeof e.message?e.message:"Unknown error"):[]})(a);if(o.length)throw new iS(o.join("\n"),"graphql",i.status);if(!er(a)||!er(a.data))throw new iS("The server answered without data","graphql",i.status);return a.data}}))(t.serverUrl,r),[t.serverUrl,r]),[b,v]=S(!(s&&l)),[w,x]=S(void 0),{components:T}=f(jr),[C,A]=S(()=>m&&"json"===c?{...l,plugins:{}}:{plugins:{}}),E=h(async(e,t)=>{try{return{success:!0,result:await y.request(Pc[e],{environment:u,...t})}}catch(nO){return{success:!1,result:void 0,error:nO instanceof Error?nO:String(nO)}}},[y,u]),O=h(async(e,t,n=!0)=>{const r=Mc[e];if(!r)return{success:!1,result:void 0,error:"Mutation Not Found"};try{return{success:!0,result:await y.request(r,n?{environment:u,...t}:t)}}catch(nO){return{success:!1,result:void 0,error:nO instanceof Error?nO:String(nO)}}},[y,u]),N=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await E("Init",{environment:u,revision:e});if(t.error)return v(!1),void x((e=>e instanceof iS?401===e.statusCode?"Access not authorized":"network"===e.failure?"Service not available":e.message:"string"==typeof e?e:e.message)(t.error));if(t.success&&t.result){const{Space:e}=lr(t.result);if(!e)return x(/* @__PURE__ */_("span",{children:["Space not found, publish to ",
59
- /* @__PURE__ */I("b",{children:u})," environment"]})),void v(!1);let n={};e.plugins.length>0&&(n=await rS(e.plugins.filter(e=>!T.current[e.type]))),p("render.overQuota",e.render?.overQuota??!1),A({schema:{...Tc,...Nc(e.schema)},plugins:n,style:e.style})}v(!1)};g(()=>{s&&l?m&&(async()=>{let e={};l?.plugins&&l.plugins.length>0&&(e=await rS(l.plugins.filter(e=>!T.current[e.type]))),A(t=>({...t,plugins:e})),v(!1)})():(v(e=>e||!0),N())},[m,s&&c,r,u,d]);const M=k(()=>({query:E,mutate:O,webKey:r,webId:i,server:t,environment:u,instanceId:o,userKey:a}),[E,O,r,i,t,u,o,a]);return w?/* @__PURE__ */I("div",{children:w}):b?null:/* @__PURE__ */I(Ec,{value:M,children:/* @__PURE__ */I(Ic,{value:C,children:e})})},oS=W("PluginsContext",{assets:{}}),sS=({children:e,plugins:t,sdkStylePath:n="./plitzi-sdk.css"})=>{const{renderMode:r}=X(),[i,a]=S({}),o=f(Ic),s=k(()=>t||o.plugins,[t,o]),{components:l}=f(jr),c=h((e,t,n="")=>t?ar(s,`${e}.settings.${t}`,n):ar(s,`${e}.settings`,{}),[s]),u=h((e=[])=>{const t=e.reduce((e,t)=>{let n="";return n="script"===t.type?t.params.src:t.params.href,n?(n=btoa(n),{...e,[n]:{...t,key:n}}):e},{});0!==Object.keys(t).length&&a(e=>({...e,...t}))},[]),d=h((e=[])=>{const t=e.filter(e=>!function(e){return null==e||"number"!=typeof e&&"boolean"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e&&("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"==typeof e&&0===Object.keys(e).length)}(e)).map(e=>btoa(e));a(e=>pr(e,t))},[]),p=k(()=>(e=>Object.values(e).reduce((e,t)=>({...e,...ar(t,"assets",[]).filter(e=>"link"===e.type).reduce((e,t)=>({...e,[btoa(t.id)]:t}),{})}),{}))(s),[s]),m=k(()=>Object.keys(l.current).filter(e=>"local-custom"===l.current[e].origin).reduce((e,t)=>({...e,...ar(l,`${t}.assets`,[]).reduce((e,n,r)=>({...e,[`${t}-${r}`]:{type:"link",id:`${t}-${r}`,params:n}}),{})}),{}),[l.current]),g=k(()=>{const e={};return"iframe"!==r&&"shadow"!==r||(e["static-99"]={type:"link",id:"static-99",params:{type:"text/css",href:n,rel:"stylesheet"}}),{...e,...m,...p,...i}},[m,p,i,r,n]),y=k(()=>({assets:g,getSettings:c,plugins:s,registerCustomAssets:u,unregisterCustomAssets:d}),[g,c,s,u,d]),b=k(()=>Object.values({...p,...i}).map((e,t)=>/* @__PURE__ */I(e.type,{...e.params},t)),[p,i]);/* @__PURE__ */
60
- return _(E,{children:[/* @__PURE__ */I(Cp,{children:("raw"===r||"widget"===r)&&b}),/* @__PURE__ */I(oS,{value:y,children:e})]})},lS=({children:e,schema:t})=>{const n=f(Ic),r=k(()=>({...Tc,...t||n.schema}),[t,n.schema]);Rt("schema",r);const i=k(()=>sr(ar(r,"flat",{}),ar(r,"pages",[])),[r.pages]);return Rt("pageDefinitions",i),e},cS=l({});cS.displayName="ContainerRootContext";var uS=({className:e="",children:t,...n})=>{let r=x(null),i=h(()=>r.current instanceof HTMLElement?r.current.getRootNode():void 0,[r]),a=h(()=>i()instanceof ShadowRoot,[i]),o=k(()=>({getHost:i,rootRef:r,isRootShadow:a}),[i,r,a]);/* @__PURE__ */
61
- return I("div",{...n,ref:r,className:e,children:/* @__PURE__ */I(cS,{value:o,children:t})})},dS=W("InteractionsContext",{}),pS=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,fS=/^rgba?\(\s*(\d{1,3}%?\s*,\s*){2,3}\d{1,3}%?\s*\)$/,hS=/^hsla?\(\s*\d{1,3}(deg|rad|turn)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|0?\.\d+|1))?\s*\)$/,mS=/* @__PURE__ */new Set(["black","white","red","green","blue","yellow","cyan","magenta","orange","purple","brown","pink","gray","lime","teal","navy","silver","maroon","olive","aqua","fuchsia"]),gS=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),yS=({ref:e,className:t="",ssrMode:r=!1,id:i="",css:a="",style:o,zoom:s=1,assets:l,viewport:c="width=device-width, initial-scale=1",children:u,contentDidMount:d,contentDidDismount:p,contentDidUpdate:f,onLoad:m})=>{t=ps("ContainerFrame",{className:t,componentKey:"root"});let y=x(null);v(e,()=>y.current,[y]);let[b,w]=S(!1),[k,T]=S(null),C=h((e,t,n)=>{let r=[...t.childNodes],i=n.getElementById("customStyle");Object.values(e).forEach(e=>{let a=n.createElement(e.type);e.id&&a.setAttribute("data-id",e.id),Object.keys(e.params).forEach(t=>{("link"===e.type||"script"===e.type)&&a.setAttribute(t,e.params[t])}),r.find(t=>"link"===e.type&&t.href===a.href||"script"===e.type&&t.src===a.src)||(t.insertBefore(a,i),r.push(a))})},[]),A=h((e,t)=>{let{head:n}=e,r=n.querySelectorAll('*:not([asset-static="true"])');Object.values(r).forEach(e=>{n.removeChild(e)}),t&&C(t,n,e)},[C]),[N]=S(()=>(e=>{if(!e)return"";let t=[];return Object.values(e).forEach(e=>{t.push(`<${e.type} ${Object.keys(e.params).map(t=>`${t}="${e.params[t]}"`).join(" ")}>`)}),t.join("")})(l)),M=h(()=>d?.(),[d]);g(()=>{b&&k&&A(k,l)},[b,l,k,A]);let P=h(()=>{let e=y.current&&k,t=y.current?.contentDocument===k;!e||t?b||(m?.(y.current),w(!0),T(y.current?.contentDocument)):T(y.current?.contentDocument)},[b,k,m]);return g(()=>{k&&(k.body.style.zoom=1===s?"":`${s}`)},[k,s]),/* @__PURE__ */_("iframe",{ref:y,className:t,title:"#",srcDoc:`<!DOCTYPE html><html><head>${N}</head><body></body></html>`,id:i,onLoad:P,style:o,children:[b&&k&&O(/* @__PURE__ */_(E,{children:[
62
- /* @__PURE__ */I("meta",{name:"viewport",content:c,"asset-static":"true"}),!r&&a&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",children:a}),r&&a&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",dangerouslySetInnerHTML:{__html:a}})]}),k.head),b&&k&&u&&O(/* @__PURE__ */I(gS,{contentDidMount:M,contentDidDismount:p,contentDidUpdate:f,children:n.only(u)}),k.body)]})},bS=Object.defineProperty,vS=(e,t)=>{let n={};for(var r in e)bS(n,r,{get:e[r],enumerable:!0});return t||bS(n,Symbol.toStringTag,{value:"Module"}),n},wS=ld(({ref:e,content:t="",className:n=""})=>{let{settings:{previewMode:r}}=sc(),i=h(e=>new Promise((t,n)=>{if(typeof document>"u")return void n(/* @__PURE__ */Error("Document is not available"));let r=document.createElement("script"),i=e.hasAttribute("src");for(let{name:a,value:o}of e.attributes)r.setAttribute(a,o);i?(r.addEventListener("load",()=>t(r)),r.addEventListener("error",n)):r.textContent=e.innerText,e.replaceWith(r),i||t(r)}),[]),a=h(async e=>{if(!e)return;let t=e.querySelectorAll("script"),n=[],r=[];if(t.forEach(e=>{(e.hasAttribute("async")?r:n).push(()=>i(e))}),t.length){for(let e of r)e();for(let e of n)await e()}},[i]);return g(()=>{let t=e?.current;t&&r&&typeof window<"u"&&typeof document<"u"&&a(t)},[a,r,e]),/* @__PURE__ */I(Ud,{ref:e,className:U("plitzi-component__block-html",n,{"block-html--empty":""===t||!t}),dangerouslySetInnerHTML:{__html:t}})}),kS=Object.assign(wS,{type:"blockHtml",content:{attributes:{content:""},definition:{label:"HTML Block",type:"blockHtml",description:"Renders an arbitrary raw HTML string as a block. Escape hatch when no structured element fits.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"HTML Block",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),xS=ld(({ref:e,className:t="",props:n="{}",contentCache:r="",...i})=>{let{id:a,rootId:o,plitziElementLayout:s}=cd(),[l,c]=S(),[u,d]=S(),p=k(()=>({id:a,rootId:o,plitziElementLayout:s}),[a,s,o]),f=k(()=>{let e=pr(i,["content","children"]);if(!n)return e;if("object"==typeof n)return{...n,...e};if("string"!=typeof n)return e;try{return{...JSON.parse(n),...e}}catch(e){console.error(e)}},[n,i]),m=h(async e=>{let t,n;try{e=`data:text/javascript;base64,${e}`,t=await(import(
53
+ e.module));return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(xx).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(t,n,r).then(t=>{e||a(t)}),()=>{e=!0}},[t,n,r]),i}(p);/* @__PURE__ */
54
+ return e.createElement(e.Fragment,null,f.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...r})),h.map(t=>/* @__PURE__ */e.createElement("link",{key:t,rel:"modulepreload",href:t,...r})),m.map(({key:t,link:n})=>/* @__PURE__ */e.createElement("link",{key:t,nonce:r.nonce,...n,crossOrigin:n.crossOrigin??r.crossOrigin})))}Ex.displayName="FrameworkContext";function Px(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}e.Component;var Lx="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Lx&&(window.__reactRouterVersion="7.18.4")}catch(sO){}function Dx({basename:t,children:n,useTransitions:r,window:i}){let a=e.useRef();null==a.current&&(a.current=function(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s="POP",l=null,c=u();function u(){return(o.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:f.location,delta:t})}function p(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),Kw(r,"No window.location.(origin|href) available to create URL");let i="string"==typeof t?t:Zw(t);return i=i.replace(/ $/,"%20"),!n&&Ww.test(i)&&(i=r+i),new URL(i,r)}(i,e)}null==c&&(c=0,o.replaceState({...o.state,idx:c},""));let f={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Vw,d),l=e,()=>{i.removeEventListener(Vw,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=Gw(e)?e:Xw(f.location,e,t);n&&n(r,e),c=u()+1;let d=Jw(r,c),p=f.createHref(r.mask||r);try{o.pushState(d,"",p)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(p)}a&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let r=Gw(e)?e:Xw(f.location,e,t);n&&n(r,e),c=u();let i=Jw(r,c),d=f.createHref(r.mask||r);o.replaceState(i,"",d),a&&l&&l({action:s,location:f.location,delta:0})},go:e=>o.go(e)};return f}(function(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Xw("",{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:Zw(t)},null,e)}({window:i,v5Compat:!0}));let o=a.current,[s,l]=e.useState({action:o.action,location:o.location}),c=e.useCallback(t=>{!1===r?l(t):e.startTransition(()=>l(t))},[r]);return e.useLayoutEffect(()=>o.listen(c),[o,c]),/* @__PURE__ */e.createElement(fx,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,useTransitions:r})}var zx=e.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:c,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m){let{basename:g,navigator:y,useTransitions:b}=e.useContext(Hk),v="string"==typeof u&&Hw.test(u),w=Nk(u,g),k=function(t,{relative:n}={}){Kw(Yk(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=e.useContext(Hk),{hash:a,pathname:o,search:s}=ex(t,{relative:n}),l=o;return"/"!==r&&(l="/"===o?r:xk([r,o])),i.createHref({pathname:l,search:s,hash:a})}(u=w.to,{relative:i}),x=Jk(),S=null;if(s){let e=wk(s,[],x.mask?x.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:xk([g,e.pathname])),S=y.createHref(e)}let[T,C,A]=function(t,n){let r=e.useContext(Ex),[i,a]=e.useState(!1),[o,s]=e.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=e.useRef(null);e.useEffect(()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let h=()=>{a(!0)},m=()=>{a(!1),s(!1)};return r?"intent"!==t?[o,f,{}]:[o,f,{onFocus:_x(l,h),onBlur:_x(c,m),onMouseEnter:_x(u,h),onMouseLeave:_x(d,m),onTouchStart:_x(p,h)}]:[!1,f,{}]}(r,h),E=function(t,{target:n,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Qk(),p=Jk(),f=ex(t,{relative:s});return e.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,n)){h.preventDefault();let n=void 0!==r?r:Zw(p)===Zw(f),m=()=>d(t,{replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:l,defaultShouldRevalidate:c});u?e.startTransition(()=>m()):m()}},[p,d,f,r,i,a,n,t,o,s,l,c,u])}(u,{replace:o,mask:s,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:p,defaultShouldRevalidate:f,useTransitions:b}),I=!(w.isExternal||a),_=/* @__PURE__ */e.createElement("a",{...h,...A,href:(I?S:void 0)||w.absoluteURL||k,onClick:I?function(e){t&&t(e),e.defaultPrevented||E(e)}:t,ref:Px(m,C),target:c,"data-discover":v||"render"!==n?void 0:"true"});return T&&!v?/* @__PURE__ */e.createElement(e.Fragment,null,_,/* @__PURE__ */e.createElement(Ox,{page:k})):_});zx.displayName="Link";var Rx=e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:s,children:l,...c},u){let d=ex(o,{relative:c.relative}),p=Jk(),f=e.useContext(Fk),{navigator:h,basename:m}=e.useContext(Hk),g=null!=f&&function(t,{relative:n}={}){let r=e.useContext(Uk);Kw(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=$x("useViewTransitionState"),a=ex(t,{relative:n});if(!r.isTransitioning)return!1;let o=gk(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=gk(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=fk(a.pathname,s)||null!=fk(a.pathname,o)}(d)&&!0===s,y=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,b=p.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(b=b.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&m&&(v=gk(v,m)||v);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,x=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(w),S=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),T={isActive:x,isPending:S,isTransitioning:g},C=x?t:void 0;k="function"==typeof r?r(T):[r,x?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let A="function"==typeof a?a(T):a;/* @__PURE__ */
55
+ return e.createElement(zx,{...c,"aria-current":C,className:k,ref:u,style:A,to:o,viewTransition:s},"function"==typeof l?l(T):l)});Rx.displayName="NavLink";var jx=e.forwardRef(({discover:t="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=hx,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...h},m)=>{let{useTransitions:g}=e.useContext(Hk),y=function(){let{router:t}=$x("useSubmit"),{basename:n}=e.useContext(Hk),r=lx("useRouteId"),i=t.fetch,a=t.navigate;return e.useCallback(async(e,t={})=>{let{action:o,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,i,a,o;if(gx(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?gk(o,t):null,n=e.getAttribute("method")||hx,i=vx(e.getAttribute("enctype"))||mx,a=new FormData(e)}else if(function(e){return gx(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return gx(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||o.getAttribute("action");if(r=s?gk(s,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||hx,i=vx(e.getAttribute("formenctype"))||vx(o.getAttribute("enctype"))||mx,a=new FormData(o,e),!function(){if(null===yx)try{new FormData(document.createElement("form"),0),yx=!1}catch(sO){yx=!0}return yx}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(gx(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=hx,r=null,i=mx,o=e}var s;return a&&"text/plain"===i&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}(e,n);if(!1===t.navigate){let e=t.fetcherKey||qx();await i(e,r,t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,flushSync:t.flushSync})}else await a(t.action||o,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:c,body:u,formMethod:t.method||s,formEncType:t.encType||l,replace:t.replace,state:t.state,fromRouteId:r,flushSync:t.flushSync,viewTransition:t.viewTransition})},[i,a,n,r])}(),b=function(t,{relative:n}={}){let{basename:r}=e.useContext(Hk),i=e.useContext(Vk);Kw(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),o={...ex(t||".",{relative:n})},s=Jk();if(null==t){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}return t&&"."!==t||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(o.pathname="/"===o.pathname?r:xk([r,o.pathname])),Zw(o)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",w="string"==typeof l&&Hw.test(l);/* @__PURE__ */
56
+ return e.createElement("form",{ref:m,method:v,action:b,onSubmit:i?c:t=>{if(c&&c(t),t.defaultPrevented)return;t.preventDefault();let i=t.nativeEvent.submitter,l=i?.getAttribute("formmethod")||s,h=()=>y(i||t.currentTarget,{fetcherKey:n,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f});g&&!1!==r?e.startTransition(()=>h()):h()},...h,"data-discover":w||"render"!==t?void 0:"true"})});function $x(t){let n=e.useContext($k);return Kw(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}jx.displayName="Form";var Fx=0,qx=()=>`__${String(++Fx)}__`;function Bx({basename:t,children:n,location:r="/"}){"string"==typeof r&&(r=Qw(r));let i={pathname:r.pathname||"/",search:r.search||"",hash:r.hash||"",state:null!=r.state?r.state:null,key:r.key||"default",mask:void 0},a={createHref:Ux,encodeLocation:Hx,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}};/* @__PURE__ */
57
+ return e.createElement(fx,{basename:t,children:n,location:i,navigationType:"POP",navigator:a,static:!0,useTransitions:!1})}function Ux(e){return"string"==typeof e?e:Zw(e)}function Hx(e){let t="string"==typeof e?e:Zw(e);t=t.replace(/ $/,"%20");let n=Hw.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:n.pathname,search:n.search,hash:n.hash}}var Wx,Vx=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],Gx=()=>{const e=new URLSearchParams(window.location.search),t={};for(const n of Vx){const r=e.get(n);r&&(t[n.slice(4)]=r)}return Object.keys(t).length>0?t:void 0},Kx=()=>"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,Yx=e=>{Wx=e},Jx=(e,t)=>{Wx?.track(e,t)},Xx=({analytics:e})=>{const t=Jk(),n=x(!0===e?.firstViewCounted);return g(()=>{if(!e?.endpoint||!e.key)return;const t=((e,t=20,n=5e3)=>{const r=[],i=`${e.endpoint.replace(/\/+$/,"")}/batch?k=${encodeURIComponent(e.key)}`;let a;const o=()=>{0!==r.length&&(e=>{const t=JSON.stringify({events:e});"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(i,t)||fetch(i,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:t,keepalive:!0,mode:"no-cors"}).catch(()=>{})})(r.splice(0,r.length))},s=e=>{r.push(e),r.length>=t&&o()},l=()=>({path:window.location.pathname,title:document.title||void 0});return"undefined"!=typeof window&&(a=setInterval(o,n),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&o()}),window.addEventListener("pagehide",o)),{trackRender:()=>{s({id:Kx(),type:"render",ts:Date.now(),page:l(),ref:{referrer:document.referrer||void 0,utm:Gx()}})},track:(e,t)=>{s({id:Kx(),type:"interaction",ts:Date.now(),page:l(),name:e,props:t})},flush:o,stop:()=>{a&&(clearInterval(a),a=void 0),o()}}})(e);return Yx(t),()=>{Yx(void 0),t.stop()}},[e]),g(()=>{n.current?n.current=!1:Wx?.trackRender()},[t.pathname,t.search]),null},Zx=W("AuthContext",{}),Qx=({server:e,routerLocation:t})=>{let n=k(()=>typeof window<"u"?window.location:ar(e,"location",{pathname:"/"}),[e]),r=k(()=>{if(!t)return n;let{origin:e,host:r,hostname:i,protocol:a,href:o}=n,{pathname:s,search:l}=t;return{origin:e,host:r,hostname:i,protocol:a,pathname:s,search:l,hash:"",href:e?`${e}${s}${l}`:o}},[n,t]),i=k(()=>function(e){!e&&typeof window<"u"&&(e=window.location.search);let t={};if(!e||0===e.length)return t;let n=e.replace("?","").split("&");for(let r=0;r<n.length;r++){let e=n[r].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}(r.search),[r.search]),a=k(()=>r.hostname?r.hostname:"localhost",[r.hostname]),o=r.origin||"";return k(()=>({queryParams:i,hostname:a,origin:o,location:r}),[i,a,o,r])},eS=({authenticated:e,user:t})=>{let n=t?.details,r={authenticated:!0===e};return n?{...r,email:n.email,username:n.username,roles:n.roles}:r},tS=["wheel","touchmove","keydown","pointerdown"],nS=e=>{const t=document.getElementById(e);return t?.scrollIntoView({block:"start"}),null!==t},rS=({children:e,currentPageId:t})=>{const{server:n}=f(Ec),r=Nt(),{renderMode:i,previewMode:a,environment:o}=X(),[[s,l,c,u,d]]=zt(["schema.pageFolders","pageDefinitions","schema.variables","schema.flags","flags.overrides"]),p=n.ssr?.renderResult,m="widget"!==i?Jk():void 0,{queryParams:y,hostname:b,origin:v,location:w}=Qx({server:n,routerLocation:m}),S=x(l);S.current=l;const T=x(s);T.current=s;const{authenticated:C,user:A}=f(Zx),E="widget"!==i?Qk():void 0,O=x(E);g(()=>{O.current=E},[E]);const N=k(()=>tu(l,s,C,n.basePath,a),[l,s,C,n.basePath,a]),{action:M,pageId:P="",pathMatch:L}=k(()=>"widget"===i?{action:{type:"normal",path:""},pageId:t}:nu(N,w.pathname,C),[N,w.pathname,C,i,t]),D=t||P;(({hash:e,navigationKey:t,enabled:n})=>{g(()=>{const t=(e=>{const t=e.replace(/^#/,"");try{return decodeURIComponent(t)}catch{return t}})(e);if(!n||!t||"undefined"==typeof document||nS(t))return;const r=new AbortController,i=new MutationObserver(()=>{nS(t)&&r.abort()}),a=setTimeout(()=>r.abort(),3e3);return r.signal.addEventListener("abort",()=>{i.disconnect(),clearTimeout(a)}),i.observe(document.body,{childList:!0,subtree:!0}),tS.forEach(e=>window.addEventListener(e,()=>r.abort(),{once:!0,passive:!0,signal:r.signal})),()=>r.abort()},[e,t,n])})({hash:m?.hash??"",navigationKey:m?.key,enabled:a&&"widget"!==i}),g(()=>{Hl.info("navigation",/* @__PURE__ */_("span",{children:["Navigated to page"," ",
58
+ /* @__PURE__ */I("b",{children:ar(l,`${D}.attributes.name`,D||"Unknown")})]}),{status:M.type,elementId:D})},[M.type,D,l]);const z=h(e=>Qc(S.current,T.current,e),[]),R=h((e,t=!1)=>{if(t&&"undefined"!=typeof window)return void(window.location.href=e);const n=z(e);if(!r.get("rsc.enabled"))return void O.current?.(n);const i=()=>O.current?.(n);Promise.race([ou(r,void 0,void 0,n),new Promise(e=>setTimeout(e,1500))]).then(i,i)},[z,r]),j=k(()=>{const e=N.find(e=>e.pageId===D&&!e.isRaw);return e?{...ru(e.path).reduce((e,t)=>({...e,[t]:""}),{}),...ar(L,"params",{})}:ar(L,"params",{})},[N,L,D]),$=ic(j),F=ic(y),q=k(()=>new URLSearchParams(w.search),[w.search]),B=v?`${v}${w.pathname}${w.search}`:"";Rt(["navigation.urlSearchParams","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId","navigation.navigate"],[q,$,F,b,v,B,D,R],{raw:!0});const U=Object.hasOwn(l,D)?l[D].definition.flag:void 0,H=void 0!==U&&!rc(U,nc(tc(u,{environment:o,hostname:b,routeParams:$,queryParams:F,user:eS({authenticated:C,user:A})},d)));if("notFound"===M.type||H)return p&&(p.status=404),"Not Found";if("accessDenied"===M.type)return p&&(p.status=403),"Access Denied";if("redirect"===M.type){const e=Fl(c,{queryParams:y,routeParams:$,hostname:b,environment:o}),t=M.path?String(Fn(M.path,{variables:e},!1,!0)):"";if(t&&Kc(t)){const e=new URL(t);return e.searchParams.has("redirect")||e.searchParams.set("redirect",(e=>e.href?e.href:`${e.protocol||"https:"}//${e.host||e.hostname}${e.pathname}${e.search}`)(w)),p?(p.redirect=e.toString(),null):(window.location.assign(e.toString()),null)}return p?(p.redirect=M.path??"",null):/* @__PURE__ */I(px,{to:M.path??"",replace:!0})}return e},iS=(e,{src:t,type:n,isMain:r},i=!1)=>{let a,o=`${e}/${t}`,s=btoa(o);return a="style"===n&&o.endsWith(".css")?{type:"link",id:s,params:{href:o,rel:"stylesheet",type:"text/css"},isMain:r}:{type:"script",id:s,params:{src:o,type:"text/javascript"},isMain:r},i&&delete a.isMain,a},aS=(e,t)=>{try{let{resource:n,settings:r,type:i}=e,{definition:{name:a="Plitzi's Demo Plugin",owner:o="Plitzi",verified:s=!1,license:l="MIT",website:c="https://plitzi.com",backgroundColor:u="#4422ee",icon:d="https://cdn.plitzi.com/resources/img/favicon.svg"},assets:p,assetsSettings:f,pluginSchema:h}=t;return Object.values(ar(t,"pluginSchema",{})).reduce((e,m)=>{let{definition:g,builder:y,defaultStyle:b,attributes:v}=m,w=[];return g.type===i&&(w=Object.keys(pr(h,[i]))),{...e,[g.type]:{attributes:v,builder:y,defaultStyle:b,definition:g,market:{owner:o,verified:s,license:l,website:c,backgroundColor:u,icon:d,category:a},resource:n,isMain:g.type===i,manifest:t,type:i,settings:r,assetsSettings:Object.values(f).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>iS(n,e,!0)),assets:Object.values(p).filter(({src:e})=>!!e&&[".css",".js",".mjs",".cjs"].some(t=>e.endsWith(t))).map(e=>iS(n,e)),subPlugins:w}}},{})}catch{return{}}},oS=async(e=[])=>{let t={};if(!Array.isArray(e))return t;let n=await(async e=>{if(!Array.isArray(e)||0===e.length)return{};let t=e.map(e=>(async e=>{try{let t=await fetch(e,{headers:{Accept:"application/json"}});return t.ok?await t.json():void 0}catch{return}})(e));return(await Promise.allSettled(t)).reduce((e,t)=>"fulfilled"===t.status&&t.value?{...e,[ar(t.value,"root","")]:t.value}:e,{})})(e.filter(e=>e.resource).reduce((e,t)=>[...e,`${t.resource}/plugin-manifest.json`],[]));return e.forEach(e=>{let{type:r}=e,i=ar(n,r);t={...t,...aS(e,i)}}),t},sS=class extends Error{failure;statusCode;constructor(e,t,n){super(e),this.name="GraphqlRequestError",this.failure=t,this.statusCode=n}},lS=({children:e,server:t,revision:n,webKey:r="",webId:i,userKey:a="",instanceId:o,offlineMode:s=!1,offlineData:l,offlineDataType:c="json"})=>{const{environment:u,debugMode:d}=X(),p=$t(),m=s&&!!l&&!!l.schema,y=k(()=>((e,t)=>({request:async(n,r)=>{let i;try{i=await fetch(e,{method:"POST",headers:{accept:"application/graphql-response+json, application/json;q=0.9","content-type":"application/json","sdk-version":"0.38.4",authorization:t?`Bearer ${t}`:""},body:JSON.stringify({query:n,variables:r})})}catch(sO){throw new sS(sO instanceof Error?sO.message:"Network request failed","network")}const a=(e=>{try{return JSON.parse(e)}catch{return}})(await i.text());if(!i.ok){const t=Qr(i.status,a);throw t&&Xr({reason:t,url:e}),new sS(`Response not successful: Received status code ${i.status}`,"http",i.status)}const o=(e=>{const t=er(e)?e.errors:void 0;return Array.isArray(t)?t.map(e=>er(e)&&"string"==typeof e.message?e.message:"Unknown error"):[]})(a);if(o.length)throw new sS(o.join("\n"),"graphql",i.status);if(!er(a)||!er(a.data))throw new sS("The server answered without data","graphql",i.status);return a.data}}))(t.serverUrl,r),[t.serverUrl,r]),[b,v]=S(!(s&&l)),[w,x]=S(void 0),{components:T}=f(jr),[C,A]=S(()=>m&&"json"===c?{...l,plugins:{}}:{plugins:{}}),E=h(async(e,t)=>{try{return{success:!0,result:await y.request(Pc[e],{environment:u,...t})}}catch(sO){return{success:!1,result:void 0,error:sO instanceof Error?sO:String(sO)}}},[y,u]),O=h(async(e,t,n=!0)=>{const r=Mc[e];if(!r)return{success:!1,result:void 0,error:"Mutation Not Found"};try{return{success:!0,result:await y.request(r,n?{environment:u,...t}:t)}}catch(sO){return{success:!1,result:void 0,error:sO instanceof Error?sO:String(sO)}}},[y,u]),N=async()=>{let e=n;"number"==typeof n&&0!==n||(e=void 0);const t=await E("Init",{environment:u,revision:e});if(t.error)return v(!1),void x((e=>e instanceof sS?401===e.statusCode?"Access not authorized":"network"===e.failure?"Service not available":e.message:"string"==typeof e?e:e.message)(t.error));if(t.success&&t.result){const{Space:e}=lr(t.result);if(!e)return x(/* @__PURE__ */_("span",{children:["Space not found, publish to ",
59
+ /* @__PURE__ */I("b",{children:u})," environment"]})),void v(!1);let n={};e.plugins.length>0&&(n=await oS(e.plugins.filter(e=>!T.current[e.type]))),p("render.overQuota",e.render?.overQuota??!1),A({schema:{...Tc,...Nc(e.schema)},plugins:n,style:e.style})}v(!1)};g(()=>{s&&l?m&&(async()=>{let e={};l?.plugins&&l.plugins.length>0&&(e=await oS(l.plugins.filter(e=>!T.current[e.type]))),A(t=>({...t,plugins:e})),v(!1)})():(v(e=>e||!0),N())},[m,s&&c,r,u,d]);const M=k(()=>({query:E,mutate:O,webKey:r,webId:i,server:t,environment:u,instanceId:o,userKey:a}),[E,O,r,i,t,u,o,a]);return w?/* @__PURE__ */I("div",{children:w}):b?null:/* @__PURE__ */I(Ec,{value:M,children:/* @__PURE__ */I(Ic,{value:C,children:e})})},cS=W("PluginsContext",{assets:{}}),uS=({children:e,plugins:t,sdkStylePath:n="./plitzi-sdk.css"})=>{const{renderMode:r}=X(),[i,a]=S({}),o=f(Ic),s=k(()=>t||o.plugins,[t,o]),{components:l}=f(jr),c=h((e,t,n="")=>t?ar(s,`${e}.settings.${t}`,n):ar(s,`${e}.settings`,{}),[s]),u=h((e=[])=>{const t=e.reduce((e,t)=>{let n="";return n="script"===t.type?t.params.src:t.params.href,n?(n=btoa(n),{...e,[n]:{...t,key:n}}):e},{});0!==Object.keys(t).length&&a(e=>({...e,...t}))},[]),d=h((e=[])=>{const t=e.filter(e=>!function(e){return null==e||"number"!=typeof e&&"boolean"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e&&("string"==typeof e||Array.isArray(e)?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"==typeof e&&0===Object.keys(e).length)}(e)).map(e=>btoa(e));a(e=>pr(e,t))},[]),p=k(()=>(e=>Object.values(e).reduce((e,t)=>({...e,...ar(t,"assets",[]).filter(e=>"link"===e.type).reduce((e,t)=>({...e,[btoa(t.id)]:t}),{})}),{}))(s),[s]),m=k(()=>Object.keys(l.current).filter(e=>"local-custom"===l.current[e].origin).reduce((e,t)=>({...e,...ar(l,`${t}.assets`,[]).reduce((e,n,r)=>({...e,[`${t}-${r}`]:{type:"link",id:`${t}-${r}`,params:n}}),{})}),{}),[l.current]),g=k(()=>{const e={};return"iframe"!==r&&"shadow"!==r||(e["static-99"]={type:"link",id:"static-99",params:{type:"text/css",href:n,rel:"stylesheet"}}),{...e,...m,...p,...i}},[m,p,i,r,n]),y=k(()=>({assets:g,getSettings:c,plugins:s,registerCustomAssets:u,unregisterCustomAssets:d}),[g,c,s,u,d]),b=k(()=>Object.values({...p,...i}).map((e,t)=>/* @__PURE__ */I(e.type,{...e.params},t)),[p,i]);/* @__PURE__ */
60
+ return _(E,{children:[/* @__PURE__ */I(Ip,{children:("raw"===r||"widget"===r)&&b}),/* @__PURE__ */I(cS,{value:y,children:e})]})},dS=({children:e,schema:t})=>{const n=f(Ic),r=k(()=>({...Tc,...t||n.schema}),[t,n.schema]);Rt("schema",r);const i=k(()=>sr(ar(r,"flat",{}),ar(r,"pages",[])),[r.pages]);return Rt("pageDefinitions",i),e},pS=l({});pS.displayName="ContainerRootContext";var fS=({className:e="",children:t,...n})=>{let r=x(null),i=h(()=>r.current instanceof HTMLElement?r.current.getRootNode():void 0,[r]),a=h(()=>i()instanceof ShadowRoot,[i]),o=k(()=>({getHost:i,rootRef:r,isRootShadow:a}),[i,r,a]);/* @__PURE__ */
61
+ return I("div",{...n,ref:r,className:e,children:/* @__PURE__ */I(pS,{value:o,children:t})})},hS=W("InteractionsContext",{}),mS=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,gS=/^rgba?\(\s*(\d{1,3}%?\s*,\s*){2,3}\d{1,3}%?\s*\)$/,yS=/^hsla?\(\s*\d{1,3}(deg|rad|turn)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|0?\.\d+|1))?\s*\)$/,bS=/* @__PURE__ */new Set(["black","white","red","green","blue","yellow","cyan","magenta","orange","purple","brown","pink","gray","lime","teal","navy","silver","maroon","olive","aqua","fuchsia"]),vS=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),wS=({ref:e,className:t="",ssrMode:r=!1,id:i="",css:a="",style:o,zoom:s=1,assets:l,viewport:c="width=device-width, initial-scale=1",children:u,contentDidMount:d,contentDidDismount:p,contentDidUpdate:f,onLoad:m})=>{t=ps("ContainerFrame",{className:t,componentKey:"root"});let y=x(null);v(e,()=>y.current,[y]);let[b,w]=S(!1),[k,T]=S(null),C=h((e,t,n)=>{let r=[...t.childNodes],i=n.getElementById("customStyle");Object.values(e).forEach(e=>{let a=n.createElement(e.type);e.id&&a.setAttribute("data-id",e.id),Object.keys(e.params).forEach(t=>{("link"===e.type||"script"===e.type)&&a.setAttribute(t,e.params[t])}),r.find(t=>"link"===e.type&&t.href===a.href||"script"===e.type&&t.src===a.src)||(t.insertBefore(a,i),r.push(a))})},[]),A=h((e,t)=>{let{head:n}=e,r=n.querySelectorAll('*:not([asset-static="true"])');Object.values(r).forEach(e=>{n.removeChild(e)}),t&&C(t,n,e)},[C]),[N]=S(()=>(e=>{if(!e)return"";let t=[];return Object.values(e).forEach(e=>{t.push(`<${e.type} ${Object.keys(e.params).map(t=>`${t}="${e.params[t]}"`).join(" ")}>`)}),t.join("")})(l)),M=h(()=>d?.(),[d]);g(()=>{b&&k&&A(k,l)},[b,l,k,A]);let P=h(()=>{let e=y.current&&k,t=y.current?.contentDocument===k;!e||t?b||(m?.(y.current),w(!0),T(y.current?.contentDocument)):T(y.current?.contentDocument)},[b,k,m]);return g(()=>{k&&(k.body.style.zoom=1===s?"":`${s}`)},[k,s]),/* @__PURE__ */_("iframe",{ref:y,className:t,title:"#",srcDoc:`<!DOCTYPE html><html><head>${N}</head><body></body></html>`,id:i,onLoad:P,style:o,children:[b&&k&&O(/* @__PURE__ */_(E,{children:[
62
+ /* @__PURE__ */I("meta",{name:"viewport",content:c,"asset-static":"true"}),!r&&a&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",children:a}),r&&a&&/* @__PURE__ */I("style",{id:"customStyle","asset-static":"true",dangerouslySetInnerHTML:{__html:a}})]}),k.head),b&&k&&u&&O(/* @__PURE__ */I(vS,{contentDidMount:M,contentDidDismount:p,contentDidUpdate:f,children:n.only(u)}),k.body)]})},kS=Object.defineProperty,xS=(e,t)=>{let n={};for(var r in e)kS(n,r,{get:e[r],enumerable:!0});return t||kS(n,Symbol.toStringTag,{value:"Module"}),n},SS=ld(({ref:e,content:t="",className:n=""})=>{let{settings:{previewMode:r}}=sc(),i=h(e=>new Promise((t,n)=>{if(typeof document>"u")return void n(/* @__PURE__ */Error("Document is not available"));let r=document.createElement("script"),i=e.hasAttribute("src");for(let{name:a,value:o}of e.attributes)r.setAttribute(a,o);i?(r.addEventListener("load",()=>t(r)),r.addEventListener("error",n)):r.textContent=e.innerText,e.replaceWith(r),i||t(r)}),[]),a=h(async e=>{if(!e)return;let t=e.querySelectorAll("script"),n=[],r=[];if(t.forEach(e=>{(e.hasAttribute("async")?r:n).push(()=>i(e))}),t.length){for(let e of r)e();for(let e of n)await e()}},[i]);return g(()=>{let t=e?.current;t&&r&&typeof window<"u"&&typeof document<"u"&&a(t)},[a,r,e]),/* @__PURE__ */I(Vd,{ref:e,className:U("plitzi-component__block-html",n,{"block-html--empty":""===t||!t}),dangerouslySetInnerHTML:{__html:t}})}),TS=Object.assign(SS,{type:"blockHtml",content:{attributes:{content:""},definition:{label:"HTML Block",type:"blockHtml",description:"Renders an arbitrary raw HTML string as a block. Escape hatch when no structured element fits.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"HTML Block",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),CS=ld(({ref:e,className:t="",props:n="{}",contentCache:r="",...i})=>{let{id:a,rootId:o,plitziElementLayout:s}=cd(),[l,c]=S(),[u,d]=S(),p=k(()=>({id:a,rootId:o,plitziElementLayout:s}),[a,s,o]),f=k(()=>{let e=pr(i,["content","children"]);if(!n)return e;if("object"==typeof n)return{...n,...e};if("string"!=typeof n)return e;try{return{...JSON.parse(n),...e}}catch(e){console.error(e)}},[n,i]),m=h(async e=>{let t,n;try{e=`data:text/javascript;base64,${e}`,t=await(import(
63
63
  /* @vite-ignore */
64
64
  /* webpackIgnore: true */
65
- e))}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&&(c(void 0),d("Component not found"))}},[l]);return g(()=>{m(r)},[r,m]),/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__block-jsx",t,{"block-jsx--empty":""===r||!r||!l}),children:[!u&&f&&l&&/* @__PURE__ */I(l.default,{internalProps:p,...f}),u&&/* @__PURE__ */_("div",{children:["JSX Malformed ",u]}),!u&&!f&&/* @__PURE__ */I("div",{children:"Settings Malformed"})]})}),SS=Object.assign(xS,{type:"blockJsx",content:{attributes:{content:'import { useCallback } from "react";\nimport { JsxManager } from "@plitzi/plitzi-sdk";\n\nconst BlockJsx = ({ internalProps, content, content2 }) => {\n const handleClick = useCallback(() => {\n alert("Hello World");\n }, []);\n\n return (\n <div style={{ display: "flex", gap: "4px" }}>\n <JsxManager\n as="Heading"\n internalProps={internalProps}\n content={`${content} ${content2}`}\n />\n <button onClick={handleClick} style={{ border: "1px gray solid", cursor: "pointer" }}>\n Click Me\n </button>\n </div>\n );\n};\n\nexport default BlockJsx;',props:'{"content": "Hello", "content2": "World"}',contentCache:"aW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnOwppbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gInJlYWN0IjsKaW1wb3J0IHsgSnN4TWFuYWdlciB9IGZyb20gIkBwbGl0emkvcGxpdHppLXNkayI7CnZhciBCbG9ja0pzeCA9IGZ1bmN0aW9uIEJsb2NrSnN4KF9yZWYpIHsKICB2YXIgaW50ZXJuYWxQcm9wcyA9IF9yZWYuaW50ZXJuYWxQcm9wcywKICAgIGNvbnRlbnQgPSBfcmVmLmNvbnRlbnQsCiAgICBjb250ZW50MiA9IF9yZWYuY29udGVudDI7CiAgdmFyIGhhbmRsZUNsaWNrID0gdXNlQ2FsbGJhY2soZnVuY3Rpb24gKCkgewogICAgYWxlcnQoIkhlbGxvIFdvcmxkIik7CiAgfSwgW10pOwogIHJldHVybiAvKiNfX1BVUkVfXyovUmVhY3QuY3JlYXRlRWxlbWVudCgiZGl2IiwgewogICAgc3R5bGU6IHsKICAgICAgZGlzcGxheTogImZsZXgiLAogICAgICBnYXA6ICI0cHgiCiAgICB9CiAgfSwgLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoSnN4TWFuYWdlciwgewogICAgYXM6ICJIZWFkaW5nIiwKICAgIGludGVybmFsUHJvcHM6IGludGVybmFsUHJvcHMsCiAgICBjb250ZW50OiAiIi5jb25jYXQoY29udGVudCwgIiAiKS5jb25jYXQoY29udGVudDIpCiAgfSksIC8qI19fUFVSRV9fKi9SZWFjdC5jcmVhdGVFbGVtZW50KCJidXR0b24iLCB7CiAgICBvbkNsaWNrOiBoYW5kbGVDbGljaywKICAgIHN0eWxlOiB7CiAgICAgIGJvcmRlcjogIjFweCBncmF5IHNvbGlkIiwKICAgICAgY3Vyc29yOiAncG9pbnRlcicKICAgIH0KICB9LCAiQ2xpY2sgTWUiKSk7Cn07CmV4cG9ydCBkZWZhdWx0IEJsb2NrSnN4Ow==",allowEmptyRender:!1},definition:{label:"Block JSX",type:"blockJsx",description:"A compiled JSX block for advanced authoring.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-code"},defaultStyle:{name:"Block JSX",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),TS=ld(({ref:e,className:t="",renderType:n="",settings:r="{}",isPlugin:i=!1,assets:a="",scriptUrl:o=""})=>{let{id:s,rootId:l}=cd(),{contexts:{PluginsContext:c}}=sc(),{registerCustomAssets:u,unregisterCustomAssets:d}=f(c),{components:p}=f(jr),h=k(()=>{if(!r)return{};try{return JSON.parse(r)}catch{}return!1},[r]),m=!1===h,y=k(()=>({id:s,rootId:l,...m?{}:h}),[s,l,m,h]),b=k(()=>a?a.split("\n").filter(e=>!!e&&""!==e.trim()).map(e=>e.endsWith(".js")?{id:e,type:"script",params:{src:e,type:"text/javascript"}}:{id:e,type:"link",params:{href:e,rel:"stylesheet",type:"text/css"}}):[],[a]);if(g(()=>{if(0!==b.length)return u(b),()=>{d(b.map(e=>"script"===e.type?e.params.url:e.params.href))}},[b,u,d]),i&&o&&!m/* @__PURE__ */)return I(Br,{url:o,internalProps:y,autoRegister:!1});let v=p.current[n];return v&&!m?/* @__PURE__ */I(v,{internalProps:y,extraProps:v.extraProps}):/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__custom",t),children:[n&&!m&&/* @__PURE__ */_("span",{children:["Custom Component ",
66
- /* @__PURE__ */I("b",{children:n})," Not Found"]}),m&&/* @__PURE__ */I("span",{children:"Settings Malformed"}),!n&&/* @__PURE__ */I("span",{children:"Custom Component"})]})}),CS=Object.assign(TS,{type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,assets:"",scriptUrl:""},definition:{label:"Custom",type:"custom",description:"A custom element slot whose behaviour is supplied by a host/plugin component.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),AS=ld(({ref:e,className:t="",subType:n="span",children:r,...i})=>{let a=Ha(i),o=k(()=>Object.fromEntries(Object.entries(a).map(([e,t])=>[e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),t])),[a]);/* @__PURE__ */
67
- return I(Ud,{ref:e,tag:n,className:U(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...o,children:r})}),ES=Object.assign(AS,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"A single raw HTML tag with custom attributes.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),IS=p(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=f(jr),{contexts:{PluginsContext:i}}=sc(),{plugins:a}=f(i);return Hr({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:a})}),_S=({children:e})=>{let{contexts:{InteractionsContext:t}}=sc(),n=f(t),r=k(()=>n.interactionsManager.createChildManager(),[n]),i=k(()=>({...n,interactionsManager:r}),[n,r]);return g(()=>()=>{n.interactionsManager.removeChildManager(r)},[n,r]),/* @__PURE__ */I(t,{value:i,children:e})},OS=(e,t)=>Object.fromEntries(Object.entries(e.props??{}).map(([e,n])=>[e,t[e]??n.default??null])),NS=(e,t)=>U(e,{[xc]:!K(t.visibility)}),MS=({instance:e,instanceId:t,items:n,plitziElementLayout:r,previewMode:i})=>{let a=k(()=>({...e,items:n}),[e,n]);return Cu({id:t,definition:a,plitziElementLayout:r,children:void 0,previewMode:i})},PS=({ref:e,className:t,componentId:n,previewMode:r})=>{let{id:i,attributes:a,definition:o,plitziElementLayout:s,elementState:l,definition:{styleSelectors:c}}=cd(),[u]=Mt("schema.components"),d=k(()=>o.items??[],[o.items]),p=k(()=>d.map(e=>`schema.flat.${e}.attributes.slot`),[d]),[f]=Mt(p),h=b(),m=Object.hasOwn(u,n)?u[n]:void 0,g=k(()=>m?{schema:{flat:m.flat},runtime:{sources:{[Sc]:OS(m,a)}}}:{},[m,a]),y=k(()=>({slots:m?.slots??[],rootId:i,type:"component"}),[m?.slots,i]),v=k(()=>{let e=m?.slots??[],t={};for(let n of e){let a=d.filter((t,r)=>{let i=f[r];return("string"==typeof i?i:e[0])===n});t[n]=/* @__PURE__ */I(MS,{instance:o,instanceId:i,items:a,plitziElementLayout:s,previewMode:r})}return t},[m?.slots,d,f,o,i,s,r]),w=NS(c.base,l),x=k(()=>({id:m?.rootId??"",rootId:i,className:w}),[m?.rootId,i,w]),S=m?m.flat[m.rootId]:void 0,T=S&&/* @__PURE__ */I(_S,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Component:${n}:${i}`,segment:h,value:g,children:/* @__PURE__ */I(Gr,{bodies:v,children:/* @__PURE__ */I(IS,{type:S.definition.type,internalProps:x,plitziElementLayout:y},`${i}_${n}`)})})});return r&&T?T:/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[T,!r&&!S&&/* @__PURE__ */_("div",{className:"reference__label",children:["Component ",n," not found"]})]})},LS=({ref:e,className:t,referenceId:n,previewMode:r})=>{let{id:i,elementState:a,definition:{rootId:o,styleSelectors:s}}=cd(),[l]=Mt(`schema.flat.${n}`),c=l,u=b(),d=NS(s.base,a),p=k(()=>({id:c?.id??"",rootId:o,className:d}),[c?.id,o,d]),f=c&&/* @__PURE__ */I(_S,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Reference:${i}`,segment:u,children:/* @__PURE__ */I(IS,{type:c.definition.type,internalProps:p},`${i}_${n}`)})});return r&&f?f:/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[f,!r&&!c&&/* @__PURE__ */I("div",{className:"reference__label",children:"Element Reference"})]})},DS=ld(({ref:e,className:t="",referenceType:n="element",referenceId:r=""})=>{let{settings:{previewMode:i=!0}}=sc();return"component"===n?/* @__PURE__ */I(PS,{ref:e,className:t,componentId:r,previewMode:i}):/* @__PURE__ */I(LS,{ref:e,className:t,referenceId:r,previewMode:i})}),zS=Object.assign(DS,{type:"reference",content:{attributes:{referenceType:"element",referenceId:""},definition:{label:"Reference",type:"reference",description:"Places one of the components of the space, or renders another of its elements by id, in place.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),RS=({icon:e,className:t})=>e?/* @__PURE__ */I("i",{className:U("plitzi-element-icon",e,t),"aria-hidden":"true"}):null,jS=({content:e="",icon:t="",iconPlacement:n="before",iconClassName:r})=>/* @__PURE__ */_(E,{children:["before"===n&&/* @__PURE__ */I(RS,{icon:t,className:r}),e,"after"===n&&/* @__PURE__ */I(RS,{icon:t,className:r})]}),$S=ld(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",icon:a="",iconPlacement:o="before",subType:s="button",disabled:l=!1,ariaExpanded:c,ariaPressed:u,title:d,label:p})=>{let{settings:{previewMode:f}}=sc(),{definition:{styleSelectors:h}}=cd();/* @__PURE__ */
68
- return _(Ud,{ref:e,tag:"button",type:f?s:"button",className:U("plitzi-component__button",t,{"container--empty--skip":!f&&!n&&(i||a)}),disabled:l,title:d||void 0,"aria-label":p||void 0,"aria-expanded":c,"aria-pressed":u,children:["before"===r&&/* @__PURE__ */I(jS,{content:i,icon:a,iconPlacement:o,iconClassName:h.icon}),n,"after"===r&&/* @__PURE__ */I(jS,{content:i,icon:a,iconPlacement:o,iconClassName:h.icon})]})}),FS=Object.assign($S,{type:"button",attributeValues:{subType:["button","submit","reset"],contentPlacement:["before","after"],iconPlacement:["before","after"]},content:{attributes:{contentPlacement:"after",content:"Button",icon:"",iconPlacement:"before",subType:"button",disabled:!1},definition:{label:"Button",type:"button",description:"A clickable button. On its own it only renders; wire an interaction flow (trigger onClick → callbacks) to make it DO something. Its words are its `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),qS=l(void 0);qS.displayName="DropdownContext";var BS='button, a[href], input, select, textarea, [role="button"]',US=e=>{let t=e?.closest(".plitzi-component__dropdown");return t?[...t.querySelectorAll(BS)].find(t=>!e?.contains(t)):void 0},HS=ld(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=cd(),{settings:{previewMode:f},utils:{getWindow:m}}=sc(),y=x(null),b=x(null),v=k(()=>m(),[m]),w=h(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),T=h(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,C,A,,E]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,closeOnClickOutside:s=!1,offsetX:l=0,offsetY:c=0,myWindow:u,onChange:d})=>{let[p,f]=S(n??!1),[m,y]=S(()=>e?.current?.getBoundingClientRect()),b=k(()=>u||(typeof window<"u"?window:null),[u]),v=h(e=>{if(!(i||a||e.target instanceof Node&&t?.current?.contains(e.target))){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),f(e=>!e)}},[i,a,d,p,n,t]),w=h(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),f(e=>!e)}},[o,i,a,d,p,n]);g(()=>{let t=e?.current;if(!t||typeof window>"u"||!p)return;let n,r=()=>y(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[p,e]);let x=h(e=>{"Escape"===e.key&&(d?.(!p,void 0!==n),f(e=>!e))},[d,p,n]);g(()=>{if(!p||i||!s||!b)return;let r=r=>{let i=r.target instanceof Node?r.target:null;!i||e?.current?.contains(i)||t?.current?.contains(i)||(d?.(!1,void 0===n),void 0===n&&f(!1))};return b.addEventListener("pointerdown",r,!0),()=>b.removeEventListener("pointerdown",r,!0)},[p,i,s,b,e,t,d,n]),g(()=>{if(p&&!i)return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[p,x,i]);let T=h(e=>{if(!m||!b)return;let t=b.innerWidth,n=b.innerHeight,i=0,a=0;switch(r){case"top":i=m.top-e.height,a=m.left;break;case"bottom":default:i=m.bottom,a=m.left;break;case"left":i=m.top,a=m.left-e.width;break;case"right":i=m.top,a=m.right}return"bottom"===r?(i+=c,a+=l):"top"===r?(i-=c,a+=l):"left"===r?(i+=c,a-=l):"right"===r&&(i+=c,a+=l),"bottom"===r||"top"===r?(a+e.width>t?a=m.right-e.width:a<0&&(a=m.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=m.bottom-e.height:i<0&&(i=m.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[m,b,r,c,l]);return Ss(()=>{f(n??!1)},[n]),[p,f,v,w,m,k(()=>{if(!p||!e?.current||!t?.current)return;let n=t.current.getBoundingClientRect();return T(n)},[p,e,t,T])]})({ref:e,popupRef:y,open:i,disabled:!f||u,closeOnClickPopup:s,closeOnClickOutside:o&&!a,placement:r,offsetX:c,offsetY:l,myWindow:v,onChange:T}),O=(({popupRef:e,open:t,positioned:n,enabled:r})=>{let i=x(!1),a=x(t),o=h(e=>{i.current=0===e.detail},[]);return g(()=>{let n=r?US(e.current):void 0;n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",String(t)))}),g(()=>{let o=e.current,s=a.current&&!t;if(a.current=t,r&&o){if(s&&o.contains(o.ownerDocument.activeElement))return void US(o)?.focus({preventScroll:!0});t&&n&&i.current&&!o.contains(o.ownerDocument.activeElement)&&(i.current=!1,o.querySelector(BS)?.focus({preventScroll:!0}))}},[r,t,n,e]),o})({popupRef:y,open:i,positioned:!!E,enabled:!!f&&!u}),N=h(e=>{O(e),C(e)},[O,C]),M=k(()=>({popupRef:y,openPopup:i,parameters:E,onClick:A}),[A,i,E]);/* @__PURE__ */
69
- return _(Ud,{ref:e,className:U("plitzi-component__dropdown",n,{"container--empty--skip":!f&&!t}),onClick:N,children:[/* @__PURE__ */I(qS,{value:M,children:t}),i&&a&&f&&/* @__PURE__ */I("div",{ref:b,className:U("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:w})]})}),WS=ld(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:a,onClick:o}=f(qS);return v(e,()=>r.current??null,[r]),/* @__PURE__ */I(Ud,{ref:r,className:U("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!a}),style:a,onClick:o,children:n})}),VS=Object.assign(WS,{type:"dropdownPopup",ancestorType:"dropdown",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"The floating panel revealed by a dropdown.",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:""},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"light-dark(white, oklch(0.21 0.006 285.885))","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),GS=Object.assign(HS,{type:"dropdown",attributeValues:{popupPlacement:["left","right","top","bottom"]},content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:VS}}),KS=ld(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=cd(),{settings:{previewMode:a},contexts:{BuilderContext:o}}=sc(),s=o?f(o):void 0,l=k(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||a?n:"Heading",[n,a]),c=h(e=>!a&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
70
- return _(Ud,{ref:e,tag:a?r:"div",className:U("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[a&&l,!a&&/* @__PURE__ */I(Up,{value:l,onChange:c,openMode:"doubleClick"})]})}),YS=Object.assign(KS,{type:"heading",attributeValues:{subType:["h1","h2","h3","h4","h5","h6"]},content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"1.158"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"1.125"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"1.25"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"1.333"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"1.429"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"1.5"}}}}}},settings:{}}}),JS=e=>e.length>1?e.replace(/\/+$/,""):e,XS=ld(({ref:e,children:t,className:n="",href:r="#",target:i="self",mode:a="page",hash:o="",label:s="",content:l="",contentPlacement:c="after",icon:u="",iconPlacement:d="before"})=>{let{style:p,definition:{styleSelectors:f}}=cd(),{settings:{previewMode:h}}=sc(),[[m,g,y,b,v,w]]=zt(["pageDefinitions","schema.pageFolders","navigation.routeParams","navigation.queryParams","navigation.navigate","navigation.href"]),x=k(()=>{if("external"===a)return r;if("internal"===a){let e=`/${r}`.replaceAll(/[/]+/gim,"/");try{let t=Fn(e,{...b,...y},!0);return"string"==typeof t?t:e}catch{}return e}return Zc(m,g,r,!0)},[a,r,m,g,b,y]),S="external"!==a&&o?`${x}#${o}`:x,T="external"!==a&&((e,t)=>{if(!t||!e.startsWith("/"))return!1;try{let n=new URL(t).pathname,r=new URL(e,t).pathname;return JS(decodeURI(n))===JS(decodeURI(r))}catch{return!1}})(x,w),C=k(()=>{let t={ref:e,style:p,target:`_${i}`,..."blank"===i?{rel:"noopener noreferrer"}:{},"aria-label":s||void 0,"aria-current":T?"page":void 0,className:U("plitzi-component__link",n)};return h?{...t,href:S}:{...t,"href-disabled":S}},[e,p,i,s,T,n,h,S]);/* @__PURE__ */
71
- return _(Ud,{tag:"a",...C,onClick:e=>{if(!h)return;e.stopPropagation();let t="self"!==i||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button;("page"===a||"internal"===a)&&!t&&(e.preventDefault(),v(S))},children:["before"===c&&/* @__PURE__ */I(jS,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon}),t,"after"===c&&/* @__PURE__ */I(jS,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon})]})}),ZS=Object.assign(XS,{type:"link",attributeValues:{mode:["page","internal","external"],target:["self","blank","parent","top"],contentPlacement:["before","after"],iconPlacement:["before","after"]},content:{attributes:{href:"#",target:"self",mode:"page",hash:"",label:"",content:"",contentPlacement:"after",icon:"",iconPlacement:"before"},definition:{label:"Link",type:"link",description:"Navigation. Moves the user between pages of the site or to an external URL (its `mode`/`href` decide which). Use this to go page-to-page rather than a button + interaction. Its words are its own `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["link"]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-link"},defaultStyle:{name:"Link",displayMode:"desktop",style:{base:{default:{display:"inline-block",color:"#333",cursor:"pointer"}}}},settings:{}}}),QS=ld(({ref:e,content:t="Markdown",className:n=""})=>{let{settings:{previewMode:r}}=sc();/* @__PURE__ */
72
- return I(Ud,{ref:e,className:U("plitzi-component__markdown",{"plitzi-component__markdown--edit-mode":!r},n),children:/* @__PURE__ */I(Rw,{children:t})})}),eT=Object.assign(QS,{type:"markdown",content:{attributes:{content:"Markdown"},definition:{label:"Markdown",type:"markdown",description:"Renders a Markdown source string as formatted HTML.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-markdown"},defaultStyle:{name:"Markdown",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"1.714"}}}},settings:{}}}),tT=ld(({ref:e,content:t="Paragraph",className:n=""})=>{let{id:r}=cd(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=sc(),o=a?f(a):void 0,s=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Paragraph",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
73
- return _(Ud,{ref:e,tag:i?"p":"div",className:U("plitzi-component__paragraph",n),children:[i&&s,!i&&/* @__PURE__ */I(Up,{className:"",value:s,onChange:l,openMode:"doubleClick"})]})}),nT=Object.assign(tT,{type:"paragraph",content:{attributes:{content:"Paragraph"},definition:{label:"Paragraph",type:"paragraph",description:"A block of body text (a <p>). Use for longer prose passages.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paragraph"},defaultStyle:{name:"Paragraph",displayMode:"desktop",style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}},settings:{}}}),rT=/<\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>/gi,iT=/<\s*\/?\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>/gi,aT=/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,oT=/\s(href|src|xlink:href)\s*=\s*(?:"\s*(?:javascript|data|vbscript)\s*:[^"]*"|'\s*(?:javascript|data|vbscript)\s*:[^']*'|(?:javascript|data|vbscript)\s*:[^\s>]*)/gi,sT=e=>e.replace(rT,"").replace(iT,"").replace(aT,"").replace(oT,""),lT=ld(({ref:e,className:t="",content:n="",format:r="html",mediaBaseUrl:i=""})=>{let{settings:{previewMode:a}}=sc(),o=k(()=>"html"===r?((e,t)=>{if(!t)return e;let n=t.replace(/\/+$/,"");return e.replace(/\s(src|href)\s*=\s*"(\/(?!\/)[^"]*)"/gi,(e,t,r)=>` ${t}="${n}${r}"`)})(sT(n),i):"",[r,n,i]);/* @__PURE__ */
74
- return _(Ud,{ref:e,className:U("plitzi-component__rich-text",{"plitzi-component__rich-text--edit-mode":!a},t),children:["html"===r&&/* @__PURE__ */I("div",{dangerouslySetInnerHTML:{__html:o}}),"markdown"===r&&/* @__PURE__ */I(Rw,{children:n}),"text"===r&&/* @__PURE__ */I("div",{className:"plitzi-component__rich-text-plain",children:n})]})}),cT=Object.assign(lT,{type:"richText",attributeValues:{format:["html","markdown","text"]},content:{attributes:{content:"",format:"html",mediaBaseUrl:""},definition:{label:"Rich Text",type:"richText",description:"Renders a body field coming from a CMS — HTML, markdown or plain text. Scripts and event handlers are stripped before rendering, so third-party content cannot execute.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Rich Text",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),uT=ld(({ref:e,content:t="Text",className:n=""})=>{let{id:r}=cd(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=sc(),o=a?f(a):void 0,s=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Text",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
75
- return _(Ud,{ref:e,className:U("plitzi-component__text",n),children:[i&&s,!i&&/* @__PURE__ */I(Up,{className:"focus-visible:outline-hidden",value:s,onChange:l,openMode:"doubleClick"})]})}),dT=Object.assign(uT,{type:"text",content:{attributes:{content:"Text"},definition:{label:"Text",type:"text",description:"Inline plain-text content. Use for short runs of copy; bind its content to data for dynamic text.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Text",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"1.714",display:"inline"}}}},settings:{}}}),pT={type:"themeToggle",attributeValues:{subType:["switch","segmented"]},triggers:{onThemeChange:{action:"onThemeChange",title:"On Theme Change",type:"trigger",params:{},preview:{theme:"dark"}}},content:{attributes:{subType:"switch",lightLabel:"Light",darkLabel:"Dark",systemLabel:"System",showSystem:!1},definition:{label:"Theme Toggle",type:"themeToggle",description:"Lets a visitor choose light or dark. It writes the choice on the document root, where a space stylesheet is already looking for it, and remembers it — so the machine decides until somebody says otherwise. It ships no colours of its own: style it with the space own classes. It shows the icon of the scheme in use by default; key a rule off `data-theme-icon` to change that.",items:[],bindings:{},styleSelectors:{base:"",icon:"",option:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-circle-half-stroke"},defaultStyle:{name:"Theme Toggle",displayMode:"desktop",style:{base:{default:{display:"inline-flex","align-items":"center",cursor:"pointer"}}},subTypes:{}},settings:{}}},fT=()=>()=>{},hT=()=>!0,mT=()=>!1,gT=()=>/* @__PURE__ */_("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[/* @__PURE__ */I("circle",{cx:"12",cy:"12",r:"4.2"}),/* @__PURE__ */I("path",{strokeLinecap:"round",d:"M12 2.6v2.2M12 19.2v2.2M4.2 12H2M22 12h-2.2M6.3 6.3 4.8 4.8M19.2 19.2l-1.5-1.5M17.7 6.3l1.5-1.5M4.8 19.2l1.5-1.5"})]}),yT=()=>/* @__PURE__ */I("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:/* @__PURE__ */I("path",{strokeLinejoin:"round",d:"M20.5 14.3A8.6 8.6 0 0 1 9.7 3.5a8.6 8.6 0 1 0 10.8 10.8Z"})}),bT=ld(({ref:e,className:t="",subType:n="switch",lightLabel:r="Light",darkLabel:i="Dark",systemLabel:a="System",showSystem:o=!1})=>{let{theme:s,setTheme:l,toggleTheme:c}=Gc(),{id:u,definition:{styleSelectors:d}}=cd(),{settings:{previewMode:p},contexts:{InteractionsContext:m}}=sc(),{interactionsManager:y}=f(m),b=T(fT,hT,mT),v=h(e=>t=>{t.preventDefault(),p&&l(e)},[p,l]),w=h(e=>{e.preventDefault(),p&&c()},[p,c]),S=k(()=>[...o?[{value:"system",label:a,icon:null}]:[],{value:"light",label:r,icon:/* @__PURE__ */I(gT,{})},{value:"dark",label:i,icon:/* @__PURE__ */I(yT,{})}],[o,a,r,i]),C=x(null);return g(()=>{let e=C.current;C.current=s,null!==e&&e!==s&&y.interactionTrigger(u,"onThemeChange",{theme:s})},[s,y,u]),"segmented"===n?/* @__PURE__ */I(Ud,{ref:e,tag:"div",role:"group","aria-label":`${r} / ${i}`,className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--segmented",t),interactionTriggers:pT.triggers,children:S.map(e=>/* @__PURE__ */_("button",{type:"button",className:U("plitzi-component__theme-toggle-option",d.option),"data-active":b&&s===e.value?"true":void 0,"aria-pressed":b?s===e.value:void 0,"data-theme-option":e.value,onClick:v(e.value),children:[e.icon,/* @__PURE__ */I("span",{children:e.label})]},e.value))}):/* @__PURE__ */_(Ud,{ref:e,tag:"button",className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--switch",t),interactionTriggers:pT.triggers,type:"button",onClick:w,"aria-label":`${r} / ${i}`,title:`${r} / ${i}`,children:[/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",d.icon),"data-theme-icon":"light",children:/* @__PURE__ */I(gT,{})}),/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",d.icon),"data-theme-icon":"dark",children:/* @__PURE__ */I(yT,{})})]})}),vT=Object.assign(bT,pT),wT={type:"form",attributeValues:{method:["get","post"]},sourceType:"apiContainer",triggers:{onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:{},actionUrl:"",method:""}}},callbacks:{performReset:{action:"performReset",title:"Reset Form",type:"callback",params:{}},setFieldValue:{action:"setFieldValue",title:"Set Field Value",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},value:{type:"text",defaultValue:""}}},setFieldError:{action:"setFieldError",title:"Set Field Error",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},error:{type:"text",defaultValue:""}}}},content:{attributes:{method:"get",actionUrl:"",managedByInteractions:!1,noValidate:!1,errors:{},values:{}},definition:{label:"Form",type:"form",description:"A <form> that groups form controls and handles submission; wire its submit through an interaction flow.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee"},defaultStyle:{name:"Form",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}},kT=ld(({ref:e,className:t="",children:n,method:r="get",actionUrl:i="",managedByInteractions:a=!1,noValidate:o=!1,errors:s=$r,values:l=$r})=>{let[c,u]=S({}),d=x(/* @__PURE__ */new Map),p=x(!1),{id:m,definition:{label:y="Form"},setElementState:b}=cd(),v=jl(wT.sourceType,m),{settings:{previewMode:w},contexts:{InteractionsContext:T}}=sc(),{interactionsManager:C}=f(T),A=h(e=>u(t=>({...t,[e.name]:e})),[u]);g(()=>(p.current=!1,()=>{p.current=!0}),[]);let E=h(e=>{p.current||(u(t=>Rl(t,t=>{t[e]&&delete t[e]})),e&&b(t=>({...t,values:pr(t,`values.${e}`),errors:pr(t,`errors.${e}`)})))},[b]),_=h((e,t)=>{d.current.set(e,t)},[]),O=h(e=>{d.current.delete(e)},[]),N=h((e,t="")=>{e&&(null===t&&(t=""),b(n=>n.errors&&n.errors[e]?{...n,values:{...n.values,[e]:t},errors:pr(n.errors,[e])}:{...n,values:{...n.values,[e]:t}}))},[b]),M=h((e,t)=>{e&&b(n=>t||ar(n,`errors.${e}`)?!t&&n.errors&&n.errors[e]?{...n,errors:pr(n,[`errors.${e}`])}:{...n,errors:{...n.errors,[e]:t}}:n)},[b]),P=h(()=>Object.values(c).filter(e=>!!e.name).reduce((e,t)=>[...e,{path:`fields.${t.name}.id`,name:`${t.name} ID`},{path:`values.${t.name}`,name:`${t.name} Value`},{path:`errors.${t.name}`,name:`${t.name} Error Message`}],[]),[c]),L=k(()=>({runtime:{sources:{form:{errors:s,values:l,registerField:A,unregisterField:E,registerValidator:_,unregisterValidator:O,setFieldValue:N,setFieldError:M},[v]:{values:l,errors:s}}}}),[v,s,l,A,E,_,O,N,M]);$l({id:m,source:v,name:y||`Form - ${m}`,fields:P});let D=k(()=>({onSubmit:{...wT.triggers.onSubmit,preview:{...wT.triggers.onSubmit.preview,values:Object.values(c).reduce((e,t)=>({...e,[t.name]:""}),{})}}}),[c]),z=h(e=>{let t=[...d.current].reduce((e,[t,n])=>{let r=n(l);return r?{...e,[t]:r}:e},{});if(b(e=>({...e,errors:t})),Object.keys(t).length>0)return e.stopPropagation(),void e.preventDefault();if(!a||(e.stopPropagation(),e.preventDefault(),!w))return;let n=Object.values(c).reduce((e,{name:t})=>({...e,[t]:l[t]}),{});C.interactionTrigger(m,"onSubmit",{values:n,actionUrl:i,method:r})},[b,a,w,c,C,m,i,r,l]),R=h(e=>{a&&(e instanceof Event&&(e.stopPropagation(),e.preventDefault()),b(e=>({...e,values:{},errors:{}})))},[b,a]),j=h(e=>{let{name:t,value:n}=e;N(t,n)},[N]),$=h(e=>{let{name:t,error:n}=e;M(t,n)},[M]),F=k(()=>{let{performReset:e,setFieldValue:t,setFieldError:n}=wT.callbacks,r=Object.values(c).map(e=>({value:e.name,label:e.name}));return{performReset:{...e,title:`Reset ${y}`,callback:R},setFieldValue:{...t,title:`Set Field Value ${y}`,callback:j,params:{...t.params,name:{...t.params.name,options:r}}},setFieldError:{...n,title:`Set Field Error ${y}`,callback:$,params:{...n.params,name:{...n.params.name,options:r}}}}},[y,R,j,c,$]);/* @__PURE__ */
76
- return I(Ud,{tag:"form",ref:e,noValidate:o,method:r,className:U("plitzi-component__form",t),interactionTriggers:D,interactionCallbacks:F,onSubmit:z,onReset:R,action:i,children:/* @__PURE__ */I(At,{inherit:"live",name:`Form:${m}`,value:L,children:n})})}),xT=e=>/* @__PURE__ */_("svg",{...e,viewBox:"0 0 19 18",fill:"none",children:[
65
+ e))}catch(e){e instanceof Error&&(n=e.message)}finally{d(n),t&&t.default?c(t):l&&(c(void 0),d("Component not found"))}},[l]);return g(()=>{m(r)},[r,m]),/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__block-jsx",t,{"block-jsx--empty":""===r||!r||!l}),children:[!u&&f&&l&&/* @__PURE__ */I(l.default,{internalProps:p,...f}),u&&/* @__PURE__ */_("div",{children:["JSX Malformed ",u]}),!u&&!f&&/* @__PURE__ */I("div",{children:"Settings Malformed"})]})}),AS=Object.assign(CS,{type:"blockJsx",content:{attributes:{content:'import { useCallback } from "react";\nimport { JsxManager } from "@plitzi/plitzi-sdk";\n\nconst BlockJsx = ({ internalProps, content, content2 }) => {\n const handleClick = useCallback(() => {\n alert("Hello World");\n }, []);\n\n return (\n <div style={{ display: "flex", gap: "4px" }}>\n <JsxManager\n as="Heading"\n internalProps={internalProps}\n content={`${content} ${content2}`}\n />\n <button onClick={handleClick} style={{ border: "1px gray solid", cursor: "pointer" }}>\n Click Me\n </button>\n </div>\n );\n};\n\nexport default BlockJsx;',props:'{"content": "Hello", "content2": "World"}',contentCache:"aW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnOwppbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gInJlYWN0IjsKaW1wb3J0IHsgSnN4TWFuYWdlciB9IGZyb20gIkBwbGl0emkvcGxpdHppLXNkayI7CnZhciBCbG9ja0pzeCA9IGZ1bmN0aW9uIEJsb2NrSnN4KF9yZWYpIHsKICB2YXIgaW50ZXJuYWxQcm9wcyA9IF9yZWYuaW50ZXJuYWxQcm9wcywKICAgIGNvbnRlbnQgPSBfcmVmLmNvbnRlbnQsCiAgICBjb250ZW50MiA9IF9yZWYuY29udGVudDI7CiAgdmFyIGhhbmRsZUNsaWNrID0gdXNlQ2FsbGJhY2soZnVuY3Rpb24gKCkgewogICAgYWxlcnQoIkhlbGxvIFdvcmxkIik7CiAgfSwgW10pOwogIHJldHVybiAvKiNfX1BVUkVfXyovUmVhY3QuY3JlYXRlRWxlbWVudCgiZGl2IiwgewogICAgc3R5bGU6IHsKICAgICAgZGlzcGxheTogImZsZXgiLAogICAgICBnYXA6ICI0cHgiCiAgICB9CiAgfSwgLyojX19QVVJFX18qL1JlYWN0LmNyZWF0ZUVsZW1lbnQoSnN4TWFuYWdlciwgewogICAgYXM6ICJIZWFkaW5nIiwKICAgIGludGVybmFsUHJvcHM6IGludGVybmFsUHJvcHMsCiAgICBjb250ZW50OiAiIi5jb25jYXQoY29udGVudCwgIiAiKS5jb25jYXQoY29udGVudDIpCiAgfSksIC8qI19fUFVSRV9fKi9SZWFjdC5jcmVhdGVFbGVtZW50KCJidXR0b24iLCB7CiAgICBvbkNsaWNrOiBoYW5kbGVDbGljaywKICAgIHN0eWxlOiB7CiAgICAgIGJvcmRlcjogIjFweCBncmF5IHNvbGlkIiwKICAgICAgY3Vyc29yOiAncG9pbnRlcicKICAgIH0KICB9LCAiQ2xpY2sgTWUiKSk7Cn07CmV4cG9ydCBkZWZhdWx0IEJsb2NrSnN4Ow==",allowEmptyRender:!1},definition:{label:"Block JSX",type:"blockJsx",description:"A compiled JSX block for advanced authoring.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-code"},defaultStyle:{name:"Block JSX",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),ES=ld(({ref:e,className:t="",renderType:n="",settings:r="{}",isPlugin:i=!1,assets:a="",scriptUrl:o=""})=>{let{id:s,rootId:l}=cd(),{contexts:{PluginsContext:c}}=sc(),{registerCustomAssets:u,unregisterCustomAssets:d}=f(c),{components:p}=f(jr),h=k(()=>{if(!r)return{};try{return JSON.parse(r)}catch{}return!1},[r]),m=!1===h,y=k(()=>({id:s,rootId:l,...m?{}:h}),[s,l,m,h]),b=k(()=>a?a.split("\n").filter(e=>!!e&&""!==e.trim()).map(e=>e.endsWith(".js")?{id:e,type:"script",params:{src:e,type:"text/javascript"}}:{id:e,type:"link",params:{href:e,rel:"stylesheet",type:"text/css"}}):[],[a]);if(g(()=>{if(0!==b.length)return u(b),()=>{d(b.map(e=>"script"===e.type?e.params.url:e.params.href))}},[b,u,d]),i&&o&&!m/* @__PURE__ */)return I(Br,{url:o,internalProps:y,autoRegister:!1});let v=p.current[n];return v&&!m?/* @__PURE__ */I(v,{internalProps:y,extraProps:v.extraProps}):/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__custom",t),children:[n&&!m&&/* @__PURE__ */_("span",{children:["Custom Component ",
66
+ /* @__PURE__ */I("b",{children:n})," Not Found"]}),m&&/* @__PURE__ */I("span",{children:"Settings Malformed"}),!n&&/* @__PURE__ */I("span",{children:"Custom Component"})]})}),IS=Object.assign(ES,{type:"custom",content:{attributes:{renderType:"",settings:"{}",isPlugin:!1,assets:"",scriptUrl:""},definition:{label:"Custom",type:"custom",description:"A custom element slot whose behaviour is supplied by a host/plugin component.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paintbrush"},defaultStyle:{name:"Custom Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),_S=ld(({ref:e,className:t="",subType:n="span",children:r,...i})=>{let a=Ha(i),o=k(()=>Object.fromEntries(Object.entries(a).map(([e,t])=>[e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),t])),[a]);/* @__PURE__ */
67
+ return I(Vd,{ref:e,tag:n,className:U(`plitzi-component__node-html plitzi-component__node-html-${n}`,t),...o,children:r})}),OS=Object.assign(_S,{type:"nodeHtml",content:{attributes:{subType:"div"},definition:{label:"Html Node",type:"nodeHtml",description:"A single raw HTML tag with custom attributes.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-html5"},defaultStyle:{name:"Html Node",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hr:{name:"HR Node",displayMode:"desktop",style:{base:{default:{"border-top-width":"1px"}}}}}},settings:{}}}),NS=p(({plitziElementLayout:e,type:t="",internalProps:n})=>{let{components:r}=f(jr),{contexts:{PluginsContext:i}}=sc(),{plugins:a}=f(i);return Hr({type:t,internalProps:{...n,plitziElementLayout:e},plitziElementLayout:e,components:r.current,plugins:a})}),MS=({children:e})=>{let{contexts:{InteractionsContext:t}}=sc(),n=f(t),r=k(()=>n.interactionsManager.createChildManager(),[n]),i=k(()=>({...n,interactionsManager:r}),[n,r]);return g(()=>()=>{n.interactionsManager.removeChildManager(r)},[n,r]),/* @__PURE__ */I(t,{value:i,children:e})},PS=(e,t)=>Object.fromEntries(Object.entries(e.props??{}).map(([e,n])=>[e,t[e]??n.default??null])),LS=(e,t)=>U(e,{[xc]:!K(t.visibility)}),DS=({instance:e,instanceId:t,items:n,plitziElementLayout:r,previewMode:i})=>{let a=k(()=>({...e,items:n}),[e,n]);return Cu({id:t,definition:a,plitziElementLayout:r,children:void 0,previewMode:i})},zS=({ref:e,className:t,componentId:n,previewMode:r})=>{let{id:i,attributes:a,definition:o,plitziElementLayout:s,elementState:l,definition:{styleSelectors:c}}=cd(),[u]=Mt("schema.components"),d=k(()=>o.items??[],[o.items]),p=k(()=>d.map(e=>`schema.flat.${e}.attributes.slot`),[d]),[f]=Mt(p),h=b(),m=Object.hasOwn(u,n)?u[n]:void 0,g=k(()=>m?{schema:{flat:m.flat},runtime:{sources:{[Sc]:PS(m,a)}}}:{},[m,a]),y=k(()=>({slots:m?.slots??[],rootId:i,type:"component"}),[m?.slots,i]),v=k(()=>{let e=m?.slots??[],t={};for(let n of e){let a=d.filter((t,r)=>{let i=f[r];return("string"==typeof i?i:e[0])===n});t[n]=/* @__PURE__ */I(DS,{instance:o,instanceId:i,items:a,plitziElementLayout:s,previewMode:r})}return t},[m?.slots,d,f,o,i,s,r]),w=LS(c.base,l),x=k(()=>({id:m?.rootId??"",rootId:i,className:w}),[m?.rootId,i,w]),S=m?m.flat[m.rootId]:void 0,T=S&&/* @__PURE__ */I(MS,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Component:${n}:${i}`,segment:h,value:g,children:/* @__PURE__ */I(Gr,{bodies:v,children:/* @__PURE__ */I(NS,{type:S.definition.type,internalProps:x,plitziElementLayout:y},`${i}_${n}`)})})});return r&&T?T:/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[T,!r&&!S&&/* @__PURE__ */_("div",{className:"reference__label",children:["Component ",n," not found"]})]})},RS=({ref:e,className:t,referenceId:n,previewMode:r})=>{let{id:i,elementState:a,definition:{rootId:o,styleSelectors:s}}=cd(),[l]=Mt(`schema.flat.${n}`),c=l,u=b(),d=LS(s.base,a),p=k(()=>({id:c?.id??"",rootId:o,className:d}),[c?.id,o,d]),f=c&&/* @__PURE__ */I(MS,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Reference:${i}`,segment:u,children:/* @__PURE__ */I(NS,{type:c.definition.type,internalProps:p},`${i}_${n}`)})});return r&&f?f:/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__reference",t,{"reference--build-mode":!r}),children:[f,!r&&!c&&/* @__PURE__ */I("div",{className:"reference__label",children:"Element Reference"})]})},jS=ld(({ref:e,className:t="",referenceType:n="element",referenceId:r=""})=>{let{settings:{previewMode:i=!0}}=sc();return"component"===n?/* @__PURE__ */I(zS,{ref:e,className:t,componentId:r,previewMode:i}):/* @__PURE__ */I(RS,{ref:e,className:t,referenceId:r,previewMode:i})}),$S=Object.assign(jS,{type:"reference",content:{attributes:{referenceType:"element",referenceId:""},definition:{label:"Reference",type:"reference",description:"Places one of the components of the space, or renders another of its elements by id, in place.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-asterisk"},defaultStyle:{name:"Reference Element",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),FS=({icon:e,className:t})=>e?/* @__PURE__ */I("i",{className:U("plitzi-element-icon",e,t),"aria-hidden":"true"}):null,qS=({content:e="",icon:t="",iconPlacement:n="before",iconClassName:r})=>/* @__PURE__ */_(E,{children:["before"===n&&/* @__PURE__ */I(FS,{icon:t,className:r}),e,"after"===n&&/* @__PURE__ */I(FS,{icon:t,className:r})]}),BS=ld(({ref:e,className:t="",children:n,contentPlacement:r="after",content:i="Button",icon:a="",iconPlacement:o="before",subType:s="button",disabled:l=!1,ariaExpanded:c,ariaPressed:u,controls:d,title:p,label:f})=>{let{settings:{previewMode:h}}=sc(),{definition:{styleSelectors:m}}=cd();/* @__PURE__ */
68
+ return _(Vd,{ref:e,tag:"button",type:h?s:"button",className:U("plitzi-component__button",t,{"container--empty--skip":!h&&!n&&(i||a)}),disabled:l,title:p||void 0,"aria-label":f||void 0,"aria-expanded":c,"aria-pressed":u,"aria-controls":d||void 0,children:["before"===r&&/* @__PURE__ */I(qS,{content:i,icon:a,iconPlacement:o,iconClassName:m.icon}),n,"after"===r&&/* @__PURE__ */I(qS,{content:i,icon:a,iconPlacement:o,iconClassName:m.icon})]})}),US=Object.assign(BS,{type:"button",attributeValues:{subType:["button","submit","reset"],contentPlacement:["before","after"],iconPlacement:["before","after"]},content:{attributes:{contentPlacement:"after",content:"Button",icon:"",iconPlacement:"before",subType:"button",disabled:!1},definition:{label:"Button",type:"button",description:"A clickable button. On its own it only renders; wire an interaction flow (trigger onClick → callbacks) to make it DO something. Its words are its `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-stop"},defaultStyle:{name:"Button",displayMode:"desktop",style:{base:{default:{}}},subTypes:{button:{name:"Default Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},reset:{name:"Reset Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}},submit:{name:"Submit Button",displayMode:"desktop",style:{base:{default:{"padding-top":"6px","padding-left":"12px","padding-right":"12px","padding-bottom":"6px",cursor:"pointer","font-size":"16px","line-height":"1.5","border-top-left-radius":"4px","border-top-right-radius":"4px","border-bottom-left-radius":"4px","border-bottom-right-radius":"4px"}}}}}},settings:{}}}),HS=l(void 0);HS.displayName="DropdownContext";var WS='button, a[href], input, select, textarea, [role="button"]',VS=e=>{let t=e?.closest(".plitzi-component__dropdown");return t?[...t.querySelectorAll(WS)].find(t=>!e?.contains(t)):void 0},GS=ld(({ref:e,children:t,className:n="",popupPlacement:r="bottom",openPopup:i=!1,backgroundDisabled:a=!1,closeOnClickBackground:o=!0,closeOnClickPopup:s=!0,containerTopOffset:l=5,containerLeftOffset:c=5,disabled:u=!1})=>{let{setElementState:d,definition:{styleSelectors:p}}=cd(),{settings:{previewMode:f},utils:{getWindow:m}}=sc(),y=x(null),b=x(null),v=k(()=>m(),[m]),w=h(e=>{o&&(e.stopPropagation(),e.preventDefault(),d(e=>({...e,openPopup:!1})))},[o,d]),T=h(e=>{d(t=>({...t,openPopup:e}))},[d]),[,,C,A,,E]=(({ref:e,popupRef:t,open:n,placement:r="bottom",disabled:i=!1,loading:a=!1,closeOnClickPopup:o=!0,closeOnClickOutside:s=!1,offsetX:l=0,offsetY:c=0,myWindow:u,onChange:d})=>{let[p,f]=S(n??!1),[m,y]=S(()=>e?.current?.getBoundingClientRect()),b=k(()=>u||(typeof window<"u"?window:null),[u]),v=h(e=>{if(!(i||a||e.target instanceof Node&&t?.current?.contains(e.target))){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),f(e=>!e)}},[i,a,d,p,n,t]),w=h(e=>{if(!i&&!a&&o){if(e.stopPropagation(),e.preventDefault(),void 0!==n)return void d?.(!p,!1);d?.(!p,!0),f(e=>!e)}},[o,i,a,d,p,n]);g(()=>{let t=e?.current;if(!t||typeof window>"u"||!p)return;let n,r=()=>y(e.current?.getBoundingClientRect());return typeof ResizeObserver<"u"&&(n=new ResizeObserver(r),n.observe(t)),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{n?.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[p,e]);let x=h(e=>{"Escape"===e.key&&(d?.(!p,void 0!==n),f(e=>!e))},[d,p,n]);g(()=>{if(!p||i||!s||!b)return;let r=r=>{let i=r.target instanceof Node?r.target:null;!i||e?.current?.contains(i)||t?.current?.contains(i)||(d?.(!1,void 0===n),void 0===n&&f(!1))};return b.addEventListener("pointerdown",r,!0),()=>b.removeEventListener("pointerdown",r,!0)},[p,i,s,b,e,t,d,n]),g(()=>{if(p&&!i)return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[p,x,i]);let T=h(e=>{if(!m||!b)return;let t=b.innerWidth,n=b.innerHeight,i=0,a=0;switch(r){case"top":i=m.top-e.height,a=m.left;break;case"bottom":default:i=m.bottom,a=m.left;break;case"left":i=m.top,a=m.left-e.width;break;case"right":i=m.top,a=m.right}return"bottom"===r?(i+=c,a+=l):"top"===r?(i-=c,a+=l):"left"===r?(i+=c,a-=l):"right"===r&&(i+=c,a+=l),"bottom"===r||"top"===r?(a+e.width>t?a=m.right-e.width:a<0&&(a=m.left),i=Math.max(0,Math.min(n-e.height,i))):"left"===r||"right"===r?(i+e.height>n?i=m.bottom-e.height:i<0&&(i=m.top),a=Math.max(0,Math.min(t-e.width,a))):(i=Math.max(0,Math.min(n-e.height,i)),a=Math.max(0,Math.min(t-e.width,a))),{top:i,left:a}},[m,b,r,c,l]);return Ss(()=>{f(n??!1)},[n]),[p,f,v,w,m,k(()=>{if(!p||!e?.current||!t?.current)return;let n=t.current.getBoundingClientRect();return T(n)},[p,e,t,T])]})({ref:e,popupRef:y,open:i,disabled:!f||u,closeOnClickPopup:s,closeOnClickOutside:o&&!a,placement:r,offsetX:c,offsetY:l,myWindow:v,onChange:T}),O=(({popupRef:e,open:t,positioned:n,enabled:r})=>{let i=x(!1),a=x(t),o=h(e=>{i.current=0===e.detail},[]);return g(()=>{let n=r?VS(e.current):void 0;n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",String(t)))}),g(()=>{let o=e.current,s=a.current&&!t;if(a.current=t,r&&o){if(s&&o.contains(o.ownerDocument.activeElement))return void VS(o)?.focus({preventScroll:!0});t&&n&&i.current&&!o.contains(o.ownerDocument.activeElement)&&(i.current=!1,o.querySelector(WS)?.focus({preventScroll:!0}))}},[r,t,n,e]),o})({popupRef:y,open:i,positioned:!!E,enabled:!!f&&!u}),N=h(e=>{O(e),C(e)},[O,C]),M=k(()=>({popupRef:y,openPopup:i,parameters:E,onClick:A}),[A,i,E]);/* @__PURE__ */
69
+ return _(Vd,{ref:e,className:U("plitzi-component__dropdown",n,{"container--empty--skip":!f&&!t}),onClick:N,children:[/* @__PURE__ */I(HS,{value:M,children:t}),i&&a&&f&&/* @__PURE__ */I("div",{ref:b,className:U("plitzi-component__dropdown__background-container",p.backgroundContainer),onClick:w})]})}),KS=ld(({ref:e,className:t="",children:n})=>{let{popupRef:r,openPopup:i,parameters:a,onClick:o}=f(HS);return v(e,()=>r.current??null,[r]),/* @__PURE__ */I(Vd,{ref:r,className:U("plitzi-component__dropdown-popup",t,{"popup-container--no-visible":!i||!a}),style:a,onClick:o,children:n})}),YS=Object.assign(KS,{type:"dropdownPopup",ancestorType:"dropdown",content:{attributes:{},definition:{label:"Dropdown Popup",type:"dropdownPopup",description:"The floating panel revealed by a dropdown.",items:[],bindings:{},styleSelectors:{base:""},initialState:{}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:""},defaultStyle:{name:"Dropdown Popup",displayMode:"desktop",style:{base:{default:{"background-color":"light-dark(white, oklch(0.21 0.006 285.885))","padding-right":"4px","padding-bottom":"4px","padding-left":"4px","padding-top":"4px",position:"fixed",display:"flex","flex-direction":"column","border-top-right-radius":"4px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","box-shadow":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 11px","z-index":100}}},subTypes:{}},settings:{}},initialItems:[]}),JS=Object.assign(GS,{type:"dropdown",attributeValues:{popupPlacement:["left","right","top","bottom"]},content:{attributes:{popupPlacement:"bottom",openPopup:!1,backgroundDisabled:!1,closeOnClickBackground:!0,closeOnClickPopup:!0,containerTopOffset:5,containerLeftOffset:5,disabled:!1},definition:{label:"Dropdown",type:"dropdown",description:"A trigger that toggles an attached popup panel (dropdownPopup) — menus, selects, flyouts.",items:[],bindings:{},styleSelectors:{base:"",backgroundContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-angle-down"},defaultStyle:{name:"Dropdown",displayMode:"desktop",style:{base:{default:{cursor:"pointer","user-select":"none"}},backgroundContainer:{default:{top:0,bottom:0,left:0,right:0,position:"fixed",cursor:"default","z-index":50}}}},settings:{}},initialItems:["dropdownPopup"],plugins:{dropdownPopup:YS}}),XS=ld(({ref:e,className:t="",content:n="Heading",subType:r="h1"})=>{let{id:i}=cd(),{settings:{previewMode:a},contexts:{BuilderContext:o}}=sc(),s=o?f(o):void 0,l=k(()=>"string"!=typeof n&&"number"!=typeof n?JSON.stringify(n):n||""===n||a?n:"Heading",[n,a]),c=h(e=>!a&&s?.updateElement(i,"content",e),[s?.updateElement,i]);/* @__PURE__ */
70
+ return _(Vd,{ref:e,tag:a?r:"div",className:U("plitzi-component__heading",{[`plitzi-component__heading-${r}`]:r},t),children:[a&&l,!a&&/* @__PURE__ */I(Vp,{value:l,onChange:c,openMode:"doubleClick"})]})}),ZS=Object.assign(XS,{type:"heading",attributeValues:{subType:["h1","h2","h3","h4","h5","h6"]},content:{attributes:{content:"Heading",subType:"h1"},definition:{label:"Heading",type:"heading",description:"A section heading (<h1>–<h6>) for titles and document hierarchy.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-heading"},defaultStyle:{name:"Heading",displayMode:"desktop",style:{base:{default:{}}},subTypes:{h1:{name:"H1 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"38px","font-weight":700,"line-height":"1.158"}}}},h2:{name:"H2 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"32px","font-weight":700,"line-height":"1.125"}}}},h3:{name:"H3 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"24px","font-weight":700,"line-height":"1.25"}}}},h4:{name:"H4 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"18px","font-weight":700,"line-height":"1.333"}}}},h5:{name:"H5 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"14px","font-weight":700,"line-height":"1.429"}}}},h6:{name:"H6 Heading",displayMode:"desktop",style:{base:{default:{"margin-top":"25px","margin-bottom":"25px","font-size":"12px","font-weight":700,"line-height":"1.5"}}}}}},settings:{}}}),QS=e=>e.length>1?e.replace(/\/+$/,""):e,eT=ld(({ref:e,children:t,className:n="",href:r="#",target:i="self",mode:a="page",hash:o="",label:s="",content:l="",contentPlacement:c="after",icon:u="",iconPlacement:d="before"})=>{let{style:p,definition:{styleSelectors:f}}=cd(),{settings:{previewMode:h}}=sc(),[[m,g,y,b,v,w]]=zt(["pageDefinitions","schema.pageFolders","navigation.routeParams","navigation.queryParams","navigation.navigate","navigation.href"]),x=k(()=>{if("external"===a)return r;if("internal"===a){let e=`/${r}`.replaceAll(/[/]+/gim,"/");try{let t=Fn(e,{...b,...y},!0);return"string"==typeof t?t:e}catch{}return e}return Zc(m,g,r,!0)},[a,r,m,g,b,y]),S="external"!==a&&o?`${x}#${o}`:x,T="external"!==a&&((e,t)=>{if(!t||!e.startsWith("/"))return!1;try{let n=new URL(t).pathname,r=new URL(e,t).pathname;return QS(decodeURI(n))===QS(decodeURI(r))}catch{return!1}})(x,w),C=k(()=>{let t={ref:e,style:p,target:`_${i}`,..."blank"===i?{rel:"noopener noreferrer"}:{},"aria-label":s||void 0,"aria-current":T?"page":void 0,className:U("plitzi-component__link",n)};return h?{...t,href:S}:{...t,"href-disabled":S}},[e,p,i,s,T,n,h,S]);/* @__PURE__ */
71
+ return _(Vd,{tag:"a",...C,onClick:e=>{if(!h)return;e.stopPropagation();let t="self"!==i||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button;("page"===a||"internal"===a)&&!t&&(e.preventDefault(),v(S))},children:["before"===c&&/* @__PURE__ */I(qS,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon}),t,"after"===c&&/* @__PURE__ */I(qS,{content:l,icon:u,iconPlacement:d,iconClassName:f.icon})]})}),tT=Object.assign(eT,{type:"link",attributeValues:{mode:["page","internal","external"],target:["self","blank","parent","top"],contentPlacement:["before","after"],iconPlacement:["before","after"]},content:{attributes:{href:"#",target:"self",mode:"page",hash:"",label:"",content:"",contentPlacement:"after",icon:"",iconPlacement:"before"},definition:{label:"Link",type:"link",description:"Navigation. Moves the user between pages of the site or to an external URL (its `mode`/`href` decide which). Use this to go page-to-page rather than a button + interaction. Its words are its own `content` and an icon beside them its `icon` (Font Awesome classes) — no text or fontAwesome element inside it for them.",items:[],bindings:{},styleSelectors:{base:"",icon:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["link"]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-link"},defaultStyle:{name:"Link",displayMode:"desktop",style:{base:{default:{display:"inline-block",color:"#333",cursor:"pointer"}}}},settings:{}}}),nT=ld(({ref:e,content:t="Markdown",className:n=""})=>{let{settings:{previewMode:r}}=sc();/* @__PURE__ */
72
+ return I(Vd,{ref:e,className:U("plitzi-component__markdown",{"plitzi-component__markdown--edit-mode":!r},n),children:/* @__PURE__ */I(Fw,{children:t})})}),rT=Object.assign(nT,{type:"markdown",content:{attributes:{content:"Markdown"},definition:{label:"Markdown",type:"markdown",description:"Renders a Markdown source string as formatted HTML.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-brands fa-markdown"},defaultStyle:{name:"Markdown",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"1.714"}}}},settings:{}}}),iT=ld(({ref:e,content:t="Paragraph",className:n=""})=>{let{id:r}=cd(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=sc(),o=a?f(a):void 0,s=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Paragraph",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
73
+ return _(Vd,{ref:e,tag:i?"p":"div",className:U("plitzi-component__paragraph",n),children:[i&&s,!i&&/* @__PURE__ */I(Vp,{className:"",value:s,onChange:l,openMode:"doubleClick"})]})}),aT=Object.assign(iT,{type:"paragraph",content:{attributes:{content:"Paragraph"},definition:{label:"Paragraph",type:"paragraph",description:"A block of body text (a <p>). Use for longer prose passages.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-paragraph"},defaultStyle:{name:"Paragraph",displayMode:"desktop",style:{base:{default:{"margin-top":"14px","margin-bottom":"14px"}}}},settings:{}}}),oT=/<\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>/gi,sT=/<\s*\/?\s*(script|style|iframe|object|embed|link|meta|base|form)\b[^>]*>/gi,lT=/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,cT=/\s(href|src|xlink:href)\s*=\s*(?:"\s*(?:javascript|data|vbscript)\s*:[^"]*"|'\s*(?:javascript|data|vbscript)\s*:[^']*'|(?:javascript|data|vbscript)\s*:[^\s>]*)/gi,uT=e=>e.replace(oT,"").replace(sT,"").replace(lT,"").replace(cT,""),dT=ld(({ref:e,className:t="",content:n="",format:r="html",mediaBaseUrl:i=""})=>{let{settings:{previewMode:a}}=sc(),o=k(()=>"html"===r?((e,t)=>{if(!t)return e;let n=t.replace(/\/+$/,"");return e.replace(/\s(src|href)\s*=\s*"(\/(?!\/)[^"]*)"/gi,(e,t,r)=>` ${t}="${n}${r}"`)})(uT(n),i):"",[r,n,i]);/* @__PURE__ */
74
+ return _(Vd,{ref:e,className:U("plitzi-component__rich-text",{"plitzi-component__rich-text--edit-mode":!a},t),children:["html"===r&&/* @__PURE__ */I("div",{dangerouslySetInnerHTML:{__html:o}}),"markdown"===r&&/* @__PURE__ */I(Fw,{children:n}),"text"===r&&/* @__PURE__ */I("div",{className:"plitzi-component__rich-text-plain",children:n})]})}),pT=Object.assign(dT,{type:"richText",attributeValues:{format:["html","markdown","text"]},content:{attributes:{content:"",format:"html",mediaBaseUrl:""},definition:{label:"Rich Text",type:"richText",description:"Renders a body field coming from a CMS — HTML, markdown or plain text. Scripts and event handlers are stripped before rendering, so third-party content cannot execute.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Rich Text",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),fT=ld(({ref:e,content:t="Text",className:n=""})=>{let{id:r}=cd(),{settings:{previewMode:i},contexts:{BuilderContext:a}}=sc(),o=a?f(a):void 0,s=k(()=>"string"!=typeof t&&"number"!=typeof t?JSON.stringify(t):t||""===t||i?"number"==typeof t?`${t}`:t:"Text",[t,i]),l=h(e=>o?.updateElement(r,"content",e),[o,r]);/* @__PURE__ */
75
+ return _(Vd,{ref:e,className:U("plitzi-component__text",n),children:[i&&s,!i&&/* @__PURE__ */I(Vp,{className:"focus-visible:outline-hidden",value:s,onChange:l,openMode:"doubleClick"})]})}),hT=Object.assign(fT,{type:"text",content:{attributes:{content:"Text"},definition:{label:"Text",type:"text",description:"Inline plain-text content. Use for short runs of copy; bind its content to data for dynamic text.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-align-left"},defaultStyle:{name:"Text",displayMode:"desktop",style:{base:{default:{"font-size":"14px","line-height":"1.714",display:"inline"}}}},settings:{}}}),mT={type:"themeToggle",attributeValues:{subType:["switch","segmented"]},triggers:{onThemeChange:{action:"onThemeChange",title:"On Theme Change",type:"trigger",params:{},preview:{theme:"dark"}}},content:{attributes:{subType:"switch",lightLabel:"Light",darkLabel:"Dark",systemLabel:"System",showSystem:!1},definition:{label:"Theme Toggle",type:"themeToggle",description:"Lets a visitor choose light or dark. It writes the choice on the document root, where a space stylesheet is already looking for it, and remembers it — so the machine decides until somebody says otherwise. It ships no colours of its own: style it with the space own classes. It shows the icon of the scheme in use by default; key a rule off `data-theme-icon` to change that.",items:[],bindings:{},styleSelectors:{base:"",icon:"",option:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"basic",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-circle-half-stroke"},defaultStyle:{name:"Theme Toggle",displayMode:"desktop",style:{base:{default:{display:"inline-flex","align-items":"center",cursor:"pointer"}}},subTypes:{}},settings:{}}},gT=()=>()=>{},yT=()=>!0,bT=()=>!1,vT=()=>/* @__PURE__ */_("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[/* @__PURE__ */I("circle",{cx:"12",cy:"12",r:"4.2"}),/* @__PURE__ */I("path",{strokeLinecap:"round",d:"M12 2.6v2.2M12 19.2v2.2M4.2 12H2M22 12h-2.2M6.3 6.3 4.8 4.8M19.2 19.2l-1.5-1.5M17.7 6.3l1.5-1.5M4.8 19.2l1.5-1.5"})]}),wT=()=>/* @__PURE__ */I("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:/* @__PURE__ */I("path",{strokeLinejoin:"round",d:"M20.5 14.3A8.6 8.6 0 0 1 9.7 3.5a8.6 8.6 0 1 0 10.8 10.8Z"})}),kT=ld(({ref:e,className:t="",subType:n="switch",lightLabel:r="Light",darkLabel:i="Dark",systemLabel:a="System",showSystem:o=!1})=>{let{theme:s,setTheme:l,toggleTheme:c}=Gc(),{id:u,definition:{styleSelectors:d}}=cd(),{settings:{previewMode:p},contexts:{InteractionsContext:m}}=sc(),{interactionsManager:y}=f(m),b=T(gT,yT,bT),v=h(e=>t=>{t.preventDefault(),p&&l(e)},[p,l]),w=h(e=>{e.preventDefault(),p&&c()},[p,c]),S=k(()=>[...o?[{value:"system",label:a,icon:null}]:[],{value:"light",label:r,icon:/* @__PURE__ */I(vT,{})},{value:"dark",label:i,icon:/* @__PURE__ */I(wT,{})}],[o,a,r,i]),C=x(null);return g(()=>{let e=C.current;C.current=s,null!==e&&e!==s&&y.interactionTrigger(u,"onThemeChange",{theme:s})},[s,y,u]),"segmented"===n?/* @__PURE__ */I(Vd,{ref:e,tag:"div",role:"group","aria-label":`${r} / ${i}`,className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--segmented",t),interactionTriggers:mT.triggers,children:S.map(e=>/* @__PURE__ */_("button",{type:"button",className:U("plitzi-component__theme-toggle-option",d.option),"data-active":b&&s===e.value?"true":void 0,"aria-pressed":b?s===e.value:void 0,"data-theme-option":e.value,onClick:v(e.value),children:[e.icon,/* @__PURE__ */I("span",{children:e.label})]},e.value))}):/* @__PURE__ */_(Vd,{ref:e,tag:"button",className:U("plitzi-component__theme-toggle plitzi-component__theme-toggle--switch",t),interactionTriggers:mT.triggers,type:"button",onClick:w,"aria-label":`${r} / ${i}`,title:`${r} / ${i}`,children:[/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",d.icon),"data-theme-icon":"light",children:/* @__PURE__ */I(vT,{})}),/* @__PURE__ */I("span",{className:U("plitzi-component__theme-toggle-icon",d.icon),"data-theme-icon":"dark",children:/* @__PURE__ */I(wT,{})})]})}),xT=Object.assign(kT,mT),ST={type:"form",attributeValues:{method:["get","post"]},sourceType:"apiContainer",triggers:{onSubmit:{action:"onSubmit",title:"On Form Submit",type:"trigger",params:{},preview:{values:{},actionUrl:"",method:""}}},callbacks:{performReset:{action:"performReset",title:"Reset Form",type:"callback",params:{}},setFieldValue:{action:"setFieldValue",title:"Set Field Value",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},value:{type:"text",defaultValue:""}}},setFieldError:{action:"setFieldError",title:"Set Field Error",type:"callback",preview:{},params:{name:{label:"Field Name",defaultValue:void 0,type:"select",options:[]},error:{type:"text",defaultValue:""}}}},content:{attributes:{method:"get",actionUrl:"",managedByInteractions:!1,noValidate:!1,errors:{},values:{}},definition:{label:"Form",type:"form",description:"A <form> that groups form controls and handles submission; wire its submit through an interaction flow.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee"},defaultStyle:{name:"Form",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}},TT=ld(({ref:e,className:t="",children:n,method:r="get",actionUrl:i="",managedByInteractions:a=!1,noValidate:o=!1,errors:s=$r,values:l=$r})=>{let[c,u]=S({}),d=x(/* @__PURE__ */new Map),p=x(!1),{id:m,definition:{label:y="Form"},setElementState:b}=cd(),v=jl(ST.sourceType,m),{settings:{previewMode:w},contexts:{InteractionsContext:T}}=sc(),{interactionsManager:C}=f(T),A=h(e=>u(t=>({...t,[e.name]:e})),[u]);g(()=>(p.current=!1,()=>{p.current=!0}),[]);let E=h(e=>{p.current||(u(t=>Rl(t,t=>{t[e]&&delete t[e]})),e&&b(t=>({...t,values:pr(t,`values.${e}`),errors:pr(t,`errors.${e}`)})))},[b]),_=h((e,t)=>{d.current.set(e,t)},[]),O=h(e=>{d.current.delete(e)},[]),N=h((e,t="")=>{e&&(null===t&&(t=""),b(n=>n.errors&&n.errors[e]?{...n,values:{...n.values,[e]:t},errors:pr(n.errors,[e])}:{...n,values:{...n.values,[e]:t}}))},[b]),M=h((e,t)=>{e&&b(n=>t||ar(n,`errors.${e}`)?!t&&n.errors&&n.errors[e]?{...n,errors:pr(n,[`errors.${e}`])}:{...n,errors:{...n.errors,[e]:t}}:n)},[b]),P=h(()=>Object.values(c).filter(e=>!!e.name).reduce((e,t)=>[...e,{path:`fields.${t.name}.id`,name:`${t.name} ID`},{path:`values.${t.name}`,name:`${t.name} Value`},{path:`errors.${t.name}`,name:`${t.name} Error Message`}],[]),[c]),L=k(()=>({runtime:{sources:{form:{errors:s,values:l,registerField:A,unregisterField:E,registerValidator:_,unregisterValidator:O,setFieldValue:N,setFieldError:M},[v]:{values:l,errors:s}}}}),[v,s,l,A,E,_,O,N,M]);$l({id:m,source:v,name:y||`Form - ${m}`,fields:P});let D=k(()=>({onSubmit:{...ST.triggers.onSubmit,preview:{...ST.triggers.onSubmit.preview,values:Object.values(c).reduce((e,t)=>({...e,[t.name]:""}),{})}}}),[c]),z=h(e=>{let t=[...d.current].reduce((e,[t,n])=>{let r=n(l);return r?{...e,[t]:r}:e},{});if(b(e=>({...e,errors:t})),Object.keys(t).length>0)return e.stopPropagation(),void e.preventDefault();if(!a||(e.stopPropagation(),e.preventDefault(),!w))return;let n=Object.values(c).reduce((e,{name:t})=>({...e,[t]:l[t]}),{});C.interactionTrigger(m,"onSubmit",{values:n,actionUrl:i,method:r})},[b,a,w,c,C,m,i,r,l]),R=h(e=>{a&&(e instanceof Event&&(e.stopPropagation(),e.preventDefault()),b(e=>({...e,values:{},errors:{}})))},[b,a]),j=h(e=>{let{name:t,value:n}=e;N(t,n)},[N]),$=h(e=>{let{name:t,error:n}=e;M(t,n)},[M]),F=k(()=>{let{performReset:e,setFieldValue:t,setFieldError:n}=ST.callbacks,r=Object.values(c).map(e=>({value:e.name,label:e.name}));return{performReset:{...e,title:`Reset ${y}`,callback:R},setFieldValue:{...t,title:`Set Field Value ${y}`,callback:j,params:{...t.params,name:{...t.params.name,options:r}}},setFieldError:{...n,title:`Set Field Error ${y}`,callback:$,params:{...n.params,name:{...n.params.name,options:r}}}}},[y,R,j,c,$]);/* @__PURE__ */
76
+ return I(Vd,{tag:"form",ref:e,noValidate:o,method:r,className:U("plitzi-component__form",t),interactionTriggers:D,interactionCallbacks:F,onSubmit:z,onReset:R,action:i,children:/* @__PURE__ */I(At,{inherit:"live",name:`Form:${m}`,value:L,children:n})})}),CT=e=>/* @__PURE__ */_("svg",{...e,viewBox:"0 0 19 18",fill:"none",children:[
77
77
  /* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 12.5C0.447715 12.5 0 12.9477 0 13.5V16.5C0 17.0523 0.447715 17.5 1 17.5H18C18.5523 17.5 19 17.0523 19 16.5V13.5C19 12.9477 18.5523 12.5 18 12.5H1ZM17 14.5H2V15.5H17V14.5Z",fill:"currentColor"}),
78
78
  /* @__PURE__ */I("path",{d:"M0 10.5C0 9.94772 0.447715 9.5 1 9.5H11C11.5523 9.5 12 9.94772 12 10.5C12 11.0523 11.5523 11.5 11 11.5H1C0.447715 11.5 0 11.0523 0 10.5Z",fill:"currentColor"}),
79
79
  /* @__PURE__ */I("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 3.5C0.447715 3.5 0 3.94772 0 4.5V7.5C0 8.05228 0.447715 8.5 1 8.5H18C18.5523 8.5 19 8.05228 19 7.5V4.5C19 3.94772 18.5523 3.5 18 3.5H1ZM17 5.5H2V6.5H17V5.5Z",fill:"currentColor"}),
80
- /* @__PURE__ */I("path",{d:"M0 1.5C0 0.947715 0.447715 0.5 1 0.5H11C11.5523 0.5 12 0.947715 12 1.5C12 2.05228 11.5523 2.5 11 2.5H1C0.447715 2.5 0 2.05228 0 1.5Z",fill:"currentColor"})]}),ST=Object.assign(kT,{...wT,content:{...wT.content,market:{...wT.content.market,icon:/* @__PURE__ */I(xT,{})}}}),TT={width:"100%",display:"flex","align-items":"center","border-right-color":"#6f7780","border-right-style":"solid","border-right-width":"1px","border-top-right-radius":"4px","border-bottom-color":"#6f7780","border-bottom-style":"solid","border-bottom-width":"1px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","border-left-color":"#6f7780","border-left-style":"solid","border-left-width":"1px","border-top-color":"#6f7780","border-top-style":"solid","border-top-width":"1px","user-select":"none","font-size":"14px","padding-left":"16px","padding-right":"16px","padding-top":"8px","padding-bottom":"8px","line-height":"20px",outline:"none",position:"relative"},CT={display:"flex",cursor:"pointer","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},AT={...CT,"margin-bottom":"4px"},ET={display:"block",color:"red","margin-top":"4px"},IT={type:"formControl",attributeValues:{subType:["text","number","email","password","date","time","checkbox","switch","select","textarea","hidden","color"]},triggers:{onChange:{action:"onChange",title:"On Change",type:"trigger",params:{},preview:{value:"",name:""}}},content:{attributes:{subType:"text",name:"",label:"Label",hideLabel:!1,placeholder:"",defaultValue:"",autoComplete:!0,autoFocus:!1,disabled:!1,options:[],required:!0,requiredMessage:"",minLength:0,minLengthMessage:"",maxLength:0,maxLengthMessage:"",formatMessage:"",pattern:"",patternMessage:"",matches:"",matchesMessage:"",readOnly:!1},definition:{label:"Form Control",type:"formControl",description:"A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input.",bindings:{},styleSelectors:{base:"",label:"",input:"",error:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee"},defaultStyle:{name:"Form Control",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hidden:{name:"Form Control Hidden",displayMode:"desktop",style:{base:{},input:{default:{}},label:{default:AT},error:{default:ET}}},text:{name:"Form Control Text",displayMode:"desktop",style:{base:{default:{}},input:{default:TT},label:{default:AT},error:{default:ET}}},password:{name:"Form Control Password",displayMode:"desktop",style:{base:{default:{}},input:{default:TT},label:{default:AT},error:{default:ET}}},number:{name:"Form Control Number",displayMode:"desktop",style:{base:{default:{}},input:{default:TT},label:{default:AT},error:{default:ET}}},email:{name:"Form Control Email",displayMode:"desktop",style:{base:{default:{}},input:{default:TT},label:{default:AT},error:{default:ET}}},textarea:{name:"Form Control Textarea",displayMode:"desktop",style:{base:{default:{}},input:{default:TT},label:{default:AT},error:{default:ET}}},checkbox:{name:"Form Control Checkbox",displayMode:"desktop",style:{base:{default:{}},input:{default:{"margin-top":"0px","margin-bottom":"0px","margin-left":"0px","margin-right":"4px"}},label:{default:CT},error:{default:ET}}},select:{name:"Form Control Select",displayMode:"desktop",style:{base:{default:{}},input:{default:{...TT,cursor:"pointer"}},label:AT,error:{default:ET}}}}},settings:{}}},_T={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},OT=({ref:e,children:t,targetInput:n="",type:r="text",previewMode:i=!0,required:a=!0,hidden:o=!1,className:s=""})=>{let l=h(e=>{i||e.preventDefault()},[i]);/* @__PURE__ */
81
- return _("label",i?{ref:e,className:U(`form-control__label-${r}`,s),htmlFor:n,style:o?_T:void 0,children:[t,a&&t&&/* @__PURE__ */I("span",{className:"form-control__label--required",children:"*"})]}:{ref:e,className:U(`form-control__label-${r}`,s),onClick:l,children:[t,a&&t&&/* @__PURE__ */I("span",{className:"form-control__label--required",children:"*"})]})},NT=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,MT=/* @__PURE__ */new Map([["email",{matches:e=>NT.test(e),message:"Enter an email address"}]]),PT=e=>"string"==typeof e?e:"number"==typeof e?String(e):"",LT=(e,t,n)=>{if((e=>null==e||""===e||!1===e)(e))return t.required?t.requiredMessage||"This field is required":"";if("boolean"==typeof e)return"";let r=PT(e),i=Array.from(r).length;if(t.minLength>0&&i<t.minLength)return t.minLengthMessage||`Use at least ${t.minLength} characters`;if(t.maxLength>0&&i>t.maxLength)return t.maxLengthMessage||`Use at most ${t.maxLength} characters`;let a=MT.get(t.type);return a&&!a.matches(r)?t.formatMessage||a.message:t.pattern&&!((e,t)=>{try{return RegExp(`^(?:${t})$`,"u").test(e)}catch{return!1}})(r,t.pattern)?t.patternMessage||"This is not in the expected format":t.matches&&r!==PT(ar(n,t.matches,""))?t.matchesMessage||"This does not match":""},DT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,onChange:s,onValidate:l,errorId:c})=>{let u=h(()=>l?.(),[l]);/* @__PURE__ */
82
- return I("input",{className:U("form-control__checkbox-container",e),id:t,"aria-invalid":!!c||void 0,"aria-describedby":c,name:n,type:"checkbox",placeholder:r,value:i,required:a,disabled:o,onChange:s,onBlur:u})},zT=({className:e="",id:t="",name:n="",value:r="",required:i=!0,disabled:a=!1,previewMode:o=!0})=>/* @__PURE__ */_("div",{className:U("form-control__input-hidden-container",e),children:[o&&/* @__PURE__ */I("input",{className:"input-container__input-hidden",id:t,name:n,type:"hidden",value:r,required:i,disabled:a}),!o&&/* @__PURE__ */I("div",{className:"input-container__input-hidden--no-preview",children:"hidden input"})]}),RT=(e,t)=>{g(()=>{t&&e.current?.focus()},[e,t])},jT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",type:a="text",autoComplete:o=!1,autoFocus:s=!1,required:l=!0,maxLength:c=0,disabled:u=!1,readOnly:d=!1,onChange:p,onValidate:f,errorId:m})=>{let[g,y]=S(!1),b=x(null);RT(b,s);let v=h(()=>y(e=>!e),[y]),w=h(e=>{let t=b.current;if(t?.focus(),"color"===a&&t&&e.target!==t)try{t.showPicker()}catch{}},[b,a]),k=h(()=>f?.(),[f]);/* @__PURE__ */
83
- return _("div",{className:U("form-control__input-container",e),onClick:w,children:[/* @__PURE__ */I("input",{ref:b,className:"input-container__input",id:t,"aria-invalid":!!m||void 0,"aria-describedby":m,name:n,type:"password"===a&&g?"text":a,placeholder:r,value:i,required:l,maxLength:c>0?c:void 0,autoComplete:o?"on":"off",disabled:u,readOnly:d,onChange:p,onBlur:k}),"password"===a&&/* @__PURE__ */I("button",{type:"button",className:"form-input__icon","aria-pressed":g,title:"Show password",onClick:v,children:/* @__PURE__ */I("i",{className:g?"fa-solid fa-eye-slash":"fa-solid fa-eye","aria-hidden":"true"})})]})},$T=({id:e="",name:t,options:n=[],placeholder:r="",value:i="",className:a="",disabled:o=!1,onChange:s,onValidate:l,errorId:c})=>{let u=x(null),d=h(()=>{u.current?.click()},[u]),p=h(e=>{e.stopPropagation()},[]),f=h(()=>l?.(),[l]),m=k(()=>Array.isArray(n)?n.map(e=>{if("string"==typeof e)return{value:e,label:e};if(void 0===e.value||void 0===e.label){let t=e.value??e.label??"";return{value:t,label:t}}return{value:e.value,label:e.label}}):[],[n]);/* @__PURE__ */
84
- return I("div",{className:U("form-control__select-container",a),onClick:d,children:/* @__PURE__ */_("select",{ref:u,id:e,"aria-invalid":!!c||void 0,"aria-describedby":c,name:t,onChange:s,value:i,className:"select-container__select",disabled:o,onClick:p,onBlur:f,children:[r&&/* @__PURE__ */I("option",{value:"",children:r}),m.map((e,t)=>/* @__PURE__ */I("option",{value:e.value,children:e.label},t))]})})},FT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",autoFocus:a=!1,required:o=!0,maxLength:s=0,disabled:l=!1,readOnly:c=!1,onChange:u,onValidate:d,errorId:p})=>{let f=x(null);RT(f,a);let m=h(e=>{e.stopPropagation()},[]),g=h(()=>d?.(),[d]);/* @__PURE__ */
85
- return I("textarea",{ref:f,className:U("form-control__textarea-container",e),id:t,"aria-invalid":!!p||void 0,"aria-describedby":p,name:n,placeholder:r,value:i,readOnly:c,required:o,maxLength:s>0?s:void 0,disabled:l,onChange:u,onBlur:g,onClick:m})},qT=ld((e=>{let t=t=>{let{ref:n,name:r="",subType:i="text",defaultValue:a="",required:o=!0,requiredMessage:s="",minLength:l=0,minLengthMessage:c="",maxLength:u=0,maxLengthMessage:d="",formatMessage:p="",pattern:f="",patternMessage:m="",matches:y="",matchesMessage:b="",previewError:v=!1}=t,{settings:{previewMode:w}}=sc(),{useStore:x}=Ot(),[T]=x("runtime.sources.form"),[C,A]=S(a),[E,_]=S(a);!T&&E!==a&&(_(a),A(a));let O=T?.values,N=k(()=>T?ar(O,r,a):C,[T,O,r,a,C]),M=k(()=>!w&&v?"This is an error message":T?.errors[r]??"",[w,v,T?.errors,r]),P=k(()=>({required:o,requiredMessage:s,minLength:l,minLengthMessage:c,maxLength:u,maxLengthMessage:d,type:i,formatMessage:p,pattern:f,patternMessage:m,matches:y,matchesMessage:b}),[o,s,l,c,u,d,i,p,f,m,y,b]),L=T?.registerValidator,D=T?.unregisterValidator,z=T?.setFieldValue,R=T?.setFieldError;g(()=>{if(r&&L&&D)return L(r,e=>LT(ar(e,r,a),P,e)),()=>D(r)},[r,a,P,L,D]),g(()=>{z&&a&&N&&r&&z(r,N)},[a,r,z,N]);let j=h(e=>{let t="radio"===e.target.type||"checkbox"===e.target.type||"switch"===i;z?z(r,t?e.target.checked:e.target.value):A(t?String(e.target.checked):e.target.value)},[z,r,i]),$=h(()=>R?.(r,LT(N,P,O??{})),[N,P,O,r,R]);return k(()=>/* @__PURE__ */I(e,{...t,ref:n,value:N,error:M,handleChange:j,handleValidate:$}),[t,n,M,N,j,$])};return t.displayName=`withFieldValue(${function(e){return e&&(e.displayName||e.name)||"Component"}(e)})`,t})(({ref:e,className:t="",subType:n="text",name:r="",label:i="Label",hideLabel:a=!1,placeholder:o="",autoComplete:s=!0,autoFocus:l=!1,disabled:c=!1,options:u=[],required:d=!0,maxLength:p=0,readOnly:m=!1,value:y="",error:b="",handleChange:v,handleValidate:w})=>{let{id:k,rootId:x,visible:S,definition:{styleSelectors:T}}=cd(),{settings:{previewMode:C},contexts:{InteractionsContext:A}}=sc(),{interactionsManager:E}=f(A),{useStore:O}=Ot(),[N]=O("runtime.sources.form"),M=h(e=>{if(v?.(e),!C)return;let{target:t}=e,i=t instanceof HTMLInputElement&&("checkbox"===t.type||"switch"===n)?t.checked:t.value;E.interactionTrigger(k,"onChange",{value:i,name:r})},[v,C,n,E,k,r]),P=N?.registerField,L=N?.unregisterField,D=["checkbox","switch"].includes(n),z="hidden"===n,R=l&&C&&S,j=b&&C?`${x}_${k}_error`:void 0;return g(()=>{if(P&&L)return P({name:r,path:r}),()=>L(r)},[r,P,L]),/* @__PURE__ */_(Ud,{ref:e,interactionTriggers:IT.triggers,className:U("plitzi-component__form-control",{"form-control--invalid":b&&C,[`plitzi-component__form-control-${n}`]:n},t),children:[!D&&!z&&i&&/* @__PURE__ */I(OT,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,type:n,required:d,hidden:a&&C,children:i}),D&&i&&/* @__PURE__ */_(OT,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,type:n,required:d,children:["checkbox"===n&&/* @__PURE__ */I(DT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,required:d,disabled:c,onChange:M,onValidate:w,errorId:j}),a&&C?/* @__PURE__ */I("span",{style:_T,children:i}):i]}),"checkbox"===n&&!i&&/* @__PURE__ */I(DT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,required:d,disabled:c,onChange:M,onValidate:w,errorId:j}),["text","number","email","password","date","time","color"].includes(n)&&/* @__PURE__ */I(jT,{id:`${x}_${k}`,name:r,value:y,type:n,className:T.input,placeholder:o,autoComplete:"password"!==n&&s,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m||!C,onChange:M,onValidate:w,errorId:j}),"hidden"===n&&/* @__PURE__ */I(zT,{id:`${x}_${k}`,name:r,value:y,required:d,disabled:c,previewMode:C}),"select"===n&&/* @__PURE__ */I($T,{id:`${x}_${k}`,name:r,onChange:M,onValidate:w,errorId:j,value:y,className:T.input,placeholder:o,disabled:c,options:u}),"textarea"===n&&/* @__PURE__ */I(FT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m,onChange:M,onValidate:w,errorId:j}),b&&/* @__PURE__ */I("div",{id:j,role:"alert",className:U("form-control__error-message",T.error),children:b})]})})),BT=Object.assign(qT,{...IT,content:{...IT.content,market:{...IT.content.market,icon:/* @__PURE__ */I(xT,{})}}}),UT=".plitzi-component--layout-body",HT=ld(({ref:e,className:t="",children:n,subType:r="div"})=>{let{plitziElementLayout:i}=cd(),{settings:{previewMode:a}}=sc(),o=h((e,t)=>{if(!e)return;if(!t)return void e.style.removeProperty("--child-clip");let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=e.offsetWidth>0?n.width/e.offsetWidth:1,a=(r.top-n.top)/i,o=(r.left-n.left)/i,s=o+r.width/i,l=a+r.height/i,c=`\n polygon(\n evenodd,\n /* outer rect */\n 0 0, 100% 0, 100% 100%, 0% 100%, 0 0,\n /* inner rect */ \n ${o}px ${a}px, ${s}px ${a}px, ${s}px ${l}px, ${o}px ${l}px, ${o}px ${a}px\n )`;e.style.setProperty("--child-clip",c)},[]);return g(()=>{let t=e?.current;if(!i||!t||a||t.parentElement?.closest(".plitzi-component__layout-container"))return;let n=null,r=hr(()=>{let e=(e=>[...e.querySelectorAll(UT)].find(e=>!e.querySelector(UT))??null)(t);e!==n&&(n&&s.unobserve(n),e&&s.observe(e),n=e),o(t,e)},50),s=new ResizeObserver(r);s.observe(t);let l=new MutationObserver(r);return l.observe(t,{childList:!0,subtree:!0}),t.addEventListener("scroll",r,!0),r(),()=>{r.cancel(),s.disconnect(),l.disconnect(),t.removeEventListener("scroll",r,!0)}},[i,a,e,o]),/* @__PURE__ */I(Ud,{ref:e,tag:r,className:U("plitzi-component__layout-container",t),children:n})}),WT=Object.assign(HT,{type:"layoutContainer",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure"]},content:{attributes:{subType:"div"},definition:{label:"Layout Container",type:"layoutContainer",description:"A reusable layout shell (header/footer chrome) shared across pages.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-border-all"},defaultStyle:{name:"Layout Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),VT=ld(({ref:e,className:t=""})=>{let{definition:{label:n}}=cd();/* @__PURE__ */
86
- return I(Ud,{ref:e,className:U("plitzi-component__loading",t),children:/* @__PURE__ */_("span",{children:[/* @__PURE__ */I("b",{children:n})," Loading..."]})})}),GT=Object.assign(VT,{type:"loading",content:{attributes:{},definition:{label:"Loading",type:"loading",description:"A loading placeholder shown while data or a suspense boundary resolves.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Loading",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),KT=/* @__PURE__ */$({NotFound:()=>YT,default:()=>JT}),YT=({ref:e,className:t=""})=>{let{definition:{label:n}}=cd(),{settings:{isHydrating:r,previewMode:i}}=sc();if(!(typeof window>"u"||i||r))/* @__PURE__ */return I(Ud,{ref:e,className:U("plitzi-component__not-found",t),children:/* @__PURE__ */_("span",{children:[n&&/* @__PURE__ */_(E,{children:["Component ",
87
- /* @__PURE__ */I("b",{children:n})," Not Found"]}),!n&&"Component Not Found"]})})},JT=ld(YT),XT=Object.assign(JT,{type:"notFound",content:{attributes:{},definition:{label:"Not Found",type:"notFound",description:"The 404 screen shown when no route matches.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Not Found",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),ZT={type:"page",triggers:{onPageLoad:{action:"onPageLoad",title:"On Page Load",type:"trigger",params:{},preview:{pageId:"",routeParams:"",queryParams:""}}},content:{attributes:{enabled:!0,name:"Page",slug:"",folder:"",layout:"",layoutContainer:"",seoEnabled:!1,seoPageTitle:"Title",seoPageDescription:"Description"},definition:{label:"Page",type:"page",description:"The root of a routable screen. Managed through the page ops (upsertPage/deletePage), not added as a child element.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fas fa-file"},defaultStyle:{name:"Page",displayMode:"desktop",style:{base:{default:{display:"flex","flex-direction":"column","min-height":"100%","min-width":"100%","font-family":"Arial",color:"#333","font-size":"14px","font-weight":400,"line-height":"16px","text-align":"left","background-color":"#ffffff"}}}},settings:{}}},QT=[],eC=ld(({ref:e,seoEnabled:t=!1,seoPageTitle:n="Title",seoPageDescription:r="Description",className:i="",layout:a="",layoutContainer:o="",children:s})=>{let{id:l}=cd(),{settings:{previewMode:c},contexts:{InteractionsContext:u}}=sc(),{interactionsManager:d}=f(u),{ownsHead:p}=X(),[[y,b]]=zt(["navigation.routeParams","navigation.queryParams"]),v=((e,t)=>{let n=m(mt),r=x(QT),i=h(e=>n?n.subscribePath("schema.flat",e):()=>{},[n]),a=h(()=>{let i=e&&n?Ac(e=>{let t=(e=>n.getPath(e))(`schema.flat.${e}`);return(e=>"object"==typeof e&&!!e&&"definition"in e&&"attributes"in e)(t)?t:void 0},e,t):QT;return((e,t)=>e.length===t.length&&e.every((e,n)=>e.layout===t[n].layout&&e.slot===t[n].slot))(r.current,i)||(r.current=i),r.current},[n,e,t]);return T(i,a,a)})(a,o),w=k(()=>(e=>e.map(e=>({...e,plitziElementLayout:{slots:[e.slot],rootId:e.slot,type:"layout"}})))(v),[v]),S=k(()=>((e,t,n)=>e.reduce((e,{layout:n,slot:r,plitziElementLayout:i})=>/* @__PURE__ */I(Gr,{bodies:{[r]:e},children:/* @__PURE__ */I(WT,{internalProps:{id:n,rootId:t,plitziElementLayout:i}})},r),n))(w,l,s),[w,l,s]);return g(()=>{let e=!1;return queueMicrotask(()=>{e||d.interactionTrigger(l,"onPageLoad",{pageId:l,routeParams:y,queryParams:b})}),()=>{e=!0}},[l,d,b,y]),/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__page",i),interactionTriggers:ZT.triggers,children:[t&&c&&p&&/* @__PURE__ */_(Cp,{children:[!!n&&/* @__PURE__ */I("title",{children:n}),!!r&&/* @__PURE__ */I("meta",{name:"description",content:r})]}),S]})}),tC=Object.assign(eC,ZT),nC=ld(({ref:e,src:t="",title:n="",loading:r="lazy",allow:i="",sandbox:a,referrerPolicy:o="strict-origin-when-cross-origin",className:s=""})=>{let{settings:{previewMode:l}}=sc(),c=(e=>/^(https?:)?\/\//i.test(e)||e.startsWith("/")&&!e.startsWith("//")?e:void 0)(t),u={src:c,title:n,loading:r,referrerPolicy:o,...i?{allow:i}:{},...void 0===a?{}:{sandbox:a}};return l?/* @__PURE__ */I(Ud,{tag:"iframe",ref:e,className:U("plitzi-component__embed",s),...u}):/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__embed embed--edit-mode",s),children:[c&&/* @__PURE__ */I("iframe",{...u}),/* @__PURE__ */I("div",{className:"embed__cover"})]})}),rC=Object.assign(nC,{type:"embed",content:{attributes:{src:"",title:"",loading:"lazy"},definition:{label:"Embed",type:"embed",description:"Another page inside this one — a map, a video player, a form — in a frame.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-window-maximize"},defaultStyle:{name:"Embed",displayMode:"desktop",style:{base:{default:{display:"block",width:"100%","aspect-ratio":"16 / 9","border-top-width":"0px","border-right-width":"0px","border-bottom-width":"0px","border-left-width":"0px"}}}},settings:{}}}),iC=ld(({ref:e,className:t="",icon:n="fas fa-flag",size:r="fa-1x",iconAnimation:i="",label:a=""})=>{let o=a?{role:"img","aria-label":a}:{"aria-hidden":!0};/* @__PURE__ */
88
- return I(Ud,{ref:e,tag:"i",className:U("plitzi-component__fontawesome",t,n,r,i),...o})}),aC=Object.assign(iC,{type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",type:"fontAwesome",description:"Renders a Font Awesome icon by its icon name.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-font-awesome"},defaultStyle:{name:"Font Awesome",displayMode:"desktop",style:{base:{default:{display:"inline-block","font-size":"16px"}}}},settings:{}}}),oC=[320,480,640,768,960,1280,1600,1920],sC=(e,t,n)=>`${e}?url=${encodeURIComponent(t)}&w=${String(n)}`,lC=(e,t)=>oC.map(n=>`${sC(e,t,n)} ${String(n)}w`).join(", "),cC="data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" fill="none">\n <rect width="1200" height="1200" fill="#EAEAEA" rx="3"/>\n <path fill="#FAFAFA" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="#C9C9C9" stroke-width="2.418" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/>\n <path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/>\n <path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/>\n <path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/>\n <path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/>\n <path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <defs>\n <linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath>\n </defs>\n</svg>'),uC=ld(({ref:e,className:t="",src:n,alt:r="",decorative:i=!1,fetchPriority:a="auto",loadMode:o,sizes:s="100vw",width:l,height:c})=>{let{settings:{previewMode:u}}=sc(),d=n||"https://cdn.plitzi.com/resources/img/placeholder-img.svg",p=i?"":r,[f,m]=S(void 0),g=f===d,y=h(()=>m(d),[d]),b=g?cC:d,v=g?{"data-plitzi-failed":d}:{},w="auto"===o?void 0:o,[k]=Mt("images.endpoint"),x=u&&k&&!g&&(e=>/^https?:\/\//i.test(e))(d)?{src:sC(k,d,1280),srcSet:lC(k,d),sizes:s}:{src:b},T={...l?{width:l}:{},...c?{height:c}:{}};/* @__PURE__ */
89
- return I(Ud,u?{tag:"img",draggable:!1,ref:e,className:U("plitzi-component__image",t),...x,...T,alt:p,loading:w,fetchPriority:a,onError:g?void 0:y,...v}:{ref:e,className:U("plitzi-component__image image--edit-mode",t),children:/* @__PURE__ */I("img",{draggable:!1,src:b,alt:p,loading:w,fetchPriority:a,onError:g?void 0:y,...v})})}),dC=Object.assign(uC,{type:"image",attributeValues:{fetchPriority:["high","low","auto"],loadMode:["auto","eager","lazy"]},content:{attributes:{src:"https://cdn.plitzi.com/resources/img/placeholder-img.svg",alt:"",decorative:!1,fetchPriority:"auto",loadMode:"auto"},definition:{label:"Image",type:"image",description:"Displays an image from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-image"},defaultStyle:{name:"Image",displayMode:"desktop",style:{base:{default:{display:"block",width:"140px",height:"140px"}}}},settings:{}}}),pC=/<\s*foreignObject\b[\s\S]*?<\s*\/\s*foreignObject\s*>|<\s*\/?\s*foreignObject\b[^>]*>/gi,fC=/\s(to|from|values|by)\s*=\s*(?:"[^"]*javascript\s*:[^"]*"|'[^']*javascript\s*:[^']*')/gi,hC=/^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i,mC=/<svg\b[^>]*>/i,gC=ld(({ref:e,content:t="",label:n="",className:r=""})=>{let{settings:{previewMode:i}}=sc(),a=k(()=>(e=>hC.test(e))(t)?(e=>e.replace(mC,e=>e.replace(/\s(width|height)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/^<svg\b/i,'<svg width="100%" height="100%"')))((e=>sT(e).replace(pC,"").replace(fC,""))(t)):"",[t]),o=n?{role:"img","aria-label":n}:{"aria-hidden":!0};return a||i?/* @__PURE__ */I(Ud,{tag:"span",ref:e,className:U("plitzi-component__svg",r),...o,dangerouslySetInnerHTML:{__html:a}}):/* @__PURE__ */_(Ud,{ref:e,className:U("plitzi-component__svg svg--empty",r),children:["Paste one ","<svg>…</svg>"," here"]})}),yC=Object.assign(gC,{type:"svg",content:{attributes:{content:"",label:""},definition:{label:"SVG",type:"svg",description:"A drawing written as SVG markup, coloured by its class.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-bezier-curve"},defaultStyle:{name:"Svg",displayMode:"desktop",style:{base:{default:{display:"inline-flex",width:"24px",height:"24px"}}}},settings:{}}}),bC=ld(({ref:e,src:t,autoPlay:n=!1,playsInline:r=!1,loop:i=!1,muted:a=!0,className:o=""})=>{let{settings:{previewMode:s}}=sc();/* @__PURE__ */
90
- return I(Ud,s?{tag:"video",draggable:!1,ref:e,className:U("plitzi-component__video",o),src:t,autoPlay:n,playsInline:r,loop:i,muted:a}:{ref:e,className:U("plitzi-component__video video--edit-mode",o),children:/* @__PURE__ */I("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:a,children:/* @__PURE__ */I("track",{kind:"captions"})})})}),vC=Object.assign(bC,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Embeds a video from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),wC={type:"apiContainer",attributeValues:{subType:["","div","header","footer","nav","main","section","article","aside","address","figure"],method:["get","post","put","delete","patch"],credentials:["include","omit","same-origin"],pagination:["none","url","append"]},sourceType:"apiContainer",triggers:{onApiError:{action:"onApiError",title:"On Api Error",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}},onApiSuccess:{action:"onApiSuccess",title:"On Api Success",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}}},callbacks:{performQuery:{action:"performQuery",title:"Perform Query",type:"callback",preview:{},params:{input:{label:"Input (server providers)",type:"codemirror-json",defaultValue:"{}",description:"Values handed to a server-driven provider with its request, beside the page’s own route and query params — a search, a filter. Kept for the pages it loads after (`loadMore`, `goToPage`) until the next query."}}},loadMore:{action:"loadMore",title:"Load More",type:"callback",preview:{},params:{}},goToPage:{action:"goToPage",title:"Go To Page",type:"callback",preview:{},params:{page:{label:"Page",defaultValue:"1",type:"text"}}},writeRecord:{action:"writeRecord",title:"Write Record",type:"callback",preview:{action:"create"},params:{action:{label:"Endpoint",defaultValue:"create",type:"text"},recordId:{label:"Record Id",defaultValue:"",type:"text"}}}},content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"",credentials:"same-origin",connector:"",resource:"",limit:"10",singleRecord:!1,filters:[],pagination:"none",pageParam:"page",renderWhileLoading:!1,cache:!1,staleTime:30,gcTime:300},definition:{label:"Api Container",type:"apiContainer",description:'Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: "div"`, `section`, …); otherwise style its parent or a child.',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},kC=()=>{let{id:e,rootId:t}=cd(),[[n=!1,r=!1,i=!1,a,o,s,l]]=Mt(["rsc.enabled","rsc.loaded","rsc.stale","rsc.location",iu(e),"navigation.currentPageId","schema.pages"]),c=su(),u=void 0!==a&&a!==au()||void 0!==t&&t!==s&&Array.isArray(l)&&l.includes(t),d=x(void 0);!u&&void 0!==o&&(d.current=o);let p=u&&void 0!==d.current?d.current:o;return{enabled:n,loaded:r,stale:i,location:a,elementData:p??null,isServerElement:void 0!==p,refresh:c}},xC=(e,t,n)=>n?void 0===e.record:Array.isArray(e.records)?0===t.length:(e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e.data),SC=3e5,TC=e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)},CC=e=>`entries.${TC(e)}`,AC=new class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=We({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(CC(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(CC(e))}usage(e){let t=this.runtimes.get(TC(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(TC(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=SC){let n=this.ensure(e);return n.gcTime=t,n.holds++,this.cancelGc(n),()=>{n.holds--,this.scheduleGc(n)}}observe(e,t){let n=this.ensure(e),{isCacheable:r}=t,i={meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))};return n.observers.add(i),this.cancelGc(n),(!this.hasAnswer(e)||this.store.isStale(CC(e)))&&this.fetch(n,i),()=>{n.observers.delete(i),this.scheduleGc(n)}}async fetchQuery(e,t){let n=this.ensure(e);if(void 0!==t.gcTime&&(n.gcTime=t.gcTime),this.hasAnswer(e)&&!this.store.isStale(CC(e)))return this.scheduleGc(n),this.getEntry(e)?.data;let{isCacheable:r}=t;await this.fetch(n,{meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))});let i=this.getEntry(e)?.data;return this.scheduleGc(n),i}refetch(e){let t=this.runtimes.get(TC(e));return t?this.invalidateOne(t):Promise.resolve()}invalidate(e){let t=[];return this.runtimes.forEach(n=>{let r=this.getEntry(n.key);!r||e&&!e({url:r.url,tags:r.tags})||t.push(this.invalidateOne(n))}),Promise.all(t).then(()=>{})}reset({refetch:e=!0}={}){if(this.epochValue++,this.runtimes.forEach(e=>{e.version++,e.inFlight=void 0,e.controller?.abort(),e.controller=void 0}),this.store.setState("entries",{}),!e)return this.runtimes.forEach(e=>this.markUnasked(e)),Promise.resolve();let t=[];return this.runtimes.forEach(e=>t.push(this.fetchActive(e))),Promise.all(t).then(()=>{})}markUnasked(e){let t=e.observers.values().next();if(t.done)return;let n={key:e.key,url:t.value.meta.url,tags:[...e.tags],isFetching:!1};this.store.setState(CC(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(CC(e.key)).length&&e.version++,this.fetchActive(e)}onExpired(e){let t=this.runtimes.get(e.slice(8).split(".")[0]);t&&(t.version++,this.fetchActive(t))}fetchActive(e){let t=e.observers.values().next();return t.done?Promise.resolve():this.fetch(e,t.value)}fetch(e,t){if(e.inFlight)return e.inFlight;let{key:n}=e,{url:r}=t.meta;t.meta.tags?.forEach(t=>e.tags.add(t));let i=[...e.tags],a=CC(n);this.getEntry(n)?this.store.setState(`${a}.isFetching`,!0):this.store.setState(a,{key:n,url:r,tags:i,isFetching:!0});let o=this.epochValue,s=e.version,l=l=>{if(o!==this.epochValue||this.runtimes.get(TC(n))!==e)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let c=s!==e.version;if("error"in l){let e=this.getEntry(n);this.store.setState(a,{key:n,url:r,tags:i,data:e?.data,error:l.error,isFetching:!1},{ttl:0})}else{let o=!c&&(t.isCacheable?.(l.data)??!0);this.store.setState(a,{key:n,url:r,tags:i,data:l.data,isFetching:!1},{ttl:o?this.ttlOf(e,t):0})}return c?this.fetchActive(e):Promise.resolve()},c=new AbortController;return e.controller=c,e.inFlight=t.fetcher(c.signal).then(e=>l({data:e}),e=>l({error:e})),e.inFlight}ttlOf(e,t){let n=e.observers.size>0?1/0:t.staleTime;return e.observers.forEach(e=>{n=Math.min(n,e.staleTime)}),n}ensure(e){let t=TC(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){if(!(e.holds>0||e.observers.size>0)){if(this.cancelGc(e),e.gcTime<=0)return void this.collect(e);e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)}}collect(e){let t=TC(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(CC(e.key),void 0,{unmount:!0}))}},{useStore:EC}=Ot(),IC=()=>typeof location>"u"?void 0:location.href,_C=e=>{try{return new URL(e,IC()).origin}catch{return}},OC=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim()):"string"==typeof e?e.split(",").map(e=>e.trim()).filter(Boolean):[],NC=e=>{try{return new URL(e,IC()).href}catch{return e}},MC=(e={})=>e.url||e.elements?.length?AC.invalidate((({url:e,elements:t})=>{let n=e?NC(e):void 0;return e=>(void 0===n||NC(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))})(e)):AC.invalidate(),PC=({method:e,url:t,credentials:n,headers:r})=>JSON.stringify([e.toLowerCase(),t,n,Object.entries(r).filter(([e])=>"content-type"!==e.toLowerCase()).sort(([e],[t])=>e<t?-1:+(e>t))]),LC=({mode:e,fallback:t,elements:n,url:r})=>{let i="origin"===e||"all"===e||"elements"===e||"none"===e?e:t;if("none"===i)return Promise.resolve();if("elements"===i){let e=OC(n);return e.length>0?MC({elements:e}):Promise.resolve()}return"origin"===i&&r?(e=>{let t=_C(e);return t?AC.invalidate(e=>_C(e.url)===t):Promise.resolve()})(r):MC()},DC=async(e,t,n,r,i,a=!1)=>{if(!e)return{status:400,data:"URL is required"};let o=new Headers(r);o.has("Accept")||o.set("Accept","application/json");let s={method:t,credentials:n,headers:o,signal:i};"get"!==t&&(s.body="{}",o.has("Content-Type")||o.set("Content-Type","application/json"));try{let o=await fetch(e,s),l=await o.json(),c=Qr(o.status,l);return c&&await Xr({reason:c,url:e})&&!a&&!i.aborted?await DC(e,t,n,r,i,!0):{status:o.status,data:l}}catch(e){if(i.aborted)throw e;return console.error(e.message),{status:500,data:e.message}}},zC=e=>e.status<400,RC=(e,t)=>{let n="number"==typeof e?e:Number(e);return 1e3*(Number.isFinite(n)&&n>=0?n:t)},jC=e=>qr(e).map(e=>({path:e,name:e.split(".").slice(-2).join(" ")})),$C=ld(({ref:e,className:t="",children:r,query:i="",method:a="get",accessToken:o="",when:s=$r,headers:l=$r,mockData:c="{}",subType:d="",credentials:p="same-origin",singleRecord:m=!1,pagination:y="none",pageParam:v="page",renderWhileLoading:w=!1,loadingSlot:T="",cache:C=!1,staleTime:A=30,gcTime:E=300,refreshSeconds:_=0})=>{let{id:O,visible:N,definition:{label:M="Api Container",runtime:P,items:L}}=cd(),D="server"===P,{loaded:z,stale:R,location:j,elementData:$,refresh:F}=kC(),q=jl(wC.sourceType,O),{settings:{previewMode:B},contexts:{InteractionsContext:H}}=sc(),{interactionsManager:W}=f(H),[[V,G,K]]=zt(["navigation.routeParams","navigation.queryParams","navigation.navigate"]),Y=k(()=>o?{...l,Authorization:`Bearer ${o}`}:l,[l,o]),J=k(()=>!(D||!N||!(B&&i&&(s===$r||Oa(s,{...V,...G}))||!B&&(i||c&&"{}"!==c&&c!==$r))),[D,N,B,i,s,V,G,c]),X=k(()=>[O],[O]),{isLoading:Z,isFetching:Q,data:ee,refetch:te,isSuccess:ne,isError:re}=(({url:e="",method:t="get",mock:n,customHeaders:r=$r,enabled:i=!0,credentials:a="same-origin",cache:o=!1,staleTime:s=30,gcTime:l=300,tags:c})=>{let u=(e=>!!e&&"{}"!==e&&e!==$r)(n),d=b(),p=!u&&(!e||Xn(e)),f=k(()=>{if(u||p)return;let n=PC({method:t,url:e,credentials:a,headers:r});return o?n:`${n}#${d}`},[u,p,e,t,a,r,o,d]),m=h(n=>DC(e,t,a,r,n),[e,t,a,r]),y=(({key:e,meta:t,fetcher:n,enabled:r=!0,staleTime:i,gcTime:a=SC,isCacheable:o})=>{let s=void 0!==e,[l]=EC(CC(e??""),{store:AC.store,enabled:s}),c=s&&l?.key===e?l:void 0,u=void 0!==c&&AC.hasAnswer(c.key),d=x(n),p=x(o);g(()=>{d.current=n,p.current=o},[n,o]),g(()=>void 0===e?void 0:AC.hold(e,a),[e,a]);let{url:f}=t,m=t.tags?.join("\0")??"";g(()=>{if(r&&void 0!==e)return AC.observe(e,{meta:{url:f,tags:m?m.split("\0"):[]},staleTime:i,fetcher:e=>d.current(e),isCacheable:e=>p.current?.(e)??!0})},[r,e,f,m,i]);let y=u?c.data:void 0,b=x(void 0);void 0===y?b.current&&b.current.epoch!==AC.epoch&&(b.current=void 0):b.current={epoch:AC.epoch,data:y};let v=y??b.current?.data,w=(c?.isFetching??!1)||r&&s&&!u;return{data:v,isFetching:w,isLoading:w&&void 0===v,refetch:h(()=>{r&&void 0!==e&&AC.refetch(e)},[r,e])}})({key:f,meta:{url:e,tags:c},fetcher:m,enabled:i,staleTime:o?RC(s,30):0,gcTime:o?RC(l,300):0,isCacheable:zC}),v=k(()=>u?(e=>{if("string"!=typeof e)return{status:200,data:e};try{return{status:200,data:JSON.parse(e)}}catch(e){return{status:500,data:e.message}}})(n):void 0,[u,n]),w=i&&v?v:y.data,S=!v&&y.isFetching;return{isLoading:S&&void 0===w,isFetching:S,data:w,refetch:y.refetch,isSuccess:!p&&!S&&!!w&&w.status<400,isError:!p&&!S&&!!w&&w.status>=400}})({url:i,method:a,credentials:p,mock:B?void 0:c,customHeaders:Y,enabled:J,cache:C,staleTime:A,gcTime:E,tags:X}),ie=D&&!!j&&j!==au(),ae=D&&z&&!ie&&null===$,oe=k(()=>{if(!D)return ee??$r;if($)return $;if(z)return $r;if("string"!=typeof c)return c;try{return JSON.parse(c||"{}")}catch{return $r}},[D,ee,$,z,c]),se=D?ie:Q,le=D?ie:Z,ce=x({}),ue=h((e,t)=>F(e,{...ce.current,...t}),[F]),de=h(async()=>{D?await ue([O]):te()},[D,te,ue,O]),pe=h(async({input:e}={})=>{let t=(e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t||"{}")}catch{return}if("object"==typeof t&&t&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).flatMap(([e,t])=>"string"==typeof t||"number"==typeof t||"boolean"==typeof t?[[e,String(t)]]:[]))})(e);t&&(ce.current=t),await de()},[de]);(({seconds:e,enabled:t,refresh:n})=>{let r=x(n);r.current=n;let i=Number(e),a=t&&Number.isFinite(i)&&i>0;g(()=>{if(!a)return;let e=!1,t=setInterval(()=>{e||"hidden"===document.visibilityState||(e=!0,Promise.resolve().then(()=>r.current()).catch(()=>{}).finally(()=>{e=!1}))},1e3*i);return()=>clearInterval(t)},[a,i])})({seconds:_,enabled:N&&(D?z&&!ie:J),refresh:de});let fe=oe,he=k(()=>Array.isArray(fe.records)?fe.records:[],[fe.records]),{records:me,isLoadingMore:ge,goToPage:ye,loadMore:be}=(({elementId:e,mode:t,pageParam:n,records:r,page:i,refresh:a,navigate:o})=>{let[s,l]=S(r),[c,u]=S(!1),d=x(0);g(()=>{if("append"===t){if(i<=1)return d.current=1,void l(r);d.current!==i&&(d.current=i,l(e=>[...e,...r]))}},[t,i,r]);let p=h(async r=>{let i=Math.max(r,1);if("url"!==t){if(a){u(!0);try{await a([e],{[n]:String(i)})}finally{u(!1)}}}else o?.(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(n,i))},[t,o,n,a,e]),f=h(()=>p(i+1),[p,i]);return{records:"append"===t?s:r,isLoadingMore:c,goToPage:p,loadMore:f}})({elementId:O,mode:y,pageParam:v,records:he,page:fe.pageInfo?.page??1,refresh:ue,navigate:K}),ve=(({serverMode:e,isSuccess:t,isError:n,rscResolved:r,rscPending:i,elementData:a})=>e?r&&!i?null==a?"error":"success":void 0:t?"success":n?"error":void 0)({serverMode:D,isSuccess:ne,isError:re,rscResolved:z,rscPending:ie,elementData:$});g(()=>{!se&&O&&ve&&W.interactionTrigger(O,"success"===ve?"onApiSuccess":"onApiError",{url:i,method:a,...oe})},[oe,O,W,se,a,ve,i]);let we=k(()=>({...oe,...Array.isArray(fe.records)?{records:me}:$r,isLoading:se||ge,isEmpty:xC(fe,me,m),hasError:ae,errorMessage:ae?"The data provider could not be reached":"",isStale:D&&R}),[oe,fe.records,fe.record,me,se,ge,m,ae,D,R]),ke=h(()=>jC(we),[we]);$l({id:O,source:q,name:M||`API - ${O}`,fields:ke});let{writeRecord:xe}=(({elementId:e,enabled:t,actionPath:n="/_action",onDone:r})=>({writeRecord:h(async(i={})=>{let{action:a,recordId:o,...s}=i;if(!t||"string"!=typeof a||!a)return;let l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({elementId:e,action:a,recordId:o,values:s})});if(!l.ok){let e=Qr(l.status,await l.json().catch(()=>{}));throw e&&Xr({reason:e,url:n}),Error(`Write failed with status ${l.status}`)}let c=await l.json();return MC(),await(r?.()),c.record},[n,e,t,r])}))({elementId:O,enabled:D,onDone:de}),Se=k(()=>{let e={performQuery:{...wC.callbacks.performQuery,title:`Perform Query ${M}`,callback:pe},loadMore:{...wC.callbacks.loadMore,title:`Load More ${M}`,callback:be},goToPage:{...wC.callbacks.goToPage,title:`Go To Page ${M}`,callback:({page:e})=>ye(Number(e)||1)}};return D&&(e.writeRecord={...wC.callbacks.writeRecord,title:`Write Record ${M}`,callback:xe}),e},[M,pe,be,ye,D,xe]),Te=k(()=>T&&B?((e,t,r)=>n.toArray(e).filter(e=>{let n=u(e)&&"string"==typeof e.key&&e.key.endsWith(`$${t}`);return r?n:!n}))(r,T,le):r,[r,le,T,B]),Ce=k(()=>q?{runtime:{sources:{[q]:we}}}:$r,[we,q]);/* @__PURE__ */
91
- return I(Ud,{ref:e,tag:B||L?.length?d:"div",className:U("plitzi-component__api-container",t),interactionTriggers:wC.triggers,interactionCallbacks:Se,children:(!le||w||T)&&/* @__PURE__ */I(At,{inherit:"live",name:`Api:${O}`,value:Ce,children:Te})})}),FC=Object.assign($C,wC),qC={type:"channel",attributeValues:{subType:["","div","section","aside","main"]},sourceType:"channel",triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:""}},onJoin:{action:"onJoin",title:"On Join",type:"trigger",params:{},preview:{from:"",user:"",state:{}}},onLeave:{action:"onLeave",title:"On Leave",type:"trigger",params:{},preview:{from:"",user:"",state:{}}}},callbacks:{publish:{action:"publish",title:"Publish",type:"callback",preview:{},params:{type:{label:"Type",defaultValue:"",type:"text"},data:{label:"Data (JSON or a template)",defaultValue:"",type:"text"}}},setPresence:{action:"setPresence",title:"Set Presence",type:"callback",preview:{},params:{data:{label:"State (JSON or a template)",defaultValue:"",type:"text"}}}},content:{attributes:{topic:"",grant:"",keep:20,subType:""},definition:{label:"Channel",type:"channel",description:"A realtime channel: every page on the same `topic` hears what any of them publishes, within milliseconds. The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`) and `last`. It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{name:"Channel",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},BC=[500,1e3,2e3,5e3,1e4],UC=e=>"object"==typeof e&&!!e&&"connection"in e&&"string"==typeof e.connection&&"refused"in e&&Array.isArray(e.refused),HC=e=>"object"==typeof e&&!!e&&"topic"in e&&"string"==typeof e.topic&&"type"in e&&"string"==typeof e.type,WC=e=>{let t="message",n=[];for(let r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&n.push(r.slice(6));if(n.length)try{return{event:t,data:JSON.parse(n.join("\n"))}}catch{return}},VC=(e,t,n)=>{"success"===e?Hl.success("realtime",t,n):"warning"===e?Hl.warning("realtime",t,n):"danger"===e?Hl.danger("realtime",t,n):Hl.info("realtime",t,n)},GC=/* @__PURE__ */new Map,KC=/* @__PURE__ */new WeakMap,YC=(e,{grant:t,presence:n,onMessage:r,onJoin:i,onLeave:a}={})=>{let[o]=Mt("realtime.endpoint"),[s]=Mt("realtime.transport"),l=k(()=>o&&typeof window<"u"?((e,t="sse")=>{let n=`${t} ${e}`,r=GC.get(n);if(r)return r;let i=((e,{transport:t="sse",fetchImpl:n=fetch,WebSocketImpl:r=globalThis.WebSocket}={})=>{let i,a,o,s=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u="idle",d=/* @__PURE__ */new Map,p=0,f="websocket"===t&&"function"==typeof r,h=()=>[...s.keys()].sort().join(","),m=e=>{u=e;let t=h().split(",").filter(Boolean),n=i?.transport??(f?"websocket":"sse");VC("open"===e?"success":"closed"===e?"warning":"info",`${e} · ${t.join(", ")||"no topics"}`,{event:"status",status:e,topics:t,transport:n}),c.forEach(t=>t(e))},g=e=>{for(let[t,n]of e)d.set(t,n),VC("danger",`${t} refused: ${n}`,{event:"refused",topic:t,reason:n})},y=e=>{"$revoked"===e.type&&"server"===e.from&&g([[e.topic,"revoked"]]),VC("info",`${e.topic} ← ${e.type}`,{event:"received",message:e}),s.get(e.topic)?.forEach(t=>t(e))},b=(e,t)=>{e.me=t.connection,d=/* @__PURE__ */new Map,g(t.refused.map(e=>[e.topic,e.reason])),p=0,m("open")},v=e=>{if(i!==e)return;m("connecting");let t=BC[Math.min(p,BC.length-1)];p+=1,o=setTimeout(x,t)},w=(t,r)=>{let a,o=new AbortController,s={topics:t,transport:"sse",close:()=>o.abort(),publish:async(t,r,o)=>{if(!a)return!1;let l=await n(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({token:a,topic:t,type:r,data:o})}).catch(()=>{});return 401===l?.status&&i===s&&x(),l?.ok??!1}};return n(`${e}?${r}`,{headers:{accept:"text/event-stream"},credentials:"same-origin",signal:o.signal}).then(async e=>{if(!e.ok)return d=/* @__PURE__ */new Map,g(t.split(",").map(t=>[t,`http_${String(e.status)}`])),void m("closed");throw await(async e=>{let t=e.body?.getReader();if(!t)return;let n=new TextDecoder,r="";for(;;){let{done:e,value:i}=await t.read();if(e)return;r+=n.decode(i,{stream:!0});let o=r.indexOf("\n\n");for(;-1!==o;){let e=WC(r.slice(0,o));r=r.slice(o+2),o=r.indexOf("\n\n"),"ready"===e?.event&&UC(e.data)?(a=e.data.token,b(s,e.data)):"message"===e?.event&&HC(e.data)&&y(e.data)}}})(e),Error("The realtime stream ended")}).catch(()=>{o.signal.aborted||v(s)}),s},k=(t,n)=>{let a=new r(((e,t)=>{let n=new URL(`${e}?${t}`,globalThis.location.href);return n.protocol="https:"===n.protocol?"wss:":"ws:",n.href})(e,n)),o=/* @__PURE__ */new Map,s=0,l=!1,c=!1,u=()=>{o.forEach(e=>e(!1)),o.clear()},d={topics:t,transport:"websocket",close:()=>{c=!0,u(),a.close()},publish:(e,t,n)=>new Promise(r=>{if(a.readyState!==a.OPEN)return void r(!1);s+=1;let i=s,l=setTimeout(()=>{o.delete(i),r(!1)},5e3);o.set(i,e=>{clearTimeout(l),r(e)}),a.send(JSON.stringify({id:i,topic:e,type:t,data:n}))})};return a.onmessage=e=>{let t=(e=>{try{let t=JSON.parse(String(e));return"object"==typeof t&&t&&"event"in t&&"string"==typeof t.event?{event:t.event,data:"data"in t?t.data:void 0}:void 0}catch{return}})(e.data);"ready"===t?.event&&UC(t.data)?(l=!0,b(d,t.data)):"message"===t?.event&&HC(t.data)?y(t.data):"ack"===t?.event&&(e=>"object"==typeof e&&!!e&&"id"in e&&"number"==typeof e.id&&"ok"in e&&"boolean"==typeof e.ok)(t.data)&&(o.get(t.data.id)?.(t.data.ok),o.delete(t.data.id))},a.onclose=()=>{if(u(),!c&&i===d){if(!l)return f=!1,void x();v(d)}},d};function x(){i?.close(),i=void 0;let e=h();if(!e)return void m("idle");m("connecting");let t=(e=>{let t=e.split(",").flatMap(e=>l.get(e)??[]);return`topics=${encodeURIComponent(e)}${t.length?`&grants=${encodeURIComponent(t.join(","))}`:""}`})(e);i=f?k(e,t):w(e,t)}let S=(e=!1)=>{clearTimeout(a),clearTimeout(o),a=setTimeout(()=>{(e||i?.topics!==h())&&x()},30)},T=e=>"open"===u&&!0===i?.topics.split(",").includes(e),C={subscribe:(e,t)=>{let n=s.get(e)??/* @__PURE__ */new Set;return n.add(t),s.set(e,n),S(),()=>{n.delete(t),n.size||(s.delete(e),l.delete(e),S())}},grant:(e,t)=>{if(l.get(e)===t)return;t?l.set(e,t):l.delete(e);let n=T(e)&&!d.has(e);t&&s.has(e)&&!n&&S(!0)},publish:async(e,t,n)=>{let r=!(!(await(e=>T(e)?Promise.resolve(!0):new Promise(t=>{let n=setTimeout(()=>{r(),t(!1)},5e3),r=C.onStatus(i=>{("closed"===i||T(e))&&(clearTimeout(n),r(),t("closed"!==i))})}))(e))||!i)&&await i.publish(e,t,n);return VC(r?"info":"danger",`${e} → ${t}${r?"":" (not delivered)"}`,{event:"published",topic:e,type:t,data:n,delivered:r}),r},onStatus:e=>(c.add(e),()=>c.delete(e)),get status(){return u},get me(){return i?.me},get transport(){return i?.transport??(f?"websocket":"sse")},refusal:e=>d.get(e)};return C})(e,{transport:t});return GC.set(n,i),i})(o,s):void 0,[o,s]),[c,u]=S(!1),[d,p]=S([]),f=x(void 0),m=x({onMessage:r,onJoin:i,onLeave:a});g(()=>{m.current={onMessage:r,onJoin:i,onLeave:a}}),g(()=>{l&&e&&t&&l.grant(e,t)},[l,e,t]),g(()=>{if(!l||!e)return;let t=((e,t,n)=>{let r=KC.get(e)??/* @__PURE__ */new Map;KC.set(e,r);let i=r.get(t)??((e,t,n)=>{let r,i=/* @__PURE__ */new Map,a=/* @__PURE__ */new Set,o=/* @__PURE__ */new Set,s=!1,l=()=>[...s&&e.me?[{from:e.me,state:r,me:!0}]:[],...[...i.values()].map(e=>e.member)],c=()=>{let e=l();o.forEach(t=>t.onChange(e))},u=e=>{let t=e.flatMap(e=>{let t=i.get(e);return i.delete(e),t?[t.member]:[]});if(t.length){c();for(let e of t)o.forEach(t=>t.onDepart?.(e))}},d=()=>{s&&e.publish(t,"$presence",r)},p=e.subscribe(t,t=>{if(t.from!==e.me){if("$presence"===t.type){let e={from:t.from,...t.user?{user:t.user}:{},state:t.data,me:!1},n=!i.has(t.from)&&a.delete(t.from);i.set(t.from,{member:e,heardAt:Date.now()}),c(),n&&o.forEach(t=>t.onArrive?.(e))}else"$leave"===t.type?(a.delete(t.from),u([t.from])):"$join"===t.type?(a.add(t.from),d()):"$revoked"===t.type&&"server"===t.from&&(i.clear(),a.clear(),c());o.forEach(e=>e.onMessage?.(t))}}),f=e.onStatus(e=>{"open"===e&&(d(),c())}),h=setInterval(()=>{d();let e=Date.now();u([...i].filter(([,t])=>e-t.heardAt>65e3).map(([e])=>e))},2e4);return{members:l,set:e=>{r=e,s=!0,d(),c()},listeners:o,teardown:()=>{clearInterval(h),f(),p(),n()}}})(e,t,()=>r.delete(t));r.set(t,i),i.listeners.add(n);let a=i.members();return a.length&&n.onChange(a),{set:i.set,members:i.members,stop:()=>{i.listeners.delete(n)&&!i.listeners.size&&i.teardown()}}})(l,e,{onChange:p,onMessage:e=>{"$revoked"===e.type&&"server"===e.from&&u(!1),m.current.onMessage?.(e)},onArrive:e=>m.current.onJoin?.(e),onDepart:e=>m.current.onLeave?.(e)});f.current=t,u("open"===l.status&&!l.refusal(e));let n=l.onStatus(t=>u("open"===t&&!l.refusal(e)));return()=>{n(),t.stop(),f.current=void 0,p([]),u(!1)}},[l,e]);let y=void 0===n?void 0:JSON.stringify(n);g(()=>{void 0!==y&&f.current?.set(JSON.parse(y))},[y,l,e]);let b=h((t,n)=>l&&e?l.publish(e,t,n):Promise.resolve(!1),[l,e]),v=h(e=>f.current?.set(e),[]);return{connected:c,me:c?l?.me:void 0,members:d,publish:b,setPresence:v}},JC=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},XC=/* @__PURE__ */new Set(["$presence","$join","$leave"]),ZC=ld(({ref:e,className:t,children:n,topic:r="",grant:i="",presence:a,keep:o=20,subType:s=""})=>{let{id:l,definition:{label:c="Channel"}}=cd(),{settings:{previewMode:u},contexts:{InteractionsContext:d}}=sc(),{interactionsManager:p}=f(d),m=Math.max(0,Number(o)||0),[g,y]=S([]),b=h(e=>{XC.has(e.type)||(m>0&&y(t=>[...t,e].slice(-m)),p.interactionTrigger(l,"onMessage",{...e}))},[l,p,m]),v=h(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onJoin",{from:e,user:t??"",state:n})},[l,p]),w=h(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onLeave",{from:e,user:t??"",state:n})},[l,p]),x=YC(u&&r?r:void 0,{grant:i||void 0,presence:void 0===a||""===a?void 0:JC(a),onMessage:b,onJoin:v,onLeave:w}),T=k(()=>({publish:{...qC.callbacks.publish,callback:({type:e,data:t})=>"string"==typeof e&&e?x.publish(e,JC(t)):Promise.resolve(!1)},setPresence:{...qC.callbacks.setPresence,callback:({data:e})=>x.setPresence(JC(e))}}),[x]),C=jl(qC.sourceType,l),A=k(()=>({connected:x.connected,me:x.me??"",members:x.members,messages:g,last:g.at(-1)??null}),[x.connected,x.me,x.members,g]),E=h(()=>jC(A),[A]);$l({id:l,source:C,name:c||`Channel - ${l}`,fields:E});let _=k(()=>C?{runtime:{sources:{[C]:A}}}:$r,[A,C]);/* @__PURE__ */
92
- return I(Ud,{ref:e,tag:s,className:U("plitzi-component__channel",t),interactionTriggers:qC.triggers,interactionCallbacks:T,children:/* @__PURE__ */I(At,{inherit:"live",name:`Channel:${l}`,value:_,children:n})})}),QC=Object.assign(ZC,qC),eA={type:"carousel",sourceType:"carousel",triggers:{onChange:{action:"onChange",title:"On Slide Change",type:"trigger",params:{},preview:{index:"0",item:{}}}},callbacks:{next:{action:"next",title:"Next Slide",type:"callback",params:{},preview:{}},previous:{action:"previous",title:"Previous Slide",type:"callback",params:{},preview:{}},goTo:{action:"goTo",title:"Go To Slide",type:"callback",params:{index:{type:"text",label:"Index (from 0)",defaultValue:"0",canBind:!0}},preview:{}},play:{action:"play",title:"Play",type:"callback",params:{},preview:{}},pause:{action:"pause",title:"Pause",type:"callback",params:{},preview:{}}},content:{attributes:{items:[],mode:"slide",autoplay:0,pauseOnHover:!0,loop:!0,transition:"slide",speed:30,label:""},definition:{label:"Carousel",type:"carousel",description:"Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-images"},defaultStyle:{name:"Carousel",displayMode:"desktop",style:{base:{default:{position:"relative"}}}},settings:{}},initialItems:["carouselTrack"]},tA=l(void 0);tA.displayName="CarouselContext";var nA=(e,t,n,r)=>{if(t<=0)return 0;let i=e+n;return r?(i%t+t)%t:Math.min(t-1,Math.max(0,i))},rA=(e,t)=>{let n="number"==typeof e?e:Number(e);return!Number.isFinite(n)||t<=0?0:Math.min(t-1,Math.max(0,Math.trunc(n)))},iA=(e,t)=>t<e?"previous":"next",aA=e=>{let t=e.firstElementChild;if(!(t instanceof HTMLElement))return 0;let n=Number.parseFloat(getComputedStyle(e).columnGap);return t.offsetWidth+(Number.isFinite(n)?n:0)},oA=(e,t)=>{let n=e.map(e=>{let n=ar(e,t);return"string"==typeof n||"number"==typeof n?`${t}:${String(n)}`:void 0});if(n.every(e=>void 0!==e)&&new Set(n).size===n.length)return n},sA=(e,t)=>(t?oA(e,t):void 0)??oA(e,"id")??e.map((e,t)=>t),lA=ld(({ref:e,className:t="",children:n,items:r=[],mode:i="slide",autoplay:a=0,pauseOnHover:o=!0,loop:s=!0,transition:l="slide",speed:c=30,itemKey:u,label:d=""})=>{let{id:p,definition:{label:m="Carousel"}}=cd(),y=jl(eA.sourceType,p),{settings:{previewMode:b},contexts:{InteractionsContext:v}}=sc(),{interactionsManager:w}=f(v),T=k(()=>Array.isArray(r)?r:[],[r]),C=k(()=>sA(T,u),[T,u]),A=T.length,E=!!b,[_,O]=S(0),[N,M]=S("next"),[P,L]=S(!1),[D,z]=S(a>0),R=x(null),j=e??R,$=x(null),F=rA(_,A);g(()=>{_!==F&&O(F)},[_,F]);let q=h((e,t)=>{0!==A&&e!==F&&(M(t),L(!0),O(e),w.interactionTrigger(p,"onChange",{index:e,item:T[e]}))},[A,F,p,w,T]),B=h(e=>{let t=$.current,n=t?aA(t):0;t&&n>0&&t.scrollBy({left:e*n,behavior:"smooth"})},[]),H=h(()=>{"scroll"!==i?q(nA(F,A,1,s),"next"):B(1)},[A,F,s,i,q,B]),W=h(()=>{"scroll"!==i?q(nA(F,A,-1,s),"previous"):B(-1)},[A,F,s,i,q,B]),V=h(e=>{let t=rA(e.index,A);"scroll"!==i?q(t,iA(F,t)):B(t-F)},[A,F,i,q,B]),G=h(e=>{e!==F&&q(e,iA(F,e))},[F,q]);(({delay:e,active:t,rootRef:n,pauseOnHover:r,position:i,onTick:a})=>{let[o,s]=S(!1),[l,c]=S(!1),u=x(a);g(()=>{u.current=a},[a]),g(()=>{let e=n.current;if(!e||!t)return;let r=()=>s(!0),i=()=>s(!1),a=e=>{e.target instanceof Element&&e.target.matches(":focus-visible")&&c(!0)},o=t=>{(!(t.relatedTarget instanceof Node)||!e.contains(t.relatedTarget))&&c(!1)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",i),e.addEventListener("focusin",a),e.addEventListener("focusout",o),()=>{e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",i),e.removeEventListener("focusin",a),e.removeEventListener("focusout",o)}},[n,t]);let d=r&&o||l;g(()=>{if(!t||e<=0||d||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=window.setInterval(()=>{"visible"===document.visibilityState&&u.current()},e);return()=>window.clearInterval(n)},[t,e,d,i])})({delay:"slide"===i?a:0,active:E&&D&&A>1,rootRef:j,pauseOnHover:o,position:F,onTick:H});let K=k(()=>({next:{...eA.callbacks.next,callback:H},previous:{...eA.callbacks.previous,callback:W},goTo:{...eA.callbacks.goTo,callback:V},play:{...eA.callbacks.play,callback:()=>z(!0)},pause:{...eA.callbacks.pause,callback:()=>z(!1)}}),[V,H,W]),Y=k(()=>({items:T,count:A,index:F,item:T[F],playing:D&&a>0}),[a,A,F,T,D]),J=h(()=>jC(Y),[Y]);$l({id:p,source:y,name:m||`Carousel - ${p}`,fields:J});let X=k(()=>y?{runtime:{sources:{[y]:Y}}}:$r,[y,Y]),Z=k(()=>({source:y,items:T,keys:C,index:F,direction:N,moved:P,mode:i,transition:l,speed:c,pauseOnHover:o,live:E,scrollerRef:$,onScrolledTo:G}),[F,N,C,T,E,i,P,G,o,y,c,l]);/* @__PURE__ */
93
- return I(Ud,{ref:j,className:U("plitzi-component__carousel",`carousel--${i}`,t),role:"region","aria-roledescription":"carousel","aria-label":d||void 0,interactionTriggers:eA.triggers,interactionCallbacks:K,children:/* @__PURE__ */I(At,{inherit:"live",name:`Carousel:${p}`,value:X,children:/* @__PURE__ */I(tA,{value:Z,children:n})})})}),cA=({children:e,className:t="",isTemplate:n=!1,index:r=0,record:i,source:a=""})=>{let o=b(),s=k(()=>a?{runtime:{sources:{[a]:{item:i,index:r}}}}:$r,[a,i,r]),l=/* @__PURE__ */I(_S,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Row:${a}`,segment:o,value:s,children:e})});return n?/* @__PURE__ */_("div",{className:U("plitzi-component__controlled-list-item",t),children:[/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${r+1}`}),l]}):l},uA=({source:e,item:t,position:r,count:i,copy:a=!1,className:o="",children:s})=>{let l=0===n.count(s);/* @__PURE__ */
94
- return _("div",{className:U("carousel__slide",o),role:"group","aria-roledescription":"slide","aria-label":`${String(r+1)} of ${String(i)}`,"aria-hidden":a||void 0,inert:a||void 0,children:[l&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:`Slide ${String(r+1)}`}),!l&&/* @__PURE__ */I(cA,{index:r,isTemplate:!1,record:t,source:e,children:s})]})},dA=({source:e,items:t,keys:n,speed:r,pauseOnHover:i,live:a,children:o})=>{let s=x(null),[l,c]=S(void 0);g(()=>{let e=s.current;if(!e||r<=0)return;let t=()=>c(e.scrollWidth/2/r);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,t.length]);let u={"--plitzi-marquee-duration":`${String(l??0)}s`};/* @__PURE__ */
95
- return _("div",{ref:s,className:U("carousel__marquee",{"carousel__marquee--running":a&&void 0!==l,"carousel__marquee--pause-on-hover":i}),style:u,children:[t.map((r,i)=>/* @__PURE__ */I(uA,{source:e,item:r,position:i,count:t.length,children:o},String(n[i]))),a&&t.map((r,i)=>/* @__PURE__ */I(uA,{source:e,item:r,position:i,count:t.length,copy:!0,children:o},`copy:${String(n[i])}`))]})},pA=({source:e,items:t,keys:n,scrollerRef:r,onScrolledTo:i,children:a})=>{let o=x(0),s=h(()=>{cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=r.current,t=e?aA(e):0;e&&t>0&&i(Math.round(e.scrollLeft/t))})},[r,i]);/* @__PURE__ */
96
- return I("div",{ref:r,className:"carousel__scroller",onScroll:s,children:t.map((r,i)=>/* @__PURE__ */I(uA,{source:e,item:r,position:i,count:t.length,children:a},String(n[i])))})},fA=ld(({ref:e,className:t="",children:n})=>{let r=f(tA),i=r?.items??[],a=r?.mode,o=i.length>0;/* @__PURE__ */
97
- return _(Ud,{ref:e,className:U("plitzi-component__carousel-track",t),children:[!r&&n,r&&!o&&!r.live&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:"This carousel has no items"}),r&&o&&"slide"===a&&/* @__PURE__ */I(uA,{source:r.source,item:i[r.index],position:r.index,count:i.length,className:U(r.live&&r.moved&&`carousel__slide--${r.transition}-${r.direction}`),children:n},String(r.keys[r.index])),r&&o&&"scroll"===a&&/* @__PURE__ */I(pA,{source:r.source,items:i,keys:r.keys,scrollerRef:r.scrollerRef,onScrolledTo:r.onScrolledTo,children:n}),r&&o&&"marquee"===a&&/* @__PURE__ */I(dA,{source:r.source,items:i,keys:r.keys,speed:r.speed,pauseOnHover:r.pauseOnHover,live:r.live,children:n})]})}),hA=Object.assign(fA,{type:"carouselTrack",ancestorType:"carousel",content:{attributes:{},definition:{label:"Carousel Track",type:"carouselTrack",description:"Where a carousel shows its slides: what is inside is one slide, rendered once per item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-film"},defaultStyle:{name:"Carousel Track",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),mA=Object.assign(lA,{...eA,plugins:{carouselTrack:hA}}),gA=["div","header","footer","nav","main","section","article","aside","figure"],yA=ld(({ref:e,className:t="",subType:n="div",label:r="",decorative:i=!1,children:a})=>{let o=!i&&r&&gA.includes(n)?{"aria-label":r,..."div"===n?{role:"group"}:{}}:{},s=i?{"aria-hidden":!0}:{};/* @__PURE__ */
98
- return I(Ud,{ref:e,tag:n,className:U(`plitzi-component__container plitzi-component__container-${n}`,t),...o,...s,children:a})}),bA=Object.assign(yA,{type:"container",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure","dl","dt","dd","li","h1","h2","h3","h4","h5","h6","span"]},content:{attributes:{subType:"div"},definition:{label:"Container",type:"container",description:"Generic layout box (a div). The primary building block for structure: groups and positions child elements with flex/grid. Reach for it whenever you need to wrap or arrange other elements.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-square"},defaultStyle:{name:"Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),vA={type:"dialogContainer",sourceType:"dialogContainer",triggers:{onDialogAccept:{action:"onDialogAccept",title:"On Dialog Accept",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogReject:{action:"onDialogReject",title:"On Dialog Reject",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogOpen:{action:"onDialogOpen",title:"On Dialog Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogClose:{action:"onDialogClose",title:"On Dialog Close",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}}},callbacks:{openDialog:{action:"openDialog",title:"Open Dialog",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeDialog:{action:"closeDialog",title:"Close Dialog",type:"callback",preview:{},params:{}}},content:{attributes:{headerLabel:"Dialog Header",acceptButtonLabel:"Accept",rejectButtonLabel:"Cancel",autoHideAfterClick:!0},definition:{label:"Dialog Container",type:"dialogContainer",description:"A native <dialog> container shown or hidden through interactions (e.g. an onClick open/close).",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Dialog Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2",color:"#333"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0"}},footerContainer:{default:{display:"flex","justify-content":"flex-end","margin-top":"8px"}}},subTypes:{}},settings:{}},initialItems:["container"]},wA=({panelRef:e,open:t,onClose:n})=>{let r=y(n);g(()=>{let n=e.current;if(!t||!n)return;let i=n.ownerDocument.activeElement;n.contains(i)||n.focus({preventScroll:!0});let a=e=>{if(e.defaultPrevented)return;if("Escape"===e.key)return e.preventDefault(),void r();if("Tab"!==e.key)return;let t=(e=>[...e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]')].filter(e=>"function"!=typeof e.checkVisibility||e.checkVisibility()))(n);if(0===t.length)return e.preventDefault(),void n.focus({preventScroll:!0});let i=t[0],a=t[t.length-1],o=n.ownerDocument.activeElement;!e.shiftKey||o!==i&&o!==n&&n.contains(o)?!e.shiftKey&&(o===a||!n.contains(o))&&(e.preventDefault(),i.focus()):(e.preventDefault(),a.focus())},o=n.ownerDocument.defaultView;return o?.addEventListener("keydown",a),()=>{o?.removeEventListener("keydown",a),i instanceof HTMLElement&&i.isConnected&&i.focus({preventScroll:!0})}},[t,e])},kA=ld(({ref:e,className:t="",children:n,headerLabel:r="Dialog Header",acceptButtonLabel:i="Accept",acceptButtonLabelLoading:a="Loading...",rejectButtonLabel:o="Cancel",autoHideAfterClick:s=!0})=>{let{id:l,rootId:c,visible:u,setElementState:d,definition:{styleSelectors:p,label:m="Dialog"},elementState:y}=cd(),b=jl(vA.sourceType,l),{settings:{previewMode:v},contexts:{InteractionsContext:w}}=sc(),{interactionsManager:T}=f(w),[C,A]=S({}),[E,O]=S(!1),N=x(null),M=`${c}_${l}_title`,P=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)A(t);else if("string"==typeof t)try{A(JSON.parse(t))}catch{A({content:t})}else A("boolean"==typeof t||"number"==typeof t?{content:t}:{});d(e=>({...e,visibility:!0}))},[d,A]),L=h(()=>{T.interactionTrigger(l,"onDialogClose",{metadata:C}),A({}),d(e=>({...e,visibility:!1}))},[T,d,A,C,l]),D=h(()=>{s&&(T.interactionTrigger(l,"onDialogClose",{metadata:C}),A({}),d(e=>({...e,visibility:!1})))},[T,s,d,A,C,l]),z=h(async()=>{O(!0),await T.interactionTrigger(l,"onDialogAccept",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),R=h(async()=>{O(!0),await T.interactionTrigger(l,"onDialogReject",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),j=k(()=>({openDialog:{...vA.callbacks.openDialog,title:`Open ${m}`,callback:P},closeDialog:{...vA.callbacks.closeDialog,title:`Close ${m}`,callback:L}}),[L,P,m]);wA({panelRef:N,open:!!v&&u,onClose:()=>{R()}}),g(()=>{!1!==y.visibility&&T.interactionTrigger(l,"onDialogOpen",{metadata:C})},[l,T,C,y.visibility]);let $=h(()=>jC(C),[C]);$l({id:l,source:b,name:m||`Dialog - ${l}`,fields:$});let F=k(()=>b?{runtime:{sources:{[b]:C}}}:$r,[b,C]);/* @__PURE__ */
99
- return _(Ud,{ref:e,className:U("plitzi-component__dialog-container",t),interactionTriggers:vA.triggers,interactionCallbacks:j,children:[/* @__PURE__ */I("div",{className:U("dialog-container__background",p.backgroundContainer),"aria-hidden":"true",onClick:D}),/* @__PURE__ */_("div",{ref:N,className:U("dialog-container__root",p.rootContainer),role:"alertdialog","aria-modal":"true","aria-labelledby":M,tabIndex:-1,children:[
80
+ /* @__PURE__ */I("path",{d:"M0 1.5C0 0.947715 0.447715 0.5 1 0.5H11C11.5523 0.5 12 0.947715 12 1.5C12 2.05228 11.5523 2.5 11 2.5H1C0.447715 2.5 0 2.05228 0 1.5Z",fill:"currentColor"})]}),AT=Object.assign(TT,{...ST,content:{...ST.content,market:{...ST.content.market,icon:/* @__PURE__ */I(CT,{})}}}),ET={width:"100%",display:"flex","align-items":"center","border-right-color":"#6f7780","border-right-style":"solid","border-right-width":"1px","border-top-right-radius":"4px","border-bottom-color":"#6f7780","border-bottom-style":"solid","border-bottom-width":"1px","border-bottom-right-radius":"4px","border-bottom-left-radius":"4px","border-top-left-radius":"4px","border-left-color":"#6f7780","border-left-style":"solid","border-left-width":"1px","border-top-color":"#6f7780","border-top-style":"solid","border-top-width":"1px","user-select":"none","font-size":"14px","padding-left":"16px","padding-right":"16px","padding-top":"8px","padding-bottom":"8px","line-height":"20px",outline:"none",position:"relative"},IT={display:"flex",cursor:"pointer","font-weight":"600","font-size":"14px","line-height":"18px",color:"#6b7280","user-select":"none"},_T={...IT,"margin-bottom":"4px"},OT={display:"block",color:"red","margin-top":"4px"},NT={type:"formControl",attributeValues:{subType:["text","number","email","password","search","url","tel","date","time","checkbox","switch","select","textarea","hidden","color"]},triggers:{onChange:{action:"onChange",title:"On Change",type:"trigger",params:{},preview:{value:"",name:""}}},content:{attributes:{subType:"text",name:"",label:"Label",hideLabel:!1,placeholder:"",defaultValue:"",autoComplete:!0,autoFocus:!1,disabled:!1,options:[],required:!0,requiredMessage:"",minLength:0,minLengthMessage:"",maxLength:0,maxLengthMessage:"",formatMessage:"",pattern:"",patternMessage:"",matches:"",matchesMessage:"",readOnly:!1},definition:{label:"Form Control",type:"formControl",description:"A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input.",bindings:{},styleSelectors:{base:"",label:"",input:"",error:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"form",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee"},defaultStyle:{name:"Form Control",displayMode:"desktop",style:{base:{default:{}}},subTypes:{hidden:{name:"Form Control Hidden",displayMode:"desktop",style:{base:{},input:{default:{}},label:{default:_T},error:{default:OT}}},text:{name:"Form Control Text",displayMode:"desktop",style:{base:{default:{}},input:{default:ET},label:{default:_T},error:{default:OT}}},password:{name:"Form Control Password",displayMode:"desktop",style:{base:{default:{}},input:{default:ET},label:{default:_T},error:{default:OT}}},number:{name:"Form Control Number",displayMode:"desktop",style:{base:{default:{}},input:{default:ET},label:{default:_T},error:{default:OT}}},email:{name:"Form Control Email",displayMode:"desktop",style:{base:{default:{}},input:{default:ET},label:{default:_T},error:{default:OT}}},textarea:{name:"Form Control Textarea",displayMode:"desktop",style:{base:{default:{}},input:{default:ET},label:{default:_T},error:{default:OT}}},checkbox:{name:"Form Control Checkbox",displayMode:"desktop",style:{base:{default:{}},input:{default:{"margin-top":"0px","margin-bottom":"0px","margin-left":"0px","margin-right":"4px"}},label:{default:IT},error:{default:OT}}},select:{name:"Form Control Select",displayMode:"desktop",style:{base:{default:{}},input:{default:{...ET,cursor:"pointer"}},label:_T,error:{default:OT}}}}},settings:{}}},MT={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},PT=({ref:e,children:t,targetInput:n="",type:r="text",previewMode:i=!0,required:a=!0,hidden:o=!1,className:s=""})=>{let l=h(e=>{i||e.preventDefault()},[i]);/* @__PURE__ */
81
+ return _("label",i?{ref:e,className:U(`form-control__label-${r}`,s),htmlFor:n,style:o?MT:void 0,children:[t,a&&t&&/* @__PURE__ */I("span",{className:"form-control__label--required",children:"*"})]}:{ref:e,className:U(`form-control__label-${r}`,s),onClick:l,children:[t,a&&t&&/* @__PURE__ */I("span",{className:"form-control__label--required",children:"*"})]})},LT=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,DT=/* @__PURE__ */new Map([["email",{matches:e=>LT.test(e),message:"Enter an email address"}]]),zT=e=>"string"==typeof e?e:"number"==typeof e?String(e):"",RT=(e,t,n)=>{if((e=>null==e||""===e||!1===e)(e))return t.required?t.requiredMessage||"This field is required":"";if("boolean"==typeof e)return"";let r=zT(e),i=Array.from(r).length;if(t.minLength>0&&i<t.minLength)return t.minLengthMessage||`Use at least ${t.minLength} characters`;if(t.maxLength>0&&i>t.maxLength)return t.maxLengthMessage||`Use at most ${t.maxLength} characters`;let a=DT.get(t.type);return a&&!a.matches(r)?t.formatMessage||a.message:t.pattern&&!((e,t)=>{try{return RegExp(`^(?:${t})$`,"u").test(e)}catch{return!1}})(r,t.pattern)?t.patternMessage||"This is not in the expected format":t.matches&&r!==zT(ar(n,t.matches,""))?t.matchesMessage||"This does not match":""},jT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",required:a=!0,disabled:o=!1,onChange:s,onValidate:l,errorId:c})=>{let u=h(()=>l?.(),[l]);/* @__PURE__ */
82
+ return I("input",{className:U("form-control__checkbox-container",e),id:t,"aria-invalid":!!c||void 0,"aria-describedby":c,name:n,type:"checkbox",placeholder:r,value:i,required:a,disabled:o,onChange:s,onBlur:u})},$T=({className:e="",id:t="",name:n="",value:r="",required:i=!0,disabled:a=!1,previewMode:o=!0})=>/* @__PURE__ */_("div",{className:U("form-control__input-hidden-container",e),children:[o&&/* @__PURE__ */I("input",{className:"input-container__input-hidden",id:t,name:n,type:"hidden",value:r,required:i,disabled:a}),!o&&/* @__PURE__ */I("div",{className:"input-container__input-hidden--no-preview",children:"hidden input"})]}),FT=(e,t)=>{g(()=>{t&&e.current?.focus()},[e,t])},qT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",type:a="text",autoComplete:o=!1,autoFocus:s=!1,required:l=!0,maxLength:c=0,disabled:u=!1,readOnly:d=!1,onChange:p,onValidate:f,errorId:m})=>{let[g,y]=S(!1),b=x(null);FT(b,s);let v=h(()=>y(e=>!e),[y]),w=h(e=>{let t=b.current;if(t?.focus(),"color"===a&&t&&e.target!==t)try{t.showPicker()}catch{}},[b,a]),k=h(()=>f?.(),[f]);/* @__PURE__ */
83
+ return _("div",{className:U("form-control__input-container",e),onClick:w,children:[/* @__PURE__ */I("input",{ref:b,className:"input-container__input",id:t,"aria-invalid":!!m||void 0,"aria-describedby":m,name:n,type:"password"===a&&g?"text":a,placeholder:r,value:i,required:l,maxLength:c>0?c:void 0,autoComplete:o?"on":"off",disabled:u,readOnly:d,onChange:p,onBlur:k}),"password"===a&&/* @__PURE__ */I("button",{type:"button",className:"form-input__icon","aria-pressed":g,title:"Show password",onClick:v,children:/* @__PURE__ */I("i",{className:g?"fa-solid fa-eye-slash":"fa-solid fa-eye","aria-hidden":"true"})})]})},BT=({id:e="",name:t,options:n=[],placeholder:r="",value:i="",className:a="",disabled:o=!1,onChange:s,onValidate:l,errorId:c})=>{let u=x(null),d=h(()=>{u.current?.click()},[u]),p=h(e=>{e.stopPropagation()},[]),f=h(()=>l?.(),[l]),m=k(()=>Array.isArray(n)?n.map(e=>{if("string"==typeof e)return{value:e,label:e};if(void 0===e.value||void 0===e.label){let t=e.value??e.label??"";return{value:t,label:t}}return{value:e.value,label:e.label}}):[],[n]);/* @__PURE__ */
84
+ return I("div",{className:U("form-control__select-container",a),onClick:d,children:/* @__PURE__ */_("select",{ref:u,id:e,"aria-invalid":!!c||void 0,"aria-describedby":c,name:t,onChange:s,value:i,className:"select-container__select",disabled:o,onClick:p,onBlur:f,children:[r&&/* @__PURE__ */I("option",{value:"",children:r}),m.map((e,t)=>/* @__PURE__ */I("option",{value:e.value,children:e.label},t))]})})},UT=({className:e="",id:t="",name:n="",placeholder:r="",value:i="",autoFocus:a=!1,required:o=!0,maxLength:s=0,disabled:l=!1,readOnly:c=!1,onChange:u,onValidate:d,errorId:p})=>{let f=x(null);FT(f,a);let m=h(e=>{e.stopPropagation()},[]),g=h(()=>d?.(),[d]);/* @__PURE__ */
85
+ return I("textarea",{ref:f,className:U("form-control__textarea-container",e),id:t,"aria-invalid":!!p||void 0,"aria-describedby":p,name:n,placeholder:r,value:i,readOnly:c,required:o,maxLength:s>0?s:void 0,disabled:l,onChange:u,onBlur:g,onClick:m})},HT=ld((e=>{let t=t=>{let{ref:n,name:r="",subType:i="text",defaultValue:a="",required:o=!0,requiredMessage:s="",minLength:l=0,minLengthMessage:c="",maxLength:u=0,maxLengthMessage:d="",formatMessage:p="",pattern:f="",patternMessage:m="",matches:y="",matchesMessage:b="",previewError:v=!1}=t,{settings:{previewMode:w}}=sc(),{useStore:x}=Ot(),[T]=x("runtime.sources.form"),[C,A]=S(a),[E,_]=S(a);!T&&E!==a&&(_(a),A(a));let O=T?.values,N=k(()=>T?ar(O,r,a):C,[T,O,r,a,C]),M=k(()=>!w&&v?"This is an error message":T?.errors[r]??"",[w,v,T?.errors,r]),P=k(()=>({required:o,requiredMessage:s,minLength:l,minLengthMessage:c,maxLength:u,maxLengthMessage:d,type:i,formatMessage:p,pattern:f,patternMessage:m,matches:y,matchesMessage:b}),[o,s,l,c,u,d,i,p,f,m,y,b]),L=T?.registerValidator,D=T?.unregisterValidator,z=T?.setFieldValue,R=T?.setFieldError;g(()=>{if(r&&L&&D)return L(r,e=>RT(ar(e,r,a),P,e)),()=>D(r)},[r,a,P,L,D]),g(()=>{z&&a&&N&&r&&z(r,N)},[a,r,z,N]);let j=h(e=>{let t="radio"===e.target.type||"checkbox"===e.target.type||"switch"===i;z?z(r,t?e.target.checked:e.target.value):A(t?String(e.target.checked):e.target.value)},[z,r,i]),$=h(()=>R?.(r,RT(N,P,O??{})),[N,P,O,r,R]);return k(()=>/* @__PURE__ */I(e,{...t,ref:n,value:N,error:M,handleChange:j,handleValidate:$}),[t,n,M,N,j,$])};return t.displayName=`withFieldValue(${function(e){return e&&(e.displayName||e.name)||"Component"}(e)})`,t})(({ref:e,className:t="",subType:n="text",name:r="",label:i="Label",hideLabel:a=!1,placeholder:o="",autoComplete:s=!0,autoFocus:l=!1,disabled:c=!1,options:u=[],required:d=!0,maxLength:p=0,readOnly:m=!1,value:y="",error:b="",handleChange:v,handleValidate:w})=>{let{id:k,rootId:x,visible:S,definition:{styleSelectors:T}}=cd(),{settings:{previewMode:C},contexts:{InteractionsContext:A}}=sc(),{interactionsManager:E}=f(A),{useStore:O}=Ot(),[N]=O("runtime.sources.form"),M=h(e=>{if(v?.(e),!C)return;let{target:t}=e,i=t instanceof HTMLInputElement&&("checkbox"===t.type||"switch"===n)?t.checked:t.value;E.interactionTrigger(k,"onChange",{value:i,name:r})},[v,C,n,E,k,r]),P=N?.registerField,L=N?.unregisterField,D=["checkbox","switch"].includes(n),z="hidden"===n,R=l&&C&&S,j=b&&C?`${x}_${k}_error`:void 0;return g(()=>{if(P&&L)return P({name:r,path:r}),()=>L(r)},[r,P,L]),/* @__PURE__ */_(Vd,{ref:e,interactionTriggers:NT.triggers,className:U("plitzi-component__form-control",{"form-control--invalid":b&&C,[`plitzi-component__form-control-${n}`]:n},t),children:[!D&&!z&&i&&/* @__PURE__ */I(PT,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,type:n,required:d,hidden:a&&C,children:i}),D&&i&&/* @__PURE__ */_(PT,{targetInput:`${x}_${k}`,previewMode:C,className:T.label,type:n,required:d,children:["checkbox"===n&&/* @__PURE__ */I(jT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,required:d,disabled:c,onChange:M,onValidate:w,errorId:j}),a&&C?/* @__PURE__ */I("span",{style:MT,children:i}):i]}),"checkbox"===n&&!i&&/* @__PURE__ */I(jT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,required:d,disabled:c,onChange:M,onValidate:w,errorId:j}),["text","number","email","password","search","url","tel","date","time","color"].includes(n)&&/* @__PURE__ */I(qT,{id:`${x}_${k}`,name:r,value:y,type:n,className:T.input,placeholder:o,autoComplete:"password"!==n&&s,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m||!C,onChange:M,onValidate:w,errorId:j}),"hidden"===n&&/* @__PURE__ */I($T,{id:`${x}_${k}`,name:r,value:y,required:d,disabled:c,previewMode:C}),"select"===n&&/* @__PURE__ */I(BT,{id:`${x}_${k}`,name:r,onChange:M,onValidate:w,errorId:j,value:y,className:T.input,placeholder:o,disabled:c,options:u}),"textarea"===n&&/* @__PURE__ */I(UT,{id:`${x}_${k}`,name:r,value:y,className:T.input,placeholder:o,autoFocus:R,required:d,maxLength:p,disabled:c,readOnly:m,onChange:M,onValidate:w,errorId:j}),b&&/* @__PURE__ */I("div",{id:j,role:"alert",className:U("form-control__error-message",T.error),children:b})]})})),WT=Object.assign(HT,{...NT,content:{...NT.content,market:{...NT.content.market,icon:/* @__PURE__ */I(CT,{})}}}),VT=".plitzi-component--layout-body",GT=ld(({ref:e,className:t="",children:n,subType:r="div"})=>{let{plitziElementLayout:i}=cd(),{settings:{previewMode:a}}=sc(),o=h((e,t)=>{if(!e)return;if(!t)return void e.style.removeProperty("--child-clip");let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=e.offsetWidth>0?n.width/e.offsetWidth:1,a=(r.top-n.top)/i,o=(r.left-n.left)/i,s=o+r.width/i,l=a+r.height/i,c=`\n polygon(\n evenodd,\n /* outer rect */\n 0 0, 100% 0, 100% 100%, 0% 100%, 0 0,\n /* inner rect */ \n ${o}px ${a}px, ${s}px ${a}px, ${s}px ${l}px, ${o}px ${l}px, ${o}px ${a}px\n )`;e.style.setProperty("--child-clip",c)},[]);return g(()=>{let t=e?.current;if(!i||!t||a||t.parentElement?.closest(".plitzi-component__layout-container"))return;let n=null,r=hr(()=>{let e=(e=>[...e.querySelectorAll(VT)].find(e=>!e.querySelector(VT))??null)(t);e!==n&&(n&&s.unobserve(n),e&&s.observe(e),n=e),o(t,e)},50),s=new ResizeObserver(r);s.observe(t);let l=new MutationObserver(r);return l.observe(t,{childList:!0,subtree:!0}),t.addEventListener("scroll",r,!0),r(),()=>{r.cancel(),s.disconnect(),l.disconnect(),t.removeEventListener("scroll",r,!0)}},[i,a,e,o]),/* @__PURE__ */I(Vd,{ref:e,tag:r,className:U("plitzi-component__layout-container",t),children:n})}),KT=Object.assign(GT,{type:"layoutContainer",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure"]},content:{attributes:{subType:"div"},definition:{label:"Layout Container",type:"layoutContainer",description:"A reusable layout shell (header/footer chrome) shared across pages.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-border-all"},defaultStyle:{name:"Layout Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),YT=ld(({ref:e,className:t=""})=>{let{definition:{label:n}}=cd();/* @__PURE__ */
86
+ return I(Vd,{ref:e,className:U("plitzi-component__loading",t),children:/* @__PURE__ */_("span",{children:[/* @__PURE__ */I("b",{children:n})," Loading..."]})})}),JT=Object.assign(YT,{type:"loading",content:{attributes:{},definition:{label:"Loading",type:"loading",description:"A loading placeholder shown while data or a suspense boundary resolves.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Loading",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),XT=/* @__PURE__ */$({NotFound:()=>ZT,default:()=>QT}),ZT=({ref:e,className:t=""})=>{let{definition:{label:n}}=cd(),{settings:{isHydrating:r,previewMode:i}}=sc();if(!(typeof window>"u"||i||r))/* @__PURE__ */return I(Vd,{ref:e,className:U("plitzi-component__not-found",t),children:/* @__PURE__ */_("span",{children:[n&&/* @__PURE__ */_(E,{children:["Component ",
87
+ /* @__PURE__ */I("b",{children:n})," Not Found"]}),!n&&"Component Not Found"]})})},QT=ld(ZT),eC=Object.assign(QT,{type:"notFound",content:{attributes:{},definition:{label:"Not Found",type:"notFound",description:"The 404 screen shown when no route matches.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!1,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"https://cdn.plitzi.com/resources/img/favicon.svg"},defaultStyle:{name:"Not Found",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),tC={type:"page",triggers:{onPageLoad:{action:"onPageLoad",title:"On Page Load",type:"trigger",params:{},preview:{pageId:"",routeParams:"",queryParams:""}}},content:{attributes:{enabled:!0,name:"Page",slug:"",folder:"",layout:"",layoutContainer:"",seoEnabled:!1,seoPageTitle:"Title",seoPageDescription:"Description"},definition:{label:"Page",type:"page",description:"The root of a routable screen. Managed through the page ops (upsertPage/deletePage), not added as a child element.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"internal",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fas fa-file"},defaultStyle:{name:"Page",displayMode:"desktop",style:{base:{default:{display:"flex","flex-direction":"column","min-height":"100%","min-width":"100%","font-family":"Arial",color:"#333","font-size":"14px","font-weight":400,"line-height":"16px","text-align":"left","background-color":"#ffffff"}}}},settings:{}}},nC=[],rC=ld(({ref:e,seoEnabled:t=!1,seoPageTitle:n="Title",seoPageDescription:r="Description",className:i="",layout:a="",layoutContainer:o="",children:s})=>{let{id:l}=cd(),{settings:{previewMode:c},contexts:{InteractionsContext:u}}=sc(),{interactionsManager:d}=f(u),{ownsHead:p}=X(),[[y,b]]=zt(["navigation.routeParams","navigation.queryParams"]),v=((e,t)=>{let n=m(mt),r=x(nC),i=h(e=>n?n.subscribePath("schema.flat",e):()=>{},[n]),a=h(()=>{let i=e&&n?Ac(e=>{let t=(e=>n.getPath(e))(`schema.flat.${e}`);return(e=>"object"==typeof e&&!!e&&"definition"in e&&"attributes"in e)(t)?t:void 0},e,t):nC;return((e,t)=>e.length===t.length&&e.every((e,n)=>e.layout===t[n].layout&&e.slot===t[n].slot))(r.current,i)||(r.current=i),r.current},[n,e,t]);return T(i,a,a)})(a,o),w=k(()=>(e=>e.map(e=>({...e,plitziElementLayout:{slots:[e.slot],rootId:e.slot,type:"layout"}})))(v),[v]),S=k(()=>((e,t,n)=>e.reduce((e,{layout:n,slot:r,plitziElementLayout:i})=>/* @__PURE__ */I(Gr,{bodies:{[r]:e},children:/* @__PURE__ */I(KT,{internalProps:{id:n,rootId:t,plitziElementLayout:i}})},r),n))(w,l,s),[w,l,s]);return g(()=>{let e=!1;return queueMicrotask(()=>{e||d.interactionTrigger(l,"onPageLoad",{pageId:l,routeParams:y,queryParams:b})}),()=>{e=!0}},[l,d,b,y]),/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__page",i),interactionTriggers:tC.triggers,children:[t&&c&&p&&/* @__PURE__ */_(Ip,{children:[!!n&&/* @__PURE__ */I("title",{children:n}),!!r&&/* @__PURE__ */I("meta",{name:"description",content:r})]}),S]})}),iC=Object.assign(rC,tC),aC=ld(({ref:e,src:t="",title:n="",loading:r="lazy",allow:i="",sandbox:a,referrerPolicy:o="strict-origin-when-cross-origin",className:s=""})=>{let{settings:{previewMode:l}}=sc(),c=(e=>/^(https?:)?\/\//i.test(e)||e.startsWith("/")&&!e.startsWith("//")?e:void 0)(t),u={src:c,title:n,loading:r,referrerPolicy:o,...i?{allow:i}:{},...void 0===a?{}:{sandbox:a}};return l?/* @__PURE__ */I(Vd,{tag:"iframe",ref:e,className:U("plitzi-component__embed",s),...u}):/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__embed embed--edit-mode",s),children:[c&&/* @__PURE__ */I("iframe",{...u}),/* @__PURE__ */I("div",{className:"embed__cover"})]})}),oC=Object.assign(aC,{type:"embed",content:{attributes:{src:"",title:"",loading:"lazy"},definition:{label:"Embed",type:"embed",description:"Another page inside this one — a map, a video player, a form — in a frame.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-window-maximize"},defaultStyle:{name:"Embed",displayMode:"desktop",style:{base:{default:{display:"block",width:"100%","aspect-ratio":"16 / 9","border-top-width":"0px","border-right-width":"0px","border-bottom-width":"0px","border-left-width":"0px"}}}},settings:{}}}),sC=ld(({ref:e,className:t="",icon:n="fas fa-flag",size:r="fa-1x",iconAnimation:i="",label:a=""})=>{let o=a?{role:"img","aria-label":a}:{"aria-hidden":!0};/* @__PURE__ */
88
+ return I(Vd,{ref:e,tag:"i",className:U("plitzi-component__fontawesome",t,n,r,i),...o})}),lC=Object.assign(sC,{type:"fontAwesome",content:{attributes:{icon:"fas fa-flag",size:"fa-1x",iconAnimation:""},definition:{label:"Font Awesome",type:"fontAwesome",description:"Renders a Font Awesome icon by its icon name.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-font-awesome"},defaultStyle:{name:"Font Awesome",displayMode:"desktop",style:{base:{default:{display:"inline-block","font-size":"16px"}}}},settings:{}}}),cC=[320,480,640,768,960,1280,1600,1920],uC=(e,t,n)=>`${e}?url=${encodeURIComponent(t)}&w=${String(n)}`,dC=(e,t)=>cC.map(n=>`${uC(e,t,n)} ${String(n)}w`).join(", "),pC="data:image/svg+xml;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" fill="none">\n <rect width="1200" height="1200" fill="#EAEAEA" rx="3"/>\n <path fill="#FAFAFA" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="#C9C9C9" stroke-width="2.418" opacity="0.5" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/>\n <path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/>\n <path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/>\n <path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/>\n <path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/>\n <path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/>\n <path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/>\n <defs>\n <linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse">\n <stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/>\n </linearGradient>\n <clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath>\n </defs>\n</svg>'),fC=ld(({ref:e,className:t="",src:n,alt:r="",decorative:i=!1,fetchPriority:a="auto",loadMode:o,sizes:s="100vw",width:l,height:c,resize:u=!0})=>{let{settings:{previewMode:d}}=sc(),p=n||pC,f=i?"":r,[m,g]=S(void 0),y=m===p,b=h(()=>g(p),[p]),v=y?pC:p,w=y?{"data-plitzi-failed":p}:{},k="auto"===o?void 0:o,[x]=Mt("images.endpoint"),T=d&&x&&u&&!y&&(e=>(e=>/^https?:\/\//i.test(e))(e)&&!/\.svgz?(?:[?#]|$)/i.test(e))(p)?{src:uC(x,p,1280),srcSet:dC(x,p),sizes:s}:{src:v},C={...l?{width:l}:{},...c?{height:c}:{}};/* @__PURE__ */
89
+ return I(Vd,d?{tag:"img",draggable:!1,ref:e,className:U("plitzi-component__image",t),...T,...C,alt:f,loading:k,fetchPriority:a,onError:y?void 0:b,...w}:{ref:e,className:U("plitzi-component__image image--edit-mode",t),children:/* @__PURE__ */I("img",{draggable:!1,src:v,alt:f,loading:k,fetchPriority:a,onError:y?void 0:b,...w})})}),hC=Object.assign(fC,{type:"image",attributeValues:{fetchPriority:["high","low","auto"],loadMode:["auto","eager","lazy"]},content:{attributes:{src:"",alt:"",decorative:!1,fetchPriority:"auto",loadMode:"auto"},definition:{label:"Image",type:"image",description:"Displays an image from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-image"},defaultStyle:{name:"Image",displayMode:"desktop",style:{base:{default:{display:"block",width:"140px",height:"140px"}}}},settings:{}}}),mC=/<\s*foreignObject\b[\s\S]*?<\s*\/\s*foreignObject\s*>|<\s*\/?\s*foreignObject\b[^>]*>/gi,gC=/\s(to|from|values|by)\s*=\s*(?:"[^"]*javascript\s*:[^"]*"|'[^']*javascript\s*:[^']*')/gi,yC=/^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i,bC=/<svg\b[^>]*>/i,vC=ld(({ref:e,content:t="",label:n="",className:r=""})=>{let{settings:{previewMode:i}}=sc(),a=k(()=>(e=>yC.test(e))(t)?(e=>e.replace(bC,e=>e.replace(/\s(width|height)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/^<svg\b/i,'<svg width="100%" height="100%"')))((e=>uT(e).replace(mC,"").replace(gC,""))(t)):"",[t]),o=n?{role:"img","aria-label":n}:{"aria-hidden":!0};return a||i?/* @__PURE__ */I(Vd,{tag:"span",ref:e,className:U("plitzi-component__svg",r),...o,dangerouslySetInnerHTML:{__html:a}}):/* @__PURE__ */_(Vd,{ref:e,className:U("plitzi-component__svg svg--empty",r),children:["Paste one ","<svg>…</svg>"," here"]})}),wC=Object.assign(vC,{type:"svg",content:{attributes:{content:"",label:""},definition:{label:"SVG",type:"svg",description:"A drawing written as SVG markup, coloured by its class.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-bezier-curve"},defaultStyle:{name:"Svg",displayMode:"desktop",style:{base:{default:{display:"inline-flex",width:"24px",height:"24px"}}}},settings:{}}}),kC=ld(({ref:e,src:t,autoPlay:n=!1,playsInline:r=!1,loop:i=!1,muted:a=!0,className:o=""})=>{let{settings:{previewMode:s}}=sc();/* @__PURE__ */
90
+ return I(Vd,s?{tag:"video",draggable:!1,ref:e,className:U("plitzi-component__video",o),src:t,autoPlay:n,playsInline:r,loop:i,muted:a}:{ref:e,className:U("plitzi-component__video video--edit-mode",o),children:/* @__PURE__ */I("video",{src:t,autoPlay:n,playsInline:r,loop:i,muted:a,children:/* @__PURE__ */I("track",{kind:"captions"})})})}),xC=Object.assign(kC,{type:"video",content:{attributes:{src:"",autoPlay:!1,playsInline:!1,loop:!1,muted:!0},definition:{label:"Video",type:"video",description:"Embeds a video from a URL.",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"media",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-video"},defaultStyle:{name:"Video",displayMode:"desktop",style:{base:{default:{display:"block",width:"400px",height:"250px"}}}},settings:{}}}),SC={type:"apiContainer",attributeValues:{subType:["","div","header","footer","nav","main","section","article","aside","address","figure"],method:["get","post","put","delete","patch"],credentials:["include","omit","same-origin"],pagination:["none","url","append"]},sourceType:"apiContainer",triggers:{onApiError:{action:"onApiError",title:"On Api Error",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}},onApiSuccess:{action:"onApiSuccess",title:"On Api Success",type:"trigger",params:{},preview:{url:"",method:"",status:"",data:""}}},callbacks:{performQuery:{action:"performQuery",title:"Perform Query",type:"callback",preview:{},params:{input:{label:"Input (server providers)",type:"codemirror-json",defaultValue:"{}",description:"Values handed to a server-driven provider with its request, beside the page’s own route and query params — a search, a filter. Kept for the pages it loads after (`loadMore`, `goToPage`) until the next query."}}},loadMore:{action:"loadMore",title:"Load More",type:"callback",preview:{},params:{}},goToPage:{action:"goToPage",title:"Go To Page",type:"callback",preview:{},params:{page:{label:"Page",defaultValue:"1",type:"text"}}},writeRecord:{action:"writeRecord",title:"Write Record",type:"callback",preview:{action:"create"},params:{action:{label:"Endpoint",defaultValue:"create",type:"text"},recordId:{label:"Record Id",defaultValue:"",type:"text"}}}},content:{attributes:{query:"",method:"get",accessToken:"",mockData:"{}",subType:"",credentials:"same-origin",connector:"",resource:"",limit:"10",singleRecord:!1,filters:[],pagination:"none",pageParam:"page",renderWhileLoading:!1,cache:!1,staleTime:30,gcTime:300},definition:{label:"Api Container",type:"apiContainer",description:'Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: "div"`, `section`, …); otherwise style its parent or a child.',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-server"},defaultStyle:{name:"Api Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},TC=()=>{let{id:e,rootId:t}=cd(),[[n=!1,r=!1,i=!1,a,o,s,l]]=Mt(["rsc.enabled","rsc.loaded","rsc.stale","rsc.location",iu(e),"navigation.currentPageId","schema.pages"]),c=su(),u=void 0!==a&&a!==au()||void 0!==t&&t!==s&&Array.isArray(l)&&l.includes(t),d=x(void 0);!u&&void 0!==o&&(d.current=o);let p=u&&void 0!==d.current?d.current:o;return{enabled:n,loaded:r,stale:i,location:a,elementData:p??null,isServerElement:void 0!==p,refresh:c}},CC=(e,t,n)=>n?void 0===e.record:Array.isArray(e.records)?0===t.length:(e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length)(e.data),AC=3e5,EC=e=>{let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)},IC=e=>`entries.${EC(e)}`,_C=new class{store;runtimes=/* @__PURE__ */new Map;epochValue=0;unwatch;constructor(e=We({entries:{}},{id:"queries"})){this.store=e}get epoch(){return this.epochValue}getEntry(e){let t=this.store.getPath(IC(e));return t?.key===e?t:void 0}hasAnswer(e){return void 0!==this.getEntry(e)&&void 0!==this.store.getFreshness(IC(e))}usage(e){let t=this.runtimes.get(EC(e));return t&&{observers:t.observers.size,holds:t.holds,collectAt:t.collectAt}}remove(e){let t=this.runtimes.get(EC(e));return!(!t||t.observers.size>0||t.holds>0||(this.cancelGc(t),this.collect(t),0))}hold(e,t=AC){let n=this.ensure(e);return n.gcTime=t,n.holds++,this.cancelGc(n),()=>{n.holds--,this.scheduleGc(n)}}observe(e,t){let n=this.ensure(e),{isCacheable:r}=t,i={meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))};return n.observers.add(i),this.cancelGc(n),(!this.hasAnswer(e)||this.store.isStale(IC(e)))&&this.fetch(n,i),()=>{n.observers.delete(i),this.scheduleGc(n)}}async fetchQuery(e,t){let n=this.ensure(e);if(void 0!==t.gcTime&&(n.gcTime=t.gcTime),this.hasAnswer(e)&&!this.store.isStale(IC(e)))return this.scheduleGc(n),this.getEntry(e)?.data;let{isCacheable:r}=t;await this.fetch(n,{meta:t.meta,staleTime:t.staleTime,fetcher:t.fetcher,isCacheable:r&&(e=>r(e))});let i=this.getEntry(e)?.data;return this.scheduleGc(n),i}refetch(e){let t=this.runtimes.get(EC(e));return t?this.invalidateOne(t):Promise.resolve()}invalidate(e){let t=[];return this.runtimes.forEach(n=>{let r=this.getEntry(n.key);!r||e&&!e({url:r.url,tags:r.tags})||t.push(this.invalidateOne(n))}),Promise.all(t).then(()=>{})}reset({refetch:e=!0}={}){if(this.epochValue++,this.runtimes.forEach(e=>{e.version++,e.inFlight=void 0,e.controller?.abort(),e.controller=void 0}),this.store.setState("entries",{}),!e)return this.runtimes.forEach(e=>this.markUnasked(e)),Promise.resolve();let t=[];return this.runtimes.forEach(e=>t.push(this.fetchActive(e))),Promise.all(t).then(()=>{})}markUnasked(e){let t=e.observers.values().next();if(t.done)return;let n={key:e.key,url:t.value.meta.url,tags:[...e.tags],isFetching:!1};this.store.setState(IC(e.key),n,{ttl:0})}invalidateOne(e){return 0===this.store.expire(IC(e.key)).length&&e.version++,this.fetchActive(e)}onExpired(e){let t=this.runtimes.get(e.slice(8).split(".")[0]);t&&(t.version++,this.fetchActive(t))}fetchActive(e){let t=e.observers.values().next();return t.done?Promise.resolve():this.fetch(e,t.value)}fetch(e,t){if(e.inFlight)return e.inFlight;let{key:n}=e,{url:r}=t.meta;t.meta.tags?.forEach(t=>e.tags.add(t));let i=[...e.tags],a=IC(n);this.getEntry(n)?this.store.setState(`${a}.isFetching`,!0):this.store.setState(a,{key:n,url:r,tags:i,isFetching:!0});let o=this.epochValue,s=e.version,l=l=>{if(o!==this.epochValue||this.runtimes.get(EC(n))!==e)return Promise.resolve();e.inFlight=void 0,e.controller=void 0;let c=s!==e.version;if("error"in l){let e=this.getEntry(n);this.store.setState(a,{key:n,url:r,tags:i,data:e?.data,error:l.error,isFetching:!1},{ttl:0})}else{let o=!c&&(t.isCacheable?.(l.data)??!0);this.store.setState(a,{key:n,url:r,tags:i,data:l.data,isFetching:!1},{ttl:o?this.ttlOf(e,t):0})}return c?this.fetchActive(e):Promise.resolve()},c=new AbortController;return e.controller=c,e.inFlight=t.fetcher(c.signal).then(e=>l({data:e}),e=>l({error:e})),e.inFlight}ttlOf(e,t){let n=e.observers.size>0?1/0:t.staleTime;return e.observers.forEach(e=>{n=Math.min(n,e.staleTime)}),n}ensure(e){let t=EC(e),n=this.runtimes.get(t);return n||(n={key:e,tags:/* @__PURE__ */new Set,observers:/* @__PURE__ */new Set,holds:0,version:0,gcTime:3e5},this.runtimes.set(t,n)),this.unwatch??=this.store.watchFreshness("entries",e=>{"expired"===e.type&&this.onExpired(e.path)}),n}cancelGc(e){clearTimeout(e.gcTimer),e.gcTimer=void 0,e.collectAt=void 0}scheduleGc(e){if(!(e.holds>0||e.observers.size>0)){if(this.cancelGc(e),e.gcTime<=0)return void this.collect(e);e.collectAt=Date.now()+e.gcTime,e.gcTimer=setTimeout(()=>this.collect(e),e.gcTime)}}collect(e){let t=EC(e.key);this.runtimes.get(t)===e&&0===e.holds&&0===e.observers.size&&(this.runtimes.delete(t),e.controller?.abort(),this.store.setState(IC(e.key),void 0,{unmount:!0}))}},{useStore:OC}=Ot(),NC=()=>typeof location>"u"?void 0:location.href,MC=e=>{try{return new URL(e,NC()).origin}catch{return}},PC=e=>Array.isArray(e)?e.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim()):"string"==typeof e?e.split(",").map(e=>e.trim()).filter(Boolean):[],LC=e=>{try{return new URL(e,NC()).href}catch{return e}},DC=(e={})=>e.url||e.elements?.length?_C.invalidate((({url:e,elements:t})=>{let n=e?LC(e):void 0;return e=>(void 0===n||LC(e.url).startsWith(n))&&(!t?.length||t.some(t=>e.tags?.includes(t)??!1))})(e)):_C.invalidate(),zC=({method:e,url:t,credentials:n,headers:r})=>JSON.stringify([e.toLowerCase(),t,n,Object.entries(r).filter(([e])=>"content-type"!==e.toLowerCase()).sort(([e],[t])=>e<t?-1:+(e>t))]),RC=({mode:e,fallback:t,elements:n,url:r})=>{let i="origin"===e||"all"===e||"elements"===e||"none"===e?e:t;if("none"===i)return Promise.resolve();if("elements"===i){let e=PC(n);return e.length>0?DC({elements:e}):Promise.resolve()}return"origin"===i&&r?(e=>{let t=MC(e);return t?_C.invalidate(e=>MC(e.url)===t):Promise.resolve()})(r):DC()},jC=async(e,t,n,r,i,a=!1)=>{if(!e)return{status:400,data:"URL is required"};let o=new Headers(r);o.has("Accept")||o.set("Accept","application/json");let s={method:t,credentials:n,headers:o,signal:i};"get"!==t&&(s.body="{}",o.has("Content-Type")||o.set("Content-Type","application/json"));try{let o=await fetch(e,s),l=await o.json(),c=Qr(o.status,l);return c&&await Xr({reason:c,url:e})&&!a&&!i.aborted?await jC(e,t,n,r,i,!0):{status:o.status,data:l}}catch(e){if(i.aborted)throw e;return console.error(e.message),{status:500,data:e.message}}},$C=e=>e.status<400,FC=(e,t)=>{let n="number"==typeof e?e:Number(e);return 1e3*(Number.isFinite(n)&&n>=0?n:t)},qC=e=>qr(e).map(e=>({path:e,name:e.split(".").slice(-2).join(" ")})),BC=ld(({ref:e,className:t="",children:r,query:i="",method:a="get",accessToken:o="",when:s=$r,headers:l=$r,mockData:c="{}",subType:d="",credentials:p="same-origin",singleRecord:m=!1,pagination:y="none",pageParam:v="page",renderWhileLoading:w=!1,loadingSlot:T="",cache:C=!1,staleTime:A=30,gcTime:E=300,refreshSeconds:_=0,connector:O="",action:N=""})=>{let{id:M,visible:P,definition:{label:L="Api Container",runtime:D,items:z}}=cd(),R="server"===D,{loaded:j,stale:$,location:F,elementData:q,refresh:B}=TC(),H=jl(SC.sourceType,M),{settings:{previewMode:W},contexts:{InteractionsContext:V}}=sc(),{interactionsManager:G}=f(V),[[K,Y,J]]=zt(["navigation.routeParams","navigation.queryParams","navigation.navigate"]),X=k(()=>o?{...l,Authorization:`Bearer ${o}`}:l,[l,o]),Z=k(()=>!(R||!P||!(W&&i&&(s===$r||Oa(s,{...K,...Y}))||!W&&(i||c&&"{}"!==c&&c!==$r))),[R,P,W,i,s,K,Y,c]),Q=k(()=>[M],[M]),{isLoading:ee,isFetching:te,data:ne,refetch:re,isSuccess:ie,isError:ae}=(({url:e="",method:t="get",mock:n,customHeaders:r=$r,enabled:i=!0,credentials:a="same-origin",cache:o=!1,staleTime:s=30,gcTime:l=300,tags:c})=>{let u=(e=>!!e&&"{}"!==e&&e!==$r)(n),d=b(),p=!u&&(!e||Xn(e)),f=k(()=>{if(u||p)return;let n=zC({method:t,url:e,credentials:a,headers:r});return o?n:`${n}#${d}`},[u,p,e,t,a,r,o,d]),m=h(n=>jC(e,t,a,r,n),[e,t,a,r]),y=(({key:e,meta:t,fetcher:n,enabled:r=!0,staleTime:i,gcTime:a=AC,isCacheable:o})=>{let s=void 0!==e,[l]=OC(IC(e??""),{store:_C.store,enabled:s}),c=s&&l?.key===e?l:void 0,u=void 0!==c&&_C.hasAnswer(c.key),d=x(n),p=x(o);g(()=>{d.current=n,p.current=o},[n,o]),g(()=>void 0===e?void 0:_C.hold(e,a),[e,a]);let{url:f}=t,m=t.tags?.join("\0")??"";g(()=>{if(r&&void 0!==e)return _C.observe(e,{meta:{url:f,tags:m?m.split("\0"):[]},staleTime:i,fetcher:e=>d.current(e),isCacheable:e=>p.current?.(e)??!0})},[r,e,f,m,i]);let y=u?c.data:void 0,b=x(void 0);void 0===y?b.current&&b.current.epoch!==_C.epoch&&(b.current=void 0):b.current={epoch:_C.epoch,data:y};let v=y??b.current?.data,w=(c?.isFetching??!1)||r&&s&&!u;return{data:v,isFetching:w,isLoading:w&&void 0===v,refetch:h(()=>{r&&void 0!==e&&_C.refetch(e)},[r,e])}})({key:f,meta:{url:e,tags:c},fetcher:m,enabled:i,staleTime:o?FC(s,30):0,gcTime:o?FC(l,300):0,isCacheable:$C}),v=k(()=>u?(e=>{if("string"!=typeof e)return{status:200,data:e};try{return{status:200,data:JSON.parse(e)}}catch(e){return{status:500,data:e.message}}})(n):void 0,[u,n]),w=i&&v?v:y.data,S=!v&&y.isFetching;return{isLoading:S&&void 0===w,isFetching:S,data:w,refetch:y.refetch,isSuccess:!p&&!S&&!!w&&w.status<400,isError:!p&&!S&&!!w&&w.status>=400}})({url:i,method:a,credentials:p,mock:W?void 0:c,customHeaders:X,enabled:Z,cache:C,staleTime:A,gcTime:E,tags:Q}),oe=R&&!!F&&F!==au(),se=R&&j&&!oe&&null===q,le=R&&!O&&!N,ce=k(()=>R?q||(j?$r:((e,t)=>{let n;if("string"!=typeof e)n=e;else try{n=JSON.parse(e||"{}")}catch{return $r}return t?{status:200,data:n}:n})(c,le)):ne??$r,[R,ne,q,j,c,le]),ue=R?oe:te,de=R?oe:ee,pe=x({}),fe=h((e,t)=>B(e,{...pe.current,...t}),[B]),he=h(async()=>{R?await fe([M]):re()},[R,re,fe,M]),me=h(async({input:e}={})=>{let t=(e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t||"{}")}catch{return}if("object"==typeof t&&t&&!Array.isArray(t))return Object.fromEntries(Object.entries(t).flatMap(([e,t])=>"string"==typeof t||"number"==typeof t||"boolean"==typeof t?[[e,String(t)]]:[]))})(e);t&&(pe.current=t),await he()},[he]);(({seconds:e,enabled:t,refresh:n})=>{let r=x(n);r.current=n;let i=Number(e),a=t&&Number.isFinite(i)&&i>0;g(()=>{if(!a)return;let e=!1,t=setInterval(()=>{e||"hidden"===document.visibilityState||(e=!0,Promise.resolve().then(()=>r.current()).catch(()=>{}).finally(()=>{e=!1}))},1e3*i);return()=>clearInterval(t)},[a,i])})({seconds:_,enabled:P&&(R?j&&!oe:Z),refresh:he});let ge=ce,ye=k(()=>Array.isArray(ge.records)?ge.records:[],[ge.records]),{records:be,isLoadingMore:ve,goToPage:we,loadMore:ke}=(({elementId:e,mode:t,pageParam:n,records:r,page:i,refresh:a,navigate:o})=>{let[s,l]=S(r),[c,u]=S(!1),d=x(0);g(()=>{if("append"===t){if(i<=1)return d.current=1,void l(r);d.current!==i&&(d.current=i,l(e=>[...e,...r]))}},[t,i,r]);let p=h(async r=>{let i=Math.max(r,1);if("url"!==t){if(a){u(!0);try{await a([e],{[n]:String(i)})}finally{u(!1)}}}else o?.(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(n,i))},[t,o,n,a,e]),f=h(()=>p(i+1),[p,i]);return{records:"append"===t?s:r,isLoadingMore:c,goToPage:p,loadMore:f}})({elementId:M,mode:y,pageParam:v,records:ye,page:ge.pageInfo?.page??1,refresh:fe,navigate:J}),xe=(({serverMode:e,isSuccess:t,isError:n,rscResolved:r,rscPending:i,elementData:a})=>e?r&&!i?null==a?"error":"success":void 0:t?"success":n?"error":void 0)({serverMode:R,isSuccess:ie,isError:ae,rscResolved:j,rscPending:oe,elementData:q});g(()=>{!ue&&M&&xe&&G.interactionTrigger(M,"success"===xe?"onApiSuccess":"onApiError",{url:i,method:a,...ce})},[ce,M,G,ue,a,xe,i]);let Se=k(()=>({...ce,...Array.isArray(ge.records)?{records:be}:$r,isLoading:ue||ve,isEmpty:CC(ge,be,m),hasError:se,errorMessage:se?"The data provider could not be reached":"",isStale:R&&$}),[ce,ge.records,ge.record,be,ue,ve,m,se,R,$]),Te=h(()=>qC(Se),[Se]);$l({id:M,source:H,name:L||`API - ${M}`,fields:Te});let{writeRecord:Ce}=(({elementId:e,enabled:t,actionPath:n="/_action",onDone:r})=>({writeRecord:h(async(i={})=>{let{action:a,recordId:o,...s}=i;if(!t||"string"!=typeof a||!a)return;let l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({elementId:e,action:a,recordId:o,values:s})});if(!l.ok){let e=Qr(l.status,await l.json().catch(()=>{}));throw e&&Xr({reason:e,url:n}),Error(`Write failed with status ${l.status}`)}let c=await l.json();return DC(),await(r?.()),c.record},[n,e,t,r])}))({elementId:M,enabled:R,onDone:he}),Ae=k(()=>{let e={performQuery:{...SC.callbacks.performQuery,title:`Perform Query ${L}`,callback:me},loadMore:{...SC.callbacks.loadMore,title:`Load More ${L}`,callback:ke},goToPage:{...SC.callbacks.goToPage,title:`Go To Page ${L}`,callback:({page:e})=>we(Number(e)||1)}};return R&&(e.writeRecord={...SC.callbacks.writeRecord,title:`Write Record ${L}`,callback:Ce}),e},[L,me,ke,we,R,Ce]),Ee=k(()=>T&&W?((e,t,r)=>n.toArray(e).filter(e=>{let n=u(e)&&"string"==typeof e.key&&e.key.endsWith(`$${t}`);return r?n:!n}))(r,T,de):r,[r,de,T,W]),Ie=k(()=>H?{runtime:{sources:{[H]:Se}}}:$r,[Se,H]);/* @__PURE__ */
91
+ return I(Vd,{ref:e,tag:W||z?.length?d:"div",className:U("plitzi-component__api-container",t),interactionTriggers:SC.triggers,interactionCallbacks:Ae,children:(!de||w||T)&&/* @__PURE__ */I(At,{inherit:"live",name:`Api:${M}`,value:Ie,children:Ee})})}),UC=Object.assign(BC,SC),HC={type:"channel",attributeValues:{subType:["","div","section","aside","main"]},sourceType:"channel",triggers:{onMessage:{action:"onMessage",title:"On Message",type:"trigger",params:{},preview:{type:"",data:"",from:"",user:"",at:""}},onJoin:{action:"onJoin",title:"On Join",type:"trigger",params:{},preview:{from:"",user:"",state:{}}},onLeave:{action:"onLeave",title:"On Leave",type:"trigger",params:{},preview:{from:"",user:"",state:{}}}},callbacks:{publish:{action:"publish",title:"Publish",type:"callback",preview:{},params:{type:{label:"Type",defaultValue:"",type:"text"},data:{label:"Data (JSON or a template)",defaultValue:"",type:"text"}}},setPresence:{action:"setPresence",title:"Set Presence",type:"callback",preview:{},params:{data:{label:"State (JSON or a template)",defaultValue:"",type:"text"}}}},content:{attributes:{topic:"",grant:"",keep:20,subType:""},definition:{label:"Channel",type:"channel",description:"A realtime channel: every page on the same `topic` hears what any of them publishes, within milliseconds. The topic must match a channel the space declares in its settings (`channels`), e.g. `board:{{ id }}` under `board:{id}`. A topic of a private channel (`grant: true`) opens only with `grant`, bound to the grant the action that let this visitor in returned (its `realtime.grant` step). ITS DESCENDANTS bind to its source `channel_<id>`: `connected`, `members` (with the state each announced), `messages` (the last `keep`) and `last`. It fires `onMessage`; `onJoin` when somebody who came after this page has announced who they are, and `onLeave` when somebody goes — each with `from`, `user` and the `state` they announced; and answers `publish({ type, data })` and `setPresence({ data })`; `presence` is the state this page announces (a name, a colour). Closed in the builder and anywhere without a server.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"provider",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-tower-broadcast"},defaultStyle:{name:"Channel",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}},WC=[500,1e3,2e3,5e3,1e4],VC=e=>"object"==typeof e&&!!e&&"connection"in e&&"string"==typeof e.connection&&"refused"in e&&Array.isArray(e.refused),GC=e=>"object"==typeof e&&!!e&&"topic"in e&&"string"==typeof e.topic&&"type"in e&&"string"==typeof e.type,KC=e=>{let t="message",n=[];for(let r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&n.push(r.slice(6));if(n.length)try{return{event:t,data:JSON.parse(n.join("\n"))}}catch{return}},YC=(e,t,n)=>{"success"===e?Hl.success("realtime",t,n):"warning"===e?Hl.warning("realtime",t,n):"danger"===e?Hl.danger("realtime",t,n):Hl.info("realtime",t,n)},JC=/* @__PURE__ */new Map,XC=/* @__PURE__ */new WeakMap,ZC=(e,{grant:t,presence:n,onMessage:r,onJoin:i,onLeave:a}={})=>{let[o]=Mt("realtime.endpoint"),[s]=Mt("realtime.transport"),l=k(()=>o&&typeof window<"u"?((e,t="sse")=>{let n=`${t} ${e}`,r=JC.get(n);if(r)return r;let i=((e,{transport:t="sse",fetchImpl:n=fetch,WebSocketImpl:r=globalThis.WebSocket}={})=>{let i,a,o,s=/* @__PURE__ */new Map,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u="idle",d=/* @__PURE__ */new Map,p=0,f="websocket"===t&&"function"==typeof r,h=()=>[...s.keys()].sort().join(","),m=e=>{u=e;let t=h().split(",").filter(Boolean),n=i?.transport??(f?"websocket":"sse");YC("open"===e?"success":"closed"===e?"warning":"info",`${e} · ${t.join(", ")||"no topics"}`,{event:"status",status:e,topics:t,transport:n}),c.forEach(t=>t(e))},g=e=>{for(let[t,n]of e)d.set(t,n),YC("danger",`${t} refused: ${n}`,{event:"refused",topic:t,reason:n})},y=e=>{"$revoked"===e.type&&"server"===e.from&&g([[e.topic,"revoked"]]),YC("info",`${e.topic} ← ${e.type}`,{event:"received",message:e}),s.get(e.topic)?.forEach(t=>t(e))},b=(e,t)=>{e.me=t.connection,d=/* @__PURE__ */new Map,g(t.refused.map(e=>[e.topic,e.reason])),p=0,m("open")},v=e=>{if(i!==e)return;m("connecting");let t=WC[Math.min(p,WC.length-1)];p+=1,o=setTimeout(x,t)},w=(t,r)=>{let a,o=new AbortController,s={topics:t,transport:"sse",close:()=>o.abort(),publish:async(t,r,o)=>{if(!a)return!1;let l=await n(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",body:JSON.stringify({token:a,topic:t,type:r,data:o})}).catch(()=>{});return 401===l?.status&&i===s&&x(),l?.ok??!1}};return n(`${e}?${r}`,{headers:{accept:"text/event-stream"},credentials:"same-origin",signal:o.signal}).then(async e=>{if(!e.ok)return d=/* @__PURE__ */new Map,g(t.split(",").map(t=>[t,`http_${String(e.status)}`])),void m("closed");throw await(async e=>{let t=e.body?.getReader();if(!t)return;let n=new TextDecoder,r="";for(;;){let{done:e,value:i}=await t.read();if(e)return;r+=n.decode(i,{stream:!0});let o=r.indexOf("\n\n");for(;-1!==o;){let e=KC(r.slice(0,o));r=r.slice(o+2),o=r.indexOf("\n\n"),"ready"===e?.event&&VC(e.data)?(a=e.data.token,b(s,e.data)):"message"===e?.event&&GC(e.data)&&y(e.data)}}})(e),Error("The realtime stream ended")}).catch(()=>{o.signal.aborted||v(s)}),s},k=(t,n)=>{let a=new r(((e,t)=>{let n=new URL(`${e}?${t}`,globalThis.location.href);return n.protocol="https:"===n.protocol?"wss:":"ws:",n.href})(e,n)),o=/* @__PURE__ */new Map,s=0,l=!1,c=!1,u=()=>{o.forEach(e=>e(!1)),o.clear()},d={topics:t,transport:"websocket",close:()=>{c=!0,u(),a.close()},publish:(e,t,n)=>new Promise(r=>{if(a.readyState!==a.OPEN)return void r(!1);s+=1;let i=s,l=setTimeout(()=>{o.delete(i),r(!1)},5e3);o.set(i,e=>{clearTimeout(l),r(e)}),a.send(JSON.stringify({id:i,topic:e,type:t,data:n}))})};return a.onmessage=e=>{let t=(e=>{try{let t=JSON.parse(String(e));return"object"==typeof t&&t&&"event"in t&&"string"==typeof t.event?{event:t.event,data:"data"in t?t.data:void 0}:void 0}catch{return}})(e.data);"ready"===t?.event&&VC(t.data)?(l=!0,b(d,t.data)):"message"===t?.event&&GC(t.data)?y(t.data):"ack"===t?.event&&(e=>"object"==typeof e&&!!e&&"id"in e&&"number"==typeof e.id&&"ok"in e&&"boolean"==typeof e.ok)(t.data)&&(o.get(t.data.id)?.(t.data.ok),o.delete(t.data.id))},a.onclose=()=>{if(u(),!c&&i===d){if(!l)return f=!1,void x();v(d)}},d};function x(){i?.close(),i=void 0;let e=h();if(!e)return void m("idle");m("connecting");let t=(e=>{let t=e.split(",").flatMap(e=>l.get(e)??[]);return`topics=${encodeURIComponent(e)}${t.length?`&grants=${encodeURIComponent(t.join(","))}`:""}`})(e);i=f?k(e,t):w(e,t)}let S=(e=!1)=>{clearTimeout(a),clearTimeout(o),a=setTimeout(()=>{(e||i?.topics!==h())&&x()},30)},T=e=>"open"===u&&!0===i?.topics.split(",").includes(e),C={subscribe:(e,t)=>{let n=s.get(e)??/* @__PURE__ */new Set;return n.add(t),s.set(e,n),S(),()=>{n.delete(t),n.size||(s.delete(e),l.delete(e),S())}},grant:(e,t)=>{if(l.get(e)===t)return;t?l.set(e,t):l.delete(e);let n=T(e)&&!d.has(e);t&&s.has(e)&&!n&&S(!0)},publish:async(e,t,n)=>{let r=!(!(await(e=>T(e)?Promise.resolve(!0):new Promise(t=>{let n=setTimeout(()=>{r(),t(!1)},5e3),r=C.onStatus(i=>{("closed"===i||T(e))&&(clearTimeout(n),r(),t("closed"!==i))})}))(e))||!i)&&await i.publish(e,t,n);return YC(r?"info":"danger",`${e} → ${t}${r?"":" (not delivered)"}`,{event:"published",topic:e,type:t,data:n,delivered:r}),r},onStatus:e=>(c.add(e),()=>c.delete(e)),get status(){return u},get me(){return i?.me},get transport(){return i?.transport??(f?"websocket":"sse")},refusal:e=>d.get(e)};return C})(e,{transport:t});return JC.set(n,i),i})(o,s):void 0,[o,s]),[c,u]=S(!1),[d,p]=S([]),f=x(void 0),m=x({onMessage:r,onJoin:i,onLeave:a});g(()=>{m.current={onMessage:r,onJoin:i,onLeave:a}}),g(()=>{l&&e&&t&&l.grant(e,t)},[l,e,t]),g(()=>{if(!l||!e)return;let t=((e,t,n)=>{let r=XC.get(e)??/* @__PURE__ */new Map;XC.set(e,r);let i=r.get(t)??((e,t,n)=>{let r,i=/* @__PURE__ */new Map,a=/* @__PURE__ */new Set,o=/* @__PURE__ */new Set,s=!1,l=()=>[...s&&e.me?[{from:e.me,state:r,me:!0}]:[],...[...i.values()].map(e=>e.member)],c=()=>{let e=l();o.forEach(t=>t.onChange(e))},u=e=>{let t=e.flatMap(e=>{let t=i.get(e);return i.delete(e),t?[t.member]:[]});if(t.length){c();for(let e of t)o.forEach(t=>t.onDepart?.(e))}},d=()=>{s&&e.publish(t,"$presence",r)},p=e.subscribe(t,t=>{if(t.from!==e.me){if("$presence"===t.type){let e={from:t.from,...t.user?{user:t.user}:{},state:t.data,me:!1},n=!i.has(t.from)&&a.delete(t.from);i.set(t.from,{member:e,heardAt:Date.now()}),c(),n&&o.forEach(t=>t.onArrive?.(e))}else"$leave"===t.type?(a.delete(t.from),u([t.from])):"$join"===t.type?(a.add(t.from),d()):"$revoked"===t.type&&"server"===t.from&&(i.clear(),a.clear(),c());o.forEach(e=>e.onMessage?.(t))}}),f=e.onStatus(e=>{"open"===e&&(d(),c())}),h=setInterval(()=>{d();let e=Date.now();u([...i].filter(([,t])=>e-t.heardAt>65e3).map(([e])=>e))},2e4);return{members:l,set:e=>{r=e,s=!0,d(),c()},listeners:o,teardown:()=>{clearInterval(h),f(),p(),n()}}})(e,t,()=>r.delete(t));r.set(t,i),i.listeners.add(n);let a=i.members();return a.length&&n.onChange(a),{set:i.set,members:i.members,stop:()=>{i.listeners.delete(n)&&!i.listeners.size&&i.teardown()}}})(l,e,{onChange:p,onMessage:e=>{"$revoked"===e.type&&"server"===e.from&&u(!1),m.current.onMessage?.(e)},onArrive:e=>m.current.onJoin?.(e),onDepart:e=>m.current.onLeave?.(e)});f.current=t,u("open"===l.status&&!l.refusal(e));let n=l.onStatus(t=>u("open"===t&&!l.refusal(e)));return()=>{n(),t.stop(),f.current=void 0,p([]),u(!1)}},[l,e]);let y=void 0===n?void 0:JSON.stringify(n);g(()=>{void 0!==y&&f.current?.set(JSON.parse(y))},[y,l,e]);let b=h((t,n)=>l&&e?l.publish(e,t,n):Promise.resolve(!1),[l,e]),v=h(e=>f.current?.set(e),[]);return{connected:c,me:c?l?.me:void 0,members:d,publish:b,setPresence:v}},QC=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},eA=/* @__PURE__ */new Set(["$presence","$join","$leave"]),tA=ld(({ref:e,className:t,children:n,topic:r="",grant:i="",presence:a,keep:o=20,subType:s=""})=>{let{id:l,definition:{label:c="Channel"}}=cd(),{settings:{previewMode:u},contexts:{InteractionsContext:d}}=sc(),{interactionsManager:p}=f(d),m=Math.max(0,Number(o)||0),[g,y]=S([]),b=h(e=>{eA.has(e.type)||(m>0&&y(t=>[...t,e].slice(-m)),p.interactionTrigger(l,"onMessage",{...e}))},[l,p,m]),v=h(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onJoin",{from:e,user:t??"",state:n})},[l,p]),w=h(({from:e,user:t,state:n})=>{p.interactionTrigger(l,"onLeave",{from:e,user:t??"",state:n})},[l,p]),x=ZC(u&&r?r:void 0,{grant:i||void 0,presence:void 0===a||""===a?void 0:QC(a),onMessage:b,onJoin:v,onLeave:w}),T=k(()=>({publish:{...HC.callbacks.publish,callback:({type:e,data:t})=>"string"==typeof e&&e?x.publish(e,QC(t)):Promise.resolve(!1)},setPresence:{...HC.callbacks.setPresence,callback:({data:e})=>x.setPresence(QC(e))}}),[x]),C=jl(HC.sourceType,l),A=k(()=>({connected:x.connected,me:x.me??"",members:x.members,messages:g,last:g.at(-1)??null}),[x.connected,x.me,x.members,g]),E=h(()=>qC(A),[A]);$l({id:l,source:C,name:c||`Channel - ${l}`,fields:E});let _=k(()=>C?{runtime:{sources:{[C]:A}}}:$r,[A,C]);/* @__PURE__ */
92
+ return I(Vd,{ref:e,tag:s,className:U("plitzi-component__channel",t),interactionTriggers:HC.triggers,interactionCallbacks:T,children:/* @__PURE__ */I(At,{inherit:"live",name:`Channel:${l}`,value:_,children:n})})}),nA=Object.assign(tA,HC),rA={type:"carousel",sourceType:"carousel",triggers:{onChange:{action:"onChange",title:"On Slide Change",type:"trigger",params:{},preview:{index:"0",item:{}}}},callbacks:{next:{action:"next",title:"Next Slide",type:"callback",params:{},preview:{}},previous:{action:"previous",title:"Previous Slide",type:"callback",params:{},preview:{}},goTo:{action:"goTo",title:"Go To Slide",type:"callback",params:{index:{type:"text",label:"Index (from 0)",defaultValue:"0",canBind:!0}},preview:{}},play:{action:"play",title:"Play",type:"callback",params:{},preview:{}},pause:{action:"pause",title:"Pause",type:"callback",params:{},preview:{}}},content:{attributes:{items:[],mode:"slide",autoplay:0,pauseOnHover:!0,loop:!0,transition:"slide",speed:30,label:""},definition:{label:"Carousel",type:"carousel",description:"Items shown one at a time, scrolled past as a marquee, or swiped as a row — with controls of its own inside.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-images"},defaultStyle:{name:"Carousel",displayMode:"desktop",style:{base:{default:{position:"relative"}}}},settings:{}},initialItems:["carouselTrack"]},iA=l(void 0);iA.displayName="CarouselContext";var aA=(e,t,n,r)=>{if(t<=0)return 0;let i=e+n;return r?(i%t+t)%t:Math.min(t-1,Math.max(0,i))},oA=(e,t)=>{let n="number"==typeof e?e:Number(e);return!Number.isFinite(n)||t<=0?0:Math.min(t-1,Math.max(0,Math.trunc(n)))},sA=(e,t)=>t<e?"previous":"next",lA=e=>{let t=e.firstElementChild;if(!(t instanceof HTMLElement))return 0;let n=Number.parseFloat(getComputedStyle(e).columnGap);return t.offsetWidth+(Number.isFinite(n)?n:0)},cA=(e,t)=>{let n=e.map(e=>{let n=ar(e,t);return"string"==typeof n||"number"==typeof n?`${t}:${String(n)}`:void 0});if(n.every(e=>void 0!==e)&&new Set(n).size===n.length)return n},uA=(e,t)=>(t?cA(e,t):void 0)??cA(e,"id")??e.map((e,t)=>t),dA=ld(({ref:e,className:t="",children:n,items:r=[],mode:i="slide",autoplay:a=0,pauseOnHover:o=!0,loop:s=!0,transition:l="slide",speed:c=30,itemKey:u,label:d=""})=>{let{id:p,definition:{label:m="Carousel"}}=cd(),y=jl(rA.sourceType,p),{settings:{previewMode:b},contexts:{InteractionsContext:v}}=sc(),{interactionsManager:w}=f(v),T=k(()=>Array.isArray(r)?r:[],[r]),C=k(()=>uA(T,u),[T,u]),A=T.length,E=!!b,[_,O]=S(0),[N,M]=S("next"),[P,L]=S(!1),[D,z]=S(a>0),R=x(null),j=e??R,$=x(null),F=oA(_,A);g(()=>{_!==F&&O(F)},[_,F]);let q=h((e,t)=>{0!==A&&e!==F&&(M(t),L(!0),O(e),w.interactionTrigger(p,"onChange",{index:e,item:T[e]}))},[A,F,p,w,T]),B=h(e=>{let t=$.current,n=t?lA(t):0;t&&n>0&&t.scrollBy({left:e*n,behavior:"smooth"})},[]),H=h(()=>{"scroll"!==i?q(aA(F,A,1,s),"next"):B(1)},[A,F,s,i,q,B]),W=h(()=>{"scroll"!==i?q(aA(F,A,-1,s),"previous"):B(-1)},[A,F,s,i,q,B]),V=h(e=>{let t=oA(e.index,A);"scroll"!==i?q(t,sA(F,t)):B(t-F)},[A,F,i,q,B]),G=h(e=>{e!==F&&q(e,sA(F,e))},[F,q]);(({delay:e,active:t,rootRef:n,pauseOnHover:r,position:i,onTick:a})=>{let[o,s]=S(!1),[l,c]=S(!1),u=x(a);g(()=>{u.current=a},[a]),g(()=>{let e=n.current;if(!e||!t)return;let r=()=>s(!0),i=()=>s(!1),a=e=>{e.target instanceof Element&&e.target.matches(":focus-visible")&&c(!0)},o=t=>{(!(t.relatedTarget instanceof Node)||!e.contains(t.relatedTarget))&&c(!1)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",i),e.addEventListener("focusin",a),e.addEventListener("focusout",o),()=>{e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",i),e.removeEventListener("focusin",a),e.removeEventListener("focusout",o)}},[n,t]);let d=r&&o||l;g(()=>{if(!t||e<=0||d||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=window.setInterval(()=>{"visible"===document.visibilityState&&u.current()},e);return()=>window.clearInterval(n)},[t,e,d,i])})({delay:"slide"===i?a:0,active:E&&D&&A>1,rootRef:j,pauseOnHover:o,position:F,onTick:H});let K=k(()=>({next:{...rA.callbacks.next,callback:H},previous:{...rA.callbacks.previous,callback:W},goTo:{...rA.callbacks.goTo,callback:V},play:{...rA.callbacks.play,callback:()=>z(!0)},pause:{...rA.callbacks.pause,callback:()=>z(!1)}}),[V,H,W]),Y=k(()=>({items:T,count:A,index:F,item:T[F],playing:D&&a>0}),[a,A,F,T,D]),J=h(()=>qC(Y),[Y]);$l({id:p,source:y,name:m||`Carousel - ${p}`,fields:J});let X=k(()=>y?{runtime:{sources:{[y]:Y}}}:$r,[y,Y]),Z=k(()=>({source:y,items:T,keys:C,index:F,direction:N,moved:P,mode:i,transition:l,speed:c,pauseOnHover:o,live:E,scrollerRef:$,onScrolledTo:G}),[F,N,C,T,E,i,P,G,o,y,c,l]);/* @__PURE__ */
93
+ return I(Vd,{ref:j,className:U("plitzi-component__carousel",`carousel--${i}`,t),role:"region","aria-roledescription":"carousel","aria-label":d||void 0,interactionTriggers:rA.triggers,interactionCallbacks:K,children:/* @__PURE__ */I(At,{inherit:"live",name:`Carousel:${p}`,value:X,children:/* @__PURE__ */I(iA,{value:Z,children:n})})})}),pA=({children:e,className:t="",isTemplate:n=!1,index:r=0,record:i,source:a=""})=>{let o=b(),s=k(()=>a?{runtime:{sources:{[a]:{item:i,index:r}}}}:$r,[a,i,r]),l=/* @__PURE__ */I(MS,{children:/* @__PURE__ */I(At,{inherit:"live",name:`Row:${a}`,segment:o,value:s,children:e})});return n?/* @__PURE__ */_("div",{className:U("plitzi-component__controlled-list-item",t),children:[/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${r+1}`}),l]}):l},fA=({source:e,item:t,position:r,count:i,copy:a=!1,className:o="",children:s})=>{let l=0===n.count(s);/* @__PURE__ */
94
+ return _("div",{className:U("carousel__slide",o),role:"group","aria-roledescription":"slide","aria-label":`${String(r+1)} of ${String(i)}`,"aria-hidden":a||void 0,inert:a||void 0,children:[l&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:`Slide ${String(r+1)}`}),!l&&/* @__PURE__ */I(pA,{index:r,isTemplate:!1,record:t,source:e,children:s})]})},hA=({source:e,items:t,keys:n,speed:r,pauseOnHover:i,live:a,children:o})=>{let s=x(null),[l,c]=S(void 0);g(()=>{let e=s.current;if(!e||r<=0)return;let t=()=>c(e.scrollWidth/2/r);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,t.length]);let u={"--plitzi-marquee-duration":`${String(l??0)}s`};/* @__PURE__ */
95
+ return _("div",{ref:s,className:U("carousel__marquee",{"carousel__marquee--running":a&&void 0!==l,"carousel__marquee--pause-on-hover":i}),style:u,children:[t.map((r,i)=>/* @__PURE__ */I(fA,{source:e,item:r,position:i,count:t.length,children:o},String(n[i]))),a&&t.map((r,i)=>/* @__PURE__ */I(fA,{source:e,item:r,position:i,count:t.length,copy:!0,children:o},`copy:${String(n[i])}`))]})},mA=({source:e,items:t,keys:n,scrollerRef:r,onScrolledTo:i,children:a})=>{let o=x(0),s=h(()=>{cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=r.current,t=e?lA(e):0;e&&t>0&&i(Math.round(e.scrollLeft/t))})},[r,i]);/* @__PURE__ */
96
+ return I("div",{ref:r,className:"carousel__scroller",onScroll:s,children:t.map((r,i)=>/* @__PURE__ */I(fA,{source:e,item:r,position:i,count:t.length,children:a},String(n[i])))})},gA=ld(({ref:e,className:t="",children:n})=>{let r=f(iA),i=r?.items??[],a=r?.mode,o=i.length>0;/* @__PURE__ */
97
+ return _(Vd,{ref:e,className:U("plitzi-component__carousel-track",t),children:[!r&&n,r&&!o&&!r.live&&/* @__PURE__ */I("div",{className:"carousel__slide--empty",children:"This carousel has no items"}),r&&o&&"slide"===a&&/* @__PURE__ */I(fA,{source:r.source,item:i[r.index],position:r.index,count:i.length,className:U(r.live&&r.moved&&`carousel__slide--${r.transition}-${r.direction}`),children:n},String(r.keys[r.index])),r&&o&&"scroll"===a&&/* @__PURE__ */I(mA,{source:r.source,items:i,keys:r.keys,scrollerRef:r.scrollerRef,onScrolledTo:r.onScrolledTo,children:n}),r&&o&&"marquee"===a&&/* @__PURE__ */I(hA,{source:r.source,items:i,keys:r.keys,speed:r.speed,pauseOnHover:r.pauseOnHover,live:r.live,children:n})]})}),yA=Object.assign(gA,{type:"carouselTrack",ancestorType:"carousel",content:{attributes:{},definition:{label:"Carousel Track",type:"carouselTrack",description:"Where a carousel shows its slides: what is inside is one slide, rendered once per item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!1,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-film"},defaultStyle:{name:"Carousel Track",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),bA=Object.assign(dA,{...rA,plugins:{carouselTrack:yA}}),vA=["div","header","footer","nav","main","section","article","aside","figure"],wA=ld(({ref:e,className:t="",subType:n="div",label:r="",decorative:i=!1,live:a="",children:o})=>{let s=!i&&r&&vA.includes(n)?{"aria-label":r,..."div"===n?{role:"group"}:{}}:{},l=i?{"aria-hidden":!0}:{},c=a?{"aria-live":a}:{};/* @__PURE__ */
98
+ return I(Vd,{ref:e,tag:n,className:U(`plitzi-component__container plitzi-component__container-${n}`,t),...s,...l,...c,children:o})}),kA=Object.assign(wA,{type:"container",attributeValues:{subType:["div","header","footer","nav","main","section","article","aside","address","figure","dl","dt","dd","li","h1","h2","h3","h4","h5","h6","p","span"],live:["","polite","assertive"]},content:{attributes:{subType:"div"},definition:{label:"Container",type:"container",description:"Generic layout box (a div). The primary building block for structure: groups and positions child elements with flex/grid. Reach for it whenever you need to wrap or arrange other elements.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-square"},defaultStyle:{name:"Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),xA={type:"dialogContainer",sourceType:"dialogContainer",triggers:{onDialogAccept:{action:"onDialogAccept",title:"On Dialog Accept",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogReject:{action:"onDialogReject",title:"On Dialog Reject",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogOpen:{action:"onDialogOpen",title:"On Dialog Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onDialogClose:{action:"onDialogClose",title:"On Dialog Close",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}}},callbacks:{openDialog:{action:"openDialog",title:"Open Dialog",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeDialog:{action:"closeDialog",title:"Close Dialog",type:"callback",preview:{},params:{}}},content:{attributes:{headerLabel:"Dialog Header",acceptButtonLabel:"Accept",rejectButtonLabel:"Cancel",autoHideAfterClick:!0},definition:{label:"Dialog Container",type:"dialogContainer",description:"A native <dialog> container shown or hidden through interactions (e.g. an onClick open/close).",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:"",footerContainer:"",acceptButton:"",cancelButton:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Dialog Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2",color:"#333"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"}},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0"}},footerContainer:{default:{display:"flex","justify-content":"flex-end","margin-top":"8px"}}},subTypes:{}},settings:{}},initialItems:["container"]},SA=({panelRef:e,open:t,onClose:n})=>{let r=y(n);g(()=>{let n=e.current;if(!t||!n)return;let i=n.ownerDocument.activeElement;n.contains(i)||n.focus({preventScroll:!0});let a=e=>{if(e.defaultPrevented)return;if("Escape"===e.key)return e.preventDefault(),void r();if("Tab"!==e.key)return;let t=(e=>[...e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]')].filter(e=>"function"!=typeof e.checkVisibility||e.checkVisibility()))(n);if(0===t.length)return e.preventDefault(),void n.focus({preventScroll:!0});let i=t[0],a=t[t.length-1],o=n.ownerDocument.activeElement;!e.shiftKey||o!==i&&o!==n&&n.contains(o)?!e.shiftKey&&(o===a||!n.contains(o))&&(e.preventDefault(),i.focus()):(e.preventDefault(),a.focus())},o=n.ownerDocument.defaultView;return o?.addEventListener("keydown",a),()=>{o?.removeEventListener("keydown",a),i instanceof HTMLElement&&i.isConnected&&i.focus({preventScroll:!0})}},[t,e])},TA=ld(({ref:e,className:t="",children:n,headerLabel:r="Dialog Header",acceptButtonLabel:i="Accept",acceptButtonLabelLoading:a="Loading...",rejectButtonLabel:o="Cancel",autoHideAfterClick:s=!0})=>{let{id:l,rootId:c,visible:u,setElementState:d,definition:{styleSelectors:p,label:m="Dialog"},elementState:y}=cd(),b=jl(xA.sourceType,l),{settings:{previewMode:v},contexts:{InteractionsContext:w}}=sc(),{interactionsManager:T}=f(w),[C,A]=S({}),[E,O]=S(!1),N=x(null),M=`${c}_${l}_title`,P=h(e=>{let{metadata:t}=e;if(t&&"object"==typeof t)A(t);else if("string"==typeof t)try{A(JSON.parse(t))}catch{A({content:t})}else A("boolean"==typeof t||"number"==typeof t?{content:t}:{});d(e=>({...e,visibility:!0}))},[d,A]),L=h(()=>{T.interactionTrigger(l,"onDialogClose",{metadata:C}),A({}),d(e=>({...e,visibility:!1}))},[T,d,A,C,l]),D=h(()=>{s&&(T.interactionTrigger(l,"onDialogClose",{metadata:C}),A({}),d(e=>({...e,visibility:!1})))},[T,s,d,A,C,l]),z=h(async()=>{O(!0),await T.interactionTrigger(l,"onDialogAccept",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),R=h(async()=>{O(!0),await T.interactionTrigger(l,"onDialogReject",{metadata:C}),O(!1),d(e=>({...e,visibility:!1}))},[T,l,C,d]),j=k(()=>({openDialog:{...xA.callbacks.openDialog,title:`Open ${m}`,callback:P},closeDialog:{...xA.callbacks.closeDialog,title:`Close ${m}`,callback:L}}),[L,P,m]);SA({panelRef:N,open:!!v&&u,onClose:()=>{R()}}),g(()=>{!1!==y.visibility&&T.interactionTrigger(l,"onDialogOpen",{metadata:C})},[l,T,C,y.visibility]);let $=h(()=>qC(C),[C]);$l({id:l,source:b,name:m||`Dialog - ${l}`,fields:$});let F=k(()=>b?{runtime:{sources:{[b]:C}}}:$r,[b,C]);/* @__PURE__ */
99
+ return _(Vd,{ref:e,className:U("plitzi-component__dialog-container",t),interactionTriggers:xA.triggers,interactionCallbacks:j,children:[/* @__PURE__ */I("div",{className:U("dialog-container__background",p.backgroundContainer),"aria-hidden":"true",onClick:D}),/* @__PURE__ */_("div",{ref:N,className:U("dialog-container__root",p.rootContainer),role:"alertdialog","aria-modal":"true","aria-labelledby":M,tabIndex:-1,children:[
100
100
  /* @__PURE__ */_("div",{className:U("dialog-container__header",p.headerContainer),children:[/* @__PURE__ */I("div",{id:M,className:U("dialog-container__header__title",p.headerTitle),children:r||"Dialog Header"}),/* @__PURE__ */I("button",{type:"button",className:"dialog-container__close","aria-label":"Close",title:"Close",onClick:R,children:/* @__PURE__ */I("i",{className:"fa-solid fa-xmark","aria-hidden":"true"})})]}),
101
101
  /* @__PURE__ */I("div",{className:U("dialog-container__body",p.body),children:/* @__PURE__ */I(At,{inherit:"live",name:`Dialog:${l}`,value:F,children:n})}),
102
- /* @__PURE__ */_("div",{className:U("dialog-container__footer",p.footerContainer),children:[/* @__PURE__ */_("button",{type:"button",className:U("footer__button button--accept",p.acceptButton),onClick:z,disabled:E,children:[E&&/* @__PURE__ */_("div",{className:"button--accept__container",children:[/* @__PURE__ */I("i",{className:"fa-solid fa-rotate fa-spin","aria-hidden":"true"}),a]}),!E&&i]}),/* @__PURE__ */I("button",{type:"button",className:U("footer__button button--cancel",p.cancelButton),onClick:R,disabled:E,children:o})]})]})]})}),xA=Object.assign(kA,vA),SA={type:"list",attributeValues:{subType:["ul","ol"],source:["none","controlled"]},sourceType:"list",content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"List",type:"list",description:'Repeats a template (its row: a listItem, or a container with subType "li") once per entry of a data array — the way to render a dynamic collection, as a <ul> (subType "ol" for a numbered one). Bind its items to a data source (e.g. an apiContainer response).',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List",displayMode:"desktop",style:{base:{default:{}}},subTypes:{ul:{name:"List UL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}},ol:{name:"List OL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}}}},settings:{}},initialItems:["listItem","listItem","listItem"]},TA=({ref:e,className:t="",subType:n="ul",children:r})=>/* @__PURE__ */I(Ud,{ref:e,tag:n,className:U("plitzi-component__list",t),children:r}),CA=({ref:e,className:t="",subType:n="ul",children:r,items:i=[],itemKey:a})=>{let{id:o,definition:{label:s}}=cd(),l=jl(SA.sourceType,o),{settings:{previewMode:c}}=sc(),u=k(()=>Array.isArray(i)?i:[],[i]),d=k(()=>sA(u,a),[u,a]),p=h(()=>qr({item:ar(u,"0",{}),index:0}).reduce((e,t)=>[...e,{path:t,name:t}],[]),[u]),f=k(()=>l?{runtime:{sources:{[l]:{items:u}}}}:$r,[l,u]);return $l({id:o,source:l,name:s||`List - ${o}`,fields:p}),/* @__PURE__ */_(Ud,{ref:e,tag:n,className:U("plitzi-component__controlled-list",t,{"controlled-list--build-mode":!c}),children:[/* @__PURE__ */I(At,{inherit:"live",name:`List:${o}`,value:f,children:u.map((e,t)=>!r||Array.isArray(r)&&0===r.length?/* @__PURE__ */I("div",{className:"plitzi-component__controlled-list-item controlled-list--empty",children:/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${t+1}`})},t):/* @__PURE__ */I(cA,{index:t,isTemplate:0!==t&&!c,record:e,source:l,children:r},d[t]))}),!c&&0===u.length&&/* @__PURE__ */I("div",{className:"controlled-list controlled-list--empty",children:"This list does not contain any items"})]})},AA=ld(({ref:e,className:t="",subType:n="ul",children:r,items:i=[],source:a="none",itemKey:o})=>"controlled"===a?/* @__PURE__ */I(CA,{ref:e,className:t,subType:n,items:i,itemKey:o,children:r}):/* @__PURE__ */I(TA,{ref:e,className:t,subType:n,children:r})),EA=ld(({ref:e,className:t="",children:n})=>/* @__PURE__ */I(Ud,{tag:"li",ref:e,className:U("plitzi-component__list-item",t),children:n})),IA=Object.assign(EA,{type:"listItem",content:{attributes:{},definition:{label:"List Item",type:"listItem",description:"The List Item element lets you add more items to existing List elements. You can then add any content you would like to them, including links, images, etc.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["listItem"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List Item",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),_A=Object.assign(AA,{...SA,plugins:{listItem:IA}}),OA={type:"modalContainer",sourceType:"modalContainer",triggers:{onModalOpen:{action:"onModalOpen",title:"On Modal Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onModalClose:{action:"onModalClose",title:"On Modal Close",type:"trigger",preview:{},params:{}}},callbacks:{openModal:{action:"openModal",title:"Open Modal",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeModal:{action:"closeModal",title:"Close Modal",type:"callback",params:{},preview:{}}},content:{attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",type:"modalContainer",description:"A modal overlay container opened and closed through interactions; use for dialogs over the page.",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Modal Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between","border-bottom-width":"1px","border-bottom-color":"light-dark(#d1d5db, oklch(0.37 0.013 285.805))","border-bottom-style":"solid","padding-left":"20px","padding-right":"20px","padding-top":"10px","padding-bottom":"10px"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}}},subTypes:{}},settings:{}},initialItems:["container"]},NA=ld(({ref:e,className:t="",children:n,title:r="Modal Header",autoHideAfterClick:i=!0})=>{let{id:a,rootId:o,visible:s,definition:{styleSelectors:l,label:c="Modal"},elementState:u,setElementState:d}=cd(),p=jl(OA.sourceType,a),{settings:{previewMode:m},contexts:{InteractionsContext:y}}=sc(),{interactionsManager:b}=f(y),[v,w]=S({}),T=x(null),C=`${o}_${a}_title`,A=h(e=>{let{metadata:t}=e;w(t&&"object"==typeof t?t:"string"==typeof t?(e=>{try{let t=JSON.parse(e);if(er(t))return t}catch{}return{content:e}})(t):"boolean"==typeof t||"number"==typeof t?{content:t}:{}),d(e=>({...e,visibility:!0}))},[d,w]),E=h(()=>{b.interactionTrigger(a,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1}))},[b,d,w,v,a]),O=h(()=>{i&&(b.interactionTrigger(a,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1})))},[b,i,d,w,v,a]),N=k(()=>({openModal:{...OA.callbacks.openModal,title:`Open ${c}`,callback:A},closeModal:{...OA.callbacks.closeModal,title:`Close ${c}`,callback:E}}),[E,A,c]);wA({panelRef:T,open:!!m&&s,onClose:E}),g(()=>{!1!==u.visibility&&b.interactionTrigger(a,"onModalOpen",{metadata:v})},[a,b,v,u.visibility]);let M=h(()=>jC(v),[v]);$l({id:a,source:p,name:c||`Modal - ${a}`,fields:M});let P=k(()=>p?{runtime:{sources:{[p]:v}}}:$r,[p,v]);/* @__PURE__ */
103
- return _(Ud,{ref:e,className:U("plitzi-component__modal-container",t),interactionTriggers:OA.triggers,interactionCallbacks:N,children:[/* @__PURE__ */I("div",{className:U("modal-container__background",l.backgroundContainer),"aria-hidden":"true",onClick:O}),/* @__PURE__ */_("div",{ref:T,className:U("modal-container__root",l.rootContainer),role:"dialog","aria-modal":"true","aria-labelledby":C,tabIndex:-1,children:[/* @__PURE__ */_("div",{className:U("modal-container__header",l.headerContainer),children:[/* @__PURE__ */I("div",{id:C,className:U("modal-container__header__title",l.headerTitle),children:r||"Modal Header"}),/* @__PURE__ */I("button",{type:"button",className:U("modal-container__close",l.headerCloseButton),"aria-label":"Close",title:"Close",onClick:E,children:/* @__PURE__ */I("i",{className:"fa-solid fa-xmark","aria-hidden":"true"})})]}),/* @__PURE__ */I("div",{className:U("modal-container__body",l.bodyContainer),children:/* @__PURE__ */I(At,{inherit:"live",name:`Modal:${a}`,value:P,children:n})})]})]})}),MA=Object.assign(NA,OA),PA={type:"pagination",attributeValues:{mode:["pages","loadMore"],target:["url","interaction"]},triggers:{onPageChange:{action:"onPageChange",title:"On Page Change",type:"trigger",params:{},preview:{page:"1"}}},content:{attributes:{pageInfo:{},mode:"pages",target:"url",pageParam:"page",windowSize:5,previousLabel:"Previous",nextLabel:"Next",loadMoreLabel:"Load more"},definition:{label:"Pagination",type:"pagination",description:"Pages through a list. Bind it to a provider page info: in URL mode it writes the page into the address bar so the result stays shareable and indexable, and in load-more mode it announces the next page for the provider to append.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-ellipsis"},defaultStyle:{name:"Pagination",displayMode:"desktop",style:{base:{default:{display:"flex","align-items":"center","row-gap":"8px","column-gap":"8px"}}},subTypes:{}},settings:{}}},LA=ld(({ref:e,className:t="",children:n,pageInfo:r=$r,mode:i="pages",pageParam:a="page",target:o="url",windowSize:s=5,previousLabel:l="Previous",nextLabel:c="Next",loadMoreLabel:u="Load more",label:d="Pagination"})=>{let{id:p}=cd(),{settings:{previewMode:m},contexts:{InteractionsContext:g}}=sc(),{interactionsManager:y}=f(g),[b]=zt("navigation.navigate"),v=r.page??1,w=r.pageCount??0,x=r.hasPrevPage??v>1,S=r.hasNextPage??!1,T=k(()=>((e,t,n)=>{if(t<=0||n<=0)return[];let r=Math.min(n,t),i=Math.min(Math.max(e-Math.floor(r/2),1),t-r+1);return Array.from({length:r},(e,t)=>i+t)})(v,w,s),[v,w,s]),C=h(e=>{let t=Math.max(e,1);p&&y.interactionTrigger(p,"onPageChange",{page:t}),"url"===o&&b(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(a,t))},[p,y,o,b,a]),A=h(e=>t=>{t.preventDefault(),C(e)},[C]),O=0===w&&!S&&!x;/* @__PURE__ */
104
- return _(Ud,{ref:e,tag:"nav","aria-label":d||void 0,className:U("plitzi-component__pagination",t),interactionTriggers:PA.triggers,children:["loadMore"===i&&/* @__PURE__ */I("button",{type:"button",className:"plitzi-component__pagination-more",disabled:!S&&m,onClick:A(v+1),children:u}),"pages"===i&&/* @__PURE__ */_(E,{children:[
102
+ /* @__PURE__ */_("div",{className:U("dialog-container__footer",p.footerContainer),children:[/* @__PURE__ */_("button",{type:"button",className:U("footer__button button--accept",p.acceptButton),onClick:z,disabled:E,children:[E&&/* @__PURE__ */_("div",{className:"button--accept__container",children:[/* @__PURE__ */I("i",{className:"fa-solid fa-rotate fa-spin","aria-hidden":"true"}),a]}),!E&&i]}),/* @__PURE__ */I("button",{type:"button",className:U("footer__button button--cancel",p.cancelButton),onClick:R,disabled:E,children:o})]})]})]})}),CA=Object.assign(TA,xA),AA={type:"list",attributeValues:{subType:["ul","ol"],source:["none","controlled"]},sourceType:"list",content:{attributes:{items:[],source:"none",subType:"ul"},definition:{label:"List",type:"list",description:'Repeats a template (its row: a listItem, or a container with subType "li") once per entry of a data array — the way to render a dynamic collection, as a <ul> (subType "ol" for a numbered one). Bind its items to a data source (e.g. an apiContainer response).',items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List",displayMode:"desktop",style:{base:{default:{}}},subTypes:{ul:{name:"List UL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}},ol:{name:"List OL",displayMode:"desktop",style:{base:{default:{"margin-top":"0px","margin-bottom":"10px","padding-left":"40px"}}}}}},settings:{}},initialItems:["listItem","listItem","listItem"]},EA=({ref:e,className:t="",subType:n="ul",children:r})=>/* @__PURE__ */I(Vd,{ref:e,tag:n,className:U("plitzi-component__list",t),children:r}),IA=({ref:e,className:t="",subType:n="ul",children:r,items:i=[],itemKey:a})=>{let{id:o,definition:{label:s}}=cd(),l=jl(AA.sourceType,o),{settings:{previewMode:c}}=sc(),u=k(()=>Array.isArray(i)?i:[],[i]),d=k(()=>uA(u,a),[u,a]),p=h(()=>qr({item:ar(u,"0",{}),index:0}).reduce((e,t)=>[...e,{path:t,name:t}],[]),[u]),f=k(()=>l?{runtime:{sources:{[l]:{items:u}}}}:$r,[l,u]);return $l({id:o,source:l,name:s||`List - ${o}`,fields:p}),/* @__PURE__ */_(Vd,{ref:e,tag:n,className:U("plitzi-component__controlled-list",t,{"controlled-list--build-mode":!c}),children:[/* @__PURE__ */I(At,{inherit:"live",name:`List:${o}`,value:f,children:u.map((e,t)=>!r||Array.isArray(r)&&0===r.length?/* @__PURE__ */I("div",{className:"plitzi-component__controlled-list-item controlled-list--empty",children:/* @__PURE__ */I("div",{className:"controlled-list-item__counter",children:`List Item - ${t+1}`})},t):/* @__PURE__ */I(pA,{index:t,isTemplate:0!==t&&!c,record:e,source:l,children:r},d[t]))}),!c&&0===u.length&&/* @__PURE__ */I("div",{className:"controlled-list controlled-list--empty",children:"This list does not contain any items"})]})},_A=ld(({ref:e,className:t="",subType:n="ul",children:r,items:i=[],source:a="none",itemKey:o})=>"controlled"===a?/* @__PURE__ */I(IA,{ref:e,className:t,subType:n,items:i,itemKey:o,children:r}):/* @__PURE__ */I(EA,{ref:e,className:t,subType:n,children:r})),OA=ld(({ref:e,className:t="",children:n})=>/* @__PURE__ */I(Vd,{tag:"li",ref:e,className:U("plitzi-component__list-item",t),children:n})),NA=Object.assign(OA,{type:"listItem",content:{attributes:{},definition:{label:"List Item",type:"listItem",description:"The List Item element lets you add more items to existing List elements. You can then add any content you would like to them, including links, images, etc.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["listItem"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-list"},defaultStyle:{name:"List Item",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}}),MA=Object.assign(_A,{...AA,plugins:{listItem:NA}}),PA={type:"modalContainer",sourceType:"modalContainer",triggers:{onModalOpen:{action:"onModalOpen",title:"On Modal Open",type:"trigger",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},onModalClose:{action:"onModalClose",title:"On Modal Close",type:"trigger",preview:{},params:{}}},callbacks:{openModal:{action:"openModal",title:"Open Modal",type:"callback",params:{metadata:{type:"text",defaultValue:""}},preview:{metadata:""}},closeModal:{action:"closeModal",title:"Close Modal",type:"callback",params:{},preview:{}}},content:{attributes:{title:"Modal Header",autoHideAfterClick:!0},definition:{label:"Modal Container",type:"modalContainer",description:"A modal overlay container opened and closed through interactions; use for dialogs over the page.",items:[],bindings:{},loadStrategy:"lazy",styleSelectors:{base:"",backgroundContainer:"",rootContainer:"",headerContainer:"",headerTitle:"",headerCloseButton:"",bodyContainer:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-regular fa-clone"},defaultStyle:{name:"Modal Container",displayMode:"desktop",style:{base:{default:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}},backgroundContainer:{default:{height:"100%",width:"100%",left:"0",top:"0",position:"absolute","background-color":"black",opacity:"0.5"}},rootContainer:{default:{display:"flex","flex-direction":"column",position:"absolute",top:"50%",left:"50%",width:"500px",height:"300px","background-color":"light-dark(white, oklch(0.21 0.006 285.885))",transform:"translate3d(-50%, -50%, 0px)","border-top-left-radius":"8px","border-top-right-radius":"8px","border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},headerContainer:{default:{display:"flex","align-items":"center","justify-content":"space-between","border-bottom-width":"1px","border-bottom-color":"light-dark(#d1d5db, oklch(0.37 0.013 285.805))","border-bottom-style":"solid","padding-left":"20px","padding-right":"20px","padding-top":"10px","padding-bottom":"10px"}},headerTitle:{default:{"font-size":"20px","font-weight":"500","line-height":"1.2"}},headerCloseButton:{default:{height:"20px",width:"20px",padding:"4px",display:"flex","justify-content":"center","align-items":"center",cursor:"pointer"},bodyContainer:{default:{display:"flex","flex-direction":"column","flex-grow":"1","flex-basis":"0","padding-top":"20px","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}}},subTypes:{}},settings:{}},initialItems:["container"]},LA=ld(({ref:e,className:t="",children:n,title:r="Modal Header",autoHideAfterClick:i=!0})=>{let{id:a,rootId:o,visible:s,definition:{styleSelectors:l,label:c="Modal"},elementState:u,setElementState:d}=cd(),p=jl(PA.sourceType,a),{settings:{previewMode:m},contexts:{InteractionsContext:y}}=sc(),{interactionsManager:b}=f(y),[v,w]=S({}),T=x(null),C=`${o}_${a}_title`,A=h(e=>{let{metadata:t}=e;w(t&&"object"==typeof t?t:"string"==typeof t?(e=>{try{let t=JSON.parse(e);if(er(t))return t}catch{}return{content:e}})(t):"boolean"==typeof t||"number"==typeof t?{content:t}:{}),d(e=>({...e,visibility:!0}))},[d,w]),E=h(()=>{b.interactionTrigger(a,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1}))},[b,d,w,v,a]),O=h(()=>{i&&(b.interactionTrigger(a,"onModalClose",{metadata:v}),w({}),d(e=>({...e,visibility:!1})))},[b,i,d,w,v,a]),N=k(()=>({openModal:{...PA.callbacks.openModal,title:`Open ${c}`,callback:A},closeModal:{...PA.callbacks.closeModal,title:`Close ${c}`,callback:E}}),[E,A,c]);SA({panelRef:T,open:!!m&&s,onClose:E}),g(()=>{!1!==u.visibility&&b.interactionTrigger(a,"onModalOpen",{metadata:v})},[a,b,v,u.visibility]);let M=h(()=>qC(v),[v]);$l({id:a,source:p,name:c||`Modal - ${a}`,fields:M});let P=k(()=>p?{runtime:{sources:{[p]:v}}}:$r,[p,v]);/* @__PURE__ */
103
+ return _(Vd,{ref:e,className:U("plitzi-component__modal-container",t),interactionTriggers:PA.triggers,interactionCallbacks:N,children:[/* @__PURE__ */I("div",{className:U("modal-container__background",l.backgroundContainer),"aria-hidden":"true",onClick:O}),/* @__PURE__ */_("div",{ref:T,className:U("modal-container__root",l.rootContainer),role:"dialog","aria-modal":"true","aria-labelledby":C,tabIndex:-1,children:[/* @__PURE__ */_("div",{className:U("modal-container__header",l.headerContainer),children:[/* @__PURE__ */I("div",{id:C,className:U("modal-container__header__title",l.headerTitle),children:r||"Modal Header"}),/* @__PURE__ */I("button",{type:"button",className:U("modal-container__close",l.headerCloseButton),"aria-label":"Close",title:"Close",onClick:E,children:/* @__PURE__ */I("i",{className:"fa-solid fa-xmark","aria-hidden":"true"})})]}),/* @__PURE__ */I("div",{className:U("modal-container__body",l.bodyContainer),children:/* @__PURE__ */I(At,{inherit:"live",name:`Modal:${a}`,value:P,children:n})})]})]})}),DA=Object.assign(LA,PA),zA={type:"pagination",attributeValues:{mode:["pages","loadMore"],target:["url","interaction"]},triggers:{onPageChange:{action:"onPageChange",title:"On Page Change",type:"trigger",params:{},preview:{page:"1"}}},content:{attributes:{pageInfo:{},mode:"pages",target:"url",pageParam:"page",windowSize:5,previousLabel:"Previous",nextLabel:"Next",loadMoreLabel:"Load more"},definition:{label:"Pagination",type:"pagination",description:"Pages through a list. Bind it to a provider page info: in URL mode it writes the page into the address bar so the result stays shareable and indexable, and in load-more mode it announces the next page for the provider to append.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-ellipsis"},defaultStyle:{name:"Pagination",displayMode:"desktop",style:{base:{default:{display:"flex","align-items":"center","row-gap":"8px","column-gap":"8px"}}},subTypes:{}},settings:{}}},RA=ld(({ref:e,className:t="",children:n,pageInfo:r=$r,mode:i="pages",pageParam:a="page",target:o="url",windowSize:s=5,previousLabel:l="Previous",nextLabel:c="Next",loadMoreLabel:u="Load more",label:d="Pagination"})=>{let{id:p}=cd(),{settings:{previewMode:m},contexts:{InteractionsContext:g}}=sc(),{interactionsManager:y}=f(g),[b]=zt("navigation.navigate"),v=r.page??1,w=r.pageCount??0,x=r.hasPrevPage??v>1,S=r.hasNextPage??!1,T=k(()=>((e,t,n)=>{if(t<=0||n<=0)return[];let r=Math.min(n,t),i=Math.min(Math.max(e-Math.floor(r/2),1),t-r+1);return Array.from({length:r},(e,t)=>i+t)})(v,w,s),[v,w,s]),C=h(e=>{let t=Math.max(e,1);p&&y.interactionTrigger(p,"onPageChange",{page:t}),"url"===o&&b(((e,t)=>{if(typeof window>"u")return"";let n=new URL(window.location.href);return t<=1?n.searchParams.delete(e):n.searchParams.set(e,String(t)),`${n.pathname}${n.search}`})(a,t))},[p,y,o,b,a]),A=h(e=>t=>{t.preventDefault(),C(e)},[C]),O=0===w&&!S&&!x;/* @__PURE__ */
104
+ return _(Vd,{ref:e,tag:"nav","aria-label":d||void 0,className:U("plitzi-component__pagination",t),interactionTriggers:zA.triggers,children:["loadMore"===i&&/* @__PURE__ */I("button",{type:"button",className:"plitzi-component__pagination-more",disabled:!S&&m,onClick:A(v+1),children:u}),"pages"===i&&/* @__PURE__ */_(E,{children:[
105
105
  /* @__PURE__ */I("button",{type:"button",className:"plitzi-component__pagination-prev",disabled:!x&&m,onClick:A(v-1),children:l}),T.map(e=>/* @__PURE__ */I("button",{type:"button",className:U("plitzi-component__pagination-page",{"plitzi-component__pagination-page--current":e===v}),"aria-current":e===v?"page":void 0,onClick:A(e),children:e},e)),
106
- /* @__PURE__ */I("button",{type:"button",className:"plitzi-component__pagination-next",disabled:!S&&m,onClick:A(v+1),children:c})]}),!m&&O&&/* @__PURE__ */I("span",{className:"plitzi-component__pagination-hint",children:"Bind pageInfo"}),n]})}),DA=Object.assign(LA,PA),zA=l(void 0);zA.displayName="TabContainerContext";var RA=ld(({ref:e,className:t="",children:n})=>{let{id:r,rootId:i}=cd(),[a,o]=S(0),s=`${i}_${r}`,l=k(()=>({baseId:s,tabSelected:a,onSelect:o}),[s,a]);/* @__PURE__ */
107
- return I(Ud,{ref:e,className:U("plitzi-component__tab-container",t),children:/* @__PURE__ */I(zA,{value:l,children:n})})}),jA=ld(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:a,onSelect:o}=f(zA),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(s(t,{...r,internalProps:{...r.internalProps,baseId:i,onSelect:o,tabSelected:a,tabIndex:n}}))}),e},[i,r,o,a]);/* @__PURE__ */
108
- return I(Ud,{ref:e,className:U("plitzi-component__tab-container-body",t),children:l})}),$A=Object.assign(jA,{type:"tabContainerBody",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Body",type:"tabContainerBody",description:"The panel area inside a tabContainer that shows the active tab item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Body",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),FA=ld(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:a,onSelect:o}=f(zA),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]},t=n.toArray(r).filter(u).length;return n.forEach(r,(n,r)=>{if(!u(n))return;let l=n.props;e.childrenParsed.push(s(n,{...l,internalProps:{...l.internalProps,isHeader:!0,baseId:i,onSelect:o,tabSelected:a,tabIndex:r,tabCount:t}}))}),e},[i,r,o,a]);/* @__PURE__ */
109
- return I(Ud,{ref:e,role:"tablist",className:U("plitzi-component__tab-container-header",t),children:l})}),qA=Object.assign(FA,{type:"tabContainerHeader",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Header",type:"tabContainerHeader",description:"The row of tab triggers inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Header",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),BA=ld(({className:e="",children:t,ref:n,baseId:r="",tabSelected:i,tabIndex:a=0,tabCount:o=0,isHeader:s,onSelect:l})=>{let c=i===a,u=`${r}_tab_${a}`,d=`${r}_panel_${a}`,p=h(()=>{s&&!c&&l?.(a)},[s,c,a,l]),f=h(e=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void l?.(a);let t=((e,t,n)=>{switch(e){case"ArrowRight":case"ArrowDown":return(t+1)%n;case"ArrowLeft":case"ArrowUp":return(t-1+n)%n;case"Home":return 0;case"End":return n-1;default:return}})(e.key,a,o);void 0!==t&&0!==o&&(e.preventDefault(),l?.(t),e.currentTarget.ownerDocument.getElementById(`${r}_tab_${t}`)?.focus())},[r,a,o,l]),m=s?{id:u,role:"tab","aria-selected":c,"aria-controls":d,tabIndex:c?0:-1,onKeyDown:f}:{id:d,role:"tabpanel","aria-labelledby":u,tabIndex:0};/* @__PURE__ */
110
- return I(Ud,{ref:n,onClick:p,className:U("plitzi-component__tab-container-item",e,{active:c}),...r?m:{},children:t})}),UA=Object.assign(BA,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),HA=Object.assign(RA,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:qA,tabContainerBody:$A,tabContainerItem:UA}}),WA=l({addToast:()=>{}});WA.displayName="ToastContext";var VA=e=>"number"==typeof e&&!isNaN(e),GA=e=>"string"==typeof e,KA=e=>"function"==typeof e,YA=e=>GA(e)||KA(e)?e:null,JA=(e,t)=>!1===e||VA(e)&&e>0?e:t,XA=e=>u(e)||GA(e)||KA(e)||VA(e);function ZA({enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}){return function({children:o,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let f=r?`${e}--${s}`:e,h=r?`${n}--${s}`:n,m=x(0);return w(()=>{let e=u.current,t=f.split(" "),n=r=>{r.target===u.current&&(p(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===m.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),g(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,c,a):c()};d||(l?t():(m.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[d]),t.createElement(t.Fragment,null,o)}}function QA(e,t){return{content:eE(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function eE(e,t,n=!1){return u(e)&&!GA(e.type)?s(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):KA(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function tE({delay:e,isRunning:n,closeToast:r,type:i="default",hide:a,className:o,controlledProgress:s,progress:l,rtl:c,isIn:u,theme:d}){let p=a||s&&0===l,f={animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};s&&(f.transform=`scaleX(${l})`);let h=U("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=KA(o)?o({rtl:c,type:i,defaultClassName:h}):U(h,o),g={[s&&l>=1?"onTransitionEnd":"onAnimationEnd"]:s&&l<1?null:()=>{u&&r()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${i}`}),t.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":s?Math.round(100*l):void 0,"aria-valuemin":0,"aria-valuemax":100,className:m,style:f,...g}))}var nE=1,rE=()=>""+nE++;var iE=/* @__PURE__ */new Map,aE=[],oE=/* @__PURE__ */new Set,sE=e=>oE.forEach(t=>t(e)),lE=()=>iE.size>0;function cE(e,t){var n;if(t)return!(null==(n=iE.get(t))||!n.isToastActive(e));let r=!1;return iE.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function uE(e,t){XA(e)&&(lE()||aE.push({content:e,options:t}),iE.forEach(n=>{n.buildToast(e,t)}))}function dE(e,t){iE.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function pE(e){let t=e.containerId||1;return{subscribe(n){let r=function(e,t,n){let r=1,i=0,a=[],o=[],s=t,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u=()=>{o=Array.from(l.values()),c.forEach(e=>e())},d=e=>{var t,r;e.isActive&&(null==(r=null==(t=e.props)?void 0:t.onClose)||r.call(t,e.removalReason),e.isActive=!1,n(QA(e,"removed")))},p=e=>{if(null==e)l.forEach(d);else{let t=l.get(e);t&&d(t)}u()},f=e=>{var t,r;let{toastId:i,updateId:a}=e.props,o=null==a;e.staleId&&l.delete(e.staleId),e.isActive=!0,l.set(i,e),u(),n(QA(e,o?"added":"updated")),o&&(null==(r=(t=e.props).onOpen)||r.call(t))};return{id:e,props:s,observe:e=>(c.add(e),()=>c.delete(e)),toggle:(e,t)=>{l.forEach(n=>{var r;(null==t||t===n.props.toastId)&&(null==(r=n.toggle)||r.call(n,e))})},removeToast:p,toasts:l,clearQueue:()=>{i-=a.length,a=[]},buildToast:(t,n)=>{if((({containerId:t,toastId:n,updateId:r})=>{let i=t?t!==e:1!==e,a=l.has(n)&&null==r;return i||a})(n))return;let{toastId:o,updateId:c,data:d,staleId:h,delay:m}=n,g=null==c;g&&i++;let y={...s,style:s.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t)),toastId:o,updateId:c,data:d,isIn:!1,className:YA(n.className||s.toastClassName),progressClassName:YA(n.progressClassName||s.progressClassName),autoClose:!n.isLoading&&JA(n.autoClose,s.autoClose),closeToast(e){let t=l.get(o);t&&(t.removalReason=e,p(o))},deleteToast(){if(null!=l.get(o)){if(l.delete(o),i--,i<0&&(i=0),a.length>0)return void f(a.shift());u()}}};y.closeButton=s.closeButton,!1===n.closeButton||XA(n.closeButton)?y.closeButton=n.closeButton:!0===n.closeButton&&(y.closeButton=!XA(s.closeButton)||s.closeButton);let b={content:t,props:y,staleId:h};s.limit&&s.limit>0&&i>s.limit&&g?a.push(b):VA(m)?setTimeout(()=>{f(b)},m):f(b)},setProps(e){s=e},setToggle:(e,t)=>{let n=l.get(e);n&&(n.toggle=t)},isToastActive:e=>{var t;return null==(t=l.get(e))?void 0:t.isActive},getSnapshot:()=>o}}(t,e,sE);iE.set(t,r);let i=r.observe(n);return aE.forEach(e=>uE(e.content,e.options)),aE=[],()=>{i(),iE.delete(t)}},setProps(e){var n;null==(n=iE.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=iE.get(t))?void 0:e.getSnapshot()}}}function fE(e){return e&&(GA(e.toastId)||VA(e.toastId))?e.toastId:rE()}function hE(e,t){return uE(e,t),t.toastId}function mE(e,t){return{...t,type:t&&t.type||e,toastId:fE(t)}}function gE(e){return(t,n)=>hE(t,mE(e,n))}function yE(e,t){return hE(e,mE("default",t))}yE.loading=(e,t)=>hE(e,mE("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),yE.promise=function(e,{pending:t,error:n,success:r},i){let a;t&&(a=GA(t)?yE.loading(t,i):yE.loading(t.render,{...i,...t}));let o={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,n)=>{if(null==t)return void yE.dismiss(a);let r={type:e,...o,...i,data:n},s=GA(t)?{render:t}:t;return a?yE.update(a,{...r,...s}):yE(s.render,{...r,...s}),n},l=KA(e)?e():e;return l.then(e=>s("success",r,e)).catch(e=>s("error",n,e)),l},yE.success=gE("success"),yE.info=gE("info"),yE.error=gE("error"),yE.warning=gE("warning"),yE.warn=yE.warning,yE.dark=(e,t)=>hE(e,mE("default",{theme:"dark",...t})),yE.dismiss=function(e){!function(e){if(lE()){if(null==e||(e=>GA(e)||VA(e))(e))iE.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=iE.get(e.containerId);t?t.removeToast(e.id):iE.forEach(t=>{t.removeToast(e.id)})}}else aE=aE.filter(t=>null!=e&&t.options.toastId!==e)}(e)},yE.clearWaitingQueue=(e={})=>{iE.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},yE.isActive=cE,yE.update=(e,t={})=>{let n=((e,{containerId:t})=>{var n;return null==(n=iE.get(t||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:rE()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,hE(o,a)}},yE.done=e=>{yE.update(e,{progress:1})},yE.onChange=function(e){return oE.add(e),()=>{oE.delete(e)}},yE.play=e=>dE(!0,e),yE.pause=e=>dE(!1,e);var bE="undefined"!=typeof window?w:g,vE=({theme:e,type:n,isLoading:r,...i})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...i}),wE={info:function(e){return t.createElement(vE,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return t.createElement(vE,{...e},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return t.createElement(vE,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return t.createElement(vE,{...e},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};var kE=e=>{let{isRunning:n,preventExitTransition:r,toastRef:i,eventHandlers:a,playToast:o}=function(e){let[t,n]=S(!1),[r,i]=S(!1),a=x(null),o=x({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;function p(){n(!0)}function f(){n(!1)}function h(n){let r=a.current;if(o.canDrag&&r){o.didMove=!0,t&&f(),"x"===e.draggableDirection?o.delta=n.clientX-o.start:o.delta=n.clientY-o.start,o.start!==n.clientX&&(o.canCloseOnClick=!1);let i="x"===e.draggableDirection?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`;r.style.transform=`translate3d(${i},0)`,r.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance))}}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);let t=a.current;if(o.canDrag&&o.didMove&&t){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=iE.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:n}),g(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||f(),window.addEventListener("focus",p),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",f)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){o.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);let n=a.current;o.canCloseOnClick=!0,o.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(o.start=t.clientX,o.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(o.start=t.clientY,o.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:n,bottom:r,left:i,right:o}=a.current.getBoundingClientRect();"mouse"===t.pointerType&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=n&&t.clientY<=r?f():p()}};return s&&l&&(y.onMouseEnter=f,e.stacked||(y.onMouseLeave=p)),d&&(y.onClick=e=>{u&&u(e),o.canCloseOnClick&&c(!0)}),{playToast:p,pauseToast:f,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:y}}(e),{closeButton:l,children:c,autoClose:d,onClick:p,type:f,hideProgressBar:h,closeToast:m,transition:y,position:b,className:v,style:w,progressClassName:k,updateId:T,role:C,progress:A,rtl:E,toastId:I,deleteToast:_,isIn:O,isLoading:N,closeOnClick:M,theme:P,ariaLabel:L}=e,D=U("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":M}),z=KA(v)?v({rtl:E,position:b,type:f,defaultClassName:D}):U(D,v),R=function({theme:e,type:t,isLoading:n,icon:r}){let i=null,a={theme:e,type:t};return!1===r||(KA(r)?i=r({...a,isLoading:n}):u(r)?i=s(r,a):n?i=wE.spinner():(e=>e in wE)(t)&&(i=wE[t](a))),i}(e),j=!!A||!d,$={closeToast:m,type:f,theme:P},F=null;return!1===l||(F=KA(l)?l($):u(l)?s(l,$):function({closeToast:e,theme:n,ariaLabel:r="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":r},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}($)),t.createElement(y,{isIn:O,done:_,position:b,preventExitTransition:r,nodeRef:i,playToast:o},t.createElement("div",{id:I,tabIndex:0,onClick:p,"data-in":O,className:z,...a,style:w,ref:i,...O&&{role:C,"aria-label":L}},null!=R&&t.createElement("div",{className:U("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},R),eE(c,e,!n),F,!e.customProgressBar&&t.createElement(tE,{...T&&!j?{key:`p-${T}`}:{},rtl:E,theme:P,delay:d,isRunning:n,isIn:O,closeToast:m,hide:h,type:f,className:k,controlledProgress:j,progress:A||0})))},xE=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),SE=ZA(xE("bounce",!0)),TE=(ZA(xE("slide",!0)),ZA(xE("zoom")),ZA(xE("flip")),{position:"top-right",transition:SE,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function CE(e){let n={...TE,...e},r=e.stacked,[i,a]=S(!0),o=x(null),{getToastToRender:s,isToastActive:l,count:c}=function(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=x(pE(e)).current;i(e);let a=null==(t=T(n,r,r))?void 0:t.slice();return{getToastToRender:function(t){if(!a)return[];let n=/* @__PURE__ */new Map;return e.newestOnTop&&a.reverse(),a.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:cE,count:null==a?void 0:a.length}}(n),{className:u,style:d,rtl:p,containerId:f,hotKeys:h}=n;function m(e){let t=U("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":p});return KA(u)?u({position:e,rtl:p,defaultClassName:t}):U(t,YA(u))}function y(){r&&(a(!0),yE.play())}return bE(()=>{var e;if(r){let t=o.current.querySelectorAll('[data-in="true"]'),r=12,a=null==(e=n.position)?void 0:e.includes("top"),s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{let n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${i}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");let o=s*(i?.2:1)+(i?0:r*t),c=Math.max(.5,1-(i?l:0));n.style.setProperty("--y",`${a?o:-1*o}px`),n.style.setProperty("--g",`${r}`),n.style.setProperty("--s",`${c}`),s+=n.offsetHeight,l+=.025})}},[i,c,r]),g(()=>{function e(e){var t;let n=o.current;h(e)&&(null==(t=null==n?void 0:n.querySelector('[tabIndex="0"]'))||t.focus(),a(!1),yE.pause()),"Escape"===e.key&&(document.activeElement===n||null!=n&&n.contains(document.activeElement))&&(a(!0),yE.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h]),t.createElement("section",{ref:o,className:"Toastify",id:f,onMouseEnter:()=>{r&&(a(!1),yE.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":n["aria-label"]},s((e,n)=>{let i=n.length?{...d}:{...d,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:m(e),"data-stacked":r,style:i,key:`c-${e}`},n.map(({content:e,props:n})=>t.createElement(kE,{...n,stacked:r,collapseAll:y,isIn:l(n.toastId,n.containerId),key:`t-${n.key}`},e)))}))}var AE=/* @__PURE__ */new Map;function EE(e){return((e,t)=>{bE(()=>{if("undefined"==typeof document)return;let n=document,r=AE.get(n);if(r)return void(t&&r.setAttribute("nonce",t));let i=n.createElement("style");i.textContent=e,t&&i.setAttribute("nonce",t),n.head.appendChild(i),AE.set(n,i)},[t])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",e.nonce),t.createElement(CE,{...e})}var IE=({children:e,classNameToast:t="",classNameContainer:n="",isFixed:r=!0,containerId:i})=>{let a=k(()=>i??crypto.randomUUID(),[i]),o=h(async(e,n={})=>{let{appeareance:r="default",placement:i="top-right",autoDismiss:o=!0,autoDismissTimeout:s=5e3,theme:l="light",icon:c}=n,u=yE;r&&"default"!==r&&yE[r]&&(u=yE[r]),u(e,{className:t,position:i,autoClose:!!o&&s,hideProgressBar:!o,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:l,icon:c,containerId:a})},[t,a]),s=k(()=>({addToast:o}),[o]);/* @__PURE__ */
111
- return _(WA,{value:s,children:[/* @__PURE__ */I(EE,{containerId:a,pauseOnFocusLoss:!1,className:U(n,{"toast-container--absolute":!r})}),e]})},_E={source:"space",title:"Add Notification",strictParams:!0,params:{content:{type:"textarea",description:"The notification text shown to the user — this is the message body. There is no separate title/message/type param.",default:"Content"},placement:{type:"select",description:"Where the toast appears on screen.",default:"top-right",options:["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]},appearance:{type:"select",description:"Visual style of the notification: success, danger, warning or info.",default:"success",options:["success","danger","warning","info"]},autoDismiss:{type:"boolean",description:"Whether the notification dismisses itself after a timeout.",default:!0,canBind:!1},autoDismissTimeout:{type:"number",description:"Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",default:5e3,when:e=>!0===e.autoDismiss}}},OE=({children:e})=>{const{addToast:t}=(()=>{let e=f(WA);if(void 0===e)throw Error("ToastContext value is undefined. Make sure you use the ToastProvider before using the hook.");return e})(),{useInteractions:n}=f(dS),{resolvedTheme:r}=Gc(Vc),i=h(e=>{const{placement:n,appearance:i,autoDismiss:a,autoDismissTimeout:o}=e;let{content:s}=e;"string"!=typeof s&&(s=JSON.stringify(s)),t(/* @__PURE__ */I("div",{className:"whitespace-break-spaces",children:s}),{appeareance:i,autoDismiss:a,placement:n,autoDismissTimeout:o,theme:r})},[t,r]);return n({id:"space",callbacks:k(()=>({addNotification:gd("addNotification",_E,i)}),[i])}),/* @__PURE__ */I(E,{children:e})},NE=({children:e})=>{const{webId:t}=f(Ec);/* @__PURE__ */
112
- return I(IE,{containerId:`toast-container-${t}`,classNameContainer:"plitzi-sdk-toasts",children:/* @__PURE__ */I(OE,{children:e})})},ME=()=>{const{overQuota:e}=X();return e?/* @__PURE__ */_("div",{className:"plitzi-over-quota",role:"status",children:[/* @__PURE__ */I("span",{className:"plitzi-over-quota__text",children:"This site is over its monthly plan limit."}),/* @__PURE__ */I("a",{className:"plitzi-over-quota__cta",href:"https://plitzi.com/pricing",rel:"noreferrer noopener",target:"_blank",children:"Upgrade"})]}):null},PE=p(({pageId:e="",style:t="",plitziContextValue:n,assets:r=$r,ref:i})=>{const a=k(()=>({id:e,rootId:e}),[e]);/* @__PURE__ */
113
- return I(yS,{ref:i,id:"i-sdk",css:t,assets:r,className:"w-full grow",children:/* @__PURE__ */_(NE,{children:[/* @__PURE__ */I(lc,{value:n,children:e&&/* @__PURE__ */I(tC,{internalProps:a})}),/* @__PURE__ */I(ME,{})]})})}),LE=p(({pageId:e="",style:t="",plitziContextValue:n,renderMode:r="raw"})=>{const i=k(()=>({id:e,rootId:e}),[e]),[a]=zt("schema.flat"),o=k(()=>e&&"widget"===r?ar(a,`${e}.definition.type`,"page"):"page",[e,r,a]);/* @__PURE__ */
114
- return _(NE,{children:[
106
+ /* @__PURE__ */I("button",{type:"button",className:"plitzi-component__pagination-next",disabled:!S&&m,onClick:A(v+1),children:c})]}),!m&&O&&/* @__PURE__ */I("span",{className:"plitzi-component__pagination-hint",children:"Bind pageInfo"}),n]})}),jA=Object.assign(RA,zA),$A=l(void 0);$A.displayName="TabContainerContext";var FA=ld(({ref:e,className:t="",children:n})=>{let{id:r,rootId:i}=cd(),[a,o]=S(0),s=`${i}_${r}`,l=k(()=>({baseId:s,tabSelected:a,onSelect:o}),[s,a]);/* @__PURE__ */
107
+ return I(Vd,{ref:e,className:U("plitzi-component__tab-container",t),children:/* @__PURE__ */I($A,{value:l,children:n})})}),qA=ld(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:a,onSelect:o}=f($A),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]};return n.forEach(r,(t,n)=>{if(!u(t))return;let r=t.props;e.childrenParsed.push(s(t,{...r,internalProps:{...r.internalProps,baseId:i,onSelect:o,tabSelected:a,tabIndex:n}}))}),e},[i,r,o,a]);/* @__PURE__ */
108
+ return I(Vd,{ref:e,className:U("plitzi-component__tab-container-body",t),children:l})}),BA=Object.assign(qA,{type:"tabContainerBody",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Body",type:"tabContainerBody",description:"The panel area inside a tabContainer that shows the active tab item.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Body",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),UA=ld(({ref:e,className:t="",children:r})=>{let{baseId:i,tabSelected:a,onSelect:o}=f($A),{childrenParsed:l}=k(()=>{let e={childrenParsed:[]},t=n.toArray(r).filter(u).length;return n.forEach(r,(n,r)=>{if(!u(n))return;let l=n.props;e.childrenParsed.push(s(n,{...l,internalProps:{...l.internalProps,isHeader:!0,baseId:i,onSelect:o,tabSelected:a,tabIndex:r,tabCount:t}}))}),e},[i,r,o,a]);/* @__PURE__ */
109
+ return I(Vd,{ref:e,role:"tablist",className:U("plitzi-component__tab-container-header",t),children:l})}),HA=Object.assign(UA,{type:"tabContainerHeader",ancestorType:"tabContainer",content:{attributes:{},definition:{label:"Tab Container Header",type:"tabContainerHeader",description:"The row of tab triggers inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!1,canSelect:!0,canDragDrop:!1,canMove:!1,canSnippet:!1,itemsAllowed:["tabContainerItem"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Header",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerItem","tabContainerItem","tabContainerItem"]}),WA=ld(({className:e="",children:t,ref:n,baseId:r="",tabSelected:i,tabIndex:a=0,tabCount:o=0,isHeader:s,onSelect:l})=>{let c=i===a,u=`${r}_tab_${a}`,d=`${r}_panel_${a}`,p=h(()=>{s&&!c&&l?.(a)},[s,c,a,l]),f=h(e=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void l?.(a);let t=((e,t,n)=>{switch(e){case"ArrowRight":case"ArrowDown":return(t+1)%n;case"ArrowLeft":case"ArrowUp":return(t-1+n)%n;case"Home":return 0;case"End":return n-1;default:return}})(e.key,a,o);void 0!==t&&0!==o&&(e.preventDefault(),l?.(t),e.currentTarget.ownerDocument.getElementById(`${r}_tab_${t}`)?.focus())},[r,a,o,l]),m=s?{id:u,role:"tab","aria-selected":c,"aria-controls":d,tabIndex:c?0:-1,onKeyDown:f}:{id:d,role:"tabpanel","aria-labelledby":u,tabIndex:0};/* @__PURE__ */
110
+ return I(Vd,{ref:n,onClick:p,className:U("plitzi-component__tab-container-item",e,{active:c}),...r?m:{},children:t})}),VA=Object.assign(WA,{type:"tabContainerItem",content:{attributes:{},definition:{label:"Tab Container Item",type:"tabContainerItem",description:"One selectable tab (trigger + panel) inside a tabContainer.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:["tabContainerItem","tabContainerHeader","tabContainerBody"]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container Item",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}}}),GA=Object.assign(FA,{type:"tabContainer",content:{attributes:{},definition:{label:"Tab Container",type:"tabContainer",description:"A tabbed container that switches between panels; composed of header/body/item parts.",items:[],bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:["tabContainerHeader","tabContainerBody"],itemsNotAllowed:[]},market:{category:"structure",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:"fa-solid fa-table-columns"},defaultStyle:{name:"Tab Container",displayMode:"desktop",style:{base:{default:{}}},subTypes:{}},settings:{}},initialItems:["tabContainerHeader","tabContainerBody"],plugins:{tabContainerHeader:HA,tabContainerBody:BA,tabContainerItem:VA}}),KA=l({addToast:()=>{}});KA.displayName="ToastContext";var YA=e=>"number"==typeof e&&!isNaN(e),JA=e=>"string"==typeof e,XA=e=>"function"==typeof e,ZA=e=>JA(e)||XA(e)?e:null,QA=(e,t)=>!1===e||YA(e)&&e>0?e:t,eE=e=>u(e)||JA(e)||XA(e)||YA(e);function tE({enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}){return function({children:o,position:s,preventExitTransition:l,done:c,nodeRef:u,isIn:d,playToast:p}){let f=r?`${e}--${s}`:e,h=r?`${n}--${s}`:n,m=x(0);return w(()=>{let e=u.current,t=f.split(" "),n=r=>{r.target===u.current&&(p(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===m.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),g(()=>{let e=u.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,c,a):c()};d||(l?t():(m.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[d]),t.createElement(t.Fragment,null,o)}}function nE(e,t){return{content:rE(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function rE(e,t,n=!1){return u(e)&&!JA(e.type)?s(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):XA(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function iE({delay:e,isRunning:n,closeToast:r,type:i="default",hide:a,className:o,controlledProgress:s,progress:l,rtl:c,isIn:u,theme:d}){let p=a||s&&0===l,f={animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};s&&(f.transform=`scaleX(${l})`);let h=U("Toastify__progress-bar",s?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":c}),m=XA(o)?o({rtl:c,type:i,defaultClassName:h}):U(h,o),g={[s&&l>=1?"onTransitionEnd":"onAnimationEnd"]:s&&l<1?null:()=>{u&&r()}};return t.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},t.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${i}`}),t.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":s?Math.round(100*l):void 0,"aria-valuemin":0,"aria-valuemax":100,className:m,style:f,...g}))}var aE=1,oE=()=>""+aE++;var sE=/* @__PURE__ */new Map,lE=[],cE=/* @__PURE__ */new Set,uE=e=>cE.forEach(t=>t(e)),dE=()=>sE.size>0;function pE(e,t){var n;if(t)return!(null==(n=sE.get(t))||!n.isToastActive(e));let r=!1;return sE.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function fE(e,t){eE(e)&&(dE()||lE.push({content:e,options:t}),sE.forEach(n=>{n.buildToast(e,t)}))}function hE(e,t){sE.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function mE(e){let t=e.containerId||1;return{subscribe(n){let r=function(e,t,n){let r=1,i=0,a=[],o=[],s=t,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,u=()=>{o=Array.from(l.values()),c.forEach(e=>e())},d=e=>{var t,r;e.isActive&&(null==(r=null==(t=e.props)?void 0:t.onClose)||r.call(t,e.removalReason),e.isActive=!1,n(nE(e,"removed")))},p=e=>{if(null==e)l.forEach(d);else{let t=l.get(e);t&&d(t)}u()},f=e=>{var t,r;let{toastId:i,updateId:a}=e.props,o=null==a;e.staleId&&l.delete(e.staleId),e.isActive=!0,l.set(i,e),u(),n(nE(e,o?"added":"updated")),o&&(null==(r=(t=e.props).onOpen)||r.call(t))};return{id:e,props:s,observe:e=>(c.add(e),()=>c.delete(e)),toggle:(e,t)=>{l.forEach(n=>{var r;(null==t||t===n.props.toastId)&&(null==(r=n.toggle)||r.call(n,e))})},removeToast:p,toasts:l,clearQueue:()=>{i-=a.length,a=[]},buildToast:(t,n)=>{if((({containerId:t,toastId:n,updateId:r})=>{let i=t?t!==e:1!==e,a=l.has(n)&&null==r;return i||a})(n))return;let{toastId:o,updateId:c,data:d,staleId:h,delay:m}=n,g=null==c;g&&i++;let y={...s,style:s.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t)),toastId:o,updateId:c,data:d,isIn:!1,className:ZA(n.className||s.toastClassName),progressClassName:ZA(n.progressClassName||s.progressClassName),autoClose:!n.isLoading&&QA(n.autoClose,s.autoClose),closeToast(e){let t=l.get(o);t&&(t.removalReason=e,p(o))},deleteToast(){if(null!=l.get(o)){if(l.delete(o),i--,i<0&&(i=0),a.length>0)return void f(a.shift());u()}}};y.closeButton=s.closeButton,!1===n.closeButton||eE(n.closeButton)?y.closeButton=n.closeButton:!0===n.closeButton&&(y.closeButton=!eE(s.closeButton)||s.closeButton);let b={content:t,props:y,staleId:h};s.limit&&s.limit>0&&i>s.limit&&g?a.push(b):YA(m)?setTimeout(()=>{f(b)},m):f(b)},setProps(e){s=e},setToggle:(e,t)=>{let n=l.get(e);n&&(n.toggle=t)},isToastActive:e=>{var t;return null==(t=l.get(e))?void 0:t.isActive},getSnapshot:()=>o}}(t,e,uE);sE.set(t,r);let i=r.observe(n);return lE.forEach(e=>fE(e.content,e.options)),lE=[],()=>{i(),sE.delete(t)}},setProps(e){var n;null==(n=sE.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=sE.get(t))?void 0:e.getSnapshot()}}}function gE(e){return e&&(JA(e.toastId)||YA(e.toastId))?e.toastId:oE()}function yE(e,t){return fE(e,t),t.toastId}function bE(e,t){return{...t,type:t&&t.type||e,toastId:gE(t)}}function vE(e){return(t,n)=>yE(t,bE(e,n))}function wE(e,t){return yE(e,bE("default",t))}wE.loading=(e,t)=>yE(e,bE("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),wE.promise=function(e,{pending:t,error:n,success:r},i){let a;t&&(a=JA(t)?wE.loading(t,i):wE.loading(t.render,{...i,...t}));let o={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,n)=>{if(null==t)return void wE.dismiss(a);let r={type:e,...o,...i,data:n},s=JA(t)?{render:t}:t;return a?wE.update(a,{...r,...s}):wE(s.render,{...r,...s}),n},l=XA(e)?e():e;return l.then(e=>s("success",r,e)).catch(e=>s("error",n,e)),l},wE.success=vE("success"),wE.info=vE("info"),wE.error=vE("error"),wE.warning=vE("warning"),wE.warn=wE.warning,wE.dark=(e,t)=>yE(e,bE("default",{theme:"dark",...t})),wE.dismiss=function(e){!function(e){if(dE()){if(null==e||(e=>JA(e)||YA(e))(e))sE.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=sE.get(e.containerId);t?t.removeToast(e.id):sE.forEach(t=>{t.removeToast(e.id)})}}else lE=lE.filter(t=>null!=e&&t.options.toastId!==e)}(e)},wE.clearWaitingQueue=(e={})=>{sE.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},wE.isActive=pE,wE.update=(e,t={})=>{let n=((e,{containerId:t})=>{var n;return null==(n=sE.get(t||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:oE()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,yE(o,a)}},wE.done=e=>{wE.update(e,{progress:1})},wE.onChange=function(e){return cE.add(e),()=>{cE.delete(e)}},wE.play=e=>hE(!0,e),wE.pause=e=>hE(!1,e);var kE="undefined"!=typeof window?w:g,xE=({theme:e,type:n,isLoading:r,...i})=>t.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...i}),SE={info:function(e){return t.createElement(xE,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return t.createElement(xE,{...e},t.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return t.createElement(xE,{...e},t.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return t.createElement(xE,{...e},t.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return t.createElement("div",{className:"Toastify__spinner"})}};var TE=e=>{let{isRunning:n,preventExitTransition:r,toastRef:i,eventHandlers:a,playToast:o}=function(e){let[t,n]=S(!1),[r,i]=S(!1),a=x(null),o=x({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;function p(){n(!0)}function f(){n(!1)}function h(n){let r=a.current;if(o.canDrag&&r){o.didMove=!0,t&&f(),"x"===e.draggableDirection?o.delta=n.clientX-o.start:o.delta=n.clientY-o.start,o.start!==n.clientX&&(o.canCloseOnClick=!1);let i="x"===e.draggableDirection?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`;r.style.transform=`translate3d(${i},0)`,r.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance))}}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);let t=a.current;if(o.canDrag&&o.didMove&&t){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=sE.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:n}),g(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||f(),window.addEventListener("focus",p),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",f)}},[e.pauseOnFocusLoss]);let y={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){o.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);let n=a.current;o.canCloseOnClick=!0,o.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(o.start=t.clientX,o.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(o.start=t.clientY,o.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:n,bottom:r,left:i,right:o}=a.current.getBoundingClientRect();"mouse"===t.pointerType&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=n&&t.clientY<=r?f():p()}};return s&&l&&(y.onMouseEnter=f,e.stacked||(y.onMouseLeave=p)),d&&(y.onClick=e=>{u&&u(e),o.canCloseOnClick&&c(!0)}),{playToast:p,pauseToast:f,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:y}}(e),{closeButton:l,children:c,autoClose:d,onClick:p,type:f,hideProgressBar:h,closeToast:m,transition:y,position:b,className:v,style:w,progressClassName:k,updateId:T,role:C,progress:A,rtl:E,toastId:I,deleteToast:_,isIn:O,isLoading:N,closeOnClick:M,theme:P,ariaLabel:L}=e,D=U("Toastify__toast",`Toastify__toast-theme--${P}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":M}),z=XA(v)?v({rtl:E,position:b,type:f,defaultClassName:D}):U(D,v),R=function({theme:e,type:t,isLoading:n,icon:r}){let i=null,a={theme:e,type:t};return!1===r||(XA(r)?i=r({...a,isLoading:n}):u(r)?i=s(r,a):n?i=SE.spinner():(e=>e in SE)(t)&&(i=SE[t](a))),i}(e),j=!!A||!d,$={closeToast:m,type:f,theme:P},F=null;return!1===l||(F=XA(l)?l($):u(l)?s(l,$):function({closeToast:e,theme:n,ariaLabel:r="close"}){return t.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":r},t.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},t.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}($)),t.createElement(y,{isIn:O,done:_,position:b,preventExitTransition:r,nodeRef:i,playToast:o},t.createElement("div",{id:I,tabIndex:0,onClick:p,"data-in":O,className:z,...a,style:w,ref:i,...O&&{role:C,"aria-label":L}},null!=R&&t.createElement("div",{className:U("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},R),rE(c,e,!n),F,!e.customProgressBar&&t.createElement(iE,{...T&&!j?{key:`p-${T}`}:{},rtl:E,theme:P,delay:d,isRunning:n,isIn:O,closeToast:m,hide:h,type:f,className:k,controlledProgress:j,progress:A||0})))},CE=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),AE=tE(CE("bounce",!0)),EE=(tE(CE("slide",!0)),tE(CE("zoom")),tE(CE("flip")),{position:"top-right",transition:AE,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function IE(e){let n={...EE,...e},r=e.stacked,[i,a]=S(!0),o=x(null),{getToastToRender:s,isToastActive:l,count:c}=function(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=x(mE(e)).current;i(e);let a=null==(t=T(n,r,r))?void 0:t.slice();return{getToastToRender:function(t){if(!a)return[];let n=/* @__PURE__ */new Map;return e.newestOnTop&&a.reverse(),a.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:pE,count:null==a?void 0:a.length}}(n),{className:u,style:d,rtl:p,containerId:f,hotKeys:h}=n;function m(e){let t=U("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":p});return XA(u)?u({position:e,rtl:p,defaultClassName:t}):U(t,ZA(u))}function y(){r&&(a(!0),wE.play())}return kE(()=>{var e;if(r){let t=o.current.querySelectorAll('[data-in="true"]'),r=12,a=null==(e=n.position)?void 0:e.includes("top"),s=0,l=0;Array.from(t).reverse().forEach((e,t)=>{let n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed=`${i}`),n.dataset.pos||(n.dataset.pos=a?"top":"bot");let o=s*(i?.2:1)+(i?0:r*t),c=Math.max(.5,1-(i?l:0));n.style.setProperty("--y",`${a?o:-1*o}px`),n.style.setProperty("--g",`${r}`),n.style.setProperty("--s",`${c}`),s+=n.offsetHeight,l+=.025})}},[i,c,r]),g(()=>{function e(e){var t;let n=o.current;h(e)&&(null==(t=null==n?void 0:n.querySelector('[tabIndex="0"]'))||t.focus(),a(!1),wE.pause()),"Escape"===e.key&&(document.activeElement===n||null!=n&&n.contains(document.activeElement))&&(a(!0),wE.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h]),t.createElement("section",{ref:o,className:"Toastify",id:f,onMouseEnter:()=>{r&&(a(!1),wE.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":n["aria-label"]},s((e,n)=>{let i=n.length?{...d}:{...d,pointerEvents:"none"};return t.createElement("div",{tabIndex:-1,className:m(e),"data-stacked":r,style:i,key:`c-${e}`},n.map(({content:e,props:n})=>t.createElement(TE,{...n,stacked:r,collapseAll:y,isIn:l(n.toastId,n.containerId),key:`t-${n.key}`},e)))}))}var _E=/* @__PURE__ */new Map;function OE(e){return((e,t)=>{kE(()=>{if("undefined"==typeof document)return;let n=document,r=_E.get(n);if(r)return void(t&&r.setAttribute("nonce",t));let i=n.createElement("style");i.textContent=e,t&&i.setAttribute("nonce",t),n.head.appendChild(i),_E.set(n,i)},[t])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",e.nonce),t.createElement(IE,{...e})}var NE=({children:e,classNameToast:t="",classNameContainer:n="",isFixed:r=!0,containerId:i})=>{let a=k(()=>i??crypto.randomUUID(),[i]),o=h(async(e,n={})=>{let{appeareance:r="default",placement:i="top-right",autoDismiss:o=!0,autoDismissTimeout:s=5e3,theme:l="light",icon:c}=n,u=wE;r&&"default"!==r&&wE[r]&&(u=wE[r]),u(e,{className:t,position:i,autoClose:!!o&&s,hideProgressBar:!o,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:l,icon:c,containerId:a})},[t,a]),s=k(()=>({addToast:o}),[o]);/* @__PURE__ */
111
+ return _(KA,{value:s,children:[/* @__PURE__ */I(OE,{containerId:a,pauseOnFocusLoss:!1,className:U(n,{"toast-container--absolute":!r})}),e]})},ME={source:"space",title:"Add Notification",strictParams:!0,params:{content:{type:"textarea",description:"The notification text shown to the user — this is the message body. There is no separate title/message/type param.",default:"Content"},placement:{type:"select",description:"Where the toast appears on screen.",default:"top-right",options:["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]},appearance:{type:"select",description:"Visual style of the notification: success, danger, warning or info.",default:"success",options:["success","danger","warning","info"]},autoDismiss:{type:"boolean",description:"Whether the notification dismisses itself after a timeout.",default:!0,canBind:!1},autoDismissTimeout:{type:"number",description:"Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",default:5e3,when:e=>!0===e.autoDismiss}}},PE=({children:e})=>{const{addToast:t}=(()=>{let e=f(KA);if(void 0===e)throw Error("ToastContext value is undefined. Make sure you use the ToastProvider before using the hook.");return e})(),{useInteractions:n}=f(hS),{resolvedTheme:r}=Gc(Vc),i=h(e=>{const{placement:n,appearance:i,autoDismiss:a,autoDismissTimeout:o}=e;let{content:s}=e;"string"!=typeof s&&(s=JSON.stringify(s)),t(/* @__PURE__ */I("div",{className:"whitespace-break-spaces",children:s}),{appeareance:i,autoDismiss:a,placement:n,autoDismissTimeout:o,theme:r})},[t,r]);return n({id:"space",callbacks:k(()=>({addNotification:gd("addNotification",ME,i)}),[i])}),/* @__PURE__ */I(E,{children:e})},LE=({children:e})=>{const{webId:t}=f(Ec);/* @__PURE__ */
112
+ return I(NE,{containerId:`toast-container-${t}`,classNameContainer:"plitzi-sdk-toasts",children:/* @__PURE__ */I(PE,{children:e})})},DE=()=>{const{overQuota:e}=X();return e?/* @__PURE__ */_("div",{className:"plitzi-over-quota",role:"status",children:[/* @__PURE__ */I("span",{className:"plitzi-over-quota__text",children:"This site is over its monthly plan limit."}),/* @__PURE__ */I("a",{className:"plitzi-over-quota__cta",href:"https://plitzi.com/pricing",rel:"noreferrer noopener",target:"_blank",children:"Upgrade"})]}):null},zE=p(({pageId:e="",style:t="",plitziContextValue:n,assets:r=$r,ref:i})=>{const a=k(()=>({id:e,rootId:e}),[e]);/* @__PURE__ */
113
+ return I(wS,{ref:i,id:"i-sdk",css:t,assets:r,className:"w-full grow",children:/* @__PURE__ */_(LE,{children:[/* @__PURE__ */I(lc,{value:n,children:e&&/* @__PURE__ */I(iC,{internalProps:a})}),/* @__PURE__ */I(DE,{})]})})}),RE=p(({pageId:e="",style:t="",plitziContextValue:n,renderMode:r="raw"})=>{const i=k(()=>({id:e,rootId:e}),[e]),[a]=zt("schema.flat"),o=k(()=>e&&"widget"===r?ar(a,`${e}.definition.type`,"page"):"page",[e,r,a]);/* @__PURE__ */
114
+ return _(LE,{children:[
115
115
  /* @__PURE__ */I("style",{type:"text/css",rel:"stylesheet","data-id":"plitzi-runtime-style",children:t}),
116
- /* @__PURE__ */_(lc,{value:n,children:[e&&"widget"!==r&&/* @__PURE__ */I(tC,{internalProps:i}),e&&"widget"===r&&/* @__PURE__ */I(IS,{type:o,internalProps:i},e)]}),
117
- /* @__PURE__ */I(ME,{})]})}),DE=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),zE=l({shadowRoot:null});zE.displayName="ContainerShadowContext";var RE=({href:e,onLoad:t,onError:n,onRegister:r,onUnregister:i,...a})=>{let[o,s]=S(!1),l=x(null);return g(()=>(r?.(l),s(!0),()=>{i?.(l)}),[]),/* @__PURE__ */I("link",o?{ref:l,href:e,onLoad:t,onError:n,rel:"stylesheet",...a}:{ref:l,rel:"stylesheet",...a})},jE=({children:e,...t})=>{let n=x(null);/* @__PURE__ */
118
- return I("style",{ref:n,...t,children:e})},$E=({ref:e,className:t="",children:r,mode:i="open",delegatesFocus:a=!1,stylesheets:o,fallback:l})=>{let c=x(null);v(e,()=>c.current,[c]);let[d,p]=S(null),[f,h]=S(!1),m=e=>{M(t=>{if(!e.current)return t;let n=[...t.pending,e.current];return{isLoading:n.length>0,pending:n}})},y=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.current);return{isLoading:n.length>0,pending:n}})},b=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},w=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},T=()=>{},{content:C,links:A,styles:E}=k(()=>{let e={content:/* @__PURE__ */I(DE,{},"shadow-content"),links:[],styles:[]};return n.forEach(r,(t,n)=>{u(t)&&(t.type===DE?e.content=s(t,{...t.props,key:"shadow-content",contentDidMount:T}):t.type===RE?e.links.push(s(t,{...t.props,key:n,onRegister:m,onUnregister:y,onLoad:b,onError:w})):t.type===jE&&(e.content=s(t,{...t.props,key:n})))}),e},[r]),[N,M]=S({isLoading:0!==A.length,pending:[]});g(()=>{if(c.current){let e=c.current.attachShadow({mode:i,delegatesFocus:a});o&&(e.adoptedStyleSheets=o),p(e),h(!0)}},[]);let P=k(()=>({shadowRoot:d}),[d]),{isLoading:L}=N;/* @__PURE__ */
119
- return I("div",{ref:c,className:t,children:f&&d&&O(/* @__PURE__ */_(zE,{value:P,children:[A,E,!L&&C,L&&l]}),d)})};$E.Content=DE,$E.Link=RE,$E.Style=jE;var FE=$E,qE=p(({pageId:e="",sdkStylePath:t="",style:n="",plitziContextValue:r,assets:i})=>{const a=k(()=>({id:e,rootId:e}),[e]),o=k(()=>Object.values(i),[i]);/* @__PURE__ */
120
- return _(FE,{children:[o.map((e,t)=>/* @__PURE__ */I(FE.Link,{href:e.params.href},t)),
121
- /* @__PURE__ */I(FE.Link,{href:t}),
122
- /* @__PURE__ */I(FE.Content,{children:/* @__PURE__ */_(NE,{children:[
116
+ /* @__PURE__ */_(lc,{value:n,children:[e&&"widget"!==r&&/* @__PURE__ */I(iC,{internalProps:i}),e&&"widget"===r&&/* @__PURE__ */I(NS,{type:o,internalProps:i},e)]}),
117
+ /* @__PURE__ */I(DE,{})]})}),jE=({children:e,contentDidMount:t,contentDidDismount:n})=>(g(()=>(t?.(),()=>{n?.()}),[]),e),$E=l({shadowRoot:null});$E.displayName="ContainerShadowContext";var FE=({href:e,onLoad:t,onError:n,onRegister:r,onUnregister:i,...a})=>{let[o,s]=S(!1),l=x(null);return g(()=>(r?.(l),s(!0),()=>{i?.(l)}),[]),/* @__PURE__ */I("link",o?{ref:l,href:e,onLoad:t,onError:n,rel:"stylesheet",...a}:{ref:l,rel:"stylesheet",...a})},qE=({children:e,...t})=>{let n=x(null);/* @__PURE__ */
118
+ return I("style",{ref:n,...t,children:e})},BE=({ref:e,className:t="",children:r,mode:i="open",delegatesFocus:a=!1,stylesheets:o,fallback:l})=>{let c=x(null);v(e,()=>c.current,[c]);let[d,p]=S(null),[f,h]=S(!1),m=e=>{M(t=>{if(!e.current)return t;let n=[...t.pending,e.current];return{isLoading:n.length>0,pending:n}})},y=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.current);return{isLoading:n.length>0,pending:n}})},b=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},w=e=>{M(t=>{let n=t.pending.filter(t=>t!==e.target);return{isLoading:n.length>0,pending:n}})},T=()=>{},{content:C,links:A,styles:E}=k(()=>{let e={content:/* @__PURE__ */I(jE,{},"shadow-content"),links:[],styles:[]};return n.forEach(r,(t,n)=>{u(t)&&(t.type===jE?e.content=s(t,{...t.props,key:"shadow-content",contentDidMount:T}):t.type===FE?e.links.push(s(t,{...t.props,key:n,onRegister:m,onUnregister:y,onLoad:b,onError:w})):t.type===qE&&(e.content=s(t,{...t.props,key:n})))}),e},[r]),[N,M]=S({isLoading:0!==A.length,pending:[]});g(()=>{if(c.current){let e=c.current.attachShadow({mode:i,delegatesFocus:a});o&&(e.adoptedStyleSheets=o),p(e),h(!0)}},[]);let P=k(()=>({shadowRoot:d}),[d]),{isLoading:L}=N;/* @__PURE__ */
119
+ return I("div",{ref:c,className:t,children:f&&d&&O(/* @__PURE__ */_($E,{value:P,children:[A,E,!L&&C,L&&l]}),d)})};BE.Content=jE,BE.Link=FE,BE.Style=qE;var UE=BE,HE=p(({pageId:e="",sdkStylePath:t="",style:n="",plitziContextValue:r,assets:i})=>{const a=k(()=>({id:e,rootId:e}),[e]),o=k(()=>Object.values(i),[i]);/* @__PURE__ */
120
+ return _(UE,{children:[o.map((e,t)=>/* @__PURE__ */I(UE.Link,{href:e.params.href},t)),
121
+ /* @__PURE__ */I(UE.Link,{href:t}),
122
+ /* @__PURE__ */I(UE.Content,{children:/* @__PURE__ */_(LE,{children:[
123
123
  /* @__PURE__ */I("style",{dangerouslySetInnerHTML:{__html:n}}),
124
- /* @__PURE__ */I(lc,{value:r,children:e&&/* @__PURE__ */I(tC,{internalProps:a})}),
125
- /* @__PURE__ */I(ME,{})]})})]})}),BE=e=>{},UE=({head:e})=>((e=>{g(()=>{if(typeof document>"u")return;let{head:t}=document,n=[];if(e.preconnect.forEach(e=>{if(t.querySelector(`link[rel="preconnect"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel="preconnect",r.href=e.href,e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.links.forEach(e=>{if(t.querySelector(`link[rel="${e.rel}"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel=e.rel,r.href=e.href,e.as&&(r.as=e.as),e.type&&(r.type=e.type),e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.faces&&!t.querySelector(`style[${ac}]`)){let r=document.createElement("style");r.setAttribute(ac,""),r.textContent=e.faces,t.appendChild(r),n.push(r)}return()=>n.forEach(e=>e.remove())},[e])})(e),null),HE=[],WE=({externalStyle:e="",sdkStylePath:t="./plitzi-sdk.css",server:n})=>{const{resolvedTheme:r}=Gc(),{assets:i}=f(oS),a=x(null),{rootRef:o}=f(cS),[[s,l,c,u=$r,d=HE]]=zt(["schema.settings","style.cache","navigation.currentPageId","runtime.sources.variables","style.fonts"]),{renderMode:p,previewMode:m,debugMode:y,environment:b,isHydrating:v}=X();(e=>{let t=Nt(),[n]=Mt("schema.rsc",{mode:"mount"}),[r]=Mt("runtime.sources.navigation"),{rscData:i,rscPath:a}=e??{},o=(n?.enabled??!1)&&!!a;Pt(["rsc.enabled","rsc.endpoint"],[o,a]),Pt(["rsc.data","rsc.loaded","rsc.location"],[i?.serverData??{},void 0!==i,au()],{mode:"mount"});let s=JSON.stringify(r??{}),l=x(void 0===i?void 0:s);g(()=>{o&&s!==l.current&&(l.current=s,ou(t))},[o,s,t])})(n?.ssr),(e=>{Pt(["actions.endpoint"],[e?.actionPath])})(n?.ssr),(e=>{Pt(["realtime.endpoint","realtime.transport"],[e?.realtimePath,e?.realtimeTransport])})(n?.ssr),(e=>{Pt(["images.endpoint"],[e?.imagePath])})(n?.ssr);const w=k(()=>((e,t)=>{let n=[],r=[],i=[],a=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set,s=(e,t)=>{e&&(o.add(e),a.set(e,(a.get(e)??!1)||t))},l=e.filter(e=>"google"===e.source);if(l.length>0){let e=(e=>{let t=[...e].sort((e,t)=>((e,t)=>e===t?0:e<t?-1:1)(e.family,t.family)).map(e=>{let t=(e=>{let t=[...new Set(e.weights)].filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:[400]})(e);if(!e.styles.includes("italic"))return`family=${bc(e.family)}:wght@${t.join(";")}`;let n=[0,1].flatMap(e=>t.map(t=>`${e},${t}`));return`family=${bc(e.family)}:ital,wght@${n.join(";")}`}),n=[...new Set(e.map(e=>e.display??"swap"))],r=1===n.length?n[0]:"swap";return`${dc}/css2?${t.join("&")}&display=${r}`})(l);s(dc,!1),s("https://fonts.gstatic.com",!0),l.some(e=>e.preload)&&r.push({href:e,rel:"preload",as:"style"}),n.push({href:e,rel:"stylesheet"})}return e.forEach(e=>{if("remote"===e.source&&e.stylesheet&&fc(e.stylesheet))return s(hc(e.stylesheet),!1),e.preload&&r.push({href:e.stylesheet,rel:"preload",as:"style"}),void n.push({href:e.stylesheet,rel:"stylesheet"});"remote"===e.source&&e.files?e.files.filter(e=>fc(e.url)).forEach(t=>{s(hc(t.url),!0),i.push(vc(e,{...t,url:t.url})),e.preload&&r.push({href:t.url,rel:"preload",as:"font",type:pc[t.format],crossorigin:!0})}):"hosted"===e.source&&e.files.forEach(n=>{let a=t(n.path);s(hc(a),!0),i.push(vc(e,{...n,url:a})),e.preload&&r.push({href:a,rel:"preload",as:"font",type:pc[n.format],crossorigin:!0})})}),{preconnect:[...a].map(([e,t])=>t?{href:e,crossorigin:t}:{href:e}),links:[...r,...n],faces:i.join(""),origins:[...o]}})(d,((e="/fonts")=>t=>`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`)(n?.fontsBaseUrl)),[d,n?.fontsBaseUrl]),S=k(()=>{const t=(e=>e?Object.keys(e).filter(t=>"string"==typeof e[t]||"number"==typeof e[t]).map(t=>{let n=e[t];return(e=>{if(!e||"string"!=typeof e)return!1;let t=e.trim().toLowerCase();return pS.test(t)||fS.test(t)||hS.test(t)||mS.has(t)})(n)?`--${t}:${n};`:`--${t}:"${n}";`}).join("\n"):"")(u),n=((e="",t={},n={missing:""})=>{let r=n.missing??"";return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi,(e,n)=>{let i=n.split("."),a=t;for(let t of i){if("object"!=typeof a||!a)return r;if(!(t in a))return r;a=a[t]}return"string"==typeof a||"number"==typeof a||"boolean"==typeof a?String(a):r})})(l,u);return`@layer plitzi-sdk-runtime{.plitzi-sdk{${t}}\n${(e=>`${wc}${e}${kc}`)(n)}\n${s.customCss}\n${e}}`},[u,l,s.customCss,e]),T=k(()=>({...i,...uc(w)}),[i,w]),C=h(()=>a.current?a.current.contentWindow:"undefined"!=typeof window?window:{innerWidth:1440,innerHeight:900},[a]),A=m?"":c,O=k(()=>({settings:{isHydrating:v,previewMode:m,debugMode:y,renderMode:p,environment:b,...s,theme:r},root:{baseElementId:A},utils:{displayBorderComponents:!1,getWindow:C,rootRef:o},customContexts:{},contexts:{ComponentContext:jr,NetworkContext:Ec,PluginsContext:oS,EventBridgeContext:Mu,InteractionsContext:dS}}),[v,m,y,A,p,b,s,r,C,o]);/* @__PURE__ */
126
- return _(E,{children:["iframe"!==p&&/* @__PURE__ */I(UE,{head:w}),("raw"===p||"widget"===p)&&/* @__PURE__ */I(LE,{renderMode:p,style:S,plitziContextValue:O,pageId:c}),"shadow"===p&&/* @__PURE__ */I(qE,{sdkStylePath:t,style:S,plitziContextValue:O,pageId:c,assets:i}),!["raw","widget","shadow"].includes(p)&&/* @__PURE__ */I(PE,{style:w.faces?`${w.faces}\n${S}`:S,plitziContextValue:O,pageId:c,assets:T,ref:a})]})};WE.Plugin=BE;var VE,GE,KE,YE=WE,JE=e=>{let[t,n]=e.split("."),r=Number(t);if(!Number.isFinite(r)||r<=0)return;let i=Number(n);return{expiresAt:r,refreshExpiresAt:Number.isFinite(i)&&i>0?i:void 0}},XE=e=>{if(e&&typeof document<"u")for(let t of document.cookie.split(";")){let n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return JE(decodeURIComponent(t.slice(n+1).trim()))}},ZE=class{kind;key;constructor(e,t){this.kind=e,this.key=t}get area(){try{if("localStorage"===this.kind&&typeof localStorage<"u")return localStorage;if("sessionStorage"===this.kind&&typeof sessionStorage<"u")return sessionStorage}catch{}}read(){let e=this.area?.getItem(this.key);if(e)try{let t=JSON.parse(e);return(e=>"object"==typeof e&&!!e&&1===e.version)(t)?t:void 0}catch{return}}write(e){try{this.area?.setItem(this.key,JSON.stringify({version:1,...e}))}catch{}}clear(){try{this.area?.removeItem(this.key)}catch{}}subscribe(e){if("localStorage"!==this.kind||typeof window>"u")return()=>{};let t=t=>{(null===t.key||t.key===this.key)&&e(this.read())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}},QE=e=>{if(!e)return;let t=e.split(".");if(3!==t.length)return;let n=(e=>{try{let t=e.replaceAll("-","+").replaceAll("_","/"),n=t.padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(n));return"object"==typeof r&&r?r:void 0}catch{return}})(t[1])?.exp;return"number"==typeof n&&Number.isFinite(n)?n:void 0},eI=()=>Math.floor(Date.now()/1e3),tI=e=>{if("number"==typeof e&&Number.isFinite(e)&&!(e<=0))return Math.floor(e>1e11?e/1e3:e)},nI=class{state="init";session={validatedAt:0};store;gate;hintCookie;revalidateSeconds;listeners=/* @__PURE__ */new Set;renewal;epoch=0;renewalTimer;detachListeners;offline=!1;spaceKey;constructor({spaceKey:e="",tokenStorage:t="localStorage",sessionHintCookie:n,sessionGate:r="optimistic",sessionRevalidateSeconds:i=300,storageKey:a="plitzi_auth_session"}={}){this.spaceKey=e,this.store=new ZE(t,a),this.gate=r,this.hintCookie=n,this.revalidateSeconds=i}get endpoints(){return[]}requestExchange(){return Promise.resolve(void 0)}consumeRedirect(){return Promise.resolve(void 0)}get user(){return this.session.user}get token(){return this.session.token}getState(){return this.state}can(e){let t=this.session.user?.permissions;return Array.isArray(t)&&t.includes(e)}peekState(){return this.peek().state}peek(){let e=this.store.read(),t=XE(this.hintCookie);if(this.hintCookie&&!t)return{state:"guest"};let n=e?.token,r=tI(n?.expiresAt)??QE(n?.accessToken);return n?.accessToken&&(void 0===r||r-60>eI())&&e?.user?{state:"authenticated",user:e.user,token:e.token}:n?.accessToken||n?.refreshToken||t?{state:"init",user:e?.user,token:e?.token}:{state:"guest"}}async init(e={}){this.attach(),await this.decide(e),this.settle()}settle(){("init"===this.state||"initLoading"===this.state)&&this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest","settled")}async decide(e){if(e.skipAuth)return void this.setState("guest","skip-auth");let t=await this.consumeRedirect();if(t)return void(t.ok?(this.adopt(t),await this.handOffToServer(),this.emit({type:"login",token:this.session.token})):this.endSession(t.reason));if(e.user)return void this.adopt({ok:!0,user:e.user,token:e.accessToken?{accessToken:e.accessToken,expiresAt:e.expiresAt??null,refreshToken:null}:this.session.token},!0,"bootstrap");let n=this.store.read(),r=XE(this.hintCookie);if(this.session={user:n?.user,token:n?.token,validatedAt:n?.validatedAt??0},!this.hintCookie||r){if(this.hasLiveToken()&&this.session.user){this.setState("authenticated","restored"),this.scheduleRenewal();let e=this.isFresh()&&"strict"!==this.gate?void 0:this.revalidate(!0);return void("strict"===this.gate&&await e)}this.hasEvidence()?(this.setState("initLoading","no-evidence"),this.hasLiveToken()&&this.capabilities.identity?await this.loadIdentity():this.capabilities.renew?await this.renew():this.capabilities.identity?await this.loadIdentity():this.endSession()):this.endSession(void 0,"no-evidence")}else this.endSession(void 0,"hint-missing")}dispose(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.detachListeners?.(),this.detachListeners=void 0}async login(e){this.epoch+=1,this.setState("authenticating","authenticating");let t=await this.requestLogin(e);if(!t.ok&&"mfa"===t.reason)return this.endSession(),t;if(!t.ok)return this.endSession(t.reason),{ok:!1,reason:t.reason};this.adopt(t);let n=await this.handOffToServer();return n?{ok:!1,reason:n}:(!this.session.user&&this.capabilities.identity&&await this.loadIdentity(),"authenticated"===this.state?(this.emit({type:"login",token:this.session.token}),{ok:!0,...this.session.token??{accessToken:"",expiresAt:null,refreshToken:null}}):{ok:!1,reason:"inactive"})}async handOffToServer(){let e=await this.requestExchange();if(e)return e.ok?void this.adopt(e):"network"===e.reason?void(this.offline=!0):(this.endSession(e.reason),e.reason)}async refresh(){return await this.renew(),this.session.token}async revalidate(e=!1){return this.hasEvidence()?!e&&this.isFresh()&&this.hasLiveToken()?"authenticated"===this.state:this.hasLiveToken()&&this.capabilities.identity?this.loadIdentity():this.capabilities.renew?this.renew():this.capabilities.identity?this.loadIdentity():(this.hasLiveToken()||this.endSession("expired"),"authenticated"===this.state):("guest"!==this.state&&this.endSession(),!1)}invalidate(e="expired"){this.recover(e)}async recover(e){return"network"===e?(this.offline=!0,!1):this.renewable(e)?this.renew():(this.endSession(e),!1)}async logout(){await this.requestLogout(),this.endSession(),this.emit({type:"logout"})}on(e){let t=Array.isArray(e)?e:[e];return t.forEach(e=>this.listeners.add(e)),()=>t.forEach(e=>this.listeners.delete(e))}emit(e){for(let t of this.listeners)t(e)}setState(e,t){this.state!==e&&(this.state=e,this.emit({type:"state",state:e,reason:t}))}async renew(){return this.renewal??=this.performRenewal().finally(()=>{this.renewal=void 0}),this.renewal}async performRenewal(){let e=this.epoch,t=await this.requestRenewal(this.session.token?.refreshToken??void 0);return e===this.epoch?t.ok?(this.adopt(t),!this.session.user&&this.capabilities.identity?this.loadIdentity():"authenticated"===this.state):(this.handleFailure(t.reason),!1):"authenticated"===this.state}async loadIdentity(){let e=this.epoch,t=await this.requestIdentity();return e===this.epoch?t.ok?(this.adopt(t),"authenticated"===this.state):this.renewable(t.reason)&&!this.renewal?this.renew():(this.handleFailure(t.reason),!1):"authenticated"===this.state}handleFailure(e){"network"!==e?this.endSession(e):this.offline=!0}adopt(e,t=!0,n="granted"){this.session={user:e.user??this.session.user,token:e.token??this.session.token,validatedAt:eI()},this.offline=!1,t&&this.store.write(this.session),this.scheduleRenewal(),this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest",n)}endSession(e,t="signed-out"){this.epoch+=1,clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:eI()},this.store.write(this.session),this.setState("guest",t),e&&this.emit({type:"expired",reason:e})}expiresAt(){return tI(this.session.token?.expiresAt)??QE(this.session.token?.accessToken)}renewable(e){if(!this.capabilities.renew)return!1;if("expired"===e)return!0;if("missing"!==e)return!1;if(this.session.token?.refreshToken)return!0;let t=XE(this.hintCookie);return void 0!==t&&(void 0===t.refreshExpiresAt||t.refreshExpiresAt>eI())}hasLiveToken(){if(!this.session.token?.accessToken)return!1;let e=this.expiresAt();return void 0===e||e-60>eI()}isFresh(){return eI()-this.session.validatedAt<this.revalidateSeconds}hasEvidence(){if(this.session.token?.accessToken||this.session.token?.refreshToken)return!0;let e=XE(this.hintCookie);return!(void 0!==e?.refreshExpiresAt&&e.refreshExpiresAt<=eI()||!e)}scheduleRenewal(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0;let e=this.expiresAt();if(void 0===e||typeof window>"u"||"guest"===this.state)return;let t=Math.min(1e3*(e-60-eI()),2147483647);t<=0?this.onRenewalDue():this.renewalTimer=setTimeout(()=>this.onRenewalDue(),t)}onRenewalDue(){this.capabilities.renew?this.renew():this.endSession("expired")}attach(){if(typeof window>"u"||this.detachListeners)return;let e=()=>{"visible"===document.visibilityState&&this.revalidate()},t=()=>{this.offline&&this.revalidate(!0)},n=this.store.subscribe(e=>this.adoptFromStorage(e)),r=(e=>(Jr.add(e),()=>Jr.delete(e)))(({reason:e,url:t})=>{let n=this.endpoints.filter(Boolean);return!(0!==n.length&&!n.some(e=>((e,t)=>{if(!e||!t)return!1;try{let n=typeof window>"u"?void 0:window.location.href;return ei(new URL(e,n).hostname)===ei(new URL(t,n).hostname)}catch{return!1}})(e,t)))&&this.recover(e)});document.addEventListener("visibilitychange",e),window.addEventListener("online",t),this.detachListeners=()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("online",t),n(),r()}}adoptFromStorage(e){if(this.epoch+=1,!e?.token&&!e?.user)return clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:eI()},this.setState("guest","another-tab"),void this.emit({type:"logout"});this.adopt({ok:!0,user:e.user,token:e.token},!1)}},rI=(e,t)=>ar(e,t,void 0),iI=(e,t)=>{let n=rI(e,t);return"string"==typeof n&&""!==n?n:null},aI=(e,t)=>{let n=rI(e,t),r="string"==typeof n?Number(n):n;return"number"==typeof r&&Number.isFinite(r)?r:null},oI=e=>"string"==typeof e?e:"number"==typeof e&&Number.isFinite(e)?String(e):"",sI=class extends nI{name="basic";options;constructor({loginUrl:e="",userUrl:t="",refreshUrl:n="",logoutUrl:r="",sessionExchangeUrl:i="",mfaUrl:a="",detailsPath:o="details",tokenPath:s="access_token",refreshTokenPath:l="refresh_token",expirationTimePath:c="expire_at",refreshExpirationTimePath:u="refresh_expire_at",...d}={}){super(d),this.options={loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r,sessionExchangeUrl:i,mfaUrl:a,detailsPath:o,tokenPath:s,refreshTokenPath:l,expirationTimePath:c,refreshExpirationTimePath:u}}get capabilities(){return{renew:!!this.options.refreshUrl,identity:!!this.options.userUrl}}get endpoints(){let{loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r}=this.options;return[e,t,n,r]}async requestLogin(e){let t=oI(e.token).trim();if("token"===e.mode)return t?this.adoptToken(t):{ok:!1,reason:"missing"};if("mfa"===e.mode){let t=oI(e.mfaToken).trim();return this.options.mfaUrl&&t?this.toResult(await this.request(this.options.mfaUrl,{method:"POST",body:JSON.stringify({mfaToken:t,code:oI(e.code).trim()})})):{ok:!1,reason:"missing"}}if(!this.options.loginUrl)return{ok:!1,reason:"missing"};let n=await this.request(this.options.loginUrl,{method:"POST",body:JSON.stringify({username:oI(e.username),password:oI(e.password)})});return this.challengeOf(n)??this.toResult(n)}async adoptToken(e){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.userUrl,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),n=this.toResult(t);return n.ok?{ok:!0,user:n.user,token:{accessToken:e,expiresAt:null,refreshToken:null}}:n}async requestRenewal(e){if(!this.options.refreshUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.refreshUrl,{method:"POST",body:JSON.stringify(e?{[this.options.refreshTokenPath]:e}:{})});return this.toResult(t)}async requestExchange(){let e=this.token?.accessToken;if(!this.options.sessionExchangeUrl||!e)return;let t=await this.request(this.options.sessionExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",...this.spaceKey?{"x-access-token":this.spaceKey}:{}},body:JSON.stringify({provider:this.name,token:e})});return this.toResult(t)}async requestIdentity(){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let e=await this.request(this.options.userUrl,{method:"GET"});return this.toResult(e)}async requestLogout(){this.options.logoutUrl&&await this.request(this.options.logoutUrl,{method:"POST"})}async request(e,t){let n,r;try{n=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json"},...t})}catch{return{status:0,reason:"network"}}try{r=await n.json()}catch{r=void 0}return{data:r,status:n.status,reason:n.ok?void 0:Qr(n.status,r)??"network"}}challengeOf(e){let t=rI(e.data,"mfaToken");return!e.reason&&!0===rI(e.data,"mfaRequired")&&"string"==typeof t&&t?{ok:!1,reason:"mfa",mfaToken:t}:void 0}toResult(e){if(e.reason)return{ok:!1,reason:e.reason};let t=rI(e.data,this.options.detailsPath);return{ok:!0,user:"object"==typeof t&&t?t:void 0,token:this.tokenFrom(e.data)}}tokenFrom(e){let t=iI(e,this.options.tokenPath);if(!t)return;let n=rI(e,"errors");return{..."object"==typeof n&&n?{errors:n}:{},accessToken:t,expiresAt:aI(e,this.options.expirationTimePath),refreshToken:iI(e,this.options.refreshTokenPath),refreshExpiresAt:aI(e,this.options.refreshExpirationTimePath)}}},lI=class extends nI{name="server";loginUrl;logoutUrl;constructor({loginUrl:e="",logoutUrl:t="",...n}={}){super({...n,tokenStorage:""}),this.loginUrl=e||"/auth/sign-in",this.logoutUrl=t||"/auth/logout"}get capabilities(){return{renew:!1,identity:!1}}requestLogin(){let e=`${window.location.pathname}${window.location.search}`;return window.location.assign(`${this.loginUrl}?return=${encodeURIComponent(e)}`),new Promise(()=>{})}requestRenewal(){return Promise.resolve({ok:!1,reason:"expired"})}requestIdentity(){return Promise.resolve({ok:!1,reason:"missing"})}async requestLogout(){await fetch(this.logoutUrl,{method:"POST",credentials:"same-origin"})}revalidate(){return Promise.resolve("authenticated"===this.getState())}},cI=/* @__PURE__ */new Map([["basic",e=>new sI(e)],["server",e=>new lI(e)]]),uI=class{providerType;provider;settings;listeners;constructor(e,t,n){this.providerType=e,this.settings=n,this.listeners=Array.isArray(t)?t:[t];let r=cI.get(e);r&&(this.provider=r(n),this.provider.on(this.listeners))}getProviderType(){return this.providerType}getProvider(){return this.provider}getState(){return this.provider?.getState()??"guest"}peekState(){return this.peek().state}peek(){return(this.provider??new sI(this.settings)).peek()}can(e){return this.provider?.can(e)??!1}init(e){if(!this.provider){let t=this.peekState(),n=e?.user||"authenticated"===t?"authenticated":"guest";return this.listeners.forEach(e=>e({type:"state",state:n,reason:"no-provider"})),Promise.resolve()}return this.provider.init(e)}login(...e){return this.provider?.login(...e)??Promise.resolve({ok:!1,reason:"missing"})}refresh(){return this.provider?.refresh()??Promise.resolve(void 0)}revalidate(e){return this.provider?.revalidate(e)??Promise.resolve(!1)}invalidate(e){this.provider?.invalidate(e)}logout(){return this.provider?.logout()??Promise.resolve()}dispose(){this.provider?.dispose()}on(e){return this.provider?.on(e)}},dI=["loginUrl","userUrl","refreshUrl","logoutUrl","detailsPath","tokenPath","refreshTokenPath","expirationTimePath","refreshExpirationTimePath","sessionHintCookie","sessionExchangeUrl","mfaUrl"],pI=({children:e,server:t})=>{let{previewMode:n,isHydrating:r,environment:i}=X(),{webKey:a}=f(Ec),[[o,s]]=Mt(["schema.settings","schema.variables"]),{queryParams:l,hostname:c}=Jx({server:t}),u=k(()=>({queryParams:l,hostname:c,environment:i}),[l,c,i]),d=k(()=>Array.isArray(s)?s.reduce((e,t)=>{let{name:n,value:r,subValues:i}=t;if(!Array.isArray(i)||0===i.length)return{...e,[n]:r};let a=i.find(e=>Oa(e.when,u));return a?{...e,[n]:a.value}:{...e,[n]:r}},{}):{},[s,u]),p=k(()=>{let e=Object.fromEntries(dI.map(e=>[e,o[e]]));try{return JSON.parse(Fn(JSON.stringify(e),d))}catch{return e}},[o,d]),m=k(()=>({...p,spaceKey:a,tokenStorage:o.tokenStorage??"localStorage",sessionGate:o.sessionGate,sessionRevalidateSeconds:o.sessionRevalidateSeconds}),[p,o,a]),{manager:y,loading:b,authenticated:v,state:w,bootstrapUser:T,bootstrapToken:C,peekedUser:A,peekedToken:E}=(({server:e,isHydrating:t=!1,provider:n="",settings:r})=>{let i=e?.authenticated?e.user?.details:void 0,a="string"==typeof e?.user?.accessToken?e.user.accessToken:void 0,[o,s]=S("init"),l=h(e=>{"state"===e.type&&s(e.state)},[]),c=k(()=>new uI(n,l,r),[n,l,r]),u=k(()=>t||i?void 0:c.peek(),[c,t,i]),d="init"!==o&&"initLoading"!==o||!!i||t||"authenticated"===u?.state||"guest"===u?.state;return g(()=>(c.init({user:i,accessToken:a,expiresAt:e?.user?.expiresAt,skipAuth:e?.skipAuth}),()=>c.dispose()),[c,i,a,e?.user?.expiresAt,e?.skipAuth]),k(()=>({manager:c,state:o,bootstrapUser:i,bootstrapToken:a,peekedUser:u?.user,peekedToken:u?.token?.accessToken,loading:"initLoading"===o||!d,authenticated:"authenticated"===o||"init"===o&&(!!i||"authenticated"===u?.state)}),[c,o,i,a,d,u])})({server:t,isHydrating:r,provider:o.userProvider??"",settings:m}),_=y.getProvider(),{user:O,accessToken:N}=(e=>{let{state:t,provider:n,bootstrap:r,peeked:i}=e;return n?.user?{user:n.user,accessToken:n.accessToken}:"guest"===t?{}:r?.user?{user:r.user,accessToken:r.accessToken}:i?.user?{user:i.user,accessToken:i.accessToken}:{}})({state:w,provider:{user:_?.user,accessToken:_?.token?.accessToken},bootstrap:{user:T,accessToken:C},peeked:{user:A,accessToken:E}}),M=x(void 0),P=k(()=>{let e=O?{details:O,accessToken:N}:void 0,t=M.current;return t?.accessToken===e?.accessToken&&((e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t;return[.../* @__PURE__ */new Set([...Object.keys(n),...Object.keys(r)])].every(e=>JSON.stringify(n[e])===JSON.stringify(r[e]))})(t?.details,e?.details)||(M.current=e),M.current},[O,N]);(e=>{let t=x(e);wt(()=>{t.current!==e&&(t.current=e,AC.reset({refetch:""!==e}))},[e])})(v?String(P?.details?.id??""):"");let L=k(()=>({login:y.login.bind(y),refresh:y.refresh.bind(y),revalidate:y.revalidate.bind(y),invalidate:y.invalidate.bind(y),can:y.can.bind(y),logout:y.logout.bind(y),state:w,authenticated:v||!n,user:P}),[y,w,v,n,P]);/* @__PURE__ */
127
- return I(Yx,{value:L,children:!b&&e})},fI=(e,t=0,n=/* @__PURE__ */new WeakSet)=>{if("function"!=typeof e)return"object"==typeof e&&e?n.has(e)||t>12?"[…]":(n.add(e),Array.isArray(e)?e.map(e=>fI(e,t+1,n)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,fI(r,t+1,n)]).filter(([,e])=>void 0!==e))):e},hI=(e,...t)=>{let n=e;for(let r of t)n=er(n)?n[r]:void 0;return er(n)?n:{}},mI=e=>Array.isArray(e)?e:[],gI=e=>Object.entries(hI(e,"definition","bindings")).flatMap(([e,t])=>mI(t).flatMap(t=>{let{to:n,source:r,transformers:i}=hI(t),a=mI(i).map(e=>hI(e,"params").template).find(e=>"string"==typeof e);return"string"==typeof n&&"string"==typeof r?[{category:e,to:n,source:r,..."string"==typeof a?{template:a}:{}}]:[]})),yI=(e,t,n)=>{let{element:r,inComponent:i}=((e,t)=>{let n=hI(e,"flat");if(Object.hasOwn(n,t))return{element:n[t]};for(let[r,i]of Object.entries(hI(e,"components"))){let e=hI(i,"flat");if(Object.hasOwn(e,t))return{element:e[t],inComponent:r}}return{}})(hI(e,"schema"),t),a=Array.from(n.querySelectorAll(`[data-id="${t}"]`));if(!er(r)&&0===a.length)return;let o=a.at(0),s=o?.getBoundingClientRect(),l=o?getComputedStyle(o):void 0,c=void 0!==s&&s.width>0&&s.height>0&&"none"!==l?.display&&"hidden"!==l?.visibility,u=hI(r,"definition").type,d=hI(r,"attributes"),p="reference"===u&&"component"===d.referenceType&&"string"==typeof d.referenceId?d.referenceId:void 0,f=hI(e,"runtime","elements")[t];return{id:t,..."string"==typeof u?{type:u}:{},...void 0===i?{}:{inComponent:i},...void 0===p?{}:{instanceOf:p},...er(r)?{attributes:hI(fI(r),"attributes"),bindings:gI(r)}:{},...void 0===f?{}:{state:fI(f)},copies:a.length,visible:c,...s?{box:{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}}:{}}},bI=e=>{let t=m(mt),n=Dt();g(()=>{if(!e||!t)return;let r=[],i=!1,a=Hl.addListener(e=>{let t=(e=>{if("interactions"!==e.category||!(e=>"object"==typeof e&&"nodes"in e&&"startTime"in e&&"node"in e)(e.params))return;let{node:t,hostElementId:n,status:r,startTime:i,endTime:a,nodes:o}=e.params,s=Object.values(o).filter(e=>e.node.id!==t.id).toSorted((e,t)=>e.startTime-t.startTime).map(e=>{let t=(e=>{if("failed"===e.status)return e.result instanceof Error?e.result.message:"string"==typeof e.result?e.result:void 0})(e);return{title:e.node.title,action:e.node.action,status:e.status,ms:Math.round(e.endTime-e.startTime),...void 0===t?{}:{error:t}}});return{at:e.time??"",trigger:`${t.title} [${t.action}]`,...void 0===n?{}:{on:n},status:r,ms:Math.round(a-i),steps:s}})(e);t&&(r.push(t),r.length>100&&r.shift())},{replay:!0}),o=(({root:e,writeState:t,stores:n,runs:r,setWatching:i,document:a})=>({help:()=>"window.__plitzi — this page, in text (debug mode only):\n state(key?) runtime.state, or one key of it\n setState(key, value) writes runtime.state.<key>, as a setState step would\n sources(name?) every source's current value by name (apiContainer_site, list_products…), or one\n element(id) an element by its id, in a page or a component: type, attributes, what it reads, its own state,\n the component it places, copies, on screen, box\n flows(limit = 20) the last flows that ran: trigger, element, status, every step with its time and error\n watch(on = true) one console line per flow as it ends",state:t=>{let n=hI(e.getState(),"runtime","state");return fI(void 0===t?n:n[t])},setState:t,sources:t=>{let r={};for(let i of[e,...n()])Object.assign(r,hI(i.getOwnState(),"runtime","sources"));return fI(void 0===t?r:r[t])},element:t=>yI(e.getState(),t,a),flows:(e=20)=>r().slice(-e),watch:(e=!0)=>(i(e),e?"Each flow is said in the console as it ends.":"Flows are no longer said in the console.")}))({root:t,writeState:(e,t)=>n(`runtime.state.${e}`,t),stores:()=>tt().map(e=>e.store),runs:()=>r,setWatching:e=>{i=e},document:document});return window.__plitzi=o,()=>{a(),window.__plitzi===o&&delete window.__plitzi}},[e,t,n])},vI=({children:e})=>{let[t,n]=S([]),[r,i]=S({}),a=x(!1),o=h((e,t,r,i,a)=>{n(n=>[...n,{logType:e,category:t,message:r,time:a,params:i}])},[n]),s=h((e,t)=>i(n=>({...n,[e]:t})),[]),l=h(e=>i(t=>pr(t,[e])),[]),c=h((e,...t)=>{if(e&&"function"==typeof r[e])return r[e](...t)},[r]),u=h(()=>n([]),[]);a.current||=(Hl.setCallback(o),Hl.setCallbackAddProvider(s),Hl.setCallbackRemoveProvider(l),!0),g(()=>(Hl.setCallback(o),Hl.setCallbackAddProvider(s),Hl.setCallbackRemoveProvider(l),Hl.processPendingLogs(),()=>{Hl.setCallback(void 0),Hl.setCallbackAddProvider(void 0),Hl.setCallbackRemoveProvider(void 0),Hl.flush()}),[o,s,l]);let d=k(()=>({providers:r,logs:t,setLogs:n,clearLogs:u,getData:c}),[r,t,n,u,c]);/* @__PURE__ */
128
- return I(ql,{value:d,children:e})},wI={display:"contents"},kI=({children:e})=>{let t=x(null),n=x(void 0),r=x(void 0),i=m(mt),a=f(Bc),o=f(oS),s=f(jr),l=f(Ua);return w(()=>{let e=t.current;if(e)return clearTimeout(r.current),n.current??=C(e),()=>{let e=n.current;r.current=setTimeout(()=>{e?.unmount(),n.current===e&&(n.current=void 0)},0)}},[]),w(()=>{n.current?.render(/* @__PURE__ */I(mt,{value:i,children:/* @__PURE__ */I(Ua,{value:l,children:/* @__PURE__ */I(Bc,{value:a,children:/* @__PURE__ */I(oS,{value:o,children:/* @__PURE__ */I(jr,{value:s,children:e})})})})}))}),/* @__PURE__ */I("div",{ref:t,style:wI})},xI=[],SI=/* @__PURE__ */new Set,TI=[],CI=()=>{TI=[...xI];for(let e of SI)e()},AI=e=>(SI.add(e),()=>{SI.delete(e)}),EI=()=>TI,II=()=>VE,_I=e=>{VE!==e&&(VE=e,CI())},OI=()=>({instanceIds:T(AI,EI,EI),selectedId:T(AI,II,II)}),NI=()=>()=>{},MI=(e,t,n)=>{window.dispatchEvent(new CustomEvent("customstorage-changed",{detail:{key:e,oldValue:t,newValue:n}}))},PI=()=>{let e={};if(typeof document>"u"||!document.cookie)return e;for(let t of document.cookie.split(";")){let n=t.indexOf("=");-1!==n&&(e[t.slice(0,n).trim()]=decodeURIComponent(t.slice(n+1).trim()))}return e},LI=e=>new Proxy(e,{get(e,t,n){if("setItem"===t)return(t,n)=>{let r=e.getItem(t);e.setItem.call(e,t,n),r!==n&&MI(t,r,n)};if("removeItem"===t)return t=>{let n=e.getItem(t);e.removeItem.call(e,t),null!==n&&MI(t,n,null)};let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}}),DI=e=>"cookie"===e?typeof document<"u"?LI((()=>{let e={getItem(e){let t=PI();return e in t?t[e]:null},setItem(e,t){typeof document<"u"&&(document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; samesite=lax`)},removeItem(e){typeof document<"u"&&(document.cookie=`${e}=; path=/; max-age=0; samesite=lax`)},clear(){for(let t of Object.keys(PI()))e.removeItem(t)},key:e=>Object.keys(PI())[e]??null,get length(){return Object.keys(PI()).length}};return e})()):void 0:"sessionStorage"===e?typeof sessionStorage<"u"?LI(sessionStorage):void 0:typeof localStorage<"u"?LI(localStorage):void 0,zI=function(e,t,n="localStorage",r=!0){let[i,a]=k(()=>{if(e.includes(".")){let t=e.split(".").filter(Boolean);return[t.shift(),t.join(".")]}return[e,""]},[e]),o=x(DI(n));Ss(()=>{o.current=DI(n)},[n]);let[s,l]=S(()=>{try{if(!o.current)return t;let e=o.current.getItem(i);if(!e)return t;let n=JSON.parse(e);return a?ar(n,a,t):n}catch{return t}});g(()=>{try{if(!o.current)return;let e=s;if(a){let t=o.current.getItem(i);e=Rl(t?JSON.parse(t):{},e=>{or(e,a,s)})}o.current.setItem(i,JSON.stringify(e))}catch(nO){}},[i,a,s]);let c=h(e=>{if(e.key===i)try{let n=e.newValue?JSON.parse(e.newValue):t;l(a?ar(n,a,t):n)}catch{}},[i,a,t]),u=h(e=>{if(e.detail.key===i)try{let n=e.detail.newValue?JSON.parse(e.detail.newValue):t;l(a?ar(n,a,t):n)}catch{}},[i,a,t]);return g(()=>{if(typeof window<"u"&&r)return window.addEventListener("storage",c),window.addEventListener("customstorage-changed",u),()=>{window.removeEventListener("storage",c),window.removeEventListener("customstorage-changed",u)}},[c,u,n,r]),[s,l]},RI=d(()=>import("./plitzi-sdk-devtools-BqOx7FCa.js")),jI="horizontal",$I=0,FI=({children:e,className:t,innerClassName:n,enabled:r=!1,instanceId:i,renderMode:a="default",scroll:s="container",qa:l=!1,devToolsStyle:c="",devToolsStyleLink:u=""})=>{let{resolvedTheme:d}=Gc(),[p,f]=zI("plitzi-sdk.dev-tools.orientation",jI),[y,b]=zI("plitzi-sdk.dev-tools.collapsed",!0),[v,w]=zI("plitzi-sdk.dev-tools.tab","logs"),[k,C]=S(),A=x(void 0),E=x(null);A.current||="sdk-instance-"+ ++$I;let O=i||A.current,N=T(NI,()=>!0,()=>!1),M=N?p:jI,P=((e,t)=>{g(()=>{if(t)return(e=>(xI.push(e),void 0===VE&&(VE=e),CI(),()=>{let t=xI.indexOf(e);-1!==t&&xI.splice(t,1),VE===e&&(VE=xI[0]),CI()}))(e)},[t,e]);let n=T(AI,II,II);return t&&n===e})(O,r);(e=>{let t=m(mt);g(()=>{if(e&&!Ne&&t)return Qe(t)},[e,t])})(r),((e,t)=>{g(()=>{if(e)return Qe(AC.store,t,"Queries")},[e,t])})(P,O),bI(P);let L=h(e=>f(e),[f]),D=h(e=>{e&&w("logs"),C(e),b(!1)},[b,w]),z=h(()=>b(!0),[b]),R=h(e=>{C(void 0),w(e)},[w]);if(!r)return e;let j="document"===s&&(!N||y),$=P&&N&&/* @__PURE__ */I(kI,{children:/* @__PURE__ */I(vI,{children:/* @__PURE__ */_(o,{fallback:null,children:["default"===a&&/* @__PURE__ */I(RI,{className:U({dark:"dark"===d}),collapsed:y,orientation:M,tabSelected:v,logTypeFilter:k,onOpen:D,onCollapse:z,onTabSelect:R,onChangeOrientation:L,pageRef:E,qa:l}),"shadow"===a&&/* @__PURE__ */_(FE,{children:[u&&/* @__PURE__ */I(FE.Link,{href:u}),/* @__PURE__ */_(FE.Content,{children:[/* @__PURE__ */I("style",{dangerouslySetInnerHTML:{__html:c}}),/* @__PURE__ */I(RI,{className:U({dark:"dark"===d}),collapsed:y,orientation:M,tabSelected:v,logTypeFilter:k,onOpen:D,onCollapse:z,onTabSelect:R,onChangeOrientation:L,pageRef:E,qa:l})]})]})]})})});/* @__PURE__ */
129
- return _("div",{className:U("relative flex min-w-0 grow",{"overflow-auto":!j,"flex-col":j||"horizontal"===M,"h-screen":!j&&"vertical"===M},t),children:[/* @__PURE__ */I(ht,{value:O,children:/* @__PURE__ */I("div",{ref:E,className:U("grow",{"basis-0 flex-col overflow-auto":!j},n),children:e})}),j?/* @__PURE__ */I("div",{className:"sticky bottom-0 h-0",children:$}):$]})},qI=({children:e})=>{let{environment:t}=X(),[[n,r,i,a,o,s,l]]=Mt(["schema.variables","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId"]),c=ic(k(()=>Fl(n,{routeParams:r,queryParams:i,hostname:a,environment:t}),[t,a,i,r,n])),u=h(()=>qr(c).map(e=>({path:e,name:`variables.${e}`})),[c]);$l({id:"global",source:"variables",name:"Variables",fields:u}),Pt("runtime.sources.variables",c);let[d={}]=Mt("pageDefinitions"),p=k(()=>Object.values(d).map(e=>({value:e.id,label:ar(e,"attributes.name",e.id)})),[d]),m=k(()=>({routeParams:r,queryParams:i,origin:o,href:s,currentPageId:l}),[r,i,o,s,l]),y=h(()=>[...qr({routeParams:r,queryParams:i}).map(e=>({path:e,name:`navigation.${e}`})),{path:"origin",name:"Origin"},{path:"href",name:"This page’s address"},p.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:p}:{path:"currentPageId",name:"Current Page"}],[r,i,p]);$l({id:"global",source:"navigation",name:"Navigation",fields:y}),Pt("runtime.sources.navigation",m);let b=f(Yx),{user:v,authenticated:w,state:S}=b,[T="basic"]=Mt("schema.settings.userProvider"),C=k(()=>""===T?{}:{isAuthenticated:w,...void 0===S?{}:{status:S},accessToken:v?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...v?.details??{}}},[T,v,w,S]),A=h(()=>qr(C).map(e=>({path:e,name:`user.${e}`})),[C]);$l({id:"global",source:"auth",name:"Auth State",fields:A}),Pt("runtime.sources.auth",C);let E=(e=>{let{environment:t}=X(),[[n,r,i,a,o]]=Mt(["schema.flags","navigation.routeParams","navigation.queryParams","navigation.hostname","flags.overrides"]),{authenticated:s,user:l}=e,c=k(()=>Xx({authenticated:s,user:l}),[s,l]);return ic(k(()=>tc(n,{environment:t,hostname:a,routeParams:r,queryParams:i,user:c},o),[n,t,a,r,i,c,o]))})(b),I=k(()=>nc(E),[E]),_=h(()=>Object.keys(I).map(e=>({path:e,name:`flags.${e}`,inputType:"checkbox"})),[I]);$l({id:"global",source:"flags",name:"Feature Flags",fields:_}),Pt("runtime.sources.flags",I),Pt("flags.resolved",E);let[O,N]=Mt(["schema.flags","flags.overrides"])[0],M=ic(((e,t)=>Ql.flatMap(n=>Object.keys(t[n]??{}).filter(t=>!Object.hasOwn(e??{},t)).map(e=>({layer:n,name:e}))))(O,N??{}));g(()=>{M.forEach(({layer:e,name:t})=>console.warn(`[plitzi] The ${e} sets the feature flag "${t}", which this space does not declare: the override is ignored. Declare the flag in the space, or remove the override.`))},[M]);let[P]=Mt("runtime.state"),L=h(()=>qr(P).map(e=>({path:e,name:`state.${e}`})),[P]);$l({id:"global",source:"state",name:"State",fields:L}),Pt("runtime.sources.state",P);let[D]=Mt("runtime.host"),z=h(()=>qr(D).map(e=>({path:e,name:`host.${e}`})),[D]);$l({id:"global",source:"host",name:"Host",fields:z}),Pt("runtime.sources.host",D);let{theme:R,resolvedTheme:j}=Gc(Vc),$=k(()=>({mode:R,resolved:j}),[R,j]),F=h(()=>qr($).map(e=>({path:e,name:`theme.${e}`})),[$]);$l({id:"global",source:"theme",name:"Theme",fields:F}),Pt("runtime.sources.theme",$);let[q]=Mt("schema.settings.computed"),B=x(void 0),U=k(()=>ai(q??{},{variables:c,navigation:m,auth:C,state:P??{},host:D??{},theme:$,flags:I},B.current),[q,c,m,C,P,D,$,I]);B.current=U;let H=h(()=>qr(U).map(e=>({path:e,name:`computed.${e}`})),[U]);return $l({id:"global",source:"computed",name:"Computed",fields:H}),Pt("runtime.sources.computed",U),e},BI=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:a=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||a&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){delete this.events[e][t];let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),delete this.events[e])}}async emit(e,t=[],...n){let r;this.debugMode&&Hl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let a=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),a}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){if(!e)return this.events={},void this.counts.clear();this.events[e]&&(delete this.events[e],this.counts.delete(e))}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},UI=({children:e,debugMode:t,onInit:n})=>{let r=k(()=>new BI({debugMode:t}),[t]);g(()=>()=>{r.clear()},[r]);let i=k(()=>({eventBridge:r}),[r]);return g(()=>{n?.(i)},[n,i]),/* @__PURE__ */I(Mu,{value:i,children:e})},HI=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:a}=f(dS);g(()=>{if(e)return a.subscribe(e),()=>{a.unsubscribe(e)}},[e,a]),g(()=>{e&&a.update(e,t,n,r,i)},[e,t,n,r,i,a])},WI={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"text"}},preview:{},callback:({time:e})=>new Promise(t=>{setTimeout(t,e)})},VI={action:"twigTemplate",title:"Twig Template",type:"utility",params:{returnMode:{label:"Mode",canBind:!1,type:"select",defaultValue:"text",options:[{label:"Text",value:"text"},{label:"Json Text",value:"json"},{label:"Json Object",value:"jsonObject"}]},template:{label:"Template",canBind:!1,defaultValue:"",type:e=>{let{returnMode:t}=e;return"text"===t?"codemirror-text":"codemirror-json"}}},preview:e=>{let{template:t,returnMode:n}=e;if("jsonObject"===n)try{let n=JSON.parse(Fn(t,e));if(n&&"object"==typeof n)return{template:"",content:qr(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Fn(t,e)}catch(nO){console.error(nO)}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(nO){console.error(nO)}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},GI={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},KI=(e,t=()=>!0)=>({invalidateQueries:{type:"select",description:"What to refresh once the write succeeded, so the page shows the new data: the cached requests to the same site, all of them, only the api containers named in `invalidateElements`, or none for a step that only reads. Containers on screen ask again at once; the rest when they are shown.",default:e[0],options:[...e],optionLabels:Object.fromEntries(e.map(e=>[e,GI[e]])),label:"Refresh cached requests",canBind:!1,when:t},invalidateElements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id.",default:[],label:"Containers (ids)",when:e=>t(e)&&"elements"===e.invalidateQueries}}),YI=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},JI={title:"Webhook",type:"utility",strictParams:!0,params:{url:{type:"text",description:"The URL to call.",default:"",label:"Url"},method:{type:"select",description:"HTTP method.",default:"get",options:["get","post","put","delete","patch","head"],canBind:!1},body:{type:"json",description:'Request body: an object of fields (sent as JSON, or as form data when one of them is a file). Pass a real object, with templates for its values — `{ email: "{{ submitted.values.email }}" }`.',default:"",builderType:"textarea"},authorizationToken:{type:"text",description:"Value sent as the Authorization header.",default:""},headers:{type:"json",description:'Headers of the request, as an object of name to value, with templates for the values like the body: `{ "x-api-key": "{{ apiKey }}" }`. Authorization is set by `authorizationToken` and the content type follows the body, so neither is set here.',default:"",builderType:"textarea"},credentials:{type:"select",description:"fetch credentials mode.",default:"same-origin",options:["include","omit","same-origin"],optionLabels:{"same-origin":"Same Origin"}},cache:{type:"boolean",description:"Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",default:!1,label:"Cache response",when:YI},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>YI(e)&&(!0===e.cache||"true"===e.cache)},...KI(["origin","all","elements","none"],e=>!YI(e))},preview:{response:{status:"",data:""}}},XI=/* @__PURE__ */new Set(["GET","HEAD"]),ZI=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),QI=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(JI.params.staleTime.default))},e_=e=>e?{Authorization:`Bearer ${e}`}:{},t_=/* @__PURE__ */new Set(["authorization","content-type"]),n_=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||t_.has(e.toLowerCase())?[]:[[e,String(t)]])):{},r_=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},a)=>{let o=(e=>"object"==typeof e&&e?e:{})(r),s=Object.values(o).some(e=>e instanceof Blob),l={method:a,headers:{...n_(n),...s?{}:{"Content-Type":"application/json"},...e_(t)},credentials:i};if(!ZI.has(a))if(s){let e=new FormData;Object.entries(o).forEach(([t,n])=>{e.append(t,n)}),l.body=e}else l.body=JSON.stringify(o);let c=await fetch(e,l).catch(t=>{throw Error(`${a} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),u="";try{u=await c.json()}catch{}return{status:c.status,data:u}},i_=gd("webHook",JI,async e=>{let t=(e.method||"get").toUpperCase();if(XI.has(t)){if(!0!==e.cache&&"true"!==e.cache)return{response:await r_(e,t)};let n=PC({method:t,url:e.url,credentials:e.credentials,headers:{...n_(e.headers),...e_(e.authorizationToken)}});return{response:await AC.fetchQuery(n,{meta:{url:e.url},fetcher:()=>r_(e,t),staleTime:QI(e.staleTime),isCacheable:e=>e.status<400})}}let n=await r_(e,t);return n.status>=200&&n.status<300&&LC({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:n}}),a_={delayTime:WI,twigTemplate:VI,webHook:i_},o_=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let a={...n,...r},o=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=((e,t)=>{let n=e,r=5;for((e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e))(n)&&!Xn(e)&&(n=Un(e,t),r--);"string"==typeof n&&Xn(n)&&r>0;)n=Un(n,t),r--;return{value:n,unresolved:"string"==typeof n&&Xn(n)}})(e,a);return r&&Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Twig token resolution exceeded ",5," passes for ",
130
- /* @__PURE__ */I("b",{children:t}),", leaving unresolved tokens"]}),{param:t,value:n}),n}return n>=5||"object"!=typeof e||!e?e:Array.isArray(e)?e.map(e=>o(e,t,n+1)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,o(r,t,n+1)]))};return Object.keys(t).reduce((n,r)=>{let i="trigger"===e?t[r]:o(t[r],r,0);return{...n,[r]:i}},{})},s_=e=>Object.fromEntries(Object.entries(e).filter(e=>(e=>"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e)(e[1]))),l_=e=>"object"==typeof e&&!!e&&"then"in e&&"function"==typeof e.then,c_=(e,t={},n={},r={},i={})=>{let a=[],{id:o,action:s,enabled:l,params:c,elementId:u,type:d,when:p}=e;if(!s||!l)return{status:"disabled",result:{},postCallbacks:a};let f=s_({...r,...n,[o]:c});if(p&&!Oa(p,f))return{status:"skipped",result:{},postCallbacks:a,whenParams:f};let h,m=t=>(Hl.danger("interactions",/* @__PURE__ */_("span",{children:["Interaction node failed ",/* @__PURE__ */I("b",{children:s})]}),{error:t instanceof Error?t.message:String(t),node:e}),{status:"failed",result:{},postCallbacks:a,whenParams:f});switch(d){case"callback":case"globalCallback":if(!u)return Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Step ",
124
+ /* @__PURE__ */I(lc,{value:r,children:e&&/* @__PURE__ */I(iC,{internalProps:a})}),
125
+ /* @__PURE__ */I(DE,{})]})})]})}),WE=e=>{},VE=({head:e})=>((e=>{g(()=>{if(typeof document>"u")return;let{head:t}=document,n=[];if(e.preconnect.forEach(e=>{if(t.querySelector(`link[rel="preconnect"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel="preconnect",r.href=e.href,e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.links.forEach(e=>{if(t.querySelector(`link[rel="${e.rel}"][href="${CSS.escape(e.href)}"]`))return;let r=document.createElement("link");r.rel=e.rel,r.href=e.href,e.as&&(r.as=e.as),e.type&&(r.type=e.type),e.crossorigin&&(r.crossOrigin=""),t.appendChild(r),n.push(r)}),e.faces&&!t.querySelector(`style[${ac}]`)){let r=document.createElement("style");r.setAttribute(ac,""),r.textContent=e.faces,t.appendChild(r),n.push(r)}return()=>n.forEach(e=>e.remove())},[e])})(e),null),GE=[],KE=({externalStyle:e="",sdkStylePath:t="./plitzi-sdk.css",server:n})=>{const{resolvedTheme:r}=Gc(),{assets:i}=f(cS),a=x(null),{rootRef:o}=f(pS),[[s,l,c,u=$r,d=GE]]=zt(["schema.settings","style.cache","navigation.currentPageId","runtime.sources.variables","style.fonts"]),{renderMode:p,previewMode:m,debugMode:y,environment:b,isHydrating:v}=X();(e=>{let t=Nt(),[n]=Mt("schema.rsc",{mode:"mount"}),[r]=Mt("runtime.sources.navigation"),{rscData:i,rscPath:a}=e??{},o=(n?.enabled??!1)&&!!a;Pt(["rsc.enabled","rsc.endpoint"],[o,a]),Pt(["rsc.data","rsc.loaded","rsc.location"],[i?.serverData??{},void 0!==i,au()],{mode:"mount"});let s=JSON.stringify(r??{}),l=x(void 0===i?void 0:s);g(()=>{o&&s!==l.current&&(l.current=s,ou(t))},[o,s,t])})(n?.ssr),(e=>{Pt(["actions.endpoint"],[e?.actionPath])})(n?.ssr),(e=>{Pt(["realtime.endpoint","realtime.transport"],[e?.realtimePath,e?.realtimeTransport])})(n?.ssr),(e=>{Pt(["images.endpoint"],[e?.imagePath])})(n?.ssr);const w=k(()=>((e,t)=>{let n=[],r=[],i=[],a=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set,s=(e,t)=>{e&&(o.add(e),a.set(e,(a.get(e)??!1)||t))},l=e.filter(e=>"google"===e.source);if(l.length>0){let e=(e=>{let t=[...e].sort((e,t)=>((e,t)=>e===t?0:e<t?-1:1)(e.family,t.family)).map(e=>{let t=(e=>{let t=[...new Set(e.weights)].filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:[400]})(e);if(!e.styles.includes("italic"))return`family=${bc(e.family)}:wght@${t.join(";")}`;let n=[0,1].flatMap(e=>t.map(t=>`${e},${t}`));return`family=${bc(e.family)}:ital,wght@${n.join(";")}`}),n=[...new Set(e.map(e=>e.display??"swap"))],r=1===n.length?n[0]:"swap";return`${dc}/css2?${t.join("&")}&display=${r}`})(l);s(dc,!1),s("https://fonts.gstatic.com",!0),l.some(e=>e.preload)&&r.push({href:e,rel:"preload",as:"style"}),n.push({href:e,rel:"stylesheet"})}return e.forEach(e=>{if("remote"===e.source&&e.stylesheet&&fc(e.stylesheet))return s(hc(e.stylesheet),!1),e.preload&&r.push({href:e.stylesheet,rel:"preload",as:"style"}),void n.push({href:e.stylesheet,rel:"stylesheet"});"remote"===e.source&&e.files?e.files.filter(e=>fc(e.url)).forEach(t=>{s(hc(t.url),!0),i.push(vc(e,{...t,url:t.url})),e.preload&&r.push({href:t.url,rel:"preload",as:"font",type:pc[t.format],crossorigin:!0})}):"hosted"===e.source&&e.files.forEach(n=>{let a=t(n.path);s(hc(a),!0),i.push(vc(e,{...n,url:a})),e.preload&&r.push({href:a,rel:"preload",as:"font",type:pc[n.format],crossorigin:!0})})}),{preconnect:[...a].map(([e,t])=>t?{href:e,crossorigin:t}:{href:e}),links:[...r,...n],faces:i.join(""),origins:[...o]}})(d,((e="/fonts")=>t=>`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`)(n?.fontsBaseUrl)),[d,n?.fontsBaseUrl]),S=k(()=>{const t=(e=>e?Object.keys(e).filter(t=>"string"==typeof e[t]||"number"==typeof e[t]).map(t=>{let n=e[t];return(e=>{if(!e||"string"!=typeof e)return!1;let t=e.trim().toLowerCase();return mS.test(t)||gS.test(t)||yS.test(t)||bS.has(t)})(n)?`--${t}:${n};`:`--${t}:"${n}";`}).join("\n"):"")(u),n=((e="",t={},n={missing:""})=>{let r=n.missing??"";return e.replace(/\{\{\s*([a-z0-9_\-.$]+)\s*\}\}/gi,(e,n)=>{let i=n.split("."),a=t;for(let t of i){if("object"!=typeof a||!a)return r;if(!(t in a))return r;a=a[t]}return"string"==typeof a||"number"==typeof a||"boolean"==typeof a?String(a):r})})(l,u);return`@layer plitzi-sdk-runtime{.plitzi-sdk{${t}}\n${(e=>`${wc}${e}${kc}`)(n)}\n${s.customCss}\n${e}}`},[u,l,s.customCss,e]),T=k(()=>({...i,...uc(w)}),[i,w]),C=h(()=>a.current?a.current.contentWindow:"undefined"!=typeof window?window:{innerWidth:1440,innerHeight:900},[a]),A=m?"":c,O=k(()=>({settings:{isHydrating:v,previewMode:m,debugMode:y,renderMode:p,environment:b,...s,theme:r},root:{baseElementId:A},utils:{displayBorderComponents:!1,getWindow:C,rootRef:o},customContexts:{},contexts:{ComponentContext:jr,NetworkContext:Ec,PluginsContext:cS,EventBridgeContext:Mu,InteractionsContext:hS}}),[v,m,y,A,p,b,s,r,C,o]);/* @__PURE__ */
126
+ return _(E,{children:["iframe"!==p&&/* @__PURE__ */I(VE,{head:w}),("raw"===p||"widget"===p)&&/* @__PURE__ */I(RE,{renderMode:p,style:S,plitziContextValue:O,pageId:c}),"shadow"===p&&/* @__PURE__ */I(HE,{sdkStylePath:t,style:S,plitziContextValue:O,pageId:c,assets:i}),!["raw","widget","shadow"].includes(p)&&/* @__PURE__ */I(zE,{style:w.faces?`${w.faces}\n${S}`:S,plitziContextValue:O,pageId:c,assets:T,ref:a})]})};KE.Plugin=WE;var YE,JE,XE,ZE=KE,QE=e=>{let[t,n]=e.split("."),r=Number(t);if(!Number.isFinite(r)||r<=0)return;let i=Number(n);return{expiresAt:r,refreshExpiresAt:Number.isFinite(i)&&i>0?i:void 0}},eI=e=>{if(e&&typeof document<"u")for(let t of document.cookie.split(";")){let n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return QE(decodeURIComponent(t.slice(n+1).trim()))}},tI=class{kind;key;constructor(e,t){this.kind=e,this.key=t}get area(){try{if("localStorage"===this.kind&&typeof localStorage<"u")return localStorage;if("sessionStorage"===this.kind&&typeof sessionStorage<"u")return sessionStorage}catch{}}read(){let e=this.area?.getItem(this.key);if(e)try{let t=JSON.parse(e);return(e=>"object"==typeof e&&!!e&&1===e.version)(t)?t:void 0}catch{return}}write(e){try{this.area?.setItem(this.key,JSON.stringify({version:1,...e}))}catch{}}clear(){try{this.area?.removeItem(this.key)}catch{}}subscribe(e){if("localStorage"!==this.kind||typeof window>"u")return()=>{};let t=t=>{(null===t.key||t.key===this.key)&&e(this.read())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}},nI=e=>{if(!e)return;let t=e.split(".");if(3!==t.length)return;let n=(e=>{try{let t=e.replaceAll("-","+").replaceAll("_","/"),n=t.padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(n));return"object"==typeof r&&r?r:void 0}catch{return}})(t[1])?.exp;return"number"==typeof n&&Number.isFinite(n)?n:void 0},rI=()=>Math.floor(Date.now()/1e3),iI=e=>{if("number"==typeof e&&Number.isFinite(e)&&!(e<=0))return Math.floor(e>1e11?e/1e3:e)},aI=class{state="init";session={validatedAt:0};store;gate;hintCookie;revalidateSeconds;listeners=/* @__PURE__ */new Set;renewal;epoch=0;renewalTimer;detachListeners;offline=!1;spaceKey;constructor({spaceKey:e="",tokenStorage:t="localStorage",sessionHintCookie:n,sessionGate:r="optimistic",sessionRevalidateSeconds:i=300,storageKey:a="plitzi_auth_session"}={}){this.spaceKey=e,this.store=new tI(t,a),this.gate=r,this.hintCookie=n,this.revalidateSeconds=i}get endpoints(){return[]}requestExchange(){return Promise.resolve(void 0)}consumeRedirect(){return Promise.resolve(void 0)}get user(){return this.session.user}get token(){return this.session.token}getState(){return this.state}can(e){let t=this.session.user?.permissions;return Array.isArray(t)&&t.includes(e)}peekState(){return this.peek().state}peek(){let e=this.store.read(),t=eI(this.hintCookie);if(this.hintCookie&&!t)return{state:"guest"};let n=e?.token,r=iI(n?.expiresAt)??nI(n?.accessToken);return n?.accessToken&&(void 0===r||r-60>rI())&&e?.user?{state:"authenticated",user:e.user,token:e.token}:n?.accessToken||n?.refreshToken||t?{state:"init",user:e?.user,token:e?.token}:{state:"guest"}}async init(e={}){this.attach(),await this.decide(e),this.settle()}settle(){("init"===this.state||"initLoading"===this.state)&&this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest","settled")}async decide(e){if(e.skipAuth)return void this.setState("guest","skip-auth");let t=await this.consumeRedirect();if(t)return void(t.ok?(this.adopt(t),await this.handOffToServer(),this.emit({type:"login",token:this.session.token})):this.endSession(t.reason));if(e.user)return void this.adopt({ok:!0,user:e.user,token:e.accessToken?{accessToken:e.accessToken,expiresAt:e.expiresAt??null,refreshToken:null}:this.session.token},!0,"bootstrap");let n=this.store.read(),r=eI(this.hintCookie);if(this.session={user:n?.user,token:n?.token,validatedAt:n?.validatedAt??0},!this.hintCookie||r){if(this.hasLiveToken()&&this.session.user){this.setState("authenticated","restored"),this.scheduleRenewal();let e=this.isFresh()&&"strict"!==this.gate?void 0:this.revalidate(!0);return void("strict"===this.gate&&await e)}this.hasEvidence()?(this.setState("initLoading","no-evidence"),this.hasLiveToken()&&this.capabilities.identity?await this.loadIdentity():this.capabilities.renew?await this.renew():this.capabilities.identity?await this.loadIdentity():this.endSession()):this.endSession(void 0,"no-evidence")}else this.endSession(void 0,"hint-missing")}dispose(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.detachListeners?.(),this.detachListeners=void 0}async login(e){this.epoch+=1,this.setState("authenticating","authenticating");let t=await this.requestLogin(e);if(!t.ok&&"mfa"===t.reason)return this.endSession(),t;if(!t.ok)return this.endSession(t.reason),{ok:!1,reason:t.reason};this.adopt(t);let n=await this.handOffToServer();return n?{ok:!1,reason:n}:(!this.session.user&&this.capabilities.identity&&await this.loadIdentity(),"authenticated"===this.state?(this.emit({type:"login",token:this.session.token}),{ok:!0,...this.session.token??{accessToken:"",expiresAt:null,refreshToken:null}}):{ok:!1,reason:"inactive"})}async handOffToServer(){let e=await this.requestExchange();if(e)return e.ok?void this.adopt(e):"network"===e.reason?void(this.offline=!0):(this.endSession(e.reason),e.reason)}async refresh(){return await this.renew(),this.session.token}async revalidate(e=!1){return this.hasEvidence()?!e&&this.isFresh()&&this.hasLiveToken()?"authenticated"===this.state:this.hasLiveToken()&&this.capabilities.identity?this.loadIdentity():this.capabilities.renew?this.renew():this.capabilities.identity?this.loadIdentity():(this.hasLiveToken()||this.endSession("expired"),"authenticated"===this.state):("guest"!==this.state&&this.endSession(),!1)}invalidate(e="expired"){this.recover(e)}async recover(e){return"network"===e?(this.offline=!0,!1):this.renewable(e)?this.renew():(this.endSession(e),!1)}async logout(){await this.requestLogout(),this.endSession(),this.emit({type:"logout"})}on(e){let t=Array.isArray(e)?e:[e];return t.forEach(e=>this.listeners.add(e)),()=>t.forEach(e=>this.listeners.delete(e))}emit(e){for(let t of this.listeners)t(e)}setState(e,t){this.state!==e&&(this.state=e,this.emit({type:"state",state:e,reason:t}))}async renew(){return this.renewal??=this.performRenewal().finally(()=>{this.renewal=void 0}),this.renewal}async performRenewal(){let e=this.epoch,t=await this.requestRenewal(this.session.token?.refreshToken??void 0);return e===this.epoch?t.ok?(this.adopt(t),!this.session.user&&this.capabilities.identity?this.loadIdentity():"authenticated"===this.state):(this.handleFailure(t.reason),!1):"authenticated"===this.state}async loadIdentity(){let e=this.epoch,t=await this.requestIdentity();return e===this.epoch?t.ok?(this.adopt(t),"authenticated"===this.state):this.renewable(t.reason)&&!this.renewal?this.renew():(this.handleFailure(t.reason),!1):"authenticated"===this.state}handleFailure(e){"network"!==e?this.endSession(e):this.offline=!0}adopt(e,t=!0,n="granted"){this.session={user:e.user??this.session.user,token:e.token??this.session.token,validatedAt:rI()},this.offline=!1,t&&this.store.write(this.session),this.scheduleRenewal(),this.setState(this.session.user||this.hasLiveToken()?"authenticated":"guest",n)}endSession(e,t="signed-out"){this.epoch+=1,clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:rI()},this.store.write(this.session),this.setState("guest",t),e&&this.emit({type:"expired",reason:e})}expiresAt(){return iI(this.session.token?.expiresAt)??nI(this.session.token?.accessToken)}renewable(e){if(!this.capabilities.renew)return!1;if("expired"===e)return!0;if("missing"!==e)return!1;if(this.session.token?.refreshToken)return!0;let t=eI(this.hintCookie);return void 0!==t&&(void 0===t.refreshExpiresAt||t.refreshExpiresAt>rI())}hasLiveToken(){if(!this.session.token?.accessToken)return!1;let e=this.expiresAt();return void 0===e||e-60>rI()}isFresh(){return rI()-this.session.validatedAt<this.revalidateSeconds}hasEvidence(){if(this.session.token?.accessToken||this.session.token?.refreshToken)return!0;let e=eI(this.hintCookie);return!(void 0!==e?.refreshExpiresAt&&e.refreshExpiresAt<=rI()||!e)}scheduleRenewal(){clearTimeout(this.renewalTimer),this.renewalTimer=void 0;let e=this.expiresAt();if(void 0===e||typeof window>"u"||"guest"===this.state)return;let t=Math.min(1e3*(e-60-rI()),2147483647);t<=0?this.onRenewalDue():this.renewalTimer=setTimeout(()=>this.onRenewalDue(),t)}onRenewalDue(){this.capabilities.renew?this.renew():this.endSession("expired")}attach(){if(typeof window>"u"||this.detachListeners)return;let e=()=>{"visible"===document.visibilityState&&this.revalidate()},t=()=>{this.offline&&this.revalidate(!0)},n=this.store.subscribe(e=>this.adoptFromStorage(e)),r=(e=>(Jr.add(e),()=>Jr.delete(e)))(({reason:e,url:t})=>{let n=this.endpoints.filter(Boolean);return!(0!==n.length&&!n.some(e=>((e,t)=>{if(!e||!t)return!1;try{let n=typeof window>"u"?void 0:window.location.href;return ei(new URL(e,n).hostname)===ei(new URL(t,n).hostname)}catch{return!1}})(e,t)))&&this.recover(e)});document.addEventListener("visibilitychange",e),window.addEventListener("online",t),this.detachListeners=()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("online",t),n(),r()}}adoptFromStorage(e){if(this.epoch+=1,!e?.token&&!e?.user)return clearTimeout(this.renewalTimer),this.renewalTimer=void 0,this.session={validatedAt:rI()},this.setState("guest","another-tab"),void this.emit({type:"logout"});this.adopt({ok:!0,user:e.user,token:e.token},!1)}},oI=(e,t)=>ar(e,t,void 0),sI=(e,t)=>{let n=oI(e,t);return"string"==typeof n&&""!==n?n:null},lI=(e,t)=>{let n=oI(e,t),r="string"==typeof n?Number(n):n;return"number"==typeof r&&Number.isFinite(r)?r:null},cI=e=>"string"==typeof e?e:"number"==typeof e&&Number.isFinite(e)?String(e):"",uI=class extends aI{name="basic";options;constructor({loginUrl:e="",userUrl:t="",refreshUrl:n="",logoutUrl:r="",sessionExchangeUrl:i="",mfaUrl:a="",detailsPath:o="details",tokenPath:s="access_token",refreshTokenPath:l="refresh_token",expirationTimePath:c="expire_at",refreshExpirationTimePath:u="refresh_expire_at",...d}={}){super(d),this.options={loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r,sessionExchangeUrl:i,mfaUrl:a,detailsPath:o,tokenPath:s,refreshTokenPath:l,expirationTimePath:c,refreshExpirationTimePath:u}}get capabilities(){return{renew:!!this.options.refreshUrl,identity:!!this.options.userUrl}}get endpoints(){let{loginUrl:e,userUrl:t,refreshUrl:n,logoutUrl:r}=this.options;return[e,t,n,r]}async requestLogin(e){let t=cI(e.token).trim();if("token"===e.mode)return t?this.adoptToken(t):{ok:!1,reason:"missing"};if("mfa"===e.mode){let t=cI(e.mfaToken).trim();return this.options.mfaUrl&&t?this.toResult(await this.request(this.options.mfaUrl,{method:"POST",body:JSON.stringify({mfaToken:t,code:cI(e.code).trim()})})):{ok:!1,reason:"missing"}}if(!this.options.loginUrl)return{ok:!1,reason:"missing"};let n=await this.request(this.options.loginUrl,{method:"POST",body:JSON.stringify({username:cI(e.username),password:cI(e.password)})});return this.challengeOf(n)??this.toResult(n)}async adoptToken(e){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.userUrl,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}),n=this.toResult(t);return n.ok?{ok:!0,user:n.user,token:{accessToken:e,expiresAt:null,refreshToken:null}}:n}async requestRenewal(e){if(!this.options.refreshUrl)return{ok:!1,reason:"missing"};let t=await this.request(this.options.refreshUrl,{method:"POST",body:JSON.stringify(e?{[this.options.refreshTokenPath]:e}:{})});return this.toResult(t)}async requestExchange(){let e=this.token?.accessToken;if(!this.options.sessionExchangeUrl||!e)return;let t=await this.request(this.options.sessionExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",...this.spaceKey?{"x-access-token":this.spaceKey}:{}},body:JSON.stringify({provider:this.name,token:e})});return this.toResult(t)}async requestIdentity(){if(!this.options.userUrl)return{ok:!1,reason:"missing"};let e=await this.request(this.options.userUrl,{method:"GET"});return this.toResult(e)}async requestLogout(){this.options.logoutUrl&&await this.request(this.options.logoutUrl,{method:"POST"})}async request(e,t){let n,r;try{n=await fetch(e,{credentials:"include",headers:{"Content-Type":"application/json"},...t})}catch{return{status:0,reason:"network"}}try{r=await n.json()}catch{r=void 0}return{data:r,status:n.status,reason:n.ok?void 0:Qr(n.status,r)??"network"}}challengeOf(e){let t=oI(e.data,"mfaToken");return!e.reason&&!0===oI(e.data,"mfaRequired")&&"string"==typeof t&&t?{ok:!1,reason:"mfa",mfaToken:t}:void 0}toResult(e){if(e.reason)return{ok:!1,reason:e.reason};let t=oI(e.data,this.options.detailsPath);return{ok:!0,user:"object"==typeof t&&t?t:void 0,token:this.tokenFrom(e.data)}}tokenFrom(e){let t=sI(e,this.options.tokenPath);if(!t)return;let n=oI(e,"errors");return{..."object"==typeof n&&n?{errors:n}:{},accessToken:t,expiresAt:lI(e,this.options.expirationTimePath),refreshToken:sI(e,this.options.refreshTokenPath),refreshExpiresAt:lI(e,this.options.refreshExpirationTimePath)}}},dI=class extends aI{name="server";loginUrl;logoutUrl;constructor({loginUrl:e="",logoutUrl:t="",...n}={}){super({...n,tokenStorage:""}),this.loginUrl=e||"/auth/sign-in",this.logoutUrl=t||"/auth/logout"}get capabilities(){return{renew:!1,identity:!1}}requestLogin(){let e=`${window.location.pathname}${window.location.search}`;return window.location.assign(`${this.loginUrl}?return=${encodeURIComponent(e)}`),new Promise(()=>{})}requestRenewal(){return Promise.resolve({ok:!1,reason:"expired"})}requestIdentity(){return Promise.resolve({ok:!1,reason:"missing"})}async requestLogout(){await fetch(this.logoutUrl,{method:"POST",credentials:"same-origin"})}revalidate(){return Promise.resolve("authenticated"===this.getState())}},pI=/* @__PURE__ */new Map([["basic",e=>new uI(e)],["server",e=>new dI(e)]]),fI=class{providerType;provider;settings;listeners;constructor(e,t,n){this.providerType=e,this.settings=n,this.listeners=Array.isArray(t)?t:[t];let r=pI.get(e);r&&(this.provider=r(n),this.provider.on(this.listeners))}getProviderType(){return this.providerType}getProvider(){return this.provider}getState(){return this.provider?.getState()??"guest"}peekState(){return this.peek().state}peek(){return(this.provider??new uI(this.settings)).peek()}can(e){return this.provider?.can(e)??!1}init(e){if(!this.provider){let t=this.peekState(),n=e?.user||"authenticated"===t?"authenticated":"guest";return this.listeners.forEach(e=>e({type:"state",state:n,reason:"no-provider"})),Promise.resolve()}return this.provider.init(e)}login(...e){return this.provider?.login(...e)??Promise.resolve({ok:!1,reason:"missing"})}refresh(){return this.provider?.refresh()??Promise.resolve(void 0)}revalidate(e){return this.provider?.revalidate(e)??Promise.resolve(!1)}invalidate(e){this.provider?.invalidate(e)}logout(){return this.provider?.logout()??Promise.resolve()}dispose(){this.provider?.dispose()}on(e){return this.provider?.on(e)}},hI=["loginUrl","userUrl","refreshUrl","logoutUrl","detailsPath","tokenPath","refreshTokenPath","expirationTimePath","refreshExpirationTimePath","sessionHintCookie","sessionExchangeUrl","mfaUrl"],mI=({children:e,server:t})=>{let{previewMode:n,isHydrating:r,environment:i}=X(),{webKey:a}=f(Ec),[[o,s]]=Mt(["schema.settings","schema.variables"]),{queryParams:l,hostname:c}=Qx({server:t}),u=k(()=>({queryParams:l,hostname:c,environment:i}),[l,c,i]),d=k(()=>Array.isArray(s)?s.reduce((e,t)=>{let{name:n,value:r,subValues:i}=t;if(!Array.isArray(i)||0===i.length)return{...e,[n]:r};let a=i.find(e=>Oa(e.when,u));return a?{...e,[n]:a.value}:{...e,[n]:r}},{}):{},[s,u]),p=k(()=>{let e=Object.fromEntries(hI.map(e=>[e,o[e]]));try{return JSON.parse(Fn(JSON.stringify(e),d))}catch{return e}},[o,d]),m=k(()=>({...p,spaceKey:a,tokenStorage:o.tokenStorage??"localStorage",sessionGate:o.sessionGate,sessionRevalidateSeconds:o.sessionRevalidateSeconds}),[p,o,a]),{manager:y,loading:b,authenticated:v,state:w,bootstrapUser:T,bootstrapToken:C,peekedUser:A,peekedToken:E}=(({server:e,isHydrating:t=!1,provider:n="",settings:r})=>{let i=e?.authenticated?e.user?.details:void 0,a="string"==typeof e?.user?.accessToken?e.user.accessToken:void 0,[o,s]=S("init"),l=h(e=>{"state"===e.type&&s(e.state)},[]),c=k(()=>new fI(n,l,r),[n,l,r]),u=k(()=>t||i?void 0:c.peek(),[c,t,i]),d="init"!==o&&"initLoading"!==o||!!i||t||"authenticated"===u?.state||"guest"===u?.state;return g(()=>(c.init({user:i,accessToken:a,expiresAt:e?.user?.expiresAt,skipAuth:e?.skipAuth}),()=>c.dispose()),[c,i,a,e?.user?.expiresAt,e?.skipAuth]),k(()=>({manager:c,state:o,bootstrapUser:i,bootstrapToken:a,peekedUser:u?.user,peekedToken:u?.token?.accessToken,loading:"initLoading"===o||!d,authenticated:"authenticated"===o||"init"===o&&(!!i||"authenticated"===u?.state)}),[c,o,i,a,d,u])})({server:t,isHydrating:r,provider:o.userProvider??"",settings:m}),_=y.getProvider(),{user:O,accessToken:N}=(e=>{let{state:t,provider:n,bootstrap:r,peeked:i}=e;return n?.user?{user:n.user,accessToken:n.accessToken}:"guest"===t?{}:r?.user?{user:r.user,accessToken:r.accessToken}:i?.user?{user:i.user,accessToken:i.accessToken}:{}})({state:w,provider:{user:_?.user,accessToken:_?.token?.accessToken},bootstrap:{user:T,accessToken:C},peeked:{user:A,accessToken:E}}),M=x(void 0),P=k(()=>{let e=O?{details:O,accessToken:N}:void 0,t=M.current;return t?.accessToken===e?.accessToken&&((e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t;return[.../* @__PURE__ */new Set([...Object.keys(n),...Object.keys(r)])].every(e=>JSON.stringify(n[e])===JSON.stringify(r[e]))})(t?.details,e?.details)||(M.current=e),M.current},[O,N]);(e=>{let t=x(e);wt(()=>{t.current!==e&&(t.current=e,_C.reset({refetch:""!==e}))},[e])})(v?String(P?.details?.id??""):"");let L=k(()=>({login:y.login.bind(y),refresh:y.refresh.bind(y),revalidate:y.revalidate.bind(y),invalidate:y.invalidate.bind(y),can:y.can.bind(y),logout:y.logout.bind(y),state:w,authenticated:v||!n,user:P}),[y,w,v,n,P]);/* @__PURE__ */
127
+ return I(Zx,{value:L,children:!b&&e})},gI=(e,t=0,n=/* @__PURE__ */new WeakSet)=>{if("function"!=typeof e)return"object"==typeof e&&e?n.has(e)||t>12?"[…]":(n.add(e),Array.isArray(e)?e.map(e=>gI(e,t+1,n)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,gI(r,t+1,n)]).filter(([,e])=>void 0!==e))):e},yI=(e,...t)=>{let n=e;for(let r of t)n=er(n)?n[r]:void 0;return er(n)?n:{}},bI=e=>Array.isArray(e)?e:[],vI=e=>Object.entries(yI(e,"definition","bindings")).flatMap(([e,t])=>bI(t).flatMap(t=>{let{to:n,source:r,transformers:i}=yI(t),a=bI(i).map(e=>yI(e,"params").template).find(e=>"string"==typeof e);return"string"==typeof n&&"string"==typeof r?[{category:e,to:n,source:r,..."string"==typeof a?{template:a}:{}}]:[]})),wI=(e,t,n)=>{let{element:r,inComponent:i}=((e,t)=>{let n=yI(e,"flat");if(Object.hasOwn(n,t))return{element:n[t]};for(let[r,i]of Object.entries(yI(e,"components"))){let e=yI(i,"flat");if(Object.hasOwn(e,t))return{element:e[t],inComponent:r}}return{}})(yI(e,"schema"),t),a=Array.from(n.querySelectorAll(`[data-id="${t}"]`));if(!er(r)&&0===a.length)return;let o=a.at(0),s=o?.getBoundingClientRect(),l=o?getComputedStyle(o):void 0,c=void 0!==s&&s.width>0&&s.height>0&&"none"!==l?.display&&"hidden"!==l?.visibility,u=yI(r,"definition").type,d=yI(r,"attributes"),p="reference"===u&&"component"===d.referenceType&&"string"==typeof d.referenceId?d.referenceId:void 0,f=yI(e,"runtime","elements")[t];return{id:t,..."string"==typeof u?{type:u}:{},...void 0===i?{}:{inComponent:i},...void 0===p?{}:{instanceOf:p},...er(r)?{attributes:yI(gI(r),"attributes"),bindings:vI(r)}:{},...void 0===f?{}:{state:gI(f)},copies:a.length,visible:c,...s?{box:{x:Math.round(s.x),y:Math.round(s.y),width:Math.round(s.width),height:Math.round(s.height)}}:{}}},kI=e=>{let t=m(mt),n=Dt();g(()=>{if(!e||!t)return;let r=[],i=!1,a=Hl.addListener(e=>{let t=(e=>{if("interactions"!==e.category||!(e=>"object"==typeof e&&"nodes"in e&&"startTime"in e&&"node"in e)(e.params))return;let{node:t,hostElementId:n,status:r,startTime:i,endTime:a,nodes:o}=e.params,s=Object.values(o).filter(e=>e.node.id!==t.id).toSorted((e,t)=>e.startTime-t.startTime).map(e=>{let t=(e=>{if("failed"===e.status)return e.result instanceof Error?e.result.message:"string"==typeof e.result?e.result:void 0})(e);return{title:e.node.title,action:e.node.action,status:e.status,ms:Math.round(e.endTime-e.startTime),...void 0===t?{}:{error:t}}});return{at:e.time??"",trigger:`${t.title} [${t.action}]`,...void 0===n?{}:{on:n},status:r,ms:Math.round(a-i),steps:s}})(e);t&&(r.push(t),r.length>100&&r.shift())},{replay:!0}),o=(({root:e,writeState:t,stores:n,runs:r,setWatching:i,document:a})=>({help:()=>"window.__plitzi — this page, in text (debug mode only):\n state(key?) runtime.state, or one key of it\n setState(key, value) writes runtime.state.<key>, as a setState step would\n sources(name?) every source's current value by name (apiContainer_site, list_products…), or one\n element(id) an element by its id, in a page or a component: type, attributes, what it reads, its own state,\n the component it places, copies, on screen, box\n flows(limit = 20) the last flows that ran: trigger, element, status, every step with its time and error\n watch(on = true) one console line per flow as it ends",state:t=>{let n=yI(e.getState(),"runtime","state");return gI(void 0===t?n:n[t])},setState:t,sources:t=>{let r={};for(let i of[e,...n()])Object.assign(r,yI(i.getOwnState(),"runtime","sources"));return gI(void 0===t?r:r[t])},element:t=>wI(e.getState(),t,a),flows:(e=20)=>r().slice(-e),watch:(e=!0)=>(i(e),e?"Each flow is said in the console as it ends.":"Flows are no longer said in the console.")}))({root:t,writeState:(e,t)=>n(`runtime.state.${e}`,t),stores:()=>tt().map(e=>e.store),runs:()=>r,setWatching:e=>{i=e},document:document});return window.__plitzi=o,()=>{a(),window.__plitzi===o&&delete window.__plitzi}},[e,t,n])},xI=({children:e})=>{let[t,n]=S([]),[r,i]=S({}),a=x(!1),o=h((e,t,r,i,a)=>{n(n=>[...n,{logType:e,category:t,message:r,time:a,params:i}])},[n]),s=h((e,t)=>i(n=>({...n,[e]:t})),[]),l=h(e=>i(t=>pr(t,[e])),[]),c=h((e,...t)=>{if(e&&"function"==typeof r[e])return r[e](...t)},[r]),u=h(()=>n([]),[]);a.current||=(Hl.setCallback(o),Hl.setCallbackAddProvider(s),Hl.setCallbackRemoveProvider(l),!0),g(()=>(Hl.setCallback(o),Hl.setCallbackAddProvider(s),Hl.setCallbackRemoveProvider(l),Hl.processPendingLogs(),()=>{Hl.setCallback(void 0),Hl.setCallbackAddProvider(void 0),Hl.setCallbackRemoveProvider(void 0),Hl.flush()}),[o,s,l]);let d=k(()=>({providers:r,logs:t,setLogs:n,clearLogs:u,getData:c}),[r,t,n,u,c]);/* @__PURE__ */
128
+ return I(ql,{value:d,children:e})},SI={display:"contents"},TI=({children:e})=>{let t=x(null),n=x(void 0),r=x(void 0),i=m(mt),a=f(Bc),o=f(cS),s=f(jr),l=f(Ua);return w(()=>{let e=t.current;if(e)return clearTimeout(r.current),n.current??=C(e),()=>{let e=n.current;r.current=setTimeout(()=>{e?.unmount(),n.current===e&&(n.current=void 0)},0)}},[]),w(()=>{n.current?.render(/* @__PURE__ */I(mt,{value:i,children:/* @__PURE__ */I(Ua,{value:l,children:/* @__PURE__ */I(Bc,{value:a,children:/* @__PURE__ */I(cS,{value:o,children:/* @__PURE__ */I(jr,{value:s,children:e})})})})}))}),/* @__PURE__ */I("div",{ref:t,style:SI})},CI=[],AI=/* @__PURE__ */new Set,EI=[],II=()=>{EI=[...CI];for(let e of AI)e()},_I=e=>(AI.add(e),()=>{AI.delete(e)}),OI=()=>EI,NI=()=>YE,MI=e=>{YE!==e&&(YE=e,II())},PI=()=>({instanceIds:T(_I,OI,OI),selectedId:T(_I,NI,NI)}),LI=()=>()=>{},DI=(e,t,n)=>{window.dispatchEvent(new CustomEvent("customstorage-changed",{detail:{key:e,oldValue:t,newValue:n}}))},zI=()=>{let e={};if(typeof document>"u"||!document.cookie)return e;for(let t of document.cookie.split(";")){let n=t.indexOf("=");-1!==n&&(e[t.slice(0,n).trim()]=decodeURIComponent(t.slice(n+1).trim()))}return e},RI=e=>new Proxy(e,{get(e,t,n){if("setItem"===t)return(t,n)=>{let r=e.getItem(t);e.setItem.call(e,t,n),r!==n&&DI(t,r,n)};if("removeItem"===t)return t=>{let n=e.getItem(t);e.removeItem.call(e,t),null!==n&&DI(t,n,null)};let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}}),jI=e=>"cookie"===e?typeof document<"u"?RI((()=>{let e={getItem(e){let t=zI();return e in t?t[e]:null},setItem(e,t){typeof document<"u"&&(document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; samesite=lax`)},removeItem(e){typeof document<"u"&&(document.cookie=`${e}=; path=/; max-age=0; samesite=lax`)},clear(){for(let t of Object.keys(zI()))e.removeItem(t)},key:e=>Object.keys(zI())[e]??null,get length(){return Object.keys(zI()).length}};return e})()):void 0:"sessionStorage"===e?typeof sessionStorage<"u"?RI(sessionStorage):void 0:typeof localStorage<"u"?RI(localStorage):void 0,$I=function(e,t,n="localStorage",r=!0){let[i,a]=k(()=>{if(e.includes(".")){let t=e.split(".").filter(Boolean);return[t.shift(),t.join(".")]}return[e,""]},[e]),o=x(jI(n));Ss(()=>{o.current=jI(n)},[n]);let[s,l]=S(()=>{try{if(!o.current)return t;let e=o.current.getItem(i);if(!e)return t;let n=JSON.parse(e);return a?ar(n,a,t):n}catch{return t}});g(()=>{try{if(!o.current)return;let e=s;if(a){let t=o.current.getItem(i);e=Rl(t?JSON.parse(t):{},e=>{or(e,a,s)})}o.current.setItem(i,JSON.stringify(e))}catch(sO){}},[i,a,s]);let c=h(e=>{if(e.key===i)try{let n=e.newValue?JSON.parse(e.newValue):t;l(a?ar(n,a,t):n)}catch{}},[i,a,t]),u=h(e=>{if(e.detail.key===i)try{let n=e.detail.newValue?JSON.parse(e.detail.newValue):t;l(a?ar(n,a,t):n)}catch{}},[i,a,t]);return g(()=>{if(typeof window<"u"&&r)return window.addEventListener("storage",c),window.addEventListener("customstorage-changed",u),()=>{window.removeEventListener("storage",c),window.removeEventListener("customstorage-changed",u)}},[c,u,n,r]),[s,l]},FI=d(()=>import("./plitzi-sdk-devtools-Ca21xltm.js")),qI="horizontal",BI=0,UI=({children:e,className:t,innerClassName:n,enabled:r=!1,instanceId:i,renderMode:a="default",scroll:s="container",qa:l=!1,devToolsStyle:c="",devToolsStyleLink:u=""})=>{let{resolvedTheme:d}=Gc(),[p,f]=$I("plitzi-sdk.dev-tools.orientation",qI),[y,b]=$I("plitzi-sdk.dev-tools.collapsed",!0),[v,w]=$I("plitzi-sdk.dev-tools.tab","logs"),[k,C]=S(),A=x(void 0),E=x(null);A.current||="sdk-instance-"+ ++BI;let O=i||A.current,N=T(LI,()=>!0,()=>!1),M=N?p:qI,P=((e,t)=>{g(()=>{if(t)return(e=>(CI.push(e),void 0===YE&&(YE=e),II(),()=>{let t=CI.indexOf(e);-1!==t&&CI.splice(t,1),YE===e&&(YE=CI[0]),II()}))(e)},[t,e]);let n=T(_I,NI,NI);return t&&n===e})(O,r);(e=>{let t=m(mt);g(()=>{if(e&&!Ne&&t)return Qe(t)},[e,t])})(r),((e,t)=>{g(()=>{if(e)return Qe(_C.store,t,"Queries")},[e,t])})(P,O),kI(P);let L=h(e=>f(e),[f]),D=h(e=>{e&&w("logs"),C(e),b(!1)},[b,w]),z=h(()=>b(!0),[b]),R=h(e=>{C(void 0),w(e)},[w]);if(!r)return e;let j="document"===s&&(!N||y),$=P&&N&&/* @__PURE__ */I(TI,{children:/* @__PURE__ */I(xI,{children:/* @__PURE__ */_(o,{fallback:null,children:["default"===a&&/* @__PURE__ */I(FI,{className:U({dark:"dark"===d}),collapsed:y,orientation:M,tabSelected:v,logTypeFilter:k,onOpen:D,onCollapse:z,onTabSelect:R,onChangeOrientation:L,pageRef:E,qa:l}),"shadow"===a&&/* @__PURE__ */_(UE,{children:[u&&/* @__PURE__ */I(UE.Link,{href:u}),/* @__PURE__ */_(UE.Content,{children:[/* @__PURE__ */I("style",{dangerouslySetInnerHTML:{__html:c}}),/* @__PURE__ */I(FI,{className:U({dark:"dark"===d}),collapsed:y,orientation:M,tabSelected:v,logTypeFilter:k,onOpen:D,onCollapse:z,onTabSelect:R,onChangeOrientation:L,pageRef:E,qa:l})]})]})]})})});/* @__PURE__ */
129
+ return _("div",{className:U("relative flex min-w-0 grow",{"overflow-auto":!j,"flex-col":j||"horizontal"===M,"h-screen":!j&&"vertical"===M},t),children:[/* @__PURE__ */I(ht,{value:O,children:/* @__PURE__ */I("div",{ref:E,className:U("grow",{"basis-0 flex-col overflow-auto":!j},n),children:e})}),j?/* @__PURE__ */I("div",{className:"sticky bottom-0 h-0",children:$}):$]})},HI=({children:e})=>{let{environment:t}=X(),[[n,r,i,a,o,s,l]]=Mt(["schema.variables","navigation.routeParams","navigation.queryParams","navigation.hostname","navigation.origin","navigation.href","navigation.currentPageId"]),c=ic(k(()=>Fl(n,{routeParams:r,queryParams:i,hostname:a,environment:t}),[t,a,i,r,n])),u=h(()=>qr(c).map(e=>({path:e,name:`variables.${e}`})),[c]);$l({id:"global",source:"variables",name:"Variables",fields:u}),Pt("runtime.sources.variables",c);let[d={}]=Mt("pageDefinitions"),p=k(()=>Object.values(d).map(e=>({value:e.id,label:ar(e,"attributes.name",e.id)})),[d]),m=k(()=>({routeParams:r,queryParams:i,origin:o,href:s,currentPageId:l}),[r,i,o,s,l]),y=h(()=>[...qr({routeParams:r,queryParams:i}).map(e=>({path:e,name:`navigation.${e}`})),{path:"origin",name:"Origin"},{path:"href",name:"This page’s address"},p.length>0?{path:"currentPageId",name:"Current Page",inputType:"select",values:p}:{path:"currentPageId",name:"Current Page"}],[r,i,p]);$l({id:"global",source:"navigation",name:"Navigation",fields:y}),Pt("runtime.sources.navigation",m);let b=f(Zx),{user:v,authenticated:w,state:S}=b,[T="basic"]=Mt("schema.settings.userProvider"),C=k(()=>""===T?{}:{isAuthenticated:w,...void 0===S?{}:{status:S},accessToken:v?.accessToken??"",details:{username:"",email:"",roles:"",permissions:"",verified:"",...v?.details??{}}},[T,v,w,S]),A=h(()=>qr(C).map(e=>({path:e,name:`user.${e}`})),[C]);$l({id:"global",source:"auth",name:"Auth State",fields:A}),Pt("runtime.sources.auth",C);let E=(e=>{let{environment:t}=X(),[[n,r,i,a,o]]=Mt(["schema.flags","navigation.routeParams","navigation.queryParams","navigation.hostname","flags.overrides"]),{authenticated:s,user:l}=e,c=k(()=>eS({authenticated:s,user:l}),[s,l]);return ic(k(()=>tc(n,{environment:t,hostname:a,routeParams:r,queryParams:i,user:c},o),[n,t,a,r,i,c,o]))})(b),I=k(()=>nc(E),[E]),_=h(()=>Object.keys(I).map(e=>({path:e,name:`flags.${e}`,inputType:"checkbox"})),[I]);$l({id:"global",source:"flags",name:"Feature Flags",fields:_}),Pt("runtime.sources.flags",I),Pt("flags.resolved",E);let[O,N]=Mt(["schema.flags","flags.overrides"])[0],M=ic(((e,t)=>Ql.flatMap(n=>Object.keys(t[n]??{}).filter(t=>!Object.hasOwn(e??{},t)).map(e=>({layer:n,name:e}))))(O,N??{}));g(()=>{M.forEach(({layer:e,name:t})=>console.warn(`[plitzi] The ${e} sets the feature flag "${t}", which this space does not declare: the override is ignored. Declare the flag in the space, or remove the override.`))},[M]);let[P]=Mt("runtime.state"),L=h(()=>qr(P).map(e=>({path:e,name:`state.${e}`})),[P]);$l({id:"global",source:"state",name:"State",fields:L}),Pt("runtime.sources.state",P);let[D]=Mt("runtime.host"),z=h(()=>qr(D).map(e=>({path:e,name:`host.${e}`})),[D]);$l({id:"global",source:"host",name:"Host",fields:z}),Pt("runtime.sources.host",D);let{theme:R,resolvedTheme:j}=Gc(Vc),$=k(()=>({mode:R,resolved:j}),[R,j]),F=h(()=>qr($).map(e=>({path:e,name:`theme.${e}`})),[$]);$l({id:"global",source:"theme",name:"Theme",fields:F}),Pt("runtime.sources.theme",$);let[q]=Mt("schema.settings.computed"),B=x(void 0),U=k(()=>ai(q??{},{variables:c,navigation:m,auth:C,state:P??{},host:D??{},theme:$,flags:I},B.current),[q,c,m,C,P,D,$,I]);B.current=U;let H=h(()=>qr(U).map(e=>({path:e,name:`computed.${e}`})),[U]);return $l({id:"global",source:"computed",name:"Computed",fields:H}),Pt("runtime.sources.computed",U),e},WI=class{debugMode=!1;events;listeners=/* @__PURE__ */new Map;counts=/* @__PURE__ */new Map;constructor({events:e,debugMode:t=!1}={}){this.events=e??{},this.debugMode=t;for(let[n,r]of Object.entries(this.events))this.counts.set(n,Object.keys(r).length)}has(e,t){if(!e)throw Error("Module name is required");return this.events[e]&&this.events[e][t]}on(e,t,n,r={}){let{filter:i,override:a=!1}=r;if(!e)throw Error("Module name is required");if(!n||"function"!=typeof n)throw Error("Callback must be a function");this.events[e]||(this.events[e]={}),this.events[e][t]||this.counts.set(e,(this.counts.get(e)??0)+1),(!this.events[e][t]||a&&this.events[e][t].length>0)&&(this.events[e][t]=[]),this.events[e][t].push({callback:n,filter:i})}get(e,t){return this.has(e,t)?this.events[e]?.[t]:[]}off(e,t,n){if(this.has(e,t)&&this.events[e]&&(this.events[e][t]=n?this.events[e][t]?.filter(e=>e.callback!==n):[],0===this.events[e][t]?.length)){delete this.events[e][t];let n=(this.counts.get(e)??1)-1;n>0?this.counts.set(e,n):(this.counts.delete(e),delete this.events[e])}}async emit(e,t=[],...n){let r;this.debugMode&&Hl.info("eventBridge","Event Triggered",{module:e,events:t,data:n}),r=Array.isArray(t)?t:[t];let i=[];r.forEach(t=>{if(!this.has(e,t))return;let r=this.get(e,t);r&&r.forEach(e=>{let{callback:t,filter:r}=e;(!r||"function"!=typeof r||r(...n))&&i.push(t(...n))})});let a=await Promise.all(i);return this.touch(r.reduce((e,t)=>({...e,[t]:n}),{})),a}async emitWithResponse(e,t,...n){if(!this.has(e,t))return;let r=this.get(e,t);if(!r)return;let i=await Promise.all(r.filter(e=>!e.filter||e.filter(...n)).map(e=>e.callback(...n)));return 1===i.length?i[0]:i}once(e,t,n,r){if(!e)throw Error("Module name is required");let i=async r=>{await n(r),this.off(e,t,i)};this.on(e,t,i,{filter:r})}clear(e){if(!e)return this.events={},void this.counts.clear();this.events[e]&&(delete this.events[e],this.counts.delete(e))}getEvents(e){return e?this.events[e]?this.events[e]:{}:this.events}getModuleEventsNames(e){return e&&this.events[e]?Object.keys(this.events[e]):[]}getModuleEventsCount(e){return this.getModuleEventsNames(e).length}listen(e,t){let n=Array.isArray(e)?e:[e];return n.forEach(e=>{this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}),()=>{n.forEach(e=>{let n=this.listeners.get(e);n&&(n.delete(t),0===n.size&&this.listeners.delete(e))})}}touch(e){for(let t in e){let n=this.listeners.get(t);if(n)for(let t of n)t(e)}}},VI=({children:e,debugMode:t,onInit:n})=>{let r=k(()=>new WI({debugMode:t}),[t]);g(()=>()=>{r.clear()},[r]);let i=k(()=>({eventBridge:r}),[r]);return g(()=>{n?.(i)},[n,i]),/* @__PURE__ */I(Mu,{value:i,children:e})},GI=({id:e,interactions:t,triggers:n,callbacks:r,getAdditionalParams:i})=>{let{interactionsManager:a}=f(hS);g(()=>{if(e)return a.subscribe(e),()=>{a.unsubscribe(e)}},[e,a]),g(()=>{e&&a.update(e,t,n,r,i)},[e,t,n,r,i,a])},KI={action:"delayTime",title:"Delay Time",type:"utility",params:{time:{label:"Time (Milliseconds)",type:"text"}},preview:{},callback:({time:e})=>new Promise(t=>{setTimeout(t,e)})},YI={action:"twigTemplate",title:"Twig Template",type:"utility",params:{returnMode:{label:"Mode",canBind:!1,type:"select",defaultValue:"text",options:[{label:"Text",value:"text"},{label:"Json Text",value:"json"},{label:"Json Object",value:"jsonObject"}]},template:{label:"Template",canBind:!1,defaultValue:"",type:e=>{let{returnMode:t}=e;return"text"===t?"codemirror-text":"codemirror-json"}}},preview:e=>{let{template:t,returnMode:n}=e;if("jsonObject"===n)try{let n=JSON.parse(Fn(t,e));if(n&&"object"==typeof n)return{template:"",content:qr(n).reduce((e,t)=>({...e,[t]:""}),{})}}catch{}return{template:"",content:""}},callback:e=>{let{template:t,returnMode:n}=e,r="";try{r=Fn(t,e)}catch(sO){console.error(sO)}if("jsonObject"===n)try{return{content:JSON.parse(r)}}catch(sO){console.error(sO)}else if("json"===n)try{return JSON.parse(r),{content:r}}catch{return{content:""}}return{content:r}}},JI={origin:"Requests to the same site",all:"All cached requests",elements:"Only these containers",none:"None — this only reads"},XI=(e,t=()=>!0)=>({invalidateQueries:{type:"select",description:"What to refresh once the write succeeded, so the page shows the new data: the cached requests to the same site, all of them, only the api containers named in `invalidateElements`, or none for a step that only reads. Containers on screen ask again at once; the rest when they are shown.",default:e[0],options:[...e],optionLabels:Object.fromEntries(e.map(e=>[e,JI[e]])),label:"Refresh cached requests",canBind:!1,when:t},invalidateElements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id.",default:[],label:"Containers (ids)",when:e=>t(e)&&"elements"===e.invalidateQueries}}),ZI=e=>{let t="string"==typeof e.method?e.method.toLowerCase():"get";return"get"===t||"head"===t},QI={title:"Webhook",type:"utility",strictParams:!0,params:{url:{type:"text",description:"The URL to call.",default:"",label:"Url"},method:{type:"select",description:"HTTP method.",default:"get",options:["get","post","put","delete","patch","head"],canBind:!1},body:{type:"json",description:'Request body: an object of fields (sent as JSON, or as form data when one of them is a file). Pass a real object, with templates for its values — `{ email: "{{ submitted.values.email }}" }`.',default:"",builderType:"textarea"},authorizationToken:{type:"text",description:"Value sent as the Authorization header.",default:""},headers:{type:"json",description:'Headers of the request, as an object of name to value, with templates for the values like the body: `{ "x-api-key": "{{ apiKey }}" }`. Authorization is set by `authorizationToken` and the content type follows the body, so neither is set here.',default:"",builderType:"textarea"},credentials:{type:"select",description:"fetch credentials mode.",default:"same-origin",options:["include","omit","same-origin"],optionLabels:{"same-origin":"Same Origin"}},cache:{type:"boolean",description:"Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",default:!1,label:"Cache response",when:ZI},staleTime:{type:"number",description:"With `cache`: seconds the answer is served without asking again.",default:30,label:"Fresh for (s)",when:e=>ZI(e)&&(!0===e.cache||"true"===e.cache)},...XI(["origin","all","elements","none"],e=>!ZI(e))},preview:{response:{status:"",data:""}}},e_=/* @__PURE__ */new Set(["GET","HEAD"]),t_=/* @__PURE__ */new Set(["GET","HEAD","DELETE"]),n_=e=>{let t=Number(e);return 1e3*(Number.isFinite(t)&&t>=0?t:Number(QI.params.staleTime.default))},r_=e=>e?{Authorization:`Bearer ${e}`}:{},i_=/* @__PURE__ */new Set(["authorization","content-type"]),a_=e=>"object"==typeof e&&e?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>"string"!=typeof t&&"number"!=typeof t||""===t||i_.has(e.toLowerCase())?[]:[[e,String(t)]])):{},o_=async({url:e,authorizationToken:t,headers:n,body:r,credentials:i},a)=>{let o=(e=>"object"==typeof e&&e?e:{})(r),s=Object.values(o).some(e=>e instanceof Blob),l={method:a,headers:{...a_(n),...s?{}:{"Content-Type":"application/json"},...r_(t)},credentials:i};if(!t_.has(a))if(s){let e=new FormData;Object.entries(o).forEach(([t,n])=>{e.append(t,n)}),l.body=e}else l.body=JSON.stringify(o);let c=await fetch(e,l).catch(t=>{throw Error(`${a} ${e} got no answer: ${t instanceof Error?t.message:String(t)}`)}),u="";try{u=await c.json()}catch{}return{status:c.status,data:u}},s_=gd("webHook",QI,async e=>{let t=(e.method||"get").toUpperCase();if(e_.has(t)){if(!0!==e.cache&&"true"!==e.cache)return{response:await o_(e,t)};let n=zC({method:t,url:e.url,credentials:e.credentials,headers:{...a_(e.headers),...r_(e.authorizationToken)}});return{response:await _C.fetchQuery(n,{meta:{url:e.url},fetcher:()=>o_(e,t),staleTime:n_(e.staleTime),isCacheable:e=>e.status<400})}}let n=await o_(e,t);return n.status>=200&&n.status<300&&RC({mode:e.invalidateQueries,fallback:"origin",elements:e.invalidateElements,url:e.url}),{response:n}}),l_={delayTime:KI,twigTemplate:YI,webHook:s_},c_=(e,t,n,r,i)=>{if("utility"===e&&"twigTemplate"===i)return t;let a={...n,...r},o=(e,t,n)=>{if("string"==typeof e){let{value:n,unresolved:r}=((e,t)=>{let n=e,r=5;for((e=>"string"==typeof e&&/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e))(n)&&!Xn(e)&&(n=Un(e,t),r--);"string"==typeof n&&Xn(n)&&r>0;)n=Un(n,t),r--;return{value:n,unresolved:"string"==typeof n&&Xn(n)}})(e,a);return r&&Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Twig token resolution exceeded ",5," passes for ",
130
+ /* @__PURE__ */I("b",{children:t}),", leaving unresolved tokens"]}),{param:t,value:n}),n}return n>=5||"object"!=typeof e||!e?e:Array.isArray(e)?e.map(e=>o(e,t,n+1)):Object.fromEntries(Object.entries(e).map(([e,r])=>[e,o(r,t,n+1)]))};return Object.keys(t).reduce((n,r)=>{let i="trigger"===e?t[r]:o(t[r],r,0);return{...n,[r]:i}},{})},u_=e=>Object.fromEntries(Object.entries(e).filter(e=>(e=>"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e)(e[1]))),d_=e=>"object"==typeof e&&!!e&&"then"in e&&"function"==typeof e.then,p_=(e,t={},n={},r={},i={})=>{let a=[],{id:o,action:s,enabled:l,params:c,elementId:u,type:d,when:p}=e;if(!s||!l)return{status:"disabled",result:{},postCallbacks:a};let f=u_({...r,...n,[o]:c});if(p&&!Oa(p,f))return{status:"skipped",result:{},postCallbacks:a,whenParams:f};let h,m=t=>(Hl.danger("interactions",/* @__PURE__ */_("span",{children:["Interaction node failed ",/* @__PURE__ */I("b",{children:s})]}),{error:t instanceof Error?t.message:String(t),node:e}),{status:"failed",result:{},postCallbacks:a,whenParams:f});switch(d){case"callback":case"globalCallback":if(!u)return Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Step ",
131
131
  /* @__PURE__ */I("b",{children:s})," names no element, so there is nothing to run it on"]}),{node:e}),{status:"failed",result:{},postCallbacks:a,whenParams:f};if(h=ar(t,`${u}.${s}`),!h)return Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Nothing is registered as ",
132
- /* @__PURE__ */I("b",{children:`${u}.${s}`}),", so this step did nothing"]}),{node:e,available:Object.keys(ar(t,u,{}))}),{status:"failed",result:{},postCallbacks:a,whenParams:f};break;case"utility":h=ar(a_,s,{});break;default:return{status:"success",result:{},postCallbacks:a,whenParams:f}}try{let e={...n,...r,...o_(d,c,n,r,s)},{callback:t,postCallback:l}=h,u=t=>(l&&a.push({id:o,callback:l,params:{...e,[o]:t}}),{status:"success",result:t,postCallbacks:a,whenParams:f}),p=t?t(e,i):{};return l_(p)?Promise.resolve(p).then(u,m):u(p)}catch(nO){return m(nO)}},u_=async(e=[])=>{let t={};return await Promise.all(e.reverse().map(async({id:e,callback:n,params:r})=>{t[e]=await(n?.(pr(r,[e]),r[e]))})),t},d_=()=>({}),p_=async(e,t={},n={},r={},i=d_,a=[],o={},s={})=>{let l=e,c=r;for(;l;){let e=ar(t,l.afterNode);if(!e)return a.length>0&&await u_(a),o;let r=Hl.getTime().valueOf(),u=c_(e,n,c,i(),s),{status:d,result:p,postCallbacks:f,whenParams:h}=l_(u)?await u:u;o[e.id]={node:e,status:d,result:p,postCallbacks:f,whenParams:h,startTime:r,endTime:Hl.getTime().valueOf()},a.push(...f),c={...c,[e.id]:p},l=e}return o},f_=(e,t,n={},r,i)=>{let a=Hl.getTime().valueOf(),o="skipped"===r?"skipped":"success",s=/* @__PURE__ */_("span",{children:["Interaction triggered ",
133
- /* @__PURE__ */I("b",{children:`${e.title} [${e.action}]`}),i?/* @__PURE__ */_(E,{children:[" on ",/* @__PURE__ */I("b",{children:i})]}):null]}),l={status:r,node:e,elementId:e.elementId,hostElementId:i,nodes:{...n,[e.id]:{node:e,status:o,result:void 0,postCallbacks:[],startTime:t,endTime:a}},startTime:t,endTime:a};"failed"!==r?Hl.info("interactions",s,l):Hl.danger("interactions",s,l)},h_=BI,m_=class e{eventBridge;parentManager;childManagers;interactionsData;subscriptors;callbacksAvailables;flowsRunning=/* @__PURE__ */new Map;lastUpdate;listeners=/* @__PURE__ */new Set;constructor(e="",t={},n={}){this.eventBridge=new h_,this.parentManager=void 0,this.childManagers=[],this.subscriptors={},this.callbacksAvailables={},this.interactionsData={currentPageId:e,...t,...n},this.lastUpdate=Date.now()}eventBridgeCallback=e=>async(t,n,r)=>{if(!e||!n||!t)return;let i=this.subscriptors[t];if(await Promise.resolve(),!i||this.subscriptors[t]!==i)return;let a=ar(this.subscriptors,`${t}.getAdditionalParams`,void 0),o=()=>({...this.interactionsData,..."function"==typeof a?a().dataSource:void 0}),s=Object.values(e).filter(e=>"trigger"===e.type&&e.action===n&&e.enabled&&((e,t)=>{if("onKey"===e.action){let{shortcuts:n}=t;return Array.isArray(n)&&n.includes(e.params.keys)}return"onInterval"!==e.action||ha(e.params.interval)===t.interval})(e,r));await Promise.all(s.map(n=>this.runFlow(`${t}.${n.id}`,n.whileRunning??"skip",()=>(async(e,t={},n={},r={},i=d_,a,o=[])=>{let s=Hl.getTime().valueOf(),{action:l,enabled:c,when:u}=e;if(!l||!c||u&&!Oa(u,s_({...i(),...r})))return void f_(e,s,{},"skipped",a);let d=await p_(e,t,n,r,i,o,{},{hostElementId:a});f_(e,s,d,(e=>Object.values(e).some(({status:e})=>"failed"===e)?"failed":"completed")(d),a)})(n,e,this.getCallbacksAvailables(),{[n.id]:r},o,t))))};runFlow(e,t,n){let r=this.flowsRunning.get(e);if("parallel"===t)return n();if(r&&"skip"===t)return Promise.resolve();let i=(r?r.then(n,n):n()).finally(()=>{this.flowsRunning.get(e)===i&&this.flowsRunning.delete(e)});return this.flowsRunning.set(e,i),i}subscribe(e,t={},n={},r={},i){return!(!e||this.subscriptors[e]||(or(this.subscriptors,e,{id:e,triggers:n,getAdditionalParams:i}),this.wire(e,t,n,r),this.touch(),0))}update(e,t={},n={},r={},i){let a=this.subscriptors[e];return!!a&&(a.triggers=n,a.getAdditionalParams=i,this.wire(e,t,n,r),this.touch(),!0)}wire(e,t,n,r){let i=Object.keys(r);i.length>0?this.callbacksAvailables[e]=i.reduce((t,n)=>{let{title:i,callback:a,postCallback:o,params:s,preview:l,type:c}=r[n];return"function"==typeof a?{...t,[n]:{elementId:e,title:i,action:n,type:c,callback:a,postCallback:o,params:s,preview:l}}:t},{}):delete this.callbacksAvailables[e],Object.keys(n).length>0?this.eventBridge.on("interaction",e,this.eventBridgeCallback(t),{override:!0}):this.eventBridge.off("interaction",e)}unsubscribe(e){return!!this.subscriptors[e]&&(this.eventBridge.off("interaction",e),delete this.subscriptors[e],this.callbacksAvailables[e]&&delete this.callbacksAvailables[e],this.touch(),!0)}getRootManager(){return this.parentManager?this.parentManager.getRootManager():this}getSubscriptorInternal(e){let t=ar(this.subscriptors,e);if(!t&&this.childManagers.length>0)for(let n of this.childManagers)if(t=n.getSubscriptorInternal(e),t)break;return t}getSubscriptor(e){return this.parentManager?this.getRootManager()?.getSubscriptorInternal(e):this.getSubscriptorInternal(e)}getCallbacksAvailablesInternal(){let e={};if(this.childManagers.length>0)for(let t of this.childManagers)e={...e,...t.getCallbacksAvailablesInternal()};return{...e,...this.callbacksAvailables}}getCallbacksAvailables(){if(!this.parentManager)return this.getCallbacksAvailablesInternal();let e=[];for(let n=this.parentManager;n;n=n.parentManager)e.unshift(n);let t=this.getRootManager()?.getCallbacksAvailablesInternal()??{};for(let n of e)t={...t,...n.callbacksAvailables};return{...t,...this.getCallbacksAvailablesInternal()}}interactionTrigger(e,t,n={}){if(e)return this.eventBridge.emit("interaction",e,e,t,n)}createChildManager=(t={},n={})=>{let r=new e(this.interactionsData.currentPageId,t,n);return r.parentManager=this,this.childManagers.push(r),r};removeChildManager=e=>{this.childManagers=this.childManagers.filter(t=>t!==e)};onUpdate(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}touch(){let e=Date.now();this.lastUpdate=e;for(let t of this.listeners)t(e)}},g_=({children:e,currentPageId:t,routeParams:n,queryParams:r})=>{let i=k(()=>new m_(t,n,r),[]);i.interactionsData=k(()=>({currentPageId:t,...n,...r}),[t,n,r]);let a=k(()=>({interactionsManager:i,useInteractions:HI}),[i]);/* @__PURE__ */
134
- return I(dS,{value:a,children:e})},y_={runServerAction:{source:"actions",title:"Run Server Action",strictParams:!0,params:{actionId:{type:"text",description:"Identifier of the server action to run, as the space publishes it.",default:"",required:!0,label:"Action"},input:{type:"json",description:"The values passed to the action, as a JSON object. The server drops every key the action did not declare. Authoring in code, pass a real object rather than a line of JSON text — an interpolated value containing a quote or a newline makes the text unparseable, and unparseable input posts nothing.",default:"{}",label:"Input"},mode:{type:"select",description:"await waits and puts the result in the flow scope; detached carries on immediately and leaves nothing to read; stream reports progress as it goes.",default:"await",options:["await","detached","stream"],optionLabels:{await:"Wait for the result",detached:"Send and continue",stream:"Stream progress"}},idempotencyKey:{type:"text",description:"Makes a repeat of the same intent answer with the first run instead of running again.",default:"",when:e=>"detached"!==e.mode},...KI(["all","elements","none"])},preview:{runId:"",status:"",output:{},reason:"",error:""}},cancelServerAction:{source:"actions",title:"Cancel Server Action",strictParams:!0,params:{runId:{type:"text",description:"The run to cancel — normally `{{ <step>.output.runId }}` from the step that started it.",default:""}},preview:{cancelled:""}}},b_=e=>Array.isArray(e)?e:void 0,v_={status:"failed",reason:"failed",runId:"",output:{}},w_=(e,t)=>e.signal.aborted?{status:"aborted",error:"Cancelled"}:{status:"failed",error:t instanceof Error?t.message:String(t)},k_=(e,t,n)=>{if(401!==e)return;let r=Qr(e,t);r&&Xr({reason:r,url:n})},x_=({children:e})=>{let{useInteractions:t,interactionsManager:n}=f(dS),[r]=Mt("actions.endpoint"),[[i,a]]=Mt(["actions.catalog","actions.available"]),o=h((e,t,r)=>{e&&n.interactionTrigger(e,t,r)},[n]),s=h(async(e,t)=>{let{actionId:n,mode:i="await",idempotencyKey:a}=e;if(!r)return Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
135
- /* @__PURE__ */I("b",{children:n})," was skipped: this page is served without a Plitzi server"]}),{actionId:n,status:"skipped"}),{status:"skipped",runId:"",output:{}};if(!n)return{status:"skipped",runId:"",output:{}};let s=(e=>{if(!e)return{};if("object"==typeof e)return e;try{let t=JSON.parse(e);return"object"==typeof t&&t?t:{}}catch{return{}}})(e.input),l=JSON.stringify({actionId:n,input:s,...a?{idempotencyKey:a}:{}}),c=(e=>{let t=`run-${rt+=1}`;return it([{...e,id:t,status:"running",startedAt:Date.now(),progress:[],cancellable:!0},...nt.getState().runs].slice(0,100)),t})({actionId:n,mode:i,input:s}),u=new AbortController,d="";(e=>{at.set(e,()=>{u.abort(),ct(c,{status:"aborted",endedAt:Date.now(),cancellable:!1}),d&&fetch(`${r}/run/${d}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{})})})(c);let p,f=t=>{(e=>{at.delete(e)})(c),ct(c,{endedAt:Date.now(),cancellable:!1,...t}),"completed"===t.status&&LC({mode:e.invalidateQueries,fallback:"all",elements:e.invalidateElements})};if("detached"===i)return Hl.info("actions",/* @__PURE__ */_("span",{children:["Server action ",
136
- /* @__PURE__ */I("b",{children:n})," sent"]}),{actionId:n,mode:i,status:"accepted"}),fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",keepalive:!0,signal:u.signal,body:l}).then(async e=>{let a=await e.json().catch(()=>({}));if(!e.ok)return k_(e.status,a,r),f({status:"failed",...a.runId?{runId:a.runId}:{},...a.reason?{reason:a.reason}:{},...a.error?{error:a.error}:{},...a.steps?{steps:a.steps}:{}}),void o(t?.hostElementId,"onFlowError",{actionId:n,runId:a.runId??"",error:a.error??"",reason:a.reason??"failed"});f({status:"completed"===a.status?"completed":"accepted",...a.runId?{runId:a.runId}:{},...a.output?{output:a.output}:{},...a.steps?{steps:a.steps}:{},...a.trace?{trace:a.trace}:{}}),Hl.success("actions",/* @__PURE__ */_("span",{children:["Server action ",
137
- /* @__PURE__ */I("b",{children:n})," finished"]}),{actionId:n,mode:i,runId:a.runId,status:a.status,output:a.output}),o(t?.hostElementId,"onFlowEnd",{actionId:n,runId:a.runId??"",status:a.status??"completed",output:a.output??{}})}).catch(e=>{f(w_(u,e)),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
132
+ /* @__PURE__ */I("b",{children:`${u}.${s}`}),", so this step did nothing"]}),{node:e,available:Object.keys(ar(t,u,{}))}),{status:"failed",result:{},postCallbacks:a,whenParams:f};break;case"utility":h=ar(l_,s,{});break;default:return{status:"success",result:{},postCallbacks:a,whenParams:f}}try{let e={...n,...r,...c_(d,c,n,r,s)},{callback:t,postCallback:l}=h,u=t=>(l&&a.push({id:o,callback:l,params:{...e,[o]:t}}),{status:"success",result:t,postCallbacks:a,whenParams:f}),p=t?t(e,i):{};return d_(p)?Promise.resolve(p).then(u,m):u(p)}catch(sO){return m(sO)}},f_=async(e=[])=>{let t={};return await Promise.all(e.reverse().map(async({id:e,callback:n,params:r})=>{t[e]=await(n?.(pr(r,[e]),r[e]))})),t},h_=()=>({}),m_=async(e,t={},n={},r={},i=h_,a=[],o={},s={})=>{let l=e,c=r;for(;l;){let e=ar(t,l.afterNode);if(!e)return a.length>0&&await f_(a),o;let r=Hl.getTime().valueOf(),u=p_(e,n,c,i(),s),{status:d,result:p,postCallbacks:f,whenParams:h}=d_(u)?await u:u;o[e.id]={node:e,status:d,result:p,postCallbacks:f,whenParams:h,startTime:r,endTime:Hl.getTime().valueOf()},a.push(...f),c={...c,[e.id]:p},l=e}return o},g_=(e,t,n={},r,i)=>{let a=Hl.getTime().valueOf(),o="skipped"===r?"skipped":"success",s=/* @__PURE__ */_("span",{children:["Interaction triggered ",
133
+ /* @__PURE__ */I("b",{children:`${e.title} [${e.action}]`}),i?/* @__PURE__ */_(E,{children:[" on ",/* @__PURE__ */I("b",{children:i})]}):null]}),l={status:r,node:e,elementId:e.elementId,hostElementId:i,nodes:{...n,[e.id]:{node:e,status:o,result:void 0,postCallbacks:[],startTime:t,endTime:a}},startTime:t,endTime:a};"failed"!==r?Hl.info("interactions",s,l):Hl.danger("interactions",s,l)},y_=WI,b_=class e{eventBridge;parentManager;childManagers;interactionsData;subscriptors;callbacksAvailables;flowsRunning=/* @__PURE__ */new Map;lastUpdate;listeners=/* @__PURE__ */new Set;constructor(e="",t={},n={}){this.eventBridge=new y_,this.parentManager=void 0,this.childManagers=[],this.subscriptors={},this.callbacksAvailables={},this.interactionsData={currentPageId:e,...t,...n},this.lastUpdate=Date.now()}eventBridgeCallback=e=>async(t,n,r)=>{if(!e||!n||!t)return;let i=this.subscriptors[t];if(await Promise.resolve(),!i||this.subscriptors[t]!==i)return;let a=ar(this.subscriptors,`${t}.getAdditionalParams`,void 0),o=()=>({...this.interactionsData,..."function"==typeof a?a().dataSource:void 0}),s=Object.values(e).filter(e=>"trigger"===e.type&&e.action===n&&e.enabled&&((e,t)=>{if("onKey"===e.action){let{shortcuts:n}=t;return Array.isArray(n)&&n.includes(e.params.keys)}return"onInterval"!==e.action||ha(e.params.interval)===t.interval})(e,r));await Promise.all(s.map(n=>this.runFlow(`${t}.${n.id}`,n.whileRunning??"skip",()=>(async(e,t={},n={},r={},i=h_,a,o=[])=>{let s=Hl.getTime().valueOf(),{action:l,enabled:c,when:u}=e;if(!l||!c||u&&!Oa(u,u_({...i(),...r})))return void g_(e,s,{},"skipped",a);let d=await m_(e,t,n,r,i,o,{},{hostElementId:a});g_(e,s,d,(e=>Object.values(e).some(({status:e})=>"failed"===e)?"failed":"completed")(d),a)})(n,e,this.getCallbacksAvailables(),{[n.id]:r},o,t))))};runFlow(e,t,n){let r=this.flowsRunning.get(e);if("parallel"===t)return n();if(r&&"skip"===t)return Promise.resolve();let i=(r?r.then(n,n):n()).finally(()=>{this.flowsRunning.get(e)===i&&this.flowsRunning.delete(e)});return this.flowsRunning.set(e,i),i}subscribe(e,t={},n={},r={},i){return!(!e||this.subscriptors[e]||(or(this.subscriptors,e,{id:e,triggers:n,getAdditionalParams:i}),this.wire(e,t,n,r),this.touch(),0))}update(e,t={},n={},r={},i){let a=this.subscriptors[e];return!!a&&(a.triggers=n,a.getAdditionalParams=i,this.wire(e,t,n,r),this.touch(),!0)}wire(e,t,n,r){let i=Object.keys(r);i.length>0?this.callbacksAvailables[e]=i.reduce((t,n)=>{let{title:i,callback:a,postCallback:o,params:s,preview:l,type:c}=r[n];return"function"==typeof a?{...t,[n]:{elementId:e,title:i,action:n,type:c,callback:a,postCallback:o,params:s,preview:l}}:t},{}):delete this.callbacksAvailables[e],Object.keys(n).length>0?this.eventBridge.on("interaction",e,this.eventBridgeCallback(t),{override:!0}):this.eventBridge.off("interaction",e)}unsubscribe(e){return!!this.subscriptors[e]&&(this.eventBridge.off("interaction",e),delete this.subscriptors[e],this.callbacksAvailables[e]&&delete this.callbacksAvailables[e],this.touch(),!0)}getRootManager(){return this.parentManager?this.parentManager.getRootManager():this}getSubscriptorInternal(e){let t=ar(this.subscriptors,e);if(!t&&this.childManagers.length>0)for(let n of this.childManagers)if(t=n.getSubscriptorInternal(e),t)break;return t}getSubscriptor(e){return this.parentManager?this.getRootManager()?.getSubscriptorInternal(e):this.getSubscriptorInternal(e)}getCallbacksAvailablesInternal(){let e={};if(this.childManagers.length>0)for(let t of this.childManagers)e={...e,...t.getCallbacksAvailablesInternal()};return{...e,...this.callbacksAvailables}}getCallbacksAvailables(){if(!this.parentManager)return this.getCallbacksAvailablesInternal();let e=[];for(let n=this.parentManager;n;n=n.parentManager)e.unshift(n);let t=this.getRootManager()?.getCallbacksAvailablesInternal()??{};for(let n of e)t={...t,...n.callbacksAvailables};return{...t,...this.getCallbacksAvailablesInternal()}}interactionTrigger(e,t,n={}){if(e)return this.eventBridge.emit("interaction",e,e,t,n)}createChildManager=(t={},n={})=>{let r=new e(this.interactionsData.currentPageId,t,n);return r.parentManager=this,this.childManagers.push(r),r};removeChildManager=e=>{this.childManagers=this.childManagers.filter(t=>t!==e)};onUpdate(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}touch(){let e=Date.now();this.lastUpdate=e;for(let t of this.listeners)t(e)}},v_=({children:e,currentPageId:t,routeParams:n,queryParams:r})=>{let i=k(()=>new b_(t,n,r),[]);i.interactionsData=k(()=>({currentPageId:t,...n,...r}),[t,n,r]);let a=k(()=>({interactionsManager:i,useInteractions:GI}),[i]);/* @__PURE__ */
134
+ return I(hS,{value:a,children:e})},w_={runServerAction:{source:"actions",title:"Run Server Action",strictParams:!0,params:{actionId:{type:"text",description:"Identifier of the server action to run, as the space publishes it.",default:"",required:!0,label:"Action"},input:{type:"json",description:"The values passed to the action, as a JSON object. The server drops every key the action did not declare. Authoring in code, pass a real object rather than a line of JSON text — an interpolated value containing a quote or a newline makes the text unparseable, and unparseable input posts nothing.",default:"{}",label:"Input"},mode:{type:"select",description:"await waits and puts the result in the flow scope; detached carries on immediately and leaves nothing to read; stream reports progress as it goes.",default:"await",options:["await","detached","stream"],optionLabels:{await:"Wait for the result",detached:"Send and continue",stream:"Stream progress"}},idempotencyKey:{type:"text",description:"Makes a repeat of the same intent answer with the first run instead of running again.",default:"",when:e=>"detached"!==e.mode},...XI(["all","elements","none"])},preview:{runId:"",status:"",output:{},reason:"",error:""}},cancelServerAction:{source:"actions",title:"Cancel Server Action",strictParams:!0,params:{runId:{type:"text",description:"The run to cancel — normally `{{ <step>.output.runId }}` from the step that started it.",default:""}},preview:{cancelled:""}}},k_=e=>Array.isArray(e)?e:void 0,x_={status:"failed",reason:"failed",runId:"",output:{}},S_=(e,t)=>e.signal.aborted?{status:"aborted",error:"Cancelled"}:{status:"failed",error:t instanceof Error?t.message:String(t)},T_=(e,t,n)=>{if(401!==e)return;let r=Qr(e,t);r&&Xr({reason:r,url:n})},C_=({children:e})=>{let{useInteractions:t,interactionsManager:n}=f(hS),[r]=Mt("actions.endpoint"),[[i,a]]=Mt(["actions.catalog","actions.available"]),o=h((e,t,r)=>{e&&n.interactionTrigger(e,t,r)},[n]),s=h(async(e,t)=>{let{actionId:n,mode:i="await",idempotencyKey:a}=e;if(!r)return Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
135
+ /* @__PURE__ */I("b",{children:n})," was skipped: this page is served without a Plitzi server"]}),{actionId:n,status:"skipped"}),{status:"skipped",runId:"",output:{}};if(!n)return{status:"skipped",runId:"",output:{}};let s=(e=>{if(!e)return{};if("object"==typeof e)return e;try{let t=JSON.parse(e);return"object"==typeof t&&t?t:{}}catch{return{}}})(e.input),l=JSON.stringify({actionId:n,input:s,...a?{idempotencyKey:a}:{}}),c=(e=>{let t=`run-${rt+=1}`;return it([{...e,id:t,status:"running",startedAt:Date.now(),progress:[],cancellable:!0},...nt.getState().runs].slice(0,100)),t})({actionId:n,mode:i,input:s}),u=new AbortController,d="";(e=>{at.set(e,()=>{u.abort(),ct(c,{status:"aborted",endedAt:Date.now(),cancellable:!1}),d&&fetch(`${r}/run/${d}`,{method:"DELETE",credentials:"same-origin"}).catch(()=>{})})})(c);let p,f=t=>{(e=>{at.delete(e)})(c),ct(c,{endedAt:Date.now(),cancellable:!1,...t}),"completed"===t.status&&RC({mode:e.invalidateQueries,fallback:"all",elements:e.invalidateElements})};if("detached"===i)return Hl.info("actions",/* @__PURE__ */_("span",{children:["Server action ",
136
+ /* @__PURE__ */I("b",{children:n})," sent"]}),{actionId:n,mode:i,status:"accepted"}),fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",keepalive:!0,signal:u.signal,body:l}).then(async e=>{let a=await e.json().catch(()=>({}));if(!e.ok)return T_(e.status,a,r),f({status:"failed",...a.runId?{runId:a.runId}:{},...a.reason?{reason:a.reason}:{},...a.error?{error:a.error}:{},...a.steps?{steps:a.steps}:{}}),void o(t?.hostElementId,"onFlowError",{actionId:n,runId:a.runId??"",error:a.error??"",reason:a.reason??"failed"});f({status:"completed"===a.status?"completed":"accepted",...a.runId?{runId:a.runId}:{},...a.output?{output:a.output}:{},...a.steps?{steps:a.steps}:{},...a.trace?{trace:a.trace}:{}}),Hl.success("actions",/* @__PURE__ */_("span",{children:["Server action ",
137
+ /* @__PURE__ */I("b",{children:n})," finished"]}),{actionId:n,mode:i,runId:a.runId,status:a.status,output:a.output}),o(t?.hostElementId,"onFlowEnd",{actionId:n,runId:a.runId??"",status:a.status??"completed",output:a.output??{}})}).catch(e=>{f(S_(u,e)),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
138
138
  /* @__PURE__ */I("b",{children:n})," could not be sent"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"})}),{accepted:!0,status:"accepted",runId:"",output:{}};if("stream"===i){let a;Hl.info("actions",/* @__PURE__ */_("span",{children:["Server action ",
139
- /* @__PURE__ */I("b",{children:n})," streaming"]}),{actionId:n,mode:i,status:"streaming"});try{a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return f(w_(u,e)),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
140
- /* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),v_}if(!a.ok||!a.body){let e=await a.json().catch(()=>({}));return k_(a.status,e,r),f({status:"failed",...e.runId?{runId:e.runId}:{},...e.reason?{reason:e.reason}:{},...e.error?{error:e.error}:{},...e.steps?{steps:e.steps}:{}}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:e.runId??"",error:e.error??"",reason:e.reason??"failed"}),{status:"failed",reason:e.reason??"failed",runId:"",output:{},...e.error?{error:e.error}:{}}}let s=a.headers.get("X-Plitzi-Run-Id")??"";return d=s,ct(c,{status:"streaming",...s?{runId:s}:{}}),(async(e,t)=>{let n=e.getReader(),r=new TextDecoder,i="";for(;;){let{done:e,value:a}=await n.read();if(e)return;i+=r.decode(a,{stream:!0});let o=i.split("\n\n");i=o.pop()??"";for(let n of o){let e=/event: (\w+)/.exec(n)?.[1];if(!e)continue;let r=n.split("\n").filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trimStart()).join("\n");try{t({event:e,data:r?JSON.parse(r):{}})}catch{}}}})(a.body,e=>{if("data"===e.event)return((e,t)=>{let{runs:n}=nt.getState();it(n.map(n=>n.id===e?{...n,progress:[...n.progress,t].slice(-500)}:n))})(c,e.data.chunk??e.data),void o(t?.hostElementId,"onFlowProgress",{actionId:n,runId:s,...e.data});if("error"===e.event){let r=b_(e.data.steps);return f({status:"failed",..."string"==typeof e.data.reason?{reason:e.data.reason}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),void o(t?.hostElementId,"onFlowError",{actionId:n,runId:s,...e.data})}if("done"===e.event){let r=b_(e.data.steps);f({status:"completed"===e.data.status?"completed":"failed",...e.data.output?{output:e.data.output}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),o(t?.hostElementId,"onFlowEnd",{actionId:n,runId:s,...e.data})}}).catch(e=>{if(u.signal.aborted)return;let r=e instanceof Error?e.message:String(e);f({status:"failed",error:r}),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
141
- /* @__PURE__ */I("b",{children:n})," stopped mid-stream"]}),{actionId:n,mode:i,runId:s,error:r}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:s,error:r,reason:"failed"})}),{accepted:!0,status:"streaming",runId:s,output:{}}}try{p=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return f(w_(u,e)),Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Server action ",
142
- /* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,error:e instanceof Error?e.message:String(e)}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),v_}let h=await p.json().catch(()=>({}));return p.ok?(f({status:"completed"===h.status?"completed":"failed",...h.runId?{runId:h.runId}:{},...h.output?{output:h.output}:{},...h.error?{error:h.error}:{},...h.steps?{steps:h.steps}:{},...h.trace?{trace:h.trace}:{}}),{status:h.status??"completed",runId:h.runId??"",output:h.output??{},...h.error?{error:h.error}:{}}):(k_(p.status,h,r),f({status:"failed",...h.runId?{runId:h.runId}:{},...h.reason?{reason:h.reason}:{},...h.error?{error:h.error}:{},...h.steps?{steps:h.steps}:{}}),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
139
+ /* @__PURE__ */I("b",{children:n})," streaming"]}),{actionId:n,mode:i,status:"streaming"});try{a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return f(S_(u,e)),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
140
+ /* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,mode:i,error:e instanceof Error?e.message:String(e)}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),x_}if(!a.ok||!a.body){let e=await a.json().catch(()=>({}));return T_(a.status,e,r),f({status:"failed",...e.runId?{runId:e.runId}:{},...e.reason?{reason:e.reason}:{},...e.error?{error:e.error}:{},...e.steps?{steps:e.steps}:{}}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:e.runId??"",error:e.error??"",reason:e.reason??"failed"}),{status:"failed",reason:e.reason??"failed",runId:"",output:{},...e.error?{error:e.error}:{}}}let s=a.headers.get("X-Plitzi-Run-Id")??"";return d=s,ct(c,{status:"streaming",...s?{runId:s}:{}}),(async(e,t)=>{let n=e.getReader(),r=new TextDecoder,i="";for(;;){let{done:e,value:a}=await n.read();if(e)return;i+=r.decode(a,{stream:!0});let o=i.split("\n\n");i=o.pop()??"";for(let n of o){let e=/event: (\w+)/.exec(n)?.[1];if(!e)continue;let r=n.split("\n").filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trimStart()).join("\n");try{t({event:e,data:r?JSON.parse(r):{}})}catch{}}}})(a.body,e=>{if("data"===e.event)return((e,t)=>{let{runs:n}=nt.getState();it(n.map(n=>n.id===e?{...n,progress:[...n.progress,t].slice(-500)}:n))})(c,e.data.chunk??e.data),void o(t?.hostElementId,"onFlowProgress",{actionId:n,runId:s,...e.data});if("error"===e.event){let r=k_(e.data.steps);return f({status:"failed",..."string"==typeof e.data.reason?{reason:e.data.reason}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),void o(t?.hostElementId,"onFlowError",{actionId:n,runId:s,...e.data})}if("done"===e.event){let r=k_(e.data.steps);f({status:"completed"===e.data.status?"completed":"failed",...e.data.output?{output:e.data.output}:{},..."string"==typeof e.data.error?{error:e.data.error}:{},...r?{steps:r}:{}}),o(t?.hostElementId,"onFlowEnd",{actionId:n,runId:s,...e.data})}}).catch(e=>{if(u.signal.aborted)return;let r=e instanceof Error?e.message:String(e);f({status:"failed",error:r}),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
141
+ /* @__PURE__ */I("b",{children:n})," stopped mid-stream"]}),{actionId:n,mode:i,runId:s,error:r}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:s,error:r,reason:"failed"})}),{accepted:!0,status:"streaming",runId:s,output:{}}}try{p=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",signal:u.signal,body:l})}catch(e){return f(S_(u,e)),Hl.warning("interactions",/* @__PURE__ */_("span",{children:["Server action ",
142
+ /* @__PURE__ */I("b",{children:n})," could not be reached"]}),{actionId:n,error:e instanceof Error?e.message:String(e)}),o(t?.hostElementId,"onFlowError",{actionId:n,runId:"",error:"",reason:"failed"}),x_}let h=await p.json().catch(()=>({}));return p.ok?(f({status:"completed"===h.status?"completed":"failed",...h.runId?{runId:h.runId}:{},...h.output?{output:h.output}:{},...h.error?{error:h.error}:{},...h.steps?{steps:h.steps}:{},...h.trace?{trace:h.trace}:{}}),{status:h.status??"completed",runId:h.runId??"",output:h.output??{},...h.error?{error:h.error}:{}}):(T_(p.status,h,r),f({status:"failed",...h.runId?{runId:h.runId}:{},...h.reason?{reason:h.reason}:{},...h.error?{error:h.error}:{},...h.steps?{steps:h.steps}:{}}),Hl.warning("actions",/* @__PURE__ */_("span",{children:["Server action ",
143
143
  /* @__PURE__ */I("b",{children:n})," was refused"]}),{actionId:n,mode:i,runId:h.runId,reason:h.reason,error:h.error,status:String(p.status)}),{status:"failed",reason:h.reason??"failed",runId:h.runId??"",output:{},...h.error?{error:h.error}:{}})},[r,o]),l=h(async e=>{if(!r||!e.runId)return{cancelled:!1};try{let t=204===(await fetch(`${r}/run/${e.runId}`,{method:"DELETE",credentials:"same-origin"})).status;return Hl.info("actions",/* @__PURE__ */_("span",{children:["Server action run ",
144
- /* @__PURE__ */I("b",{children:e.runId})," ",t?"cancelled":"was not cancelled"]}),{actionId:"",mode:"cancel",runId:e.runId,status:t?"aborted":"failed"}),{cancelled:t}}catch{return{cancelled:!1}}},[r]),c=k(()=>(i??[]).map(e=>({label:`${e.name} (${e.identifier})`,value:e.identifier})),[i]);return t({id:"actions",callbacks:k(()=>yd(y_,{cancelServerAction:l,runServerAction:s},{runServerAction:{params:e=>{let t=md(y_.runServerAction.params),n=(i??[]).find(t=>t.identifier===e.actionId),r=Object.entries(n?.input??{});return{...t,actionId:{...t.actionId,type:()=>c.length>0?"select":"text",canBind:!0,label:!1===a?"Action — this space has no server to run it":"Action",options:c},input:{...t.input,canBind:!0,label:r.length>0?`Input — ${r.map(([e,t])=>`${e}${t.required?"*":""}: ${t.type}`).join(", ")}`:"Input"}}}}}),[s,l,c,i,a])}),e},S_={login:{source:"auth",title:"Auth Login",strictParams:!0,params:{mode:{type:"select",description:"Credentials to sign in with: a username and password, or a token obtained elsewhere.",default:"normal",options:["normal","token","mfa"],optionLabels:{normal:"User and Password",token:"Token",mfa:"Second factor"},canBind:!1},username:{type:"text",description:"Username.",default:"",when:e=>"normal"===e.mode},password:{type:"text",description:"Password.",default:"",when:e=>"normal"===e.mode},token:{type:"text",description:"A token to exchange for a session.",default:"",when:e=>"token"===e.mode},mfaToken:{type:"text",description:"The challenge a sign-in answered with when it owed a second factor: `{{ login.mfaToken }}`.",default:"",when:e=>"mfa"===e.mode},code:{type:"text",description:"The code from the authenticator app, or a recovery code.",default:"",when:e=>"mfa"===e.mode}},preview:{ok:"",reason:"",mfaToken:"",errors:{username:"",password:"",token:""},accessToken:"",expiresAt:"",refreshToken:""}},refreshDetails:{source:"auth",title:"Auth Refresh Details",strictParams:!0,params:{},preview:{errors:"",accessToken:"",expiresAt:"",refreshToken:""}},logout:{source:"auth",title:"Auth Logout",strictParams:!0,params:{}}},T_=({children:e,authProvider:t="basic"})=>{let{login:n,refresh:r,logout:i}=f(Yx),{useInteractions:a}=f(dS),o=h(e=>n(e),[n]),s=h(e=>r(e),[r]),l=h(()=>i(),[i]);return a({id:"auth",callbacks:k(()=>""===t?{}:yd(S_,{login:o,refreshDetails:s,logout:l}),[o,l,s,t])}),e},C_={hostAction:{source:"host",title:"Host Action",strictParams:!0,params:{action:{type:"text",description:"The name the host registered the handler under — `openSpace`, `signOut`, whatever it offers.",default:""},value:{type:"scalar",description:"What the action is about: the space to open, the workspace to switch to. Optional.",default:""}}}},A_=({children:e,actions:t})=>{let{useInteractions:n}=f(dS),r=h(e=>{let{action:n,value:r}=e,i=n?t?.[n]:void 0;i&&i({...e,value:r})},[t]);return n({id:"host",callbacks:k(()=>yd(C_,{hostAction:r}),[r])}),e},E_={navigate:{source:"navigation",title:"Navigate",strictParams:!0,params:{urlType:{type:"select",description:"Target kind: a space page, an internal space path, or an external URL.",options:["page","internal","external"],optionLabels:{page:"Space Page",internal:"Inside Space",external:"Outside Space"}},url:{type:"text",description:'Destination — a page id when urlType is "page", otherwise a URL/path.',when:e=>!!e.urlType,builderType:e=>"page"===e.urlType?"select":"text"}}}},I_=({children:e,previewMode:t=!1})=>{let{useInteractions:n}=f(dS),[[r,i,a]]=zt(["schema.pages","pageDefinitions","navigation.navigate"]),o=k(()=>{let e=sr(i,r);return Object.keys(e).reduce((t,n)=>{let r=e[n];return[...t,{key:n,label:ar(r,"attributes.name",n),defaultPage:ar(r,"attributes.default",!1)}]},[])},[i,r]),s=h(e=>{if(!t)return;let{url:n,urlType:r}=e;"page"===r||"internal"===r?a(n):a(n,!0)},[a,t]);return n({id:"navigation",callbacks:k(()=>{let{urlType:e,url:t}=md(E_.navigate.params);return yd(E_,{navigate:s},{navigate:{params:{urlType:e,url:{...t,defaultValue:o.find(e=>e.defaultPage)?.key??"",options:o.map(e=>({value:e.key,label:e.label}))}}}})},[s,o])}),e},__={invalidateQueries:{source:"queries",title:"Invalidate Queries",strictParams:!0,params:{elements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id — the way to name a request whose URL is a template. Leave both this and `url` empty to refresh every cached request on the page.",default:[],label:"Containers (ids)"},url:{type:"text",description:"Only the requests whose URL starts with this — `/api/orders` covers `/api/orders?page=2`. With `elements` too, a request must match both.",default:"",label:"URL prefix"}},preview:{}}},O_=({children:e})=>{let{useInteractions:t}=f(dS),n=h(e=>MC({url:e.url??"",elements:OC(e.elements)}),[]);return t({id:"queries",callbacks:k(()=>yd(__,{invalidateQueries:n}),[n])}),e},N_={setState:{source:"state",title:"Set State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to set. Stored under `runtime.state.<key>`.",default:""},type:{type:"select",description:'The value type. What is stored is coerced to it — a boolean is a real boolean, not "true"; `json` stores an object or a list (a template naming one, or JSON text).',options:["boolean","number","text","json"],optionLabels:{boolean:"True / False",number:"Numeric",text:"Text",json:"Object / List (JSON)"}},value:{type:"json",description:"The value to store — its type follows the `type` param (a real boolean/number, text, or an object/list).",when:e=>!!e.type,builderType:e=>"boolean"===e.type?"select":"text",options:["true","false"]}}},toggleState:{source:"state",title:"Toggle State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to flip, under `runtime.state.<key>`. Anything not already true is treated as false, so a key that has never been set toggles to true.",default:""}}},appendState:{source:"state",title:"Append To State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`. Created if it is not there.",default:""},value:{type:"scalar",description:"What to add to the end of the list.",default:""},unique:{type:"boolean",description:"Skip the append when the list already holds this value. For a list whose entries are their own identity — anything referring to one refers to it by value, so a second copy is indistinguishable.",default:!1},withId:{type:"boolean",description:"Store the entry as `{ id, value }` with an id of its own, so two entries that read the same are still two entries. Anything reading one back names `.value`; anything referring to one names `.id`.",default:!1}}},removeState:{source:"state",title:"Remove From State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry to drop, by value — every copy of it. Prefer this wherever the list can change under the person: a position is only true until something before it moves.",default:""},by:{type:"text",description:"The FIELD carrying the identity, for a list of records rather than of scalars — `id` for entries appended with `withId`. Without it the whole entry is compared, which never matches a record.",default:""},index:{type:"text",description:"Which entry to drop, by position, when there is no value to go on. Inside a controlled list, `{{ <listSource>.index }}` is the row own position. An index that resolves to nothing removes nothing.",default:""}}},moveState:{source:"state",title:"Move Between Lists",strictParams:!0,params:{from:{type:"text",description:"The list to take it out of, under `runtime.state.<key>`.",default:""},to:{type:"text",description:"The list to put it into. It is not added twice.",default:""},value:{type:"scalar",description:"The entry to move. Absent from `from` means nothing happens.",default:""}}},toggleInState:{source:"state",title:"Toggle In List",strictParams:!0,params:{key:{type:"text",description:"The list to add to or drop from, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry the box stands for.",default:""}}},clearState:{source:"state",title:"Clear State",strictParams:!0,params:{key:{type:"text",description:"The list to empty, under `runtime.state.<key>`. Left blank it empties EVERYTHING the space is keeping — which on a page that holds notes beside a list means losing the notes to clear the list.",default:""}}}},M_=0,P_=({children:e})=>{let{useInteractions:t}=f(dS),n=Dt(),r=h(e=>{let{key:t,type:r}=e,i=e.value;if("boolean"===r)i=!0===i||"true"===i;else if("number"===r)i="number"==typeof i?i:parseFloat(String(i));else if("json"===r)return void n(`runtime.state.${t}`,((e,t)=>{if("string"!=typeof t)return t;try{return JSON.parse(t)}catch{throw Error(`setState "${e}" is typed json, and its value is not JSON: ${t.slice(0,80)}`)}})(t,i));n(`runtime.state.${t}`,i)},[n]),i=h(e=>{let{key:t}=e;t&&n(`runtime.state.${t}`,e=>!0!==e&&"true"!==e)},[n]),a=e=>!0===e||"true"===e,o=h(e=>{let{key:t,value:r,unique:i,withId:o}=e;t&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a(o)?[...t,{id:typeof crypto<"u"&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`e${++M_}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,value:r}]:a(i)&&t.includes(r)?t:[...t,r]})},[n]),s=h(e=>{let{key:t,index:r,value:i,by:a}=e;if(!t)return;if(void 0!==i&&""!==i)return void n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter(e=>a?e?.[a]!==i:e!==i):[]);let o="number"==typeof r?r:parseInt(r??"",10);Number.isNaN(o)||n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter((e,t)=>t!==o):[])},[n]),l=h(e=>{let{from:t,to:r,value:i}=e;if(!t||!r||void 0===i||""===i)return;let a={moved:!1};n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a.moved=t.includes(i),a.moved?t.filter(e=>e!==i):t}),a.moved&&n(`runtime.state.${r}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(i)?t:[...t,i]})},[n]),c=h(e=>{let{key:t,value:r}=e;t&&void 0!==r&&""!==r&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(r)?t.filter(e=>e!==r):[...t,r]})},[n]),u=h(e=>{let{key:t}=e;n(t?`runtime.state.${t}`:"runtime.state",t?[]:{})},[n]);return t({id:"state",callbacks:k(()=>yd(N_,{setState:r,toggleState:i,appendState:o,removeState:s,moveState:l,toggleInState:c,clearState:u}),[r,i,o,s,l,c,u])}),e},L_=({children:e,hostActions:t})=>{let[[n="basic",r,i,a]]=zt(["schema.settings.userProvider","navigation.routeParams","navigation.queryParams","navigation.currentPageId"]),{previewMode:o}=X();/* @__PURE__ */
145
- return I(g_,{currentPageId:a,routeParams:r,queryParams:i,children:/* @__PURE__ */I(T_,{authProvider:n,children:/* @__PURE__ */I(P_,{children:/* @__PURE__ */I(x_,{children:/* @__PURE__ */I(O_,{children:/* @__PURE__ */I(I_,{previewMode:o,children:/* @__PURE__ */I(A_,{actions:t,children:e})})})})})})})},D_=W("StyleContext",{}),z_=({children:e,style:t})=>{let{style:n}=f(Ic),r=k(()=>({}),[]);return qt("style",t??(n||cc)),/* @__PURE__ */I(D_,{value:r,children:e})},R_="/plitzi-sdk.css",j_=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:a,isHydrating:o=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d=J.renderMode,sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:h,previewMode:m=!0,debugMode:y=!1,overQuota:b=!1,analytics:v,onInitEventBridge:w,hostData:x,hostActions:T,flags:C,serverFlags:A,forcedFlags:E,onInitStateManager:O,...N})=>{const M=f(mt),[P,L]=S(!o);g(()=>L(!0),[]),Rt(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota"],[m,y,d,r,o,P,b]),Rt(["runtime.host"],[x]),Rt(["flags.overrides.server","flags.overrides.sdk","flags.overrides.qa"],[ic(A),ic(C),E]);const D=k(()=>M?.withBase("runtime.state"),[M]),z=k(()=>({get state(){return D?.getState()??{}},setState:e=>D?.setState(void 0,e),setStateByKey:(e,t)=>D?.setState(e,t),clearState:()=>D?.setState(void 0,{}),subscribe:e=>D?D.subscribe(()=>e(D.getState()??{})):()=>{}}),[D]);return g(()=>{O?.(z)},[O,z]),/* @__PURE__ */I(aS,{webKey:t,webId:n,instanceId:u,server:a,offlineMode:s,offlineData:l,offlineDataType:c,revision:e,children:/* @__PURE__ */I(lS,{children:/* @__PURE__ */I(sS,{sdkStylePath:R_,children:/* @__PURE__ */I(z_,{children:/* @__PURE__ */I(UI,{onInit:w,debugMode:y,children:/* @__PURE__ */I(pI,{server:a,children:/* @__PURE__ */_(eS,{currentPageId:i,children:[/* @__PURE__ */I(Kx,{analytics:v}),/* @__PURE__ */I(qI,{children:/* @__PURE__ */I(L_,{hostActions:T,children:/* @__PURE__ */I(FI,{enabled:y,instanceId:u,devToolsStyleLink:h||"/plitzi-sdk-devtools.css",renderMode:"shadow",scroll:"document",qa:!0,innerClassName:U({flex:"iframe"===d}),children:/* @__PURE__ */I(YE,{sdkStylePath:R_,server:a,...N})})})})]})})})})})})})},$_=({scope:e,theme:t,children:n})=>{const[[r="system"]]=zt(["style.theme.default"]);/* @__PURE__ */
146
- return I(Wc,{defaultTheme:r,scope:e,theme:t,children:n})},F_=({className:e,scoped:t=!1,children:n})=>{const{theme:r}=Gc(),[[i=!1]]=zt(["render.hydrated"]);/* @__PURE__ */
147
- return I(uS,{className:U(e,t&&"system"!==r&&r),"data-hydrated":i?"":void 0,children:n})},q_=/* @__PURE__ */$({ComponentHelper_exports:()=>B_,getPlugins:()=>U_,nestedInject:()=>W_,processLocalCustomPlugins:()=>V_,processLocalPlugins:()=>H_}),B_=/* @__PURE__ */vS({getPlugins:()=>U_,nestedInject:()=>W_,processLocalCustomPlugins:()=>V_,processLocalPlugins:()=>H_}),U_=e=>{let t={};if(!e)return t;t[e.type]=e;let{plugins:n}=e;return n&&Object.keys(n).length>0&&Object.keys(n).forEach(e=>{Object.assign(t,U_(n[e]))}),t},H_=e=>{let t={};return e&&Object.values(e).forEach(e=>{e.type&&Object.assign(t,U_(e))}),t},W_=(e,t)=>{if(!e)return{};let n={};return Object.keys(e).forEach(r=>{let i=e[r],{version:a,pluginSettings:o,initialItems:s,plugins:l,extraProps:c}=i;n[r]=ld(i),n[r].origin=t,n[r].version=a,n[r].type=r,n[r].initialItems=s,n[r].pluginSettings=o,n[r].extraProps=c,n[r].plugins=W_(l,t)}),n},V_=e=>{let t={};return e&&Object.values(e).forEach(e=>{if(!e.type)return;let{type:n,pluginSettings:r,version:i,initialItems:a,plugins:o,assets:s,content:l,extraProps:c}=e,u=ld(e);u.version=i,u.type=n,u.assets=s,u.initialItems=a,u.pluginSettings=r,u.origin="local-custom",u.content=l,u.extraProps=c,u.plugins=W_(o,"local-custom"),Object.assign(t,U_(u))}),t},G_=p(({plitziJsxSkipHOC:e=!0,as:t="",internalProps:n,children:r,...i})=>{let{contexts:{PluginsContext:a}}=sc(),{components:o}=f(jr),{plugins:s}=f(a),l=t?o.current[t]:void 0,c=k(()=>l?void 0:Ur({type:t,plugins:s}),[l,s,t]);return t?!l&&c?/* @__PURE__ */I(Br,{internalProps:n,url:c.url,type:t,plitziJsxSkipHOC:e,plitziJsxProps:i}):(l||=JT,/* @__PURE__ */I(l,{plitziJsxSkipHOC:e,...i,internalProps:n,children:r})):null}),K_=e=>{let[t]=Mt(`runtime.sources.flags.${e}`);return!0===t},Y_={dropdown:GS,notFound:XT,loading:GT,custom:CS,reference:zS,blockHtml:kS,nodeHtml:ES,blockJsx:SS,page:tC,container:bA,layoutContainer:WT,dialogContainer:xA,modalContainer:MA,tabContainer:HA,carousel:mA,heading:YS,image:dC,video:vC,embed:rC,svg:yC,fontAwesome:aC,button:FS,paragraph:nT,text:dT,themeToggle:vT,list:_A,link:ZS,markdown:eT,richText:cT,pagination:DA,form:ST,formControl:BT,apiContainer:FC,channel:QC},J_=({localComponents:e,localCustomComponents:t,children:n})=>{let r=k(()=>({...H_(Y_),...H_(e),...V_(t)}),[e,t]),i=x({}),a=k(()=>({current:{...i.current,...r}}),[r]),o=h((e=[],t=!1)=>{if("string"==typeof e&&!t)return a.current[e];if("string"==typeof e&&t){let t=a.current[e];return t?{[e]:t,...pr(U_(t),[e])}:{}}let n={};return e.forEach(e=>{let r=a.current[e];r&&(t?n={...n,...pr(U_(r),[e])}:n[e]=r)}),n},[a]),s=h((e=[])=>{let t={};return Array.isArray(e)||(e=[e]),e.forEach(e=>{e.type&&!a.current[e.type]&&(t={...t,[e.type]:e,...U_(e)})}),0===Object.keys(t).length||(a.current={...i.current,...t,...r},i.current={...i.current,...t}),t},[a,r]),l=h(e=>{if(!e)return[];Array.isArray(e)||(e=[e]);let t=e;return e.forEach(e=>{let n=o([e],!0);Object.keys(n).length>0&&(t=[...t,...Object.keys(pr(n,e))])}),a.current={...pr(i.current,t),...r},i.current=pr(i.current,t),t},[a,o,r]),c=x(Object.keys(a.current).reduce((e,t)=>{let n=ar(a.current,t,void 0);return n&&n.content?{...e,[t]:{...n.content,initialItems:n.initialItems}}:e},{})),u=h(e=>{c.current={...c.current,...e}},[]),d=h(e=>{let t=ar(c.current,`${e}.builder.pluginChildren`,[]);c.current=pr(c.current,[e,...t])},[]),p=k(()=>({components:a,componentDefinitions:c,getComponent:o,register:s,unregister:l,unregisterDefinition:d,registerDefinition:u}),[a,s,l,u,d,o]);/* @__PURE__ */
148
- return I(jr,{value:p,children:n})},X_=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),Z_={Button:ys,ContentEditable:Bp,Input:Cs,Heading:Hp,ContainerResizable:Pp,ContainerCollapsable:Np,Text:Fw,Markdown:zw,ContainerTabs:Fp},Q_=({className:e="min-h-screen",children:t,webKey:r="",server:a,renderMode:o=J.renderMode,routing:s="browser",debugMode:l=!1,themeScope:c="document",theme:d,state:p,forcedFlags:f,...m})=>{const y=k(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}let n=Number(ar(t,"sub",0));return Number.isInteger(n)&&n>0?n:0}(r),[r]),b=x(p).current,v=k(()=>({runtime:{sources:{},state:b??{}},render:J}),[b]),w=k(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[T,C]=S(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(w)),A=l&&T,[E]=S(()=>f||!l||"undefined"==typeof window?f:((e,t)=>(e=>e?Object.fromEntries(e.split(",").map(e=>e.split(":")).filter(([e,t])=>Yl(e)&&("1"===t||"0"===t)).map(([e,t])=>[e,"1"===t])):{})(si(e,Jl(t))))(li(),window.location.host)),_=k(()=>X_(a),[a]);g(()=>{},[]);const O=h(()=>{const e=!T;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(w,e),C(e)},[w,T]);(({authorized:e,onToggle:t})=>{const n=h(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);g(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:l,onToggle:O}),g(()=>{},[l,T,w]),g(()=>{if(A)return window.plitziTracing={lastCommitId:od.lastCommitId,commitsSince:od.commitsSince},()=>{delete window.plitziTracing}},[A]),g(()=>{m.isHydrating&&od.setHydrated()},[m.isHydrating]);const N=k(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==BE)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&_.requestUrl;const M="widget"===o?i:"undefined"==typeof window?$x:"memory"===s?lx:Mx,P="widget"===o?{}:{..."memory"===s&&"undefined"!=typeof window?{}:{basename:ar(_,"basePath","/"),location:"undefined"==typeof window?_.requestUrl??"":void 0}};/* @__PURE__ */
149
- return I(At,{value:v,middlewares:[me(Wl("sdk")),vu(y),...A?[()=>({onChange:e=>od.recordStoreChange(e)}),pe({shouldRecord:e=>!(e?.startsWith("runtime.elements")||e?.startsWith("rsc")||e?.startsWith("theme")||e?.startsWith("flags"))})]:[]],children:/* @__PURE__ */I($_,{scope:c,theme:d,children:/* @__PURE__ */I($w,{components:Z_,children:/* @__PURE__ */I(F_,{scoped:"container"===c,className:U("plitzi-sdk flex",e,{"sdk-debug-mode":A}),children:/* @__PURE__ */I(xp,{children:/* @__PURE__ */I(M,{...P,children:/* @__PURE__ */I(J_,{localCustomComponents:N,localComponents:tO,children:/* @__PURE__ */I(j_,{server:_,webKey:r,renderMode:o,debugMode:A,webId:y,forcedFlags:E,...m})})})})})})})})},eO=ld(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:a}}=sc(),{server:o}=f(a);/* @__PURE__ */
150
- return I(Ud,{ref:e,className:U("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!i}),children:n&&/* @__PURE__ */I(Q_,{webKey:n,environment:r,renderMode:"widget",server:o,className:"h-full w-full"})})}),tO={plitziSdk:Object.assign(eO,{type:"plitziSdk",content:{attributes:{spaceId:"",spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",type:"plitziSdk",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */I(q,{})},defaultStyle:{name:"Plitzi Sdk",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}})},nO=class extends Error{stage;log;constructor(e,t){super(`${"link"===e?"program failed to link":`${e} shader failed`}: ${t.trim()||"no log given"}`),this.name="ShaderError",this.stage=e,this.log=t}},rO=(e,t,n)=>{let r=e.createShader("vertex"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(!r)throw new nO(t,"the context made no shader (it is lost)");if(e.shaderSource(r,n),e.compileShader(r),!0!==e.getShaderParameter(r,e.COMPILE_STATUS)){let n=e.getShaderInfoLog(r)??"";throw e.deleteShader(r),new nO(t,n)}return r},iO=(e,{vertex:t,fragment:n})=>{let r=rO(e,"vertex",t),i=rO(e,"fragment",n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),e.deleteShader(r),e.deleteShader(i),!0!==e.getProgramParameter(a,e.LINK_STATUS)){let t=e.getProgramInfoLog(a)??"";throw e.deleteProgram(a),new nO("link",t)}return a},aO="(prefers-reduced-motion: reduce)",oO=()=>"function"==typeof window.matchMedia&&window.matchMedia(aO).matches||document.documentElement.classList.contains("plitzi-reduced-motion"),sO=e=>{let t="function"==typeof window.matchMedia?window.matchMedia(aO):void 0;t?.addEventListener("change",e);let n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t?.removeEventListener("change",e),n.disconnect()}},lO=()=>T(sO,oO,()=>!1),cO=e=>(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),uO=()=>"hidden"!==document.visibilityState,dO=(e,{paused:t=!1,fps:n,target:r}={})=>{let i=sc().settings.previewMode??!0,a=lO(),o=T(cO,uO,()=>!1),s=(e=>{let[t,n]=S(!0);return g(()=>{let t=e?.current;if(!t||typeof IntersectionObserver>"u")return;let r=new IntersectionObserver(e=>n(e.some(e=>e.isIntersecting)));return r.observe(t),()=>r.disconnect()},[e]),t})(r),l=i&&!a&&!t&&o&&s,c=x(e);g(()=>{c.current=e},[e]);let u=x({time:0,frame:0});return g(()=>{if(!l)return;let e,t=n&&n>0?1e3/n:0,r=0,i=0,a=n=>{let o=void 0===e?0:n-e;if(e=n,i+=o,i>=t){let e=t>0?i:o;i=t>0?i%t:0,u.current={time:u.current.time+e,frame:u.current.frame+1},c.current({...u.current,delta:e})}r=requestAnimationFrame(a)};return r=requestAnimationFrame(a),()=>cancelAnimationFrame(r)},[l,n]),{running:l}},pO=(e,{setup:t,draw:n,maxPixelRatio:r=2,paused:i,fps:a})=>{let o=(e=>`[plugin ${e?.definition?.type??"canvas"}${e?.id?` "${e.id}"`:""}]`)(f(V)),s=x(null),[l,c]=S(null),[u,d]=S({width:0,height:0,pixelRatio:1}),[p,m]=S(),[y,b]=S(!1),[v,w]=S(0),k=x(null),T=x({acquire:e,setup:t,draw:n});g(()=>{T.current={acquire:e,setup:t,draw:n}},[e,t,n]);let C=h(e=>{let t=e instanceof Error?e.message:String(e);console.error(`${o} ${t}`),m(t)},[o]),A=h(e=>{s.current=e,c(e)},[]);g(()=>{if(!l)return;let e=()=>{let e=l.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,r);l.width=Math.max(1,Math.round(e.width*t)),l.height=Math.max(1,Math.round(e.height*t)),d({width:e.width,height:e.height,pixelRatio:t})};if(e(),typeof ResizeObserver>"u")return;let t=new ResizeObserver(e);return t.observe(l),()=>t.disconnect()},[l,r]),g(()=>{if(!l)return;let e=e=>{e.preventDefault(),k.current=null,b(!1)},t=()=>w(e=>e+1);return l.addEventListener("webglcontextlost",e),l.addEventListener("webglcontextrestored",t),()=>{l.removeEventListener("webglcontextlost",e),l.removeEventListener("webglcontextrestored",t)}},[l]),g(()=>{if(l&&0!==u.width&&void 0===p)try{let e=T.current.acquire(l);if(!e)return void C(/* @__PURE__ */Error("the browser gave no drawing context (WebGL may be off)"));e.prepare(u);let t=T.current.setup?T.current.setup(e.context,u):void 0;k.current={handle:e,state:t}}catch(nO){C(nO)}},[l,u,v,p,C]);let E=h(e=>{let t=k.current;if(t&&void 0===p)try{t.handle.prepare(u),T.current.draw(t.handle.context,{...e,...u,state:t.state}),b(!0)}catch(e){k.current=null,C(e)}},[u,p,C]),{running:I}=dO(E,{paused:i||void 0!==p,fps:a,target:s});return g(()=>{!I&&u.width>0&&E({time:0,delta:0,frame:0})},[I,u,v,E]),{ref:A,ready:y,error:p,running:I}},fO=({attributes:e,...t})=>pO(h(t=>{let n=t.getContext("2d",e);return n&&{context:n,prepare:({pixelRatio:e})=>n.setTransform(e,0,0,e,0,0)}},[e]),t),hO=({attributes:e,...t})=>pO(h(t=>{let n=t.getContext("webgl",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),mO=({attributes:e,...t})=>pO(h(t=>{let n=t.getContext("webgl2",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t);Promise.resolve({ });function gO(e,t={},n={},r=!1,i=!1){const{actionRuns:a,styleCacheInDocument:o,...s}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=X_(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),l="undefined"!=typeof document?document.getElementById(e):void 0,c=o?((e,t)=>{const{offlineData:n}=e;if(!n||!t)return e;const r=(e=>{let t=e.querySelector('style[data-id="plitzi-runtime-style"]')?.textContent??"",n=t.indexOf(wc),r=t.indexOf(kc,n);if(!(n<0||r<0))return t.slice(n+22,r)})(t);return void 0===r?(console.error("[plitzi] The server-rendered stylesheet is missing from the page: it renders without its styles."),e):{...e,offlineData:{...n,style:{...n.style,cache:r}}}})(s,l):s,u=c.debugMode??r;u&&a?.length&&lt(a);const d=({isHydrating:e=!1})=>{const[t,r]=S(!e);g(()=>r(!0),[]);const i=Object.keys(n).filter(e=>t||!n[e].clientOnly);u||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const a=h(e=>{GE=e},[]),o=h(e=>{KE=e},[]);/* @__PURE__ */
151
- return I(Q_,{...c,debugMode:u,isHydrating:e,onInitStateManager:a,onInitEventBridge:o,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */I(YE.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})};if(!l)return;const p=i?A(l,/* @__PURE__ */I(d,{isHydrating:!0})):C(l);return i||p.render(/* @__PURE__ */I(d,{})),{unmount:()=>p.unmount()}}var yO=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a=J.renderMode,...o})=>/* @__PURE__ */I(Q_,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});yO.Plugin=YE.Plugin;var bO=sc,vO="0.38.3",wO=()=>GE,kO=()=>KE;export{Mt as A,ma as C,jr as ComponentContext,J_ as ComponentProvider,Dr as D,$r as E,et as F,tt as I,G_ as JsxManager,Oe as L,mt as M,dt as N,hr as O,ot as P,lc as PlitziServiceProvider,IS as PluginManager,Br as PluginRemote,ue as R,_S as ReplicaProvider,Ud as RootElement,Ma as S,nO as ShaderError,pa as T,Xl as _,AC as a,As as b,Cy as c,iO as createShaderProgram,Mp as d,yO as default,Bd as f,Ac as g,kO as getEventBridge,wO as getStateManager,Gc as h,yI as i,vt as j,ar as k,qp as l,ju as m,_I as n,oS as o,od as p,OI as r,gO as render,Oy as s,tO as sdkComponents,zI as t,Gx as track,Dp as u,dO as useAnimationFrame,fO as useCanvas2d,YC as useChannel,cd as useElement,K_ as useFlag,bO as usePlitziServiceContext,lO as useReducedMotion,kC as useRscData,su as useRscRefresh,zt as useStore,hO as useWebGL,mO as useWebGL2,Zl as v,vO as version,fa as w,ld as withElement,bs as x,ql as y,U as z};
144
+ /* @__PURE__ */I("b",{children:e.runId})," ",t?"cancelled":"was not cancelled"]}),{actionId:"",mode:"cancel",runId:e.runId,status:t?"aborted":"failed"}),{cancelled:t}}catch{return{cancelled:!1}}},[r]),c=k(()=>(i??[]).map(e=>({label:`${e.name} (${e.identifier})`,value:e.identifier})),[i]);return t({id:"actions",callbacks:k(()=>yd(w_,{cancelServerAction:l,runServerAction:s},{runServerAction:{params:e=>{let t=md(w_.runServerAction.params),n=(i??[]).find(t=>t.identifier===e.actionId),r=Object.entries(n?.input??{});return{...t,actionId:{...t.actionId,type:()=>c.length>0?"select":"text",canBind:!0,label:!1===a?"Action — this space has no server to run it":"Action",options:c},input:{...t.input,canBind:!0,label:r.length>0?`Input — ${r.map(([e,t])=>`${e}${t.required?"*":""}: ${t.type}`).join(", ")}`:"Input"}}}}}),[s,l,c,i,a])}),e},A_={login:{source:"auth",title:"Auth Login",strictParams:!0,params:{mode:{type:"select",description:"Credentials to sign in with: a username and password, or a token obtained elsewhere.",default:"normal",options:["normal","token","mfa"],optionLabels:{normal:"User and Password",token:"Token",mfa:"Second factor"},canBind:!1},username:{type:"text",description:"Username.",default:"",when:e=>"normal"===e.mode},password:{type:"text",description:"Password.",default:"",when:e=>"normal"===e.mode},token:{type:"text",description:"A token to exchange for a session.",default:"",when:e=>"token"===e.mode},mfaToken:{type:"text",description:"The challenge a sign-in answered with when it owed a second factor: `{{ login.mfaToken }}`.",default:"",when:e=>"mfa"===e.mode},code:{type:"text",description:"The code from the authenticator app, or a recovery code.",default:"",when:e=>"mfa"===e.mode}},preview:{ok:"",reason:"",mfaToken:"",errors:{username:"",password:"",token:""},accessToken:"",expiresAt:"",refreshToken:""}},refreshDetails:{source:"auth",title:"Auth Refresh Details",strictParams:!0,params:{},preview:{errors:"",accessToken:"",expiresAt:"",refreshToken:""}},logout:{source:"auth",title:"Auth Logout",strictParams:!0,params:{}}},E_=({children:e,authProvider:t="basic"})=>{let{login:n,refresh:r,logout:i}=f(Zx),{useInteractions:a}=f(hS),o=h(e=>n(e),[n]),s=h(e=>r(e),[r]),l=h(()=>i(),[i]);return a({id:"auth",callbacks:k(()=>""===t?{}:yd(A_,{login:o,refreshDetails:s,logout:l}),[o,l,s,t])}),e},I_={hostAction:{source:"host",title:"Host Action",strictParams:!0,params:{action:{type:"text",description:"The name the host registered the handler under — `openSpace`, `signOut`, whatever it offers.",default:""},value:{type:"scalar",description:"What the action is about: the space to open, the workspace to switch to. Optional.",default:""}}}},__=({children:e,actions:t})=>{let{useInteractions:n}=f(hS),r=h(e=>{let{action:n,value:r}=e,i=n?t?.[n]:void 0;i&&i({...e,value:r})},[t]);return n({id:"host",callbacks:k(()=>yd(I_,{hostAction:r}),[r])}),e},O_={navigate:{source:"navigation",title:"Navigate",strictParams:!0,params:{urlType:{type:"select",description:"Target kind: a space page, an internal space path, or an external URL.",options:["page","internal","external"],optionLabels:{page:"Space Page",internal:"Inside Space",external:"Outside Space"}},url:{type:"text",description:'Destination — a page id when urlType is "page", otherwise a URL/path.',when:e=>!!e.urlType,builderType:e=>"page"===e.urlType?"select":"text"}}}},N_=({children:e,previewMode:t=!1})=>{let{useInteractions:n}=f(hS),[[r,i,a]]=zt(["schema.pages","pageDefinitions","navigation.navigate"]),o=k(()=>{let e=sr(i,r);return Object.keys(e).reduce((t,n)=>{let r=e[n];return[...t,{key:n,label:ar(r,"attributes.name",n),defaultPage:ar(r,"attributes.default",!1)}]},[])},[i,r]),s=h(e=>{if(!t)return;let{url:n,urlType:r}=e;"page"===r||"internal"===r?a(n):a(n,!0)},[a,t]);return n({id:"navigation",callbacks:k(()=>{let{urlType:e,url:t}=md(O_.navigate.params);return yd(O_,{navigate:s},{navigate:{params:{urlType:e,url:{...t,defaultValue:o.find(e=>e.defaultPage)?.key??"",options:o.map(e=>({value:e.key,label:e.label}))}}}})},[s,o])}),e},M_={invalidateQueries:{source:"queries",title:"Invalidate Queries",strictParams:!0,params:{elements:{type:"elementIds",elementType:"apiContainer",description:"The api containers to refresh, by element id — the way to name a request whose URL is a template. Leave both this and `url` empty to refresh every cached request on the page.",default:[],label:"Containers (ids)"},url:{type:"text",description:"Only the requests whose URL starts with this — `/api/orders` covers `/api/orders?page=2`. With `elements` too, a request must match both.",default:"",label:"URL prefix"}},preview:{}}},P_=({children:e})=>{let{useInteractions:t}=f(hS),n=h(e=>DC({url:e.url??"",elements:PC(e.elements)}),[]);return t({id:"queries",callbacks:k(()=>yd(M_,{invalidateQueries:n}),[n])}),e},L_={setState:{source:"state",title:"Set State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to set. Stored under `runtime.state.<key>`.",default:""},type:{type:"select",description:'The value type. What is stored is coerced to it — a boolean is a real boolean, not "true"; `json` stores an object or a list (a template naming one, or JSON text).',options:["boolean","number","text","json"],optionLabels:{boolean:"True / False",number:"Numeric",text:"Text",json:"Object / List (JSON)"}},value:{type:"json",description:"The value to store — its type follows the `type` param (a real boolean/number, text, or an object/list).",when:e=>!!e.type,builderType:e=>"boolean"===e.type?"select":"text",options:["true","false"]}}},toggleState:{source:"state",title:"Toggle State",strictParams:!0,params:{key:{type:"text",description:"The state key/path to flip, under `runtime.state.<key>`. Anything not already true is treated as false, so a key that has never been set toggles to true.",default:""}}},appendState:{source:"state",title:"Append To State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`. Created if it is not there.",default:""},value:{type:"scalar",description:"What to add to the end of the list.",default:""},unique:{type:"boolean",description:"Skip the append when the list already holds this value. For a list whose entries are their own identity — anything referring to one refers to it by value, so a second copy is indistinguishable.",default:!1},withId:{type:"boolean",description:"Store the entry as `{ id, value }` with an id of its own, so two entries that read the same are still two entries. Anything reading one back names `.value`; anything referring to one names `.id`.",default:!1}}},removeState:{source:"state",title:"Remove From State",strictParams:!0,params:{key:{type:"text",description:"The state key/path holding the list, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry to drop, by value — every copy of it. Prefer this wherever the list can change under the person: a position is only true until something before it moves.",default:""},by:{type:"text",description:"The FIELD carrying the identity, for a list of records rather than of scalars — `id` for entries appended with `withId`. Without it the whole entry is compared, which never matches a record.",default:""},index:{type:"text",description:"Which entry to drop, by position, when there is no value to go on. Inside a controlled list, `{{ <listSource>.index }}` is the row own position. An index that resolves to nothing removes nothing.",default:""}}},moveState:{source:"state",title:"Move Between Lists",strictParams:!0,params:{from:{type:"text",description:"The list to take it out of, under `runtime.state.<key>`.",default:""},to:{type:"text",description:"The list to put it into. It is not added twice.",default:""},value:{type:"scalar",description:"The entry to move. Absent from `from` means nothing happens.",default:""}}},toggleInState:{source:"state",title:"Toggle In List",strictParams:!0,params:{key:{type:"text",description:"The list to add to or drop from, under `runtime.state.<key>`.",default:""},value:{type:"scalar",description:"The entry the box stands for.",default:""}}},clearState:{source:"state",title:"Clear State",strictParams:!0,params:{key:{type:"text",description:"The list to empty, under `runtime.state.<key>`. Left blank it empties EVERYTHING the space is keeping — which on a page that holds notes beside a list means losing the notes to clear the list.",default:""}}}},D_=0,z_=({children:e})=>{let{useInteractions:t}=f(hS),n=Dt(),r=h(e=>{let{key:t,type:r}=e,i=e.value;if("boolean"===r)i=!0===i||"true"===i;else if("number"===r)i="number"==typeof i?i:parseFloat(String(i));else if("json"===r)return void n(`runtime.state.${t}`,((e,t)=>{if("string"!=typeof t)return t;try{return JSON.parse(t)}catch{throw Error(`setState "${e}" is typed json, and its value is not JSON: ${t.slice(0,80)}`)}})(t,i));n(`runtime.state.${t}`,i)},[n]),i=h(e=>{let{key:t}=e;t&&n(`runtime.state.${t}`,e=>!0!==e&&"true"!==e)},[n]),a=e=>!0===e||"true"===e,o=h(e=>{let{key:t,value:r,unique:i,withId:o}=e;t&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a(o)?[...t,{id:typeof crypto<"u"&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`e${++D_}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,value:r}]:a(i)&&t.includes(r)?t:[...t,r]})},[n]),s=h(e=>{let{key:t,index:r,value:i,by:a}=e;if(!t)return;if(void 0!==i&&""!==i)return void n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter(e=>a?e?.[a]!==i:e!==i):[]);let o="number"==typeof r?r:parseInt(r??"",10);Number.isNaN(o)||n(`runtime.state.${t}`,e=>Array.isArray(e)?e.filter((e,t)=>t!==o):[])},[n]),l=h(e=>{let{from:t,to:r,value:i}=e;if(!t||!r||void 0===i||""===i)return;let a={moved:!1};n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return a.moved=t.includes(i),a.moved?t.filter(e=>e!==i):t}),a.moved&&n(`runtime.state.${r}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(i)?t:[...t,i]})},[n]),c=h(e=>{let{key:t,value:r}=e;t&&void 0!==r&&""!==r&&n(`runtime.state.${t}`,e=>{let t=Array.isArray(e)?e:[];return t.includes(r)?t.filter(e=>e!==r):[...t,r]})},[n]),u=h(e=>{let{key:t}=e;n(t?`runtime.state.${t}`:"runtime.state",t?[]:{})},[n]);return t({id:"state",callbacks:k(()=>yd(L_,{setState:r,toggleState:i,appendState:o,removeState:s,moveState:l,toggleInState:c,clearState:u}),[r,i,o,s,l,c,u])}),e},R_=({children:e,hostActions:t})=>{let[[n="basic",r,i,a]]=zt(["schema.settings.userProvider","navigation.routeParams","navigation.queryParams","navigation.currentPageId"]),{previewMode:o}=X();/* @__PURE__ */
145
+ return I(v_,{currentPageId:a,routeParams:r,queryParams:i,children:/* @__PURE__ */I(E_,{authProvider:n,children:/* @__PURE__ */I(z_,{children:/* @__PURE__ */I(C_,{children:/* @__PURE__ */I(P_,{children:/* @__PURE__ */I(N_,{previewMode:o,children:/* @__PURE__ */I(__,{actions:t,children:e})})})})})})})},j_=W("StyleContext",{}),$_=({children:e,style:t})=>{let{style:n}=f(Ic),r=k(()=>({}),[]);return qt("style",t??(n||cc)),/* @__PURE__ */I(j_,{value:r,children:e})},F_="/plitzi-sdk.css",q_=({revision:e,webKey:t="",webId:n,environment:r="main",currentPageId:i,server:a,isHydrating:o=!1,offlineMode:s=!1,offlineData:l,offlineDataType:c="json",instanceId:u,renderMode:d=J.renderMode,sdkStylePath:p="./plitzi-sdk.css",sdkDevToolsStylePath:h,previewMode:m=!0,debugMode:y=!1,overQuota:b=!1,analytics:v,onInitEventBridge:w,hostData:x,hostActions:T,flags:C,serverFlags:A,forcedFlags:E,onInitStateManager:O,...N})=>{const M=f(mt),[P,L]=S(!o);g(()=>L(!0),[]),Rt(["render.previewMode","render.debugMode","render.renderMode","render.environment","render.isHydrating","render.hydrated","render.overQuota"],[m,y,d,r,o,P,b]),Rt(["runtime.host"],[x]),Rt(["flags.overrides.server","flags.overrides.sdk","flags.overrides.qa"],[ic(A),ic(C),E]);const D=k(()=>M?.withBase("runtime.state"),[M]),z=k(()=>({get state(){return D?.getState()??{}},setState:e=>D?.setState(void 0,e),setStateByKey:(e,t)=>D?.setState(e,t),clearState:()=>D?.setState(void 0,{}),subscribe:e=>D?D.subscribe(()=>e(D.getState()??{})):()=>{}}),[D]);return g(()=>{O?.(z)},[O,z]),/* @__PURE__ */I(lS,{webKey:t,webId:n,instanceId:u,server:a,offlineMode:s,offlineData:l,offlineDataType:c,revision:e,children:/* @__PURE__ */I(dS,{children:/* @__PURE__ */I(uS,{sdkStylePath:F_,children:/* @__PURE__ */I($_,{children:/* @__PURE__ */I(VI,{onInit:w,debugMode:y,children:/* @__PURE__ */I(mI,{server:a,children:/* @__PURE__ */_(rS,{currentPageId:i,children:[/* @__PURE__ */I(Xx,{analytics:v}),/* @__PURE__ */I(HI,{children:/* @__PURE__ */I(R_,{hostActions:T,children:/* @__PURE__ */I(UI,{enabled:y,instanceId:u,devToolsStyleLink:h||"/plitzi-sdk-devtools.css",renderMode:"shadow",scroll:"document",qa:!0,innerClassName:U({flex:"iframe"===d}),children:/* @__PURE__ */I(ZE,{sdkStylePath:F_,server:a,...N})})})})]})})})})})})})},B_=({scope:e,theme:t,children:n})=>{const[[r="system"]]=zt(["style.theme.default"]);/* @__PURE__ */
146
+ return I(Wc,{defaultTheme:r,scope:e,theme:t,children:n})},U_=`[data-motion-on="view"]:not([${Hd}])`,H_=()=>{const{rootRef:e}=f(pS);return g(()=>{const t=e.current;if(t)return(e=>{let t=e=>e.setAttribute(Hd,""),n=e=>[...e.matches(U_)?[e]:[],...Array.from(e.querySelectorAll(U_))];if("function"!=typeof Reflect.get(globalThis,"IntersectionObserver"))return n(e).forEach(t),()=>{};let r=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting&&(t(n.target),r.unobserve(n.target))}),i=e=>n(e).forEach(e=>r.observe(e)),a=new MutationObserver(e=>{for(let t of e)"attributes"===t.type&&t.target instanceof Element&&i(t.target),t.addedNodes.forEach(e=>{e instanceof Element&&i(e)})});return i(e),a.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-motion-on"]}),()=>{r.disconnect(),a.disconnect()}})(t)},[e]),null},W_=({className:e,scoped:t=!1,children:n})=>{const{theme:r}=Gc(),[[i=!1]]=zt(["render.hydrated"]);/* @__PURE__ */
147
+ return _(fS,{className:U(e,t&&"system"!==r&&r),"data-hydrated":i?"":void 0,children:[/* @__PURE__ */I(H_,{}),n]})},V_=/* @__PURE__ */$({ComponentHelper_exports:()=>G_,getPlugins:()=>K_,nestedInject:()=>J_,processLocalCustomPlugins:()=>X_,processLocalPlugins:()=>Y_}),G_=/* @__PURE__ */xS({getPlugins:()=>K_,nestedInject:()=>J_,processLocalCustomPlugins:()=>X_,processLocalPlugins:()=>Y_}),K_=e=>{let t={};if(!e)return t;t[e.type]=e;let{plugins:n}=e;return n&&Object.keys(n).length>0&&Object.keys(n).forEach(e=>{Object.assign(t,K_(n[e]))}),t},Y_=e=>{let t={};return e&&Object.values(e).forEach(e=>{e.type&&Object.assign(t,K_(e))}),t},J_=(e,t)=>{if(!e)return{};let n={};return Object.keys(e).forEach(r=>{let i=e[r],{version:a,pluginSettings:o,initialItems:s,plugins:l,extraProps:c}=i;n[r]=ld(i),n[r].origin=t,n[r].version=a,n[r].type=r,n[r].initialItems=s,n[r].pluginSettings=o,n[r].extraProps=c,n[r].plugins=J_(l,t)}),n},X_=e=>{let t={};return e&&Object.values(e).forEach(e=>{if(!e.type)return;let{type:n,pluginSettings:r,version:i,initialItems:a,plugins:o,assets:s,content:l,extraProps:c}=e,u=ld(e);u.version=i,u.type=n,u.assets=s,u.initialItems=a,u.pluginSettings=r,u.origin="local-custom",u.content=l,u.extraProps=c,u.plugins=J_(o,"local-custom"),Object.assign(t,K_(u))}),t},Z_=p(({plitziJsxSkipHOC:e=!0,as:t="",internalProps:n,children:r,...i})=>{let{contexts:{PluginsContext:a}}=sc(),{components:o}=f(jr),{plugins:s}=f(a),l=t?o.current[t]:void 0,c=k(()=>l?void 0:Ur({type:t,plugins:s}),[l,s,t]);return t?!l&&c?/* @__PURE__ */I(Br,{internalProps:n,url:c.url,type:t,plitziJsxSkipHOC:e,plitziJsxProps:i}):(l||=QT,/* @__PURE__ */I(l,{plitziJsxSkipHOC:e,...i,internalProps:n,children:r})):null}),Q_=e=>{let[t]=Mt(`runtime.sources.flags.${e}`);return!0===t},eO={dropdown:JS,notFound:eC,loading:JT,custom:IS,reference:$S,blockHtml:TS,nodeHtml:OS,blockJsx:AS,page:iC,container:kA,layoutContainer:KT,dialogContainer:CA,modalContainer:DA,tabContainer:GA,carousel:bA,heading:ZS,image:hC,video:xC,embed:oC,svg:wC,fontAwesome:lC,button:US,paragraph:aT,text:hT,themeToggle:xT,list:MA,link:tT,markdown:rT,richText:pT,pagination:jA,form:AT,formControl:WT,apiContainer:UC,channel:nA},tO=({localComponents:e,localCustomComponents:t,children:n})=>{let r=k(()=>({...Y_(eO),...Y_(e),...X_(t)}),[e,t]),i=x({}),a=k(()=>({current:{...i.current,...r}}),[r]),o=h((e=[],t=!1)=>{if("string"==typeof e&&!t)return a.current[e];if("string"==typeof e&&t){let t=a.current[e];return t?{[e]:t,...pr(K_(t),[e])}:{}}let n={};return e.forEach(e=>{let r=a.current[e];r&&(t?n={...n,...pr(K_(r),[e])}:n[e]=r)}),n},[a]),s=h((e=[])=>{let t={};return Array.isArray(e)||(e=[e]),e.forEach(e=>{e.type&&!a.current[e.type]&&(t={...t,[e.type]:e,...K_(e)})}),0===Object.keys(t).length||(a.current={...i.current,...t,...r},i.current={...i.current,...t}),t},[a,r]),l=h(e=>{if(!e)return[];Array.isArray(e)||(e=[e]);let t=e;return e.forEach(e=>{let n=o([e],!0);Object.keys(n).length>0&&(t=[...t,...Object.keys(pr(n,e))])}),a.current={...pr(i.current,t),...r},i.current=pr(i.current,t),t},[a,o,r]),c=x(Object.keys(a.current).reduce((e,t)=>{let n=ar(a.current,t,void 0);return n&&n.content?{...e,[t]:{...n.content,initialItems:n.initialItems}}:e},{})),u=h(e=>{c.current={...c.current,...e}},[]),d=h(e=>{let t=ar(c.current,`${e}.builder.pluginChildren`,[]);c.current=pr(c.current,[e,...t])},[]),p=k(()=>({components:a,componentDefinitions:c,getComponent:o,register:s,unregister:l,unregisterDefinition:d,registerDefinition:u}),[a,s,l,u,d,o]);/* @__PURE__ */
148
+ return I(jr,{value:p,children:n})},nO=e=>({apiServer:"https://api.plitzi.com",ssrServer:"https://ssr.plitzi.com",serverUrl:"https://server.plitzi.com",websocketServer:"wss://server.plitzi.com",subscriptionServer:"wss://server.plitzi.com/subscriptions",...e}),rO={Button:ys,ContentEditable:Wp,Input:Cs,Heading:Gp,ContainerResizable:zp,ContainerCollapsable:Lp,Text:Uw,Markdown:$w,ContainerTabs:Up},iO=({className:e="min-h-screen",children:t,webKey:r="",server:a,renderMode:o=J.renderMode,routing:s="browser",debugMode:l=!1,themeScope:c="document",theme:d,state:p,forcedFlags:f,...m})=>{const y=k(()=>function(e){if(!e)return 0;let t={};try{let n=e.split(".")[1],r=typeof window<"u"?window.atob(n):Buffer.from(n,"base64").toString();t=JSON.parse(r)}catch{return 0}let n=Number(ar(t,"sub",0));return Number.isInteger(n)&&n>0?n:0}(r),[r]),b=x(p).current,v=k(()=>({runtime:{sources:{},state:b??{}},render:J}),[b]),w=k(()=>(e=>{let t=e?.split(":")[1];return t?`plitzi_debug_${t}`:"plitzi_debug"})("undefined"==typeof window?void 0:window.location.host),[]),[T,C]=S(()=>(e=>{if("undefined"==typeof document)return!0;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(-1!==n&&t.slice(0,n).trim()===e)return"false"!==decodeURIComponent(t.slice(n+1).trim())}return!0})(w)),A=l&&T,[E]=S(()=>f||!l||"undefined"==typeof window?f:((e,t)=>(e=>e?Object.fromEntries(e.split(",").map(e=>e.split(":")).filter(([e,t])=>Yl(e)&&("1"===t||"0"===t)).map(([e,t])=>[e,"1"===t])):{})(si(e,Jl(t))))(li(),window.location.host)),_=k(()=>nO(a),[a]);g(()=>{},[]);const O=h(()=>{const e=!T;((e,t)=>{"undefined"!=typeof document&&(document.cookie=`${e}=${JSON.stringify(t)}; path=/; max-age=31536000; samesite=lax`)})(w,e),C(e)},[w,T]);(({authorized:e,onToggle:t})=>{const n=h(e=>{var n;e.shiftKey&&"F12"===e.key?t():!e.shiftKey||!e.altKey||"KeyD"!==e.code||(n=e.target)instanceof HTMLElement&&(n.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(n.tagName))||(e.preventDefault(),t())},[t]);g(()=>{if(e)return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,n])})({authorized:l,onToggle:O}),g(()=>{},[l,T,w]),g(()=>{if(A)return window.plitziTracing={lastCommitId:od.lastCommitId,commitsSince:od.commitsSince},()=>{delete window.plitziTracing}},[A]),g(()=>{m.isHydrating&&od.setHydrated()},[m.isHydrating]);const N=k(()=>{const e={};return n.forEach(t,t=>{if(!u(t))return;if(t.type!==WE)return;const{renderType:n,component:r,assets:i=[],...a}=t.props;if(!n||!r)return;const o=r;o.type=n,o.assets=i,o.extraProps=a,e[n]=o}),e},[t]);"undefined"==typeof window&&_.requestUrl;const M="widget"===o?i:"undefined"==typeof window?Bx:"memory"===s?dx:Dx,P="widget"===o?{}:{..."memory"===s&&"undefined"!=typeof window?{}:{basename:ar(_,"basePath","/"),location:"undefined"==typeof window?_.requestUrl??"":void 0}};/* @__PURE__ */
149
+ return I(At,{value:v,middlewares:[me(Wl("sdk")),vu(y),...A?[()=>({onChange:e=>od.recordStoreChange(e)}),pe({shouldRecord:e=>!(e?.startsWith("runtime.elements")||e?.startsWith("rsc")||e?.startsWith("theme")||e?.startsWith("flags"))})]:[]],children:/* @__PURE__ */I(B_,{scope:c,theme:d,children:/* @__PURE__ */I(Bw,{components:rO,children:/* @__PURE__ */I(W_,{scoped:"container"===c,className:U("plitzi-sdk flex",e,{"sdk-debug-mode":A}),children:/* @__PURE__ */I(Cp,{children:/* @__PURE__ */I(M,{...P,children:/* @__PURE__ */I(tO,{localCustomComponents:N,localComponents:oO,children:/* @__PURE__ */I(q_,{server:_,webKey:r,renderMode:o,debugMode:A,webId:y,forcedFlags:E,...m})})})})})})})})},aO=ld(({ref:e,className:t,spaceKey:n,environment:r="main"})=>{const{settings:{previewMode:i},contexts:{NetworkContext:a}}=sc(),{server:o}=f(a);/* @__PURE__ */
150
+ return I(Vd,{ref:e,className:U("plitzi-component__plitzi-sdk",t,{"with__plitzi-sdk":!i}),children:n&&/* @__PURE__ */I(iO,{webKey:n,environment:r,renderMode:"widget",server:o,className:"h-full w-full"})})}),oO={plitziSdk:Object.assign(aO,{type:"plitziSdk",content:{attributes:{spaceId:"",spaceKey:"",environment:"main"},definition:{label:"Plitzi Sdk",type:"plitziSdk",bindings:{},styleSelectors:{base:""},initialState:{visibility:!0}},builder:{canDelete:!0,canSelect:!0,canDragDrop:!0,canMove:!0,canSnippet:!0,itemsAllowed:[],itemsNotAllowed:[]},market:{category:"advanced",owner:"Plitzi",verified:!0,license:"MIT",website:"https://plitzi.com",backgroundColor:"#4422ee",icon:/* @__PURE__ */I(q,{})},defaultStyle:{name:"Plitzi Sdk",displayMode:"desktop",style:{base:{default:{}}}},settings:{}}})},sO=class extends Error{stage;log;constructor(e,t){super(`${"link"===e?"program failed to link":`${e} shader failed`}: ${t.trim()||"no log given"}`),this.name="ShaderError",this.stage=e,this.log=t}},lO=(e,t,n)=>{let r=e.createShader("vertex"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER);if(!r)throw new sO(t,"the context made no shader (it is lost)");if(e.shaderSource(r,n),e.compileShader(r),!0!==e.getShaderParameter(r,e.COMPILE_STATUS)){let n=e.getShaderInfoLog(r)??"";throw e.deleteShader(r),new sO(t,n)}return r},cO=(e,{vertex:t,fragment:n})=>{let r=lO(e,"vertex",t),i=lO(e,"fragment",n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),e.deleteShader(r),e.deleteShader(i),!0!==e.getProgramParameter(a,e.LINK_STATUS)){let t=e.getProgramInfoLog(a)??"";throw e.deleteProgram(a),new sO("link",t)}return a},uO="(prefers-reduced-motion: reduce)",dO=()=>"function"==typeof window.matchMedia&&window.matchMedia(uO).matches||document.documentElement.classList.contains("plitzi-reduced-motion"),pO=e=>{let t="function"==typeof window.matchMedia?window.matchMedia(uO):void 0;t?.addEventListener("change",e);let n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{t?.removeEventListener("change",e),n.disconnect()}},fO=()=>T(pO,dO,()=>!1),hO=e=>(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),mO=()=>"hidden"!==document.visibilityState,gO=(e,{paused:t=!1,fps:n,target:r}={})=>{let i=sc().settings.previewMode??!0,a=fO(),o=T(hO,mO,()=>!1),s=(e=>{let[t,n]=S(!0);return g(()=>{let t=e?.current;if(!t||typeof IntersectionObserver>"u")return;let r=new IntersectionObserver(e=>n(e.some(e=>e.isIntersecting)));return r.observe(t),()=>r.disconnect()},[e]),t})(r),l=i&&!a&&!t&&o&&s,c=x(e);g(()=>{c.current=e},[e]);let u=x({time:0,frame:0});return g(()=>{if(!l)return;let e,t=n&&n>0?1e3/n:0,r=0,i=0,a=n=>{let o=void 0===e?0:n-e;if(e=n,i+=o,i>=t){let e=t>0?i:o;i=t>0?i%t:0,u.current={time:u.current.time+e,frame:u.current.frame+1},c.current({...u.current,delta:e})}r=requestAnimationFrame(a)};return r=requestAnimationFrame(a),()=>cancelAnimationFrame(r)},[l,n]),{running:l}},yO=(e,{setup:t,draw:n,maxPixelRatio:r=2,paused:i,fps:a})=>{let o=(e=>`[plugin ${e?.definition?.type??"canvas"}${e?.id?` "${e.id}"`:""}]`)(f(V)),s=x(null),[l,c]=S(null),[u,d]=S({width:0,height:0,pixelRatio:1}),[p,m]=S(),[y,b]=S(!1),[v,w]=S(0),k=x(null),T=x({acquire:e,setup:t,draw:n});g(()=>{T.current={acquire:e,setup:t,draw:n}},[e,t,n]);let C=h(e=>{let t=e instanceof Error?e.message:String(e);console.error(`${o} ${t}`),m(t)},[o]),A=h(e=>{s.current=e,c(e)},[]);g(()=>{if(!l)return;let e=()=>{let e=l.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,r);l.width=Math.max(1,Math.round(e.width*t)),l.height=Math.max(1,Math.round(e.height*t)),d({width:e.width,height:e.height,pixelRatio:t})};if(e(),typeof ResizeObserver>"u")return;let t=new ResizeObserver(e);return t.observe(l),()=>t.disconnect()},[l,r]),g(()=>{if(!l)return;let e=e=>{e.preventDefault(),k.current=null,b(!1)},t=()=>w(e=>e+1);return l.addEventListener("webglcontextlost",e),l.addEventListener("webglcontextrestored",t),()=>{l.removeEventListener("webglcontextlost",e),l.removeEventListener("webglcontextrestored",t)}},[l]),g(()=>{if(l&&0!==u.width&&void 0===p)try{let e=T.current.acquire(l);if(!e)return void C(/* @__PURE__ */Error("the browser gave no drawing context (WebGL may be off)"));e.prepare(u);let t=T.current.setup?T.current.setup(e.context,u):void 0;k.current={handle:e,state:t}}catch(sO){C(sO)}},[l,u,v,p,C]);let E=h(e=>{let t=k.current;if(t&&void 0===p)try{t.handle.prepare(u),T.current.draw(t.handle.context,{...e,...u,state:t.state}),b(!0)}catch(e){k.current=null,C(e)}},[u,p,C]),{running:I}=gO(E,{paused:i||void 0!==p,fps:a,target:s});return g(()=>{!I&&u.width>0&&E({time:0,delta:0,frame:0})},[I,u,v,E]),{ref:A,ready:y,error:p,running:I}},bO=({attributes:e,...t})=>yO(h(t=>{let n=t.getContext("2d",e);return n&&{context:n,prepare:({pixelRatio:e})=>n.setTransform(e,0,0,e,0,0)}},[e]),t),vO=({attributes:e,...t})=>yO(h(t=>{let n=t.getContext("webgl",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t),wO=({attributes:e,...t})=>yO(h(t=>{let n=t.getContext("webgl2",e);return n&&{context:n,prepare:()=>n.viewport(0,0,t.width,t.height)}},[e]),t);Promise.resolve({ });function kO(e,t={},n={},r=!1,i=!1){const{actionRuns:a,styleCacheInDocument:o,...s}=(e=>{if(e.analytics||e.offlineMode||!e.webKey)return e;const{apiServer:t}=nO(e.server);return t?{...e,analytics:{endpoint:`${t.replace(/\/+$/,"")}/v1/collect`,key:e.webKey}}:e})(t),l="undefined"!=typeof document?document.getElementById(e):void 0,c=o?((e,t)=>{const{offlineData:n}=e;if(!n||!t)return e;const r=(e=>{let t=e.querySelector('style[data-id="plitzi-runtime-style"]')?.textContent??"",n=t.indexOf(wc),r=t.indexOf(kc,n);if(!(n<0||r<0))return t.slice(n+22,r)})(t);return void 0===r?(console.error("[plitzi] The server-rendered stylesheet is missing from the page: it renders without its styles."),e):{...e,offlineData:{...n,style:{...n.style,cache:r}}}})(s,l):s,u=c.debugMode??r;u&&a?.length&&lt(a);const d=({isHydrating:e=!1})=>{const[t,r]=S(!e);g(()=>r(!0),[]);const i=Object.keys(n).filter(e=>t||!n[e].clientOnly);u||(()=>{if(typeof window>"u")return;let e=()=>{},t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;"object"==typeof t&&Object.keys(t).forEach(n=>{let r=t[n];t[n]="function"==typeof r?e:null})})();const a=h(e=>{JE=e},[]),o=h(e=>{XE=e},[]);/* @__PURE__ */
151
+ return I(iO,{...c,debugMode:u,isHydrating:e,onInitStateManager:a,onInitEventBridge:o,children:i.filter(e=>!!n[e].component).map(e=>/* @__PURE__ */I(ZE.Plugin,{renderType:e,component:n[e].component,...n[e].props},e))})};if(!l)return;const p=i?A(l,/* @__PURE__ */I(d,{isHydrating:!0})):C(l);return i||p.render(/* @__PURE__ */I(d,{})),{unmount:()=>p.unmount()}}var xO=({debugMode:e=!1,isHydrating:t=!1,children:n,webKey:r="",environment:i="main",renderMode:a=J.renderMode,...o})=>/* @__PURE__ */I(iO,{...o,isHydrating:t,renderMode:a,debugMode:e,webKey:r,environment:i,children:n});xO.Plugin=ZE.Plugin;var SO=sc,TO="0.38.4",CO=()=>JE,AO=()=>XE;export{Mt as A,ma as C,jr as ComponentContext,tO as ComponentProvider,Dr as D,$r as E,et as F,tt as I,Z_ as JsxManager,Oe as L,mt as M,dt as N,hr as O,ot as P,lc as PlitziServiceProvider,NS as PluginManager,Br as PluginRemote,ue as R,MS as ReplicaProvider,Vd as RootElement,Ma as S,sO as ShaderError,pa as T,Xl as _,_C as a,As as b,Iy as c,cO as createShaderProgram,Dp as d,xO as default,Wd as f,Ac as g,AO as getEventBridge,CO as getStateManager,Gc as h,wI as i,vt as j,ar as k,Hp as l,ju as m,MI as n,cS as o,od as p,PI as r,kO as render,Py as s,oO as sdkComponents,$I as t,Jx as track,jp as u,gO as useAnimationFrame,bO as useCanvas2d,ZC as useChannel,cd as useElement,Q_ as useFlag,SO as usePlitziServiceContext,fO as useReducedMotion,TC as useRscData,su as useRscRefresh,zt as useStore,vO as useWebGL,wO as useWebGL2,Zl as v,TO as version,fa as w,ld as withElement,bs as x,ql as y,U as z};