@sveltia/cms 0.119.2 → 0.120.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -23
- package/dist/sveltia-cms.js +44 -44
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +26 -26
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +1 -1
- package/types/public.d.ts +2 -2
package/dist/sveltia-cms.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var mx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ss(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fg={exports:{}},yt={};var vx;function bN(){if(vx)return yt;vx=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function p(R){return R===null||typeof R!="object"?null:(R=h&&R[h]||R["@@iterator"],typeof R=="function"?R:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function _(R,B,J){this.props=R,this.context=B,this.refs=v,this.updater=J||g}_.prototype.isReactComponent={},_.prototype.setState=function(R,B){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,B,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function y(){}y.prototype=_.prototype;function w(R,B,J){this.props=R,this.context=B,this.refs=v,this.updater=J||g}var x=w.prototype=new y;x.constructor=w,m(x,_.prototype),x.isPureReactComponent=!0;var E=Array.isArray;function $(){}var C={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function T(R,B,J){var Q=J.ref;return{$$typeof:t,type:R,key:B,ref:Q!==void 0?Q:null,props:J}}function A(R,B){return T(R.type,B,R.props)}function P(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function L(R){var B={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return B[J]})}var O=/\/+/g;function N(R,B){return typeof R=="object"&&R!==null&&R.key!=null?L(""+R.key):B.toString(36)}function M(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then($,$):(R.status="pending",R.then(function(B){R.status==="pending"&&(R.status="fulfilled",R.value=B)},function(B){R.status==="pending"&&(R.status="rejected",R.reason=B)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function U(R,B,J,Q,ee){var te=typeof R;(te==="undefined"||te==="boolean")&&(R=null);var re=!1;if(R===null)re=!0;else switch(te){case"bigint":case"string":case"number":re=!0;break;case"object":switch(R.$$typeof){case t:case e:re=!0;break;case d:return re=R._init,U(re(R._payload),B,J,Q,ee)}}if(re)return ee=ee(R),re=Q===""?"."+N(R,0):Q,E(ee)?(J="",re!=null&&(J=re.replace(O,"$&/")+"/"),U(ee,B,J,"",function(ce){return ce})):ee!=null&&(P(ee)&&(ee=A(ee,J+(ee.key==null||R&&R.key===ee.key?"":(""+ee.key).replace(O,"$&/")+"/")+re)),B.push(ee)),1;re=0;var he=Q===""?".":Q+":";if(E(R))for(var pe=0;pe<R.length;pe++)Q=R[pe],te=he+N(Q,pe),re+=U(Q,B,J,te,ee);else if(pe=p(R),typeof pe=="function")for(R=pe.call(R),pe=0;!(Q=R.next()).done;)Q=Q.value,te=he+N(Q,pe++),re+=U(Q,B,J,te,ee);else if(te==="object"){if(typeof R.then=="function")return U(M(R),B,J,Q,ee);throw B=String(R),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return re}function H(R,B,J){if(R==null)return R;var Q=[],ee=0;return U(R,Q,"","",function(te){return B.call(J,te,ee++)}),Q}function G(R){if(R._status===-1){var B=R._result;B=B(),B.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=B)}if(R._status===1)return R._result.default;throw R._result}var W=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},Y={map:H,forEach:function(R,B,J){H(R,function(){B.apply(this,arguments)},J)},count:function(R){var B=0;return H(R,function(){B++}),B},toArray:function(R){return H(R,function(B){return B})||[]},only:function(R){if(!P(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return yt.Activity=f,yt.Children=Y,yt.Component=_,yt.Fragment=n,yt.Profiler=i,yt.PureComponent=w,yt.StrictMode=r,yt.Suspense=c,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,yt.__COMPILER_RUNTIME={__proto__:null,c:function(R){return C.H.useMemoCache(R)}},yt.cache=function(R){return function(){return R.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(R,B,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Q=m({},R.props),ee=R.key;if(B!=null)for(te in B.key!==void 0&&(ee=""+B.key),B)!k.call(B,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&B.ref===void 0||(Q[te]=B[te]);var te=arguments.length-2;if(te===1)Q.children=J;else if(1<te){for(var re=Array(te),he=0;he<te;he++)re[he]=arguments[he+2];Q.children=re}return T(R.type,ee,Q)},yt.createContext=function(R){return R={$$typeof:s,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},yt.createElement=function(R,B,J){var Q,ee={},te=null;if(B!=null)for(Q in B.key!==void 0&&(te=""+B.key),B)k.call(B,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=B[Q]);var re=arguments.length-2;if(re===1)ee.children=J;else if(1<re){for(var he=Array(re),pe=0;pe<re;pe++)he[pe]=arguments[pe+2];ee.children=he}if(R&&R.defaultProps)for(Q in re=R.defaultProps,re)ee[Q]===void 0&&(ee[Q]=re[Q]);return T(R,te,ee)},yt.createRef=function(){return{current:null}},yt.forwardRef=function(R){return{$$typeof:a,render:R}},yt.isValidElement=P,yt.lazy=function(R){return{$$typeof:d,_payload:{_status:-1,_result:R},_init:G}},yt.memo=function(R,B){return{$$typeof:u,type:R,compare:B===void 0?null:B}},yt.startTransition=function(R){var B=C.T,J={};C.T=J;try{var Q=R(),ee=C.S;ee!==null&&ee(J,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then($,W)}catch(te){W(te)}finally{B!==null&&J.types!==null&&(B.types=J.types),C.T=B}},yt.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},yt.use=function(R){return C.H.use(R)},yt.useActionState=function(R,B,J){return C.H.useActionState(R,B,J)},yt.useCallback=function(R,B){return C.H.useCallback(R,B)},yt.useContext=function(R){return C.H.useContext(R)},yt.useDebugValue=function(){},yt.useDeferredValue=function(R,B){return C.H.useDeferredValue(R,B)},yt.useEffect=function(R,B){return C.H.useEffect(R,B)},yt.useEffectEvent=function(R){return C.H.useEffectEvent(R)},yt.useId=function(){return C.H.useId()},yt.useImperativeHandle=function(R,B,J){return C.H.useImperativeHandle(R,B,J)},yt.useInsertionEffect=function(R,B){return C.H.useInsertionEffect(R,B)},yt.useLayoutEffect=function(R,B){return C.H.useLayoutEffect(R,B)},yt.useMemo=function(R,B){return C.H.useMemo(R,B)},yt.useOptimistic=function(R,B){return C.H.useOptimistic(R,B)},yt.useReducer=function(R,B,J){return C.H.useReducer(R,B,J)},yt.useRef=function(R){return C.H.useRef(R)},yt.useState=function(R){return C.H.useState(R)},yt.useSyncExternalStore=function(R,B,J){return C.H.useSyncExternalStore(R,B,J)},yt.useTransition=function(){return C.H.useTransition()},yt.version="19.2.0",yt}var bx;function pE(){return bx||(bx=1,Fg.exports=bN()),Fg.exports}var zg,_x;function _N(){if(_x)return zg;_x=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zg=i()?Object.assign:function(o,s){for(var a,c=r(o),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)e.call(a,f)&&(c[f]=a[f]);if(t){u=t(a);for(var h=0;h<u.length;h++)n.call(a,u[h])&&(c[u[h]]=a[u[h]])}}return c},zg}var jg,yx;function yN(){if(yx)return jg;yx=1;var t=_N(),e={};function n(s,a,c,u,d,f,h,p){if(!s){var g;if(a===void 0)g=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var m=[c,u,d,f,h,p],v=0;g=new Error(a.replace(/%s/g,function(){return m[v++]})),g.name="Invariant Violation"}throw g.framesToPop=1,g}}var r="mixins";function i(s){return s}function o(s,a,c){var u=[],d={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},f={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},h={displayName:function(A,P){A.displayName=P},mixins:function(A,P){if(P)for(var L=0;L<P.length;L++)g(A,P[L])},childContextTypes:function(A,P){A.childContextTypes=t({},A.childContextTypes,P)},contextTypes:function(A,P){A.contextTypes=t({},A.contextTypes,P)},getDefaultProps:function(A,P){A.getDefaultProps?A.getDefaultProps=_(A.getDefaultProps,P):A.getDefaultProps=P},propTypes:function(A,P){A.propTypes=t({},A.propTypes,P)},statics:function(A,P){m(A,P)},autobind:function(){}};function p(A,P){var L=d.hasOwnProperty(P)?d[P]:null;C.hasOwnProperty(P)&&n(L==="OVERRIDE_BASE","ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",P),A&&n(L==="DEFINE_MANY"||L==="DEFINE_MANY_MERGED","ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",P)}function g(A,P){if(P){n(typeof P!="function","ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),n(!a(P),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var L=A.prototype,O=L.__reactAutoBindPairs;P.hasOwnProperty(r)&&h.mixins(A,P.mixins);for(var N in P)if(P.hasOwnProperty(N)&&N!==r){var M=P[N],U=L.hasOwnProperty(N);if(p(U,N),h.hasOwnProperty(N))h[N](A,M);else{var H=d.hasOwnProperty(N),G=typeof M=="function",W=G&&!H&&!U&&P.autobind!==!1;if(W)O.push(N,M),L[N]=M;else if(U){var Y=d[N];n(H&&(Y==="DEFINE_MANY_MERGED"||Y==="DEFINE_MANY"),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",Y,N),Y==="DEFINE_MANY_MERGED"?L[N]=_(L[N],M):Y==="DEFINE_MANY"&&(L[N]=y(L[N],M))}else L[N]=M}}}}function m(A,P){if(P)for(var L in P){var O=P[L];if(P.hasOwnProperty(L)){var N=L in h;n(!N,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',L);var M=L in A;if(M){var U=f.hasOwnProperty(L)?f[L]:null;n(U==="DEFINE_MANY_MERGED","ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",L),A[L]=_(A[L],O);return}A[L]=O}}}function v(A,P){n(A&&P&&typeof A=="object"&&typeof P=="object","mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var L in P)P.hasOwnProperty(L)&&(n(A[L]===void 0,"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",L),A[L]=P[L]);return A}function _(A,P){return function(){var O=A.apply(this,arguments),N=P.apply(this,arguments);if(O==null)return N;if(N==null)return O;var M={};return v(M,O),v(M,N),M}}function y(A,P){return function(){A.apply(this,arguments),P.apply(this,arguments)}}function w(A,P){var L=P.bind(A);return L}function x(A){for(var P=A.__reactAutoBindPairs,L=0;L<P.length;L+=2){var O=P[L],N=P[L+1];A[O]=w(A,N)}}var E={componentDidMount:function(){this.__isMounted=!0}},$={componentWillUnmount:function(){this.__isMounted=!1}},C={replaceState:function(A,P){this.updater.enqueueReplaceState(this,A,P)},isMounted:function(){return!!this.__isMounted}},k=function(){};t(k.prototype,s.prototype,C);function T(A){var P=function(O,N,M){this.__reactAutoBindPairs.length&&x(this),this.props=O,this.context=N,this.refs=e,this.updater=M||c,this.state=null;var U=this.getInitialState?this.getInitialState():null;n(typeof U=="object"&&!Array.isArray(U),"%s.getInitialState(): must return an object or null",P.displayName||"ReactCompositeComponent"),this.state=U};P.prototype=new k,P.prototype.constructor=P,P.prototype.__reactAutoBindPairs=[],u.forEach(g.bind(null,P)),g(P,E),g(P,A),g(P,$),P.getDefaultProps&&(P.defaultProps=P.getDefaultProps()),n(P.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var L in d)P.prototype[L]||(P.prototype[L]=null);return P}return T}return jg=o,jg}var Ug,wx;function wN(){if(wx)return Ug;wx=1;var t=pE(),e=yN();if(typeof t>"u")throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var n=new t.Component().updater;return Ug=e(t.Component,t.isValidElement,n),Ug}var xN=wN();const kN=Ss(xN);var gE=pE();const _v=!1;var xp=Array.isArray,SN=Array.prototype.indexOf,s_=Array.from,mE=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,vE=Object.getOwnPropertyDescriptors,bE=Object.prototype,EN=Array.prototype,kp=Object.getPrototypeOf,xx=Object.isExtensible;function Eu(t){return typeof t=="function"}const qe=()=>{};function TN(t){return typeof t?.then=="function"}function _E(t){for(var e=0;e<t.length;e++)t[e]()}function yE(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}function st(t,e,n=!1){return t===void 0?n?e():e:t}function ji(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const Cr=2,a_=4,Sp=8,Es=16,Ts=32,_l=64,Ep=128,co=512,Rr=1024,vi=2048,$s=4096,ki=8192,fs=16384,l_=32768,bs=65536,kx=1<<17,c_=1<<18,qc=1<<19,wE=1<<20,Ya=32768,yv=1<<21,u_=1<<22,Ks=1<<23,Oo=Symbol("$state"),xE=Symbol("legacy props"),$N=Symbol(""),rc=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function kE(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function CN(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function AN(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function PN(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function LN(t){throw new Error("https://svelte.dev/e/effect_orphan")}function NN(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ON(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function IN(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function RN(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function DN(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function MN(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const SE=1,EE=2,TE=4,FN=8,zN=16,jN=1,UN=4,BN=8,qN=16,VN=1,HN=2,mr=Symbol(),KN="http://www.w3.org/1999/xhtml",GN="http://www.w3.org/2000/svg",WN="@attach";function YN(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function JN(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function $E(t){return t===this.v}function d_(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function CE(t){return!d_(t,this.v)}let XN=!1;const ZN=[];function jn(t,e=!1,n=!1){return lh(t,new Map,"",ZN,null,n)}function lh(t,e,n,r,i=null,o=!1){if(typeof t=="object"&&t!==null){var s=e.get(t);if(s!==void 0)return s;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(xp(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var c=0;c<t.length;c+=1){var u=t[c];c in t&&(a[c]=lh(u,e,n,r,null,o))}return a}if(kp(t)===bE){a={},e.set(t,a),i!==null&&e.set(i,a);for(var d in t)a[d]=lh(t[d],e,n,r,null,o);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!o)return lh(t.toJSON(),e,n,r,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let Dr=null;function wc(t){Dr=t}function sr(t){return PE().get(t)}function f_(t,e){return PE().set(t,e),e}function se(t,e=!1,n){Dr={p:Dr,i:!1,c:null,e:null,s:t,x:null,l:null}}function ae(t){var e=Dr,n=e.e;if(n!==null){e.e=null;for(var r of n)GE(r)}return t!==void 0&&(e.x=t),e.i=!0,Dr=e.p,t??{}}function AE(){return!0}function PE(t){return Dr===null&&kE(),Dr.c??=new Map(QN(Dr)||void 0)}function QN(t){let e=t.p;for(;e!==null;){const n=e.c;if(n!==null)return n;e=e.p}return null}let $a=[];function LE(){var t=$a;$a=[],_E(t)}function aa(t){if($a.length===0&&!uc){var e=$a;queueMicrotask(()=>{e===$a&&LE()})}$a.push(t)}function eO(){for(;$a.length>0;)LE()}function NE(t){var e=Zt;if(e===null)return Vt.f|=Ks,t;if((e.f&l_)===0){if((e.f&Ep)===0)throw t;e.b.error(t)}else xc(t,e)}function xc(t,e){for(;e!==null;){if((e.f&Ep)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t}const Rf=new Set;let hn=null,ch=null,Mi=null,Di=[],Tp=null,wv=!1,uc=!1;class Qi{committed=!1;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=0;#i=0;#l=null;#s=[];#a=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#i>0}process(e){Di=[],ch=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of e)this.#r(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects)):(ch=this,hn=null,Sx(n.render_effects),Sx(n.effects),ch=null,this.#l?.resolve()),Mi=null}#r(e,n){e.f^=Rr;for(var r=e.first;r!==null;){var i=r.f,o=(i&(Ts|_l))!==0,s=o&&(i&Rr)!==0,a=s||(i&ki)!==0||this.skipped_effects.has(r);if((r.f&Ep)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!a&&r.fn!==null){o?r.f^=Rr:(i&a_)!==0?n.effects.push(r):Wd(r)&&((r.f&Es)!==0&&n.block_effects.push(r),yd(r));var c=r.first;if(c!==null){r=c;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)u===n.effect&&(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects),n=n.parent),r=u.next,u=u.parent}}#o(e){for(const n of e)((n.f&vi)!==0?this.#s:this.#a).push(n),this.#c(n.deps),Mr(n,Rr)}#c(e){if(e!==null)for(const n of e)(n.f&Cr)===0||(n.f&Ya)===0||(n.f^=Ya,this.#c(n.deps))}capture(e,n){this.previous.has(e)||this.previous.set(e,n),(e.f&Ks)===0&&(this.current.set(e,e.v),Mi?.set(e,e.v))}activate(){hn=this,this.apply()}deactivate(){hn===this&&(hn=null,Mi=null)}flush(){if(this.activate(),Di.length>0){if(xv(),hn!==null&&hn!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#n)e(this);this.#n.clear()}#u(){if(this.#i===0){for(const e of this.#e)e();this.#e.clear()}this.#t===0&&this.#d()}#d(){if(Rf.size>1){this.previous.clear();var e=Mi,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const o of Rf){if(o===this){n=!1;continue}const s=[];for(const[c,u]of this.current){if(o.current.has(c))if(n&&u!==o.current.get(c))o.current.set(c,u);else continue;s.push(c)}if(s.length===0)continue;const a=[...o.current.keys()].filter(c=>!this.current.has(c));if(a.length>0){var i=Di;Di=[];const c=new Set,u=new Map;for(const d of s)OE(d,a,c,u);if(Di.length>0){hn=o,o.apply();for(const d of Di)o.#r(d,r);o.deactivate()}Di=i}}hn=null,Mi=e}this.committed=!0,Rf.delete(this)}increment(e){this.#t+=1,e&&(this.#i+=1)}decrement(e){this.#t-=1,e&&(this.#i-=1),this.revive()}revive(){for(const e of this.#s)Mr(e,vi),Ja(e);for(const e of this.#a)Mr(e,$s),Ja(e);this.#s=[],this.#a=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#n.add(e)}settled(){return(this.#l??=yE()).promise}static ensure(){if(hn===null){const e=hn=new Qi;Rf.add(hn),uc||Qi.enqueue(()=>{hn===e&&e.flush()})}return hn}static enqueue(e){aa(e)}apply(){}}function Vc(t){var e=uc;uc=!0;try{var n;for(t&&(hn!==null&&xv(),n=t());;){if(eO(),Di.length===0&&(hn?.flush(),Di.length===0))return Tp=null,n;xv()}}finally{uc=e}}function xv(){var t=Ws;wv=!0;var e=null;try{var n=0;for(Lh(!0);Di.length>0;){var r=Qi.ensure();if(n++>1e3){var i,o;tO()}r.process(Di),Gs.clear()}}finally{wv=!1,Lh(t),Tp=null}}function tO(){try{NN()}catch(t){xc(t,Tp)}}let os=null;function Sx(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(fs|ki))===0&&Wd(r)&&(os=new Set,yd(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?XE(r):r.fn=null),os?.size>0)){Gs.clear();for(const i of os){if((i.f&(fs|ki))!==0)continue;const o=[i];let s=i.parent;for(;s!==null;)os.has(s)&&(os.delete(s),o.push(s)),s=s.parent;for(let a=o.length-1;a>=0;a--){const c=o[a];(c.f&(fs|ki))===0&&yd(c)}}os.clear()}}os=null}}function OE(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const o=i.f;(o&Cr)!==0?OE(i,e,n,r):(o&(u_|Es))!==0&&(o&vi)===0&&IE(i,e,r)&&(Mr(i,vi),Ja(i))}}function IE(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(e.includes(i))return!0;if((i.f&Cr)!==0&&IE(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function Ja(t){for(var e=Tp=t;e.parent!==null;){e=e.parent;var n=e.f;if(wv&&e===Zt&&(n&Es)!==0&&(n&c_)===0)return;if((n&(_l|Ts))!==0){if((n&Rr)===0)return;e.f^=Rr}}Di.push(e)}function nO(t){let e=0,n=_s(0),r;return()=>{Ap()&&(l(n),Gd(()=>(e===0&&(r=Se(()=>t(()=>ed(n)))),e+=1,()=>{aa(()=>{e-=1,e===0&&(r?.(),r=void 0,ed(n))})})))}}var rO=bs|qc|Ep;function iO(t,e,n){new oO(t,e,n)}class oO{parent;#e=!1;#n;#t=null;#i;#l;#s;#a=null;#r=null;#o=null;#c=null;#u=null;#d=0;#f=0;#p=!1;#h=null;#_=nO(()=>(this.#h=_s(this.#d),()=>{this.#h=null}));constructor(e,n,r){this.#n=e,this.#i=n,this.#l=r,this.parent=Zt.b,this.#e=!!this.#i.pending,this.#s=mo(()=>{Zt.b=this;{var i=this.#v();try{this.#a=di(()=>r(i))}catch(o){this.error(o)}this.#f>0?this.#m():this.#e=!1}return()=>{this.#u?.remove()}},rO)}#y(){try{this.#a=di(()=>this.#l(this.#n))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#i.pending;e&&(this.#r=di(()=>e(this.#n)),Qi.enqueue(()=>{var n=this.#v();this.#a=this.#g(()=>(Qi.ensure(),di(()=>this.#l(n)))),this.#f>0?this.#m():(dc(this.#r,()=>{this.#r=null}),this.#e=!1)}))}#v(){var e=this.#n;return this.#e&&(this.#u=uo(),this.#n.before(this.#u),e=this.#u),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#g(e){var n=Zt,r=Vt,i=Dr;jo(this.#s),hi(this.#s),wc(this.#s.ctx);try{return e()}catch(o){return NE(o),null}finally{jo(n),hi(r),wc(i)}}#m(){const e=this.#i.pending;this.#a!==null&&(this.#c=document.createDocumentFragment(),this.#c.append(this.#u),eT(this.#a,this.#c)),this.#r===null&&(this.#r=di(()=>e(this.#n)))}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#r&&dc(this.#r,()=>{this.#r=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(e){this.#b(e),this.#d+=e,this.#h&&hs(this.#h,this.#d)}get_effect_pending(){return this.#_(),l(this.#h)}error(e){var n=this.#i.onerror;let r=this.#i.failed;if(this.#p||!n&&!r)throw e;this.#a&&($r(this.#a),this.#a=null),this.#r&&($r(this.#r),this.#r=null),this.#o&&($r(this.#o),this.#o=null);var i=!1,o=!1;const s=()=>{if(i){JN();return}i=!0,o&&MN(),Qi.ensure(),this.#d=0,this.#o!==null&&dc(this.#o,()=>{this.#o=null}),this.#e=this.has_pending_snippet(),this.#a=this.#g(()=>(this.#p=!1,di(()=>this.#l(this.#n)))),this.#f>0?this.#m():this.#e=!1};var a=Vt;try{hi(null),o=!0,n?.(e,s),o=!1}catch(c){xc(c,this.#s&&this.#s.parent)}finally{hi(a)}r&&aa(()=>{this.#o=this.#g(()=>{Qi.ensure(),this.#p=!0;try{return di(()=>{r(this.#n,()=>e,()=>s)})}catch(c){return xc(c,this.#s.parent),null}finally{this.#p=!1}})})}}function dr(t,e){return e}function sO(t,e,n){for(var r=[],i=e.length,o=0;o<i;o++)m_(e[o].e,r,!0);ZE(r,()=>{var s=r.length===0&&n!==null;if(s){var a=n,c=a.parentNode;pO(c),c.append(a),t.items.clear(),ko(t,e[0].prev,e[i-1].next)}for(var u=0;u<i;u++){var d=e[u];s||(t.items.delete(d.k),ko(t,d.prev,d.next)),$r(d.e,!s)}t.first===e[0]&&(t.first=e[0].prev)})}function it(t,e,n,r,i,o=null){var s=t,a=new Map,c=null,u=(e&TE)!==0,d=(e&SE)!==0,f=(e&EE)!==0;if(u){var h=t;s=h.appendChild(uo())}var p=null,g=h_(()=>{var x=n();return xp(x)?x:x==null?[]:s_(x)}),m,v=!0;function _(){aO(w,m,s,e,r),p!==null&&(m.length===0?(p.fragment?(s.before(p.fragment),p.fragment=null):v_(p.effect),y.first=p.effect):dc(p.effect,()=>{p=null}))}var y=mo(()=>{m=l(g);for(var x=m.length,E=new Set,$=hn,C=null,k=HE(),T=0;T<x;T+=1){var A=m[T],P=r(A,T),L=v?null:a.get(P);L?(d&&hs(L.v,A),f?hs(L.i,T):L.i=T,k&&$.skipped_effects.delete(L.e)):(L=lO(v?s:null,C,A,P,T,i,e,n),v&&(L.o=!0,C===null?c=L:C.next=L,C=L),a.set(P,L)),E.add(P)}if(x===0&&o&&!p)if(v)p={fragment:null,effect:di(()=>o(s))};else{var O=document.createDocumentFragment(),N=uo();O.append(N),p={fragment:O,effect:di(()=>o(N))}}if(!v)if(k){for(const[M,U]of a)E.has(M)||$.skipped_effects.add(U.e);$.oncommit(_),$.ondiscard(()=>{})}else _();l(g)}),w={effect:y,items:a,first:c};v=!1}function aO(t,e,n,r,i){var o=(r&FN)!==0,s=e.length,a=t.items,c=t.first,u,d=null,f,h=[],p=[],g,m,v,_;if(o)for(_=0;_<s;_+=1)g=e[_],m=i(g,_),v=a.get(m),v.a?.measure(),(f??=new Set).add(v);for(_=0;_<s;_+=1){if(g=e[_],m=i(g,_),v=a.get(m),t.first??=v,!v.o){v.o=!0;var y=d?d.next:c;ko(t,d,v),ko(t,v,y),Bg(v,y,n),d=v,h=[],p=[],c=d.next;continue}if((v.e.f&ki)!==0&&(v_(v.e),o&&(v.a?.unfix(),(f??=new Set).delete(v))),v!==c){if(u!==void 0&&u.has(v)){if(h.length<p.length){var w=p[0],x;d=w.prev;var E=h[0],$=h[h.length-1];for(x=0;x<h.length;x+=1)Bg(h[x],w,n);for(x=0;x<p.length;x+=1)u.delete(p[x]);ko(t,E.prev,$.next),ko(t,d,E),ko(t,$,w),c=w,d=$,_-=1,h=[],p=[]}else u.delete(v),Bg(v,c,n),ko(t,v.prev,v.next),ko(t,v,d===null?t.first:d.next),ko(t,d,v),d=v;continue}for(h=[],p=[];c!==null&&c.k!==m;)(c.e.f&ki)===0&&(u??=new Set).add(c),p.push(c),c=c.next;if(c===null)continue;v=c}h.push(v),d=v,c=v.next}if(c!==null||u!==void 0){for(var C=u===void 0?[]:s_(u);c!==null;)(c.e.f&ki)===0&&C.push(c),c=c.next;var k=C.length;if(k>0){var T=(r&TE)!==0&&s===0?n:null;if(o){for(_=0;_<k;_+=1)C[_].a?.measure();for(_=0;_<k;_+=1)C[_].a?.fix()}sO(t,C,T)}}o&&aa(()=>{if(f!==void 0)for(v of f)v.a?.apply()})}function lO(t,e,n,r,i,o,s,a){var c=(s&SE)!==0,u=(s&zN)===0,d=c?u?jE(n,!1,!1):_s(n):n,f=(s&EE)===0?i:_s(i),h={i:f,v:d,k:r,a:null,e:null,o:!1,prev:e,next:null};try{if(t===null){var p=document.createDocumentFragment();p.append(t=uo())}return h.e=di(()=>o(t,d,f,a)),e!==null&&(e.next=h),h}finally{}}function Bg(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,i=e?e.e.nodes_start:n,o=t.e.nodes_start;o!==null&&o!==r;){var s=Hd(o);i.before(o),o=s}}function ko(t,e,n){e===null?(t.first=n,t.effect.first=n&&n.e):(e.e.next&&(e.e.next.prev=null),e.next=n,e.e.next=n&&n.e),n===null?t.effect.last=e&&e.e:(n.e.prev&&(n.e.prev.next=null),n.prev=e,n.e.prev=e&&e.e)}function RE(t,e,n,r){const i=$p;if(n.length===0&&t.length===0){r(e.map(i));return}var o=hn,s=Zt,a=DE();function c(){Promise.all(n.map(u=>cO(u))).then(u=>{a();try{r([...e.map(i),...u])}catch(d){(s.f&fs)===0&&xc(d,s)}o?.deactivate(),bd()}).catch(u=>{xc(u,s)})}t.length>0?Promise.all(t).then(()=>{a();try{return c()}finally{o?.deactivate(),bd()}}):c()}function DE(){var t=Zt,e=Vt,n=Dr,r=hn;return function(o=!0){jo(t),hi(e),wc(n),o&&r?.activate()}}function bd(){jo(null),hi(null),wc(null)}function $p(t){var e=Cr|vi,n=Vt!==null&&(Vt.f&Cr)!==0?Vt:null;return Zt!==null&&(Zt.f|=qc),{ctx:Dr,deps:null,effects:null,equals:$E,f:e,fn:t,reactions:null,rv:0,v:mr,wv:0,parent:n??Zt,ac:null}}function cO(t,e){let n=Zt;n===null&&CN();var r=n.b,i=void 0,o=_s(mr),s=!Vt,a=new Map;return wO(()=>{var c=yE();i=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===hn&&u.committed&&u.deactivate(),bd()})}catch(h){c.reject(h),bd()}var u=hn;if(s){var d=!r.is_pending();r.update_pending_count(1),u.increment(d),a.get(u)?.reject(rc),a.delete(u),a.set(u,c)}const f=(h,p=void 0)=>{if(u.activate(),p)p!==rc&&(o.f|=Ks,hs(o,p));else{(o.f&Ks)!==0&&(o.f^=Ks),hs(o,h);for(const[g,m]of a){if(a.delete(g),g===u)break;m.reject(rc)}}s&&(r.update_pending_count(-1),u.decrement(d))};c.promise.then(f,h=>f(null,h||"unknown"))}),Kd(()=>{for(const c of a.values())c.reject(rc)}),new Promise(c=>{function u(d){function f(){d===i?c(o):u(i)}d.then(f,f)}u(i)})}function b(t){const e=$p(t);return tT(e),e}function h_(t){const e=$p(t);return e.equals=CE,e}function ME(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)$r(e[n])}}function uO(t){for(var e=t.parent;e!==null;){if((e.f&Cr)===0)return(e.f&fs)===0?e:null;e=e.parent}return null}function p_(t){var e,n=Zt;jo(uO(t));try{t.f&=~Ya,ME(t),e=oT(t)}finally{jo(n)}return e}function FE(t){var e=p_(t);if(t.equals(e)||(hn?.is_fork||(t.v=e),t.wv=rT()),!yl)if(Mi!==null)Ap()&&Mi.set(t,e);else{var n=(t.f&co)===0?$s:Rr;Mr(t,n)}}let kv=new Set;const Gs=new Map;let zE=!1;function _s(t,e){var n={f:0,v:t,reactions:null,equals:$E,rv:0,wv:0};return n}function ie(t,e){const n=_s(t);return tT(n),n}function jE(t,e=!1,n=!0){const r=_s(t);return e||(r.equals=CE),r}function K(t,e,n=!1){Vt!==null&&(!Po||(Vt.f&kx)!==0)&&AE()&&(Vt.f&(Cr|Es|u_|kx))!==0&&!ps?.includes(t)&&DN();let r=n?St(e):e;return hs(t,r)}function hs(t,e){if(!t.equals(e)){var n=t.v;yl?Gs.set(t,e):Gs.set(t,n),t.v=e;var r=Qi.ensure();r.capture(t,n),(t.f&Cr)!==0&&((t.f&vi)!==0&&p_(t),Mr(t,(t.f&co)!==0?Rr:$s)),t.wv=rT(),UE(t,vi),Zt!==null&&(Zt.f&Rr)!==0&&(Zt.f&(Ts|_l))===0&&(Ri===null?kO([t]):Ri.push(t)),!r.is_fork&&kv.size>0&&!zE&&dO()}return e}function dO(){zE=!1;var t=Ws;Lh(!0);const e=Array.from(kv);try{for(const n of e)(n.f&Rr)!==0&&Mr(n,$s),Wd(n)&&yd(n)}finally{Lh(t)}kv.clear()}function ed(t){K(t,t.v+1)}function UE(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i],s=o.f,a=(s&vi)===0;if(a&&Mr(o,e),(s&Cr)!==0){var c=o;Mi?.delete(c),(s&Ya)===0&&(s&co&&(o.f|=Ya),UE(c,$s))}else a&&((s&Es)!==0&&os!==null&&os.add(o),Ja(o))}}function St(t){if(typeof t!="object"||t===null||Oo in t)return t;const e=kp(t);if(e!==bE&&e!==EN)return t;var n=new Map,r=xp(t),i=ie(0),o=Da,s=a=>{if(Da===o)return a();var c=Vt,u=Da;hi(null),Cx(o);var d=a();return hi(c),Cx(u),d};return r&&n.set("length",ie(t.length)),new Proxy(t,{defineProperty(a,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&IN();var d=n.get(c);return d===void 0?d=s(()=>{var f=ie(u.value);return n.set(c,f),f}):K(d,u.value,!0),!0},deleteProperty(a,c){var u=n.get(c);if(u===void 0){if(c in a){const d=s(()=>ie(mr));n.set(c,d),ed(i)}}else K(u,mr),ed(i);return!0},get(a,c,u){if(c===Oo)return t;var d=n.get(c),f=c in a;if(d===void 0&&(!f||Hs(a,c)?.writable)&&(d=s(()=>{var p=St(f?a[c]:mr),g=ie(p);return g}),n.set(c,d)),d!==void 0){var h=l(d);return h===mr?void 0:h}return Reflect.get(a,c,u)},getOwnPropertyDescriptor(a,c){var u=Reflect.getOwnPropertyDescriptor(a,c);if(u&&"value"in u){var d=n.get(c);d&&(u.value=l(d))}else if(u===void 0){var f=n.get(c),h=f?.v;if(f!==void 0&&h!==mr)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(a,c){if(c===Oo)return!0;var u=n.get(c),d=u!==void 0&&u.v!==mr||Reflect.has(a,c);if(u!==void 0||Zt!==null&&(!d||Hs(a,c)?.writable)){u===void 0&&(u=s(()=>{var h=d?St(a[c]):mr,p=ie(h);return p}),n.set(c,u));var f=l(u);if(f===mr)return!1}return d},set(a,c,u,d){var f=n.get(c),h=c in a;if(r&&c==="length")for(var p=u;p<f.v;p+=1){var g=n.get(p+"");g!==void 0?K(g,mr):p in a&&(g=s(()=>ie(mr)),n.set(p+"",g))}if(f===void 0)(!h||Hs(a,c)?.writable)&&(f=s(()=>ie(void 0)),K(f,St(u)),n.set(c,f));else{h=f.v!==mr;var m=s(()=>St(u));K(f,m)}var v=Reflect.getOwnPropertyDescriptor(a,c);if(v?.set&&v.set.call(d,u),!h){if(r&&typeof c=="string"){var _=n.get("length"),y=Number(c);Number.isInteger(y)&&y>=_.v&&K(_,y+1)}ed(i)}return!0},ownKeys(a){l(i);var c=Reflect.ownKeys(a).filter(f=>{var h=n.get(f);return h===void 0||h.v!==mr});for(var[u,d]of n)d.v!==mr&&!(u in a)&&c.push(u);return c},setPrototypeOf(){RN()}})}function Ex(t){try{if(t!==null&&typeof t=="object"&&Oo in t)return t[Oo]}catch{}return t}function fO(t,e){return Object.is(Ex(t),Ex(e))}var Xa,g_,BE,qE,VE;function hO(){if(Xa===void 0){Xa=window,g_=document,BE=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;qE=Hs(e,"firstChild").get,VE=Hs(e,"nextSibling").get,xx(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),xx(n)&&(n.__t=void 0)}}function uo(t=""){return document.createTextNode(t)}function zs(t){return qE.call(t)}function Hd(t){return VE.call(t)}function F(t,e){return zs(t)}function D(t,e=!1){{var n=zs(t);return n instanceof Comment&&n.data===""?Hd(n):n}}function z(t,e=1,n=!1){let r=t;for(;e--;)r=Hd(r);return r}function pO(t){t.textContent=""}function HE(){return!1}function gO(t,e){if(e){const n=document.body;t.autofocus=!0,aa(()=>{document.activeElement===n&&t.focus()})}}let Tx=!1;function mO(){Tx||(Tx=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Cp(t){var e=Vt,n=Zt;hi(null),jo(null);try{return t()}finally{hi(e),jo(n)}}function vO(t,e,n,r=n){t.addEventListener(e,()=>Cp(n));const i=t.__on_r;i?t.__on_r=()=>{i(),r(!0)}:t.__on_r=()=>r(!0),mO()}function KE(t){Zt===null&&(Vt===null&&LN(),PN()),yl&&AN()}function bO(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Ko(t,e,n){var r=Zt;r!==null&&(r.f&ki)!==0&&(t|=ki);var i={ctx:Dr,deps:null,nodes_start:null,nodes_end:null,f:t|vi|co,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{yd(i),i.f|=l_}catch(a){throw $r(i),a}else e!==null&&Ja(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&qc)===0&&(o=o.first,(t&Es)!==0&&(t&bs)!==0&&o!==null&&(o.f|=bs)),o!==null&&(o.parent=r,r!==null&&bO(o,r),Vt!==null&&(Vt.f&Cr)!==0&&(t&_l)===0)){var s=Vt;(s.effects??=[]).push(o)}return i}function Ap(){return Vt!==null&&!Po}function Kd(t){const e=Ko(Sp,null,!1);return Mr(e,Rr),e.teardown=t,e}function Me(t){KE();var e=Zt.f,n=!Vt&&(e&Ts)!==0&&(e&l_)===0;if(n){var r=Dr;(r.e??=[]).push(t)}else return GE(t)}function GE(t){return Ko(a_|wE,t,!1)}function _O(t){return KE(),Ko(Sp|wE,t,!0)}function yO(t){Qi.ensure();const e=Ko(_l|qc,t,!0);return(n={})=>new Promise(r=>{n.outro?dc(e,()=>{$r(e),r(void 0)}):($r(e),r(void 0))})}function Hc(t){return Ko(a_,t,!1)}function wO(t){return Ko(u_|qc,t,!0)}function Gd(t,e=0){return Ko(Sp|e,t,!0)}function Z(t,e=[],n=[],r=[]){RE(r,e,n,i=>{Ko(Sp,()=>t(...i.map(l)),!0)})}function mo(t,e=0){var n=Ko(Es|e,t,!0);return n}function di(t){return Ko(Ts|qc,t,!0)}function WE(t){var e=t.teardown;if(e!==null){const n=yl,r=Vt;$x(!0),hi(null);try{e.call(null)}finally{$x(n),hi(r)}}}function YE(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&Cp(()=>{i.abort(rc)});var r=n.next;(n.f&_l)!==0?n.parent=null:$r(n,e),n=r}}function xO(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Ts)===0&&$r(e),e=n}}function $r(t,e=!0){var n=!1;(e||(t.f&c_)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(JE(t.nodes_start,t.nodes_end),n=!0),YE(t,e&&!n),Nh(t,0),Mr(t,fs);var r=t.transitions;if(r!==null)for(const o of r)o.stop();WE(t);var i=t.parent;i!==null&&i.first!==null&&XE(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function JE(t,e){for(;t!==null;){var n=t===e?null:Hd(t);t.remove(),t=n}}function XE(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function dc(t,e,n=!0){var r=[];m_(t,r,!0),ZE(r,()=>{n&&$r(t),e&&e()})}function ZE(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var i of t)i.out(r)}else e()}function m_(t,e,n){if((t.f&ki)===0){if(t.f^=ki,t.transitions!==null)for(const s of t.transitions)(s.is_global||n)&&e.push(s);for(var r=t.first;r!==null;){var i=r.next,o=(r.f&bs)!==0||(r.f&Ts)!==0&&(t.f&Es)!==0;m_(r,e,o?n:!1),r=i}}}function v_(t){QE(t,!0)}function QE(t,e){if((t.f&ki)!==0){t.f^=ki,(t.f&Rr)===0&&(Mr(t,vi),Ja(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&bs)!==0||(n.f&Ts)!==0;QE(n,i?e:!1),n=r}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}function eT(t,e){for(var n=t.nodes_start,r=t.nodes_end;n!==null;){var i=n===r?null:Hd(n);e.append(n),n=i}}let Ws=!1;function Lh(t){Ws=t}let yl=!1;function $x(t){yl=t}let Vt=null,Po=!1;function hi(t){Vt=t}let Zt=null;function jo(t){Zt=t}let ps=null;function tT(t){Vt!==null&&(ps===null?ps=[t]:ps.push(t))}let Wr=null,wi=0,Ri=null;function kO(t){Ri=t}let nT=1,_d=0,Da=_d;function Cx(t){Da=t}function rT(){return++nT}function Wd(t){var e=t.f;if((e&vi)!==0)return!0;if(e&Cr&&(t.f&=~Ya),(e&$s)!==0){var n=t.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i];if(Wd(o)&&FE(o),o.wv>t.wv)return!0}(e&co)!==0&&Mi===null&&Mr(t,Rr)}return!1}function iT(t,e,n=!0){var r=t.reactions;if(r!==null&&!ps?.includes(t))for(var i=0;i<r.length;i++){var o=r[i];(o.f&Cr)!==0?iT(o,e,!1):e===o&&(n?Mr(o,vi):(o.f&Rr)!==0&&Mr(o,$s),Ja(o))}}function oT(t){var e=Wr,n=wi,r=Ri,i=Vt,o=ps,s=Dr,a=Po,c=Da,u=t.f;Wr=null,wi=0,Ri=null,Vt=(u&(Ts|_l))===0?t:null,ps=null,wc(t.ctx),Po=!1,Da=++_d,t.ac!==null&&(Cp(()=>{t.ac.abort(rc)}),t.ac=null);try{t.f|=yv;var d=t.fn,f=d(),h=t.deps;if(Wr!==null){var p;if(Nh(t,wi),h!==null&&wi>0)for(h.length=wi+Wr.length,p=0;p<Wr.length;p++)h[wi+p]=Wr[p];else t.deps=h=Wr;if(Ws&&Ap()&&(t.f&co)!==0)for(p=wi;p<h.length;p++)(h[p].reactions??=[]).push(t)}else h!==null&&wi<h.length&&(Nh(t,wi),h.length=wi);if(AE()&&Ri!==null&&!Po&&h!==null&&(t.f&(Cr|$s|vi))===0)for(p=0;p<Ri.length;p++)iT(Ri[p],t);return i!==null&&i!==t&&(_d++,Ri!==null&&(r===null?r=Ri:r.push(...Ri))),(t.f&Ks)!==0&&(t.f^=Ks),f}catch(g){return NE(g)}finally{t.f^=yv,Wr=e,wi=n,Ri=r,Vt=i,ps=o,wc(s),Po=a,Da=c}}function SO(t,e){let n=e.reactions;if(n!==null){var r=SN.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(e.f&Cr)!==0&&(Wr===null||!Wr.includes(e))&&(Mr(e,$s),(e.f&co)!==0&&(e.f^=co,e.f&=~Ya),ME(e),Nh(e,0))}function Nh(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)SO(t,n[r])}function yd(t){var e=t.f;if((e&fs)===0){Mr(t,Rr);var n=Zt,r=Ws;Zt=t,Ws=!0;try{(e&Es)!==0?xO(t):YE(t),WE(t);var i=oT(t);t.teardown=typeof i=="function"?i:null,t.wv=nT;var o;_v&&XN&&(t.f&vi)!==0&&t.deps}finally{Ws=r,Zt=n}}}async function Ma(){await Promise.resolve(),Vc()}function l(t){var e=t.f,n=(e&Cr)!==0;if(Vt!==null&&!Po){var r=Zt!==null&&(Zt.f&fs)!==0;if(!r&&!ps?.includes(t)){var i=Vt.deps;if((Vt.f&yv)!==0)t.rv<_d&&(t.rv=_d,Wr===null&&i!==null&&i[wi]===t?wi++:Wr===null?Wr=[t]:Wr.includes(t)||Wr.push(t));else{(Vt.deps??=[]).push(t);var o=t.reactions;o===null?t.reactions=[Vt]:o.includes(Vt)||o.push(Vt)}}}if(yl){if(Gs.has(t))return Gs.get(t);if(n){var s=t,a=s.v;return((s.f&Rr)===0&&s.reactions!==null||aT(s))&&(a=p_(s)),Gs.set(s,a),a}}else n&&!Mi?.has(t)&&(s=t,Wd(s)&&FE(s),Ws&&Ap()&&(s.f&co)===0&&sT(s));if(Mi?.has(t))return Mi.get(t);if((t.f&Ks)!==0)throw t.v;return t.v}function sT(t){if(t.deps!==null){t.f^=co;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&Cr)!==0&&(e.f&co)===0&&sT(e)}}function aT(t){if(t.v===mr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Gs.has(e)||(e.f&Cr)!==0&&aT(e))return!0;return!1}function Se(t){var e=Po;try{return Po=!0,t()}finally{Po=e}}const EO=-7169;function Mr(t,e){t.f=t.f&EO|e}function TO(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Oo in t)Sv(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];typeof n=="object"&&n&&Oo in n&&Sv(n)}}}function Sv(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let r in t)try{Sv(t[r],e)}catch{}const n=kp(t);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=vE(n);for(let i in r){const o=r[i].get;if(o)try{o.call(t)}catch{}}}}}function $O(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const CO=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function AO(t){return CO.includes(t)}const PO={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function LO(t){return t=t.toLowerCase(),PO[t]??t}const NO=["touchstart","touchmove"];function OO(t){return NO.includes(t)}const lT=new Set,Ev=new Set;function b_(t,e,n,r={}){function i(o){if(r.capture||ju.call(e,o),!o.cancelBubble)return Cp(()=>n?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?aa(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function Tu(t,e,n,r={}){var i=b_(e,t,n,r);return()=>{t.removeEventListener(e,i,r)}}function Xr(t,e,n,r,i){var o={capture:r,passive:i},s=b_(t,e,n,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Kd(()=>{e.removeEventListener(t,s,o)})}function wl(t){for(var e=0;e<t.length;e++)lT.add(t[e]);for(var n of Ev)n(t)}let Ax=null;function ju(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],o=i[0]||t.target;Ax=t;var s=0,a=Ax===t&&t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;c<=u&&(s=c)}if(o=i[s]||t.target,o!==e){mE(t,"currentTarget",{configurable:!0,get(){return o||n}});var d=Vt,f=Zt;hi(null),jo(null);try{for(var h,p=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var m=o["__"+r];m!=null&&(!o.disabled||t.target===o)&&m.call(o,t)}catch(v){h?p.push(v):h=v}if(t.cancelBubble||g===e||g===null)break;o=g}if(h){for(let v of p)queueMicrotask(()=>{throw v});throw h}}finally{t.__root=e,delete t.currentTarget,hi(d),jo(f)}}}function cT(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function kc(t,e){var n=Zt;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function j(t,e){var n=(e&VN)!==0,r=(e&HN)!==0,i,o=!t.startsWith("<!>");return()=>{i===void 0&&(i=cT(o?t:"<!>"+t),n||(i=zs(i)));var s=r||BE?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=zs(s),c=s.lastChild;kc(a,c)}else kc(s,s);return s}}function Fe(t=""){{var e=uo(t+"");return kc(e,e),e}}function X(){var t=document.createDocumentFragment(),e=document.createComment(""),n=uo();return t.append(e,n),kc(e,n),t}function S(t,e){t!==null&&t.before(e)}function Vn(){return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function ne(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function Pp(t,e){return IO(t,e)}const Bl=new Map;function IO(t,{target:e,anchor:n,props:r={},events:i,context:o,intro:s=!0}){hO();var a=new Set,c=f=>{for(var h=0;h<f.length;h++){var p=f[h];if(!a.has(p)){a.add(p);var g=OO(p);e.addEventListener(p,ju,{passive:g});var m=Bl.get(p);m===void 0?(document.addEventListener(p,ju,{passive:g}),Bl.set(p,1)):Bl.set(p,m+1)}}};c(s_(lT)),Ev.add(c);var u=void 0,d=yO(()=>{var f=n??e.appendChild(uo());return iO(f,{pending:()=>{}},h=>{if(o){se({});var p=Dr;p.c=o}i&&(r.$$events=i),u=t(h,r)||{},o&&ae()}),()=>{for(var h of a){e.removeEventListener(h,ju);var p=Bl.get(h);--p===0?(document.removeEventListener(h,ju),Bl.delete(h)):Bl.set(h,p)}Ev.delete(c),f!==n&&f.parentNode?.removeChild(f)}});return Tv.set(u,d),u}let Tv=new WeakMap;function uT(t,e){const n=Tv.get(t);return n?(Tv.delete(t),n(e)):Promise.resolve()}class Kc{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#l=!0;constructor(e,n=!0){this.anchor=e,this.#l=n}#s=()=>{var e=hn;if(this.#e.has(e)){var n=this.#e.get(e),r=this.#n.get(n);if(r)v_(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of this.#e){if(this.#e.delete(o),o===e)break;const a=this.#t.get(s);a&&($r(a.effect),this.#t.delete(s))}for(const[o,s]of this.#n){if(o===n||this.#i.has(o))continue;const a=()=>{if(Array.from(this.#e.values()).includes(o)){var u=document.createDocumentFragment();eT(s,u),u.append(uo()),this.#t.set(o,{effect:s,fragment:u})}else $r(s);this.#i.delete(o),this.#n.delete(o)};this.#l||!r?(this.#i.add(o),dc(s,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||($r(i.effect),this.#t.delete(r))};ensure(e,n){var r=hn,i=HE();if(n&&!this.#n.has(e)&&!this.#t.has(e))if(i){var o=document.createDocumentFragment(),s=uo();o.append(s),this.#t.set(e,{effect:di(()=>n(s)),fragment:o})}else this.#n.set(e,di(()=>n(this.anchor)));if(this.#e.set(r,e),i){for(const[a,c]of this.#n)a===e?r.skipped_effects.delete(c):r.skipped_effects.add(c);for(const[a,c]of this.#t)a===e?r.skipped_effects.delete(c.effect):r.skipped_effects.add(c.effect);r.oncommit(this.#s),r.ondiscard(this.#a)}else this.#s()}}const RO=0,qg=1;function kn(t,e,n,r,i){var o=mr,s=_s(o),a=_s(o),c=new Kc(t);mo(()=>{var u=e(),d=!1;if(TN(u)){var f=DE(),h=!1;const p=g=>{if(!d){h=!0,f(!1),Qi.ensure();try{g()}finally{bd(),uc||Vc()}}};u.then(g=>{p(()=>{hs(s,g),c.ensure(qg,r&&(m=>r(m,s)))})},g=>{p(()=>{if(hs(a,g),c.ensure(qg,i&&(m=>i(m,a))),!i)throw a.v})}),aa(()=>{h||p(()=>{c.ensure(RO,n)})})}else hs(s,u),c.ensure(qg,r&&(p=>r(p,s)));return()=>{d=!0}})}function q(t,e,n=!1){var r=new Kc(t),i=n?bs:0;function o(s,a){r.ensure(s,a)}mo(()=>{var s=!1;e((a,c=!0)=>{s=!0,o(c,a)}),s||o(!1,null)},i)}function or(t,e,n){var r=new Kc(t);mo(()=>{var i=e();r.ensure(i,n)})}function Gc(t,e){Gd(()=>{var n=e();for(var r in n){var i=n[r];i?t.style.setProperty(r,i):t.style.removeProperty(r)}})}function cr(t,e,n=!1,r=!1,i=!1){var o=t,s="";Z(()=>{var a=Zt;if(s!==(s=e()??"")&&(a.nodes_start!==null&&(JE(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),s!=="")){var c=s+"";n?c=`<svg>${c}</svg>`:r&&(c=`<math>${c}</math>`);var u=cT(c);if((n||r)&&(u=zs(u)),kc(zs(u),u.lastChild),n||r)for(;zs(u);)o.before(zs(u));else o.before(u)}})}function Ue(t,e,...n){var r=new Kc(t);mo(()=>{const i=e()??null;r.ensure(i,i&&(o=>i(o,...n)))},bs)}function ur(t,e,n){var r=new Kc(t);mo(()=>{var i=e()??null;r.ensure(i,i&&(o=>n(o,i)))},bs)}function DO(t,e,n,r,i,o){var s=null,a=t,c=new Kc(a,!1);mo(()=>{const u=e()||null;var d=u==="svg"?GN:null;if(u===null){c.ensure(null,null);return}return c.ensure(u,f=>{if(u){if(s=d?document.createElementNS(d,u):document.createElement(u),kc(s,s),r){var h=s.appendChild(uo());r(s,h)}Zt.nodes_end=s,f.before(s)}}),()=>{}},bs),Kd(()=>{})}function dT(t,e){var n;n=document.head.appendChild(uo());try{mo(()=>e(n),c_)}finally{}}function Ee(t,e){Hc(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}function la(t,e,n){Hc(()=>{var r=Se(()=>e(t,n?.())||{});if(n&&r?.update){var i=!1,o={};Gd(()=>{var s=n();TO(s),i&&d_(o,s)&&(o=s,r.update(s))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function MO(t,e){var n=void 0,r;mo(()=>{n!==(n=e())&&(r&&($r(r),r=null),n&&(r=di(()=>{Hc(()=>n(t))})))})}function fT(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=fT(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function FO(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=fT(t))&&(r&&(r+=" "),r+=e);return r}function hT(t){return typeof t=="object"?FO(t):t??""}const Px=[...`
|
|
1
|
+
var mx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ss(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fg={exports:{}},yt={};var vx;function bN(){if(vx)return yt;vx=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function p(R){return R===null||typeof R!="object"?null:(R=h&&R[h]||R["@@iterator"],typeof R=="function"?R:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function _(R,B,J){this.props=R,this.context=B,this.refs=v,this.updater=J||g}_.prototype.isReactComponent={},_.prototype.setState=function(R,B){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,B,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function y(){}y.prototype=_.prototype;function w(R,B,J){this.props=R,this.context=B,this.refs=v,this.updater=J||g}var x=w.prototype=new y;x.constructor=w,m(x,_.prototype),x.isPureReactComponent=!0;var E=Array.isArray;function $(){}var C={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function T(R,B,J){var Q=J.ref;return{$$typeof:t,type:R,key:B,ref:Q!==void 0?Q:null,props:J}}function A(R,B){return T(R.type,B,R.props)}function P(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function L(R){var B={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return B[J]})}var O=/\/+/g;function N(R,B){return typeof R=="object"&&R!==null&&R.key!=null?L(""+R.key):B.toString(36)}function M(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then($,$):(R.status="pending",R.then(function(B){R.status==="pending"&&(R.status="fulfilled",R.value=B)},function(B){R.status==="pending"&&(R.status="rejected",R.reason=B)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function U(R,B,J,Q,ee){var te=typeof R;(te==="undefined"||te==="boolean")&&(R=null);var re=!1;if(R===null)re=!0;else switch(te){case"bigint":case"string":case"number":re=!0;break;case"object":switch(R.$$typeof){case t:case e:re=!0;break;case d:return re=R._init,U(re(R._payload),B,J,Q,ee)}}if(re)return ee=ee(R),re=Q===""?"."+N(R,0):Q,E(ee)?(J="",re!=null&&(J=re.replace(O,"$&/")+"/"),U(ee,B,J,"",function(ce){return ce})):ee!=null&&(P(ee)&&(ee=A(ee,J+(ee.key==null||R&&R.key===ee.key?"":(""+ee.key).replace(O,"$&/")+"/")+re)),B.push(ee)),1;re=0;var he=Q===""?".":Q+":";if(E(R))for(var pe=0;pe<R.length;pe++)Q=R[pe],te=he+N(Q,pe),re+=U(Q,B,J,te,ee);else if(pe=p(R),typeof pe=="function")for(R=pe.call(R),pe=0;!(Q=R.next()).done;)Q=Q.value,te=he+N(Q,pe++),re+=U(Q,B,J,te,ee);else if(te==="object"){if(typeof R.then=="function")return U(M(R),B,J,Q,ee);throw B=String(R),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return re}function H(R,B,J){if(R==null)return R;var Q=[],ee=0;return U(R,Q,"","",function(te){return B.call(J,te,ee++)}),Q}function G(R){if(R._status===-1){var B=R._result;B=B(),B.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=B)}if(R._status===1)return R._result.default;throw R._result}var W=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},Y={map:H,forEach:function(R,B,J){H(R,function(){B.apply(this,arguments)},J)},count:function(R){var B=0;return H(R,function(){B++}),B},toArray:function(R){return H(R,function(B){return B})||[]},only:function(R){if(!P(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return yt.Activity=f,yt.Children=Y,yt.Component=_,yt.Fragment=n,yt.Profiler=i,yt.PureComponent=w,yt.StrictMode=r,yt.Suspense=c,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,yt.__COMPILER_RUNTIME={__proto__:null,c:function(R){return C.H.useMemoCache(R)}},yt.cache=function(R){return function(){return R.apply(null,arguments)}},yt.cacheSignal=function(){return null},yt.cloneElement=function(R,B,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Q=m({},R.props),ee=R.key;if(B!=null)for(te in B.key!==void 0&&(ee=""+B.key),B)!k.call(B,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&B.ref===void 0||(Q[te]=B[te]);var te=arguments.length-2;if(te===1)Q.children=J;else if(1<te){for(var re=Array(te),he=0;he<te;he++)re[he]=arguments[he+2];Q.children=re}return T(R.type,ee,Q)},yt.createContext=function(R){return R={$$typeof:s,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},yt.createElement=function(R,B,J){var Q,ee={},te=null;if(B!=null)for(Q in B.key!==void 0&&(te=""+B.key),B)k.call(B,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=B[Q]);var re=arguments.length-2;if(re===1)ee.children=J;else if(1<re){for(var he=Array(re),pe=0;pe<re;pe++)he[pe]=arguments[pe+2];ee.children=he}if(R&&R.defaultProps)for(Q in re=R.defaultProps,re)ee[Q]===void 0&&(ee[Q]=re[Q]);return T(R,te,ee)},yt.createRef=function(){return{current:null}},yt.forwardRef=function(R){return{$$typeof:a,render:R}},yt.isValidElement=P,yt.lazy=function(R){return{$$typeof:d,_payload:{_status:-1,_result:R},_init:G}},yt.memo=function(R,B){return{$$typeof:u,type:R,compare:B===void 0?null:B}},yt.startTransition=function(R){var B=C.T,J={};C.T=J;try{var Q=R(),ee=C.S;ee!==null&&ee(J,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then($,W)}catch(te){W(te)}finally{B!==null&&J.types!==null&&(B.types=J.types),C.T=B}},yt.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},yt.use=function(R){return C.H.use(R)},yt.useActionState=function(R,B,J){return C.H.useActionState(R,B,J)},yt.useCallback=function(R,B){return C.H.useCallback(R,B)},yt.useContext=function(R){return C.H.useContext(R)},yt.useDebugValue=function(){},yt.useDeferredValue=function(R,B){return C.H.useDeferredValue(R,B)},yt.useEffect=function(R,B){return C.H.useEffect(R,B)},yt.useEffectEvent=function(R){return C.H.useEffectEvent(R)},yt.useId=function(){return C.H.useId()},yt.useImperativeHandle=function(R,B,J){return C.H.useImperativeHandle(R,B,J)},yt.useInsertionEffect=function(R,B){return C.H.useInsertionEffect(R,B)},yt.useLayoutEffect=function(R,B){return C.H.useLayoutEffect(R,B)},yt.useMemo=function(R,B){return C.H.useMemo(R,B)},yt.useOptimistic=function(R,B){return C.H.useOptimistic(R,B)},yt.useReducer=function(R,B,J){return C.H.useReducer(R,B,J)},yt.useRef=function(R){return C.H.useRef(R)},yt.useState=function(R){return C.H.useState(R)},yt.useSyncExternalStore=function(R,B,J){return C.H.useSyncExternalStore(R,B,J)},yt.useTransition=function(){return C.H.useTransition()},yt.version="19.2.0",yt}var bx;function pE(){return bx||(bx=1,Fg.exports=bN()),Fg.exports}var zg,_x;function _N(){if(_x)return zg;_x=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zg=i()?Object.assign:function(o,s){for(var a,c=r(o),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)e.call(a,f)&&(c[f]=a[f]);if(t){u=t(a);for(var h=0;h<u.length;h++)n.call(a,u[h])&&(c[u[h]]=a[u[h]])}}return c},zg}var jg,yx;function yN(){if(yx)return jg;yx=1;var t=_N(),e={};function n(s,a,c,u,d,f,h,p){if(!s){var g;if(a===void 0)g=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var m=[c,u,d,f,h,p],v=0;g=new Error(a.replace(/%s/g,function(){return m[v++]})),g.name="Invariant Violation"}throw g.framesToPop=1,g}}var r="mixins";function i(s){return s}function o(s,a,c){var u=[],d={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},f={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},h={displayName:function(A,P){A.displayName=P},mixins:function(A,P){if(P)for(var L=0;L<P.length;L++)g(A,P[L])},childContextTypes:function(A,P){A.childContextTypes=t({},A.childContextTypes,P)},contextTypes:function(A,P){A.contextTypes=t({},A.contextTypes,P)},getDefaultProps:function(A,P){A.getDefaultProps?A.getDefaultProps=_(A.getDefaultProps,P):A.getDefaultProps=P},propTypes:function(A,P){A.propTypes=t({},A.propTypes,P)},statics:function(A,P){m(A,P)},autobind:function(){}};function p(A,P){var L=d.hasOwnProperty(P)?d[P]:null;C.hasOwnProperty(P)&&n(L==="OVERRIDE_BASE","ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",P),A&&n(L==="DEFINE_MANY"||L==="DEFINE_MANY_MERGED","ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",P)}function g(A,P){if(P){n(typeof P!="function","ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),n(!a(P),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var L=A.prototype,O=L.__reactAutoBindPairs;P.hasOwnProperty(r)&&h.mixins(A,P.mixins);for(var N in P)if(P.hasOwnProperty(N)&&N!==r){var M=P[N],U=L.hasOwnProperty(N);if(p(U,N),h.hasOwnProperty(N))h[N](A,M);else{var H=d.hasOwnProperty(N),G=typeof M=="function",W=G&&!H&&!U&&P.autobind!==!1;if(W)O.push(N,M),L[N]=M;else if(U){var Y=d[N];n(H&&(Y==="DEFINE_MANY_MERGED"||Y==="DEFINE_MANY"),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",Y,N),Y==="DEFINE_MANY_MERGED"?L[N]=_(L[N],M):Y==="DEFINE_MANY"&&(L[N]=y(L[N],M))}else L[N]=M}}}}function m(A,P){if(P)for(var L in P){var O=P[L];if(P.hasOwnProperty(L)){var N=L in h;n(!N,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',L);var M=L in A;if(M){var U=f.hasOwnProperty(L)?f[L]:null;n(U==="DEFINE_MANY_MERGED","ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",L),A[L]=_(A[L],O);return}A[L]=O}}}function v(A,P){n(A&&P&&typeof A=="object"&&typeof P=="object","mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var L in P)P.hasOwnProperty(L)&&(n(A[L]===void 0,"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",L),A[L]=P[L]);return A}function _(A,P){return function(){var O=A.apply(this,arguments),N=P.apply(this,arguments);if(O==null)return N;if(N==null)return O;var M={};return v(M,O),v(M,N),M}}function y(A,P){return function(){A.apply(this,arguments),P.apply(this,arguments)}}function w(A,P){var L=P.bind(A);return L}function x(A){for(var P=A.__reactAutoBindPairs,L=0;L<P.length;L+=2){var O=P[L],N=P[L+1];A[O]=w(A,N)}}var E={componentDidMount:function(){this.__isMounted=!0}},$={componentWillUnmount:function(){this.__isMounted=!1}},C={replaceState:function(A,P){this.updater.enqueueReplaceState(this,A,P)},isMounted:function(){return!!this.__isMounted}},k=function(){};t(k.prototype,s.prototype,C);function T(A){var P=function(O,N,M){this.__reactAutoBindPairs.length&&x(this),this.props=O,this.context=N,this.refs=e,this.updater=M||c,this.state=null;var U=this.getInitialState?this.getInitialState():null;n(typeof U=="object"&&!Array.isArray(U),"%s.getInitialState(): must return an object or null",P.displayName||"ReactCompositeComponent"),this.state=U};P.prototype=new k,P.prototype.constructor=P,P.prototype.__reactAutoBindPairs=[],u.forEach(g.bind(null,P)),g(P,E),g(P,A),g(P,$),P.getDefaultProps&&(P.defaultProps=P.getDefaultProps()),n(P.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var L in d)P.prototype[L]||(P.prototype[L]=null);return P}return T}return jg=o,jg}var Ug,wx;function wN(){if(wx)return Ug;wx=1;var t=pE(),e=yN();if(typeof t>"u")throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var n=new t.Component().updater;return Ug=e(t.Component,t.isValidElement,n),Ug}var xN=wN();const kN=Ss(xN);var gE=pE();const _v=!1;var xp=Array.isArray,SN=Array.prototype.indexOf,s_=Array.from,mE=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,vE=Object.getOwnPropertyDescriptors,bE=Object.prototype,EN=Array.prototype,kp=Object.getPrototypeOf,xx=Object.isExtensible;function Eu(t){return typeof t=="function"}const qe=()=>{};function TN(t){return typeof t?.then=="function"}function _E(t){for(var e=0;e<t.length;e++)t[e]()}function yE(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}function st(t,e,n=!1){return t===void 0?n?e():e:t}function ji(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const Cr=2,a_=4,Sp=8,Es=16,Ts=32,_l=64,Ep=128,co=512,Rr=1024,vi=2048,$s=4096,ki=8192,fs=16384,l_=32768,bs=65536,kx=1<<17,c_=1<<18,qc=1<<19,wE=1<<20,Ya=32768,yv=1<<21,u_=1<<22,Ks=1<<23,Oo=Symbol("$state"),xE=Symbol("legacy props"),$N=Symbol(""),rc=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function kE(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function CN(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function AN(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function PN(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function LN(t){throw new Error("https://svelte.dev/e/effect_orphan")}function NN(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ON(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function IN(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function RN(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function DN(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function MN(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const SE=1,EE=2,TE=4,FN=8,zN=16,jN=1,UN=4,BN=8,qN=16,VN=1,HN=2,mr=Symbol(),KN="http://www.w3.org/1999/xhtml",GN="http://www.w3.org/2000/svg",WN="@attach";function YN(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function JN(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function $E(t){return t===this.v}function d_(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function CE(t){return!d_(t,this.v)}let XN=!1;const ZN=[];function Un(t,e=!1,n=!1){return lh(t,new Map,"",ZN,null,n)}function lh(t,e,n,r,i=null,o=!1){if(typeof t=="object"&&t!==null){var s=e.get(t);if(s!==void 0)return s;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(xp(t)){var a=Array(t.length);e.set(t,a),i!==null&&e.set(i,a);for(var c=0;c<t.length;c+=1){var u=t[c];c in t&&(a[c]=lh(u,e,n,r,null,o))}return a}if(kp(t)===bE){a={},e.set(t,a),i!==null&&e.set(i,a);for(var d in t)a[d]=lh(t[d],e,n,r,null,o);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!o)return lh(t.toJSON(),e,n,r,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}let Dr=null;function wc(t){Dr=t}function sr(t){return PE().get(t)}function f_(t,e){return PE().set(t,e),e}function se(t,e=!1,n){Dr={p:Dr,i:!1,c:null,e:null,s:t,x:null,l:null}}function ae(t){var e=Dr,n=e.e;if(n!==null){e.e=null;for(var r of n)GE(r)}return t!==void 0&&(e.x=t),e.i=!0,Dr=e.p,t??{}}function AE(){return!0}function PE(t){return Dr===null&&kE(),Dr.c??=new Map(QN(Dr)||void 0)}function QN(t){let e=t.p;for(;e!==null;){const n=e.c;if(n!==null)return n;e=e.p}return null}let $a=[];function LE(){var t=$a;$a=[],_E(t)}function aa(t){if($a.length===0&&!uc){var e=$a;queueMicrotask(()=>{e===$a&&LE()})}$a.push(t)}function eO(){for(;$a.length>0;)LE()}function NE(t){var e=Zt;if(e===null)return Vt.f|=Ks,t;if((e.f&l_)===0){if((e.f&Ep)===0)throw t;e.b.error(t)}else xc(t,e)}function xc(t,e){for(;e!==null;){if((e.f&Ep)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t}const Rf=new Set;let hn=null,ch=null,Mi=null,Di=[],Tp=null,wv=!1,uc=!1;class Qi{committed=!1;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=0;#i=0;#l=null;#s=[];#a=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#i>0}process(e){Di=[],ch=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of e)this.#r(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects)):(ch=this,hn=null,Sx(n.render_effects),Sx(n.effects),ch=null,this.#l?.resolve()),Mi=null}#r(e,n){e.f^=Rr;for(var r=e.first;r!==null;){var i=r.f,o=(i&(Ts|_l))!==0,s=o&&(i&Rr)!==0,a=s||(i&ki)!==0||this.skipped_effects.has(r);if((r.f&Ep)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!a&&r.fn!==null){o?r.f^=Rr:(i&a_)!==0?n.effects.push(r):Wd(r)&&((r.f&Es)!==0&&n.block_effects.push(r),yd(r));var c=r.first;if(c!==null){r=c;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)u===n.effect&&(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects),n=n.parent),r=u.next,u=u.parent}}#o(e){for(const n of e)((n.f&vi)!==0?this.#s:this.#a).push(n),this.#c(n.deps),Mr(n,Rr)}#c(e){if(e!==null)for(const n of e)(n.f&Cr)===0||(n.f&Ya)===0||(n.f^=Ya,this.#c(n.deps))}capture(e,n){this.previous.has(e)||this.previous.set(e,n),(e.f&Ks)===0&&(this.current.set(e,e.v),Mi?.set(e,e.v))}activate(){hn=this,this.apply()}deactivate(){hn===this&&(hn=null,Mi=null)}flush(){if(this.activate(),Di.length>0){if(xv(),hn!==null&&hn!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#n)e(this);this.#n.clear()}#u(){if(this.#i===0){for(const e of this.#e)e();this.#e.clear()}this.#t===0&&this.#d()}#d(){if(Rf.size>1){this.previous.clear();var e=Mi,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const o of Rf){if(o===this){n=!1;continue}const s=[];for(const[c,u]of this.current){if(o.current.has(c))if(n&&u!==o.current.get(c))o.current.set(c,u);else continue;s.push(c)}if(s.length===0)continue;const a=[...o.current.keys()].filter(c=>!this.current.has(c));if(a.length>0){var i=Di;Di=[];const c=new Set,u=new Map;for(const d of s)OE(d,a,c,u);if(Di.length>0){hn=o,o.apply();for(const d of Di)o.#r(d,r);o.deactivate()}Di=i}}hn=null,Mi=e}this.committed=!0,Rf.delete(this)}increment(e){this.#t+=1,e&&(this.#i+=1)}decrement(e){this.#t-=1,e&&(this.#i-=1),this.revive()}revive(){for(const e of this.#s)Mr(e,vi),Ja(e);for(const e of this.#a)Mr(e,$s),Ja(e);this.#s=[],this.#a=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#n.add(e)}settled(){return(this.#l??=yE()).promise}static ensure(){if(hn===null){const e=hn=new Qi;Rf.add(hn),uc||Qi.enqueue(()=>{hn===e&&e.flush()})}return hn}static enqueue(e){aa(e)}apply(){}}function Vc(t){var e=uc;uc=!0;try{var n;for(t&&(hn!==null&&xv(),n=t());;){if(eO(),Di.length===0&&(hn?.flush(),Di.length===0))return Tp=null,n;xv()}}finally{uc=e}}function xv(){var t=Ws;wv=!0;var e=null;try{var n=0;for(Lh(!0);Di.length>0;){var r=Qi.ensure();if(n++>1e3){var i,o;tO()}r.process(Di),Gs.clear()}}finally{wv=!1,Lh(t),Tp=null}}function tO(){try{NN()}catch(t){xc(t,Tp)}}let os=null;function Sx(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(fs|ki))===0&&Wd(r)&&(os=new Set,yd(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?XE(r):r.fn=null),os?.size>0)){Gs.clear();for(const i of os){if((i.f&(fs|ki))!==0)continue;const o=[i];let s=i.parent;for(;s!==null;)os.has(s)&&(os.delete(s),o.push(s)),s=s.parent;for(let a=o.length-1;a>=0;a--){const c=o[a];(c.f&(fs|ki))===0&&yd(c)}}os.clear()}}os=null}}function OE(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const o=i.f;(o&Cr)!==0?OE(i,e,n,r):(o&(u_|Es))!==0&&(o&vi)===0&&IE(i,e,r)&&(Mr(i,vi),Ja(i))}}function IE(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(e.includes(i))return!0;if((i.f&Cr)!==0&&IE(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function Ja(t){for(var e=Tp=t;e.parent!==null;){e=e.parent;var n=e.f;if(wv&&e===Zt&&(n&Es)!==0&&(n&c_)===0)return;if((n&(_l|Ts))!==0){if((n&Rr)===0)return;e.f^=Rr}}Di.push(e)}function nO(t){let e=0,n=_s(0),r;return()=>{Ap()&&(l(n),Gd(()=>(e===0&&(r=Se(()=>t(()=>ed(n)))),e+=1,()=>{aa(()=>{e-=1,e===0&&(r?.(),r=void 0,ed(n))})})))}}var rO=bs|qc|Ep;function iO(t,e,n){new oO(t,e,n)}class oO{parent;#e=!1;#n;#t=null;#i;#l;#s;#a=null;#r=null;#o=null;#c=null;#u=null;#d=0;#f=0;#p=!1;#h=null;#_=nO(()=>(this.#h=_s(this.#d),()=>{this.#h=null}));constructor(e,n,r){this.#n=e,this.#i=n,this.#l=r,this.parent=Zt.b,this.#e=!!this.#i.pending,this.#s=mo(()=>{Zt.b=this;{var i=this.#v();try{this.#a=di(()=>r(i))}catch(o){this.error(o)}this.#f>0?this.#m():this.#e=!1}return()=>{this.#u?.remove()}},rO)}#y(){try{this.#a=di(()=>this.#l(this.#n))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#i.pending;e&&(this.#r=di(()=>e(this.#n)),Qi.enqueue(()=>{var n=this.#v();this.#a=this.#g(()=>(Qi.ensure(),di(()=>this.#l(n)))),this.#f>0?this.#m():(dc(this.#r,()=>{this.#r=null}),this.#e=!1)}))}#v(){var e=this.#n;return this.#e&&(this.#u=uo(),this.#n.before(this.#u),e=this.#u),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#g(e){var n=Zt,r=Vt,i=Dr;jo(this.#s),hi(this.#s),wc(this.#s.ctx);try{return e()}catch(o){return NE(o),null}finally{jo(n),hi(r),wc(i)}}#m(){const e=this.#i.pending;this.#a!==null&&(this.#c=document.createDocumentFragment(),this.#c.append(this.#u),eT(this.#a,this.#c)),this.#r===null&&(this.#r=di(()=>e(this.#n)))}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#r&&dc(this.#r,()=>{this.#r=null}),this.#c&&(this.#n.before(this.#c),this.#c=null))}update_pending_count(e){this.#b(e),this.#d+=e,this.#h&&hs(this.#h,this.#d)}get_effect_pending(){return this.#_(),l(this.#h)}error(e){var n=this.#i.onerror;let r=this.#i.failed;if(this.#p||!n&&!r)throw e;this.#a&&($r(this.#a),this.#a=null),this.#r&&($r(this.#r),this.#r=null),this.#o&&($r(this.#o),this.#o=null);var i=!1,o=!1;const s=()=>{if(i){JN();return}i=!0,o&&MN(),Qi.ensure(),this.#d=0,this.#o!==null&&dc(this.#o,()=>{this.#o=null}),this.#e=this.has_pending_snippet(),this.#a=this.#g(()=>(this.#p=!1,di(()=>this.#l(this.#n)))),this.#f>0?this.#m():this.#e=!1};var a=Vt;try{hi(null),o=!0,n?.(e,s),o=!1}catch(c){xc(c,this.#s&&this.#s.parent)}finally{hi(a)}r&&aa(()=>{this.#o=this.#g(()=>{Qi.ensure(),this.#p=!0;try{return di(()=>{r(this.#n,()=>e,()=>s)})}catch(c){return xc(c,this.#s.parent),null}finally{this.#p=!1}})})}}function dr(t,e){return e}function sO(t,e,n){for(var r=[],i=e.length,o=0;o<i;o++)m_(e[o].e,r,!0);ZE(r,()=>{var s=r.length===0&&n!==null;if(s){var a=n,c=a.parentNode;pO(c),c.append(a),t.items.clear(),ko(t,e[0].prev,e[i-1].next)}for(var u=0;u<i;u++){var d=e[u];s||(t.items.delete(d.k),ko(t,d.prev,d.next)),$r(d.e,!s)}t.first===e[0]&&(t.first=e[0].prev)})}function it(t,e,n,r,i,o=null){var s=t,a=new Map,c=null,u=(e&TE)!==0,d=(e&SE)!==0,f=(e&EE)!==0;if(u){var h=t;s=h.appendChild(uo())}var p=null,g=h_(()=>{var x=n();return xp(x)?x:x==null?[]:s_(x)}),m,v=!0;function _(){aO(w,m,s,e,r),p!==null&&(m.length===0?(p.fragment?(s.before(p.fragment),p.fragment=null):v_(p.effect),y.first=p.effect):dc(p.effect,()=>{p=null}))}var y=mo(()=>{m=l(g);for(var x=m.length,E=new Set,$=hn,C=null,k=HE(),T=0;T<x;T+=1){var A=m[T],P=r(A,T),L=v?null:a.get(P);L?(d&&hs(L.v,A),f?hs(L.i,T):L.i=T,k&&$.skipped_effects.delete(L.e)):(L=lO(v?s:null,C,A,P,T,i,e,n),v&&(L.o=!0,C===null?c=L:C.next=L,C=L),a.set(P,L)),E.add(P)}if(x===0&&o&&!p)if(v)p={fragment:null,effect:di(()=>o(s))};else{var O=document.createDocumentFragment(),N=uo();O.append(N),p={fragment:O,effect:di(()=>o(N))}}if(!v)if(k){for(const[M,U]of a)E.has(M)||$.skipped_effects.add(U.e);$.oncommit(_),$.ondiscard(()=>{})}else _();l(g)}),w={effect:y,items:a,first:c};v=!1}function aO(t,e,n,r,i){var o=(r&FN)!==0,s=e.length,a=t.items,c=t.first,u,d=null,f,h=[],p=[],g,m,v,_;if(o)for(_=0;_<s;_+=1)g=e[_],m=i(g,_),v=a.get(m),v.a?.measure(),(f??=new Set).add(v);for(_=0;_<s;_+=1){if(g=e[_],m=i(g,_),v=a.get(m),t.first??=v,!v.o){v.o=!0;var y=d?d.next:c;ko(t,d,v),ko(t,v,y),Bg(v,y,n),d=v,h=[],p=[],c=d.next;continue}if((v.e.f&ki)!==0&&(v_(v.e),o&&(v.a?.unfix(),(f??=new Set).delete(v))),v!==c){if(u!==void 0&&u.has(v)){if(h.length<p.length){var w=p[0],x;d=w.prev;var E=h[0],$=h[h.length-1];for(x=0;x<h.length;x+=1)Bg(h[x],w,n);for(x=0;x<p.length;x+=1)u.delete(p[x]);ko(t,E.prev,$.next),ko(t,d,E),ko(t,$,w),c=w,d=$,_-=1,h=[],p=[]}else u.delete(v),Bg(v,c,n),ko(t,v.prev,v.next),ko(t,v,d===null?t.first:d.next),ko(t,d,v),d=v;continue}for(h=[],p=[];c!==null&&c.k!==m;)(c.e.f&ki)===0&&(u??=new Set).add(c),p.push(c),c=c.next;if(c===null)continue;v=c}h.push(v),d=v,c=v.next}if(c!==null||u!==void 0){for(var C=u===void 0?[]:s_(u);c!==null;)(c.e.f&ki)===0&&C.push(c),c=c.next;var k=C.length;if(k>0){var T=(r&TE)!==0&&s===0?n:null;if(o){for(_=0;_<k;_+=1)C[_].a?.measure();for(_=0;_<k;_+=1)C[_].a?.fix()}sO(t,C,T)}}o&&aa(()=>{if(f!==void 0)for(v of f)v.a?.apply()})}function lO(t,e,n,r,i,o,s,a){var c=(s&SE)!==0,u=(s&zN)===0,d=c?u?jE(n,!1,!1):_s(n):n,f=(s&EE)===0?i:_s(i),h={i:f,v:d,k:r,a:null,e:null,o:!1,prev:e,next:null};try{if(t===null){var p=document.createDocumentFragment();p.append(t=uo())}return h.e=di(()=>o(t,d,f,a)),e!==null&&(e.next=h),h}finally{}}function Bg(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,i=e?e.e.nodes_start:n,o=t.e.nodes_start;o!==null&&o!==r;){var s=Hd(o);i.before(o),o=s}}function ko(t,e,n){e===null?(t.first=n,t.effect.first=n&&n.e):(e.e.next&&(e.e.next.prev=null),e.next=n,e.e.next=n&&n.e),n===null?t.effect.last=e&&e.e:(n.e.prev&&(n.e.prev.next=null),n.prev=e,n.e.prev=e&&e.e)}function RE(t,e,n,r){const i=$p;if(n.length===0&&t.length===0){r(e.map(i));return}var o=hn,s=Zt,a=DE();function c(){Promise.all(n.map(u=>cO(u))).then(u=>{a();try{r([...e.map(i),...u])}catch(d){(s.f&fs)===0&&xc(d,s)}o?.deactivate(),bd()}).catch(u=>{xc(u,s)})}t.length>0?Promise.all(t).then(()=>{a();try{return c()}finally{o?.deactivate(),bd()}}):c()}function DE(){var t=Zt,e=Vt,n=Dr,r=hn;return function(o=!0){jo(t),hi(e),wc(n),o&&r?.activate()}}function bd(){jo(null),hi(null),wc(null)}function $p(t){var e=Cr|vi,n=Vt!==null&&(Vt.f&Cr)!==0?Vt:null;return Zt!==null&&(Zt.f|=qc),{ctx:Dr,deps:null,effects:null,equals:$E,f:e,fn:t,reactions:null,rv:0,v:mr,wv:0,parent:n??Zt,ac:null}}function cO(t,e){let n=Zt;n===null&&CN();var r=n.b,i=void 0,o=_s(mr),s=!Vt,a=new Map;return wO(()=>{var c=yE();i=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{u===hn&&u.committed&&u.deactivate(),bd()})}catch(h){c.reject(h),bd()}var u=hn;if(s){var d=!r.is_pending();r.update_pending_count(1),u.increment(d),a.get(u)?.reject(rc),a.delete(u),a.set(u,c)}const f=(h,p=void 0)=>{if(u.activate(),p)p!==rc&&(o.f|=Ks,hs(o,p));else{(o.f&Ks)!==0&&(o.f^=Ks),hs(o,h);for(const[g,m]of a){if(a.delete(g),g===u)break;m.reject(rc)}}s&&(r.update_pending_count(-1),u.decrement(d))};c.promise.then(f,h=>f(null,h||"unknown"))}),Kd(()=>{for(const c of a.values())c.reject(rc)}),new Promise(c=>{function u(d){function f(){d===i?c(o):u(i)}d.then(f,f)}u(i)})}function b(t){const e=$p(t);return tT(e),e}function h_(t){const e=$p(t);return e.equals=CE,e}function ME(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)$r(e[n])}}function uO(t){for(var e=t.parent;e!==null;){if((e.f&Cr)===0)return(e.f&fs)===0?e:null;e=e.parent}return null}function p_(t){var e,n=Zt;jo(uO(t));try{t.f&=~Ya,ME(t),e=oT(t)}finally{jo(n)}return e}function FE(t){var e=p_(t);if(t.equals(e)||(hn?.is_fork||(t.v=e),t.wv=rT()),!yl)if(Mi!==null)Ap()&&Mi.set(t,e);else{var n=(t.f&co)===0?$s:Rr;Mr(t,n)}}let kv=new Set;const Gs=new Map;let zE=!1;function _s(t,e){var n={f:0,v:t,reactions:null,equals:$E,rv:0,wv:0};return n}function ie(t,e){const n=_s(t);return tT(n),n}function jE(t,e=!1,n=!0){const r=_s(t);return e||(r.equals=CE),r}function K(t,e,n=!1){Vt!==null&&(!Po||(Vt.f&kx)!==0)&&AE()&&(Vt.f&(Cr|Es|u_|kx))!==0&&!ps?.includes(t)&&DN();let r=n?St(e):e;return hs(t,r)}function hs(t,e){if(!t.equals(e)){var n=t.v;yl?Gs.set(t,e):Gs.set(t,n),t.v=e;var r=Qi.ensure();r.capture(t,n),(t.f&Cr)!==0&&((t.f&vi)!==0&&p_(t),Mr(t,(t.f&co)!==0?Rr:$s)),t.wv=rT(),UE(t,vi),Zt!==null&&(Zt.f&Rr)!==0&&(Zt.f&(Ts|_l))===0&&(Ri===null?kO([t]):Ri.push(t)),!r.is_fork&&kv.size>0&&!zE&&dO()}return e}function dO(){zE=!1;var t=Ws;Lh(!0);const e=Array.from(kv);try{for(const n of e)(n.f&Rr)!==0&&Mr(n,$s),Wd(n)&&yd(n)}finally{Lh(t)}kv.clear()}function ed(t){K(t,t.v+1)}function UE(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i],s=o.f,a=(s&vi)===0;if(a&&Mr(o,e),(s&Cr)!==0){var c=o;Mi?.delete(c),(s&Ya)===0&&(s&co&&(o.f|=Ya),UE(c,$s))}else a&&((s&Es)!==0&&os!==null&&os.add(o),Ja(o))}}function St(t){if(typeof t!="object"||t===null||Oo in t)return t;const e=kp(t);if(e!==bE&&e!==EN)return t;var n=new Map,r=xp(t),i=ie(0),o=Da,s=a=>{if(Da===o)return a();var c=Vt,u=Da;hi(null),Cx(o);var d=a();return hi(c),Cx(u),d};return r&&n.set("length",ie(t.length)),new Proxy(t,{defineProperty(a,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&IN();var d=n.get(c);return d===void 0?d=s(()=>{var f=ie(u.value);return n.set(c,f),f}):K(d,u.value,!0),!0},deleteProperty(a,c){var u=n.get(c);if(u===void 0){if(c in a){const d=s(()=>ie(mr));n.set(c,d),ed(i)}}else K(u,mr),ed(i);return!0},get(a,c,u){if(c===Oo)return t;var d=n.get(c),f=c in a;if(d===void 0&&(!f||Hs(a,c)?.writable)&&(d=s(()=>{var p=St(f?a[c]:mr),g=ie(p);return g}),n.set(c,d)),d!==void 0){var h=l(d);return h===mr?void 0:h}return Reflect.get(a,c,u)},getOwnPropertyDescriptor(a,c){var u=Reflect.getOwnPropertyDescriptor(a,c);if(u&&"value"in u){var d=n.get(c);d&&(u.value=l(d))}else if(u===void 0){var f=n.get(c),h=f?.v;if(f!==void 0&&h!==mr)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(a,c){if(c===Oo)return!0;var u=n.get(c),d=u!==void 0&&u.v!==mr||Reflect.has(a,c);if(u!==void 0||Zt!==null&&(!d||Hs(a,c)?.writable)){u===void 0&&(u=s(()=>{var h=d?St(a[c]):mr,p=ie(h);return p}),n.set(c,u));var f=l(u);if(f===mr)return!1}return d},set(a,c,u,d){var f=n.get(c),h=c in a;if(r&&c==="length")for(var p=u;p<f.v;p+=1){var g=n.get(p+"");g!==void 0?K(g,mr):p in a&&(g=s(()=>ie(mr)),n.set(p+"",g))}if(f===void 0)(!h||Hs(a,c)?.writable)&&(f=s(()=>ie(void 0)),K(f,St(u)),n.set(c,f));else{h=f.v!==mr;var m=s(()=>St(u));K(f,m)}var v=Reflect.getOwnPropertyDescriptor(a,c);if(v?.set&&v.set.call(d,u),!h){if(r&&typeof c=="string"){var _=n.get("length"),y=Number(c);Number.isInteger(y)&&y>=_.v&&K(_,y+1)}ed(i)}return!0},ownKeys(a){l(i);var c=Reflect.ownKeys(a).filter(f=>{var h=n.get(f);return h===void 0||h.v!==mr});for(var[u,d]of n)d.v!==mr&&!(u in a)&&c.push(u);return c},setPrototypeOf(){RN()}})}function Ex(t){try{if(t!==null&&typeof t=="object"&&Oo in t)return t[Oo]}catch{}return t}function fO(t,e){return Object.is(Ex(t),Ex(e))}var Xa,g_,BE,qE,VE;function hO(){if(Xa===void 0){Xa=window,g_=document,BE=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;qE=Hs(e,"firstChild").get,VE=Hs(e,"nextSibling").get,xx(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),xx(n)&&(n.__t=void 0)}}function uo(t=""){return document.createTextNode(t)}function zs(t){return qE.call(t)}function Hd(t){return VE.call(t)}function F(t,e){return zs(t)}function D(t,e=!1){{var n=zs(t);return n instanceof Comment&&n.data===""?Hd(n):n}}function z(t,e=1,n=!1){let r=t;for(;e--;)r=Hd(r);return r}function pO(t){t.textContent=""}function HE(){return!1}function gO(t,e){if(e){const n=document.body;t.autofocus=!0,aa(()=>{document.activeElement===n&&t.focus()})}}let Tx=!1;function mO(){Tx||(Tx=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Cp(t){var e=Vt,n=Zt;hi(null),jo(null);try{return t()}finally{hi(e),jo(n)}}function vO(t,e,n,r=n){t.addEventListener(e,()=>Cp(n));const i=t.__on_r;i?t.__on_r=()=>{i(),r(!0)}:t.__on_r=()=>r(!0),mO()}function KE(t){Zt===null&&(Vt===null&&LN(),PN()),yl&&AN()}function bO(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Ko(t,e,n){var r=Zt;r!==null&&(r.f&ki)!==0&&(t|=ki);var i={ctx:Dr,deps:null,nodes_start:null,nodes_end:null,f:t|vi|co,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{yd(i),i.f|=l_}catch(a){throw $r(i),a}else e!==null&&Ja(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&qc)===0&&(o=o.first,(t&Es)!==0&&(t&bs)!==0&&o!==null&&(o.f|=bs)),o!==null&&(o.parent=r,r!==null&&bO(o,r),Vt!==null&&(Vt.f&Cr)!==0&&(t&_l)===0)){var s=Vt;(s.effects??=[]).push(o)}return i}function Ap(){return Vt!==null&&!Po}function Kd(t){const e=Ko(Sp,null,!1);return Mr(e,Rr),e.teardown=t,e}function Me(t){KE();var e=Zt.f,n=!Vt&&(e&Ts)!==0&&(e&l_)===0;if(n){var r=Dr;(r.e??=[]).push(t)}else return GE(t)}function GE(t){return Ko(a_|wE,t,!1)}function _O(t){return KE(),Ko(Sp|wE,t,!0)}function yO(t){Qi.ensure();const e=Ko(_l|qc,t,!0);return(n={})=>new Promise(r=>{n.outro?dc(e,()=>{$r(e),r(void 0)}):($r(e),r(void 0))})}function Hc(t){return Ko(a_,t,!1)}function wO(t){return Ko(u_|qc,t,!0)}function Gd(t,e=0){return Ko(Sp|e,t,!0)}function Z(t,e=[],n=[],r=[]){RE(r,e,n,i=>{Ko(Sp,()=>t(...i.map(l)),!0)})}function mo(t,e=0){var n=Ko(Es|e,t,!0);return n}function di(t){return Ko(Ts|qc,t,!0)}function WE(t){var e=t.teardown;if(e!==null){const n=yl,r=Vt;$x(!0),hi(null);try{e.call(null)}finally{$x(n),hi(r)}}}function YE(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&Cp(()=>{i.abort(rc)});var r=n.next;(n.f&_l)!==0?n.parent=null:$r(n,e),n=r}}function xO(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Ts)===0&&$r(e),e=n}}function $r(t,e=!0){var n=!1;(e||(t.f&c_)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(JE(t.nodes_start,t.nodes_end),n=!0),YE(t,e&&!n),Nh(t,0),Mr(t,fs);var r=t.transitions;if(r!==null)for(const o of r)o.stop();WE(t);var i=t.parent;i!==null&&i.first!==null&&XE(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function JE(t,e){for(;t!==null;){var n=t===e?null:Hd(t);t.remove(),t=n}}function XE(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function dc(t,e,n=!0){var r=[];m_(t,r,!0),ZE(r,()=>{n&&$r(t),e&&e()})}function ZE(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var i of t)i.out(r)}else e()}function m_(t,e,n){if((t.f&ki)===0){if(t.f^=ki,t.transitions!==null)for(const s of t.transitions)(s.is_global||n)&&e.push(s);for(var r=t.first;r!==null;){var i=r.next,o=(r.f&bs)!==0||(r.f&Ts)!==0&&(t.f&Es)!==0;m_(r,e,o?n:!1),r=i}}}function v_(t){QE(t,!0)}function QE(t,e){if((t.f&ki)!==0){t.f^=ki,(t.f&Rr)===0&&(Mr(t,vi),Ja(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&bs)!==0||(n.f&Ts)!==0;QE(n,i?e:!1),n=r}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}function eT(t,e){for(var n=t.nodes_start,r=t.nodes_end;n!==null;){var i=n===r?null:Hd(n);e.append(n),n=i}}let Ws=!1;function Lh(t){Ws=t}let yl=!1;function $x(t){yl=t}let Vt=null,Po=!1;function hi(t){Vt=t}let Zt=null;function jo(t){Zt=t}let ps=null;function tT(t){Vt!==null&&(ps===null?ps=[t]:ps.push(t))}let Wr=null,wi=0,Ri=null;function kO(t){Ri=t}let nT=1,_d=0,Da=_d;function Cx(t){Da=t}function rT(){return++nT}function Wd(t){var e=t.f;if((e&vi)!==0)return!0;if(e&Cr&&(t.f&=~Ya),(e&$s)!==0){var n=t.deps;if(n!==null)for(var r=n.length,i=0;i<r;i++){var o=n[i];if(Wd(o)&&FE(o),o.wv>t.wv)return!0}(e&co)!==0&&Mi===null&&Mr(t,Rr)}return!1}function iT(t,e,n=!0){var r=t.reactions;if(r!==null&&!ps?.includes(t))for(var i=0;i<r.length;i++){var o=r[i];(o.f&Cr)!==0?iT(o,e,!1):e===o&&(n?Mr(o,vi):(o.f&Rr)!==0&&Mr(o,$s),Ja(o))}}function oT(t){var e=Wr,n=wi,r=Ri,i=Vt,o=ps,s=Dr,a=Po,c=Da,u=t.f;Wr=null,wi=0,Ri=null,Vt=(u&(Ts|_l))===0?t:null,ps=null,wc(t.ctx),Po=!1,Da=++_d,t.ac!==null&&(Cp(()=>{t.ac.abort(rc)}),t.ac=null);try{t.f|=yv;var d=t.fn,f=d(),h=t.deps;if(Wr!==null){var p;if(Nh(t,wi),h!==null&&wi>0)for(h.length=wi+Wr.length,p=0;p<Wr.length;p++)h[wi+p]=Wr[p];else t.deps=h=Wr;if(Ws&&Ap()&&(t.f&co)!==0)for(p=wi;p<h.length;p++)(h[p].reactions??=[]).push(t)}else h!==null&&wi<h.length&&(Nh(t,wi),h.length=wi);if(AE()&&Ri!==null&&!Po&&h!==null&&(t.f&(Cr|$s|vi))===0)for(p=0;p<Ri.length;p++)iT(Ri[p],t);return i!==null&&i!==t&&(_d++,Ri!==null&&(r===null?r=Ri:r.push(...Ri))),(t.f&Ks)!==0&&(t.f^=Ks),f}catch(g){return NE(g)}finally{t.f^=yv,Wr=e,wi=n,Ri=r,Vt=i,ps=o,wc(s),Po=a,Da=c}}function SO(t,e){let n=e.reactions;if(n!==null){var r=SN.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(e.f&Cr)!==0&&(Wr===null||!Wr.includes(e))&&(Mr(e,$s),(e.f&co)!==0&&(e.f^=co,e.f&=~Ya),ME(e),Nh(e,0))}function Nh(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)SO(t,n[r])}function yd(t){var e=t.f;if((e&fs)===0){Mr(t,Rr);var n=Zt,r=Ws;Zt=t,Ws=!0;try{(e&Es)!==0?xO(t):YE(t),WE(t);var i=oT(t);t.teardown=typeof i=="function"?i:null,t.wv=nT;var o;_v&&XN&&(t.f&vi)!==0&&t.deps}finally{Ws=r,Zt=n}}}async function Ma(){await Promise.resolve(),Vc()}function l(t){var e=t.f,n=(e&Cr)!==0;if(Vt!==null&&!Po){var r=Zt!==null&&(Zt.f&fs)!==0;if(!r&&!ps?.includes(t)){var i=Vt.deps;if((Vt.f&yv)!==0)t.rv<_d&&(t.rv=_d,Wr===null&&i!==null&&i[wi]===t?wi++:Wr===null?Wr=[t]:Wr.includes(t)||Wr.push(t));else{(Vt.deps??=[]).push(t);var o=t.reactions;o===null?t.reactions=[Vt]:o.includes(Vt)||o.push(Vt)}}}if(yl){if(Gs.has(t))return Gs.get(t);if(n){var s=t,a=s.v;return((s.f&Rr)===0&&s.reactions!==null||aT(s))&&(a=p_(s)),Gs.set(s,a),a}}else n&&!Mi?.has(t)&&(s=t,Wd(s)&&FE(s),Ws&&Ap()&&(s.f&co)===0&&sT(s));if(Mi?.has(t))return Mi.get(t);if((t.f&Ks)!==0)throw t.v;return t.v}function sT(t){if(t.deps!==null){t.f^=co;for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&Cr)!==0&&(e.f&co)===0&&sT(e)}}function aT(t){if(t.v===mr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Gs.has(e)||(e.f&Cr)!==0&&aT(e))return!0;return!1}function Se(t){var e=Po;try{return Po=!0,t()}finally{Po=e}}const EO=-7169;function Mr(t,e){t.f=t.f&EO|e}function TO(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Oo in t)Sv(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];typeof n=="object"&&n&&Oo in n&&Sv(n)}}}function Sv(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let r in t)try{Sv(t[r],e)}catch{}const n=kp(t);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=vE(n);for(let i in r){const o=r[i].get;if(o)try{o.call(t)}catch{}}}}}function $O(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const CO=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function AO(t){return CO.includes(t)}const PO={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function LO(t){return t=t.toLowerCase(),PO[t]??t}const NO=["touchstart","touchmove"];function OO(t){return NO.includes(t)}const lT=new Set,Ev=new Set;function b_(t,e,n,r={}){function i(o){if(r.capture||ju.call(e,o),!o.cancelBubble)return Cp(()=>n?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?aa(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function Tu(t,e,n,r={}){var i=b_(e,t,n,r);return()=>{t.removeEventListener(e,i,r)}}function Xr(t,e,n,r,i){var o={capture:r,passive:i},s=b_(t,e,n,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Kd(()=>{e.removeEventListener(t,s,o)})}function wl(t){for(var e=0;e<t.length;e++)lT.add(t[e]);for(var n of Ev)n(t)}let Ax=null;function ju(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],o=i[0]||t.target;Ax=t;var s=0,a=Ax===t&&t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;c<=u&&(s=c)}if(o=i[s]||t.target,o!==e){mE(t,"currentTarget",{configurable:!0,get(){return o||n}});var d=Vt,f=Zt;hi(null),jo(null);try{for(var h,p=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var m=o["__"+r];m!=null&&(!o.disabled||t.target===o)&&m.call(o,t)}catch(v){h?p.push(v):h=v}if(t.cancelBubble||g===e||g===null)break;o=g}if(h){for(let v of p)queueMicrotask(()=>{throw v});throw h}}finally{t.__root=e,delete t.currentTarget,hi(d),jo(f)}}}function cT(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function kc(t,e){var n=Zt;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function j(t,e){var n=(e&VN)!==0,r=(e&HN)!==0,i,o=!t.startsWith("<!>");return()=>{i===void 0&&(i=cT(o?t:"<!>"+t),n||(i=zs(i)));var s=r||BE?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=zs(s),c=s.lastChild;kc(a,c)}else kc(s,s);return s}}function Fe(t=""){{var e=uo(t+"");return kc(e,e),e}}function X(){var t=document.createDocumentFragment(),e=document.createComment(""),n=uo();return t.append(e,n),kc(e,n),t}function S(t,e){t!==null&&t.before(e)}function Vn(){return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function ne(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function Pp(t,e){return IO(t,e)}const Bl=new Map;function IO(t,{target:e,anchor:n,props:r={},events:i,context:o,intro:s=!0}){hO();var a=new Set,c=f=>{for(var h=0;h<f.length;h++){var p=f[h];if(!a.has(p)){a.add(p);var g=OO(p);e.addEventListener(p,ju,{passive:g});var m=Bl.get(p);m===void 0?(document.addEventListener(p,ju,{passive:g}),Bl.set(p,1)):Bl.set(p,m+1)}}};c(s_(lT)),Ev.add(c);var u=void 0,d=yO(()=>{var f=n??e.appendChild(uo());return iO(f,{pending:()=>{}},h=>{if(o){se({});var p=Dr;p.c=o}i&&(r.$$events=i),u=t(h,r)||{},o&&ae()}),()=>{for(var h of a){e.removeEventListener(h,ju);var p=Bl.get(h);--p===0?(document.removeEventListener(h,ju),Bl.delete(h)):Bl.set(h,p)}Ev.delete(c),f!==n&&f.parentNode?.removeChild(f)}});return Tv.set(u,d),u}let Tv=new WeakMap;function uT(t,e){const n=Tv.get(t);return n?(Tv.delete(t),n(e)):Promise.resolve()}class Kc{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#l=!0;constructor(e,n=!0){this.anchor=e,this.#l=n}#s=()=>{var e=hn;if(this.#e.has(e)){var n=this.#e.get(e),r=this.#n.get(n);if(r)v_(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of this.#e){if(this.#e.delete(o),o===e)break;const a=this.#t.get(s);a&&($r(a.effect),this.#t.delete(s))}for(const[o,s]of this.#n){if(o===n||this.#i.has(o))continue;const a=()=>{if(Array.from(this.#e.values()).includes(o)){var u=document.createDocumentFragment();eT(s,u),u.append(uo()),this.#t.set(o,{effect:s,fragment:u})}else $r(s);this.#i.delete(o),this.#n.delete(o)};this.#l||!r?(this.#i.add(o),dc(s,a,!1)):a()}}};#a=e=>{this.#e.delete(e);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||($r(i.effect),this.#t.delete(r))};ensure(e,n){var r=hn,i=HE();if(n&&!this.#n.has(e)&&!this.#t.has(e))if(i){var o=document.createDocumentFragment(),s=uo();o.append(s),this.#t.set(e,{effect:di(()=>n(s)),fragment:o})}else this.#n.set(e,di(()=>n(this.anchor)));if(this.#e.set(r,e),i){for(const[a,c]of this.#n)a===e?r.skipped_effects.delete(c):r.skipped_effects.add(c);for(const[a,c]of this.#t)a===e?r.skipped_effects.delete(c.effect):r.skipped_effects.add(c.effect);r.oncommit(this.#s),r.ondiscard(this.#a)}else this.#s()}}const RO=0,qg=1;function kn(t,e,n,r,i){var o=mr,s=_s(o),a=_s(o),c=new Kc(t);mo(()=>{var u=e(),d=!1;if(TN(u)){var f=DE(),h=!1;const p=g=>{if(!d){h=!0,f(!1),Qi.ensure();try{g()}finally{bd(),uc||Vc()}}};u.then(g=>{p(()=>{hs(s,g),c.ensure(qg,r&&(m=>r(m,s)))})},g=>{p(()=>{if(hs(a,g),c.ensure(qg,i&&(m=>i(m,a))),!i)throw a.v})}),aa(()=>{h||p(()=>{c.ensure(RO,n)})})}else hs(s,u),c.ensure(qg,r&&(p=>r(p,s)));return()=>{d=!0}})}function q(t,e,n=!1){var r=new Kc(t),i=n?bs:0;function o(s,a){r.ensure(s,a)}mo(()=>{var s=!1;e((a,c=!0)=>{s=!0,o(c,a)}),s||o(!1,null)},i)}function or(t,e,n){var r=new Kc(t);mo(()=>{var i=e();r.ensure(i,n)})}function Gc(t,e){Gd(()=>{var n=e();for(var r in n){var i=n[r];i?t.style.setProperty(r,i):t.style.removeProperty(r)}})}function cr(t,e,n=!1,r=!1,i=!1){var o=t,s="";Z(()=>{var a=Zt;if(s!==(s=e()??"")&&(a.nodes_start!==null&&(JE(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),s!=="")){var c=s+"";n?c=`<svg>${c}</svg>`:r&&(c=`<math>${c}</math>`);var u=cT(c);if((n||r)&&(u=zs(u)),kc(zs(u),u.lastChild),n||r)for(;zs(u);)o.before(zs(u));else o.before(u)}})}function Ue(t,e,...n){var r=new Kc(t);mo(()=>{const i=e()??null;r.ensure(i,i&&(o=>i(o,...n)))},bs)}function ur(t,e,n){var r=new Kc(t);mo(()=>{var i=e()??null;r.ensure(i,i&&(o=>n(o,i)))},bs)}function DO(t,e,n,r,i,o){var s=null,a=t,c=new Kc(a,!1);mo(()=>{const u=e()||null;var d=u==="svg"?GN:null;if(u===null){c.ensure(null,null);return}return c.ensure(u,f=>{if(u){if(s=d?document.createElementNS(d,u):document.createElement(u),kc(s,s),r){var h=s.appendChild(uo());r(s,h)}Zt.nodes_end=s,f.before(s)}}),()=>{}},bs),Kd(()=>{})}function dT(t,e){var n;n=document.head.appendChild(uo());try{mo(()=>e(n),c_)}finally{}}function Ee(t,e){Hc(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}function la(t,e,n){Hc(()=>{var r=Se(()=>e(t,n?.())||{});if(n&&r?.update){var i=!1,o={};Gd(()=>{var s=n();TO(s),i&&d_(o,s)&&(o=s,r.update(s))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function MO(t,e){var n=void 0,r;mo(()=>{n!==(n=e())&&(r&&($r(r),r=null),n&&(r=di(()=>{Hc(()=>n(t))})))})}function fT(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=fT(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function FO(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=fT(t))&&(r&&(r+=" "),r+=e);return r}function hT(t){return typeof t=="object"?FO(t):t??""}const Px=[...`
|
|
2
2
|
\r\f \v\uFEFF`];function zO(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var a=s+o;(s===0||Px.includes(r[s-1]))&&(a===r.length||Px.includes(r[a]))?r=(s===0?"":r.substring(0,s))+r.substring(a+1):s=a}}return r===""?null:r}function Lx(t,e=!1){var n=e?" !important;":";",r="";for(var i in t){var o=t[i];o!=null&&o!==""&&(r+=" "+i+": "+o+n)}return r}function Vg(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function jO(t,e){if(e){var n="",r,i;if(Array.isArray(e)?(r=e[0],i=e[1]):r=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,a=!1,c=[];r&&c.push(...Object.keys(r).map(Vg)),i&&c.push(...Object.keys(i).map(Vg));var u=0,d=-1;const m=t.length;for(var f=0;f<m;f++){var h=t[f];if(a?h==="/"&&t[f-1]==="*"&&(a=!1):o?o===h&&(o=!1):h==="/"&&t[f+1]==="*"?a=!0:h==='"'||h==="'"?o=h:h==="("?s++:h===")"&&s--,!a&&o===!1&&s===0){if(h===":"&&d===-1)d=f;else if(h===";"||f===m-1){if(d!==-1){var p=Vg(t.substring(u,d).trim());if(!c.includes(p)){h!==";"&&f++;var g=t.substring(u,f).trim();n+=" "+g+";"}}u=f+1,d=-1}}}}return r&&(n+=Lx(r)),i&&(n+=Lx(i,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function cn(t,e,n,r,i,o){var s=t.__className;if(s!==n||s===void 0){var a=zO(n,r,o);a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a),t.__className=n}else if(o&&i!==o)for(var c in o){var u=!!o[c];(i==null||u!==!!i[c])&&t.classList.toggle(c,u)}return o}function Hg(t,e={},n,r){for(var i in n){var o=n[i];e[i]!==o&&(n[i]==null?t.style.removeProperty(i):t.style.setProperty(i,o,r))}}function eo(t,e,n,r){var i=t.__style;if(i!==e){var o=jO(e,r);o==null?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(Hg(t,n?.[0],r[0]),Hg(t,n?.[1],r[1],"important")):Hg(t,n,r));return r}function $v(t,e,n=!1){if(t.multiple){if(e==null)return;if(!xp(e))return YN();for(var r of t.options)r.selected=e.includes(Nx(r));return}for(r of t.options){var i=Nx(r);if(fO(i,e)){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function UO(t){var e=new MutationObserver(()=>{$v(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Kd(()=>{e.disconnect()})}function Nx(t){return"__value"in t?t.__value:t.value}const Sr=Symbol("class"),$u=Symbol("style"),pT=Symbol("is custom element"),gT=Symbol("is html");function BO(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Te(t,e,n,r){var i=mT(t);i[e]!==(i[e]=n)&&(e==="loading"&&(t[$N]=n),n==null?t.removeAttribute(e):typeof n!="string"&&vT(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function qO(t,e,n,r,i=!1,o=!1){var s=mT(t),a=s[pT],c=!s[gT],u=e||{},d=t.tagName==="OPTION";for(var f in e)f in n||(n[f]=null);n.class?n.class=hT(n.class):(r||n[Sr])&&(n.class=null),n[$u]&&(n.style??=null);var h=vT(t);for(const w in n){let x=n[w];if(d&&w==="value"&&x==null){t.value=t.__value="",u[w]=x;continue}if(w==="class"){var p=t.namespaceURI==="http://www.w3.org/1999/xhtml";cn(t,p,x,r,e?.[Sr],n[Sr]),u[w]=x,u[Sr]=n[Sr];continue}if(w==="style"){eo(t,x,e?.[$u],n[$u]),u[w]=x,u[$u]=n[$u];continue}var g=u[w];if(!(x===g&&!(x===void 0&&t.hasAttribute(w)))){u[w]=x;var m=w[0]+w[1];if(m!=="$$")if(m==="on"){const E={},$="$$"+w;let C=w.slice(2);var v=AO(C);if($O(C)&&(C=C.slice(0,-7),E.capture=!0),!v&&g){if(x!=null)continue;t.removeEventListener(C,u[$],E),u[$]=null}if(x!=null)if(v)t[`__${C}`]=x,wl([C]);else{let k=function(T){u[w].call(this,T)};u[$]=b_(C,t,k,E)}else v&&(t[`__${C}`]=void 0)}else if(w==="style")Te(t,w,x);else if(w==="autofocus")gO(t,!!x);else if(!a&&(w==="__value"||w==="value"&&x!=null))t.value=t.__value=x;else if(w==="selected"&&d)BO(t,x);else{var _=w;c||(_=LO(_));var y=_==="defaultValue"||_==="defaultChecked";if(x==null&&!a&&!y)if(s[w]=null,_==="value"||_==="checked"){let E=t;const $=e===void 0;if(_==="value"){let C=E.defaultValue;E.removeAttribute(_),E.defaultValue=C,E.value=E.__value=$?C:null}else{let C=E.defaultChecked;E.removeAttribute(_),E.defaultChecked=C,E.checked=$?C:!1}}else t.removeAttribute(w);else y||h.includes(_)&&(a||typeof x!="string")?(t[_]=x,_ in s&&(s[_]=mr)):typeof x!="function"&&Te(t,_,x)}}}return u}function bt(t,e,n=[],r=[],i=[],o,s=!1,a=!1){RE(i,n,r,c=>{var u=void 0,d={},f=t.nodeName==="SELECT",h=!1;if(mo(()=>{var g=e(...c.map(l)),m=qO(t,u,g,o,s,a);h&&f&&"value"in g&&$v(t,g.value);for(let _ of Object.getOwnPropertySymbols(d))g[_]||$r(d[_]);for(let _ of Object.getOwnPropertySymbols(g)){var v=g[_];_.description===WN&&(!u||v!==u[_])&&(d[_]&&$r(d[_]),d[_]=di(()=>MO(t,()=>v))),m[_]=v}u=m}),f){var p=t;Hc(()=>{$v(p,u.value,!0),UO(p)})}h=!0})}function mT(t){return t.__attributes??={[pT]:t.nodeName.includes("-"),[gT]:t.namespaceURI===KN}}var Ox=new Map;function vT(t){var e=t.getAttribute("is")||t.nodeName,n=Ox.get(e);if(n)return n;Ox.set(e,n=[]);for(var r,i=t,o=Element.prototype;o!==i;){r=vE(i);for(var s in r)r[s].set&&n.push(s);i=kp(i)}return n}function Lp(t,e,n=e){var r=new WeakSet;vO(t,"input",async i=>{var o=i?t.defaultValue:t.value;if(o=Kg(t)?Gg(o):o,n(o),hn!==null&&r.add(hn),await Ma(),o!==(o=e())){var s=t.selectionStart,a=t.selectionEnd,c=t.value.length;if(t.value=o??"",a!==null){var u=t.value.length;s===a&&a===c&&u>c?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=s,t.selectionEnd=Math.min(a,u))}}}),Se(e)==null&&t.value&&(n(Kg(t)?Gg(t.value):t.value),hn!==null&&r.add(hn)),Gd(()=>{var i=e();if(t===document.activeElement){var o=ch??hn;if(r.has(o))return}Kg(t)&&i===Gg(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Kg(t){var e=t.type;return e==="number"||e==="range"}function Gg(t){return t===""?null:+t}function Ix(t,e){return t===e||t?.[Oo]===e}function xt(t={},e,n,r){return Hc(()=>{var i,o;return Gd(()=>{i=o,o=r?.()||[],Se(()=>{t!==n(...o)&&(e(t,...o),i&&Ix(n(...i),t)&&e(null,...i))})}),()=>{aa(()=>{o&&Ix(n(...o),t)&&e(null,...o)})}}),t}function __(t,e,n){if(t==null)return e(void 0),n&&n(void 0),qe;const r=Se(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ql=[];function VO(t,e){return{subscribe:ot(t,e).subscribe}}function ot(t,e=qe){let n=null;const r=new Set;function i(a){if(d_(t,a)&&(t=a,n)){const c=!ql.length;for(const u of r)u[1](),ql.push(u,t);if(c){for(let u=0;u<ql.length;u+=2)ql[u][0](ql[u+1]);ql.length=0}}}function o(a){i(a(t))}function s(a,c=qe){const u=[a,c];return r.add(u),r.size===1&&(n=e(i,o)||qe),a(t),()=>{r.delete(u),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:s}}function un(t,e,n){const r=!Array.isArray(t),i=r?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=e.length<2;return VO(n,(s,a)=>{let c=!1;const u=[];let d=0,f=qe;const h=()=>{if(d)return;f();const g=e(r?u[0]:u,s,a);o?s(g):f=typeof g=="function"?g:qe},p=i.map((g,m)=>__(g,v=>{u[m]=v,d&=~(1<<m),c&&h()},()=>{d|=1<<m}));return c=!0,h(),function(){_E(p),f(),c=!1}})}function oe(t){let e;return __(t,n=>e=n)(),e}let Uu=!1,Cv=Symbol();function V(t,e,n){const r=n[e]??={store:null,source:jE(void 0),unsubscribe:qe};if(r.store!==t&&!(Cv in n))if(r.unsubscribe(),r.store=t??null,t==null)r.source.v=void 0,r.unsubscribe=qe;else{var i=!0;r.unsubscribe=__(t,o=>{i?r.source.v=o:K(r.source,o)}),i=!1}return t&&Cv in n?oe(t):l(r.source)}function HO(t,e,n){let r=n[e];return r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=qe),t}function Ye(t,e){return t.set(e),e}function me(){const t={};function e(){Kd(()=>{for(var n in t)t[n].unsubscribe();mE(t,Cv,{enumerable:!1,value:!0})})}return[t,e]}function _t(t,e,n){return t.set(n),e}function y_(){Uu=!0}function KO(t){var e=Uu;try{return Uu=!1,[t(),Uu]}finally{Uu=e}}const GO={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function at(t,e,n){return new Proxy({props:t,exclude:e},GO)}const WO={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Eu(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r)return r[e]}},set(t,e,n){let r=t.props.length;for(;r--;){let i=t.props[r];Eu(i)&&(i=i());const o=Hs(i,e);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Eu(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r){const i=Hs(r,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===Oo||e===xE)return!1;for(let n of t.props)if(Eu(n)&&(n=n()),n!=null&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Eu(n)&&(n=n()),!!n){for(const r in n)e.includes(r)||e.push(r);for(const r of Object.getOwnPropertySymbols(n))e.includes(r)||e.push(r)}return e}};function Yt(...t){return new Proxy({props:t},WO)}function I(t,e,n,r){var i=(n&BN)!==0,o=(n&qN)!==0,s=r,a=!0,c=()=>(a&&(a=!1,s=o?Se(r):r),s),u;if(i){var d=Oo in t||xE in t;u=Hs(t,e)?.set??(d&&e in t?y=>t[e]=y:void 0)}var f,h=!1;i?[f,h]=KO(()=>t[e]):f=t[e],f===void 0&&r!==void 0&&(f=c(),u&&(ON(),u(f)));var p;if(p=()=>{var y=t[e];return y===void 0?c():(a=!0,y)},(n&UN)===0)return p;if(u){var g=t.$$legacy;return(function(y,w){return arguments.length>0?((!w||g||h)&&u(w?p():y),y):p()})}var m=!1,v=((n&jN)!==0?$p:h_)(()=>(m=!1,p()));i&&l(v);var _=Zt;return(function(y,w){if(arguments.length>0){const x=w?l(v):i?St(y):y;return K(v,x),m=!0,s!==void 0&&(s=x),y}return yl&&m||(_.f&fs)!==0?v.v:l(v)})}function Ut(t){Dr===null&&kE(),Me(()=>{const e=Se(t);if(typeof e=="function")return e})}const xl=ot(!1),Av=ot(!1),Bu=ot({show:!1,multiple:!1}),Pv=ot({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLanguage:void 0}),ya=ot(null),wo=ot(null),Sc=ot(),Lv=new Set;function YO(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const JO="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",XO="0123456789ABCDEFGHIJKLMNOPQRSTUV",ZO="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function QO(t,e,n){n=n||{};let r,i;switch(e){case"RFC3548":case"RFC4648":r=JO,i=!0;break;case"RFC4648-HEX":r=XO,i=!0;break;case"Crockford":r=ZO,i=!1;break;default:throw new Error("Unknown base32 variant: "+e)}const o=n.padding!==void 0?n.padding:i,s=YO(t);let a=0,c=0,u="";for(let d=0;d<s.byteLength;d++)for(c=c<<8|s.getUint8(d),a+=8;a>=5;)u+=r[c>>>a-5&31],a-=5;if(a>0&&(u+=r[c<<5-a&31]),o)for(;u.length%8!==0;)u+="=";return u}const eI=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Si=t=>{const e=globalThis.crypto.randomUUID();return t==="short"?e.split("-").pop():t==="shorter"?e.split("-").shift():typeof t=="number"?e.split("-").join("").slice(0,t):e},Nv=()=>{const t=Si().replaceAll("-",""),{buffer:e}=new Uint8Array((t.match(/../g)??[]).map(n=>parseInt(n,16)));return QO(e,"RFC4648",{padding:!1}).toLowerCase()},Za=async(t,{algorithm:e="SHA-1",format:n="hex"}={})=>{let r;if(typeof t=="string"){const s=new TextEncoder().encode(t);r=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}else if(t&&typeof t.arrayBuffer=="function")r=await t.arrayBuffer();else if(t&&typeof t.size=="number"&&typeof t.type=="string")r=await new Promise((s,a)=>{const c=new FileReader;c.onload=function(){s(c.result)},c.onerror=function(){a(new Error("Failed to read blob as ArrayBuffer"))},c.readAsArrayBuffer(t)});else if(t&&t.constructor&&t.constructor.name==="ArrayBuffer")r=t;else if(t&&t.buffer&&typeof t.byteLength=="number")r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);else throw new Error("Unsupported input type for getHash");const i=new Uint8Array(r),o=await globalThis.crypto.subtle.digest(e,i);return n==="binary"?Array.from(new Uint8Array(o),s=>String.fromCharCode(s)).join(""):Array.from(new Uint8Array(o),s=>s.toString(16).padStart(2,"0")).join("")},Gt=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bT=(t,e,{ellipsis:n="…"}={})=>{const r=[...t];return`${r.slice(0,e).join("").trim()}${r.length>e?n:""}`},an=t=>t.replace(/^\/+/,"").replace(/\/+$/,""),tI=t=>new DOMParser().parseFromString(t,"text/html").body.textContent??"",Yd=t=>{if(typeof URL.canParse=="function")return URL.canParse(t);try{return new URL(t),!0}catch{return!1}},Ci=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,_T=(t="")=>new RegExp(`\\bblob:${Gt(globalThis.location.origin)}\\/${eI.source}\\b`,t),nI=/(?:(.+?)\/)?(([^/]+?)(?:\.((?:tar\.)?[a-zA-Z0-9]+))?)$/,rI=["application/atom+xml","application/javascript","application/json","application/ld+json","application/rss+xml","application/xhtml+xml","application/xml","application/yaml","image/svg+xml"],wd=t=>t.startsWith("text/")||rI.includes(t),gn=t=>{const[,e,n,r,i]=t.match(nI)??[];return{dirname:e,basename:n,filename:r,extension:i}},iI=(t,e)=>e.length?e.some(n=>{if(n.startsWith("."))return t.name.endsWith(n);const[r,i]=n.split("/");return i==="*"?t.type.split("/")[0]===r:t.type===n}):!0,oI=async({items:t},{accept:e}={})=>{const n=e?e.trim().split(/,\s*/):[],r=i=>new Promise(o=>{i.name.startsWith(".")?o(null):i.isFile?i.file(s=>{o(iI(s,n)?s:null)},()=>{o(null)}):i.createReader().readEntries(s=>{o(Promise.all(s.map(r)))})});return(await Promise.all([...t].map(i=>{const o=i.webkitGetAsEntry();return o?r(o):null}))).flat(1e5).filter(Boolean).sort((i,o)=>i.name.localeCompare(o.name))},sI=async t=>(await t.text()).replace(/\r\n/g,`
|
|
3
3
|
`),aI=async t=>{const e=typeof t=="string"?new Blob([t],{type:"text/plain"}):t,n=new FileReader;return new Promise(r=>{n.onload=()=>{r(n.result)},n.readAsDataURL(e)})},w_=async t=>(await aI(t)).split(",")[1],lI=async t=>{const e=Uint8Array.fromBase64?.(t)??Uint8Array.from(atob(t),n=>n.charCodeAt(0));return new TextDecoder().decode(e)},cI=(t,e)=>{const n=document.createElement("a"),r=URL.createObjectURL(t);n.download=e??t.name??`${Date.now()}.${t.type.split("/")[1]}`,n.href=r,n.click(),URL.revokeObjectURL(r)},Rx={yaml_quote:!1,uuid_read_only:!1,save_all_locales:!1,automatic_deployments:!1},uI={yaml_quote:"The `yaml_quote` collection option is deprecated and will be removed in Sveltia CMS 1.0. Use the global `output.yaml.quote` option instead. `yaml_quote: true` is equivalent to `quote: double`. https://github.com/sveltia/sveltia-cms#controlling-data-output",uuid_read_only:"The `read_only` option for the UUID widget is deprecated and will be removed in Sveltia CMS 1.0. Use the `readonly` option instead.",save_all_locales:"The `save_all_locales` i18n option is deprecated and will be removed in Sveltia CMS 1.0. Use the `initial_locales` option instead. `save_all_locales: false` is equivalent to `initial_locales: all`. https://github.com/sveltia/sveltia-cms#disabling-non-default-locale-content",automatic_deployments:"The `automatic_deployments` backend option is deprecated and will be removed in Sveltia CMS 1.0. Use the `skip_ci` option instead. `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments: true` is equivalent to `skip_ci: false`. https://github.com/sveltia/sveltia-cms#disabling-automatic-deployments"},Np=(t,e)=>{Rx[t]||(console.warn(uI[t]),Rx[t]=!0)};var Wg,Dx;function dI(){if(Dx)return Wg;Dx=1;var t=function(y){return e(y)&&!n(y)};function e(_){return!!_&&typeof _=="object"}function n(_){var y=Object.prototype.toString.call(_);return y==="[object RegExp]"||y==="[object Date]"||o(_)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function o(_){return _.$$typeof===i}function s(_){return Array.isArray(_)?[]:{}}function a(_,y){return y.clone!==!1&&y.isMergeableObject(_)?m(s(_),_,y):_}function c(_,y,w){return _.concat(y).map(function(x){return a(x,w)})}function u(_,y){if(!y.customMerge)return m;var w=y.customMerge(_);return typeof w=="function"?w:m}function d(_){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(_).filter(function(y){return Object.propertyIsEnumerable.call(_,y)}):[]}function f(_){return Object.keys(_).concat(d(_))}function h(_,y){try{return y in _}catch{return!1}}function p(_,y){return h(_,y)&&!(Object.hasOwnProperty.call(_,y)&&Object.propertyIsEnumerable.call(_,y))}function g(_,y,w){var x={};return w.isMergeableObject(_)&&f(_).forEach(function(E){x[E]=a(_[E],w)}),f(y).forEach(function(E){p(_,E)||(h(_,E)&&w.isMergeableObject(y[E])?x[E]=u(E,w)(_[E],y[E],w):x[E]=a(y[E],w))}),x}function m(_,y,w){w=w||{},w.arrayMerge=w.arrayMerge||c,w.isMergeableObject=w.isMergeableObject||t,w.cloneUnlessOtherwiseSpecified=a;var x=Array.isArray(y),E=Array.isArray(_),$=x===E;return $?x?w.arrayMerge(_,y,w):g(_,y,w):a(y,w)}m.all=function(y,w){if(!Array.isArray(y))throw new Error("first argument should be an array");return y.reduce(function(x,E){return m(x,E,w)},{})};var v=m;return Wg=v,Wg}var fI=dI();const x_=Ss(fI);var Ov=function(t,e){return Ov=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ov(t,e)};function Op(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ov(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Kt=function(){return Kt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Kt.apply(this,arguments)};function hI(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Yg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Jg(t,e){var n=e&&e.cache?e.cache:yI,r=e&&e.serializer?e.serializer:bI,i=e&&e.strategy?e.strategy:mI;return i(t,{cache:n,serializer:r})}function pI(t){return t==null||typeof t=="number"||typeof t=="boolean"}function gI(t,e,n,r){var i=pI(r)?r:n(r),o=e.get(i);return typeof o>"u"&&(o=t.call(this,r),e.set(i,o)),o}function yT(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);return typeof o>"u"&&(o=t.apply(this,r),e.set(i,o)),o}function wT(t,e,n,r,i){return n.bind(e,t,r,i)}function mI(t,e){var n=t.length===1?gI:yT;return wT(t,this,n,e.cache.create(),e.serializer)}function vI(t,e){return wT(t,this,yT,e.cache.create(),e.serializer)}var bI=function(){return JSON.stringify(arguments)},_I=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(e){return this.cache[e]},t.prototype.set=function(e,n){this.cache[e]=n},t})(),yI={create:function(){return new _I}},Xg={variadic:vI},Rt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Rt||(Rt={}));var On;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(On||(On={}));var Ec;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ec||(Ec={}));function Mx(t){return t.type===On.literal}function wI(t){return t.type===On.argument}function xT(t){return t.type===On.number}function kT(t){return t.type===On.date}function ST(t){return t.type===On.time}function ET(t){return t.type===On.select}function TT(t){return t.type===On.plural}function xI(t){return t.type===On.pound}function $T(t){return t.type===On.tag}function CT(t){return!!(t&&typeof t=="object"&&t.type===Ec.number)}function Iv(t){return!!(t&&typeof t=="object"&&t.type===Ec.dateTime)}var AT=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,kI=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function SI(t){var e={};return t.replace(kI,function(n){var r=n.length;switch(n[0]){case"G":e.era=r===4?"long":r===5?"narrow":"short";break;case"y":e.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][r-1];break;case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var EI=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function TI(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(EI).filter(function(h){return h.length>0}),n=[],r=0,i=e;r<i.length;r++){var o=i[r],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),u=0,d=c;u<d.length;u++){var f=d[u];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:c})}return n}function $I(t){return t.replace(/^(.*?)-/,"")}var Fx=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,PT=/^(@+)?(\+|#+)?[rs]?$/g,CI=/(\*)(0+)|(#+)(0+)|(0+)/g,LT=/^(0+)$/;function zx(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(PT,function(n,r,i){return typeof i!="string"?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):i==="+"?e.minimumSignificantDigits=r.length:r[0]==="#"?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),e}function NT(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function AI(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!LT.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function jx(t){var e={},n=NT(t);return n||e}function PI(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=$I(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Kt(Kt(Kt({},e),{notation:"scientific"}),i.options.reduce(function(c,u){return Kt(Kt({},c),jx(u))},{}));continue;case"engineering":e=Kt(Kt(Kt({},e),{notation:"engineering"}),i.options.reduce(function(c,u){return Kt(Kt({},c),jx(u))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(CI,function(c,u,d,f,h,p){if(u)e.minimumIntegerDigits=d.length;else{if(f&&h)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(LT.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(Fx.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Fx,function(c,u,d,f,h,p){return d==="*"?e.minimumFractionDigits=u.length:f&&f[0]==="#"?e.maximumFractionDigits=f.length:h&&p?(e.minimumFractionDigits=h.length,e.maximumFractionDigits=h.length+p.length):(e.minimumFractionDigits=u.length,e.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?e=Kt(Kt({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=Kt(Kt({},e),zx(o)));continue}if(PT.test(i.stem)){e=Kt(Kt({},e),zx(i.stem));continue}var s=NT(i.stem);s&&(e=Kt(Kt({},e),s));var a=AI(i.stem);a&&(e=Kt(Kt({},e),a))}return e}var Df={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function LI(t,e){for(var n="",r=0;r<t.length;r++){var i=t.charAt(r);if(i==="j"){for(var o=0;r+1<t.length&&t.charAt(r+1)===i;)o++,r++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",u=NI(e);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function NI(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,r;n!=="root"&&(r=t.maximize().region);var i=Df[r||""]||Df[n||""]||Df["".concat(n,"-001")]||Df["001"];return i[0]}var Zg,OI=new RegExp("^".concat(AT.source,"*")),II=new RegExp("".concat(AT.source,"*$"));function Ft(t,e){return{start:t,end:e}}var RI=!!String.prototype.startsWith&&"_a".startsWith("a",1),DI=!!String.fromCodePoint,MI=!!Object.fromEntries,FI=!!String.prototype.codePointAt,zI=!!String.prototype.trimStart,jI=!!String.prototype.trimEnd,UI=!!Number.isSafeInteger,BI=UI?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Rv=!0;try{var qI=IT("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Rv=((Zg=qI.exec("a"))===null||Zg===void 0?void 0:Zg[0])==="a"}catch{Rv=!1}var Ux=RI?function(e,n,r){return e.startsWith(n,r)}:function(e,n,r){return e.slice(r,r+n.length)===n},Dv=DI?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r="",i=e.length,o=0,s;i>o;){if(s=e[o++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Bx=MI?Object.fromEntries:function(e){for(var n={},r=0,i=e;r<i.length;r++){var o=i[r],s=o[0],a=o[1];n[s]=a}return n},OT=FI?function(e,n){return e.codePointAt(n)}:function(e,n){var r=e.length;if(!(n<0||n>=r)){var i=e.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=e.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},VI=zI?function(e){return e.trimStart()}:function(e){return e.replace(OI,"")},HI=jI?function(e){return e.trimEnd()}:function(e){return e.replace(II,"")};function IT(t,e){return new RegExp(t,e)}var Mv;if(Rv){var qx=IT("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Mv=function(e,n){var r;qx.lastIndex=n;var i=qx.exec(e);return(r=i[1])!==null&&r!==void 0?r:""}}else Mv=function(e,n){for(var r=[];;){var i=OT(e,n);if(i===void 0||RT(i)||YI(i))break;r.push(i),n+=i>=65536?2:1}return Dv.apply(void 0,r)};var KI=(function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(e,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&e>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:On.pound,location:Ft(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Rt.UNMATCHED_CLOSING_TAG,Ft(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Fv(this.peek()||0)){var s=this.parseTag(e,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(e,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:On.literal,value:"<".concat(i,"/>"),location:Ft(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Fv(this.char()))return this.error(Rt.INVALID_TAG,Ft(a,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(Rt.UNMATCHED_CLOSING_TAG,Ft(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:On.tag,value:i,children:s,location:Ft(r,this.clonePosition())},err:null}:this.error(Rt.INVALID_TAG,Ft(a,this.clonePosition())))}else return this.error(Rt.UNCLOSED_TAG,Ft(r,this.clonePosition()))}else return this.error(Rt.INVALID_TAG,Ft(r,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&WI(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(e,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=Ft(r,this.clonePosition());return{val:{type:On.literal,value:i,location:c},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!GI(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Dv.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&e>0?null:(this.bump(),Dv(r))},t.prototype.parseArgument=function(e,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Rt.EXPECT_ARGUMENT_CLOSING_BRACE,Ft(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Rt.EMPTY_ARGUMENT,Ft(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Rt.MALFORMED_ARGUMENT,Ft(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Rt.EXPECT_ARGUMENT_CLOSING_BRACE,Ft(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:On.argument,value:i,location:Ft(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Rt.EXPECT_ARGUMENT_CLOSING_BRACE,Ft(r,this.clonePosition())):this.parseArgumentOptions(e,n,i,r);default:return this.error(Rt.MALFORMED_ARGUMENT,Ft(r,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),r=Mv(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=Ft(e,o);return{value:r,location:s}},t.prototype.parseArgumentOptions=function(e,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(Rt.EXPECT_ARGUMENT_TYPE,Ft(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var h=HI(f.val);if(h.length===0)return this.error(Rt.EXPECT_ARGUMENT_STYLE,Ft(this.clonePosition(),this.clonePosition()));var p=Ft(d,this.clonePosition());u={style:h,styleLocation:p}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var m=Ft(i,this.clonePosition());if(u&&Ux(u?.style,"::",0)){var v=VI(u.style.slice(2));if(a==="number"){var f=this.parseNumberSkeletonFromString(v,u.styleLocation);return f.err?f:{val:{type:On.number,value:r,location:m,style:f.val},err:null}}else{if(v.length===0)return this.error(Rt.EXPECT_DATE_TIME_SKELETON,m);var _=v;this.locale&&(_=LI(v,this.locale));var h={type:Ec.dateTime,pattern:_,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?SI(_):{}},y=a==="date"?On.date:On.time;return{val:{type:y,value:r,location:m,style:h},err:null}}}return{val:{type:a==="number"?On.number:a==="date"?On.date:On.time,value:r,location:m,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Rt.EXPECT_SELECT_ARGUMENT_OPTIONS,Ft(w,Kt({},w)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),E=0;if(a!=="select"&&x.value==="offset"){if(!this.bumpIf(":"))return this.error(Rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ft(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Rt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),x=this.parseIdentifierIfPossible(),E=f.val}var $=this.tryParsePluralOrSelectOptions(e,a,n,x);if($.err)return $;var g=this.tryParseArgumentClose(i);if(g.err)return g;var C=Ft(i,this.clonePosition());return a==="select"?{val:{type:On.select,value:r,options:Bx($.val),location:C},err:null}:{val:{type:On.plural,value:r,options:Bx($.val),offset:E,pluralType:a==="plural"?"cardinal":"ordinal",location:C},err:null}}default:return this.error(Rt.INVALID_ARGUMENT_TYPE,Ft(s,c))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Rt.EXPECT_ARGUMENT_CLOSING_BRACE,Ft(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Rt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ft(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var r=[];try{r=TI(e)}catch{return this.error(Rt.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ec.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?PI(r):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,r,i){for(var o,s=!1,a=[],c=new Set,u=i.value,d=i.location;;){if(u.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(Rt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Rt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;d=Ft(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?Rt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Rt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);u==="other"&&(s=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Rt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Rt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ft(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(e+1,n,r);if(g.err)return g;var m=this.tryParseArgumentClose(p);if(m.err)return m;a.push([u,{value:g.val,location:Ft(p,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,d=o.location}return a.length===0?this.error(n==="select"?Rt.EXPECT_SELECT_ARGUMENT_SELECTOR:Rt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ft(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Rt.MISSING_OTHER_CLAUSE,Ft(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=Ft(i,this.clonePosition());return o?(s*=r,BI(s)?{val:s,err:null}:this.error(n,c)):this.error(e,c)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=OT(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Ux(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),r=this.message.indexOf(e,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&RT(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(e>=65536?2:1));return r??null},t})();function Fv(t){return t>=97&&t<=122||t>=65&&t<=90}function GI(t){return Fv(t)||t===47}function WI(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function RT(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function YI(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function zv(t){t.forEach(function(e){if(delete e.location,ET(e)||TT(e))for(var n in e.options)delete e.options[n].location,zv(e.options[n].value);else xT(e)&&CT(e.style)||(kT(e)||ST(e))&&Iv(e.style)?delete e.style.location:$T(e)&&zv(e.children)})}function JI(t,e){e===void 0&&(e={}),e=Kt({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new KI(t,e).parse();if(n.err){var r=SyntaxError(Rt[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return e?.captureLocation||zv(n.val),n.val}var Tc;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Tc||(Tc={}));var Ip=(function(t){Op(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e})(Error),Vx=(function(t){Op(e,t);function e(n,r,i,o){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Tc.INVALID_VALUE,o)||this}return e})(Ip),XI=(function(t){Op(e,t);function e(n,r,i){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Tc.INVALID_VALUE,i)||this}return e})(Ip),ZI=(function(t){Op(e,t);function e(n,r){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Tc.MISSING_VALUE,r)||this}return e})(Ip),Kr;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Kr||(Kr={}));function QI(t){return t.length<2?t:t.reduce(function(e,n){var r=e[e.length-1];return!r||r.type!==Kr.literal||n.type!==Kr.literal?e.push(n):r.value+=n.value,e},[])}function eR(t){return typeof t=="function"}function uh(t,e,n,r,i,o,s){if(t.length===1&&Mx(t[0]))return[{type:Kr.literal,value:t[0].value}];for(var a=[],c=0,u=t;c<u.length;c++){var d=u[c];if(Mx(d)){a.push({type:Kr.literal,value:d.value});continue}if(xI(d)){typeof o=="number"&&a.push({type:Kr.literal,value:n.getNumberFormat(e).format(o)});continue}var f=d.value;if(!(i&&f in i))throw new ZI(f,s);var h=i[f];if(wI(d)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),a.push({type:typeof h=="string"?Kr.literal:Kr.object,value:h});continue}if(kT(d)){var p=typeof d.style=="string"?r.date[d.style]:Iv(d.style)?d.style.parsedOptions:void 0;a.push({type:Kr.literal,value:n.getDateTimeFormat(e,p).format(h)});continue}if(ST(d)){var p=typeof d.style=="string"?r.time[d.style]:Iv(d.style)?d.style.parsedOptions:r.time.medium;a.push({type:Kr.literal,value:n.getDateTimeFormat(e,p).format(h)});continue}if(xT(d)){var p=typeof d.style=="string"?r.number[d.style]:CT(d.style)?d.style.parsedOptions:void 0;p&&p.scale&&(h=h*(p.scale||1)),a.push({type:Kr.literal,value:n.getNumberFormat(e,p).format(h)});continue}if($T(d)){var g=d.children,m=d.value,v=i[m];if(!eR(v))throw new XI(m,"function",s);var _=uh(g,e,n,r,i,o),y=v(_.map(function(E){return E.value}));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map(function(E){return{type:typeof E=="string"?Kr.literal:Kr.object,value:E}}))}if(ET(d)){var w=d.options[h]||d.options.other;if(!w)throw new Vx(d.value,h,Object.keys(d.options),s);a.push.apply(a,uh(w.value,e,n,r,i));continue}if(TT(d)){var w=d.options["=".concat(h)];if(!w){if(!Intl.PluralRules)throw new Ip(`Intl.PluralRules is not available in this environment.
|
|
4
4
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
@@ -134,7 +134,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
134
134
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
135
135
|
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(i&&n.sep&&!n.value){const s=[];for(let a=0;a<n.sep.length;++a){const c=n.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Rs(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(T$(n.key)&&!Rs(n.sep,"newline")){const s=Hl(n.start),a=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(Rs(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const s=Hl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Rs(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);i||n.value?(e.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Rs(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Rs(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=Uf(r),o=Hl(i);s0(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
136
136
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
137
|
-
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Uf(e),r=Hl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Uf(e),r=Hl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function WD(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new KD||null,prettyErrors:e}}function YD(t,e={}){const{lineCounter:n,prettyErrors:r}=WD(e),i=new GD(n?.addNewLine),o=new UD(e);let s=null;for(const a of o.compose(i.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Hu(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(t0(t,n)),s.warnings.forEach(t0(t,n))),s}function JD(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=YD(t,n);if(!i)return null;if(i.warnings.forEach(o=>QT(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function U_(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Zd(t)&&!r?t.toString(n):new nf(t,r,n).toString(n)}const ua=ot([]),Qc=un([ua],([t],e)=>{e(t.find(({collectionName:n,internalPath:r})=>n===void 0&&r!==void 0))}),to=ot(),Vp=un([to,Qc],([t,e])=>t?.internalPath!==void 0?t:e),Io=t=>oe(ua).find(e=>e.collectionName===t.collectionName&&e.fileName===t.fileName&&("typedKeyPath"in t?e.typedKeyPath===t.typedKeyPath:!0)&&("isIndexFile"in t?e.isIndexFile===t.isIndexFile:!0)),Hp=(t,{matchSubFolders:e=!0}={})=>{const{filename:n}=gn(t);return n.startsWith("+")?[]:oe(ua).filter(({internalPath:r,entryRelative:i})=>{if(r===void 0)return!1;if(i)return t.startsWith(`${r}/`);const o=r.replace(/{{.+?}}/g,".+?"),s=r&&e?"\\b":"$";return new RegExp(`^${o}${s}`).test(gn(t).dirname??"")}).sort((r,i)=>(i.internalPath??"").localeCompare(r.internalPath??""))},B_=t=>!!t&&!t.entryRelative&&!t.hasTemplateTags,eu=ot(!1),Ro=ot(),q_=ot([]),Ai=ot([]),V_=ot([]),$$=t=>oe(q_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):si(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>(n.folderPath??"").localeCompare(e.folderPath??"")),el=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:r})=>r in n).map(({type:r,value:i})=>[r,r==="hour"&&i==="24"?"00":i]))};var mh={exports:{}},XD=mh.exports,a0;function ZD(){return a0||(a0=1,(function(t,e){(function(n,r){t.exports=r()})(XD,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var M=["th","st","nd","rd"],U=N%100;return"["+N+(M[(U-20)%10]||M[U]||M[0])+"]"}},w=function(N,M,U){var H=String(N);return!H||H.length>=M?N:""+Array(M+1-H.length).join(U)+N},x={s:w,z:function(N){var M=-N.utcOffset(),U=Math.abs(M),H=Math.floor(U/60),G=U%60;return(M<=0?"+":"-")+w(H,2,"0")+":"+w(G,2,"0")},m:function N(M,U){if(M.date()<U.date())return-N(U,M);var H=12*(U.year()-M.year())+(U.month()-M.month()),G=M.clone().add(H,f),W=U-G<0,Y=M.clone().add(H+(W?-1:1),f);return+(-(H+(U-G)/(W?G-Y:Y-G))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:p,w:d,d:u,D:g,h:c,m:a,s,ms:o,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},E="en",$={};$[E]=y;var C="$isDayjsObject",k=function(N){return N instanceof L||!(!N||!N[C])},T=function N(M,U,H){var G;if(!M)return E;if(typeof M=="string"){var W=M.toLowerCase();$[W]&&(G=W),U&&($[W]=U,G=W);var Y=M.split("-");if(!G&&Y.length>1)return N(Y[0])}else{var R=M.name;$[R]=M,G=R}return!H&&G&&(E=G),G||!H&&E},A=function(N,M){if(k(N))return N.clone();var U=typeof M=="object"?M:{};return U.date=N,U.args=arguments,new L(U)},P=x;P.l=T,P.i=k,P.w=function(N,M){return A(N,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var L=(function(){function N(U){this.$L=T(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[C]=!0}var M=N.prototype;return M.parse=function(U){this.$d=(function(H){var G=H.date,W=H.utc;if(G===null)return new Date(NaN);if(P.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Y=G.match(v);if(Y){var R=Y[2]-1||0,B=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,B)):new Date(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,B)}}return new Date(G)})(U),this.init()},M.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(U,H){var G=A(U);return this.startOf(H)<=G&&G<=this.endOf(H)},M.isAfter=function(U,H){return A(U)<this.startOf(H)},M.isBefore=function(U,H){return this.endOf(H)<A(U)},M.$g=function(U,H,G){return P.u(U)?this[H]:this.set(G,U)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(U,H){var G=this,W=!!P.u(H)||H,Y=P.p(U),R=function(pe,ce){var ge=P.w(G.$u?Date.UTC(G.$y,ce,pe):new Date(G.$y,ce,pe),G);return W?ge:ge.endOf(u)},B=function(pe,ce){return P.w(G.toDate()[pe].apply(G.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ce)),G)},J=this.$W,Q=this.$M,ee=this.$D,te="set"+(this.$u?"UTC":"");switch(Y){case p:return W?R(1,0):R(31,11);case f:return W?R(1,Q):R(0,Q+1);case d:var re=this.$locale().weekStart||0,he=(J<re?J+7:J)-re;return R(W?ee-he:ee+(6-he),Q);case u:case g:return B(te+"Hours",0);case c:return B(te+"Minutes",1);case a:return B(te+"Seconds",2);case s:return B(te+"Milliseconds",3);default:return this.clone()}},M.endOf=function(U){return this.startOf(U,!1)},M.$set=function(U,H){var G,W=P.p(U),Y="set"+(this.$u?"UTC":""),R=(G={},G[u]=Y+"Date",G[g]=Y+"Date",G[f]=Y+"Month",G[p]=Y+"FullYear",G[c]=Y+"Hours",G[a]=Y+"Minutes",G[s]=Y+"Seconds",G[o]=Y+"Milliseconds",G)[W],B=W===u?this.$D+(H-this.$W):H;if(W===f||W===p){var J=this.clone().set(g,1);J.$d[R](B),J.init(),this.$d=J.set(g,Math.min(this.$D,J.daysInMonth())).$d}else R&&this.$d[R](B);return this.init(),this},M.set=function(U,H){return this.clone().$set(U,H)},M.get=function(U){return this[P.p(U)]()},M.add=function(U,H){var G,W=this;U=Number(U);var Y=P.p(H),R=function(Q){var ee=A(W);return P.w(ee.date(ee.date()+Math.round(Q*U)),W)};if(Y===f)return this.set(f,this.$M+U);if(Y===p)return this.set(p,this.$y+U);if(Y===u)return R(1);if(Y===d)return R(7);var B=(G={},G[a]=r,G[c]=i,G[s]=n,G)[Y]||1,J=this.$d.getTime()+U*B;return P.w(J,this)},M.subtract=function(U,H){return this.add(-1*U,H)},M.format=function(U){var H=this,G=this.$locale();if(!this.isValid())return G.invalidDate||m;var W=U||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),R=this.$H,B=this.$m,J=this.$M,Q=G.weekdays,ee=G.months,te=G.meridiem,re=function(ce,ge,Pe,xe){return ce&&(ce[ge]||ce(H,W))||Pe[ge].slice(0,xe)},he=function(ce){return P.s(R%12||12,ce,"0")},pe=te||function(ce,ge,Pe){var xe=ce<12?"AM":"PM";return Pe?xe.toLowerCase():xe};return W.replace(_,(function(ce,ge){return ge||(function(Pe){switch(Pe){case"YY":return String(H.$y).slice(-2);case"YYYY":return P.s(H.$y,4,"0");case"M":return J+1;case"MM":return P.s(J+1,2,"0");case"MMM":return re(G.monthsShort,J,ee,3);case"MMMM":return re(ee,J);case"D":return H.$D;case"DD":return P.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return re(G.weekdaysMin,H.$W,Q,2);case"ddd":return re(G.weekdaysShort,H.$W,Q,3);case"dddd":return Q[H.$W];case"H":return String(R);case"HH":return P.s(R,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return pe(R,B,!0);case"A":return pe(R,B,!1);case"m":return String(B);case"mm":return P.s(B,2,"0");case"s":return String(H.$s);case"ss":return P.s(H.$s,2,"0");case"SSS":return P.s(H.$ms,3,"0");case"Z":return Y}return null})(ce)||Y.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(U,H,G){var W,Y=this,R=P.p(H),B=A(U),J=(B.utcOffset()-this.utcOffset())*r,Q=this-B,ee=function(){return P.m(Y,B)};switch(R){case p:W=ee()/12;break;case f:W=ee();break;case h:W=ee()/3;break;case d:W=(Q-J)/6048e5;break;case u:W=(Q-J)/864e5;break;case c:W=Q/i;break;case a:W=Q/r;break;case s:W=Q/n;break;default:W=Q}return G?W:P.a(W)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return $[this.$L]},M.locale=function(U,H){if(!U)return this.$L;var G=this.clone(),W=T(U,H,!0);return W&&(G.$L=W),G},M.clone=function(){return P.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},N})(),O=L.prototype;return A.prototype=O,[["$ms",o],["$s",s],["$m",a],["$H",c],["$W",u],["$M",f],["$y",p],["$D",g]].forEach((function(N){O[N[1]]=function(M){return this.$g(M,N[0],N[1])}})),A.extend=function(N,M){return N.$i||(N(M,L,A),N.$i=!0),A},A.locale=T,A.isDayjs=k,A.unix=function(N){return A(1e3*N)},A.en=$[E],A.Ls=$,A.p={},A}))})(mh)),mh.exports}var QD=ZD();const fr=Ss(QD);var vh={exports:{}},eM=vh.exports,l0;function tM(){return l0||(l0=1,(function(t,e){(function(n,r){t.exports=r()})(eM,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,c={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(_){this[v]=+_}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(_){if(!_||_==="Z")return 0;var y=_.match(/([+-]|\d\d)/g),w=60*y[1]+(+y[2]||0);return w===0?0:y[0]==="+"?-w:w})(v)}],h=function(v){var _=c[v];return _&&(_.indexOf?_:_.s.concat(_.f))},p=function(v,_){var y,w=c.meridiem;if(w){for(var x=1;x<=24;x+=1)if(v.indexOf(w(x,0,_))>-1){y=x>12;break}}else y=v===(_?"pm":"PM");return y},g={A:[a,function(v){this.afternoon=p(v,!1)}],a:[a,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[o,d("day")],Do:[a,function(v){var _=c.ordinal,y=v.match(/\d+/);if(this.day=y[0],_)for(var w=1;w<=31;w+=1)_(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[s,d("week")],ww:[o,d("week")],M:[s,d("month")],MM:[o,d("month")],MMM:[a,function(v){var _=h("months"),y=(h("monthsShort")||_.map((function(w){return w.slice(0,3)}))).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(v){var _=h("months").indexOf(v)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function m(v){var _,y;_=v,y=c&&c.formats;for(var w=(v=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,P,L){var O=L&&L.toUpperCase();return P||y[L]||n[L]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,M,U){return M||U.slice(1)}))}))).match(r),x=w.length,E=0;E<x;E+=1){var $=w[E],C=g[$],k=C&&C[0],T=C&&C[1];w[E]=T?{regex:k,parser:T}:$.replace(/^\[|\]$/g,"")}return function(A){for(var P={},L=0,O=0;L<x;L+=1){var N=w[L];if(typeof N=="string")O+=N.length;else{var M=N.regex,U=N.parser,H=A.slice(O),G=M.exec(H)[0];U.call(P,G),A=A.replace(G,"")}}return(function(W){var Y=W.afternoon;if(Y!==void 0){var R=W.hours;Y?R<12&&(W.hours+=12):R===12&&(W.hours=0),delete W.afternoon}})(P),P}}return function(v,_,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var w=_.prototype,x=w.parse;w.parse=function(E){var $=E.date,C=E.utc,k=E.args;this.$u=C;var T=k[1];if(typeof T=="string"){var A=k[2]===!0,P=k[3]===!0,L=A||P,O=k[2];P&&(O=k[2]),c=this.$locale(),!A&&O&&(c=y.Ls[O]),this.$d=(function(H,G,W,Y){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*H);var R=m(G)(H),B=R.year,J=R.month,Q=R.day,ee=R.hours,te=R.minutes,re=R.seconds,he=R.milliseconds,pe=R.zone,ce=R.week,ge=new Date,Pe=Q||(B||J?1:ge.getDate()),xe=B||ge.getFullYear(),de=0;B&&!J||(de=J>0?J-1:ge.getMonth());var we,ve=ee||0,fe=te||0,_e=re||0,Ce=he||0;return pe?new Date(Date.UTC(xe,de,Pe,ve,fe,_e,Ce+60*pe.offset*1e3)):W?new Date(Date.UTC(xe,de,Pe,ve,fe,_e,Ce)):(we=new Date(xe,de,Pe,ve,fe,_e,Ce),ce&&(we=Y(we).week(ce).toDate()),we)}catch{return new Date("")}})($,T,C,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),L&&$!=this.format(T)&&(this.$d=new Date("")),c={}}else if(T instanceof Array)for(var N=T.length,M=1;M<=N;M+=1){k[1]=T[M-1];var U=y.apply(this,k);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}M===N&&(this.$d=new Date(""))}else x.call(this,E)}}}))})(vh)),vh.exports}var nM=tM();const H_=Ss(nM);var bh={exports:{}},rM=bh.exports,c0;function iM(){return c0||(c0=1,(function(t,e){(function(n,r){t.exports=r()})(rM,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,i,o){var s=i.prototype,a=s.format;o.en.formats=n,s.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,g,m){var v=m&&m.toUpperCase();return g||h[m]||n[m]||h[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(_,y,w){return y||w.slice(1)}))}))})(c,u===void 0?{}:u);return a.call(this,d)}}}))})(bh)),bh.exports}var oM=iM();const K_=Ss(oM);var _h={exports:{}},sM=_h.exports,u0;function aM(){return u0||(u0=1,(function(t,e){(function(n,r){t.exports=r()})(sM,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var c=s.prototype;a.utc=function(m){var v={date:m,utc:!0,args:arguments};return new s(v)},c.utc=function(m){var v=a(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var d=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=c.utcOffset;c.utcOffset=function(m,v){var _=this.$utils().u;if(_(m))return this.$u?0:_(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=(function(E){E===void 0&&(E="");var $=E.match(r);if(!$)return null;var C=(""+$[0]).match(i)||["-",0,0],k=C[0],T=60*+C[1]+ +C[2];return T===0?0:k==="+"?T:-T})(m),m===null))return this;var y=Math.abs(m)<=16?60*m:m;if(y===0)return this.utc(v);var w=this.clone();if(v)return w.$offset=y,w.$u=!1,w;var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(w=this.local().add(y+x,n)).$offset=y,w.$x.$localOffset=x,w};var h=c.format;c.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var p=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=c.diff;c.diff=function(m,v,_){if(m&&this.$u===m.$u)return g.call(this,m,v,_);var y=this.local(),w=a(m).local();return g.call(y,w,v,_)}}}))})(_h)),_h.exports}var lM=aM();const G_=Ss(lM);class fo{#e;#n="";#t="";#i={};#l=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:o=[]}={}){this.#e=void 0,this.#n=e,this.#t=n,this.#i={keyPath:r,autoIncrement:i},this.#l=o}async#s(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,o=this.#t,s=i.objectStoreNames.contains(o)?i.transaction(o,"readwrite").objectStore(o):i.createObjectStore(o,this.#i);this.#l.forEach(({name:a,keyPath:c,options:u})=>{s.indexNames.contains(a)||s.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#a(){let e=!1,n=await this.#s();const{version:r,objectStoreNames:i}=n,o=this.#t;if(i.contains(o)){const s=n.transaction(o).objectStore(o);e=this.#l.some(({name:a})=>!s.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#s(r+1)),n.onversionchange=()=>{n.close(),this.#e=void 0},n}async#r(e){this.#e??=await this.#a();const n=this.#e,r=this.#t,i=n.transaction(r,"readwrite"),o=e(i.objectStore(r));return o?new Promise(s=>{o.onsuccess=()=>{s(o.result)}}):new Promise(s=>{i.oncomplete=()=>{s(void 0)}})}async set(e,n){return this.#r(r=>r.put(n,e))}async put(e){return this.#r(n=>n.put(e))}async saveEntries(e){return this.#r(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#r(n=>n.get(e))}async keys(){return this.#r(e=>e.getAllKeys())}async values(){return this.#r(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#o({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:o=!1}){return new Promise(s=>{this.#r(a=>{const c=(n?a.index(n):a).openCursor(r,i),u=[];c.onsuccess=()=>{const d=c.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?o?(u.push(f),d.continue()):s(f):d.continue()}else s(o?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#r(n=>n.delete(e))}async deleteEntries(e){await this.#r(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#r(e=>e.clear())}}class pi{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const C$=t=>Array.isArray(t)&&t.every(e=>Bt(e)),Pc=t=>[...new Set(t)];var sm,d0;function cM(){return d0||(d0=1,sm=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),sm}var uM=cM();const pn=Ss(uM);function A$(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function P$(t){return t}function ho(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||P$,o={};function s(a,c,u){u=u||1,Object.keys(a).forEach(function(d){const f=a[d],h=e.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),g=A$(f),m=p==="[object Object]"||p==="[object Array]",v=c?c+n+i(d):i(d);if(!h&&!g&&m&&Object.keys(f).length&&(!e.maxDepth||u<r))return s(f,v,u+1);o[v]=f})}return s(t),o}function ys(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||P$,o={};if(A$(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){const f=Number(d);return isNaN(f)||d.indexOf(".")!==-1||e.object?d:f}function c(d,f,h){return Object.keys(h).reduce(function(p,g){return p[d+n+g]=h[g],p},f)}function u(d){const f=Object.prototype.toString.call(d),h=f==="[object Array]",p=f==="[object Object]";if(d){if(h)return!d.length;if(p)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,f){const h=Object.prototype.toString.call(t[f]);return!(h==="[object Object]"||h==="[object Array]")||u(t[f])?(d[f]=t[f],d):c(f,d,ho(t[f],e))},{}),Object.keys(t).forEach(function(d){const f=d.split(n).map(i);let h=a(f.shift()),p=a(f[0]),g=o;for(;p!==void 0;){if(h==="__proto__")return;const m=Object.prototype.toString.call(g[h]),v=m==="[object Object]"||m==="[object Array]";if(!r&&!v&&typeof g[h]<"u")return;(r&&!v||!r&&g[h]==null)&&(g[h]=typeof p=="number"&&!e.object?[]:{}),g=g[h],f.length>0&&(h=a(f.shift()),p=a(f[0]))}g[h]=ys(t[d],e)}),o}const dM=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ə","A"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ō","O"],["Ő","O"],["Ø","O"],["Œ","OE"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ə","a"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ō","o"],["ő","o"],["ø","o"],["œ","oe"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","a"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ու","u"],["ՈՒ","U"],["Ու","U"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","k"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","O"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(c)"],["ⓓ","(d)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"],["−","-"],["⁓","-"]],f0=new Map(dM),h0=[["æ","ae"],["Æ","Ae"],["ø","oe"],["Ø","Oe"],["å","aa"],["Å","Aa"]],rd={sv:[["ä","a"],["Ä","A"],["ö","o"],["Ö","O"],["å","a"],["Å","A"]],da:h0,nb:h0,de:[["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["ß","ss"],["ẞ","Ss"]],tr:[["â","a"],["Â","A"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"]],hu:[["ű","u"],["Ű","U"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"],["á","a"],["Á","A"],["é","e"],["É","E"],["í","i"],["Í","I"],["ó","o"],["Ó","O"],["ú","u"],["Ú","U"]],sr:[["ђ","dj"],["Ђ","Dj"],["џ","dz"],["Џ","Dz"],["љ","lj"],["Љ","Lj"],["њ","nj"],["Њ","Nj"],["ћ","c"],["Ћ","C"],["ч","ch"],["Ч","Ch"],["ш","sh"],["Ш","Sh"],["ж","zh"],["Ж","Zh"]]};for(const t of Object.keys(rd))rd[t]=new Map(rd[t]);const fM=(t,e)=>{for(const[n,r]of e)t=t.replaceAll(n,r);return t},hM=t=>{if(!t)return;const e=t.toLowerCase().replace(/^no(-|$)/,"nb$1");return rd[e]||rd[e.split("-")[0]]||void 0};function pM(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=hM(e.locale);let r=f0;const i=e.customReplacements.length>0||e.customReplacements.size>0;if(n||i){if(r=new Map(f0),n)for(const[o,s]of n)r.set(o,s);for(const[o,s]of e.customReplacements)r.set(o,s)}return t=t.normalize(),t=fM(t,r),t=t.normalize("NFD").replaceAll(/\p{Diacritic}/gu,"").normalize(),t=t.replaceAll(/\p{Dash_Punctuation}/gu,"-"),t}const L$=(t,{fallback:e=!0}={})=>{const{slug:{encoding:n="unicode",clean_accents:r=!1,sanitize_replacement:i="-",trim:o=!0}={}}=oe(Ct)??{};let s=t;if(r&&(s=pM(s.normalize("NFD"))),n==="ascii"?s=s.replaceAll(/[^\w-~]/g," "):s=s.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),s=s.toLocaleLowerCase().trim().replaceAll(/\s+/g,i),i){const a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`${a}+`,"g");s=s.replace(c,i),o&&(s=s.replace(new RegExp(`^${a}+|${a}+$`,"g"),""))}return!s&&e?Si("short"):s},Ar=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},po=(t,{displayLocale:e=Ar(oe(qt)??"en")}={})=>{const n=Ar(t);if(!n)return;const r=new Intl.DisplayNames(e,{type:"language"});try{return r.of(n)}catch(i){console.error(i);return}},tl=(t,e={})=>new Intl.ListFormat(Ar(t),{style:"narrow",type:"conjunction",...e}),W_=({_i18n:t,locale:e,path:n})=>{const{defaultLocale:r,omitDefaultLocaleFromFileName:i}=t;return i&&e===r&&(n=n.replace(/\.{{locale}}\.(\w+)$/,".$1")),n.replaceAll("{{locale}}",e)},gM=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,mM=/^\d{4}-[01]\d-[0-3]\d$/,vM=/T00:00(?::00)?(?:\.000)?Z$/,Gv={year:"numeric",month:"short",day:"numeric"},Wv={hour:"numeric",minute:"numeric",hour12:!0},bM={...Gv,...Wv};fr.extend(H_);fr.extend(K_);fr.extend(G_);const da=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e||[typeof n=="string"?n:"",typeof r=="string"?r:""].join(" ").trim()||void 0,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Lc=(t,e)=>{const{format:n,timeOnly:r,utc:i}=da(e);if(t)try{return n?(i?fr.utc:fr)(t,n).toDate():r?new Date(`${new Date().toJSON().split("T")[0]}T${t}`):new Date(t)}catch(o){console.error(o);return}},N$=t=>{const{dateOnly:e,timeOnly:n,utc:r}=da(t),{year:i,month:o,day:s,hour:a,minute:c}=el({timeZone:r?"UTC":void 0}),u=`${i}-${o}-${s}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},O$=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=da(n),a=i?"YYYY-MM-DD":o?"HH:mm":"YYYY-MM-DDTHH:mm",c=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t)try{if(r){const u=(s?fr.utc:fr)(t,a).format(r);return r.includes("Z")&&u.endsWith("+00:00")?u.replace("+00:00","Z"):u}return i?t:s?`${t}:00.000Z`:`${t}${c}`}catch(u){console.error(u);return}},_M=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=da(e);if(!t)return"";const o=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(o)return o;try{const s=t?Lc(t,e):new Date;if(t&&!s||t&&s&&Number.isNaN(s.getTime()))return"";const{year:a,month:c,day:u,hour:d,minute:f}=el({date:s,timeZone:i?"UTC":void 0}),h=`${a}-${c}-${u}`,p=`${d}:${f}`;return n?h:r?p:`${h}T${p}`}catch(s){return console.error(s),""}},I$=({locale:t,fieldConfig:e,currentValue:n})=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=da(e);if(typeof n!="string"||!n.trim())return"";if(r)try{return(s?fr.utc:fr)(n,r).format(r)}catch{}const a=Lc(n,e),c=Ar(t);return!a||Number.isNaN(a.getTime())?"":o?a.toLocaleTimeString(c,Wv):i?a.toLocaleDateString(c,{...Gv,timeZone:s||mM.test(n)||vM.test(n)?"UTC":void 0}):a.toLocaleString(c,{...Gv,...Wv,timeZone:s?"UTC":void 0,timeZoneName:s?void 0:"short"})};fr.extend(H_);fr.extend(K_);fr.extend(G_);const Y_=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,R$=/^default\('(?<defaultValue>.+?)'\)$/,D$=/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,yM=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,wM=t=>String(t).toUpperCase(),xM=t=>String(t).toLowerCase(),kM=(t,{format:e,timeZone:n},r)=>{const i=String(t),{dateOnly:o,utc:s}=da(r),c=(n==="utc"||s||o&&!!i.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&!!i.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?fr.utc:fr)(i);return c.isValid()?c.format(e):""},SM=(t,{defaultValue:e})=>t?String(t):e,EM=(t,{truthyValue:e,falsyValue:n})=>t?e:n,TM=(t,{max:e,ellipsis:n="…"})=>bT(String(t),Number(e),{ellipsis:n}),$M=({fieldConfig:t,value:e,transformation:n})=>{if(n==="upper")return wM(e);if(n==="lower")return xM(e);const r=n.match(Y_);if(r?.groups)return kM(e,r.groups,t??{});const i=n.match(R$);if(i?.groups)return SM(e,i.groups);const o=n.match(D$);if(o?.groups)return EM(e,o.groups);const s=n.match(yM);return s?.groups?TM(e,s.groups):String(e)},J_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=$M({fieldConfig:t,value:e,transformation:r})}),e),Nt=(t=0)=>new Promise(e=>{globalThis.setTimeout(()=>{e(void 0)},t)}),M$={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(M$);const F$={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(F$);var Ii=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Zl,Ku,ka;class CM{constructor(...e){Zl.set(this,new Map),Ku.set(this,new Map),ka.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),Ii(this,ka,"f").has(r)||Ii(this,ka,"f").set(r,new Set);const o=Ii(this,ka,"f").get(r);let s=!0;for(let a of i){const c=a.startsWith("*");if(a=c?a.slice(1):a,o?.add(a),s&&Ii(this,Ku,"f").set(r,a),s=!1,c)continue;const u=Ii(this,Zl,"f").get(a);if(u&&u!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${u} -> ${a}". Pass \`force=true\` to override this definition.`);Ii(this,Zl,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:Ii(this,Zl,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&Ii(this,Ku,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:Ii(this,ka,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of Ii(this,ka,"f").values())Object.freeze(e);return this}_getTestState(){return{types:Ii(this,Zl,"f"),extensions:Ii(this,Ku,"f")}}}Zl=new WeakMap,Ku=new WeakMap,ka=new WeakMap;const Cs=new CM(F$,M$)._freeze();var am,p0;function AM(){if(p0)return am;p0=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return am=function(r,i,o){if(typeof i!="string")throw new Error("Input must be string");for(var s=i.length,a=0,c,u,d=0;d<s;d+=1){if(c=i.charCodeAt(d),u=i[d],t(c)&&e(i.charCodeAt(d+1))&&(d+=1,u+=i[d]),a+=r(u),a===o)return i.slice(0,d+1);if(a>o)return i.slice(0,d-u.length+1)}return i},am}var lm,g0;function PM(){if(g0)return lm;g0=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return lm=function(r){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,s=null,a=null,c=0;c<i;c++)s=r.charCodeAt(c),e(s)?a!=null&&t(a)?o+=1:o+=3:s<=127?o+=1:s>=128&&s<=2047?o+=2:s>=2048&&s<=65535&&(o+=3),a=s;return o},lm}var cm,m0;function LM(){if(m0)return cm;m0=1;var t=AM(),e=PM();return cm=t.bind(null,e),cm}var um,v0;function NM(){if(v0)return um;v0=1;var t=LM(),e=/[\/\?<>\\:\*\|"]/g,n=/[\x00-\x1f\x80-\x9f]/g,r=/^\.+$/,i=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,o=/[\. ]+$/;function s(a,c){if(typeof a!="string")throw new Error("Input must be string");var u=a.replace(e,c).replace(n,c).replace(r,c).replace(i,c).replace(o,c);return t(u,255)}return um=function(a,c){var u=c&&c.replacement||"",d=s(a,u);return u===""?d:s(d,"")},um}var OM=NM();const IM=Ss(OM),z$=(t,e)=>new RegExp(`^${t.split("/").map(e).join("\\/")}\\b`),j$=t=>{const e=t.startsWith("@");return e&&(t=t.slice(1)),t=t.split("/").map(n=>encodeURIComponent(n).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)).join("/"),e?`@${t}`:t},RM=t=>decodeURIComponent(t),Kp=t=>{const e=new Intl.NumberFormat(oe(qt),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,o=i*1e3;return t<n?oe(ue)("file_size_units.b",{values:{size:e.format(t)}}):t<r?oe(ue)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?oe(ue)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<o?oe(ue)("file_size_units.gb",{values:{size:e.format(t/i)}}):oe(ue)("file_size_units.tb",{values:{size:e.format(t/o)}})},U$=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=gn(t),i=new RegExp(`^${Gt(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),o=e.sort((a,c)=>Ci(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!o)return t;const s=Number(o.match(i)?.groups?.num??0)+1;return`${n}-${s}${r?`.${r}`:""}`},X_=(t,{slugificationEnabled:e=!1,assetNamesInSameFolder:n=[]}={})=>{let r=IM(t.normalize().replace(/[\s\u00A0\u202F]+/g," "));if(e){const{filename:i,extension:o}=gn(r);r=`${L$(i)}${o?`.${o}`:""}`}return U$(r,n)},Nc=t=>t.filter(Boolean).join("/"),Yv=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const o=e.findLastIndex((s,a)=>!!s&&a<i);o>-1&&(e[o]=null)}}else n=!0}),Nc(e)},Z_=t=>typeof t=="string"?new Blob([t],{type:"text/plain"}):t,nl=async t=>{const n=await Z_(t).arrayBuffer();return Za(new Blob([`blob ${n.byteLength}\0`,n]))},DM="modulepreload",MM=function(t){return"/"+t},b0={},B$=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=s?.nonce||s?.getAttribute("nonce");i=c(n.map(u=>{if(u=MM(u),u in b0)return;b0[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":DM,d||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),d)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},Jv="0.119.2",FM={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.38.2","@sindresorhus/transliterate":"^2.2.0","@sveltia/ui":"^0.31.6","@sveltia/utils":"^0.8.6","create-react-class":"^15.7.0",dayjs:"^1.11.19",deepmerge:"^4.3.1",exifr:"^7.1.3","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.32.0",leaflet:"^1.9.4",lexical:"^0.38.2",marked:"^17.0.1","marked-bidi":"^1.0.14",mime:"^4.1.0","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.394",qrcode:"^1.5.4",react:"^19.2.0","react-dom":"^19.2.0","sanitize-filename":"^1.6.3","smol-toml":"^1.5.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.19.0","terra-draw-leaflet-adapter":"1.0.3",turndown:"^7.2.2",yaml:"^2.8.1"},Q_=t=>{const e=`https://unpkg.com/${t}`,n=FM[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Fa=async(t,e)=>B$(()=>import(`${Q_(t)}/${e}`),[]),Ea=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},zM=async(t,e)=>{if(!(e==="image")||!t.file)return{createdDate:void 0,coordinates:void 0};const{parse:r}=await Fa("exifr","dist/lite.esm.mjs"),{latitude:i,longitude:o,DateTimeOriginal:s,CreateDate:a=s}=await r(t.file).catch(()=>{})??{};return{createdDate:a instanceof Date?a:void 0,coordinates:Number.isFinite(i)&&Number.isFinite(o)?{latitude:Ea(i,7),longitude:Ea(o,7)}:void 0}},jM=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},UM=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:s,videoHeight:a}=n;r({dimensions:{width:s,height:a},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},BM=async(t,e)=>e==="image"?jM(t):UM(t,e),qM=async(t,e,n)=>{const{dimensions:r,duration:i}=await BM(e,n),{createdDate:o,coordinates:s}=await zM(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:s}},q$=["avif","gif","jpeg","png","webp"],VM=q$.map(t=>`image/${t}`),Xv=/\b(?:avif|gif|jpe?g|png|webp)$/i,HM=["image/svg+xml"],KM=/\b(?:svg)$/i,Lo=[...VM,...HM],V$=["webp"],dm={},GM=async t=>{if(t in dm)return dm[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return dm[t]=i,i},H$=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await GM(e)&&V$.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const s=(await Fa(`@jsquash/${e}`,"encode.js?module")).default,a=await s(o,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},WM=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const s=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return o;i="contain"}return i==="contain"&&(s?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},K$=(t,e,n)=>{const{scale:r,width:i,height:o}=WM(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},YM=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},JM=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},XM=async t=>t.type.startsWith("video/")?JM({blob:t}):YM({blob:t}),ey=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let s,a=0,c=0;try{s=await createImageBitmap(t),{width:a,height:c}=s}catch{({source:s,naturalWidth:a,naturalHeight:c}=await XM(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return K$(u,{width:a,height:c},{fit:o,width:r,height:i}),d.drawImage(s,0,0,u.width,u.height),s instanceof HTMLVideoElement&&document.body.removeChild(s),H$(u,{format:e,quality:n})},ZM=async t=>{const e=await t.text();try{const{optimize:n}=await Fa("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},ac=Q_("pdfjs-dist"),QM=`${ac}/build/pdf.min.mjs`,eF=`${ac}/build/pdf.worker.min.mjs`,tF={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${ac}/cmaps/`,iccUrl:`${ac}/iccs/`,standardFontDataUrl:`${ac}/standard_fonts/`,wasmUrl:`${ac}/wasm/`};let Bf;const nF=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!Bf)try{Bf=await import(QM),Bf.GlobalWorkerOptions.workerSrc=eF}catch{throw new Error("Failed to load PDF.js library")}const s=URL.createObjectURL(t),a=new OffscreenCanvas(512,512),c=a.getContext("2d");try{const d=await(await Bf.getDocument({...tF,url:s}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=K$(a,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:c,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(s)}catch{throw new Error("Failed to render PDF")}return H$(a,{format:e,quality:n})},fm=new Set,fa=async(t,e=0)=>{const{file:n,handle:r,blobURL:i,name:o,path:s}=t;if(i)return fetch(i).then(c=>c.blob());let a;if(n)a=n;else if(r)try{a=await r.getFile()}catch{throw new Error("Failed to retrieve blob from file handle")}else{if(fm.has(s)&&e<=25)return await Nt(200),fa(t,e+1);fm.add(s);const c=await oe(Tn)?.fetchBlob?.(t);if(!c)throw new Error("Failed to retrieve blob");a=new Blob([c],{type:Cs.getType(o)??c.type})}return t.blobURL=URL.createObjectURL(a),fm.delete(s),a},ty=async t=>(t.blobURL||await fa(t),t.blobURL);let qf;const Zv=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(qf===void 0){const{databaseName:i}=oe(Tn)?.repository??{};qf=i?new fo(i,"asset-thumbnails"):null}let r=await qf?.get(t.sha);if(!r){if(e)return;const i=await fa(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await nF(i,o):await ey(i,o),await qf?.set(t.sha,r)}return URL.createObjectURL(r)},Ed=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:s}=t.folder.collectionName===void 0?t.folder:Hp(t.path).find(({collectionName:d})=>d!==void 0)??oe(Qc);if(o)return e&&r&&gn(t.path).dirname===gn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:a="",output:{encode_file_path:c=!1}={}}=oe(Ct);let u=s?t.path.replace(z$(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Gt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(c&&(u=j$(u)),!(!u.startsWith("/")&&!n))return e?u:`${a}${u}`},rl=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=my({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await Zv(o):await ty(o))??Ed(o)},Fh={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},Gp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=oe(Tn)?.repository??{},i=await ty(t),o=Ed(t,{allowSpecial:!0,pathOnly:!0})??i;let s={};return["image","video","audio"].includes(e)&&i&&(s=await qM(t,i,e)),{...s,publicURL:Ed(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await nb(o):[]}},rF=()=>{try{return oe(ue)("index_file")}catch{return"Index File"}},_i=t=>{if(!Ad(t))return;const{index_file:e}=t;if(!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??rF(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Go=(t,e)=>{const n=_i(t);return n?e.slug===n.name:!1},iF=t=>{const e=_i(t);return e?!Wo(t.name).some(({slug:n})=>n===e.name):!1},ny=["file","image"],Wp=[...ny,"relation","select"],G$=[...Wp,"list","number"],W$=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),Y$=t=>ys(Object.fromEntries(Object.entries(ho(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),J$=t=>t.replace(/"/g,"'"),Pa=t=>t.replace(/"/g,"""),ry=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,oF=new RegExp(ry,"g"),sF=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,aF=new RegExp(`${ry.source}|${sF.source}`),zh=new Map,X$={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:ry,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${Pa(e)}" alt="${Pa(n)}" title="${Pa(r)}">`}},lF={id:"linked-image",label:"Image",fields:[...X$.fields,{name:"link",label:"Link",required:!1}],pattern:aF,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:s,link:a}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||s||"").trim(),link:(a||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${Pa(e)}" alt="${Pa(n)}" title="${Pa(r)}">`;return i?`<a href="${Pa(i)}">${o}</a>`:o}},Z$=t=>{if(zh.has(t))return zh.get(t);const e={icon:"image",label:oe(ue)("editor_components.image"),fields:[{name:"src",label:oe(ue)("editor_components.src"),widget:"image"},{name:"alt",label:oe(ue)("editor_components.alt"),required:!1},{name:"title",label:oe(ue)("editor_components.title"),required:!1}]};return{image:{...X$,...e},"linked-image":{...lF,...e,fields:[...e.fields,{name:"link",label:oe(ue)("editor_components.link"),required:!1}]}}[t]};var hm,_0;function y0(){if(_0)return hm;_0=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function($e){return $e}),s||(s=function($e){return $e}),c||(c=function($e,je){for(var Le=arguments.length,Ie=new Array(Le>2?Le-2:0),Re=2;Re<Le;Re++)Ie[Re-2]=arguments[Re];return $e.apply(je,Ie)}),u||(u=function($e){for(var je=arguments.length,Le=new Array(je>1?je-1:0),Ie=1;Ie<je;Ie++)Le[Ie-1]=arguments[Ie];return new $e(...Le)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),_=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),E=k(Object.prototype.hasOwnProperty),$=k(RegExp.prototype.test),C=T(TypeError);function k(Ae){return function($e){$e instanceof RegExp&&($e.lastIndex=0);for(var je=arguments.length,Le=new Array(je>1?je-1:0),Ie=1;Ie<je;Ie++)Le[Ie-1]=arguments[Ie];return c(Ae,$e,Le)}}function T(Ae){return function(){for(var $e=arguments.length,je=new Array($e),Le=0;Le<$e;Le++)je[Le]=arguments[Le];return u(Ae,je)}}function A(Ae,$e){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ae,null);let Le=$e.length;for(;Le--;){let Ie=$e[Le];if(typeof Ie=="string"){const Re=je(Ie);Re!==Ie&&(n($e)||($e[Le]=Re),Ie=Re)}Ae[Ie]=!0}return Ae}function P(Ae){for(let $e=0;$e<Ae.length;$e++)E(Ae,$e)||(Ae[$e]=null);return Ae}function L(Ae){const $e=a(null);for(const[je,Le]of t(Ae))E(Ae,je)&&(Array.isArray(Le)?$e[je]=P(Le):Le&&typeof Le=="object"&&Le.constructor===Object?$e[je]=L(Le):$e[je]=Le);return $e}function O(Ae,$e){for(;Ae!==null;){const Le=i(Ae,$e);if(Le){if(Le.get)return k(Le.get);if(typeof Le.value=="function")return k(Le.value)}Ae=r(Ae)}function je(){return null}return je}const N=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=o(["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"]),H=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),te=s(/<%[\w\W]*|[\w\W]*%>/gm),re=s(/\$\{[\w\W]*/gm),he=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),pe=s(/^aria-[\-\w]+$/),ce=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ge=s(/^(?:\w+script|data):/i),Pe=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xe=s(/^html$/i),de=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var we=Object.freeze({__proto__:null,ARIA_ATTR:pe,ATTR_WHITESPACE:Pe,CUSTOM_ELEMENT:de,DATA_ATTR:he,DOCTYPE_NAME:xe,ERB_EXPR:te,IS_ALLOWED_URI:ce,IS_SCRIPT_OR_DATA:ge,MUSTACHE_EXPR:ee,TMPLIT_EXPR:re});const ve={element:1,text:3,progressingInstruction:7,comment:8,document:9},fe=function(){return typeof window>"u"?null:window},_e=function($e,je){if(typeof $e!="object"||typeof $e.createPolicy!="function")return null;let Le=null;const Ie="data-tt-policy-suffix";je&&je.hasAttribute(Ie)&&(Le=je.getAttribute(Ie));const Re="dompurify"+(Le?"#"+Le:"");try{return $e.createPolicy(Re,{createHTML(nt){return nt},createScriptURL(nt){return nt}})}catch{return console.warn("TrustedTypes policy "+Re+" could not be created."),null}},Ce=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ze(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe();const $e=ct=>ze(ct);if($e.version="3.3.0",$e.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==ve.document||!Ae.Element)return $e.isSupported=!1,$e;let{document:je}=Ae;const Le=je,Ie=Le.currentScript,{DocumentFragment:Re,HTMLTemplateElement:nt,Node:Ge,Element:ut,NodeFilter:Oe,NamedNodeMap:be=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:ye,DOMParser:tt,trustedTypes:Ve}=Ae,Qe=ut.prototype,Xe=O(Qe,"cloneNode"),ht=O(Qe,"remove"),Pt=O(Qe,"nextSibling"),Qt=O(Qe,"childNodes"),en=O(Qe,"parentNode");if(typeof nt=="function"){const ct=je.createElement("template");ct.content&&ct.content.ownerDocument&&(je=ct.content.ownerDocument)}let pt,kt="";const{implementation:tn,createNodeIterator:$n,createDocumentFragment:ai,getElementsByTagName:Dt}=je,{importNode:bn}=Le;let Et=Ce();$e.isSupported=typeof t=="function"&&typeof en=="function"&&tn&&tn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_n,ERB_EXPR:nn,TMPLIT_EXPR:rn,DATA_ATTR:gt,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:yn,CUSTOM_ELEMENT:Cn}=we;let{IS_ALLOWED_URI:An}=we,Tt=null;const dn=A({},[...N,...M,...U,...G,...Y]);let Ot=null;const Nr=A({},[...R,...B,...J,...Q]);let It=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),li=null,er=null;const qr=Object.seal(a(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gi=!0,Jo=!0,Vr=!1,fn=!0,dt=!1,$t=!0,Xt=!1,ar=!1,Wi=!1,Or=!1,zn=!1,Ln=!1,pr=!0,Oi=!1;const Xo="user-content-";let Hn=!0,wr=!1,ci={},Fl=null;const ex=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let tx=null;const nx=A({},["audio","video","img","source","image","track"]);let Ng=null;const rx=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lf="http://www.w3.org/1998/Math/MathML",Nf="http://www.w3.org/2000/svg",Zo="http://www.w3.org/1999/xhtml";let zl=Zo,Og=!1,Ig=null;const dN=A({},[Lf,Nf,Zo],v);let Of=A({},["mi","mo","mn","ms","mtext"]),If=A({},["annotation-xml"]);const fN=A({},["title","style","font","a","script"]);let Su=null;const hN=["application/xhtml+xml","text/html"],pN="text/html";let gr=null,jl=null;const gN=je.createElement("form"),ix=function(le){return le instanceof RegExp||le instanceof Function},Rg=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(jl&&jl===le)){if((!le||typeof le!="object")&&(le={}),le=L(le),Su=hN.indexOf(le.PARSER_MEDIA_TYPE)===-1?pN:le.PARSER_MEDIA_TYPE,gr=Su==="application/xhtml+xml"?v:m,Tt=E(le,"ALLOWED_TAGS")?A({},le.ALLOWED_TAGS,gr):dn,Ot=E(le,"ALLOWED_ATTR")?A({},le.ALLOWED_ATTR,gr):Nr,Ig=E(le,"ALLOWED_NAMESPACES")?A({},le.ALLOWED_NAMESPACES,v):dN,Ng=E(le,"ADD_URI_SAFE_ATTR")?A(L(rx),le.ADD_URI_SAFE_ATTR,gr):rx,tx=E(le,"ADD_DATA_URI_TAGS")?A(L(nx),le.ADD_DATA_URI_TAGS,gr):nx,Fl=E(le,"FORBID_CONTENTS")?A({},le.FORBID_CONTENTS,gr):ex,li=E(le,"FORBID_TAGS")?A({},le.FORBID_TAGS,gr):L({}),er=E(le,"FORBID_ATTR")?A({},le.FORBID_ATTR,gr):L({}),ci=E(le,"USE_PROFILES")?le.USE_PROFILES:!1,Gi=le.ALLOW_ARIA_ATTR!==!1,Jo=le.ALLOW_DATA_ATTR!==!1,Vr=le.ALLOW_UNKNOWN_PROTOCOLS||!1,fn=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=le.SAFE_FOR_TEMPLATES||!1,$t=le.SAFE_FOR_XML!==!1,Xt=le.WHOLE_DOCUMENT||!1,Or=le.RETURN_DOM||!1,zn=le.RETURN_DOM_FRAGMENT||!1,Ln=le.RETURN_TRUSTED_TYPE||!1,Wi=le.FORCE_BODY||!1,pr=le.SANITIZE_DOM!==!1,Oi=le.SANITIZE_NAMED_PROPS||!1,Hn=le.KEEP_CONTENT!==!1,wr=le.IN_PLACE||!1,An=le.ALLOWED_URI_REGEXP||ce,zl=le.NAMESPACE||Zo,Of=le.MATHML_TEXT_INTEGRATION_POINTS||Of,If=le.HTML_INTEGRATION_POINTS||If,It=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&ix(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(It.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&ix(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(It.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(It.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dt&&(Jo=!1),zn&&(Or=!0),ci&&(Tt=A({},Y),Ot=[],ci.html===!0&&(A(Tt,N),A(Ot,R)),ci.svg===!0&&(A(Tt,M),A(Ot,B),A(Ot,Q)),ci.svgFilters===!0&&(A(Tt,U),A(Ot,B),A(Ot,Q)),ci.mathMl===!0&&(A(Tt,G),A(Ot,J),A(Ot,Q))),le.ADD_TAGS&&(typeof le.ADD_TAGS=="function"?qr.tagCheck=le.ADD_TAGS:(Tt===dn&&(Tt=L(Tt)),A(Tt,le.ADD_TAGS,gr))),le.ADD_ATTR&&(typeof le.ADD_ATTR=="function"?qr.attributeCheck=le.ADD_ATTR:(Ot===Nr&&(Ot=L(Ot)),A(Ot,le.ADD_ATTR,gr))),le.ADD_URI_SAFE_ATTR&&A(Ng,le.ADD_URI_SAFE_ATTR,gr),le.FORBID_CONTENTS&&(Fl===ex&&(Fl=L(Fl)),A(Fl,le.FORBID_CONTENTS,gr)),Hn&&(Tt["#text"]=!0),Xt&&A(Tt,["html","head","body"]),Tt.table&&(A(Tt,["tbody"]),delete li.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');pt=le.TRUSTED_TYPES_POLICY,kt=pt.createHTML("")}else pt===void 0&&(pt=_e(Ve,Ie)),pt!==null&&typeof kt=="string"&&(kt=pt.createHTML(""));o&&o(le),jl=le}},ox=A({},[...M,...U,...H]),sx=A({},[...G,...W]),mN=function(le){let He=en(le);(!He||!He.tagName)&&(He={namespaceURI:zl,tagName:"template"});const lt=m(le.tagName),Nn=m(He.tagName);return Ig[le.namespaceURI]?le.namespaceURI===Nf?He.namespaceURI===Zo?lt==="svg":He.namespaceURI===Lf?lt==="svg"&&(Nn==="annotation-xml"||Of[Nn]):!!ox[lt]:le.namespaceURI===Lf?He.namespaceURI===Zo?lt==="math":He.namespaceURI===Nf?lt==="math"&&If[Nn]:!!sx[lt]:le.namespaceURI===Zo?He.namespaceURI===Nf&&!If[Nn]||He.namespaceURI===Lf&&!Of[Nn]?!1:!sx[lt]&&(fN[lt]||!ox[lt]):!!(Su==="application/xhtml+xml"&&Ig[le.namespaceURI]):!1},yo=function(le){p($e.removed,{element:le});try{en(le).removeChild(le)}catch{ht(le)}},_a=function(le,He){try{p($e.removed,{attribute:He.getAttributeNode(le),from:He})}catch{p($e.removed,{attribute:null,from:He})}if(He.removeAttribute(le),le==="is")if(Or||zn)try{yo(He)}catch{}else try{He.setAttribute(le,"")}catch{}},ax=function(le){let He=null,lt=null;if(Wi)le="<remove></remove>"+le;else{const tr=_(le,/^[\r\n\t ]+/);lt=tr&&tr[0]}Su==="application/xhtml+xml"&&zl===Zo&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const Nn=pt?pt.createHTML(le):le;if(zl===Zo)try{He=new tt().parseFromString(Nn,Su)}catch{}if(!He||!He.documentElement){He=tn.createDocument(zl,"template",null);try{He.documentElement.innerHTML=Og?kt:Nn}catch{}}const Ir=He.body||He.documentElement;return le&<&&Ir.insertBefore(je.createTextNode(lt),Ir.childNodes[0]||null),zl===Zo?Dt.call(He,Xt?"html":"body")[0]:Xt?He.documentElement:Ir},lx=function(le){return $n.call(le.ownerDocument||le,le,Oe.SHOW_ELEMENT|Oe.SHOW_COMMENT|Oe.SHOW_TEXT|Oe.SHOW_PROCESSING_INSTRUCTION|Oe.SHOW_CDATA_SECTION,null)},Dg=function(le){return le instanceof ye&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof be)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},cx=function(le){return typeof Ge=="function"&&le instanceof Ge};function Qo(ct,le,He){d(ct,lt=>{lt.call($e,le,He,jl)})}const ux=function(le){let He=null;if(Qo(Et.beforeSanitizeElements,le,null),Dg(le))return yo(le),!0;const lt=gr(le.nodeName);if(Qo(Et.uponSanitizeElement,le,{tagName:lt,allowedTags:Tt}),$t&&le.hasChildNodes()&&!cx(le.firstElementChild)&&$(/<[/\w!]/g,le.innerHTML)&&$(/<[/\w!]/g,le.textContent)||le.nodeType===ve.progressingInstruction||$t&&le.nodeType===ve.comment&&$(/<[/\w]/g,le.data))return yo(le),!0;if(!(qr.tagCheck instanceof Function&&qr.tagCheck(lt))&&(!Tt[lt]||li[lt])){if(!li[lt]&&fx(lt)&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,lt)||It.tagNameCheck instanceof Function&&It.tagNameCheck(lt)))return!1;if(Hn&&!Fl[lt]){const Nn=en(le)||le.parentNode,Ir=Qt(le)||le.childNodes;if(Ir&&Nn){const tr=Ir.length;for(let ui=tr-1;ui>=0;--ui){const es=Xe(Ir[ui],!0);es.__removalCount=(le.__removalCount||0)+1,Nn.insertBefore(es,Pt(le))}}}return yo(le),!0}return le instanceof ut&&!mN(le)||(lt==="noscript"||lt==="noembed"||lt==="noframes")&&$(/<\/no(script|embed|frames)/i,le.innerHTML)?(yo(le),!0):(dt&&le.nodeType===ve.text&&(He=le.textContent,d([_n,nn,rn],Nn=>{He=y(He,Nn," ")}),le.textContent!==He&&(p($e.removed,{element:le.cloneNode()}),le.textContent=He)),Qo(Et.afterSanitizeElements,le,null),!1)},dx=function(le,He,lt){if(pr&&(He==="id"||He==="name")&&(lt in je||lt in gN))return!1;if(!(Jo&&!er[He]&&$(gt,He))){if(!(Gi&&$(Mt,He))){if(!(qr.attributeCheck instanceof Function&&qr.attributeCheck(He,le))){if(!Ot[He]||er[He]){if(!(fx(le)&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,le)||It.tagNameCheck instanceof Function&&It.tagNameCheck(le))&&(It.attributeNameCheck instanceof RegExp&&$(It.attributeNameCheck,He)||It.attributeNameCheck instanceof Function&&It.attributeNameCheck(He,le))||He==="is"&&It.allowCustomizedBuiltInElements&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,lt)||It.tagNameCheck instanceof Function&&It.tagNameCheck(lt))))return!1}else if(!Ng[He]){if(!$(An,y(lt,yn,""))){if(!((He==="src"||He==="xlink:href"||He==="href")&&le!=="script"&&w(lt,"data:")===0&&tx[le])){if(!(Vr&&!$(on,y(lt,yn,"")))){if(lt)return!1}}}}}}}return!0},fx=function(le){return le!=="annotation-xml"&&_(le,Cn)},hx=function(le){Qo(Et.beforeSanitizeAttributes,le,null);const{attributes:He}=le;if(!He||Dg(le))return;const lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ot,forceKeepAttr:void 0};let Nn=He.length;for(;Nn--;){const Ir=He[Nn],{name:tr,namespaceURI:ui,value:es}=Ir,Ul=gr(tr),Mg=es;let xr=tr==="value"?Mg:x(Mg);if(lt.attrName=Ul,lt.attrValue=xr,lt.keepAttr=!0,lt.forceKeepAttr=void 0,Qo(Et.uponSanitizeAttribute,le,lt),xr=lt.attrValue,Oi&&(Ul==="id"||Ul==="name")&&(_a(tr,le),xr=Xo+xr),$t&&$(/((--!?|])>)|<\/(style|title|textarea)/i,xr)){_a(tr,le);continue}if(Ul==="attributename"&&_(xr,"href")){_a(tr,le);continue}if(lt.forceKeepAttr)continue;if(!lt.keepAttr){_a(tr,le);continue}if(!fn&&$(/\/>/i,xr)){_a(tr,le);continue}dt&&d([_n,nn,rn],gx=>{xr=y(xr,gx," ")});const px=gr(le.nodeName);if(!dx(px,Ul,xr)){_a(tr,le);continue}if(pt&&typeof Ve=="object"&&typeof Ve.getAttributeType=="function"&&!ui)switch(Ve.getAttributeType(px,Ul)){case"TrustedHTML":{xr=pt.createHTML(xr);break}case"TrustedScriptURL":{xr=pt.createScriptURL(xr);break}}if(xr!==Mg)try{ui?le.setAttributeNS(ui,tr,xr):le.setAttribute(tr,xr),Dg(le)?yo(le):h($e.removed)}catch{_a(tr,le)}}Qo(Et.afterSanitizeAttributes,le,null)},vN=function ct(le){let He=null;const lt=lx(le);for(Qo(Et.beforeSanitizeShadowDOM,le,null);He=lt.nextNode();)Qo(Et.uponSanitizeShadowNode,He,null),ux(He),hx(He),He.content instanceof Re&&ct(He.content);Qo(Et.afterSanitizeShadowDOM,le,null)};return $e.sanitize=function(ct){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=null,lt=null,Nn=null,Ir=null;if(Og=!ct,Og&&(ct="<!-->"),typeof ct!="string"&&!cx(ct))if(typeof ct.toString=="function"){if(ct=ct.toString(),typeof ct!="string")throw C("dirty is not a string, aborting")}else throw C("toString is not a function");if(!$e.isSupported)return ct;if(ar||Rg(le),$e.removed=[],typeof ct=="string"&&(wr=!1),wr){if(ct.nodeName){const es=gr(ct.nodeName);if(!Tt[es]||li[es])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(ct instanceof Ge)He=ax("<!---->"),lt=He.ownerDocument.importNode(ct,!0),lt.nodeType===ve.element&<.nodeName==="BODY"||lt.nodeName==="HTML"?He=lt:He.appendChild(lt);else{if(!Or&&!dt&&!Xt&&ct.indexOf("<")===-1)return pt&&Ln?pt.createHTML(ct):ct;if(He=ax(ct),!He)return Or?null:Ln?kt:""}He&&Wi&&yo(He.firstChild);const tr=lx(wr?ct:He);for(;Nn=tr.nextNode();)ux(Nn),hx(Nn),Nn.content instanceof Re&&vN(Nn.content);if(wr)return ct;if(Or){if(zn)for(Ir=ai.call(He.ownerDocument);He.firstChild;)Ir.appendChild(He.firstChild);else Ir=He;return(Ot.shadowroot||Ot.shadowrootmode)&&(Ir=bn.call(Le,Ir,!0)),Ir}let ui=Xt?He.outerHTML:He.innerHTML;return Xt&&Tt["!doctype"]&&He.ownerDocument&&He.ownerDocument.doctype&&He.ownerDocument.doctype.name&&$(xe,He.ownerDocument.doctype.name)&&(ui="<!DOCTYPE "+He.ownerDocument.doctype.name+`>
|
|
137
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Uf(e),r=Hl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Uf(e),r=Hl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function WD(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new KD||null,prettyErrors:e}}function YD(t,e={}){const{lineCounter:n,prettyErrors:r}=WD(e),i=new GD(n?.addNewLine),o=new UD(e);let s=null;for(const a of o.compose(i.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Hu(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(t0(t,n)),s.warnings.forEach(t0(t,n))),s}function JD(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=YD(t,n);if(!i)return null;if(i.warnings.forEach(o=>QT(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function U_(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Zd(t)&&!r?t.toString(n):new nf(t,r,n).toString(n)}const ua=ot([]),Qc=un([ua],([t],e)=>{e(t.find(({collectionName:n,internalPath:r})=>n===void 0&&r!==void 0))}),to=ot(),Vp=un([to,Qc],([t,e])=>t?.internalPath!==void 0?t:e),Io=t=>oe(ua).find(e=>e.collectionName===t.collectionName&&e.fileName===t.fileName&&("typedKeyPath"in t?e.typedKeyPath===t.typedKeyPath:!0)&&("isIndexFile"in t?e.isIndexFile===t.isIndexFile:!0)),Hp=(t,{matchSubFolders:e=!0}={})=>{const{filename:n}=gn(t);return n.startsWith("+")?[]:oe(ua).filter(({internalPath:r,entryRelative:i})=>{if(r===void 0)return!1;if(i)return t.startsWith(`${r}/`);const o=r.replace(/{{.+?}}/g,".+?"),s=r&&e?"\\b":"$";return new RegExp(`^${o}${s}`).test(gn(t).dirname??"")}).sort((r,i)=>(i.internalPath??"").localeCompare(r.internalPath??""))},B_=t=>!!t&&!t.entryRelative&&!t.hasTemplateTags,eu=ot(!1),Ro=ot(),q_=ot([]),Ai=ot([]),V_=ot([]),$$=t=>oe(q_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):si(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>(n.folderPath??"").localeCompare(e.folderPath??"")),el=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:r})=>r in n).map(({type:r,value:i})=>[r,r==="hour"&&i==="24"?"00":i]))};var mh={exports:{}},XD=mh.exports,a0;function ZD(){return a0||(a0=1,(function(t,e){(function(n,r){t.exports=r()})(XD,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var M=["th","st","nd","rd"],U=N%100;return"["+N+(M[(U-20)%10]||M[U]||M[0])+"]"}},w=function(N,M,U){var H=String(N);return!H||H.length>=M?N:""+Array(M+1-H.length).join(U)+N},x={s:w,z:function(N){var M=-N.utcOffset(),U=Math.abs(M),H=Math.floor(U/60),G=U%60;return(M<=0?"+":"-")+w(H,2,"0")+":"+w(G,2,"0")},m:function N(M,U){if(M.date()<U.date())return-N(U,M);var H=12*(U.year()-M.year())+(U.month()-M.month()),G=M.clone().add(H,f),W=U-G<0,Y=M.clone().add(H+(W?-1:1),f);return+(-(H+(U-G)/(W?G-Y:Y-G))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:p,w:d,d:u,D:g,h:c,m:a,s,ms:o,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},E="en",$={};$[E]=y;var C="$isDayjsObject",k=function(N){return N instanceof L||!(!N||!N[C])},T=function N(M,U,H){var G;if(!M)return E;if(typeof M=="string"){var W=M.toLowerCase();$[W]&&(G=W),U&&($[W]=U,G=W);var Y=M.split("-");if(!G&&Y.length>1)return N(Y[0])}else{var R=M.name;$[R]=M,G=R}return!H&&G&&(E=G),G||!H&&E},A=function(N,M){if(k(N))return N.clone();var U=typeof M=="object"?M:{};return U.date=N,U.args=arguments,new L(U)},P=x;P.l=T,P.i=k,P.w=function(N,M){return A(N,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var L=(function(){function N(U){this.$L=T(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[C]=!0}var M=N.prototype;return M.parse=function(U){this.$d=(function(H){var G=H.date,W=H.utc;if(G===null)return new Date(NaN);if(P.u(G))return new Date;if(G instanceof Date)return new Date(G);if(typeof G=="string"&&!/Z$/i.test(G)){var Y=G.match(v);if(Y){var R=Y[2]-1||0,B=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,B)):new Date(Y[1],R,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,B)}}return new Date(G)})(U),this.init()},M.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(U,H){var G=A(U);return this.startOf(H)<=G&&G<=this.endOf(H)},M.isAfter=function(U,H){return A(U)<this.startOf(H)},M.isBefore=function(U,H){return this.endOf(H)<A(U)},M.$g=function(U,H,G){return P.u(U)?this[H]:this.set(G,U)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(U,H){var G=this,W=!!P.u(H)||H,Y=P.p(U),R=function(pe,ce){var ge=P.w(G.$u?Date.UTC(G.$y,ce,pe):new Date(G.$y,ce,pe),G);return W?ge:ge.endOf(u)},B=function(pe,ce){return P.w(G.toDate()[pe].apply(G.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ce)),G)},J=this.$W,Q=this.$M,ee=this.$D,te="set"+(this.$u?"UTC":"");switch(Y){case p:return W?R(1,0):R(31,11);case f:return W?R(1,Q):R(0,Q+1);case d:var re=this.$locale().weekStart||0,he=(J<re?J+7:J)-re;return R(W?ee-he:ee+(6-he),Q);case u:case g:return B(te+"Hours",0);case c:return B(te+"Minutes",1);case a:return B(te+"Seconds",2);case s:return B(te+"Milliseconds",3);default:return this.clone()}},M.endOf=function(U){return this.startOf(U,!1)},M.$set=function(U,H){var G,W=P.p(U),Y="set"+(this.$u?"UTC":""),R=(G={},G[u]=Y+"Date",G[g]=Y+"Date",G[f]=Y+"Month",G[p]=Y+"FullYear",G[c]=Y+"Hours",G[a]=Y+"Minutes",G[s]=Y+"Seconds",G[o]=Y+"Milliseconds",G)[W],B=W===u?this.$D+(H-this.$W):H;if(W===f||W===p){var J=this.clone().set(g,1);J.$d[R](B),J.init(),this.$d=J.set(g,Math.min(this.$D,J.daysInMonth())).$d}else R&&this.$d[R](B);return this.init(),this},M.set=function(U,H){return this.clone().$set(U,H)},M.get=function(U){return this[P.p(U)]()},M.add=function(U,H){var G,W=this;U=Number(U);var Y=P.p(H),R=function(Q){var ee=A(W);return P.w(ee.date(ee.date()+Math.round(Q*U)),W)};if(Y===f)return this.set(f,this.$M+U);if(Y===p)return this.set(p,this.$y+U);if(Y===u)return R(1);if(Y===d)return R(7);var B=(G={},G[a]=r,G[c]=i,G[s]=n,G)[Y]||1,J=this.$d.getTime()+U*B;return P.w(J,this)},M.subtract=function(U,H){return this.add(-1*U,H)},M.format=function(U){var H=this,G=this.$locale();if(!this.isValid())return G.invalidDate||m;var W=U||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),R=this.$H,B=this.$m,J=this.$M,Q=G.weekdays,ee=G.months,te=G.meridiem,re=function(ce,ge,Pe,xe){return ce&&(ce[ge]||ce(H,W))||Pe[ge].slice(0,xe)},he=function(ce){return P.s(R%12||12,ce,"0")},pe=te||function(ce,ge,Pe){var xe=ce<12?"AM":"PM";return Pe?xe.toLowerCase():xe};return W.replace(_,(function(ce,ge){return ge||(function(Pe){switch(Pe){case"YY":return String(H.$y).slice(-2);case"YYYY":return P.s(H.$y,4,"0");case"M":return J+1;case"MM":return P.s(J+1,2,"0");case"MMM":return re(G.monthsShort,J,ee,3);case"MMMM":return re(ee,J);case"D":return H.$D;case"DD":return P.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return re(G.weekdaysMin,H.$W,Q,2);case"ddd":return re(G.weekdaysShort,H.$W,Q,3);case"dddd":return Q[H.$W];case"H":return String(R);case"HH":return P.s(R,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return pe(R,B,!0);case"A":return pe(R,B,!1);case"m":return String(B);case"mm":return P.s(B,2,"0");case"s":return String(H.$s);case"ss":return P.s(H.$s,2,"0");case"SSS":return P.s(H.$ms,3,"0");case"Z":return Y}return null})(ce)||Y.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(U,H,G){var W,Y=this,R=P.p(H),B=A(U),J=(B.utcOffset()-this.utcOffset())*r,Q=this-B,ee=function(){return P.m(Y,B)};switch(R){case p:W=ee()/12;break;case f:W=ee();break;case h:W=ee()/3;break;case d:W=(Q-J)/6048e5;break;case u:W=(Q-J)/864e5;break;case c:W=Q/i;break;case a:W=Q/r;break;case s:W=Q/n;break;default:W=Q}return G?W:P.a(W)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return $[this.$L]},M.locale=function(U,H){if(!U)return this.$L;var G=this.clone(),W=T(U,H,!0);return W&&(G.$L=W),G},M.clone=function(){return P.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},N})(),O=L.prototype;return A.prototype=O,[["$ms",o],["$s",s],["$m",a],["$H",c],["$W",u],["$M",f],["$y",p],["$D",g]].forEach((function(N){O[N[1]]=function(M){return this.$g(M,N[0],N[1])}})),A.extend=function(N,M){return N.$i||(N(M,L,A),N.$i=!0),A},A.locale=T,A.isDayjs=k,A.unix=function(N){return A(1e3*N)},A.en=$[E],A.Ls=$,A.p={},A}))})(mh)),mh.exports}var QD=ZD();const fr=Ss(QD);var vh={exports:{}},eM=vh.exports,l0;function tM(){return l0||(l0=1,(function(t,e){(function(n,r){t.exports=r()})(eM,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,c={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(_){this[v]=+_}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(_){if(!_||_==="Z")return 0;var y=_.match(/([+-]|\d\d)/g),w=60*y[1]+(+y[2]||0);return w===0?0:y[0]==="+"?-w:w})(v)}],h=function(v){var _=c[v];return _&&(_.indexOf?_:_.s.concat(_.f))},p=function(v,_){var y,w=c.meridiem;if(w){for(var x=1;x<=24;x+=1)if(v.indexOf(w(x,0,_))>-1){y=x>12;break}}else y=v===(_?"pm":"PM");return y},g={A:[a,function(v){this.afternoon=p(v,!1)}],a:[a,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[o,d("day")],Do:[a,function(v){var _=c.ordinal,y=v.match(/\d+/);if(this.day=y[0],_)for(var w=1;w<=31;w+=1)_(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[s,d("week")],ww:[o,d("week")],M:[s,d("month")],MM:[o,d("month")],MMM:[a,function(v){var _=h("months"),y=(h("monthsShort")||_.map((function(w){return w.slice(0,3)}))).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(v){var _=h("months").indexOf(v)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function m(v){var _,y;_=v,y=c&&c.formats;for(var w=(v=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,P,L){var O=L&&L.toUpperCase();return P||y[L]||n[L]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,M,U){return M||U.slice(1)}))}))).match(r),x=w.length,E=0;E<x;E+=1){var $=w[E],C=g[$],k=C&&C[0],T=C&&C[1];w[E]=T?{regex:k,parser:T}:$.replace(/^\[|\]$/g,"")}return function(A){for(var P={},L=0,O=0;L<x;L+=1){var N=w[L];if(typeof N=="string")O+=N.length;else{var M=N.regex,U=N.parser,H=A.slice(O),G=M.exec(H)[0];U.call(P,G),A=A.replace(G,"")}}return(function(W){var Y=W.afternoon;if(Y!==void 0){var R=W.hours;Y?R<12&&(W.hours+=12):R===12&&(W.hours=0),delete W.afternoon}})(P),P}}return function(v,_,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var w=_.prototype,x=w.parse;w.parse=function(E){var $=E.date,C=E.utc,k=E.args;this.$u=C;var T=k[1];if(typeof T=="string"){var A=k[2]===!0,P=k[3]===!0,L=A||P,O=k[2];P&&(O=k[2]),c=this.$locale(),!A&&O&&(c=y.Ls[O]),this.$d=(function(H,G,W,Y){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*H);var R=m(G)(H),B=R.year,J=R.month,Q=R.day,ee=R.hours,te=R.minutes,re=R.seconds,he=R.milliseconds,pe=R.zone,ce=R.week,ge=new Date,Pe=Q||(B||J?1:ge.getDate()),xe=B||ge.getFullYear(),de=0;B&&!J||(de=J>0?J-1:ge.getMonth());var we,ve=ee||0,fe=te||0,_e=re||0,Ce=he||0;return pe?new Date(Date.UTC(xe,de,Pe,ve,fe,_e,Ce+60*pe.offset*1e3)):W?new Date(Date.UTC(xe,de,Pe,ve,fe,_e,Ce)):(we=new Date(xe,de,Pe,ve,fe,_e,Ce),ce&&(we=Y(we).week(ce).toDate()),we)}catch{return new Date("")}})($,T,C,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),L&&$!=this.format(T)&&(this.$d=new Date("")),c={}}else if(T instanceof Array)for(var N=T.length,M=1;M<=N;M+=1){k[1]=T[M-1];var U=y.apply(this,k);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}M===N&&(this.$d=new Date(""))}else x.call(this,E)}}}))})(vh)),vh.exports}var nM=tM();const H_=Ss(nM);var bh={exports:{}},rM=bh.exports,c0;function iM(){return c0||(c0=1,(function(t,e){(function(n,r){t.exports=r()})(rM,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,i,o){var s=i.prototype,a=s.format;o.en.formats=n,s.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,g,m){var v=m&&m.toUpperCase();return g||h[m]||n[m]||h[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(_,y,w){return y||w.slice(1)}))}))})(c,u===void 0?{}:u);return a.call(this,d)}}}))})(bh)),bh.exports}var oM=iM();const K_=Ss(oM);var _h={exports:{}},sM=_h.exports,u0;function aM(){return u0||(u0=1,(function(t,e){(function(n,r){t.exports=r()})(sM,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var c=s.prototype;a.utc=function(m){var v={date:m,utc:!0,args:arguments};return new s(v)},c.utc=function(m){var v=a(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var d=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=c.utcOffset;c.utcOffset=function(m,v){var _=this.$utils().u;if(_(m))return this.$u?0:_(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=(function(E){E===void 0&&(E="");var $=E.match(r);if(!$)return null;var C=(""+$[0]).match(i)||["-",0,0],k=C[0],T=60*+C[1]+ +C[2];return T===0?0:k==="+"?T:-T})(m),m===null))return this;var y=Math.abs(m)<=16?60*m:m;if(y===0)return this.utc(v);var w=this.clone();if(v)return w.$offset=y,w.$u=!1,w;var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(w=this.local().add(y+x,n)).$offset=y,w.$x.$localOffset=x,w};var h=c.format;c.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var p=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=c.diff;c.diff=function(m,v,_){if(m&&this.$u===m.$u)return g.call(this,m,v,_);var y=this.local(),w=a(m).local();return g.call(y,w,v,_)}}}))})(_h)),_h.exports}var lM=aM();const G_=Ss(lM);class fo{#e;#n="";#t="";#i={};#l=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:o=[]}={}){this.#e=void 0,this.#n=e,this.#t=n,this.#i={keyPath:r,autoIncrement:i},this.#l=o}async#s(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,o=this.#t,s=i.objectStoreNames.contains(o)?i.transaction(o,"readwrite").objectStore(o):i.createObjectStore(o,this.#i);this.#l.forEach(({name:a,keyPath:c,options:u})=>{s.indexNames.contains(a)||s.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#a(){let e=!1,n=await this.#s();const{version:r,objectStoreNames:i}=n,o=this.#t;if(i.contains(o)){const s=n.transaction(o).objectStore(o);e=this.#l.some(({name:a})=>!s.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#s(r+1)),n.onversionchange=()=>{n.close(),this.#e=void 0},n}async#r(e){this.#e??=await this.#a();const n=this.#e,r=this.#t,i=n.transaction(r,"readwrite"),o=e(i.objectStore(r));return o?new Promise(s=>{o.onsuccess=()=>{s(o.result)}}):new Promise(s=>{i.oncomplete=()=>{s(void 0)}})}async set(e,n){return this.#r(r=>r.put(n,e))}async put(e){return this.#r(n=>n.put(e))}async saveEntries(e){return this.#r(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#r(n=>n.get(e))}async keys(){return this.#r(e=>e.getAllKeys())}async values(){return this.#r(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#o({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:o=!1}){return new Promise(s=>{this.#r(a=>{const c=(n?a.index(n):a).openCursor(r,i),u=[];c.onsuccess=()=>{const d=c.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?o?(u.push(f),d.continue()):s(f):d.continue()}else s(o?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#o({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#r(n=>n.delete(e))}async deleteEntries(e){await this.#r(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#r(e=>e.clear())}}class pi{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const C$=t=>Array.isArray(t)&&t.every(e=>Bt(e)),Pc=t=>[...new Set(t)];var sm,d0;function cM(){return d0||(d0=1,sm=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),sm}var uM=cM();const pn=Ss(uM);function A$(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function P$(t){return t}function ho(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||P$,o={};function s(a,c,u){u=u||1,Object.keys(a).forEach(function(d){const f=a[d],h=e.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),g=A$(f),m=p==="[object Object]"||p==="[object Array]",v=c?c+n+i(d):i(d);if(!h&&!g&&m&&Object.keys(f).length&&(!e.maxDepth||u<r))return s(f,v,u+1);o[v]=f})}return s(t),o}function ys(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||P$,o={};if(A$(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){const f=Number(d);return isNaN(f)||d.indexOf(".")!==-1||e.object?d:f}function c(d,f,h){return Object.keys(h).reduce(function(p,g){return p[d+n+g]=h[g],p},f)}function u(d){const f=Object.prototype.toString.call(d),h=f==="[object Array]",p=f==="[object Object]";if(d){if(h)return!d.length;if(p)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,f){const h=Object.prototype.toString.call(t[f]);return!(h==="[object Object]"||h==="[object Array]")||u(t[f])?(d[f]=t[f],d):c(f,d,ho(t[f],e))},{}),Object.keys(t).forEach(function(d){const f=d.split(n).map(i);let h=a(f.shift()),p=a(f[0]),g=o;for(;p!==void 0;){if(h==="__proto__")return;const m=Object.prototype.toString.call(g[h]),v=m==="[object Object]"||m==="[object Array]";if(!r&&!v&&typeof g[h]<"u")return;(r&&!v||!r&&g[h]==null)&&(g[h]=typeof p=="number"&&!e.object?[]:{}),g=g[h],f.length>0&&(h=a(f.shift()),p=a(f[0]))}g[h]=ys(t[d],e)}),o}const dM=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ə","A"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ō","O"],["Ő","O"],["Ø","O"],["Œ","OE"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ə","a"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ō","o"],["ő","o"],["ø","o"],["œ","oe"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","a"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ու","u"],["ՈՒ","U"],["Ու","U"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","k"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","O"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(c)"],["ⓓ","(d)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"],["−","-"],["⁓","-"]],f0=new Map(dM),h0=[["æ","ae"],["Æ","Ae"],["ø","oe"],["Ø","Oe"],["å","aa"],["Å","Aa"]],rd={sv:[["ä","a"],["Ä","A"],["ö","o"],["Ö","O"],["å","a"],["Å","A"]],da:h0,nb:h0,de:[["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["ß","ss"],["ẞ","Ss"]],tr:[["â","a"],["Â","A"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"]],hu:[["ű","u"],["Ű","U"],["ö","o"],["Ö","O"],["ü","u"],["Ü","U"],["á","a"],["Á","A"],["é","e"],["É","E"],["í","i"],["Í","I"],["ó","o"],["Ó","O"],["ú","u"],["Ú","U"]],sr:[["ђ","dj"],["Ђ","Dj"],["џ","dz"],["Џ","Dz"],["љ","lj"],["Љ","Lj"],["њ","nj"],["Њ","Nj"],["ћ","c"],["Ћ","C"],["ч","ch"],["Ч","Ch"],["ш","sh"],["Ш","Sh"],["ж","zh"],["Ж","Zh"]]};for(const t of Object.keys(rd))rd[t]=new Map(rd[t]);const fM=(t,e)=>{for(const[n,r]of e)t=t.replaceAll(n,r);return t},hM=t=>{if(!t)return;const e=t.toLowerCase().replace(/^no(-|$)/,"nb$1");return rd[e]||rd[e.split("-")[0]]||void 0};function pM(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=hM(e.locale);let r=f0;const i=e.customReplacements.length>0||e.customReplacements.size>0;if(n||i){if(r=new Map(f0),n)for(const[o,s]of n)r.set(o,s);for(const[o,s]of e.customReplacements)r.set(o,s)}return t=t.normalize(),t=fM(t,r),t=t.normalize("NFD").replaceAll(/\p{Diacritic}/gu,"").normalize(),t=t.replaceAll(/\p{Dash_Punctuation}/gu,"-"),t}const L$=(t,{fallback:e=!0}={})=>{const{slug:{encoding:n="unicode",clean_accents:r=!1,sanitize_replacement:i="-",trim:o=!0}={}}=oe(Ct)??{};let s=t;if(r&&(s=pM(s.normalize("NFD"))),n==="ascii"?s=s.replaceAll(/[^\w-~]/g," "):s=s.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),s=s.toLocaleLowerCase().trim().replaceAll(/\s+/g,i),i){const a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`${a}+`,"g");s=s.replace(c,i),o&&(s=s.replace(new RegExp(`^${a}+|${a}+$`,"g"),""))}return!s&&e?Si("short"):s},Ar=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},po=(t,{displayLocale:e=Ar(oe(qt)??"en")}={})=>{const n=Ar(t);if(!n)return;const r=new Intl.DisplayNames(e,{type:"language"});try{return r.of(n)}catch(i){console.error(i);return}},tl=(t,e={})=>new Intl.ListFormat(Ar(t),{style:"narrow",type:"conjunction",...e}),W_=({_i18n:t,locale:e,path:n})=>{const{defaultLocale:r,omitDefaultLocaleFromFileName:i}=t;return i&&e===r&&(n=n.replace(/\.{{locale}}\.(\w+)$/,".$1")),n.replaceAll("{{locale}}",e)},gM=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,mM=/^\d{4}-[01]\d-[0-3]\d$/,vM=/T00:00(?::00)?(?:\.000)?Z$/,Gv={year:"numeric",month:"short",day:"numeric"},Wv={hour:"numeric",minute:"numeric",hour12:!0},bM={...Gv,...Wv};fr.extend(H_);fr.extend(K_);fr.extend(G_);const da=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e||[typeof n=="string"?n:"",typeof r=="string"?r:""].join(" ").trim()||void 0,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Lc=(t,e)=>{const{format:n,timeOnly:r,utc:i}=da(e);if(t)try{return n?(i?fr.utc:fr)(t,n).toDate():r?new Date(`${new Date().toJSON().split("T")[0]}T${t}`):new Date(t)}catch(o){console.error(o);return}},N$=t=>{const{dateOnly:e,timeOnly:n,utc:r}=da(t),{year:i,month:o,day:s,hour:a,minute:c}=el({timeZone:r?"UTC":void 0}),u=`${i}-${o}-${s}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},O$=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=da(n),a=i?"YYYY-MM-DD":o?"HH:mm":"YYYY-MM-DDTHH:mm",c=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t)try{if(r){const u=(s?fr.utc:fr)(t,a).format(r);return r.includes("Z")&&u.endsWith("+00:00")?u.replace("+00:00","Z"):u}return i?t:s?`${t}:00.000Z`:`${t}${c}`}catch(u){console.error(u);return}},_M=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=da(e);if(!t)return"";const o=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(o)return o;try{const s=t?Lc(t,e):new Date;if(t&&!s||t&&s&&Number.isNaN(s.getTime()))return"";const{year:a,month:c,day:u,hour:d,minute:f}=el({date:s,timeZone:i?"UTC":void 0}),h=`${a}-${c}-${u}`,p=`${d}:${f}`;return n?h:r?p:`${h}T${p}`}catch(s){return console.error(s),""}},I$=({locale:t,fieldConfig:e,currentValue:n})=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=da(e);if(typeof n!="string"||!n.trim())return"";if(r)try{return(s?fr.utc:fr)(n,r).format(r)}catch{}const a=Lc(n,e),c=Ar(t);return!a||Number.isNaN(a.getTime())?"":o?a.toLocaleTimeString(c,Wv):i?a.toLocaleDateString(c,{...Gv,timeZone:s||mM.test(n)||vM.test(n)?"UTC":void 0}):a.toLocaleString(c,{...Gv,...Wv,timeZone:s?"UTC":void 0,timeZoneName:s?void 0:"short"})};fr.extend(H_);fr.extend(K_);fr.extend(G_);const Y_=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,R$=/^default\('(?<defaultValue>.+?)'\)$/,D$=/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,yM=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,wM=t=>String(t).toUpperCase(),xM=t=>String(t).toLowerCase(),kM=(t,{format:e,timeZone:n},r)=>{const i=String(t),{dateOnly:o,utc:s}=da(r),c=(n==="utc"||s||o&&!!i.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&!!i.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?fr.utc:fr)(i);return c.isValid()?c.format(e):""},SM=(t,{defaultValue:e})=>t?String(t):e,EM=(t,{truthyValue:e,falsyValue:n})=>t?e:n,TM=(t,{max:e,ellipsis:n="…"})=>bT(String(t),Number(e),{ellipsis:n}),$M=({fieldConfig:t,value:e,transformation:n})=>{if(n==="upper")return wM(e);if(n==="lower")return xM(e);const r=n.match(Y_);if(r?.groups)return kM(e,r.groups,t??{});const i=n.match(R$);if(i?.groups)return SM(e,i.groups);const o=n.match(D$);if(o?.groups)return EM(e,o.groups);const s=n.match(yM);return s?.groups?TM(e,s.groups):String(e)},J_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=$M({fieldConfig:t,value:e,transformation:r})}),e),Nt=(t=0)=>new Promise(e=>{globalThis.setTimeout(()=>{e(void 0)},t)}),M$={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(M$);const F$={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(F$);var Ii=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Zl,Ku,ka;class CM{constructor(...e){Zl.set(this,new Map),Ku.set(this,new Map),ka.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),Ii(this,ka,"f").has(r)||Ii(this,ka,"f").set(r,new Set);const o=Ii(this,ka,"f").get(r);let s=!0;for(let a of i){const c=a.startsWith("*");if(a=c?a.slice(1):a,o?.add(a),s&&Ii(this,Ku,"f").set(r,a),s=!1,c)continue;const u=Ii(this,Zl,"f").get(a);if(u&&u!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${u} -> ${a}". Pass \`force=true\` to override this definition.`);Ii(this,Zl,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:Ii(this,Zl,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&Ii(this,Ku,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:Ii(this,ka,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of Ii(this,ka,"f").values())Object.freeze(e);return this}_getTestState(){return{types:Ii(this,Zl,"f"),extensions:Ii(this,Ku,"f")}}}Zl=new WeakMap,Ku=new WeakMap,ka=new WeakMap;const Cs=new CM(F$,M$)._freeze();var am,p0;function AM(){if(p0)return am;p0=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return am=function(r,i,o){if(typeof i!="string")throw new Error("Input must be string");for(var s=i.length,a=0,c,u,d=0;d<s;d+=1){if(c=i.charCodeAt(d),u=i[d],t(c)&&e(i.charCodeAt(d+1))&&(d+=1,u+=i[d]),a+=r(u),a===o)return i.slice(0,d+1);if(a>o)return i.slice(0,d-u.length+1)}return i},am}var lm,g0;function PM(){if(g0)return lm;g0=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return lm=function(r){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,s=null,a=null,c=0;c<i;c++)s=r.charCodeAt(c),e(s)?a!=null&&t(a)?o+=1:o+=3:s<=127?o+=1:s>=128&&s<=2047?o+=2:s>=2048&&s<=65535&&(o+=3),a=s;return o},lm}var cm,m0;function LM(){if(m0)return cm;m0=1;var t=AM(),e=PM();return cm=t.bind(null,e),cm}var um,v0;function NM(){if(v0)return um;v0=1;var t=LM(),e=/[\/\?<>\\:\*\|"]/g,n=/[\x00-\x1f\x80-\x9f]/g,r=/^\.+$/,i=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,o=/[\. ]+$/;function s(a,c){if(typeof a!="string")throw new Error("Input must be string");var u=a.replace(e,c).replace(n,c).replace(r,c).replace(i,c).replace(o,c);return t(u,255)}return um=function(a,c){var u=c&&c.replacement||"",d=s(a,u);return u===""?d:s(d,"")},um}var OM=NM();const IM=Ss(OM),z$=(t,e)=>new RegExp(`^${t.split("/").map(e).join("\\/")}\\b`),j$=t=>{const e=t.startsWith("@");return e&&(t=t.slice(1)),t=t.split("/").map(n=>encodeURIComponent(n).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)).join("/"),e?`@${t}`:t},RM=t=>decodeURIComponent(t),Kp=t=>{const e=new Intl.NumberFormat(oe(qt),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,o=i*1e3;return t<n?oe(ue)("file_size_units.b",{values:{size:e.format(t)}}):t<r?oe(ue)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?oe(ue)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<o?oe(ue)("file_size_units.gb",{values:{size:e.format(t/i)}}):oe(ue)("file_size_units.tb",{values:{size:e.format(t/o)}})},U$=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=gn(t),i=new RegExp(`^${Gt(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),o=e.sort((a,c)=>Ci(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!o)return t;const s=Number(o.match(i)?.groups?.num??0)+1;return`${n}-${s}${r?`.${r}`:""}`},X_=(t,{slugificationEnabled:e=!1,assetNamesInSameFolder:n=[]}={})=>{let r=IM(t.normalize().replace(/[\s\u00A0\u202F]+/g," "));if(e){const{filename:i,extension:o}=gn(r);r=`${L$(i)}${o?`.${o}`:""}`}return U$(r,n)},Nc=t=>t.filter(Boolean).join("/"),Yv=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const o=e.findLastIndex((s,a)=>!!s&&a<i);o>-1&&(e[o]=null)}}else n=!0}),Nc(e)},Z_=t=>typeof t=="string"?new Blob([t],{type:"text/plain"}):t,nl=async t=>{const n=await Z_(t).arrayBuffer();return Za(new Blob([`blob ${n.byteLength}\0`,n]))},DM="modulepreload",MM=function(t){return"/"+t},b0={},B$=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=s?.nonce||s?.getAttribute("nonce");i=c(n.map(u=>{if(u=MM(u),u in b0)return;b0[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":DM,d||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),d)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},Jv="0.120.0",FM={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.38.2","@sindresorhus/transliterate":"^2.2.0","@sveltia/ui":"^0.31.6","@sveltia/utils":"^0.8.6","create-react-class":"^15.7.0",dayjs:"^1.11.19",deepmerge:"^4.3.1",exifr:"^7.1.3","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.32.0",leaflet:"^1.9.4",lexical:"^0.38.2",marked:"^17.0.1","marked-bidi":"^1.0.14",mime:"^4.1.0","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.394",qrcode:"^1.5.4",react:"^19.2.0","react-dom":"^19.2.0","sanitize-filename":"^1.6.3","smol-toml":"^1.5.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.19.0","terra-draw-leaflet-adapter":"1.0.3",turndown:"^7.2.2",yaml:"^2.8.1"},Q_=t=>{const e=`https://unpkg.com/${t}`,n=FM[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Fa=async(t,e)=>B$(()=>import(`${Q_(t)}/${e}`),[]),Ea=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},zM=async(t,e)=>{if(!(e==="image")||!t.file)return{createdDate:void 0,coordinates:void 0};const{parse:r}=await Fa("exifr","dist/lite.esm.mjs"),{latitude:i,longitude:o,DateTimeOriginal:s,CreateDate:a=s}=await r(t.file).catch(()=>{})??{};return{createdDate:a instanceof Date?a:void 0,coordinates:Number.isFinite(i)&&Number.isFinite(o)?{latitude:Ea(i,7),longitude:Ea(o,7)}:void 0}},jM=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},UM=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:s,videoHeight:a}=n;r({dimensions:{width:s,height:a},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},BM=async(t,e)=>e==="image"?jM(t):UM(t,e),qM=async(t,e,n)=>{const{dimensions:r,duration:i}=await BM(e,n),{createdDate:o,coordinates:s}=await zM(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:s}},q$=["avif","gif","jpeg","png","webp"],VM=q$.map(t=>`image/${t}`),Xv=/\b(?:avif|gif|jpe?g|png|webp)$/i,HM=["image/svg+xml"],KM=/\b(?:svg)$/i,Lo=[...VM,...HM],V$=["webp"],dm={},GM=async t=>{if(t in dm)return dm[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return dm[t]=i,i},H$=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await GM(e)&&V$.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const s=(await Fa(`@jsquash/${e}`,"encode.js?module")).default,a=await s(o,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},WM=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const s=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return o;i="contain"}return i==="contain"&&(s?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},K$=(t,e,n)=>{const{scale:r,width:i,height:o}=WM(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},YM=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},JM=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},XM=async t=>t.type.startsWith("video/")?JM({blob:t}):YM({blob:t}),ey=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let s,a=0,c=0;try{s=await createImageBitmap(t),{width:a,height:c}=s}catch{({source:s,naturalWidth:a,naturalHeight:c}=await XM(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return K$(u,{width:a,height:c},{fit:o,width:r,height:i}),d.drawImage(s,0,0,u.width,u.height),s instanceof HTMLVideoElement&&document.body.removeChild(s),H$(u,{format:e,quality:n})},ZM=async t=>{const e=await t.text();try{const{optimize:n}=await Fa("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},ac=Q_("pdfjs-dist"),QM=`${ac}/build/pdf.min.mjs`,eF=`${ac}/build/pdf.worker.min.mjs`,tF={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${ac}/cmaps/`,iccUrl:`${ac}/iccs/`,standardFontDataUrl:`${ac}/standard_fonts/`,wasmUrl:`${ac}/wasm/`};let Bf;const nF=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!Bf)try{Bf=await import(QM),Bf.GlobalWorkerOptions.workerSrc=eF}catch{throw new Error("Failed to load PDF.js library")}const s=URL.createObjectURL(t),a=new OffscreenCanvas(512,512),c=a.getContext("2d");try{const d=await(await Bf.getDocument({...tF,url:s}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=K$(a,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:c,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(s)}catch{throw new Error("Failed to render PDF")}return H$(a,{format:e,quality:n})},fm=new Set,fa=async(t,e=0)=>{const{file:n,handle:r,blobURL:i,name:o,path:s}=t;if(i)return fetch(i).then(c=>c.blob());let a;if(n)a=n;else if(r)try{a=await r.getFile()}catch{throw new Error("Failed to retrieve blob from file handle")}else{if(fm.has(s)&&e<=25)return await Nt(200),fa(t,e+1);fm.add(s);const c=await oe(Tn)?.fetchBlob?.(t);if(!c)throw new Error("Failed to retrieve blob");a=new Blob([c],{type:Cs.getType(o)??c.type})}return t.blobURL=URL.createObjectURL(a),fm.delete(s),a},ty=async t=>(t.blobURL||await fa(t),t.blobURL);let qf;const Zv=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(qf===void 0){const{databaseName:i}=oe(Tn)?.repository??{};qf=i?new fo(i,"asset-thumbnails"):null}let r=await qf?.get(t.sha);if(!r){if(e)return;const i=await fa(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await nF(i,o):await ey(i,o),await qf?.set(t.sha,r)}return URL.createObjectURL(r)},Ed=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:s}=t.folder.collectionName===void 0?t.folder:Hp(t.path).find(({collectionName:d})=>d!==void 0)??oe(Qc);if(o)return e&&r&&gn(t.path).dirname===gn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:a="",output:{encode_file_path:c=!1}={}}=oe(Ct);let u=s?t.path.replace(z$(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Gt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(c&&(u=j$(u)),!(!u.startsWith("/")&&!n))return e?u:`${a}${u}`},rl=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=my({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await Zv(o):await ty(o))??Ed(o)},Fh={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},Gp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=oe(Tn)?.repository??{},i=await ty(t),o=Ed(t,{allowSpecial:!0,pathOnly:!0})??i;let s={};return["image","video","audio"].includes(e)&&i&&(s=await qM(t,i,e)),{...s,publicURL:Ed(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await nb(o):[]}},rF=()=>{try{return oe(ue)("index_file")}catch{return"Index File"}},_i=t=>{if(!Ad(t))return;const{index_file:e}=t;if(!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??rF(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Go=(t,e)=>{const n=_i(t);return n?e.slug===n.name:!1},iF=t=>{const e=_i(t);return e?!Wo(t.name).some(({slug:n})=>n===e.name):!1},ny=["file","image"],Wp=[...ny,"relation","select"],G$=[...Wp,"list","number"],W$=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),Y$=t=>ys(Object.fromEntries(Object.entries(ho(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),J$=t=>t.replace(/"/g,"'"),Pa=t=>t.replace(/"/g,"""),ry=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,oF=new RegExp(ry,"g"),sF=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,aF=new RegExp(`${ry.source}|${sF.source}`),zh=new Map,X$={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:ry,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${Pa(e)}" alt="${Pa(n)}" title="${Pa(r)}">`}},lF={id:"linked-image",label:"Image",fields:[...X$.fields,{name:"link",label:"Link",required:!1}],pattern:aF,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:s,link:a}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||s||"").trim(),link:(a||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${Pa(e)}" alt="${Pa(n)}" title="${Pa(r)}">`;return i?`<a href="${Pa(i)}">${o}</a>`:o}},Z$=t=>{if(zh.has(t))return zh.get(t);const e={icon:"image",label:oe(ue)("editor_components.image"),fields:[{name:"src",label:oe(ue)("editor_components.src"),widget:"image"},{name:"alt",label:oe(ue)("editor_components.alt"),required:!1},{name:"title",label:oe(ue)("editor_components.title"),required:!1}]};return{image:{...X$,...e},"linked-image":{...lF,...e,fields:[...e.fields,{name:"link",label:oe(ue)("editor_components.link"),required:!1}]}}[t]};var hm,_0;function y0(){if(_0)return hm;_0=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function($e){return $e}),s||(s=function($e){return $e}),c||(c=function($e,je){for(var Le=arguments.length,Ie=new Array(Le>2?Le-2:0),Re=2;Re<Le;Re++)Ie[Re-2]=arguments[Re];return $e.apply(je,Ie)}),u||(u=function($e){for(var je=arguments.length,Le=new Array(je>1?je-1:0),Ie=1;Ie<je;Ie++)Le[Ie-1]=arguments[Ie];return new $e(...Le)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),_=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),x=k(String.prototype.trim),E=k(Object.prototype.hasOwnProperty),$=k(RegExp.prototype.test),C=T(TypeError);function k(Ae){return function($e){$e instanceof RegExp&&($e.lastIndex=0);for(var je=arguments.length,Le=new Array(je>1?je-1:0),Ie=1;Ie<je;Ie++)Le[Ie-1]=arguments[Ie];return c(Ae,$e,Le)}}function T(Ae){return function(){for(var $e=arguments.length,je=new Array($e),Le=0;Le<$e;Le++)je[Le]=arguments[Le];return u(Ae,je)}}function A(Ae,$e){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ae,null);let Le=$e.length;for(;Le--;){let Ie=$e[Le];if(typeof Ie=="string"){const Re=je(Ie);Re!==Ie&&(n($e)||($e[Le]=Re),Ie=Re)}Ae[Ie]=!0}return Ae}function P(Ae){for(let $e=0;$e<Ae.length;$e++)E(Ae,$e)||(Ae[$e]=null);return Ae}function L(Ae){const $e=a(null);for(const[je,Le]of t(Ae))E(Ae,je)&&(Array.isArray(Le)?$e[je]=P(Le):Le&&typeof Le=="object"&&Le.constructor===Object?$e[je]=L(Le):$e[je]=Le);return $e}function O(Ae,$e){for(;Ae!==null;){const Le=i(Ae,$e);if(Le){if(Le.get)return k(Le.get);if(typeof Le.value=="function")return k(Le.value)}Ae=r(Ae)}function je(){return null}return je}const N=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=o(["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"]),H=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=o(["#text"]),R=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),B=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),te=s(/<%[\w\W]*|[\w\W]*%>/gm),re=s(/\$\{[\w\W]*/gm),he=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),pe=s(/^aria-[\-\w]+$/),ce=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ge=s(/^(?:\w+script|data):/i),Pe=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xe=s(/^html$/i),de=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var we=Object.freeze({__proto__:null,ARIA_ATTR:pe,ATTR_WHITESPACE:Pe,CUSTOM_ELEMENT:de,DATA_ATTR:he,DOCTYPE_NAME:xe,ERB_EXPR:te,IS_ALLOWED_URI:ce,IS_SCRIPT_OR_DATA:ge,MUSTACHE_EXPR:ee,TMPLIT_EXPR:re});const ve={element:1,text:3,progressingInstruction:7,comment:8,document:9},fe=function(){return typeof window>"u"?null:window},_e=function($e,je){if(typeof $e!="object"||typeof $e.createPolicy!="function")return null;let Le=null;const Ie="data-tt-policy-suffix";je&&je.hasAttribute(Ie)&&(Le=je.getAttribute(Ie));const Re="dompurify"+(Le?"#"+Le:"");try{return $e.createPolicy(Re,{createHTML(nt){return nt},createScriptURL(nt){return nt}})}catch{return console.warn("TrustedTypes policy "+Re+" could not be created."),null}},Ce=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ze(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe();const $e=ct=>ze(ct);if($e.version="3.3.0",$e.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==ve.document||!Ae.Element)return $e.isSupported=!1,$e;let{document:je}=Ae;const Le=je,Ie=Le.currentScript,{DocumentFragment:Re,HTMLTemplateElement:nt,Node:Ge,Element:ut,NodeFilter:Oe,NamedNodeMap:be=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:ye,DOMParser:tt,trustedTypes:Ve}=Ae,Qe=ut.prototype,Xe=O(Qe,"cloneNode"),ht=O(Qe,"remove"),Pt=O(Qe,"nextSibling"),Qt=O(Qe,"childNodes"),en=O(Qe,"parentNode");if(typeof nt=="function"){const ct=je.createElement("template");ct.content&&ct.content.ownerDocument&&(je=ct.content.ownerDocument)}let pt,kt="";const{implementation:tn,createNodeIterator:$n,createDocumentFragment:ai,getElementsByTagName:Dt}=je,{importNode:bn}=Le;let Et=Ce();$e.isSupported=typeof t=="function"&&typeof en=="function"&&tn&&tn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_n,ERB_EXPR:nn,TMPLIT_EXPR:rn,DATA_ATTR:gt,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:yn,CUSTOM_ELEMENT:Cn}=we;let{IS_ALLOWED_URI:An}=we,Tt=null;const dn=A({},[...N,...M,...U,...G,...Y]);let Ot=null;const Nr=A({},[...R,...B,...J,...Q]);let It=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),li=null,er=null;const qr=Object.seal(a(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gi=!0,Jo=!0,Vr=!1,fn=!0,dt=!1,$t=!0,Xt=!1,ar=!1,Wi=!1,Or=!1,jn=!1,Ln=!1,pr=!0,Oi=!1;const Xo="user-content-";let Hn=!0,wr=!1,ci={},Fl=null;const ex=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let tx=null;const nx=A({},["audio","video","img","source","image","track"]);let Ng=null;const rx=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lf="http://www.w3.org/1998/Math/MathML",Nf="http://www.w3.org/2000/svg",Zo="http://www.w3.org/1999/xhtml";let zl=Zo,Og=!1,Ig=null;const dN=A({},[Lf,Nf,Zo],v);let Of=A({},["mi","mo","mn","ms","mtext"]),If=A({},["annotation-xml"]);const fN=A({},["title","style","font","a","script"]);let Su=null;const hN=["application/xhtml+xml","text/html"],pN="text/html";let gr=null,jl=null;const gN=je.createElement("form"),ix=function(le){return le instanceof RegExp||le instanceof Function},Rg=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(jl&&jl===le)){if((!le||typeof le!="object")&&(le={}),le=L(le),Su=hN.indexOf(le.PARSER_MEDIA_TYPE)===-1?pN:le.PARSER_MEDIA_TYPE,gr=Su==="application/xhtml+xml"?v:m,Tt=E(le,"ALLOWED_TAGS")?A({},le.ALLOWED_TAGS,gr):dn,Ot=E(le,"ALLOWED_ATTR")?A({},le.ALLOWED_ATTR,gr):Nr,Ig=E(le,"ALLOWED_NAMESPACES")?A({},le.ALLOWED_NAMESPACES,v):dN,Ng=E(le,"ADD_URI_SAFE_ATTR")?A(L(rx),le.ADD_URI_SAFE_ATTR,gr):rx,tx=E(le,"ADD_DATA_URI_TAGS")?A(L(nx),le.ADD_DATA_URI_TAGS,gr):nx,Fl=E(le,"FORBID_CONTENTS")?A({},le.FORBID_CONTENTS,gr):ex,li=E(le,"FORBID_TAGS")?A({},le.FORBID_TAGS,gr):L({}),er=E(le,"FORBID_ATTR")?A({},le.FORBID_ATTR,gr):L({}),ci=E(le,"USE_PROFILES")?le.USE_PROFILES:!1,Gi=le.ALLOW_ARIA_ATTR!==!1,Jo=le.ALLOW_DATA_ATTR!==!1,Vr=le.ALLOW_UNKNOWN_PROTOCOLS||!1,fn=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,dt=le.SAFE_FOR_TEMPLATES||!1,$t=le.SAFE_FOR_XML!==!1,Xt=le.WHOLE_DOCUMENT||!1,Or=le.RETURN_DOM||!1,jn=le.RETURN_DOM_FRAGMENT||!1,Ln=le.RETURN_TRUSTED_TYPE||!1,Wi=le.FORCE_BODY||!1,pr=le.SANITIZE_DOM!==!1,Oi=le.SANITIZE_NAMED_PROPS||!1,Hn=le.KEEP_CONTENT!==!1,wr=le.IN_PLACE||!1,An=le.ALLOWED_URI_REGEXP||ce,zl=le.NAMESPACE||Zo,Of=le.MATHML_TEXT_INTEGRATION_POINTS||Of,If=le.HTML_INTEGRATION_POINTS||If,It=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&ix(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(It.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&ix(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(It.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(It.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),dt&&(Jo=!1),jn&&(Or=!0),ci&&(Tt=A({},Y),Ot=[],ci.html===!0&&(A(Tt,N),A(Ot,R)),ci.svg===!0&&(A(Tt,M),A(Ot,B),A(Ot,Q)),ci.svgFilters===!0&&(A(Tt,U),A(Ot,B),A(Ot,Q)),ci.mathMl===!0&&(A(Tt,G),A(Ot,J),A(Ot,Q))),le.ADD_TAGS&&(typeof le.ADD_TAGS=="function"?qr.tagCheck=le.ADD_TAGS:(Tt===dn&&(Tt=L(Tt)),A(Tt,le.ADD_TAGS,gr))),le.ADD_ATTR&&(typeof le.ADD_ATTR=="function"?qr.attributeCheck=le.ADD_ATTR:(Ot===Nr&&(Ot=L(Ot)),A(Ot,le.ADD_ATTR,gr))),le.ADD_URI_SAFE_ATTR&&A(Ng,le.ADD_URI_SAFE_ATTR,gr),le.FORBID_CONTENTS&&(Fl===ex&&(Fl=L(Fl)),A(Fl,le.FORBID_CONTENTS,gr)),Hn&&(Tt["#text"]=!0),Xt&&A(Tt,["html","head","body"]),Tt.table&&(A(Tt,["tbody"]),delete li.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');pt=le.TRUSTED_TYPES_POLICY,kt=pt.createHTML("")}else pt===void 0&&(pt=_e(Ve,Ie)),pt!==null&&typeof kt=="string"&&(kt=pt.createHTML(""));o&&o(le),jl=le}},ox=A({},[...M,...U,...H]),sx=A({},[...G,...W]),mN=function(le){let He=en(le);(!He||!He.tagName)&&(He={namespaceURI:zl,tagName:"template"});const lt=m(le.tagName),Nn=m(He.tagName);return Ig[le.namespaceURI]?le.namespaceURI===Nf?He.namespaceURI===Zo?lt==="svg":He.namespaceURI===Lf?lt==="svg"&&(Nn==="annotation-xml"||Of[Nn]):!!ox[lt]:le.namespaceURI===Lf?He.namespaceURI===Zo?lt==="math":He.namespaceURI===Nf?lt==="math"&&If[Nn]:!!sx[lt]:le.namespaceURI===Zo?He.namespaceURI===Nf&&!If[Nn]||He.namespaceURI===Lf&&!Of[Nn]?!1:!sx[lt]&&(fN[lt]||!ox[lt]):!!(Su==="application/xhtml+xml"&&Ig[le.namespaceURI]):!1},yo=function(le){p($e.removed,{element:le});try{en(le).removeChild(le)}catch{ht(le)}},_a=function(le,He){try{p($e.removed,{attribute:He.getAttributeNode(le),from:He})}catch{p($e.removed,{attribute:null,from:He})}if(He.removeAttribute(le),le==="is")if(Or||jn)try{yo(He)}catch{}else try{He.setAttribute(le,"")}catch{}},ax=function(le){let He=null,lt=null;if(Wi)le="<remove></remove>"+le;else{const tr=_(le,/^[\r\n\t ]+/);lt=tr&&tr[0]}Su==="application/xhtml+xml"&&zl===Zo&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const Nn=pt?pt.createHTML(le):le;if(zl===Zo)try{He=new tt().parseFromString(Nn,Su)}catch{}if(!He||!He.documentElement){He=tn.createDocument(zl,"template",null);try{He.documentElement.innerHTML=Og?kt:Nn}catch{}}const Ir=He.body||He.documentElement;return le&<&&Ir.insertBefore(je.createTextNode(lt),Ir.childNodes[0]||null),zl===Zo?Dt.call(He,Xt?"html":"body")[0]:Xt?He.documentElement:Ir},lx=function(le){return $n.call(le.ownerDocument||le,le,Oe.SHOW_ELEMENT|Oe.SHOW_COMMENT|Oe.SHOW_TEXT|Oe.SHOW_PROCESSING_INSTRUCTION|Oe.SHOW_CDATA_SECTION,null)},Dg=function(le){return le instanceof ye&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof be)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},cx=function(le){return typeof Ge=="function"&&le instanceof Ge};function Qo(ct,le,He){d(ct,lt=>{lt.call($e,le,He,jl)})}const ux=function(le){let He=null;if(Qo(Et.beforeSanitizeElements,le,null),Dg(le))return yo(le),!0;const lt=gr(le.nodeName);if(Qo(Et.uponSanitizeElement,le,{tagName:lt,allowedTags:Tt}),$t&&le.hasChildNodes()&&!cx(le.firstElementChild)&&$(/<[/\w!]/g,le.innerHTML)&&$(/<[/\w!]/g,le.textContent)||le.nodeType===ve.progressingInstruction||$t&&le.nodeType===ve.comment&&$(/<[/\w]/g,le.data))return yo(le),!0;if(!(qr.tagCheck instanceof Function&&qr.tagCheck(lt))&&(!Tt[lt]||li[lt])){if(!li[lt]&&fx(lt)&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,lt)||It.tagNameCheck instanceof Function&&It.tagNameCheck(lt)))return!1;if(Hn&&!Fl[lt]){const Nn=en(le)||le.parentNode,Ir=Qt(le)||le.childNodes;if(Ir&&Nn){const tr=Ir.length;for(let ui=tr-1;ui>=0;--ui){const es=Xe(Ir[ui],!0);es.__removalCount=(le.__removalCount||0)+1,Nn.insertBefore(es,Pt(le))}}}return yo(le),!0}return le instanceof ut&&!mN(le)||(lt==="noscript"||lt==="noembed"||lt==="noframes")&&$(/<\/no(script|embed|frames)/i,le.innerHTML)?(yo(le),!0):(dt&&le.nodeType===ve.text&&(He=le.textContent,d([_n,nn,rn],Nn=>{He=y(He,Nn," ")}),le.textContent!==He&&(p($e.removed,{element:le.cloneNode()}),le.textContent=He)),Qo(Et.afterSanitizeElements,le,null),!1)},dx=function(le,He,lt){if(pr&&(He==="id"||He==="name")&&(lt in je||lt in gN))return!1;if(!(Jo&&!er[He]&&$(gt,He))){if(!(Gi&&$(Mt,He))){if(!(qr.attributeCheck instanceof Function&&qr.attributeCheck(He,le))){if(!Ot[He]||er[He]){if(!(fx(le)&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,le)||It.tagNameCheck instanceof Function&&It.tagNameCheck(le))&&(It.attributeNameCheck instanceof RegExp&&$(It.attributeNameCheck,He)||It.attributeNameCheck instanceof Function&&It.attributeNameCheck(He,le))||He==="is"&&It.allowCustomizedBuiltInElements&&(It.tagNameCheck instanceof RegExp&&$(It.tagNameCheck,lt)||It.tagNameCheck instanceof Function&&It.tagNameCheck(lt))))return!1}else if(!Ng[He]){if(!$(An,y(lt,yn,""))){if(!((He==="src"||He==="xlink:href"||He==="href")&&le!=="script"&&w(lt,"data:")===0&&tx[le])){if(!(Vr&&!$(on,y(lt,yn,"")))){if(lt)return!1}}}}}}}return!0},fx=function(le){return le!=="annotation-xml"&&_(le,Cn)},hx=function(le){Qo(Et.beforeSanitizeAttributes,le,null);const{attributes:He}=le;if(!He||Dg(le))return;const lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ot,forceKeepAttr:void 0};let Nn=He.length;for(;Nn--;){const Ir=He[Nn],{name:tr,namespaceURI:ui,value:es}=Ir,Ul=gr(tr),Mg=es;let xr=tr==="value"?Mg:x(Mg);if(lt.attrName=Ul,lt.attrValue=xr,lt.keepAttr=!0,lt.forceKeepAttr=void 0,Qo(Et.uponSanitizeAttribute,le,lt),xr=lt.attrValue,Oi&&(Ul==="id"||Ul==="name")&&(_a(tr,le),xr=Xo+xr),$t&&$(/((--!?|])>)|<\/(style|title|textarea)/i,xr)){_a(tr,le);continue}if(Ul==="attributename"&&_(xr,"href")){_a(tr,le);continue}if(lt.forceKeepAttr)continue;if(!lt.keepAttr){_a(tr,le);continue}if(!fn&&$(/\/>/i,xr)){_a(tr,le);continue}dt&&d([_n,nn,rn],gx=>{xr=y(xr,gx," ")});const px=gr(le.nodeName);if(!dx(px,Ul,xr)){_a(tr,le);continue}if(pt&&typeof Ve=="object"&&typeof Ve.getAttributeType=="function"&&!ui)switch(Ve.getAttributeType(px,Ul)){case"TrustedHTML":{xr=pt.createHTML(xr);break}case"TrustedScriptURL":{xr=pt.createScriptURL(xr);break}}if(xr!==Mg)try{ui?le.setAttributeNS(ui,tr,xr):le.setAttribute(tr,xr),Dg(le)?yo(le):h($e.removed)}catch{_a(tr,le)}}Qo(Et.afterSanitizeAttributes,le,null)},vN=function ct(le){let He=null;const lt=lx(le);for(Qo(Et.beforeSanitizeShadowDOM,le,null);He=lt.nextNode();)Qo(Et.uponSanitizeShadowNode,He,null),ux(He),hx(He),He.content instanceof Re&&ct(He.content);Qo(Et.afterSanitizeShadowDOM,le,null)};return $e.sanitize=function(ct){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=null,lt=null,Nn=null,Ir=null;if(Og=!ct,Og&&(ct="<!-->"),typeof ct!="string"&&!cx(ct))if(typeof ct.toString=="function"){if(ct=ct.toString(),typeof ct!="string")throw C("dirty is not a string, aborting")}else throw C("toString is not a function");if(!$e.isSupported)return ct;if(ar||Rg(le),$e.removed=[],typeof ct=="string"&&(wr=!1),wr){if(ct.nodeName){const es=gr(ct.nodeName);if(!Tt[es]||li[es])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(ct instanceof Ge)He=ax("<!---->"),lt=He.ownerDocument.importNode(ct,!0),lt.nodeType===ve.element&<.nodeName==="BODY"||lt.nodeName==="HTML"?He=lt:He.appendChild(lt);else{if(!Or&&!dt&&!Xt&&ct.indexOf("<")===-1)return pt&&Ln?pt.createHTML(ct):ct;if(He=ax(ct),!He)return Or?null:Ln?kt:""}He&&Wi&&yo(He.firstChild);const tr=lx(wr?ct:He);for(;Nn=tr.nextNode();)ux(Nn),hx(Nn),Nn.content instanceof Re&&vN(Nn.content);if(wr)return ct;if(Or){if(jn)for(Ir=ai.call(He.ownerDocument);He.firstChild;)Ir.appendChild(He.firstChild);else Ir=He;return(Ot.shadowroot||Ot.shadowrootmode)&&(Ir=bn.call(Le,Ir,!0)),Ir}let ui=Xt?He.outerHTML:He.innerHTML;return Xt&&Tt["!doctype"]&&He.ownerDocument&&He.ownerDocument.doctype&&He.ownerDocument.doctype.name&&$(xe,He.ownerDocument.doctype.name)&&(ui="<!DOCTYPE "+He.ownerDocument.doctype.name+`>
|
|
138
138
|
`+ui),dt&&d([_n,nn,rn],es=>{ui=y(ui,es," ")}),pt&&Ln?pt.createHTML(ui):ui},$e.setConfig=function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rg(ct),ar=!0},$e.clearConfig=function(){jl=null,ar=!1},$e.isValidAttribute=function(ct,le,He){jl||Rg({});const lt=gr(ct),Nn=gr(le);return dx(lt,Nn,He)},$e.addHook=function(ct,le){typeof le=="function"&&p(Et[ct],le)},$e.removeHook=function(ct,le){if(le!==void 0){const He=f(Et[ct],le);return He===-1?void 0:g(Et[ct],He,1)[0]}return h(Et[ct])},$e.removeHooks=function(ct){Et[ct]=[]},$e.removeAllHooks=function(){Et=Ce()},$e}var Ne=ze();return hm=Ne,hm}var pm,w0;function cF(){return w0||(w0=1,pm=window.DOMPurify||(window.DOMPurify=y0().default||y0())),pm}var jr=cF();function iy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Sl=iy();function Q$(t){Sl=t}var id={exec:()=>null};function Jt(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Zr.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var uF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Zr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},dF=/^(?:[ \t]*(?:\n|$))+/,fF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,of=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,pF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oy=/(?:[*+-]|\d{1,9}[.)])/,eC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tC=Jt(eC).replace(/bull/g,oy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),gF=Jt(eC).replace(/bull/g,oy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),sy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,mF=/^[^\n]+/,ay=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vF=Jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ay).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bF=Jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oy).getRegex(),Yp="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ly=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_F=Jt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ly).replace("tag",Yp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nC=Jt(sy).replace("hr",of).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yp).getRegex(),yF=Jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nC).getRegex(),cy={blockquote:yF,code:fF,def:vF,fences:hF,heading:pF,hr:of,html:_F,lheading:tC,list:bF,newline:dF,paragraph:nC,table:id,text:mF},x0=Jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",of).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yp).getRegex(),wF={...cy,lheading:gF,table:x0,paragraph:Jt(sy).replace("hr",of).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yp).getRegex()},xF={...cy,html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ly).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:id,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jt(sy).replace("hr",of).replace("heading",` *#{1,6} *[^
|
|
139
139
|
]`).replace("lheading",tC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,SF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rC=/^( {2,}|\\)\n(?!\s*$)/,EF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jp=/[\p{P}\p{S}]/u,uy=/[\s\p{P}\p{S}]/u,iC=/[^\s\p{P}\p{S}]/u,TF=Jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uy).getRegex(),oC=/(?!~)[\p{P}\p{S}]/u,$F=/(?!~)[\s\p{P}\p{S}]/u,CF=/(?:[^\s\p{P}\p{S}]|~)/u,AF=Jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",uF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sC=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PF=Jt(sC,"u").replace(/punct/g,Jp).getRegex(),LF=Jt(sC,"u").replace(/punct/g,oC).getRegex(),aC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",NF=Jt(aC,"gu").replace(/notPunctSpace/g,iC).replace(/punctSpace/g,uy).replace(/punct/g,Jp).getRegex(),OF=Jt(aC,"gu").replace(/notPunctSpace/g,CF).replace(/punctSpace/g,$F).replace(/punct/g,oC).getRegex(),IF=Jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,iC).replace(/punctSpace/g,uy).replace(/punct/g,Jp).getRegex(),RF=Jt(/\\(punct)/,"gu").replace(/punct/g,Jp).getRegex(),DF=Jt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),MF=Jt(ly).replace("(?:-->|$)","-->").getRegex(),FF=Jt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",MF).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jh=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,zF=Jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lC=Jt(/^!?\[(label)\]\[(ref)\]/).replace("label",jh).replace("ref",ay).getRegex(),cC=Jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",ay).getRegex(),jF=Jt("reflink|nolink(?!\\()","g").replace("reflink",lC).replace("nolink",cC).getRegex(),k0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,dy={_backpedal:id,anyPunctuation:RF,autolink:DF,blockSkip:AF,br:rC,code:SF,del:id,emStrongLDelim:PF,emStrongRDelimAst:NF,emStrongRDelimUnd:IF,escape:kF,link:zF,nolink:cC,punctuation:TF,reflink:lC,reflinkSearch:jF,tag:FF,text:EF,url:id},UF={...dy,link:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",jh).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jh).getRegex()},Qv={...dy,emStrongRDelimAst:OF,emStrongLDelim:LF,url:Jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",k0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",k0).getRegex()},BF={...Qv,br:Jt(rC).replace("{2,}","*").getRegex(),text:Jt(Qv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Vf={normal:cy,gfm:wF,pedantic:xF},Pu={normal:dy,gfm:Qv,breaks:BF,pedantic:UF},qF={"&":"&","<":"<",">":">",'"':""","'":"'"},S0=t=>qF[t];function rs(t,e){if(e){if(Zr.escapeTest.test(t))return t.replace(Zr.escapeReplace,S0)}else if(Zr.escapeTestNoEncode.test(t))return t.replace(Zr.escapeReplaceNoEncode,S0);return t}function E0(t){try{t=encodeURI(t).replace(Zr.percentDecode,"%")}catch{return null}return t}function T0(t,e){let n=t.replace(Zr.findPipe,(o,s,a)=>{let c=!1,u=s;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Zr.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Zr.slashPipe,"|");return r}function Lu(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function VF(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function $0(t,e,n,r,i){let o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}function HF(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
|
|
140
140
|
`).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=i.length?o.slice(i.length):o}).join(`
|
|
@@ -227,7 +227,7 @@ ${o}`:`[${t}]`),o&&s?`${o}
|
|
|
227
227
|
${s}`:o||s}function Q3(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(af(t)!=="object")throw new TypeError("stringify can only be called with an object");let r=ky(0,t,"",e,n);return r[r.length-1]!==`
|
|
228
228
|
`?r+`
|
|
229
229
|
`:r}const SC=t=>JSON.parse(t),Sy=t=>ea(W3(t)),Ey=(t,e)=>JD(t,e),ez=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",tz=({collection:t,collectionFile:e,format:n,text:r})=>{const{_file:{format:i,fmDelimiters:o}}=e??t,[s,a]=(i==="frontmatter"?iA({format:n,delimiter:o}):o)??["---","---"],c=Gt(s),u=Gt(a),d=new RegExp(`^${c}\\n(?:(?<head>.*?)\\n)?${u}$(?:\\n(?<body>.+))?`,"ms"),{head:f,body:h}=r.match(d)?.groups??{};if(!f&&!h)return{body:r};let p={};return n==="yaml-frontmatter"&&(p=Ey(f)),n==="toml-frontmatter"&&(p=Sy(f)),n==="json-frontmatter"&&(p=SC(`{${f}}`)),{...p,body:h}},nz=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=si(n),o=i&&r?au(i,r):void 0;if(!i)throw new Error("Collection not found");if(r&&!o)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
|
|
230
|
-
`);let{_file:{format:s}}=o??i;const a=ng.get(s)?.parser;if(a)return a(t);try{if(s==="yaml"||s==="yml")return Ey(t);if(s==="toml")return Sy(t);if(s==="json")return SC(t);if(s==="frontmatter"&&(s=ez(t)),/^(?:yaml|toml|json)-frontmatter$/.test(s))return tz({collection:i,collectionFile:o,format:s,text:t})}catch(c){throw new Error(`${e} could not be parsed due to ${c.name}: ${c.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${s}`)},El=t=>{const e="field"in t,n="fields"in t,r="types"in t;return{hasSingleSubField:e,hasMultiSubFields:n,hasVariableTypes:r,hasSubFields:e||n||r}},EC=t=>t.length===1&&t[0].widget==="list"&&"root"in t[0]&&t[0].root===!0,rz=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s,hasSingleSubField:a,index:c})=>{const u={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i},d=`${n}.${c}`;return s?s.replaceAll(/{{(.+?)}}/g,(f,h)=>{const[p,...g]=h.split(/\s*\|\s*/),m=p.replace(/^fields\./,""),v=`${d}.${m}`;if(a){const _=mn({...u,keyPath:n});if(!("field"in _)||_.field.name!==m)return""}return iu({...u,keyPath:a?d:v,locale:o,transformations:g})}):a?r[d]:pC({valueMap:r,locale:o,keyPath:d,keyPathRegex:new RegExp(`^${Gt(n)}\\.${c}[\\b\\.]`),getFieldArgs:u})},TC=t=>/\/_index(?:\.[\w-]+)?\.md$/.test(t),Ty=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){let n="",r=e;for(;r.length>0;){const o=r.indexOf("{{");if(o===-1){n+=Gt(r);break}o>0&&(n+=Gt(r.substring(0,o)));const s=r.indexOf("}}",o);if(s===-1){n+=Gt(r);break}r.substring(o,s+2)==="{{slug}}"?n+="(.+)":n+="[^/]+",r=r.substring(s+2)}const[,i]=t.match(new RegExp(`^${n}$`))??[];if(i)return i}return t},iz=async(t,e)=>{try{return await nz(t)}catch(n){console.error(n),e.push(n);return}},oz=(t,e,n)=>{if(EC(e)){const r=e[0].name;return n?!Bt(t)||!Object.values(t).every(Array.isArray)?void 0:Object.fromEntries(Object.entries(t).map(([i,o])=>[i,{[r]:o}])):Array.isArray(t)?{[r]:t}:void 0}return Bt(t)?t:void 0},sz=(t,e,n,r,i)=>r?.split("/").pop()==="_index"&&/\/_index(?:\.[\w-]+)?\.[\w]+$/.test(t)&&i!=="md"?!0:TC(t)?!(e||_i(n)?.name==="_index"||r?.split("/").pop()==="_index"&&i==="md"):!1,az=(t,e,n,r,i)=>{const{path:o,folder:{filePathMap:s}}=t;if(e){if(i){const[d,f]=Object.entries(s??{}).find(([,h])=>h===o)??[];return{subPath:f,locale:d}}return{subPath:o,locale:void 0}}if(!n)return{subPath:void 0,locale:void 0};const a=o.match(n);if(!a?.groups)return{subPath:void 0,locale:void 0};const{subPath:c,locale:u=r}=a.groups;return{subPath:c,locale:u}},lz=(t,e,n,r,i,o)=>{const s=r||Ty({subPath:i,subPathTemplate:o});t.slug=s,t.locales._default={slug:s,path:n,content:ho(e)}},cz=(t,e,n,r,i,o,s)=>{const a=r||Ty({subPath:i,subPathTemplate:o});t.slug=a,t.locales=Object.fromEntries(s.filter(c=>c in e).map(c=>[c,{slug:a,path:n,content:ho(e[c])}]))},uz=(t,e,n,r,i,o,s,a,c,u,d)=>{const f=u&&typeof e[u]=="string"?e[u]:void 0,h=r||Ty({subPath:i,subPathTemplate:o}),p={slug:h,path:n,content:ho(e)},g=`${c}/${f??h}`,m=d.find(v=>v.id===g);return m?(m.locales[s]=p,s===a&&(m.slug=h,m.subPath=i),!0):(t.id=g,t.locales[s]=p,s===a&&(t.slug=h),!1)},dz=async({file:t,entries:e,errors:n})=>{const r=await iz(t,n);if(!r)return;const{path:i,meta:o={},folder:{collectionName:s,fileName:a}}=t,c=si(s),u=c&&a?au(c,a):void 0;if(!c||a&&!u)return;const{fields:d=[],_file:{fullPathRegEx:f,subPath:h,extension:p},_i18n:{i18nEnabled:g,allLocales:m,defaultLocale:v,structureMap:{i18nSingleFile:_,i18nMultiFile:y,i18nMultiFolder:w,i18nRootMultiFolder:x},canonicalSlug:{key:E}}}=u??c,$=oz(r,d,_);if(!$||sz(i,a,c,h,p))return;const C=y||w||x,{subPath:k,locale:T}=az(t,a,f,v,C);if(!k||C&&!T)return;const A={id:"",slug:"",subPath:k,locales:{},...o};if(!g)lz(A,$,i,a,k,h);else if(_)cz(A,$,i,a,k,h,m);else if(C&&T&&uz(A,$,i,a,k,h,T,v,s,E,e))return;e.push(A)},$C=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>dz({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Si(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},sb=t=>{const e=[],n=[],r=[];t.forEach(o=>{const{path:s,name:a}=o;if(a.startsWith("."))yC.test(a)&&r.push({...o,type:"config"});else{const[c]=$$(s),[u]=Hp(s);c&&e.push({...o,type:"entry",folder:c}),u&&!e.find(d=>d.path===s)&&!TC(s)&&n.push({...o,type:"asset",folder:u})}});const i=[...e,...n,...r];return{entryFiles:e,assetFiles:n,configFiles:r,allFiles:i,count:i.length}},CC=async(t,e,n="file")=>{const r=an(e??"");let i=t;if(!r){if(n==="directory")return i;throw new Error("Path is required for file handle retrieval")}const o=r.split("/"),s=o.length-1,a=!0;for await(const[c,u]of o.entries())i=await(c===s&&n==="file"?i.getFileHandle(u,{create:a}):i.getDirectoryHandle(u,{create:a}));return i},AC=(t,e)=>CC(t,e,"file"),Cd=(t,e)=>CC(t,e,"directory"),PC=t=>z$(t,e=>e.replace(/{{.+?}}/,".+?")),LC=async(t,e,n="")=>{const{scanningPaths:r,scanningPathsRegEx:i,fileHandles:o}=e;for await(const[s,a]of t.entries()){if(s.startsWith(".")&&!yC.test(s))continue;const c=n?`${n}/${s}`:s,u=i.some(d=>d.test(c));if(a.kind==="file"&&u&&o.push({handle:a,path:c}),a.kind==="directory"){const d=PC(c);(u||r.some(f=>d.test(f)))&&await LC(a,e,c)}}},fz=()=>{const t=oe(q_).map(({filePathMap:n,folderPathMap:r})=>Object.values(n||(r??{}))).flat(1),e=oe(ua).filter(({internalPath:n})=>n!==void 0).map(({internalPath:n})=>n);return Pc([...t,...e].map(n=>an(n??"")))},hz=async t=>{const e=[],n=fz();return await LC(t,{scanningPaths:n,scanningPathsRegEx:n.map(PC),fileHandles:e}),e.map(({handle:r,path:i})=>({handle:r,path:i.normalize(),name:r.name.normalize(),size:0,sha:""}))},B0=async t=>{const{name:e,handle:n}=t;if(e===".gitkeep")return t;try{const r=await n.getFile(),i=await sI(r);return{...t,text:i}}catch(r){return console.error(r),{...t,text:""}}},pz=async t=>{const{name:e,handle:n}=t,r=su(e);try{const i=await n.getFile(),{size:o}=i,s=await nl(i);return{...t,kind:r,size:o,sha:s}}catch(i){return console.error(i),{...t,kind:r}}},NC=async t=>{const{entryFiles:e,assetFiles:n,configFiles:r}=sb(await hz(t)),i=[],o=[];for(const u of e)i.push(await B0(u));for(const u of r)o.push(await B0(u));const{entries:s,errors:a}=await $C(i),c=[];for(const u of n)c.push(await pz(u));Ai.set(s),Bn.set(c),by.set(o),V_.set(a),eu.set(!0)},gz=async({rootDirHandle:t,previousPath:e,path:n})=>{const{dirname:r,basename:i}=gn(n),o=gn(e).dirname,s=await AC(t,e);return r&&r!==o?await s.move(await Cd(t,r),i):await s.move(i),s},mz=async({rootDirHandle:t,fileHandle:e,path:n,data:r})=>{e??=await AC(t,n);const i=await e.createWritable?.();try{await i?.write(r)}catch{}finally{try{await i?.close()}catch{}}return e.getFile()},vz=async(t,e)=>{for(let n=e.length;n>0;n-=1){const r=e.slice(0,n).join("/"),i=await Cd(t,r);if((await Array.fromAsync(i.keys())).length>0)break;const s=e[n-1],a=e.slice(0,n-1).join("/");await(await Cd(t,a)).removeEntry(s)}},bz=async({rootDirHandle:t,path:e})=>{const{dirname:n="",basename:r}=gn(an(e));await(await Cd(t,n)).removeEntry(r),n&&await vz(t,n.split("/"))},_z=async(t,{action:e,path:n,previousPath:r,data:i})=>{let o;return e==="move"&&r&&(o=await gz({rootDirHandle:t,previousPath:r,path:n})),["create","update","move"].includes(e)&&i?mz({rootDirHandle:t,fileHandle:o,path:n,data:i}):(e==="delete"&&await bz({rootDirHandle:t,path:n}),null)},OC=async(t,e)=>{const n=await Promise.all(e.map(async r=>{const{path:i,data:o}=r;let s=null;if(t)try{s=await _z(t,r)}catch(a){console.error(a)}if(!s){if(o===void 0)return null;s=Z_(o)}return[i,{file:s,sha:await nl(s)}]}));return{sha:await nl(new Date().toJSON()),files:Object.fromEntries(n.filter(r=>!!r))}},IC="local",yz="Local Repository";let ab;const wz={service:"",label:"",owner:"",repo:"",branch:""},RC=new Proxy({},{get:(t,e)=>(ab??wz)[e]}),lb="root_dir_handle";let Vh,$y;const xz=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Vh?.get(lb)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Vh?.set(lb,n))),n},kz=()=>{const{name:t}=oe(Ct).backend;ab=uf[t]?.init?.();const{databaseName:e}=ab??{};return Vh=e?new fo(e,"file-system-handles"):null,RC},Sz=async({auto:t=!1})=>{const e=await xz({showPicker:!t});if(e)$y=e;else throw new Error("Directory handle could not be acquired");return{backendName:IC}},Ez=async()=>{await Vh?.delete(lb)},Tz=async()=>{await NC($y)},$z=async t=>OC($y,t),Cz={isGit:!1,name:IC,label:yz,repository:RC,init:kz,signIn:Sz,signOut:Ez,fetchFiles:Tz,commitChanges:$z},Az="sveltia-cms-test",DC="test-repo",Pz="Test";let Hh;const Lz=()=>{},Nz=async()=>{try{Hh=await Cd(await navigator.storage.getDirectory(),Az)}catch{}return{backendName:DC}},Oz=async()=>{},Iz=async()=>{Hh?await NC(Hh):eu.set(!0)},Rz=async t=>OC(Hh,t),Dz={isGit:!1,name:DC,label:Pz,init:Lz,signIn:Nz,signOut:Oz,fetchFiles:Iz,commitChanges:Rz},od="gitea",MC="Gitea / Forgejo",q0="https://gitea.com/api/v1",Mz="https://gitea.com",Fz="login/oauth/authorize",zz=1.24,jz=12,Un=ot();Un.subscribe(t=>{(async()=>{try{t?await pi.set("sveltia-cms.user",t):t===null&&await pi.delete("sveltia-cms.user")}catch{}})()});const lf=async(t,e={},{responseType:n="json",refreshAccessToken:r=void 0}={})=>{let i;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Bt(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{i=await fetch(t,e)}catch(u){throw new Error("Failed to send the request",{cause:u})}if(n==="raw")return i;const{ok:o,status:s}=i;let a;try{if(o&&n==="blob")return i.blob();if(o&&n==="text")return i.text();a=await i.json()}catch(u){throw new Error("Failed to parse the response",{cause:u})}if(o&&!(t.endsWith("/graphql")&&Bt(a)&&a.errors))return a;if(s===401&&r){const[u]=e.headers.get("Authorization")?.split(" ")??["token"],{token:d}=await r();return e.headers.set("Authorization",`${u} ${d}`),lf(t,e,{responseType:n})}if(!Bt(a))throw new Error("Server responded with an error",{cause:{status:s}});let c="";throw typeof a.error=="string"&&(c=a.error),typeof a.message=="string"&&(c=a.message),Array.isArray(a.errors)&&(typeof a.errors[0]=="string"&&(c=a.errors.join(", ")),Bt(a.errors[0])&&typeof a.errors[0].message=="string"&&(c=a.errors.map(u=>u.message).join(", "))),new Error("Server responded with an error",{cause:{status:s,message:c}})},Uz={clientId:"",authScope:"",authURL:"",tokenURL:"",authScheme:"token",restBaseURL:"",graphqlBaseURL:""},Tl={...Uz},cf={},Bz=async({clientId:t,tokenURL:e,refreshToken:n})=>{let r,i="";try{r=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",client_id:t,refresh_token:n})})}catch{}if(!r?.ok)throw new Error(oe(ue)("sign_in_error.TOKEN_REFRESH_FAILED"));return{access_token:i,refresh_token:n}=await r.json(),Un.update(o=>o&&{...o,token:i,refreshToken:n}),{token:i,refreshToken:n}},ir=async(t,{method:e="GET",headers:n={},body:r=null,isGraphQL:i=!1,responseType:o="json",token:s=void 0,refreshToken:a=void 0}={})=>{const{clientId:c,tokenURL:u,restBaseURL:d,graphqlBaseURL:f,authScheme:h="token"}=Tl,p=oe(Un),g=i?f:d;return s??=p?.token,a??=p?.refreshToken,n.Authorization=`${h} ${s}`,lf(`${g}${t}`,{method:e,headers:n,body:r},{responseType:o,refreshAccessToken:a?()=>Bz({clientId:c,tokenURL:u,refreshToken:a}):void 0})},As=async(t,e={})=>{t=t.replace(/\n\s*/g," "),Object.entries(cf).forEach(([r,i])=>{t.includes(`$${r}`)&&(e[r]??=i)});const{data:n}=await ir("",{method:"POST",body:{query:t,variables:e},isGraphQL:!0});return n},qz=async({token:t,refreshToken:e})=>{const{id:n,full_name:r,login:i,email:o,avatar_url:s,html_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(Un);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:od,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},FC=ot(!1),Vz=({authURL:t})=>{const{availHeight:r,availWidth:i}=window.screen,o=r/2-800/2,s=i/2-600/2;return window.open(t,"auth",`width=600,height=800,top=${o},left=${s}`)},zC=async({backendName:t,authURL:e})=>{const n=Vz({authURL:e});return new Promise((r,i)=>{const o=t==="github"?setInterval(()=>{n?.closed&&(clearInterval(o),i(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,s=({origin:a,data:c})=>{if(a!==new URL(e).origin||typeof c!="string")return;const u=t;if(c===`authorizing:${u}`){n?.postMessage(c,a);return}const{result:d}=c.match(`^authorization:${u}:(success|error):(?<result>.+)`)?.groups??{};let f;try{f=d?JSON.parse(d):{error:"No data"},Bt(f)||(f={error:"Malformed data"})}catch{f={error:"Malformed data"}}"token"in f?r(f):i(new Error("Authentication failed",{cause:new Error(f.errorCode?oe(ue)(`sign_in_error.${f.errorCode}`,{default:f.error}):f.error)})),window.removeEventListener("message",s),clearInterval(o),n?.close()};window.addEventListener("message",s)})},Hz=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{const{hostname:i}=window.location;e??=i==="localhost"?"cms.netlify.com":i;try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const o=new URLSearchParams({provider:t,site_id:e,scope:r});return zC({backendName:t,authURL:`${n}?${o}`})},Kz=async()=>{const t=`${Nv()}${Nv()}`,e=btoa(await Za(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Si().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},Gz=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:o,codeChallenge:s}=await Kz(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:s,code_challenge_method:"S256"});return await pi.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:o,realAuthURL:`${n}?${d}`}),await pi.set("sveltia-cms.user",{backendName:t}),zC({backendName:t,authURL:u})},Kf=({provider:t="unknown",token:e,refreshToken:n,error:r,errorCode:i})=>{const o=r?"error":"success",s=r?{provider:t,error:r,errorCode:i}:{provider:t,token:e,refreshToken:n};window.addEventListener("message",({data:a,origin:c})=>{a===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${o}:${JSON.stringify(s)}`,c)}),window.opener?.postMessage(`authorizing:${t}`,"*")},Wz=async({backendName:t,clientId:e,tokenURL:n,code:r,state:i})=>{const{origin:o,pathname:s}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await pi.get("sveltia-cms.auth")??{},u=t,d=`${o}${s}`;if(await pi.delete("sveltia-cms.auth"),!a||!c||i!==a)return Kf({provider:u,error:oe(ue)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="",g="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:e,code:r,redirect_uri:d,code_verifier:c})})}catch{}if(!f)return Kf({provider:u,error:oe(ue)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,refresh_token:p,error:g}=await f.json())}catch{return Kf({provider:u,error:oe(ue)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return Kf({provider:u,token:h,refreshToken:p,error:g})},Yz=async({backendName:t,clientId:e,tokenURL:n})=>{FC.set(!0);const{search:r}=window.location,{code:i,state:o}=Object.fromEntries(new URLSearchParams(r));if(i&&o)await Wz({backendName:t,clientId:e,tokenURL:n,code:i,state:o});else{const{realAuthURL:s}=await pi.get("sveltia-cms.auth")??{};s&&(window.location.href=s)}},Jz=async({auto:t,apiConfig:e})=>{const{backend:n}=oe(Ct),{name:r,site_domain:i,auth_type:o}=n,{clientId:s,authScope:a,authURL:c,tokenURL:u}=e,d={backendName:r,authURL:c,scope:a};if(r==="gitea"||o==="pkce"){const f=window.opener?.origin===window.location.origin&&window.name==="auth";return f&&await Yz({backendName:r,clientId:s,tokenURL:u}),f||t?void 0:Gz({...d,clientId:s})}if(!t)return Hz({...d,siteDomain:i})},Cy=async({options:{token:t,refreshToken:e,auto:n=!1},apiConfig:r})=>{if(!t){const i=await Jz({auto:n,apiConfig:r});if(!i)return;({token:t,refreshToken:e}=i)}return{token:t,refreshToken:e}},Xz=t=>{const{origin:e}=new URL(t);return`${e}/user/settings/applications`},Zz=async t=>{const{token:e,refreshToken:n}=await Cy({options:t,apiConfig:Tl})??{};if(e)return qz({token:e,refreshToken:n})},Qz=async()=>{},Ay={service:"",label:"",owner:"",repo:"",branch:"",repoURL:"",treeBaseURL:"",blobBaseURL:"",isSelfHosted:!1,databaseName:""},Py=(t,e)=>`${t==="https://api.github.com"?"https://github.com":t.replace(/\/api(?:\/v\d+)?(?:\/.*)?/,"")}/${e}`,ni={...Ay};let V0=null;const jC=(t,e)=>({treeBaseURL:e?`${t}/src/branch/${e}`:t,blobBaseURL:e?`${t}/src/branch/${e}`:""}),UC=async()=>{const{owner:t,repo:e}=ni;return V0??=await ir(`/repos/${t}/${e}`),V0},ej=async()=>{const{repo:t}=ni;try{const{permissions:e}=await UC();if(!e?.pull)throw new Error("Not a collaborator of the repository",{cause:new Error(oe(ue)("repository_no_access",{values:{repo:t}}))})}catch(e){throw e instanceof Error&&e.message.includes("Not a collaborator")?e:new Error("Failed to check repository access",{cause:new Error(oe(ue)("repository_not_found",{values:{repo:t}}))})}},tj=async()=>{const{repo:t,repoURL:e=""}=ni;try{const{default_branch:n}=await UC();if(!n)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(oe(ue)("repository_empty",{values:{repo:t}}))});return Object.assign(ni,{branch:n},jC(e,n)),n}catch{throw new Error("Failed to retrieve the default branch name.",{cause:new Error(oe(ue)("repository_not_found",{values:{repo:t}}))})}},nj={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},Ly=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{commit_messages:i={},skip_ci:o,automatic_deployments:s}=oe(Ct)?.backend??{},{login:a="",name:c=""}=oe(Un),[u=""]=t.map(g=>g.slug).filter(Boolean),[d,...f]=t.map(({path:g})=>g),h=n?ws(n,{useSingular:!0}):"";let p=i[e]||nj[e]||"";return["create","update","delete"].includes(e)&&(p=p.replaceAll("{{slug}}",u).replaceAll("{{collection}}",h).replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),["uploadMedia","deleteMedia"].includes(e)&&(p=p.replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c),f.length&&(p+=` +${f.length}`)),["openAuthoring"].includes(e)&&(p=p.replaceAll("{{message}}",e).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),!["delete","deleteMedia"].includes(e)&&(r??(o===!0||s===!1))&&(p=`[skip ci] ${p}`),p},rj=async()=>{const{owner:t,repo:e,branch:n}=ni;try{const{commit:{id:r,message:i}}=await ir(`/repos/${t}/${e}/branches/${n}`);return{hash:r,message:i}}catch{throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(oe(ue)("branch_not_found",{values:{repo:e,branch:n}}))})}},ij=async(t,e)=>{const{owner:n,repo:r,branch:i}=ni,o=Ly(t,e),{name:s,email:a}=oe(Un),c=new Date().toJSON(),u=await Promise.all(t.map(async({action:h,path:p,previousPath:g,previousSha:m,data:v=""})=>({operation:h==="move"?"update":h,path:p,content:await w_(v),from_path:g,sha:m}))),{commit:d,files:f}=await ir(`/repos/${n}/${r}/contents`,{method:"POST",body:{branch:i,author:{name:s,email:a},committer:{name:s,email:a},dates:{author:c,committer:c},message:o,files:u}});return{sha:d.sha,date:new Date(d.created),files:Object.fromEntries(f.map((h,p)=>[h?.path??t[p].path,{sha:h?.sha??""}]))}},BC={isForgejo:!1},oj=async()=>{const{version:t}=await ir("/version"),e=t.includes("+gitea-")||Number.parseFloat(t)>10,n=e?"Forgejo":"Gitea",r=e?jz:zz;if(Object.assign(BC,{isForgejo:e}),Object.assign(ni,{label:n}),Number.parseFloat(t)<r)throw new Error(`Unsupported ${n} version`,{cause:new Error(oe(ue)("backend_unsupported_version",{values:{name:n,version:r}}))})},sj=async({metaDB:t,lastHash:e,cachedFileEntries:n,fetchFileList:r})=>{const i=await t.get("last_commit_hash"),o=await t.get("git_config_fetched");if(i&&i===e&&o&&n.length)return sb(n.map(([a,c])=>({path:a,name:gn(a).basename,...c})));const s=sb(await r(e));return t.set("last_commit_hash",e),t.set("git_config_fetched",!0),s},aj=({allFiles:t,cachedFiles:e})=>{t.forEach(({sha:n,path:r},i)=>{e[r]?.sha===n&&Object.assign(t[i],e[r])})},_m=({fileInfo:t,fetchedFileMap:e})=>{const{meta:n,size:r,text:i}=e[t.path]??{};return{...t,size:t.size??r,text:t.text??i,meta:t.meta??n}},lj=t=>{const{name:e,meta:n={},...r}=t,i=su(e);return{...r,...n,name:e,kind:i}},H0=({entries:t,assets:e,configFiles:n,errors:r=[]})=>{Ai.set(t),Bn.set(e),by.set(n),V_.set(r),eu.set(!0)},cj=async({cacheDB:t,allFiles:e,cachedFiles:n,fetchingFiles:r,fetchedFileMap:i})=>{const o=e.map(({path:a})=>a),s=Object.keys(n).filter(a=>!o.includes(a));r.length&&await t.saveEntries(Object.entries(i)),s.length&&t.deleteEntries(s)},Ny=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:o,branch:s}=t,a=new fo(o,"meta"),c=new fo(o,"file-cache"),u=await c.entries();let d=s;d||(d=await e(),t.branch=d);const{hash:f,message:h}=await n(),p=await sj({metaDB:a,lastHash:f,cachedFileEntries:u,fetchFileList:r});if(Gh.set(!h.startsWith("[skip ci]")),!p.count){H0({entries:[],assets:[],configFiles:[]});return}const{entryFiles:g,assetFiles:m,configFiles:v,allFiles:_}=p,y=Object.fromEntries(u);aj({allFiles:_,cachedFiles:y});const w=_.filter(({meta:T})=>!T),x=w.length?await i(w):{},{entries:E,errors:$}=await $C(g.map(T=>_m({fileInfo:T,fetchedFileMap:x}))),C=m.map(T=>lj(_m({fileInfo:T,fetchedFileMap:x}))),k=v.map(T=>_m({fileInfo:T,fetchedFileMap:x}));H0({entries:E,assets:C,configFiles:k,errors:$}),await cj({cacheDB:c,allFiles:_,cachedFiles:y,fetchingFiles:w,fetchedFileMap:x})},uj=async t=>{const{owner:e,repo:n,branch:r}=ni,i=`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`,o=[];let s=1;for(;;){const{tree:a,truncated:c}=await ir(`${i}&page=${s}`);if(a&&o.push(...a),a&&c)s+=1;else break}return o.filter(({type:a})=>a==="blob").map(({path:a,sha:c,size:u})=>({path:a,sha:c,size:u,name:gn(a).basename}))},dj=async(t,e)=>{const n=await Promise.all(t.map(async({path:r,sha:i,size:o},s)=>{const a=e[s],c={sha:i,size:o??0,text:a?.content&&a.encoding==="base64"?await lI(a.content):"",meta:{}};return[r,c]}).filter(r=>!!r));return Object.fromEntries(n)},fj=async t=>{const{owner:e,repo:n,branch:r}=ni,{isForgejo:i}=BC,o=i?`/repos/${e}/${n}/git/blobs`:`/repos/${e}/${n}/file-contents?ref=${r}`,s=i?"sha":"path",a=t.filter(({type:f})=>f!=="asset").map(({[s]:f})=>f);if(!a.length)return{};const c=[],u=[...a];Ro.set(0);const{default_paging_num:d=30}=await ir("/settings/api");for(;;){const f=u.splice(0,d),h=await(i?ir(`${o}?shas=${f.join(",")}`):ir(o,{method:"POST",body:{files:f}}));if(c.push(...h),Ro.set(Math.ceil((a.length-u.length)/a.length*100)),!u.length)break}return Ro.set(void 0),dj(t,c)},hj=async()=>{await oj(),await ej(),await Ny({repository:ni,fetchDefaultBranchName:tj,fetchLastCommit:rj,fetchFileList:uj,fetchFileContents:fj})},pj=async t=>{const{owner:e,repo:n,branch:r}=ni,{path:i}=t;return ir(`/repos/${e}/${n}/media/${r}/${encodeURI(i)}`,{responseType:"blob"})},cb="sveltia-cms.prefs",ub=ot(),ft=ot({},t=>{ub.set(void 0),(async()=>{try{const e=await pi.get(cb)??{};e.apiKeys??={},e.useDraftBackup??=!0,e.closeOnSave??=!0,e.closeWithEscape??=!0,e.underlineLinks??=!0,e.beta??=!1,e.devModeEnabled??=!1,e.defaultTranslationService??="google",t(e)}catch{ub.set({type:"permission_denied"})}})()});ft.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{pn(t,await pi.get(cb))||await pi.set(cb,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,beta:i=!1,devModeEnabled:o=!1}=t;e&&oe(zT).includes(e)&&qt.set(e);const s=!n||n==="auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?a:n,autoTheming:s,underlineLinks:r,beta:i,devMode:o})});const gj=()=>{const{backend:t}=oe(Ct)??{};if(t?.name!==od)return;const{repo:e,branch:n,base_url:r=Mz,auth_endpoint:i=Fz,app_id:o="",api_root:s=q0}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${an(r)}/${an(i)}`,f=Py(s,u);return Object.assign(ni,{service:od,label:MC,owner:a,repo:c,branch:n,repoURL:f,newPatURL:Xz(f),databaseName:`${od}:${u}`,isSelfHosted:s!==q0},jC(f,n)),Object.assign(Tl,{clientId:o,authScope:"read:repository,write:repository,read:user",authURL:d,tokenURL:d.replace("/authorize","/access_token"),restBaseURL:an(s)}),oe(ft).devModeEnabled&&console.info("repositoryInfo",ni),ni},mj={isGit:!0,name:od,label:MC,repository:ni,init:gj,signIn:Zz,signOut:Qz,fetchFiles:hj,fetchBlob:pj,commitChanges:ij},sd="github",qC="GitHub",Kh="https://api.github.com",vj="https://api.netlify.com",bj="auth",_j="https://github.com",yj="login/oauth/authorize",wj=t=>(t=an(t),t===Kh||t.endsWith("/api/v3")?t:t.endsWith("/api")?`${t}/v3`:`${t}/api/v3`),xj=t=>(t=an(t),t===Kh?`${t}/graphql`:t.endsWith("/graphql")?t:t.endsWith("/api/v3")?t.replace("/api/v3","/graphql"):t.endsWith("/api")?`${t}/graphql`:`${t}/api/graphql`),kj=async({token:t,refreshToken:e})=>{const{id:n,name:r,login:i,email:o,avatar_url:s,html_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(Un);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:sd,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},Sj=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",contents:"write"});return`${e}/settings/personal-access-tokens/new?${n}`},Ej=async t=>{const{token:e,refreshToken:n}=await Cy({options:t,apiConfig:Tl})??{};if(e)return kj({token:e,refreshToken:n})},Tj=async()=>{},Ei={...Ay},VC=(t,e)=>({treeBaseURL:e?`${t}/tree/${e}`:t,blobBaseURL:e?`${t}/blob/${e}`:""}),$j=async()=>{const{owner:t,repo:e}=Ei,n=oe(Un)?.login,{ok:r}=await ir(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(oe(ue)("repository_no_access",{values:{repo:e}}))})},Cj=`
|
|
230
|
+
`);let{_file:{format:s}}=o??i;const a=ng.get(s)?.parser;if(a)return a(t);try{if(s==="yaml"||s==="yml")return Ey(t);if(s==="toml")return Sy(t);if(s==="json")return SC(t);if(s==="frontmatter"&&(s=ez(t)),/^(?:yaml|toml|json)-frontmatter$/.test(s))return tz({collection:i,collectionFile:o,format:s,text:t})}catch(c){throw new Error(`${e} could not be parsed due to ${c.name}: ${c.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${s}`)},El=t=>{const e="field"in t,n="fields"in t,r="types"in t;return{hasSingleSubField:e,hasMultiSubFields:n,hasVariableTypes:r,hasSubFields:e||n||r}},EC=t=>t.length===1&&t[0].widget==="list"&&"root"in t[0]&&t[0].root===!0,rz=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s,hasSingleSubField:a,index:c})=>{const u={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i},d=`${n}.${c}`;return s?s.replaceAll(/{{(.+?)}}/g,(f,h)=>{const[p,...g]=h.split(/\s*\|\s*/),m=p.replace(/^fields\./,""),v=`${d}.${m}`;if(a){const _=mn({...u,keyPath:n});if(!("field"in _)||_.field.name!==m)return""}return iu({...u,keyPath:a?d:v,locale:o,transformations:g})}):a?r[d]:pC({valueMap:r,locale:o,keyPath:d,keyPathRegex:new RegExp(`^${Gt(n)}\\.${c}[\\b\\.]`),getFieldArgs:u})},TC=t=>/\/_index(?:\.[\w-]+)?\.md$/.test(t),Ty=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){let n="",r=e;for(;r.length>0;){const o=r.indexOf("{{");if(o===-1){n+=Gt(r);break}o>0&&(n+=Gt(r.substring(0,o)));const s=r.indexOf("}}",o);if(s===-1){n+=Gt(r);break}r.substring(o,s+2)==="{{slug}}"?n+="(.+)":n+="[^/]+",r=r.substring(s+2)}const[,i]=t.match(new RegExp(`^${n}$`))??[];if(i)return i}return t},iz=async(t,e)=>{try{return await nz(t)}catch(n){console.error(n),e.push(n);return}},oz=(t,e,n)=>{if(EC(e)){const r=e[0].name;return n?!Bt(t)||!Object.values(t).every(Array.isArray)?void 0:Object.fromEntries(Object.entries(t).map(([i,o])=>[i,{[r]:o}])):Array.isArray(t)?{[r]:t}:void 0}return Bt(t)?t:void 0},sz=(t,e,n,r,i)=>r?.split("/").pop()==="_index"&&/\/_index(?:\.[\w-]+)?\.[\w]+$/.test(t)&&i!=="md"?!0:TC(t)?!(e||_i(n)?.name==="_index"||r?.split("/").pop()==="_index"&&i==="md"):!1,az=(t,e,n,r,i)=>{const{path:o,folder:{filePathMap:s}}=t;if(e){if(i){const[d,f]=Object.entries(s??{}).find(([,h])=>h===o)??[];return{subPath:f,locale:d}}return{subPath:o,locale:void 0}}if(!n)return{subPath:void 0,locale:void 0};const a=o.match(n);if(!a?.groups)return{subPath:void 0,locale:void 0};const{subPath:c,locale:u=r}=a.groups;return{subPath:c,locale:u}},lz=(t,e,n,r,i,o)=>{const s=r||Ty({subPath:i,subPathTemplate:o});t.slug=s,t.locales._default={slug:s,path:n,content:ho(e)}},cz=(t,e,n,r,i,o,s)=>{const a=r||Ty({subPath:i,subPathTemplate:o});t.slug=a,t.locales=Object.fromEntries(s.filter(c=>c in e).map(c=>[c,{slug:a,path:n,content:ho(e[c])}]))},uz=(t,e,n,r,i,o,s,a,c,u,d)=>{const f=u&&typeof e[u]=="string"?e[u]:void 0,h=r||Ty({subPath:i,subPathTemplate:o}),p={slug:h,path:n,content:ho(e)},g=`${c}/${f??h}`,m=d.find(v=>v.id===g);return m?(m.locales[s]=p,s===a&&(m.slug=h,m.subPath=i),!0):(t.id=g,t.locales[s]=p,s===a&&(t.slug=h),!1)},dz=async({file:t,entries:e,errors:n})=>{const r=await iz(t,n);if(!r)return;const{path:i,meta:o={},folder:{collectionName:s,fileName:a}}=t,c=si(s),u=c&&a?au(c,a):void 0;if(!c||a&&!u)return;const{fields:d=[],_file:{fullPathRegEx:f,subPath:h,extension:p},_i18n:{i18nEnabled:g,allLocales:m,defaultLocale:v,structureMap:{i18nSingleFile:_,i18nMultiFile:y,i18nMultiFolder:w,i18nRootMultiFolder:x},canonicalSlug:{key:E}}}=u??c,$=oz(r,d,_);if(!$||sz(i,a,c,h,p))return;const C=y||w||x,{subPath:k,locale:T}=az(t,a,f,v,C);if(!k||C&&!T)return;const A={id:"",slug:"",subPath:k,locales:{},...o};if(!g)lz(A,$,i,a,k,h);else if(_)cz(A,$,i,a,k,h,m);else if(C&&T&&uz(A,$,i,a,k,h,T,v,s,E,e))return;e.push(A)},$C=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>dz({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Si(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},sb=t=>{const e=[],n=[],r=[];t.forEach(o=>{const{path:s,name:a}=o;if(a.startsWith("."))yC.test(a)&&r.push({...o,type:"config"});else{const[c]=$$(s),[u]=Hp(s);c&&e.push({...o,type:"entry",folder:c}),u&&!e.find(d=>d.path===s)&&!TC(s)&&n.push({...o,type:"asset",folder:u})}});const i=[...e,...n,...r];return{entryFiles:e,assetFiles:n,configFiles:r,allFiles:i,count:i.length}},CC=async(t,e,n="file")=>{const r=an(e??"");let i=t;if(!r){if(n==="directory")return i;throw new Error("Path is required for file handle retrieval")}const o=r.split("/"),s=o.length-1,a=!0;for await(const[c,u]of o.entries())i=await(c===s&&n==="file"?i.getFileHandle(u,{create:a}):i.getDirectoryHandle(u,{create:a}));return i},AC=(t,e)=>CC(t,e,"file"),Cd=(t,e)=>CC(t,e,"directory"),PC=t=>z$(t,e=>e.replace(/{{.+?}}/,".+?")),LC=async(t,e,n="")=>{const{scanningPaths:r,scanningPathsRegEx:i,fileHandles:o}=e;for await(const[s,a]of t.entries()){if(s.startsWith(".")&&!yC.test(s))continue;const c=n?`${n}/${s}`:s,u=i.some(d=>d.test(c));if(a.kind==="file"&&u&&o.push({handle:a,path:c}),a.kind==="directory"){const d=PC(c);(u||r.some(f=>d.test(f)))&&await LC(a,e,c)}}},fz=()=>{const t=oe(q_).map(({filePathMap:n,folderPathMap:r})=>Object.values(n||(r??{}))).flat(1),e=oe(ua).filter(({internalPath:n})=>n!==void 0).map(({internalPath:n})=>n);return Pc([...t,...e].map(n=>an(n??"")))},hz=async t=>{const e=[],n=fz();return await LC(t,{scanningPaths:n,scanningPathsRegEx:n.map(PC),fileHandles:e}),e.map(({handle:r,path:i})=>({handle:r,path:i.normalize(),name:r.name.normalize(),size:0,sha:""}))},B0=async t=>{const{name:e,handle:n}=t;if(e===".gitkeep")return t;try{const r=await n.getFile(),i=await sI(r);return{...t,text:i}}catch(r){return console.error(r),{...t,text:""}}},pz=async t=>{const{name:e,handle:n}=t,r=su(e);try{const i=await n.getFile(),{size:o}=i,s=await nl(i);return{...t,kind:r,size:o,sha:s}}catch(i){return console.error(i),{...t,kind:r}}},NC=async t=>{const{entryFiles:e,assetFiles:n,configFiles:r}=sb(await hz(t)),i=[],o=[];for(const u of e)i.push(await B0(u));for(const u of r)o.push(await B0(u));const{entries:s,errors:a}=await $C(i),c=[];for(const u of n)c.push(await pz(u));Ai.set(s),Bn.set(c),by.set(o),V_.set(a),eu.set(!0)},gz=async({rootDirHandle:t,previousPath:e,path:n})=>{const{dirname:r,basename:i}=gn(n),o=gn(e).dirname,s=await AC(t,e);return r&&r!==o?await s.move(await Cd(t,r),i):await s.move(i),s},mz=async({rootDirHandle:t,fileHandle:e,path:n,data:r})=>{e??=await AC(t,n);const i=await e.createWritable?.();try{await i?.write(r)}catch{}finally{try{await i?.close()}catch{}}return e.getFile()},vz=async(t,e)=>{for(let n=e.length;n>0;n-=1){const r=e.slice(0,n).join("/"),i=await Cd(t,r);if((await Array.fromAsync(i.keys())).length>0)break;const s=e[n-1],a=e.slice(0,n-1).join("/");await(await Cd(t,a)).removeEntry(s)}},bz=async({rootDirHandle:t,path:e})=>{const{dirname:n="",basename:r}=gn(an(e));await(await Cd(t,n)).removeEntry(r),n&&await vz(t,n.split("/"))},_z=async(t,{action:e,path:n,previousPath:r,data:i})=>{let o;return e==="move"&&r&&(o=await gz({rootDirHandle:t,previousPath:r,path:n})),["create","update","move"].includes(e)&&i?mz({rootDirHandle:t,fileHandle:o,path:n,data:i}):(e==="delete"&&await bz({rootDirHandle:t,path:n}),null)},OC=async(t,e)=>{const n=await Promise.all(e.map(async r=>{const{path:i,data:o}=r;let s=null;if(t)try{s=await _z(t,r)}catch(a){console.error(a)}if(!s){if(o===void 0)return null;s=Z_(o)}return[i,{file:s,sha:await nl(s)}]}));return{sha:await nl(new Date().toJSON()),files:Object.fromEntries(n.filter(r=>!!r))}},IC="local",yz="Local Repository";let ab;const wz={service:"",label:"",owner:"",repo:"",branch:""},RC=new Proxy({},{get:(t,e)=>(ab??wz)[e]}),lb="root_dir_handle";let Vh,$y;const xz=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Vh?.get(lb)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Vh?.set(lb,n))),n},kz=()=>{const{name:t}=oe(Ct).backend;ab=uf[t]?.init?.();const{databaseName:e}=ab??{};return Vh=e?new fo(e,"file-system-handles"):null,RC},Sz=async({auto:t=!1})=>{const e=await xz({showPicker:!t});if(e)$y=e;else throw new Error("Directory handle could not be acquired");return{backendName:IC}},Ez=async()=>{await Vh?.delete(lb)},Tz=async()=>{await NC($y)},$z=async t=>OC($y,t),Cz={isGit:!1,name:IC,label:yz,repository:RC,init:kz,signIn:Sz,signOut:Ez,fetchFiles:Tz,commitChanges:$z},Az="sveltia-cms-test",DC="test-repo",Pz="Test";let Hh;const Lz=()=>{},Nz=async()=>{try{Hh=await Cd(await navigator.storage.getDirectory(),Az)}catch{}return{backendName:DC}},Oz=async()=>{},Iz=async()=>{Hh?await NC(Hh):eu.set(!0)},Rz=async t=>OC(Hh,t),Dz={isGit:!1,name:DC,label:Pz,init:Lz,signIn:Nz,signOut:Oz,fetchFiles:Iz,commitChanges:Rz},od="gitea",MC="Gitea / Forgejo",q0="https://gitea.com/api/v1",Mz="https://gitea.com",Fz="login/oauth/authorize",zz=1.24,jz=12,Fn=ot();Fn.subscribe(t=>{(async()=>{try{t?await pi.set("sveltia-cms.user",t):t===null&&await pi.delete("sveltia-cms.user")}catch{}})()});const lf=async(t,e={},{responseType:n="json",refreshAccessToken:r=void 0}={})=>{let i;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Bt(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{i=await fetch(t,e)}catch(u){throw new Error("Failed to send the request",{cause:u})}if(n==="raw")return i;const{ok:o,status:s}=i;let a;try{if(o&&n==="blob")return i.blob();if(o&&n==="text")return i.text();a=await i.json()}catch(u){throw new Error("Failed to parse the response",{cause:u})}if(o&&!(t.endsWith("/graphql")&&Bt(a)&&a.errors))return a;if(s===401&&r){const[u]=e.headers.get("Authorization")?.split(" ")??["token"],{token:d}=await r();return e.headers.set("Authorization",`${u} ${d}`),lf(t,e,{responseType:n})}if(!Bt(a))throw new Error("Server responded with an error",{cause:{status:s}});let c="";throw typeof a.error=="string"&&(c=a.error),typeof a.message=="string"&&(c=a.message),Array.isArray(a.errors)&&(typeof a.errors[0]=="string"&&(c=a.errors.join(", ")),Bt(a.errors[0])&&typeof a.errors[0].message=="string"&&(c=a.errors.map(u=>u.message).join(", "))),new Error("Server responded with an error",{cause:{status:s,message:c}})},Uz={clientId:"",authScope:"",authURL:"",tokenURL:"",authScheme:"token",restBaseURL:"",graphqlBaseURL:""},Tl={...Uz},cf={},Bz=async({clientId:t,tokenURL:e,refreshToken:n})=>{let r,i="";try{r=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",client_id:t,refresh_token:n})})}catch{}if(!r?.ok)throw new Error(oe(ue)("sign_in_error.TOKEN_REFRESH_FAILED"));return{access_token:i,refresh_token:n}=await r.json(),Fn.update(o=>o&&{...o,token:i,refreshToken:n}),{token:i,refreshToken:n}},ir=async(t,{method:e="GET",headers:n={},body:r=null,isGraphQL:i=!1,responseType:o="json",token:s=void 0,refreshToken:a=void 0}={})=>{const{clientId:c,tokenURL:u,restBaseURL:d,graphqlBaseURL:f,authScheme:h="token"}=Tl,p=oe(Fn),g=i?f:d;return s??=p?.token,a??=p?.refreshToken,n.Authorization=`${h} ${s}`,lf(`${g}${t}`,{method:e,headers:n,body:r},{responseType:o,refreshAccessToken:a?()=>Bz({clientId:c,tokenURL:u,refreshToken:a}):void 0})},As=async(t,e={})=>{t=t.replace(/\n\s*/g," "),Object.entries(cf).forEach(([r,i])=>{t.includes(`$${r}`)&&(e[r]??=i)});const{data:n}=await ir("",{method:"POST",body:{query:t,variables:e},isGraphQL:!0});return n},qz=async({token:t,refreshToken:e})=>{const{id:n,full_name:r,login:i,email:o,avatar_url:s,html_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(Fn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:od,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},FC=ot(!1),Vz=({authURL:t})=>{const{availHeight:r,availWidth:i}=window.screen,o=r/2-800/2,s=i/2-600/2;return window.open(t,"auth",`width=600,height=800,top=${o},left=${s}`)},zC=async({backendName:t,authURL:e})=>{const n=Vz({authURL:e});return new Promise((r,i)=>{const o=t==="github"?setInterval(()=>{n?.closed&&(clearInterval(o),i(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,s=({origin:a,data:c})=>{if(a!==new URL(e).origin||typeof c!="string")return;const u=t;if(c===`authorizing:${u}`){n?.postMessage(c,a);return}const{result:d}=c.match(`^authorization:${u}:(success|error):(?<result>.+)`)?.groups??{};let f;try{f=d?JSON.parse(d):{error:"No data"},Bt(f)||(f={error:"Malformed data"})}catch{f={error:"Malformed data"}}"token"in f?r(f):i(new Error("Authentication failed",{cause:new Error(f.errorCode?oe(ue)(`sign_in_error.${f.errorCode}`,{default:f.error}):f.error)})),window.removeEventListener("message",s),clearInterval(o),n?.close()};window.addEventListener("message",s)})},Hz=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{const{hostname:i}=window.location;e??=i==="localhost"?"cms.netlify.com":i;try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const o=new URLSearchParams({provider:t,site_id:e,scope:r});return zC({backendName:t,authURL:`${n}?${o}`})},Kz=async()=>{const t=`${Nv()}${Nv()}`,e=btoa(await Za(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Si().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},Gz=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:o,codeChallenge:s}=await Kz(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:s,code_challenge_method:"S256"});return await pi.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:o,realAuthURL:`${n}?${d}`}),await pi.set("sveltia-cms.user",{backendName:t}),zC({backendName:t,authURL:u})},Kf=({provider:t="unknown",token:e,refreshToken:n,error:r,errorCode:i})=>{const o=r?"error":"success",s=r?{provider:t,error:r,errorCode:i}:{provider:t,token:e,refreshToken:n};window.addEventListener("message",({data:a,origin:c})=>{a===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${o}:${JSON.stringify(s)}`,c)}),window.opener?.postMessage(`authorizing:${t}`,"*")},Wz=async({backendName:t,clientId:e,tokenURL:n,code:r,state:i})=>{const{origin:o,pathname:s}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await pi.get("sveltia-cms.auth")??{},u=t,d=`${o}${s}`;if(await pi.delete("sveltia-cms.auth"),!a||!c||i!==a)return Kf({provider:u,error:oe(ue)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="",g="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:e,code:r,redirect_uri:d,code_verifier:c})})}catch{}if(!f)return Kf({provider:u,error:oe(ue)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,refresh_token:p,error:g}=await f.json())}catch{return Kf({provider:u,error:oe(ue)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return Kf({provider:u,token:h,refreshToken:p,error:g})},Yz=async({backendName:t,clientId:e,tokenURL:n})=>{FC.set(!0);const{search:r}=window.location,{code:i,state:o}=Object.fromEntries(new URLSearchParams(r));if(i&&o)await Wz({backendName:t,clientId:e,tokenURL:n,code:i,state:o});else{const{realAuthURL:s}=await pi.get("sveltia-cms.auth")??{};s&&(window.location.href=s)}},Jz=async({auto:t,apiConfig:e})=>{const{backend:n}=oe(Ct),{name:r,site_domain:i,auth_type:o}=n,{clientId:s,authScope:a,authURL:c,tokenURL:u}=e,d={backendName:r,authURL:c,scope:a};if(r==="gitea"||o==="pkce"){const f=window.opener?.origin===window.location.origin&&window.name==="auth";return f&&await Yz({backendName:r,clientId:s,tokenURL:u}),f||t?void 0:Gz({...d,clientId:s})}if(!t)return Hz({...d,siteDomain:i})},Cy=async({options:{token:t,refreshToken:e,auto:n=!1},apiConfig:r})=>{if(!t){const i=await Jz({auto:n,apiConfig:r});if(!i)return;({token:t,refreshToken:e}=i)}return{token:t,refreshToken:e}},Xz=t=>{const{origin:e}=new URL(t);return`${e}/user/settings/applications`},Zz=async t=>{const{token:e,refreshToken:n}=await Cy({options:t,apiConfig:Tl})??{};if(e)return qz({token:e,refreshToken:n})},Qz=async()=>{},Ay={service:"",label:"",owner:"",repo:"",branch:"",repoURL:"",treeBaseURL:"",blobBaseURL:"",isSelfHosted:!1,databaseName:""},Py=(t,e)=>`${t==="https://api.github.com"?"https://github.com":t.replace(/\/api(?:\/v\d+)?(?:\/.*)?/,"")}/${e}`,ni={...Ay};let V0=null;const jC=(t,e)=>({treeBaseURL:e?`${t}/src/branch/${e}`:t,blobBaseURL:e?`${t}/src/branch/${e}`:""}),UC=async()=>{const{owner:t,repo:e}=ni;return V0??=await ir(`/repos/${t}/${e}`),V0},ej=async()=>{const{repo:t}=ni;try{const{permissions:e}=await UC();if(!e?.pull)throw new Error("Not a collaborator of the repository",{cause:new Error(oe(ue)("repository_no_access",{values:{repo:t}}))})}catch(e){throw e instanceof Error&&e.message.includes("Not a collaborator")?e:new Error("Failed to check repository access",{cause:new Error(oe(ue)("repository_not_found",{values:{repo:t}}))})}},tj=async()=>{const{repo:t,repoURL:e=""}=ni;try{const{default_branch:n}=await UC();if(!n)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(oe(ue)("repository_empty",{values:{repo:t}}))});return Object.assign(ni,{branch:n},jC(e,n)),n}catch{throw new Error("Failed to retrieve the default branch name.",{cause:new Error(oe(ue)("repository_not_found",{values:{repo:t}}))})}},nj={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},Ly=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{commit_messages:i={},skip_ci:o,automatic_deployments:s}=oe(Ct)?.backend??{},{email:a="",login:c="",name:u=""}=oe(Fn),[d=""]=t.map(m=>m.slug).filter(Boolean),[f,...h]=t.map(({path:m})=>m),p=n?ws(n,{useSingular:!0}):"";let g=i[e]||nj[e]||"";return["create","update","delete"].includes(e)&&(g=g.replaceAll("{{slug}}",d).replaceAll("{{collection}}",p).replaceAll("{{path}}",f).replaceAll("{{author-email}}",a).replaceAll("{{author-login}}",c).replaceAll("{{author-name}}",u)),["uploadMedia","deleteMedia"].includes(e)&&(g=g.replaceAll("{{path}}",f).replaceAll("{{author-email}}",a).replaceAll("{{author-login}}",c).replaceAll("{{author-name}}",u),h.length&&(g+=` +${h.length}`)),["openAuthoring"].includes(e)&&(g=g.replaceAll("{{message}}",e).replaceAll("{{author-email}}",a).replaceAll("{{author-login}}",c).replaceAll("{{author-name}}",u)),!["delete","deleteMedia"].includes(e)&&(r??(o===!0||s===!1))&&(g=`[skip ci] ${g}`),g},rj=async()=>{const{owner:t,repo:e,branch:n}=ni;try{const{commit:{id:r,message:i}}=await ir(`/repos/${t}/${e}/branches/${n}`);return{hash:r,message:i}}catch{throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(oe(ue)("branch_not_found",{values:{repo:e,branch:n}}))})}},ij=async(t,e)=>{const{owner:n,repo:r,branch:i}=ni,o=Ly(t,e),{name:s,email:a}=oe(Fn),c=new Date().toJSON(),u=await Promise.all(t.map(async({action:h,path:p,previousPath:g,previousSha:m,data:v=""})=>({operation:h==="move"?"update":h,path:p,content:await w_(v),from_path:g,sha:m}))),{commit:d,files:f}=await ir(`/repos/${n}/${r}/contents`,{method:"POST",body:{branch:i,author:{name:s,email:a},committer:{name:s,email:a},dates:{author:c,committer:c},message:o,files:u}});return{sha:d.sha,date:new Date(d.created),files:Object.fromEntries(f.map((h,p)=>[h?.path??t[p].path,{sha:h?.sha??""}]))}},BC={isForgejo:!1},oj=async()=>{const{version:t}=await ir("/version"),e=Number.parseFloat(t),n=e>10,r=n?"Forgejo":"Gitea",i=n?jz:zz;if(Object.assign(BC,{isForgejo:n}),Object.assign(ni,{label:r}),e<i)throw new Error(`Unsupported ${r} version`,{cause:new Error(oe(ue)("backend_unsupported_version",{values:{name:r,version:i}}))})},sj=async({metaDB:t,lastHash:e,cachedFileEntries:n,fetchFileList:r})=>{const i=await t.get("last_commit_hash"),o=await t.get("git_config_fetched");if(i&&i===e&&o&&n.length)return sb(n.map(([a,c])=>({path:a,name:gn(a).basename,...c})));const s=sb(await r(e));return t.set("last_commit_hash",e),t.set("git_config_fetched",!0),s},aj=({allFiles:t,cachedFiles:e})=>{t.forEach(({sha:n,path:r},i)=>{e[r]?.sha===n&&Object.assign(t[i],e[r])})},_m=({fileInfo:t,fetchedFileMap:e})=>{const{meta:n,size:r,text:i}=e[t.path]??{};return{...t,size:t.size??r,text:t.text??i,meta:t.meta??n}},lj=t=>{const{name:e,meta:n={},...r}=t,i=su(e);return{...r,...n,name:e,kind:i}},H0=({entries:t,assets:e,configFiles:n,errors:r=[]})=>{Ai.set(t),Bn.set(e),by.set(n),V_.set(r),eu.set(!0)},cj=async({cacheDB:t,allFiles:e,cachedFiles:n,fetchingFiles:r,fetchedFileMap:i})=>{const o=e.map(({path:a})=>a),s=Object.keys(n).filter(a=>!o.includes(a));r.length&&await t.saveEntries(Object.entries(i)),s.length&&t.deleteEntries(s)},Ny=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:o,branch:s}=t,a=new fo(o,"meta"),c=new fo(o,"file-cache"),u=await c.entries();let d=s;d||(d=await e(),t.branch=d);const{hash:f,message:h}=await n(),p=await sj({metaDB:a,lastHash:f,cachedFileEntries:u,fetchFileList:r});if(Gh.set(!h.startsWith("[skip ci]")),!p.count){H0({entries:[],assets:[],configFiles:[]});return}const{entryFiles:g,assetFiles:m,configFiles:v,allFiles:_}=p,y=Object.fromEntries(u);aj({allFiles:_,cachedFiles:y});const w=_.filter(({meta:T})=>!T),x=w.length?await i(w):{},{entries:E,errors:$}=await $C(g.map(T=>_m({fileInfo:T,fetchedFileMap:x}))),C=m.map(T=>lj(_m({fileInfo:T,fetchedFileMap:x}))),k=v.map(T=>_m({fileInfo:T,fetchedFileMap:x}));H0({entries:E,assets:C,configFiles:k,errors:$}),await cj({cacheDB:c,allFiles:_,cachedFiles:y,fetchingFiles:w,fetchedFileMap:x})},uj=async t=>{const{owner:e,repo:n,branch:r}=ni,i=`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`,o=[];let s=1;for(;;){const{tree:a,truncated:c}=await ir(`${i}&page=${s}`);if(a&&o.push(...a),a&&c)s+=1;else break}return o.filter(({type:a})=>a==="blob").map(({path:a,sha:c,size:u})=>({path:a,sha:c,size:u,name:gn(a).basename}))},dj=async(t,e)=>{const n=await Promise.all(t.map(async({path:r,sha:i,size:o},s)=>{const a=e[s],c={sha:i,size:o??0,text:a?.content&&a.encoding==="base64"?await lI(a.content):"",meta:{}};return[r,c]}).filter(r=>!!r));return Object.fromEntries(n)},fj=async t=>{const{owner:e,repo:n,branch:r}=ni,{isForgejo:i}=BC,o=i?`/repos/${e}/${n}/git/blobs`:`/repos/${e}/${n}/file-contents?ref=${r}`,s=i?"sha":"path",a=t.filter(({type:f})=>f!=="asset").map(({[s]:f})=>f);if(!a.length)return{};const c=[],u=[...a];Ro.set(0);const{default_paging_num:d=30}=await ir("/settings/api");for(;;){const f=u.splice(0,d),h=await(i?ir(`${o}?shas=${f.join(",")}`):ir(o,{method:"POST",body:{files:f}}));if(c.push(...h),Ro.set(Math.ceil((a.length-u.length)/a.length*100)),!u.length)break}return Ro.set(void 0),dj(t,c)},hj=async()=>{await oj(),await ej(),await Ny({repository:ni,fetchDefaultBranchName:tj,fetchLastCommit:rj,fetchFileList:uj,fetchFileContents:fj})},pj=async t=>{const{owner:e,repo:n,branch:r}=ni,{path:i}=t;return ir(`/repos/${e}/${n}/media/${r}/${encodeURI(i)}`,{responseType:"blob"})},cb="sveltia-cms.prefs",ub=ot(),ft=ot({},t=>{ub.set(void 0),(async()=>{try{const e=await pi.get(cb)??{};e.apiKeys??={},e.useDraftBackup??=!0,e.closeOnSave??=!0,e.closeWithEscape??=!0,e.underlineLinks??=!0,e.beta??=!1,e.devModeEnabled??=!1,e.defaultTranslationService??="google",t(e)}catch{ub.set({type:"permission_denied"})}})()});ft.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{pn(t,await pi.get(cb))||await pi.set(cb,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,beta:i=!1,devModeEnabled:o=!1}=t;e&&oe(zT).includes(e)&&qt.set(e);const s=!n||n==="auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?a:n,autoTheming:s,underlineLinks:r,beta:i,devMode:o})});const gj=()=>{const{backend:t}=oe(Ct)??{};if(t?.name!==od)return;const{repo:e,branch:n,base_url:r=Mz,auth_endpoint:i=Fz,app_id:o="",api_root:s=q0}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${an(r)}/${an(i)}`,f=Py(s,u);return Object.assign(ni,{service:od,label:MC,owner:a,repo:c,branch:n,repoURL:f,newPatURL:Xz(f),databaseName:`${od}:${u}`,isSelfHosted:s!==q0},jC(f,n)),Object.assign(Tl,{clientId:o,authScope:"read:repository,write:repository,read:user",authURL:d,tokenURL:d.replace("/authorize","/access_token"),restBaseURL:an(s)}),oe(ft).devModeEnabled&&console.info("repositoryInfo",ni),ni},mj={isGit:!0,name:od,label:MC,repository:ni,init:gj,signIn:Zz,signOut:Qz,fetchFiles:hj,fetchBlob:pj,commitChanges:ij},sd="github",qC="GitHub",Kh="https://api.github.com",vj="https://api.netlify.com",bj="auth",_j="https://github.com",yj="login/oauth/authorize",wj=t=>(t=an(t),t===Kh||t.endsWith("/api/v3")?t:t.endsWith("/api")?`${t}/v3`:`${t}/api/v3`),xj=t=>(t=an(t),t===Kh?`${t}/graphql`:t.endsWith("/graphql")?t:t.endsWith("/api/v3")?t.replace("/api/v3","/graphql"):t.endsWith("/api")?`${t}/graphql`:`${t}/api/graphql`),kj=async({token:t,refreshToken:e})=>{const{id:n,name:r,login:i,email:o,avatar_url:s,html_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(Fn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:sd,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},Sj=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",contents:"write"});return`${e}/settings/personal-access-tokens/new?${n}`},Ej=async t=>{const{token:e,refreshToken:n}=await Cy({options:t,apiConfig:Tl})??{};if(e)return kj({token:e,refreshToken:n})},Tj=async()=>{},Ei={...Ay},VC=(t,e)=>({treeBaseURL:e?`${t}/tree/${e}`:t,blobBaseURL:e?`${t}/blob/${e}`:""}),$j=async()=>{const{owner:t,repo:e}=Ei,n=oe(Fn)?.login,{ok:r}=await ir(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(oe(ue)("repository_no_access",{values:{repo:e}}))})},Cj=`
|
|
231
231
|
query($owner: String!, $repo: String!) {
|
|
232
232
|
repository(owner: $owner, name: $repo) {
|
|
233
233
|
defaultBranchRef {
|
|
@@ -292,7 +292,7 @@ ${s}`:o||s}function Q3(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(af(t)!=="ob
|
|
|
292
292
|
`),a.join("")}).join("")}
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
`,Rj=async(t,e)=>{const n=t.map(({path:r,sha:i,size:o},s)=>{const{author:{name:a,email:c,user:u},committedDate:d}=e[`commit_${s}`].target.history.nodes[0],f={sha:i,size:o,text:e[`content_${s}`]?.text,meta:{commitAuthor:{name:a,email:c,id:u?.id,login:u?.login},commitDate:new Date(d)}};return[r,f]});return Object.fromEntries(n)},Dj=async t=>{const e=structuredClone(t),n=[],r=250,i={};Ro.set(0);const o=window.setInterval(()=>{Ro.update((s=0)=>s+1)},e.length/10);for(let s=0;s<e.length;s+=r)n.push(e.slice(s,s+r));return await Promise.all(n.map(async(s,a)=>{await Nt(a*500);const c=await As(Ij(s,a*r));Object.assign(i,c.repository)})),window.clearInterval(o),Ro.set(void 0),Rj(e,i)},Mj=async()=>{await $j(),await Ny({repository:Ei,fetchDefaultBranchName:Aj,fetchLastCommit:HC,fetchFileList:Oj,fetchFileContents:Dj})},Fj=async t=>{const{owner:e,repo:n}=Ei,{sha:r,path:i}=t,o=await ir(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"},responseType:"raw"});return o.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await o.text()],{type:Cs.getType(i)??"text/plain"}):o.blob()},zj="https://www.githubstatus.com/",jj="https://www.githubstatus.com/api/v2/status.json",Uj=async()=>{try{const{status:{indicator:t}}=await lf(jj);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},Bj=()=>{const{backend:t}=oe(Ct)??{};if(t?.name!==sd)return;const{repo:e,branch:n,auth_type:r="",base_url:i=r==="pkce"?_j:vj,auth_endpoint:o=r==="pkce"?yj:bj,app_id:s="",api_root:a=Kh,graphql_api_root:c=a}=t,[u,d]=e.split("/"),f=`${u}/${d}`,h=`${an(i)}/${an(o)}`,p=Py(a,f);return Object.assign(Ei,{service:sd,label:qC,owner:u,repo:d,branch:n,repoURL:p,newPatURL:Sj(p),databaseName:`${sd}:${f}`,isSelfHosted:a!==Kh},VC(p,n)),Object.assign(Tl,{clientId:s,authScope:"repo,user",authURL:h,tokenURL:h.replace("/authorize","/access_token"),restBaseURL:wj(a),graphqlBaseURL:xj(c)}),Object.assign(cf,{owner:u,repo:d,branch:n}),oe(ft).devModeEnabled&&console.info("repositoryInfo",Ei),Ei},qj={isGit:!0,name:sd,label:qC,repository:Ei,statusDashboardURL:zj,checkStatus:Uj,init:Bj,signIn:Ej,signOut:Tj,fetchFiles:Mj,fetchBlob:Fj,commitChanges:Lj,triggerDeployment:Nj},ad="gitlab",KC="GitLab",K0="https://gitlab.com/api/v4",Vj="https://gitlab.com",Hj="oauth/authorize",Kj=async({token:t,refreshToken:e})=>{const{id:n,name:r,username:i,email:o,avatar_url:s,web_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(
|
|
295
|
+
`,Rj=async(t,e)=>{const n=t.map(({path:r,sha:i,size:o},s)=>{const{author:{name:a,email:c,user:u},committedDate:d}=e[`commit_${s}`].target.history.nodes[0],f={sha:i,size:o,text:e[`content_${s}`]?.text,meta:{commitAuthor:{name:a,email:c,id:u?.id,login:u?.login},commitDate:new Date(d)}};return[r,f]});return Object.fromEntries(n)},Dj=async t=>{const e=structuredClone(t),n=[],r=250,i={};Ro.set(0);const o=window.setInterval(()=>{Ro.update((s=0)=>s+1)},e.length/10);for(let s=0;s<e.length;s+=r)n.push(e.slice(s,s+r));return await Promise.all(n.map(async(s,a)=>{await Nt(a*500);const c=await As(Ij(s,a*r));Object.assign(i,c.repository)})),window.clearInterval(o),Ro.set(void 0),Rj(e,i)},Mj=async()=>{await $j(),await Ny({repository:Ei,fetchDefaultBranchName:Aj,fetchLastCommit:HC,fetchFileList:Oj,fetchFileContents:Dj})},Fj=async t=>{const{owner:e,repo:n}=Ei,{sha:r,path:i}=t,o=await ir(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"},responseType:"raw"});return o.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await o.text()],{type:Cs.getType(i)??"text/plain"}):o.blob()},zj="https://www.githubstatus.com/",jj="https://www.githubstatus.com/api/v2/status.json",Uj=async()=>{try{const{status:{indicator:t}}=await lf(jj);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},Bj=()=>{const{backend:t}=oe(Ct)??{};if(t?.name!==sd)return;const{repo:e,branch:n,auth_type:r="",base_url:i=r==="pkce"?_j:vj,auth_endpoint:o=r==="pkce"?yj:bj,app_id:s="",api_root:a=Kh,graphql_api_root:c=a}=t,[u,d]=e.split("/"),f=`${u}/${d}`,h=`${an(i)}/${an(o)}`,p=Py(a,f);return Object.assign(Ei,{service:sd,label:qC,owner:u,repo:d,branch:n,repoURL:p,newPatURL:Sj(p),databaseName:`${sd}:${f}`,isSelfHosted:a!==Kh},VC(p,n)),Object.assign(Tl,{clientId:s,authScope:"repo,user",authURL:h,tokenURL:h.replace("/authorize","/access_token"),restBaseURL:wj(a),graphqlBaseURL:xj(c)}),Object.assign(cf,{owner:u,repo:d,branch:n}),oe(ft).devModeEnabled&&console.info("repositoryInfo",Ei),Ei},qj={isGit:!0,name:sd,label:qC,repository:Ei,statusDashboardURL:zj,checkStatus:Uj,init:Bj,signIn:Ej,signOut:Tj,fetchFiles:Mj,fetchBlob:Fj,commitChanges:Lj,triggerDeployment:Nj},ad="gitlab",KC="GitLab",K0="https://gitlab.com/api/v4",Vj="https://gitlab.com",Hj="oauth/authorize",Kj=async({token:t,refreshToken:e})=>{const{id:n,name:r,username:i,email:o,avatar_url:s,web_url:a}=await ir("/user",{token:t,refreshToken:e}),c=oe(Fn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:ad,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},Gj=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",scopes:"api,read_user"});return`${e}/-/user_settings/personal_access_tokens?${n}`},Wj=async t=>{const{token:e,refreshToken:n}=await Cy({options:t,apiConfig:Tl})??{};if(e)return Kj({token:e,refreshToken:n})},Yj=async()=>{},so={...Ay},GC=(t,e)=>({treeBaseURL:e?`${t}/-/tree/${e}`:t,blobBaseURL:e?`${t}/-/blob/${e}`:""}),Jj=async()=>{const{owner:t,repo:e}=so,n=oe(Fn)?.id,{ok:r}=await ir(`/projects/${encodeURIComponent(`${t}/${e}`)}/members/all/${n}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(oe(ue)("repository_no_access",{values:{repo:e}}))})},Xj=`
|
|
296
296
|
query($fullPath: ID!) {
|
|
297
297
|
project(fullPath: $fullPath) {
|
|
298
298
|
repository {
|
|
@@ -392,15 +392,15 @@ ${s}`:o||s}function Q3(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(af(t)!=="ob
|
|
|
392
392
|
}.radio-group.svelte-4ctq6e [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-4ctq6e [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-4ctq6e [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-4ctq6e {display:contents;}`};function i5(t,e){se(e,!0),Ee(t,r5);let n=I(e,"hidden",3,!1),r=I(e,"disabled",3,!1),i=I(e,"readonly",3,!1),o=I(e,"required",3,!1),s=I(e,"invalid",3,!1),a=I(e,"orientation",3,"horizontal"),c=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","orientation","children","onChange"]);var u=n5(),d=p=>{e.onChange?.(p)};bt(u,()=>({...c,role:"radiogroup",class:`sui radio-group ${e.class??""} ${a()??""}`,tabindex:"-1",hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":s(),"aria-orientation":a(),onChange:d}),void 0,void 0,void 0,"svelte-4ctq6e");var f=F(u),h=F(f);Ue(h,()=>e.children??qe),la(u,p=>lu?.(p)),Z(()=>f.inert=r()),S(t,u),ae()}var o5=j('<label class="svelte-1lvppso"><!></label>'),s5=j("<span><!> <!></span>");const a5={hash:"svelte-1lvppso",code:'.radio.svelte-1lvppso {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-1lvppso :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-1lvppso :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-1lvppso :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-1lvppso :active button {background-color:var(--sui-active-background-color);}.radio.svelte-1lvppso :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-1lvppso button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-1lvppso button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-1lvppso button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-1lvppso button[aria-checked=true]::before {opacity:1;}.radio.svelte-1lvppso label:where(.svelte-1lvppso) {cursor:inherit;}'};function l5(t,e){const n=Vn();se(e,!0),Ee(t,a5);let r=I(e,"checked",7,!1),i=I(e,"hidden",3,!1),o=I(e,"disabled",3,!1),s=I(e,"name",3,void 0),a=I(e,"value",3,void 0),c=I(e,"valueType",3,void 0),u=I(e,"label",3,void 0),d=I(e,"group",15),f=at(e,["$$slots","$$events","$$legacy","checked","class","hidden","disabled","name","value","valueType","label","group","children","onChange","onSelect"]),h=ie(void 0);Me(()=>{typeof d()=="string"&&(d()===a()?r()||r(!0):r()&&r(!1))});var p=s5(),g=y=>{y.target.matches("button")||l(h)?.click()};bt(p,()=>({...f,role:"none",class:`sui radio ${e.class??""}`,hidden:i(),onclick:g,[Sr]:{disabled:o()}}),void 0,void 0,void 0,"svelte-1lvppso");var m=F(p);et(m,{role:"radio",get id(){return n},get hidden(){return i()},get disabled(){return o()},get name(){return s()},get value(){return a()},get valueType(){return c()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:y=>{y.preventDefault(),!(o()||r())&&(r(!0),typeof d()=="string"&&d(a()))},get onChange(){return e.onChange},get onSelect(){return e.onSelect},get element(){return l(h)},set element(y){K(h,y,!0)}});var v=z(m,2);{var _=y=>{var w=o5(),x=F(w);{var E=C=>{var k=X(),T=D(k);Ue(T,()=>e.children??qe),S(C,k)},$=C=>{var k=Fe();Z(()=>ne(k,u())),S(C,k)};q(x,C=>{e.children?C(E):C($,!1)})}Z(()=>Te(w,"id",`${n}-label`)),S(y,w)};q(v,y=>{(e.children||u())&&y(_)})}S(t,p),ae()}var c5=j('<div role="none" class="spinner svelte-r45grt"></div>'),u5=j("<!> <!>",1);const d5={hash:"svelte-r45grt",code:".spinner.svelte-r45grt {height:1px;}"};function Cl(t,e){se(e,!0),Ee(t,d5);let n=I(e,"itemChunkSize",3,25),r=ie(St(n())),i=ie(void 0);const o=b(()=>e.items.length>l(r)),s=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(l(o)?K(r,l(r)+n()):s.disconnect())});Me(()=>{l(i)&&s.observe(l(i))});var a=u5(),c=D(a);it(c,19,()=>e.items.slice(0,l(r)),(f,h)=>f[e.itemKey]??h,(f,h,p)=>{var g=X(),m=D(g);Ue(m,()=>e.renderItem,()=>l(h),()=>l(p)),S(f,g)});var u=z(c,2);{var d=f=>{var h=c5();xt(h,p=>K(i,p),()=>l(i)),S(f,h)};q(u,f=>{l(o)&&f(d)})}S(t,a),ae()}var f5=j('<div><span role="none" class="svelte-noabw0"><!></span> <!> <!></div>');const h5={hash:"svelte-noabw0",code:".search-bar.svelte-noabw0 {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-noabw0 {width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-noabw0 > span:where(.svelte-noabw0) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-noabw0 .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-noabw0 > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-noabw0 .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-noabw0 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-noabw0 input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}"};function ag(t,e){const n=Vn();se(e,!0),Ee(t,h5);const r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"value",15),a=I(e,"flex",3,!1),c=I(e,"hidden",3,!1),u=I(e,"disabled",3,!1),d=I(e,"readonly",3,!1),f=I(e,"required",3,!1),h=I(e,"invalid",3,!1),p=at(e,["$$slots","$$events","$$legacy","value","flex","class","hidden","disabled","readonly","required","invalid","children","searchIcon","closeIcon"]),g=ie(void 0);var v={focus:()=>{l(g)?.focus()}},_=f5();let y;var w=F(_),x=F(w);{var E=P=>{var L=X(),O=D(L);Ue(O,()=>e.searchIcon),S(P,L)},$=P=>{Ze(P,{name:"search"})};q(x,P=>{e.searchIcon?P(E):P($,!1)})}var C=z(w,2);qn(C,Yt(()=>p,{role:"searchbox",get id(){return n},get flex(){return a()},get hidden(){return c()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return h()},inputmode:"search",get element(){return l(g)},set element(P){K(g,P,!0)},get value(){return s()},set value(P){s(P)}}));var k=z(C,2);{var T=P=>{{const L=N=>{var M=X(),U=D(M);{var H=W=>{var Y=X(),R=D(Y);Ue(R,()=>e.closeIcon),S(W,Y)},G=W=>{Ze(W,{name:"close"})};q(U,W=>{e.closeIcon?W(H):W(G,!1)})}S(N,M)};let O=b(()=>r()("_sui.clear"));et(P,{iconic:!0,get"aria-label"(){return l(O)},get"aria-controls"(){return n},onclick:()=>{s(""),l(g)?.focus(),globalThis.requestIdleCallback(()=>{l(g)?.dispatchEvent(new KeyboardEvent("input")),l(g)?.dispatchEvent(new KeyboardEvent("keypress")),l(g)?.dispatchEvent(new KeyboardEvent("change"))})},startIcon:L,$$slots:{startIcon:!0}})}};q(k,P=>{s()&&P(T)})}Z(()=>{Te(_,"role",c()?void 0:"none"),y=cn(_,1,`sui search-bar ${e.class??""}`,"svelte-noabw0",y,{flex:a(),disabled:u(),readonly:d()}),Te(_,"hidden",c()),Te(_,"aria-hidden",c())}),S(t,_);var A=ae(v);return o(),A}var p5=j('<div><div role="none" class="label svelte-z2753f"><!></div></div>'),g5=j('<div role="alert" class="no-options svelte-z2753f"> </div>'),m5=j('<div role="none" class="combobox-inner svelte-z2753f"><!> <!> <!></div>'),v5=j("<div><!> <!></div> <!>",1);const b5={hash:"svelte-z2753f",code:`.combobox.svelte-z2753f {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-z2753f div[role=combobox]:where(.svelte-z2753f) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-z2753f div[role=combobox]:where(.svelte-z2753f):not(.selected) {font-style:italic;}.combobox.svelte-z2753f div[role=combobox]:where(.svelte-z2753f):is(:where(.svelte-z2753f):hover, :where(.svelte-z2753f):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-z2753f div[role=combobox][aria-invalid=true]:where(.svelte-z2753f) {border-color:var(--sui-error-border-color);}.combobox.svelte-z2753f div[role=combobox]:where(.svelte-z2753f) .label:where(.svelte-z2753f) {width:100%;}.combobox.svelte-z2753f .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-z2753f > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-z2753f > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-z2753f > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-z2753f :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-z2753f .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-z2753f input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-z2753f + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
|
|
393
393
|
/* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-z2753f + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-z2753f {display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-z2753f .sui.search-bar {flex:none;}.combobox-inner.svelte-z2753f .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-z2753f .no-options:where(.svelte-z2753f) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`};function _5(t,e){const n=Vn();se(e,!0),Ee(t,b5);const r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"value",15),a=I(e,"hidden",3,!1),c=I(e,"disabled",3,!1),u=I(e,"readonly",3,!1),d=I(e,"required",3,!1),f=I(e,"invalid",3,!1),h=I(e,"editable",3,!0),p=I(e,"position",3,"bottom-left"),g=I(e,"filterThreshold",3,5),m=at(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","editable","position","filterThreshold","children","chevronIcon","onChange"]);const v='[role="option"][aria-selected="true"]';let _=ie(!1),y=ie(void 0),w=ie(void 0),x=ie(void 0),E=ie(""),$=ie(!1),C=ie(""),k=ie(!0);const T=b(()=>l(y)??l(w)),A=()=>{const W=l(x)?.querySelector(v),Y=l(x)?.querySelector(`[role="option"][data-value="${s()}"]`);Y&&(K(E,Y.dataset.label||Y.dataset.value||Y.textContent||"",!0),W!==Y&&(W?.setAttribute("aria-selected","false"),Y.setAttribute("aria-selected","true")))},P=W=>{const Y=dA(W);s(Y.value),A(),e.onChange?.(new CustomEvent("Change",{detail:Y}))};Me(()=>{l(x)&&globalThis.requestAnimationFrame(()=>{const W=l(x)?.querySelector(v);W&&P(W)})}),Me(()=>{s(),A()});var L=v5(),O=D(L);bt(O,()=>({...m,role:"none",class:`sui combobox ${e.class??""}`,hidden:a(),[Sr]:{editable:h()}}),void 0,void 0,void 0,"svelte-z2753f");var N=F(O);{var M=W=>{var Y=p5();bt(Y,()=>({...m,role:"combobox",id:n,tabindex:c()?-1:0,"aria-controls":`${n}-popup`,"aria-expanded":l(_),"aria-hidden":a(),"aria-disabled":c(),"aria-readonly":u(),"aria-required":d(),"aria-invalid":f(),"aria-haspopup":"listbox",[Sr]:{selected:s()!==void 0}}),void 0,void 0,void 0,"svelte-z2753f");var R=F(Y),B=F(R);Pr(B,{children:(J,Q)=>{var ee=Fe();Z(te=>ne(ee,te),[()=>s()!==void 0?l(E):r()("_sui.combobox.select_an_option")]),S(J,ee)},$$slots:{default:!0}}),xt(Y,J=>K(y,J),()=>l(y)),S(W,Y)},U=W=>{{let Y=b(()=>s()===void 0?"":String(s()));qn(W,Yt(()=>m,{role:"combobox",get id(){return n},get value(){return l(Y)},get hidden(){return a()},get disabled(){return c()},get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return l(_)},"aria-haspopup":"listbox",get element(){return l(w)},set element(R){K(w,R,!0)}}))}};q(N,W=>{h()?W(U,!1):W(M)})}var H=z(N,2);{const W=B=>{var J=X(),Q=D(J);{var ee=re=>{var he=X(),pe=D(he);Ue(pe,()=>e.chevronIcon),S(re,he)},te=re=>{Ze(re,{name:"expand_more"})};q(Q,re=>{e.chevronIcon?re(ee):re(te,!1)})}S(B,J)};let Y=b(()=>!h()||u()||c()?-1:0),R=b(()=>l(_)?r()("_sui.collapse"):r()("_sui.expand"));et(H,{variant:"ghost",iconic:!0,get hidden(){return a()},get disabled(){return c()},get tabindex(){return l(Y)},get"aria-label"(){return l(R)},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return l(_)},onclick:B=>{B.preventDefault(),B.stopPropagation(),!c()&&!u()&&K(_,!l(_))},startIcon:W,$$slots:{startIcon:!0}})}var G=z(O,2);rg(G,{get id(){return`${n}-popup`},class:"combobox",get anchor(){return l(T)},get position(){return p()},touchOptimized:!0,onOpen:()=>{K($,g()===-1?!1:(l(x)?.querySelectorAll('[role="option"]')?.length??0)>g(),!0),K(C,"")},get content(){return l(x)},set content(W){K(x,W,!0)},get open(){return l(_)},set open(W){K(_,W,!0)},children:(W,Y)=>{var R=m5(),B=F(R);{var J=re=>{{let he=b(()=>r()("_sui.combobox.filter_options"));ag(re,{flex:!0,get"aria-label"(){return l(he)},get"aria-controls"(){return`${n}-listbox`},onkeydown:pe=>{["ArrowUp","ArrowDown","Enter"].includes(pe.key)&&(pe.preventDefault(),l(x)?.querySelector(".sui.listbox")?.dispatchEvent(new KeyboardEvent("keydown",pe)))},get value(){return l(C)},set value(pe){K(C,pe,!0)}})}};q(B,re=>{l($)&&re(J)})}var Q=z(B,2);uu(Q,{get id(){return`${n}-listbox`},class:"in-combobox",get searchTerms(){return l(C)},onclick:re=>{re.target.matches('[role="option"]')&&P(re.target)},onFilter:re=>{K(k,!!re.detail.matched)},children:(re,he)=>{var pe=X(),ce=D(pe);Ue(ce,()=>e.children??qe),S(re,pe)},$$slots:{default:!0}});var ee=z(Q,2);{var te=re=>{var he=g5(),pe=F(he);Z(ce=>ne(pe,ce),[()=>r()("_sui.combobox.no_matching_options")]),S(re,he)};q(ee,re=>{l(k)||re(te)})}S(W,R)},$$slots:{default:!0}}),S(t,L),ae(),o()}function Al(t,e){se(e,!0);let n=I(e,"value",15),r=I(e,"hidden",3,!1),i=I(e,"disabled",3,!1),o=I(e,"readonly",3,!1),s=I(e,"required",3,!1),a=I(e,"invalid",3,!1),c=at(e,["$$slots","$$events","$$legacy","value","class","hidden","disabled","readonly","required","invalid","children","onChange"]);_5(t,Yt(()=>c,{get class(){return`sui select ${e.class??""}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return o()},get required(){return s()},get invalid(){return a()},get onChange(){return e.onChange},editable:!1,get value(){return n()},set value(u){n(u)},children:(u,d)=>{var f=X(),h=D(f);Ue(h,()=>e.children??qe),S(u,f)},$$slots:{default:!0}})),ae()}var y5=j('<span role="none" class="svelte-ufzad0"> <!></span>'),w5=j('<div role="none"><!> <!></div>');const x5={hash:"svelte-ufzad0",code:".select-tags.svelte-ufzad0 {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-ufzad0 {pointer-events:none;}.select-tags.disabled.svelte-ufzad0 > :where(.svelte-ufzad0) {opacity:0.5;}.select-tags.svelte-ufzad0 span:where(.svelte-ufzad0) {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);}.select-tags.svelte-ufzad0 span:where(.svelte-ufzad0) .icon {font-size:var(--sui-font-size-large);}"};function k5(t,e){se(e,!0),Ee(t,x5);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"values",31,()=>St([])),s=I(e,"max",3,void 0),a=I(e,"hidden",3,!1),c=I(e,"disabled",3,!1),u=I(e,"readonly",3,!1),d=I(e,"required",3,!1),f=I(e,"invalid",3,!1),h=at(e,["$$slots","$$events","$$legacy","values","options","max","class","hidden","disabled","readonly","required","invalid","children","onAddValue","onRemoveValue"]),p=ie(void 0);var g=w5();let m;var v=F(g);it(v,17,o,dr,(w,x)=>{const E=b(()=>e.options.find(T=>T.value===l(x)));var $=X(),C=D($);{var k=T=>{var A=y5(),P=F(A),L=z(P);{const O=U=>{Ze(U,{name:"close"})};let N=b(()=>c()||u()),M=b(()=>n()("remove_x",{values:{name:l(E).label}}));et(L,{iconic:!0,size:"small",get disabled(){return l(N)},get"aria-label"(){return l(M)},onclick:()=>{o(o().filter(U=>U!==l(x))),e.onRemoveValue?.(new CustomEvent("RemoveValue",{detail:{value:l(x)}}))},startIcon:O,$$slots:{startIcon:!0}})}Z(()=>ne(P,`${l(E).label??""} `)),S(T,A)};q(C,T=>{l(E)&&T(k)})}S(w,$)});var _=z(v,2);{var y=w=>{{let x=b(()=>c()||u());Al(w,Yt(()=>h,{get disabled(){return l(x)},get readonly(){return u()},get required(){return d()},get invalid(){return f()},onChange:()=>{l(p)&&(o([...o(),l(p)]),e.onAddValue?.(new CustomEvent("AddValue",{detail:{value:l(p)}})),K(p,void 0))},get value(){return l(p)},set value(E){K(p,E,!0)},children:(E,$)=>{var C=X(),k=D(C);it(k,17,()=>e.options,({label:T,value:A,searchValue:P})=>A,(T,A)=>{let P=()=>l(A).label,L=()=>l(A).value,O=()=>l(A).searchValue;var N=X(),M=D(N);{var U=H=>{Tr(H,{get label(){return P()},get value(){return L()},get searchValue(){return O()}})};q(M,H=>{o().includes(L())||H(U)})}S(T,N)}),S(E,C)},$$slots:{default:!0}}))}};q(_,w=>{(typeof s()!="number"||o().length<s())&&o().length<e.options.length&&w(y)})}Z(()=>{m=cn(g,1,`sui select-tags ${e.class??""}`,"svelte-ufzad0",m,{disabled:c()||u()}),Te(g,"hidden",a())}),S(t,g),ae(),i()}var S5=j('<div role="slider" class="svelte-1f4xqtk"></div>'),E5=j('<span role="none" class="label svelte-1f4xqtk"> </span>'),T5=j('<div><div role="none" class="base svelte-1f4xqtk"><div role="none" class="base-bar svelte-1f4xqtk"></div> <div class="slider-bar svelte-1f4xqtk"></div> <div role="slider" class="svelte-1f4xqtk"></div> <!> <!></div></div>');const $5={hash:"svelte-1f4xqtk",code:".slider.svelte-1f4xqtk {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-1f4xqtk:hover .base-bar:where(.svelte-1f4xqtk) {background-color:var(--sui-hover-background-color);}.slider.svelte-1f4xqtk:active .base-bar:where(.svelte-1f4xqtk) {background-color:var(--sui-active-background-color);}.base.svelte-1f4xqtk {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-1f4xqtk {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-1f4xqtk {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-1f4xqtk .slider-bar:where(.svelte-1f4xqtk) {background-color:var(--sui-error-border-color);}[role=slider].svelte-1f4xqtk {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-1f4xqtk:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-1f4xqtk:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-1f4xqtk [role=slider]:where(.svelte-1f4xqtk) {border-color:var(--sui-error-border-color);}.label.svelte-1f4xqtk {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-1f4xqtk:dir(ltr) {transform:translateX(-50%);}.label.svelte-1f4xqtk:dir(rtl) {transform:translateX(50%);}"};function C5(t,e){se(e,!0),Ee(t,$5);const n=()=>V(sl,"$isRTL",r),[r,i]=me();let o=I(e,"value",15,0),s=I(e,"min",3,0),a=I(e,"max",3,100),c=I(e,"sliderLabel",3,""),u=I(e,"values",15,void 0),d=I(e,"sliderLabels",3,void 0),f=I(e,"step",3,1),h=I(e,"optionLabels",19,()=>[]),p=I(e,"hidden",3,!1),g=I(e,"disabled",3,!1),m=I(e,"readonly",3,!1),v=I(e,"invalid",3,!1),_=at(e,["$$slots","$$events","$$legacy","value","min","max","sliderLabel","values","sliderLabels","step","optionLabels","class","hidden","disabled","readonly","invalid","children","onChange"]);const y=b(()=>Array.isArray(u()));let w=ie(void 0),x=ie(0),E=ie(St([])),$=ie(St([])),C=ie(0),k=ie(0),T=St([0,0]),A=ie(!1),P=ie(0),L=ie(0);const O=ce=>{const ge=n()?l(x)-ce:ce;if(ge<0||ge>l(x))return;const Pe=l(E).findLastIndex(fe=>fe<=ge),xe=l(E).findIndex(fe=>ge<=fe),de=Math.abs(l(E)[Pe]-ge),we=Math.abs(l(E)[xe]-ge),ve=de<we?Pe:xe;T[l(L)]===l(E)[ve]||l(y)&&(l(L)===0&&T[1]<=l(E)[ve]||l(L)===1&&T[0]>=l(E)[ve])||(l(y)?(u(u()[l(L)]=l($)[ve],!0),u([...u()])):o(l($)[ve]))},N=(ce,ge=0)=>{const{key:Pe,ctrlKey:xe,metaKey:de,shiftKey:we,altKey:ve}=ce,fe=we||ve||xe||de;if(g()||m()||fe)return;const _e=l(y)?u()[ge]:o();let Ce=-1;const ze=n()?["ArrowDown","ArrowRight"]:["ArrowDown","ArrowLeft"],Ne=n()?["ArrowUp","ArrowLeft"]:["ArrowUp","ArrowRight"];if(ze.includes(Pe)&&(_e>s()&&(Ce=l($).indexOf(_e)-1),ce.preventDefault(),ce.stopPropagation()),Ne.includes(Pe)&&(_e<a()&&(Ce=l($).indexOf(_e)+1),ce.preventDefault(),ce.stopPropagation()),Ce>-1){if(l(y)&&(ge===0&&T[1]<=l(E)[Ce]||ge===1&&T[0]>=l(E)[Ce]))return;l(y)?(u(u()[ge]=l($)[Ce],!0),u([...u()])):o(l($)[Ce])}},M=ce=>{const{screenX:ge,pointerId:Pe}=ce;if(g()||m()||!l(A)||Pe!==l(P))return;ce.stopPropagation();const xe=ge-l(k),de=l(C)+xe;O(de)},U=ce=>{const{pointerId:ge}=ce;if(!(g()||m()||!l(A)||ge!==l(P))){if(ce.stopPropagation(),ce.target.matches(".base-bar, .slider-bar")){const Pe=l(w).getBoundingClientRect(),xe=ce.clientX-Pe.left;O(xe)}K(A,!1),K(C,0),K(k,0),K(P,0),K(L,0),document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",U),document.removeEventListener("pointercancel",U)}},H=(ce,ge=0)=>{const{clientX:Pe,screenX:xe,pointerId:de}=ce;if(g()||m())return;ce.stopPropagation(),K(A,!0);const we=l(w).getBoundingClientRect();K(C,Pe-we.left),K(k,xe,!0),K(P,de,!0),K(L,ge,!0),document.addEventListener("pointermove",M),document.addEventListener("pointerup",U),document.addEventListener("pointercancel",U)},G=()=>{if(l(y)){const[ce,ge]=u();T[0]=l(E)[l($).indexOf(ce)],T[1]=l(E)[l($).indexOf(ge)],e.onChange?.({values:u()})}else T[0]=l(E)[l($).indexOf(o())],e.onChange?.({value:o()})},W=()=>{if(!l(w))return;K(x,l(w).clientWidth,!0);const ce=(a()-s())/f()+1,ge=l(x)/(ce-1),Pe=Array.from({length:ce});K($,Pe.map((xe,de)=>de*f()+s(),10),!0),K(E,Pe.map((xe,de)=>de*ge),!0),G()};Ut(()=>{const ce=new ResizeObserver(()=>W()),ge=globalThis.matchMedia("(pointer: coarse)");return ce.observe(l(w)),ge.addEventListener("change",W),W(),()=>{ce.disconnect(),ge.removeEventListener("change",W)}}),Me(()=>{o(),u(),G()});var Y=T5();Xr("click",g_.body,()=>{K(A,!1)}),bt(Y,()=>({..._,role:"none",class:`sui slider ${e.class??""}`,hidden:p(),[Sr]:{disabled:g(),readonly:m(),invalid:v()}}),void 0,void 0,void 0,"svelte-1f4xqtk");var R=F(Y);R.__pointerdown=ce=>H(ce);var B=z(F(R),2);let J;var Q=z(B,2);Q.__pointerdown=ce=>H(ce,0),Q.__keydown=ce=>N(ce,0);let ee;var te=z(Q,2);{var re=ce=>{var ge=S5();ge.__pointerdown=xe=>H(xe,1),ge.__keydown=xe=>N(xe,1);let Pe;Z(()=>{Te(ge,"tabindex",g()?-1:0),Te(ge,"aria-label",d()?.[1]),Te(ge,"aria-hidden",p()),Te(ge,"aria-disabled",g()),Te(ge,"aria-readonly",m()),Te(ge,"aria-invalid",v()),Te(ge,"aria-valuemin",s()),Te(ge,"aria-valuemax",a()),Te(ge,"aria-valuenow",u()?.[1]),Pe=eo(ge,"",Pe,{"inset-inline-start":`${T[1]??""}px`})}),S(ce,ge)};q(te,ce=>{l(y)&&ce(re)})}var he=z(te,2);{var pe=ce=>{var ge=X(),Pe=D(ge);it(Pe,17,h,dr,(xe,de,we)=>{var ve=E5();let fe;var _e=F(ve);Z(()=>{fe=eo(ve,"",fe,{"inset-inline-start":`${l(x)/(h().length-1)*we}px`}),ne(_e,l(de))}),S(xe,ve)}),S(ce,ge)};q(he,ce=>{h().length&&ce(pe)})}xt(R,ce=>K(w,ce),()=>l(w)),Z(()=>{J=eo(B,"",J,{"inset-inline-start":`${(l(y)?T[0]:0)??""}px`,width:`${(l(y)?T[1]-T[0]:T[0])??""}px`}),Te(Q,"tabindex",g()?-1:0),Te(Q,"aria-label",l(y)?d()?.[0]:c()),Te(Q,"aria-hidden",p()),Te(Q,"aria-disabled",g()),Te(Q,"aria-readonly",m()),Te(Q,"aria-invalid",v()),Te(Q,"aria-valuemin",s()),Te(Q,"aria-valuemax",a()),Te(Q,"aria-valuenow",l(y)?u()?.[0]:o()),ee=eo(Q,"",ee,{"inset-inline-start":`${T[0]??""}px`})}),S(t,Y),ae(),i()}wl(["pointerdown","keydown"]);var A5=j('<button><span role="none" class="svelte-1bzujey"></span> <!></button>');const P5={hash:"svelte-1bzujey",code:'button.svelte-1bzujey {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-1bzujey:focus-visible {outline:0;}button.svelte-1bzujey:focus-visible span:where(.svelte-1bzujey) {outline-color:var(--sui-primary-accent-color-translucent);}button[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-1bzujey span:where(.svelte-1bzujey):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-1bzujey {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-1bzujey::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}'};function zy(t,e){se(e,!0),Ee(t,P5);let n=I(e,"checked",15),r=I(e,"label",3,void 0),i=I(e,"hidden",3,!1),o=I(e,"disabled",3,!1),s=I(e,"readonly",3,!1),a=I(e,"required",3,!1),c=I(e,"invalid",3,!1),u=at(e,["$$slots","$$events","$$legacy","checked","label","class","hidden","disabled","readonly","required","invalid","children","onChange"]);var d=A5(),f=()=>{!o()&&!s()&&(n(!n()),e.onChange?.(new CustomEvent("Change",{detail:{checked:n()}})))};bt(d,()=>({...u,role:"switch",class:`sui switch ${e.class??""}`,type:"button",hidden:i(),disabled:o()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":o(),"aria-readonly":s(),"aria-required":a(),"aria-invalid":c(),onclick:f}),void 0,void 0,void 0,"svelte-1bzujey");var h=z(F(d),2);{var p=m=>{var v=Fe();Z(()=>ne(v,r())),S(m,v)},g=m=>{var v=X(),_=D(v);Ue(_,()=>e.children??qe),S(m,v)};q(h,m=>{r()?m(p):m(g,!1)})}S(t,d),ae()}var L5=j("<div><!></div>");const N5={hash:"svelte-1lp1vmr",code:".table-cell.svelte-1lp1vmr {display:table-cell;}"};function t1(t,e){Ee(t,N5);let n=at(e,["$$slots","$$events","$$legacy","class","children"]);var r=L5();bt(r,()=>({...n,role:"cell",class:`sui table-cell ${e.class??""}`}),void 0,void 0,void 0,"svelte-1lp1vmr");var i=F(r);Ue(i,()=>e.children??qe),S(t,r)}var O5=j("<div><!></div>");const I5={hash:"svelte-93j29n",code:".table-row.svelte-93j29n {display:table-row;height:var(--sui-primary-row-height);}"};function R5(t,e){Ee(t,I5);let n=at(e,["$$slots","$$events","$$legacy","class","children"]);var r=O5();bt(r,()=>({...n,role:"row",class:`sui table-row ${e.class??""}`}),void 0,void 0,void 0,"svelte-93j29n");var i=F(r);Ue(i,()=>e.children??qe),S(t,r)}var D5=j("<div><!></div>");const M5={hash:"svelte-1url004",code:".table.svelte-1url004 {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-1url004 {border-collapse:collapse;}.table.data.svelte-1url004 :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}"};function F5(t,e){Ee(t,M5);let n=at(e,["$$slots","$$events","$$legacy","class","children"]);var r=D5();bt(r,()=>({...n,role:"table",class:`sui table ${e.class??""}`}),void 0,void 0,void 0,"svelte-1url004");var i=F(r);Ue(i,()=>e.children??qe),S(t,r)}var z5=j('<div><div role="none" class="inner svelte-11hz34g"><!></div> <div role="none" class="indicator svelte-11hz34g"></div></div>');const j5={hash:"svelte-11hz34g",code:".tab-list.svelte-11hz34g {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-11hz34g {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-11hz34g button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-11hz34g .indicator:where(.svelte-11hz34g) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-11hz34g {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-11hz34g button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-11hz34g .indicator:where(.svelte-11hz34g) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-11hz34g button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-11hz34g {display:contents;}.indicator.svelte-11hz34g {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}"};function U5(t,e){se(e,!0),Ee(t,j5);let n=I(e,"hidden",3,!1),r=I(e,"disabled",3,!1),i=I(e,"orientation",3,"horizontal"),o=I(e,"name",3,void 0),s=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","orientation","name","children","onChange"]),a=ie(void 0),c=ie(void 0);const u=()=>{globalThis.requestAnimationFrame(()=>{const v=l(a)?.querySelector('[role="tab"][aria-selected="true"]');if(v){const{offsetTop:_,offsetLeft:y,offsetWidth:w,offsetHeight:x}=v;K(c,Object.entries({top:_,left:y,width:w,height:x}).map(([E,$])=>`${E}: ${$}px`).join("; "),!0)}else K(c,void 0)})};Ut(()=>{const v=new ResizeObserver(()=>{u()});return v.observe(l(a)),()=>{v.disconnect()}});var d=z5(),f=()=>{u()},h=v=>{u(),e.onChange?.(v)};bt(d,()=>({...s,role:"tablist",class:`sui tab-list ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"data-name":o()||void 0,onInitialized:f,onChange:h}),void 0,void 0,void 0,"svelte-11hz34g");var p=F(d),g=F(p);Ue(g,()=>e.children??qe);var m=z(p,2);xt(d,v=>K(a,v),()=>l(a)),la(d,v=>lu?.(v)),Z(()=>{p.inert=r(),eo(m,l(c))}),S(t,d),ae()}var B5=j("<div><!></div>");const q5={hash:"svelte-edfv4a",code:".tab-panel.svelte-edfv4a {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-edfv4a, .tab-panel.svelte-edfv4a:not([aria-hidden]) {display:none;}"};function V5(t,e){Ee(t,q5);let n=at(e,["$$slots","$$events","$$legacy","class","children"]);var r=B5();bt(r,()=>({...n,role:"tabpanel",class:`sui tab-panel ${e.class??""}`}),void 0,void 0,void 0,"svelte-edfv4a");var i=F(r);Ue(i,()=>e.children??qe),S(t,r)}function H5(t,e){let n=I(e,"hidden",3,!1),r=I(e,"disabled",3,!1),i=I(e,"selected",3,!1),o=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","selected","children","startIcon","endIcon"]);et(t,Yt(()=>o,{role:"tab",get class(){return`sui tab ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:u=>{var d=X(),f=D(d);Ue(f,()=>e.startIcon??qe),S(u,d)},children:u=>{var d=X(),f=D(d);Ue(f,()=>e.children??qe),S(u,d)},endIcon:u=>{var d=X(),f=D(d);Ue(f,()=>e.endIcon??qe),S(u,d)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var K5=j('<div role="none" class="sui toast-base svelte-19bjr0g"></div> <div><!></div>',1);const G5={hash:"svelte-19bjr0g",code:".toast-base.svelte-19bjr0g {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-19bjr0g {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-19bjr0g {display:block;opacity:0;}.toast.top-left.svelte-19bjr0g {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-19bjr0g {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-19bjr0g:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-19bjr0g:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-19bjr0g {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-19bjr0g {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-19bjr0g {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-19bjr0g:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-19bjr0g:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-19bjr0g {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}"};function Yn(t,e){se(e,!0),Ee(t,G5);let n=I(e,"show",15,!1),r=I(e,"id",3,void 0),i=I(e,"duration",3,5e3),o=I(e,"position",7,"auto"),s=at(e,["$$slots","$$events","$$legacy","show","id","duration","position","children"]),a=ie(void 0),c=ie(void 0),u=ie(void 0),d=ie(0);Ut(()=>(K(c,document.querySelector(".sui.toast-base.enabled")??void 0,!0),l(c)?l(a)?.remove():(K(c,l(a),!0),l(c)&&(l(c).classList.add("enabled"),(document.querySelector(".sui.app-shell")??document.body).appendChild(l(c)),l(c).showPopover&&(l(c).popover="manual",l(c).showPopover()))),()=>{l(u)?.remove()})),Ut(()=>{if(o()==="auto"){const m=globalThis.matchMedia("(width < 1024px)"),v=()=>{o(m.matches?"bottom-center":`bottom-${document.dir==="rtl"?"left":"right"}`)};v(),m.addEventListener("change",v)}}),Me(()=>{l(c)&&l(u)&&l(c).appendChild(l(u))}),Me(()=>{r(),n(),i(),Se(()=>{globalThis.clearTimeout(l(d))}),n()&&i()&&K(d,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var f=K5(),h=D(f);xt(h,m=>K(a,m),()=>l(a));var p=z(h,2);bt(p,()=>({...s,class:`sui toast ${o()??""}`,"aria-hidden":!n()}),void 0,void 0,void 0,"svelte-19bjr0g");var g=F(p);Ue(g,()=>e.children??qe),xt(p,m=>K(u,m),()=>l(u)),S(t,f),ae()}function Be(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function gA(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const _o=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,W5=_o&&"documentMode"in document?document.documentMode:null,Zi=_o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),al=_o&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Jh=!(!_o||!("InputEvent"in window)||W5)&&"getTargetRanges"in new window.InputEvent("input"),Nd=_o&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Rc=_o&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Y5=_o&&/Android/.test(navigator.userAgent),mA=_o&&/^(?=.*Chrome).*/i.test(navigator.userAgent),n1=_o&&Y5&&mA,Od=_o&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Zi&&!mA;function vA(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}const J5=0,X5=1,Z5=2,bA=128,Q5=1,eq=2,tq=3,nq=4,rq=5,iq=6,lg=Nd||Rc||Od?" ":"",na=`
|
|
394
394
|
|
|
395
|
-
`,oq=al?" ":lg,_A="֑-߿יִ-﷽ﹰ-ﻼ",yA="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",sq=new RegExp("^[^"+yA+"]*["+_A+"]"),aq=new RegExp("^[^"+_A+"]*["+yA+"]"),ll={bold:1,capitalize:1024,code:16,highlight:bA,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},lq={directionless:1,unmergeable:2},r1={center:2,end:6,justify:4,left:1,right:3,start:5},cq={[eq]:"center",[iq]:"end",[nq]:"justify",[Q5]:"left",[tq]:"right",[rq]:"start"},uq={normal:0,segmented:2,token:1},dq={[J5]:"normal",[Z5]:"segmented",[X5]:"token"},i1="$config";function wA(t,e,n,r,i,o){let s=t.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&(ke(s)&&wA(s,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}let gb=!1,jy=0;function fq(t){jy=t.timeStamp}function ym(t,e,n){const r=t.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(t===i||r&&t.previousSibling===i)||r&&mg(t,n)!==void 0}function hq(t,e,n){const r=go(Vi(n));let i=null,o=null;r!==null&&r.anchorNode===t&&(i=r.anchorOffset,o=r.focusOffset);const s=t.nodeValue;s!==null&&iw(e,s,i,o,!1)}function pq(t,e,n){if(De(t)){const r=t.anchor.getNode();if(r.is(n)&&t.format!==r.getFormat())return!1}return Ns(e)&&n.isAttached()}function gq(t,e,n,r){for(let i=t;i&&!b6(i);i=yf(i)){const o=mg(i,e);if(o!==void 0){const s=Dn(o,n);if(s)return Ht(s)||!Pn(i)?void 0:[i,s]}else if(i===r)return[r,b2(n)]}}function xA(t,e,n){gb=!0;const r=performance.now()-jy>100;try{xi(t,()=>{const i=Ke()||(function(h){return h.getEditorState().read(()=>{const p=Ke();return p!==null?p.clone():null})})(t),o=new Map,s=t.getRootElement(),a=t._editorState,c=t._blockCursorElement;let u=!1,d="";for(let h=0;h<e.length;h++){const p=e[h],g=p.type,m=p.target,v=gq(m,t,a,s);if(!v)continue;const[_,y]=v;if(g==="characterData")r&&We(y)&&Ns(m)&&pq(i,m,y)&&hq(m,y,t);else if(g==="childList"){u=!0;const w=p.addedNodes;for(let $=0;$<w.length;$++){const C=w[$],k=m2(C),T=C.parentNode;if(T!=null&&C!==c&&k===null&&!ym(C,T,t)){if(al){const A=(Pn(C)?C.innerText:null)||C.nodeValue;A&&(d+=A)}T.removeChild(C)}}const x=p.removedNodes,E=x.length;if(E>0){let $=0;for(let C=0;C<E;C++){const k=x[C];(ym(k,m,t)||c===k)&&(m.appendChild(k),$++)}E!==$&&o.set(_,y)}}}if(o.size>0)for(const[h,p]of o)p.reconcileObservedMutation(h,t);const f=n.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const p=f[h],g=p.addedNodes,m=p.target;for(let v=0;v<g.length;v++){const _=g[v],y=_.parentNode;y==null||_.nodeName!=="BR"||ym(_,m,t)||y.removeChild(_)}}n.takeRecords()}i!==null&&(u&&Lr(i),al&&x2(t)&&i.insertRawText(d))})}finally{gb=!1}}function kA(t){const e=t._observer;e!==null&&xA(t,e.takeRecords(),e)}function SA(t){(function(e){jy===0&&Vi(e).addEventListener("textInput",fq,!0)})(t),t._observer=new MutationObserver((e,n)=>{xA(t,e,n)})}let mq=class{key;parse;unparse;isEqual;defaultValue;constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||yq).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function vq(t,e){return new mq(t,e)}function EA(t,e,n="latest"){const r=(n==="latest"?t.getLatest():t).__state;return r?r.getValue(e):e.defaultValue}function wm(t,e,n){let r;if(vr(),typeof n=="function"){const o=t.getLatest(),s=EA(o,e);if(r=n(s),e.isEqual(s,r))return o}else r=n;const i=t.getWritable();return $A(i).updateFromKnown(e,r),i}function bq(t){const e=new Map,n=new Set;for(let r=typeof t=="function"?t:t.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=bg(r);if(i&&i.stateConfigs)for(const o of i.stateConfigs){let s;"stateConfig"in o?(s=o.stateConfig,o.flat&&n.add(s.key)):s=o,e.set(s.key,s)}}return{flatKeys:n,sharedConfigMap:e}}let _q=class TA{node;knownState;unknownState;sharedNodeState;size;constructor(e,n,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:s}=this.sharedNodeState,a=o!==void 0?o:(function(c,u,d){let f=d.size;if(u)for(const h in u){const p=c.get(h);p&&d.has(p)||f++}return f})(s,r,i);this.size=a}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(n[r]=e[r],delete e[r]);return o1(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new TA(e,n,(function(o,s,a){let c;if(a)for(const[u,d]of Object.entries(a)){const f=o.get(u);f?s.has(f)||s.set(f,f.parse(d)):(c=c||{},c[u]=d)}return c})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,n){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=o1(o)),this.size++),i.set(e,n)}updateFromUnknown(e,n){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function $A(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new _q(e,CA(e));return e.__state=n,n}function CA(t){return t.__state?t.__state.sharedNodeState:p2(wf(),t.getType()).sharedNodeState}function o1(t){if(t)for(const e in t)return t}function yq(t){return t}function s1(t,e,n){for(const[r,i]of e.knownState){if(t.has(r.key))continue;t.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function a1(t,e,n){const{unknownState:r}=e,i=n?n.unknownState:void 0;if(r){for(const[o,s]of Object.entries(r))if(!t.has(o)&&(t.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function l1(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function c1(t,e){const n=t.__mode,r=t.__format,i=t.__style,o=e.__mode,s=e.__format,a=e.__style,c=t.__state,u=e.__state;return(n===null||n===o)&&(r===null||r===s)&&(i===null||i===a)&&(t.__state===null||c===u||(function(d,f){if(d===f)return!0;if(d&&f&&d.size!==f.size)return!1;const h=new Set;return!(d&&s1(h,d,f)||f&&s1(h,f,d)||d&&a1(h,d,f)||f&&a1(h,f,d))})(c,u))}function u1(t,e){const n=t.mergeWithSibling(e),r=Fn()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function d1(t){let e,n,r=t;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&We(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(c1(e,r)){r=u1(e,r);break}break}e.remove()}for(;(n=r.getNextSibling())!==null&&We(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(c1(r,n)){r=u1(r,n);break}break}n.remove()}}else r.remove()}function Dc(t){return f1(t.anchor),f1(t.focus),t}function f1(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let r,i;if(n===e.getChildrenSize()?(r=e.getChildAtIndex(n-1),i=!0):(r=e.getChildAtIndex(n),i=!1),We(r)){t.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!ke(r))break;t.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let cl,zr,Id,cg,mb,vb,ul,ao,bb,Rd,lr="",Eo=null,To="",ls="",Ql=!1,Xh=!1;function Zh(t,e){const n=ul.get(t);if(e!==null){const r=xb(t);r.parentNode===e&&e.removeChild(r)}if(ao.has(t)||zr._keyToDOMMap.delete(t),ke(n)){const r=ep(n,ul);_b(r,0,r.length-1,null)}n!==void 0&&ow(Rd,Id,cg,n,"destroyed")}function _b(t,e,n,r){let i=e;for(;i<=n;++i){const o=t[i];o!==void 0&&Zh(o,r)}}function wa(t,e){t.setProperty("text-align",e)}const wq="40px";function AA(t,e){const n=cl.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}const r=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||wq;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function PA(t,e){const n=t.style;e===0?wa(n,""):e===1?wa(n,"left"):e===2?wa(n,"center"):e===3?wa(n,"right"):e===4?wa(n,"justify"):e===5?wa(n,"start"):e===6&&wa(n,"end")}function yb(t,e){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(rr(r))return null;const o=r.getParentOrThrow();return rr(o)&&o.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function Qh(t,e){const n=ao.get(t);n===void 0&&Be(60);const r=n.createDOM(cl,zr);if((function(i,o,s){const a=s._keyToDOMMap;(function(c,u,d){const f=`__lexicalKey_${u._key}`;c[f]=d})(o,s,i),a.set(i,o)})(t,r,zr),We(n)?r.setAttribute("data-lexical-text","true"):Ht(n)&&r.setAttribute("data-lexical-decorator","true"),ke(n)){const i=n.__indent,o=n.__size;if(yb(r,n),i!==0&&AA(r,i),o!==0){const a=o-1;wb(ep(n,ao),n,0,a,n.getDOMSlot(r))}const s=n.__format;s!==0&&PA(r,s),n.isInline()||LA(null,n,r),vg(n)&&(lr+=na,ls+=na)}else{const i=n.getTextContent();if(Ht(n)){const o=n.decorate(zr,cl);o!==null&&NA(t,o),r.contentEditable="false"}lr+=i,ls+=i}return e!==null&&e.insertChild(r),ow(Rd,Id,cg,n,"created"),r}function wb(t,e,n,r,i){const o=lr;lr="";let s=n;for(;s<=r;++s){Qh(t[s],i);const a=ao.get(t[s]);a!==null&&We(a)&&(Eo===null&&(Eo=a.getFormat()),To===""&&(To=a.getStyle()))}vg(e)&&(lr+=na),i.element.__lexicalTextContent=lr,lr=o+lr}function h1(t,e){if(t){const n=t.__last;if(n){const r=e.get(n);if(r)return Rn(r)?"line-break":Ht(r)&&r.isInline()?"decorator":null}return"empty"}return null}function LA(t,e,n){const r=h1(t,ul),i=h1(e,ao);r!==i&&e.getDOMSlot(n).setManagedLineBreak(i)}function xq(t,e,n){var r;Eo=null,To="",(function(i,o,s){const a=lr,c=i.__size,u=o.__size;lr="";const d=s.element;if(c===1&&u===1){const f=i.__first,h=o.__first;if(f===h)Wu(f,d);else{const g=xb(f),m=Qh(h,null);try{d.replaceChild(m,g)}catch(v){if(typeof v=="object"&&v!=null){const _=`${v.toString()} Parent: ${d.tagName}, new child: {tag: ${m.tagName} key: ${h}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(_)}throw v}Zh(f,null)}const p=ao.get(h);We(p)&&(Eo===null&&(Eo=p.getFormat()),To===""&&(To=p.getStyle()))}else{const f=ep(i,ul),h=ep(o,ao);if(f.length!==c&&Be(227),h.length!==u&&Be(228),c===0)u!==0&&wb(h,o,0,u-1,s);else if(u===0){if(c!==0){const p=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;_b(f,0,c-1,p?null:d),p&&(d.textContent="")}}else(function(p,g,m,v,_,y){const w=v-1,x=_-1;let E,$,C=y.getFirstChild(),k=0,T=0;for(;k<=w&&T<=x;){const L=g[k],O=m[T];if(L===O)C=xm(Wu(O,y.element)),k++,T++;else{E===void 0&&(E=new Set(g)),$===void 0&&($=new Set(m));const M=$.has(L),U=E.has(O);if(M)if(U){const H=dl(zr,O);H===C?C=xm(Wu(O,y.element)):(y.withBefore(C).insertChild(H),Wu(O,y.element)),k++,T++}else Qh(O,y.withBefore(C)),T++;else C=xm(xb(L)),Zh(L,y.element),k++}const N=ao.get(O);N!==null&&We(N)&&(Eo===null&&(Eo=N.getFormat()),To===""&&(To=N.getStyle()))}const A=k>w,P=T>x;if(A&&!P){const L=m[x+1],O=L===void 0?null:zr.getElementByKey(L);wb(m,p,T,x,y.withBefore(O))}else P&&!A&&_b(g,k,w,y.element)})(o,f,h,c,u,s)}vg(o)&&(lr+=na),d.__lexicalTextContent=lr,lr=a+lr})(t,e,e.getDOMSlot(n)),r=e,Eo==null||Eo===r.__textFormat||Xh||r.setTextFormat(Eo),(function(i){To===""||To===i.__textStyle||Xh||i.setTextStyle(To)})(e)}function ep(t,e){const n=[];let r=t.__first;for(;r!==null;){const i=e.get(r);i===void 0&&Be(101),n.push(r),r=i.__next}return n}function Wu(t,e){const n=ul.get(t);let r=ao.get(t);n!==void 0&&r!==void 0||Be(61);const i=Ql||vb.has(t)||mb.has(t),o=dl(zr,t);if(n===r&&!i){if(ke(n)){const s=o.__lexicalTextContent;s!==void 0&&(lr+=s,ls+=s)}else{const s=n.getTextContent();ls+=s,lr+=s}return o}if(n!==r&&i&&ow(Rd,Id,cg,r,"updated"),r.updateDOM(n,o,cl)){const s=Qh(t,null);return e===null&&Be(62),e.replaceChild(s,o),Zh(t,null),s}if(ke(n)&&ke(r)){const s=r.__indent;(Ql||s!==n.__indent)&&AA(o,s);const a=r.__format;if((Ql||a!==n.__format)&&PA(o,a),i&&(xq(n,r,o),rr(r)||r.isInline()||LA(n,r,o)),vg(r)&&(lr+=na,ls+=na),(Ql||r.__dir!==n.__dir)&&(yb(o,r),rr(r)&&!Ql))for(const c of r.getChildren())ke(c)&&yb(dl(zr,c.getKey()),c)}else{const s=r.getTextContent();if(Ht(r)){const a=r.decorate(zr,cl);a!==null&&NA(t,a)}lr+=s,ls+=s}if(!Xh&&rr(r)&&r.__cachedText!==ls){const s=r.getWritable();s.__cachedText=ls,r=s}return o}function NA(t,e){let n=zr._pendingDecorators;const r=zr._decorators;if(n===null){if(r[t]===e)return;n=v2(zr)}n[t]=e}function xm(t){let e=t.nextSibling;return e!==null&&e===zr._blockCursorElement&&(e=e.nextSibling),e}function kq(t,e,n,r,i,o){lr="",ls="",Ql=r===2,zr=n,cl=n._config,Id=n._nodes,cg=zr._listeners.mutation,mb=i,vb=o,ul=t._nodeMap,ao=e._nodeMap,Xh=e._readOnly,bb=new Map(n._keyToDOMMap);const s=new Map;return Rd=s,Wu("root",null),zr=void 0,Id=void 0,mb=void 0,vb=void 0,ul=void 0,ao=void 0,cl=void 0,bb=void 0,Rd=void 0,s}function xb(t){const e=bb.get(t);return e===void 0&&Be(75,t),e}function mt(t){return{type:t}}const OA=mt("SELECTION_CHANGE_COMMAND"),Sq=mt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),IA=mt("CLICK_COMMAND"),ja=mt("DELETE_CHARACTER_COMMAND"),pc=mt("INSERT_LINE_BREAK_COMMAND"),Dd=mt("INSERT_PARAGRAPH_COMMAND"),gc=mt("CONTROLLED_TEXT_INSERTION_COMMAND"),Uy=mt("PASTE_COMMAND"),kb=mt("REMOVE_TEXT_COMMAND"),Md=mt("DELETE_WORD_COMMAND"),Fd=mt("DELETE_LINE_COMMAND"),ds=mt("FORMAT_TEXT_COMMAND"),By=mt("UNDO_COMMAND"),qy=mt("REDO_COMMAND"),RA=mt("KEYDOWN_COMMAND"),DA=mt("KEY_ARROW_RIGHT_COMMAND"),Sb=mt("MOVE_TO_END"),MA=mt("KEY_ARROW_LEFT_COMMAND"),tp=mt("MOVE_TO_START"),Mc=mt("KEY_ARROW_UP_COMMAND"),np=mt("KEY_ARROW_DOWN_COMMAND"),rp=mt("KEY_ENTER_COMMAND"),FA=mt("KEY_SPACE_COMMAND"),zA=mt("KEY_BACKSPACE_COMMAND"),jA=mt("KEY_ESCAPE_COMMAND"),UA=mt("KEY_DELETE_COMMAND"),Vy=mt("KEY_TAB_COMMAND"),Eb=mt("INSERT_TAB_COMMAND"),Js=mt("INDENT_CONTENT_COMMAND"),Na=mt("OUTDENT_CONTENT_COMMAND"),BA=mt("DROP_COMMAND"),Eq=mt("FORMAT_ELEMENT_COMMAND"),qA=mt("DRAGSTART_COMMAND"),VA=mt("DRAGOVER_COMMAND"),Tq=mt("DRAGEND_COMMAND"),ug=mt("COPY_COMMAND"),Hy=mt("CUT_COMMAND"),Tb=mt("SELECT_ALL_COMMAND"),$q=mt("CLEAR_EDITOR_COMMAND"),Cq=mt("CLEAR_HISTORY_COMMAND"),Gf=mt("CAN_REDO_COMMAND"),Wf=mt("CAN_UNDO_COMMAND"),Aq=mt("FOCUS_COMMAND"),Pq=mt("BLUR_COMMAND"),Lq=mt("KEY_MODIFIER_COMMAND"),ts=Object.freeze({}),$b=[["keydown",function(t,e){if(cd=t.timeStamp,HA=t.key,!e.isComposing()&&!rt(e,RA,t)&&t.key!=null){if(km&&U1(t))return xi(e,()=>{Yf(e,Sm)}),km=!1,void(Sm="");if((function(n){return ln(n,"ArrowRight",{shiftKey:"any"})})(t))rt(e,DA,t);else if((function(n){return ln(n,"ArrowRight",is)})(t))rt(e,Sb,t);else if((function(n){return ln(n,"ArrowLeft",{shiftKey:"any"})})(t))rt(e,MA,t);else if((function(n){return ln(n,"ArrowLeft",is)})(t))rt(e,tp,t);else if((function(n){return ln(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))rt(e,Mc,t);else if((function(n){return ln(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))rt(e,np,t);else if((function(n){return ln(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))ud=!0,rt(e,rp,t);else if((function(n){return n.key===" "})(t))rt(e,FA,t);else if((function(n){return Zi&&ln(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),ud=!0,rt(e,pc,!0);else if((function(n){return ln(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))ud=!1,rt(e,rp,t);else if((function(n){return ln(n,"Backspace",{shiftKey:"any"})||Zi&&ln(n,"h",{ctrlKey:!0})})(t))U1(t)?rt(e,zA,t):(t.preventDefault(),rt(e,ja,!0));else if((function(n){return n.key==="Escape"})(t))rt(e,jA,t);else if((function(n){return ln(n,"Delete",{})||Zi&&ln(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?rt(e,UA,t):(t.preventDefault(),rt(e,ja,!1));else if((function(n){return ln(n,"Backspace",j1)})(t))t.preventDefault(),rt(e,Md,!0);else if((function(n){return ln(n,"Delete",j1)})(t))t.preventDefault(),rt(e,Md,!1);else if((function(n){return Zi&&ln(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),rt(e,Fd,!0);else if((function(n){return Zi&&(ln(n,"Delete",{metaKey:!0})||ln(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),rt(e,Fd,!1);else if((function(n){return ln(n,"b",is)})(t))t.preventDefault(),rt(e,ds,"bold");else if((function(n){return ln(n,"u",is)})(t))t.preventDefault(),rt(e,ds,"underline");else if((function(n){return ln(n,"i",is)})(t))t.preventDefault(),rt(e,ds,"italic");else if((function(n){return ln(n,"Tab",{shiftKey:"any"})})(t))rt(e,Vy,t);else if((function(n){return ln(n,"z",is)})(t))t.preventDefault(),rt(e,By,void 0);else if((function(n){return Zi?ln(n,"z",{metaKey:!0,shiftKey:!0}):ln(n,"y",{ctrlKey:!0})||ln(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),rt(e,qy,void 0);else{const n=e._editorState._selection;n===null||De(n)?B1(t)&&(t.preventDefault(),rt(e,Tb,t)):(function(r){return ln(r,"c",is)})(t)?(t.preventDefault(),rt(e,ug,t)):(function(r){return ln(r,"x",is)})(t)?(t.preventDefault(),rt(e,Hy,t)):B1(t)&&(t.preventDefault(),rt(e,Tb,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&rt(e,Lq,t)}}],["pointerdown",function(t,e){const n=t.target,r=t.pointerType;mu(n)&&r!=="touch"&&r!=="pen"&&t.button===0&&xi(e,()=>{M1(n)||(Pb=!0)})}],["compositionstart",function(t,e){xi(e,()=>{const n=Ke();if(De(n)&&!e.isComposing()){const r=n.anchor,i=n.anchor.getNode();kr(r.key),(t.timeStamp<cd+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||We(i)&&i.getStyle()!==n.style)&&rt(e,gc,oq)}})}],["compositionend",function(t,e){al?Ou=!0:Rc||!Nd&&!Od?xi(e,()=>{Yf(e,t.data)}):(km=!0,Sm=t.data)}],["input",function(t,e){t.stopPropagation(),xi(e,()=>{if(Pn(t.target)&&M1(t.target))return;const n=Ke(),r=t.data,i=JA(t);if(r!=null&&De(n)&&WA(n,i,r,t.timeStamp,!1)){Ou&&(Yf(e,r),Ou=!1);const o=n.anchor.getNode(),s=go(Vi(e));if(s===null)return;const a=n.isBackward(),c=a?n.anchor.offset:n.focus.offset,u=a?n.focus.offset:n.anchor.offset;Jh&&!n.isCollapsed()&&We(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,c)+r+o.getTextContent().slice(c+u)===w2(s.anchorNode)||rt(e,gc,r);const d=r.length;al&&d>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=d),Nd||Rc||Od||!e.isComposing()||(cd=0,kr(null))}else rw(!1,e,r!==null?r:void 0),Ou&&(Yf(e,r||void 0),Ou=!1);(function(){vr();const o=Fn();kA(o)})()},{event:t}),ec=null}],["click",function(t,e){xi(e,()=>{const n=Ke(),r=go(Vi(e)),i=Ll();if(r){if(De(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!rr(s)&&Qn().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const a=ei(s,c=>ke(c)&&!c.isInline());ke(a)&&a.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const o=r.anchorNode;(Pn(o)||Ns(o))&&Lr(Gy(i,r,e,t))}}rt(e,IA,t)})}],["cut",ts],["copy",ts],["dragstart",ts],["dragover",ts],["dragend",ts],["paste",ts],["focus",ts],["blur",ts],["drop",ts]];Jh&&$b.push(["beforeinput",(t,e)=>(function(n,r){const i=n.inputType,o=JA(n);i==="deleteCompositionText"||al&&x2(r)||i!=="insertCompositionText"&&xi(r,()=>{const s=Ke();if(i==="deleteContentBackward"){if(s===null){const p=Ll();if(!De(p))return;Lr(p.clone())}if(De(s)){const p=s.anchor.key===s.focus.key;if(a=n.timeStamp,HA==="MediaLast"&&a<cd+30&&r.isComposing()&&p){if(kr(null),cd=0,setTimeout(()=>{xi(r,()=>{kr(null)})},30),De(s)){const g=s.anchor.getNode();g.markDirty(),We(g)||Be(142),YA(s,g)}}else{kr(null),n.preventDefault();const g=s.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),_=s.anchor.offset===0&&s.focus.offset===m.length;let y=n1&&p&&!_&&v;if(y&&s.isCollapsed()&&(y=!Ht(Db(s.anchor,!0))),!y){rt(r,ja,!0);const w=Ke();n1&&De(w)&&w.isCollapsed()&&(Ta=w,setTimeout(()=>Ta=null))}}return}}var a;if(!De(s))return;const c=n.data;ec!==null&&rw(!1,r,ec),s.dirty&&ec===null||!s.isCollapsed()||rr(s.anchor.getNode())||o===null||s.applyDOMRange(o),ec=null;const u=s.anchor,d=s.focus,f=u.getNode(),h=d.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":rt(r,gc,n);break;case"insertFromComposition":kr(null),rt(r,gc,n);break;case"insertLineBreak":kr(null),rt(r,pc,!1);break;case"insertParagraph":kr(null),ud&&!Rc?(ud=!1,rt(r,pc,!1)):rt(r,Dd,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":rt(r,Uy,n);break;case"deleteByComposition":(function(p,g){return p!==g||ke(p)||ke(g)||!Ua(p)||!Ua(g)})(f,h)&&rt(r,kb,n);break;case"deleteByDrag":case"deleteByCut":rt(r,kb,n);break;case"deleteContent":rt(r,ja,!1);break;case"deleteWordBackward":rt(r,Md,!0);break;case"deleteWordForward":rt(r,Md,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":rt(r,Fd,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":rt(r,Fd,!1);break;case"formatStrikeThrough":rt(r,ds,"strikethrough");break;case"formatBold":rt(r,ds,"bold");break;case"formatItalic":rt(r,ds,"italic");break;case"formatUnderline":rt(r,ds,"underline");break;case"historyUndo":rt(r,By,void 0);break;case"historyRedo":rt(r,qy,void 0)}else{if(c===`
|
|
396
|
-
`)n.preventDefault(),rt(r,pc,!1);else if(c===na)n.preventDefault(),rt(r,Dd,void 0);else if(c==null&&n.dataTransfer){const p=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(p)}else c!=null&&WA(s,o,c,n.timeStamp,!0)?(n.preventDefault(),rt(r,gc,c)):ec=c;KA=n.timeStamp}})})(t,e)]);let cd=0,HA=null,KA=0,ec=null;const Cb=new WeakMap,ip=new WeakMap;let Ab=!1,Pb=!1,ud=!1,Ou=!1,km=!1,Sm="",Ta=null,GA=[0,"",0,"root",0];function WA(t,e,n,r,i){const o=t.anchor,s=t.focus,a=o.getNode(),c=
|
|
397
|
-
`){const r=Ke();if(De(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void rt(t,rp,null)}}}rw(!0,t,e)}function XA(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const mc=new Map;function ZA(t){const e=p6(t.target);if(e===null)return;const n=pg(e.anchorNode);if(n===null)return;Pb&&(Pb=!1,xi(n,()=>{const c=Ll(),u=e.anchorNode;(Pn(u)||Ns(u))&&Lr(Gy(c,e,n,t))}));const r=nw(n),i=r[r.length-1],o=i._key,s=mc.get(o),a=s||i;a!==n&&g1(e,a,!1),g1(e,n,!0),n!==i?mc.set(o,n):s&&mc.delete(o)}function m1(t){t._lexicalHandled=!0}function v1(t){return t._lexicalHandled===!0}function Nq(t){const e=Cb.get(t);if(e===void 0)return;const n=ip.get(e);if(n===void 0)return;const r=n-1;r>=0||Be(164),Cb.delete(t),ip.set(e,r),r===0&&e.removeEventListener("selectionchange",ZA);const i=gg(t);tw(i)?((function(s){if(s._parentEditor!==null){const a=nw(s),c=a[a.length-1]._key;mc.get(c)===s&&mc.delete(c)}else mc.delete(s._key)})(i),t.__lexicalEditor=null):i&&Be(198);const o=XA(t);for(let s=0;s<o.length;s++)o[s]();t.__lexicalEventHandles=[]}function Lb(t,e,n){vr();const r=t.__key,i=t.getParent();if(i===null)return;const o=(function(a){const c=Ke();if(!De(c)||!ke(a))return c;const{anchor:u,focus:d}=c,f=u.getNode(),h=d.getNode();return Mb(f,a)&&u.set(a.__key,0,"element"),Mb(h,a)&&d.set(a.__key,0,"element"),c})(t);let s=!1;if(De(o)&&e){const a=o.anchor,c=o.focus;a.key===r&&(ap(a,t,i,t.getPreviousSibling(),t.getNextSibling()),s=!0),c.key===r&&(ap(c,t,i,t.getPreviousSibling(),t.getNextSibling()),s=!0)}else Gr(o)&&e&&t.isSelected()&&t.selectPrevious();if(De(o)&&e&&!s){const a=t.getIndexWithinParent();Ba(t),sp(o,i,a,-1)}else Ba(t);n||$i(i)||i.canBeEmpty()||!i.isEmpty()||Lb(i,e),e&&o&&rr(i)&&i.isEmpty()&&i.selectEnd()}const QA=Symbol.for("ephemeral");function op(t){return t[QA]||!1}class Do{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=bg(this);return e===void 0&&Be(64,this.name),e}static clone(e){Be(65,this.name)}$config(){return{}}config(e,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:e}),{[e]:n}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),s6(this,e)}getType(){return this.__type}isInline(){Be(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=Dn(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Ke();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(We(this))return r;if(De(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Ht(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Dn(e)}getParentOrThrow(){const e=this.getParent();return e===null&&Be(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if($i(n))return ke(e)||e===this&&Ht(e)||Be(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&Be(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Dn(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Dn(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=ke(this)?this:this.getParent(),r=ke(e)?e:e.getParent(),i=n&&r?Sh(n,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=Sh(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?$2(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&Be(279),!1)))}isParentOf(e){const n=Sh(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===e)break;const a=ke(o)?n?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const c=n?o.getNextSibling():o.getPreviousSibling();if(c!==null){o=c;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let d=null,f=u;do{if(f===null&&Be(68),d=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||r.push(f)}while(d===null);o=d}return n||r.reverse(),r}isDirty(){const e=
|
|
395
|
+
`,oq=al?" ":lg,_A="֑-߿יִ-﷽ﹰ-ﻼ",yA="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",sq=new RegExp("^[^"+yA+"]*["+_A+"]"),aq=new RegExp("^[^"+_A+"]*["+yA+"]"),ll={bold:1,capitalize:1024,code:16,highlight:bA,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},lq={directionless:1,unmergeable:2},r1={center:2,end:6,justify:4,left:1,right:3,start:5},cq={[eq]:"center",[iq]:"end",[nq]:"justify",[Q5]:"left",[tq]:"right",[rq]:"start"},uq={normal:0,segmented:2,token:1},dq={[J5]:"normal",[Z5]:"segmented",[X5]:"token"},i1="$config";function wA(t,e,n,r,i,o){let s=t.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&(ke(s)&&wA(s,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}let gb=!1,jy=0;function fq(t){jy=t.timeStamp}function ym(t,e,n){const r=t.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(t===i||r&&t.previousSibling===i)||r&&mg(t,n)!==void 0}function hq(t,e,n){const r=go(Vi(n));let i=null,o=null;r!==null&&r.anchorNode===t&&(i=r.anchorOffset,o=r.focusOffset);const s=t.nodeValue;s!==null&&iw(e,s,i,o,!1)}function pq(t,e,n){if(De(t)){const r=t.anchor.getNode();if(r.is(n)&&t.format!==r.getFormat())return!1}return Ns(e)&&n.isAttached()}function gq(t,e,n,r){for(let i=t;i&&!b6(i);i=yf(i)){const o=mg(i,e);if(o!==void 0){const s=Dn(o,n);if(s)return Ht(s)||!Pn(i)?void 0:[i,s]}else if(i===r)return[r,b2(n)]}}function xA(t,e,n){gb=!0;const r=performance.now()-jy>100;try{xi(t,()=>{const i=Ke()||(function(h){return h.getEditorState().read(()=>{const p=Ke();return p!==null?p.clone():null})})(t),o=new Map,s=t.getRootElement(),a=t._editorState,c=t._blockCursorElement;let u=!1,d="";for(let h=0;h<e.length;h++){const p=e[h],g=p.type,m=p.target,v=gq(m,t,a,s);if(!v)continue;const[_,y]=v;if(g==="characterData")r&&We(y)&&Ns(m)&&pq(i,m,y)&&hq(m,y,t);else if(g==="childList"){u=!0;const w=p.addedNodes;for(let $=0;$<w.length;$++){const C=w[$],k=m2(C),T=C.parentNode;if(T!=null&&C!==c&&k===null&&!ym(C,T,t)){if(al){const A=(Pn(C)?C.innerText:null)||C.nodeValue;A&&(d+=A)}T.removeChild(C)}}const x=p.removedNodes,E=x.length;if(E>0){let $=0;for(let C=0;C<E;C++){const k=x[C];(ym(k,m,t)||c===k)&&(m.appendChild(k),$++)}E!==$&&o.set(_,y)}}}if(o.size>0)for(const[h,p]of o)p.reconcileObservedMutation(h,t);const f=n.takeRecords();if(f.length>0){for(let h=0;h<f.length;h++){const p=f[h],g=p.addedNodes,m=p.target;for(let v=0;v<g.length;v++){const _=g[v],y=_.parentNode;y==null||_.nodeName!=="BR"||ym(_,m,t)||y.removeChild(_)}}n.takeRecords()}i!==null&&(u&&Lr(i),al&&x2(t)&&i.insertRawText(d))})}finally{gb=!1}}function kA(t){const e=t._observer;e!==null&&xA(t,e.takeRecords(),e)}function SA(t){(function(e){jy===0&&Vi(e).addEventListener("textInput",fq,!0)})(t),t._observer=new MutationObserver((e,n)=>{xA(t,e,n)})}let mq=class{key;parse;unparse;isEqual;defaultValue;constructor(e,n){this.key=e,this.parse=n.parse.bind(n),this.unparse=(n.unparse||yq).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function vq(t,e){return new mq(t,e)}function EA(t,e,n="latest"){const r=(n==="latest"?t.getLatest():t).__state;return r?r.getValue(e):e.defaultValue}function wm(t,e,n){let r;if(vr(),typeof n=="function"){const o=t.getLatest(),s=EA(o,e);if(r=n(s),e.isEqual(s,r))return o}else r=n;const i=t.getWritable();return $A(i).updateFromKnown(e,r),i}function bq(t){const e=new Map,n=new Set;for(let r=typeof t=="function"?t:t.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=bg(r);if(i&&i.stateConfigs)for(const o of i.stateConfigs){let s;"stateConfig"in o?(s=o.stateConfig,o.flat&&n.add(s.key)):s=o,e.set(s.key,s)}}return{flatKeys:n,sharedConfigMap:e}}let _q=class TA{node;knownState;unknownState;sharedNodeState;size;constructor(e,n,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:s}=this.sharedNodeState,a=o!==void 0?o:(function(c,u,d){let f=d.size;if(u)for(const h in u){const p=c.get(h);p&&d.has(p)||f++}return f})(s,r,i);this.size=a}getValue(e){const n=this.knownState.get(e);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(n[r]=e[r],delete e[r]);return o1(e)&&(n.$=e),n}getWritable(e){if(this.node===e)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new TA(e,n,(function(o,s,a){let c;if(a)for(const[u,d]of Object.entries(a)){const f=o.get(u);f?s.has(f)||s.set(f,f.parse(d)):(c=c||{},c[u]=d)}return c})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,n){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=o1(o)),this.size++),i.set(e,n)}updateFromUnknown(e,n){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=n)}updateFromJSON(e){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function $A(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new _q(e,CA(e));return e.__state=n,n}function CA(t){return t.__state?t.__state.sharedNodeState:p2(wf(),t.getType()).sharedNodeState}function o1(t){if(t)for(const e in t)return t}function yq(t){return t}function s1(t,e,n){for(const[r,i]of e.knownState){if(t.has(r.key))continue;t.add(r.key);const o=n?n.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function a1(t,e,n){const{unknownState:r}=e,i=n?n.unknownState:void 0;if(r){for(const[o,s]of Object.entries(r))if(!t.has(o)&&(t.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function l1(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function c1(t,e){const n=t.__mode,r=t.__format,i=t.__style,o=e.__mode,s=e.__format,a=e.__style,c=t.__state,u=e.__state;return(n===null||n===o)&&(r===null||r===s)&&(i===null||i===a)&&(t.__state===null||c===u||(function(d,f){if(d===f)return!0;if(d&&f&&d.size!==f.size)return!1;const h=new Set;return!(d&&s1(h,d,f)||f&&s1(h,f,d)||d&&a1(h,d,f)||f&&a1(h,f,d))})(c,u))}function u1(t,e){const n=t.mergeWithSibling(e),r=zn()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function d1(t){let e,n,r=t;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&We(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(c1(e,r)){r=u1(e,r);break}break}e.remove()}for(;(n=r.getNextSibling())!==null&&We(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(c1(r,n)){r=u1(r,n);break}break}n.remove()}}else r.remove()}function Dc(t){return f1(t.anchor),f1(t.focus),t}function f1(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let r,i;if(n===e.getChildrenSize()?(r=e.getChildAtIndex(n-1),i=!0):(r=e.getChildAtIndex(n),i=!1),We(r)){t.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!ke(r))break;t.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let cl,zr,Id,cg,mb,vb,ul,ao,bb,Rd,lr="",Eo=null,To="",ls="",Ql=!1,Xh=!1;function Zh(t,e){const n=ul.get(t);if(e!==null){const r=xb(t);r.parentNode===e&&e.removeChild(r)}if(ao.has(t)||zr._keyToDOMMap.delete(t),ke(n)){const r=ep(n,ul);_b(r,0,r.length-1,null)}n!==void 0&&ow(Rd,Id,cg,n,"destroyed")}function _b(t,e,n,r){let i=e;for(;i<=n;++i){const o=t[i];o!==void 0&&Zh(o,r)}}function wa(t,e){t.setProperty("text-align",e)}const wq="40px";function AA(t,e){const n=cl.theme.indent;if(typeof n=="string"){const i=t.classList.contains(n);e>0&&!i?t.classList.add(n):e<1&&i&&t.classList.remove(n)}const r=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||wq;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function PA(t,e){const n=t.style;e===0?wa(n,""):e===1?wa(n,"left"):e===2?wa(n,"center"):e===3?wa(n,"right"):e===4?wa(n,"justify"):e===5?wa(n,"start"):e===6&&wa(n,"end")}function yb(t,e){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(rr(r))return null;const o=r.getParentOrThrow();return rr(o)&&o.__dir===null?"auto":null})(e);n!==null?t.dir=n:t.removeAttribute("dir")}function Qh(t,e){const n=ao.get(t);n===void 0&&Be(60);const r=n.createDOM(cl,zr);if((function(i,o,s){const a=s._keyToDOMMap;(function(c,u,d){const f=`__lexicalKey_${u._key}`;c[f]=d})(o,s,i),a.set(i,o)})(t,r,zr),We(n)?r.setAttribute("data-lexical-text","true"):Ht(n)&&r.setAttribute("data-lexical-decorator","true"),ke(n)){const i=n.__indent,o=n.__size;if(yb(r,n),i!==0&&AA(r,i),o!==0){const a=o-1;wb(ep(n,ao),n,0,a,n.getDOMSlot(r))}const s=n.__format;s!==0&&PA(r,s),n.isInline()||LA(null,n,r),vg(n)&&(lr+=na,ls+=na)}else{const i=n.getTextContent();if(Ht(n)){const o=n.decorate(zr,cl);o!==null&&NA(t,o),r.contentEditable="false"}lr+=i,ls+=i}return e!==null&&e.insertChild(r),ow(Rd,Id,cg,n,"created"),r}function wb(t,e,n,r,i){const o=lr;lr="";let s=n;for(;s<=r;++s){Qh(t[s],i);const a=ao.get(t[s]);a!==null&&We(a)&&(Eo===null&&(Eo=a.getFormat()),To===""&&(To=a.getStyle()))}vg(e)&&(lr+=na),i.element.__lexicalTextContent=lr,lr=o+lr}function h1(t,e){if(t){const n=t.__last;if(n){const r=e.get(n);if(r)return Rn(r)?"line-break":Ht(r)&&r.isInline()?"decorator":null}return"empty"}return null}function LA(t,e,n){const r=h1(t,ul),i=h1(e,ao);r!==i&&e.getDOMSlot(n).setManagedLineBreak(i)}function xq(t,e,n){var r;Eo=null,To="",(function(i,o,s){const a=lr,c=i.__size,u=o.__size;lr="";const d=s.element;if(c===1&&u===1){const f=i.__first,h=o.__first;if(f===h)Wu(f,d);else{const g=xb(f),m=Qh(h,null);try{d.replaceChild(m,g)}catch(v){if(typeof v=="object"&&v!=null){const _=`${v.toString()} Parent: ${d.tagName}, new child: {tag: ${m.tagName} key: ${h}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(_)}throw v}Zh(f,null)}const p=ao.get(h);We(p)&&(Eo===null&&(Eo=p.getFormat()),To===""&&(To=p.getStyle()))}else{const f=ep(i,ul),h=ep(o,ao);if(f.length!==c&&Be(227),h.length!==u&&Be(228),c===0)u!==0&&wb(h,o,0,u-1,s);else if(u===0){if(c!==0){const p=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;_b(f,0,c-1,p?null:d),p&&(d.textContent="")}}else(function(p,g,m,v,_,y){const w=v-1,x=_-1;let E,$,C=y.getFirstChild(),k=0,T=0;for(;k<=w&&T<=x;){const L=g[k],O=m[T];if(L===O)C=xm(Wu(O,y.element)),k++,T++;else{E===void 0&&(E=new Set(g)),$===void 0&&($=new Set(m));const M=$.has(L),U=E.has(O);if(M)if(U){const H=dl(zr,O);H===C?C=xm(Wu(O,y.element)):(y.withBefore(C).insertChild(H),Wu(O,y.element)),k++,T++}else Qh(O,y.withBefore(C)),T++;else C=xm(xb(L)),Zh(L,y.element),k++}const N=ao.get(O);N!==null&&We(N)&&(Eo===null&&(Eo=N.getFormat()),To===""&&(To=N.getStyle()))}const A=k>w,P=T>x;if(A&&!P){const L=m[x+1],O=L===void 0?null:zr.getElementByKey(L);wb(m,p,T,x,y.withBefore(O))}else P&&!A&&_b(g,k,w,y.element)})(o,f,h,c,u,s)}vg(o)&&(lr+=na),d.__lexicalTextContent=lr,lr=a+lr})(t,e,e.getDOMSlot(n)),r=e,Eo==null||Eo===r.__textFormat||Xh||r.setTextFormat(Eo),(function(i){To===""||To===i.__textStyle||Xh||i.setTextStyle(To)})(e)}function ep(t,e){const n=[];let r=t.__first;for(;r!==null;){const i=e.get(r);i===void 0&&Be(101),n.push(r),r=i.__next}return n}function Wu(t,e){const n=ul.get(t);let r=ao.get(t);n!==void 0&&r!==void 0||Be(61);const i=Ql||vb.has(t)||mb.has(t),o=dl(zr,t);if(n===r&&!i){if(ke(n)){const s=o.__lexicalTextContent;s!==void 0&&(lr+=s,ls+=s)}else{const s=n.getTextContent();ls+=s,lr+=s}return o}if(n!==r&&i&&ow(Rd,Id,cg,r,"updated"),r.updateDOM(n,o,cl)){const s=Qh(t,null);return e===null&&Be(62),e.replaceChild(s,o),Zh(t,null),s}if(ke(n)&&ke(r)){const s=r.__indent;(Ql||s!==n.__indent)&&AA(o,s);const a=r.__format;if((Ql||a!==n.__format)&&PA(o,a),i&&(xq(n,r,o),rr(r)||r.isInline()||LA(n,r,o)),vg(r)&&(lr+=na,ls+=na),(Ql||r.__dir!==n.__dir)&&(yb(o,r),rr(r)&&!Ql))for(const c of r.getChildren())ke(c)&&yb(dl(zr,c.getKey()),c)}else{const s=r.getTextContent();if(Ht(r)){const a=r.decorate(zr,cl);a!==null&&NA(t,a)}lr+=s,ls+=s}if(!Xh&&rr(r)&&r.__cachedText!==ls){const s=r.getWritable();s.__cachedText=ls,r=s}return o}function NA(t,e){let n=zr._pendingDecorators;const r=zr._decorators;if(n===null){if(r[t]===e)return;n=v2(zr)}n[t]=e}function xm(t){let e=t.nextSibling;return e!==null&&e===zr._blockCursorElement&&(e=e.nextSibling),e}function kq(t,e,n,r,i,o){lr="",ls="",Ql=r===2,zr=n,cl=n._config,Id=n._nodes,cg=zr._listeners.mutation,mb=i,vb=o,ul=t._nodeMap,ao=e._nodeMap,Xh=e._readOnly,bb=new Map(n._keyToDOMMap);const s=new Map;return Rd=s,Wu("root",null),zr=void 0,Id=void 0,mb=void 0,vb=void 0,ul=void 0,ao=void 0,cl=void 0,bb=void 0,Rd=void 0,s}function xb(t){const e=bb.get(t);return e===void 0&&Be(75,t),e}function mt(t){return{type:t}}const OA=mt("SELECTION_CHANGE_COMMAND"),Sq=mt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),IA=mt("CLICK_COMMAND"),ja=mt("DELETE_CHARACTER_COMMAND"),pc=mt("INSERT_LINE_BREAK_COMMAND"),Dd=mt("INSERT_PARAGRAPH_COMMAND"),gc=mt("CONTROLLED_TEXT_INSERTION_COMMAND"),Uy=mt("PASTE_COMMAND"),kb=mt("REMOVE_TEXT_COMMAND"),Md=mt("DELETE_WORD_COMMAND"),Fd=mt("DELETE_LINE_COMMAND"),ds=mt("FORMAT_TEXT_COMMAND"),By=mt("UNDO_COMMAND"),qy=mt("REDO_COMMAND"),RA=mt("KEYDOWN_COMMAND"),DA=mt("KEY_ARROW_RIGHT_COMMAND"),Sb=mt("MOVE_TO_END"),MA=mt("KEY_ARROW_LEFT_COMMAND"),tp=mt("MOVE_TO_START"),Mc=mt("KEY_ARROW_UP_COMMAND"),np=mt("KEY_ARROW_DOWN_COMMAND"),rp=mt("KEY_ENTER_COMMAND"),FA=mt("KEY_SPACE_COMMAND"),zA=mt("KEY_BACKSPACE_COMMAND"),jA=mt("KEY_ESCAPE_COMMAND"),UA=mt("KEY_DELETE_COMMAND"),Vy=mt("KEY_TAB_COMMAND"),Eb=mt("INSERT_TAB_COMMAND"),Js=mt("INDENT_CONTENT_COMMAND"),Na=mt("OUTDENT_CONTENT_COMMAND"),BA=mt("DROP_COMMAND"),Eq=mt("FORMAT_ELEMENT_COMMAND"),qA=mt("DRAGSTART_COMMAND"),VA=mt("DRAGOVER_COMMAND"),Tq=mt("DRAGEND_COMMAND"),ug=mt("COPY_COMMAND"),Hy=mt("CUT_COMMAND"),Tb=mt("SELECT_ALL_COMMAND"),$q=mt("CLEAR_EDITOR_COMMAND"),Cq=mt("CLEAR_HISTORY_COMMAND"),Gf=mt("CAN_REDO_COMMAND"),Wf=mt("CAN_UNDO_COMMAND"),Aq=mt("FOCUS_COMMAND"),Pq=mt("BLUR_COMMAND"),Lq=mt("KEY_MODIFIER_COMMAND"),ts=Object.freeze({}),$b=[["keydown",function(t,e){if(cd=t.timeStamp,HA=t.key,!e.isComposing()&&!rt(e,RA,t)&&t.key!=null){if(km&&U1(t))return xi(e,()=>{Yf(e,Sm)}),km=!1,void(Sm="");if((function(n){return ln(n,"ArrowRight",{shiftKey:"any"})})(t))rt(e,DA,t);else if((function(n){return ln(n,"ArrowRight",is)})(t))rt(e,Sb,t);else if((function(n){return ln(n,"ArrowLeft",{shiftKey:"any"})})(t))rt(e,MA,t);else if((function(n){return ln(n,"ArrowLeft",is)})(t))rt(e,tp,t);else if((function(n){return ln(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(t))rt(e,Mc,t);else if((function(n){return ln(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(t))rt(e,np,t);else if((function(n){return ln(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(t))ud=!0,rt(e,rp,t);else if((function(n){return n.key===" "})(t))rt(e,FA,t);else if((function(n){return Zi&&ln(n,"o",{ctrlKey:!0})})(t))t.preventDefault(),ud=!0,rt(e,pc,!0);else if((function(n){return ln(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(t))ud=!1,rt(e,rp,t);else if((function(n){return ln(n,"Backspace",{shiftKey:"any"})||Zi&&ln(n,"h",{ctrlKey:!0})})(t))U1(t)?rt(e,zA,t):(t.preventDefault(),rt(e,ja,!0));else if((function(n){return n.key==="Escape"})(t))rt(e,jA,t);else if((function(n){return ln(n,"Delete",{})||Zi&&ln(n,"d",{ctrlKey:!0})})(t))(function(n){return n.key==="Delete"})(t)?rt(e,UA,t):(t.preventDefault(),rt(e,ja,!1));else if((function(n){return ln(n,"Backspace",j1)})(t))t.preventDefault(),rt(e,Md,!0);else if((function(n){return ln(n,"Delete",j1)})(t))t.preventDefault(),rt(e,Md,!1);else if((function(n){return Zi&&ln(n,"Backspace",{metaKey:!0})})(t))t.preventDefault(),rt(e,Fd,!0);else if((function(n){return Zi&&(ln(n,"Delete",{metaKey:!0})||ln(n,"k",{ctrlKey:!0}))})(t))t.preventDefault(),rt(e,Fd,!1);else if((function(n){return ln(n,"b",is)})(t))t.preventDefault(),rt(e,ds,"bold");else if((function(n){return ln(n,"u",is)})(t))t.preventDefault(),rt(e,ds,"underline");else if((function(n){return ln(n,"i",is)})(t))t.preventDefault(),rt(e,ds,"italic");else if((function(n){return ln(n,"Tab",{shiftKey:"any"})})(t))rt(e,Vy,t);else if((function(n){return ln(n,"z",is)})(t))t.preventDefault(),rt(e,By,void 0);else if((function(n){return Zi?ln(n,"z",{metaKey:!0,shiftKey:!0}):ln(n,"y",{ctrlKey:!0})||ln(n,"z",{ctrlKey:!0,shiftKey:!0})})(t))t.preventDefault(),rt(e,qy,void 0);else{const n=e._editorState._selection;n===null||De(n)?B1(t)&&(t.preventDefault(),rt(e,Tb,t)):(function(r){return ln(r,"c",is)})(t)?(t.preventDefault(),rt(e,ug,t)):(function(r){return ln(r,"x",is)})(t)?(t.preventDefault(),rt(e,Hy,t)):B1(t)&&(t.preventDefault(),rt(e,Tb,t))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(t)&&rt(e,Lq,t)}}],["pointerdown",function(t,e){const n=t.target,r=t.pointerType;mu(n)&&r!=="touch"&&r!=="pen"&&t.button===0&&xi(e,()=>{M1(n)||(Pb=!0)})}],["compositionstart",function(t,e){xi(e,()=>{const n=Ke();if(De(n)&&!e.isComposing()){const r=n.anchor,i=n.anchor.getNode();kr(r.key),(t.timeStamp<cd+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||We(i)&&i.getStyle()!==n.style)&&rt(e,gc,oq)}})}],["compositionend",function(t,e){al?Ou=!0:Rc||!Nd&&!Od?xi(e,()=>{Yf(e,t.data)}):(km=!0,Sm=t.data)}],["input",function(t,e){t.stopPropagation(),xi(e,()=>{if(Pn(t.target)&&M1(t.target))return;const n=Ke(),r=t.data,i=JA(t);if(r!=null&&De(n)&&WA(n,i,r,t.timeStamp,!1)){Ou&&(Yf(e,r),Ou=!1);const o=n.anchor.getNode(),s=go(Vi(e));if(s===null)return;const a=n.isBackward(),c=a?n.anchor.offset:n.focus.offset,u=a?n.focus.offset:n.anchor.offset;Jh&&!n.isCollapsed()&&We(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,c)+r+o.getTextContent().slice(c+u)===w2(s.anchorNode)||rt(e,gc,r);const d=r.length;al&&d>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=d),Nd||Rc||Od||!e.isComposing()||(cd=0,kr(null))}else rw(!1,e,r!==null?r:void 0),Ou&&(Yf(e,r||void 0),Ou=!1);(function(){vr();const o=zn();kA(o)})()},{event:t}),ec=null}],["click",function(t,e){xi(e,()=>{const n=Ke(),r=go(Vi(e)),i=Ll();if(r){if(De(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!rr(s)&&Qn().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(t.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const a=ei(s,c=>ke(c)&&!c.isInline());ke(a)&&a.select(0)}}else if(t.pointerType==="touch"||t.pointerType==="pen"){const o=r.anchorNode;(Pn(o)||Ns(o))&&Lr(Gy(i,r,e,t))}}rt(e,IA,t)})}],["cut",ts],["copy",ts],["dragstart",ts],["dragover",ts],["dragend",ts],["paste",ts],["focus",ts],["blur",ts],["drop",ts]];Jh&&$b.push(["beforeinput",(t,e)=>(function(n,r){const i=n.inputType,o=JA(n);i==="deleteCompositionText"||al&&x2(r)||i!=="insertCompositionText"&&xi(r,()=>{const s=Ke();if(i==="deleteContentBackward"){if(s===null){const p=Ll();if(!De(p))return;Lr(p.clone())}if(De(s)){const p=s.anchor.key===s.focus.key;if(a=n.timeStamp,HA==="MediaLast"&&a<cd+30&&r.isComposing()&&p){if(kr(null),cd=0,setTimeout(()=>{xi(r,()=>{kr(null)})},30),De(s)){const g=s.anchor.getNode();g.markDirty(),We(g)||Be(142),YA(s,g)}}else{kr(null),n.preventDefault();const g=s.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),_=s.anchor.offset===0&&s.focus.offset===m.length;let y=n1&&p&&!_&&v;if(y&&s.isCollapsed()&&(y=!Ht(Db(s.anchor,!0))),!y){rt(r,ja,!0);const w=Ke();n1&&De(w)&&w.isCollapsed()&&(Ta=w,setTimeout(()=>Ta=null))}}return}}var a;if(!De(s))return;const c=n.data;ec!==null&&rw(!1,r,ec),s.dirty&&ec===null||!s.isCollapsed()||rr(s.anchor.getNode())||o===null||s.applyDOMRange(o),ec=null;const u=s.anchor,d=s.focus,f=u.getNode(),h=d.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":rt(r,gc,n);break;case"insertFromComposition":kr(null),rt(r,gc,n);break;case"insertLineBreak":kr(null),rt(r,pc,!1);break;case"insertParagraph":kr(null),ud&&!Rc?(ud=!1,rt(r,pc,!1)):rt(r,Dd,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":rt(r,Uy,n);break;case"deleteByComposition":(function(p,g){return p!==g||ke(p)||ke(g)||!Ua(p)||!Ua(g)})(f,h)&&rt(r,kb,n);break;case"deleteByDrag":case"deleteByCut":rt(r,kb,n);break;case"deleteContent":rt(r,ja,!1);break;case"deleteWordBackward":rt(r,Md,!0);break;case"deleteWordForward":rt(r,Md,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":rt(r,Fd,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":rt(r,Fd,!1);break;case"formatStrikeThrough":rt(r,ds,"strikethrough");break;case"formatBold":rt(r,ds,"bold");break;case"formatItalic":rt(r,ds,"italic");break;case"formatUnderline":rt(r,ds,"underline");break;case"historyUndo":rt(r,By,void 0);break;case"historyRedo":rt(r,qy,void 0)}else{if(c===`
|
|
396
|
+
`)n.preventDefault(),rt(r,pc,!1);else if(c===na)n.preventDefault(),rt(r,Dd,void 0);else if(c==null&&n.dataTransfer){const p=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(p)}else c!=null&&WA(s,o,c,n.timeStamp,!0)?(n.preventDefault(),rt(r,gc,c)):ec=c;KA=n.timeStamp}})})(t,e)]);let cd=0,HA=null,KA=0,ec=null;const Cb=new WeakMap,ip=new WeakMap;let Ab=!1,Pb=!1,ud=!1,Ou=!1,km=!1,Sm="",Ta=null,GA=[0,"",0,"root",0];function WA(t,e,n,r,i){const o=t.anchor,s=t.focus,a=o.getNode(),c=zn(),u=go(Vi(c)),d=u!==null?u.anchorNode:null,f=o.key,h=c.getElementByKey(f),p=n.length;return f!==s.key||!We(a)||(!i&&(!Jh||KA<r+50)||a.isDirty()&&p<2||_2(n))&&o.offset!==s.offset&&!a.isComposing()||ss(a)||a.isDirty()&&p>1||(i||!Jh)&&h!==null&&!a.isComposing()&&d!==zc(h)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||a.getFormat()!==t.format||a.getStyle()!==t.style||(function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const v=g.anchor.offset,_=m.getParentOrThrow(),y=Ua(m);return v===0?!m.canInsertTextBefore()||!_.canInsertTextBefore()&&!m.isComposing()||y||(function(w){const x=w.getPreviousSibling();return(We(x)||ke(x)&&x.isInline())&&!x.canInsertTextAfter()})(m):v===m.getTextContentSize()&&(!m.canInsertTextAfter()||!_.canInsertTextAfter()&&!m.isComposing()||y)})(t,a)}function p1(t,e){return Ns(t)&&t.nodeValue!==null&&e!==0&&e!==t.nodeValue.length}function g1(t,e,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t;Ab&&(Ab=!1,p1(r,i)&&p1(o,s)&&!Ta)||xi(e,()=>{if(!n)return void Lr(null);if(!_f(e,r,o))return;let a=Ke();if(Ta&&De(a)&&a.isCollapsed()){const c=a.anchor,u=Ta.anchor;(c.key===u.key&&c.offset===u.offset+1||c.offset===1&&u.getNode().is(c.getNode().getPreviousSibling()))&&(a=Ta.clone(),Lr(a))}if(Ta=null,De(a)){const c=a.anchor,u=c.getNode();if(a.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(a.dirty=!0);const d=Vi(e).event,f=d?d.timeStamp:performance.now(),[h,p,g,m,v]=GA,_=Qn(),y=e.isComposing()===!1&&_.getTextContent()==="";if(f<v+200&&c.offset===g&&c.key===m)xh(a,h,p);else if(c.type==="text")We(u)||Be(141),YA(a,u);else if(c.type==="element"&&!y){ke(u)||Be(259);const w=c.getNode();w.isEmpty()?(function(x,E){const $=E.getTextFormat(),C=E.getTextStyle();xh(x,$,C)})(a,w):xh(a,0,"")}}else{const d=c.key,f=a.focus.key,h=a.getNodes(),p=h.length,g=a.isBackward(),m=g?s:i,v=g?i:s,_=g?f:d,y=g?d:f;let w=2047,x=!1;for(let E=0;E<p;E++){const $=h[E],C=$.getTextContentSize();if(We($)&&C!==0&&!(E===0&&$.__key===_&&m===C||E===p-1&&$.__key===y&&v===0)&&(x=!0,w&=$.getFormat(),w===0))break}a.format=x?w:0}}rt(e,OA,void 0)})}function xh(t,e,n){t.format===e&&t.style===n||(t.format=e,t.style=n,t.dirty=!0)}function YA(t,e){xh(t,e.getFormat(),e.getStyle())}function JA(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function Yf(t,e){const n=t._compositionKey;if(kr(null),n!==null&&e!=null){if(e===""){const r=Dn(n),i=zc(t.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&We(r)&&iw(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
397
|
+
`){const r=Ke();if(De(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void rt(t,rp,null)}}}rw(!0,t,e)}function XA(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const mc=new Map;function ZA(t){const e=p6(t.target);if(e===null)return;const n=pg(e.anchorNode);if(n===null)return;Pb&&(Pb=!1,xi(n,()=>{const c=Ll(),u=e.anchorNode;(Pn(u)||Ns(u))&&Lr(Gy(c,e,n,t))}));const r=nw(n),i=r[r.length-1],o=i._key,s=mc.get(o),a=s||i;a!==n&&g1(e,a,!1),g1(e,n,!0),n!==i?mc.set(o,n):s&&mc.delete(o)}function m1(t){t._lexicalHandled=!0}function v1(t){return t._lexicalHandled===!0}function Nq(t){const e=Cb.get(t);if(e===void 0)return;const n=ip.get(e);if(n===void 0)return;const r=n-1;r>=0||Be(164),Cb.delete(t),ip.set(e,r),r===0&&e.removeEventListener("selectionchange",ZA);const i=gg(t);tw(i)?((function(s){if(s._parentEditor!==null){const a=nw(s),c=a[a.length-1]._key;mc.get(c)===s&&mc.delete(c)}else mc.delete(s._key)})(i),t.__lexicalEditor=null):i&&Be(198);const o=XA(t);for(let s=0;s<o.length;s++)o[s]();t.__lexicalEventHandles=[]}function Lb(t,e,n){vr();const r=t.__key,i=t.getParent();if(i===null)return;const o=(function(a){const c=Ke();if(!De(c)||!ke(a))return c;const{anchor:u,focus:d}=c,f=u.getNode(),h=d.getNode();return Mb(f,a)&&u.set(a.__key,0,"element"),Mb(h,a)&&d.set(a.__key,0,"element"),c})(t);let s=!1;if(De(o)&&e){const a=o.anchor,c=o.focus;a.key===r&&(ap(a,t,i,t.getPreviousSibling(),t.getNextSibling()),s=!0),c.key===r&&(ap(c,t,i,t.getPreviousSibling(),t.getNextSibling()),s=!0)}else Gr(o)&&e&&t.isSelected()&&t.selectPrevious();if(De(o)&&e&&!s){const a=t.getIndexWithinParent();Ba(t),sp(o,i,a,-1)}else Ba(t);n||$i(i)||i.canBeEmpty()||!i.isEmpty()||Lb(i,e),e&&o&&rr(i)&&i.isEmpty()&&i.selectEnd()}const QA=Symbol.for("ephemeral");function op(t){return t[QA]||!1}class Do{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=bg(this);return e===void 0&&Be(64,this.name),e}static clone(e){Be(65,this.name)}$config(){return{}}config(e,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:e}),{[e]:n}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),s6(this,e)}getType(){return this.__type}isInline(){Be(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=Dn(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Ke();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(We(this))return r;if(De(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Ht(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Dn(e)}getParentOrThrow(){const e=this.getParent();return e===null&&Be(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if($i(n))return ke(e)||e===this&&Ht(e)||Be(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&Be(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Dn(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Dn(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=ke(this)?this:this.getParent(),r=ke(e)?e:e.getParent(),i=n&&r?Sh(n,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const n=Sh(this,e);return n!==null&&(n.type==="descendant"||(n.type==="branch"?$2(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&Be(279),!1)))}isParentOf(e){const n=Sh(this,e);return n!==null&&n.type==="ancestor"}getNodesBetween(e){const n=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===e)break;const a=ke(o)?n?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;continue}const c=n?o.getNextSibling():o.getPreviousSibling();if(c!==null){o=c;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let d=null,f=u;do{if(f===null&&Be(68),d=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||r.push(f)}while(d===null);o=d}return n||r.reverse(),r}isDirty(){const e=zn()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(op(this))return this;const e=Dn(this.__key);return e===null&&Be(113),e}getWritable(){if(op(this))return this;vr();const e=ma(),n=zn(),r=e._nodeMap,i=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,a=Ke();if(a!==null&&a.setCachedNodes(null),s.has(i))return cp(o),o;const c=E2(o);return s.add(i),cp(c),r.set(i,c),c}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){Be(70)}updateDOM(e,n,r){Be(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){Be(18,this.name)}updateFromJSON(e){return(function(n,r){const i=n.getWritable(),o=r.$;let s=o;for(const a of CA(i).flatKeys)a in r&&(s!==void 0&&s!==o||(s={...o}),s[a]=r[a]);return(i.__state||s)&&$A(n).updateFromJSON(s),i})(this,e)}static transform(){return null}remove(e){Lb(this,!0,e)}replace(e,n){vr();let r=Ke();r!==null&&(r=r.clone()),Pm(this,e);const i=this.getLatest(),o=this.__key,s=e.__key,a=e.getWritable(),c=this.getParentOrThrow().getWritable(),u=c.__size;Ba(a);const d=i.getPreviousSibling(),f=i.getNextSibling(),h=i.__prev,p=i.__next,g=i.__parent;if(Lb(i,!1,!0),d===null?c.__first=s:d.getWritable().__next=s,a.__prev=h,f===null?c.__last=s:f.getWritable().__prev=s,a.__next=p,a.__parent=g,c.__size=u,n&&(ke(this)&&ke(a)||Be(139),this.getChildren().forEach(m=>{a.append(m)})),De(r)){Lr(r);const m=r.anchor,v=r.focus;m.key===o&&w1(m,a),v.key===o&&w1(v,a)}return Bs()===o&&kr(s),a}insertAfter(e,n=!0){vr(),Pm(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.getParent(),s=Ke();let a=!1,c=!1;if(o!==null){const p=e.getIndexWithinParent();if(Ba(i),De(s)){const g=o.__key,m=s.anchor,v=s.focus;a=m.type==="element"&&m.key===g&&m.offset===p+1,c=v.type==="element"&&v.key===g&&v.offset===p+1}}const u=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=r.__next;if(u===null?d.__last=f:u.getWritable().__prev=f,d.__size++,r.__next=f,i.__next=h,i.__prev=r.__key,i.__parent=r.__parent,n&&De(s)){const p=this.getIndexWithinParent();sp(s,d,p+1);const g=d.__key;a&&s.anchor.set(g,p+2,"element"),c&&s.focus.set(g,p+2,"element")}return e}insertBefore(e,n=!0){vr(),Pm(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.__key;Ba(i);const s=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),c=r.__prev,u=this.getIndexWithinParent();s===null?a.__first=o:s.getWritable().__next=o,a.__size++,r.__prev=o,i.__prev=c,i.__next=r.__key,i.__parent=r.__parent;const d=Ke();return n&&De(d)&&sp(d,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return Sn()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){vr();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(ke(r))return r.select();if(!We(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,n)}selectNext(e,n){vr();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(ke(r))return r.select(0,0);if(!We(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,n)}markDirty(){this.getWritable()}reconcileObservedMutation(e,n){this.markDirty()}}const Nb="historic",Oq="history-push",dd="history-merge",Iq="paste",Rq="collaboration",Dq="skip-scroll-into-view",Mq="skip-dom-selection",Fq="skip-selection-focus";class du extends Do{static getType(){return"linebreak"}static clone(e){return new du(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
398
398
|
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(n){const r=n.parentElement;if(r!==null&&up(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Jf(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&Jf(o))return!0}}return!1})(e)||(function(n){const r=n.parentElement;if(r!==null&&up(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Jf(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&Jf(o))return!0}return!1})(e)?null:{conversion:zq,priority:0}}}static importJSON(e){return Pi().updateFromJSON(e)}}function zq(t){return{node:Pi()}}function Pi(){return yi(new du)}function Rn(t){return t instanceof du}function Jf(t){return Ns(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function Em(t,e){return 16&e?"code":e&bA?"mark":32&e?"sub":64&e?"sup":null}function Tm(t,e){return 1&e?"strong":2&e?"em":"span"}function e2(t,e,n,r,i){const o=r.classList;let s=vc(i,"base");s!==void 0&&o.add(...s),s=vc(i,"underlineStrikethrough");let a=!1;const c=8&e&&4&e;s!==void 0&&(8&n&&4&n?(a=!0,c||o.add(...s)):c&&o.remove(...s));for(const u in ll){const d=ll[u];if(s=vc(i,u),s!==void 0)if(n&d){if(a&&(u==="underline"||u==="strikethrough")){e&d&&o.remove(...s);continue}((e&d)===0||c&&u==="underline"||u==="strikethrough")&&o.add(...s)}else e&d&&o.remove(...s)}}function t2(t,e,n){const r=e.firstChild,i=n.isComposing(),o=t+(i?lg:"");if(r==null)e.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||al){const[a,c,u]=(function(d,f){const h=d.length,p=f.length;let g=0,m=0;for(;g<h&&g<p&&d[g]===f[g];)g++;for(;m+g<h&&m+g<p&&d[h-m-1]===f[p-m-1];)m++;return[g,h-g-m,f.slice(g,p-m)]})(s,o);c!==0&&r.deleteData(a,c),r.insertData(a,u)}else r.nodeValue=o}}function b1(t,e,n,r,i,o){t2(i,t,e);const s=o.theme.text;s!==void 0&&e2(0,0,r,t,s)}function Xf(t,e){const n=document.createElement(e);return n.appendChild(t),n}class Ls extends Do{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new Ls(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",n){super(n),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return dq[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Bs()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const n=ll[e];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){return lp(this.getLatest().__format,e,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,n){const r=this.__format,i=Em(0,r),o=Tm(0,r),s=i===null?o:i,a=document.createElement(s);let c=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(c=document.createElement(o),a.appendChild(c)),b1(c,this,0,r,this.__text,e);const u=this.__style;return u!==""&&(a.style.cssText=u),a}updateDOM(e,n,r){const i=this.__text,o=e.__format,s=this.__format,a=Em(0,o),c=Em(0,s),u=Tm(0,o),d=Tm(0,s);if((a===null?u:a)!==(c===null?d:c))return!0;if(a===c&&u!==d){const m=n.firstChild;m==null&&Be(48);const v=document.createElement(d);return b1(v,this,0,s,i,r),n.replaceChild(v,m),!1}let f=n;c!==null&&a!==null&&(f=n.firstChild,f==null&&Be(49)),t2(i,f,this);const h=r.theme.text;h!==void 0&&o!==s&&e2(0,o,s,f,h);const p=e.__style,g=this.__style;return p!==g&&(n.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:qq,priority:0}),b:()=>({conversion:Uq,priority:0}),code:()=>({conversion:ns,priority:0}),em:()=>({conversion:ns,priority:0}),i:()=>({conversion:ns,priority:0}),mark:()=>({conversion:ns,priority:0}),s:()=>({conversion:ns,priority:0}),span:()=>({conversion:jq,priority:0}),strong:()=>({conversion:ns,priority:0}),sub:()=>({conversion:ns,priority:0}),sup:()=>({conversion:ns,priority:0}),u:()=>({conversion:ns,priority:0})}}static importJSON(e){return In().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return Pn(n)||Be(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Xf(n,"b")),this.hasFormat("italic")&&(n=Xf(n,"i")),this.hasFormat("strikethrough")&&(n=Xf(n,"s")),this.hasFormat("underline")&&(n=Xf(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?ll[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?lq[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=lp(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=uq[e];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){vr();let r=e,i=n;const o=Ke(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const c=s.length;r===void 0&&(r=c),i===void 0&&(i=c)}else r=0,i=0;if(!De(o))return i2(a,r,a,i,"text","text");{const c=Bs();c!==o.anchor.key&&c!==o.focus.key||kr(a),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,r,i){const o=this.getWritable(),s=o.__text,a=r.length;let c=e;c<0&&(c=a+c,c<0&&(c=0));const u=Ke();if(i&&De(u)){const f=e+a;u.setTextNodeRange(o,f,o,f)}const d=s.slice(0,c)+r+s.slice(c+n);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){vr();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=Bs(),s=r.length;e.sort((k,T)=>k-T),e.push(s);const a=[],c=e.length;for(let k=0,T=0;k<s&&T<=c;T++){const A=e[T];A>k&&(a.push(r.slice(k,A)),k=A)}const u=a.length;if(u===1)return[n];const d=a[0],f=n.getParent();let h;const p=n.getFormat(),g=n.getStyle(),m=n.__detail;let v=!1,_=null,y=null;const w=Ke();if(De(w)){const[k,T]=w.isBackward()?[w.focus,w.anchor]:[w.anchor,w.focus];k.type==="text"&&k.key===i&&(_=k),T.type==="text"&&T.key===i&&(y=T)}n.isSegmented()?(h=In(d),h.__format=p,h.__style=g,h.__detail=m,h.__state=l1(n,h),v=!0):h=n.setTextContent(d);const x=[h];for(let k=1;k<u;k++){const T=In(a[k]);T.__format=p,T.__style=g,T.__detail=m,T.__state=l1(n,T);const A=T.__key;o===i&&kr(A),x.push(T)}const E=_?_.offset:null,$=y?y.offset:null;let C=0;for(const k of x){if(!_&&!y)break;const T=C+k.getTextContentSize();if(_!==null&&E!==null&&E<=T&&E>=C&&(_.set(k.getKey(),E-C,"text"),E<T&&(_=null)),y!==null&&$!==null&&$<=T&&$>=C){y.set(k.getKey(),$-C,"text");break}C=T}if(f!==null){(function(A){const P=A.getPreviousSibling(),L=A.getNextSibling();P!==null&&cp(P),L!==null&&cp(L)})(this);const k=f.getWritable(),T=this.getIndexWithinParent();v?(k.splice(T,0,x),this.remove()):k.splice(T,1,x),De(w)&&sp(w,f,T,u-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||Be(50);const r=this.__key,i=e.__key,o=this.__text,s=o.length;Bs()===i&&kr(r);const a=Ke();if(De(a)){const f=a.anchor,h=a.focus;f!==null&&f.key===i&&C1(f,n,r,e,s),h!==null&&h.key===i&&C1(h,n,r,e,s)}const c=e.__text,u=n?c+o:o+c;this.setTextContent(u);const d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}}function jq(t){return{forChild:Ky(t.style),node:null}}function Uq(t){const e=t,n=e.style.fontWeight==="normal";return{forChild:Ky(e.style,n?void 0:"bold"),node:null}}const _1=new WeakMap;function Bq(t){if(!Pn(t))return!1;if(t.nodeName==="PRE")return!0;const e=t.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function qq(t){const e=t;t.parentElement===null&&Be(129);let n=e.textContent||"";if((function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=_1.get(o))===void 0&&!Bq(o);)s.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let c=0;c<s.length;c++)_1.set(s[c],a);return a})(e)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const a=r[s];a===`
|
|
399
399
|
`||a===`\r
|
|
400
400
|
`?i.push(Pi()):a===" "?i.push(lo()):a!==""&&i.push(In(a))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=e,i=!0;for(;r!==null&&(r=y1(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=y1(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:In(n)}}function y1(t,e){let n=t;for(;;){let r;for(;(r=e?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,Pn(n)){const o=n.style.display;if(o===""&&!jb(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=e?n.firstChild:n.lastChild)!==null;)n=i;if(Ns(n))return n;if(n.nodeName==="BR")return null}}const Vq={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ns(t){const e=Vq[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Ky(t.style,e),node:null}}function In(t=""){return yi(new Ls(t))}function We(t){return t instanceof Ls}function Ky(t,e){const n=t.fontWeight,r=t.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),s=t.fontStyle==="italic",a=r.includes("underline"),c=t.verticalAlign;return u=>(We(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),c!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),c!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class fu extends Ls{static getType(){return"tab"}static clone(e){return new fu(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const n=super.createDOM(e),r=vc(e.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(e){return lo().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&gA(126),super.setTextContent(" ")}spliceText(e,n,r,i){return r===""&&n===0||r===" "&&n===1||Be(286),this}setDetail(e){return e!==2&&Be(127),this}setMode(e){return e!=="normal"&&Be(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function lo(){return yi(new fu)}function Qr(t){return t instanceof fu}class Hq{key;offset;type;_selection;constructor(e,n,r){this._selection=null,this.key=e,this.offset=n,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:T2(ro(ks(this,"next")),ro(ks(e,"next")))<0}getNode(){const e=Dn(this.key);return e===null&&Be(20),e}set(e,n,r,i){const o=this._selection,s=this.key;i&&this.key===e&&this.offset===n&&this.type===r||(this.key=e,this.offset=n,this.type=r,mf()||(Bs()===s&&kr(e),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function bi(t,e,n){return new Hq(t,e,n)}function $m(t,e){let n=e.__key,r=t.offset,i="element";if(We(e)){i="text";const o=e.getTextContentSize();r>o&&(r=o)}else if(!ke(e)){const o=e.getNextSibling();if(We(o))n=o.__key,r=0,i="text";else{const s=e.getParent();s&&(n=s.__key,r=e.getIndexWithinParent()+1)}}t.set(n,r,i)}function w1(t,e){if(ke(e)){const n=e.getLastDescendant();ke(n)||We(n)?$m(t,n):$m(t,e)}else $m(t,e)}class dg{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Gr(e))return!1;const n=this._nodes,r=e._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new dg(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(We(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,r=[];for(const i of n){const o=Dn(i);o!==null&&r.push(o)}return mf()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let n="";for(let r=0;r<e.length;r++)n+=e[r].getTextContent();return n}deleteNodes(){const e=this.getNodes();if((Ke()||Ll())===this&&e[0]){const n=yr(e[0],"next");C2(xs(n,n))}for(const n of e)n.remove()}}function De(t){return t instanceof Pl}class Pl{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,n,r,i){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!De(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=(function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,c=new Set;for(const u of r)if(Mo(u)){const{origin:d}=u;i.length===0?a.add(d):(c.add(d),i.push(d))}else{const{origin:d}=u;ke(d)&&c.has(d)||i.push(d)}if(s&&i.push(s.caret.origin),pl(r.focus)&&ke(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=qo(r.focus.origin,"previous");Mo(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=uw(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!ke(u)||c.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=ro(r.anchor),d=ro(r.anchor.getFlipped()),f=p=>Xs(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(r.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(gw(W1(this),"next"));return mf()||(this._cachedNodes=n),n}setTextNodeRange(e,n,r,i){this.anchor.set(e.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[a,c]=Ob(this);let u="",d=!0;for(let f=0;f<e.length;f++){const h=e[f];if(ke(h)&&!h.isInline())d||(u+=`
|
|
401
|
-
`),d=!h.isEmpty();else if(d=!1,We(h)){let p=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=a<c?p.slice(a,c):p.slice(c,a)):p=s?p.slice(a):p.slice(c):h===r&&(p=s?p.slice(0,c):p.slice(0,a)),u+=p}else!Ht(h)&&!Rn(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(e){const n=
|
|
401
|
+
`),d=!h.isEmpty();else if(d=!1,We(h)){let p=h.getTextContent();h===n?h===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=a<c?p.slice(a,c):p.slice(c,a)):p=s?p.slice(a):p.slice(c):h===r&&(p=s?p.slice(0,c):p.slice(0,a)),u+=p}else!Ht(h)&&!Rn(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(e){const n=zn(),r=n.getEditorState()._selection,i=r2(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,r);if(i===null)return;const[o,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),Dc(this)}clone(){const e=this.anchor,n=this.focus;return new Pl(bi(e.key,e.offset,e.type),bi(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=lp(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=ll[e];return(this.format&n)!==0}insertRawText(e){const n=e.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const s=n[o];s===`
|
|
402
402
|
`||s===`\r
|
|
403
|
-
`?r.push(Pi()):s===" "?r.push(lo()):r.push(In(s))}this.insertNodes(r)}insertText(e){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,a=n),s.type==="element"&&(function(v,_,y,w){const x=v.getNode(),E=x.getChildAtIndex(v.offset),$=In();if($.setFormat(y),$.setStyle(w),bf(E))E.splice(0,0,[$]);else{const C=rr(x)?Sn().append($):$;E===null?x.append(C):E.insertBefore(C)}v.is(_)&&_.set($.__key,0,"text"),v.set($.__key,0,"text")})(s,a,i,o),a.type==="element"&&jd(a,ro(ks(a,"next")));const c=s.offset;let u=a.offset;const d=this.getNodes(),f=d.length;let h=d[0];We(h)||Be(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&a.type==="element"&&(u=p,a.set(s.key,u,"text")),this.isCollapsed()&&c===p&&(ss(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){let v=h.getNextSibling();if(We(v)&&v.canInsertTextBefore()&&!ss(v)||(v=In(),v.setFormat(i),v.setStyle(o),g.canInsertTextAfter()?h.insertAfter(v):g.insertAfter(v)),v.select(0,0),h=v,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&c===0&&(ss(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){let v=h.getPreviousSibling();if(We(v)&&!ss(v)||(v=In(),v.setFormat(i),g.canInsertTextBefore()?h.insertBefore(v):g.insertBefore(v)),v.select(),h=v,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&c!==p){const v=In(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&e!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||ke(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),n2(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(Ua(h)){const w=In(e);return w.select(),void h.replace(w)}const v=h.getFormat(),_=h.getStyle();if(c!==u||v===i&&_===o){if(Qr(h)){const w=In(e);return w.setFormat(i),w.setStyle(o),w.select(),void h.replace(w)}}else{if(h.getTextContent()!==""){const w=In(e);if(w.setFormat(i),w.setStyle(o),w.select(),c===0)h.insertBefore(w,!1);else{const[x]=h.splitText(c);x.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(o)}const y=u-c;h=h.spliceText(c,y,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=v,this.style=_))}else{const v=new Set([...h.getParentKeys(),...m.getParentKeys()]),_=ke(h)?h:h.getParentOrThrow();let y=ke(m)?m:m.getParentOrThrow(),w=m;if(!_.is(y)&&y.isInline())do w=y,y=y.getParentOrThrow();while(y.isInline());if(a.type==="text"&&(u!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<u)if(We(m)&&!Ua(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const k=In(m.getTextContent());m.replace(k),m=k}rr(a.getNode())||a.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else v.add(m.__key);const x=y.getChildren(),E=new Set(d),$=_.is(y),C=_.isInline()&&h.getNextSibling()===null?_:h;for(let k=x.length-1;k>=0;k--){const T=x[k];if(T.is(h)||ke(T)&&T.isParentOf(h))break;T.isAttached()&&(!E.has(T)||T.is(w)?$||C.insertAfter(T,!1):T.remove())}if(!$){let k=y,T=null;for(;k!==null;){const A=k.getChildren(),P=A.length;(P===0||A[P-1].is(T))&&(v.delete(k.__key),T=k),k=k.getParent()}}if(Ua(h))if(c===p)h.select();else{const k=In(e);k.select(),h.replace(k)}else h=h.spliceText(c,p-c,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<f;k++){const T=d[k],A=T.__key;v.has(A)||T.remove()}}}removeText(){const e=Ke()===this;Eh(this,C6(W1(this))),e&&Ke()!==this&&Lr(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void kr(null);const r=this.getNodes(),i=[];for(const x of r)We(x)&&i.push(x);const o=x=>{r.forEach(E=>{if(ke(E)){const $=E.getFormatFlags(e,x);E.setTextFormat($)}})},s=i.length;if(s===0)return this.toggleFormat(e),kr(null),void o(n);const a=this.anchor,c=this.focus,u=this.isBackward(),d=u?c:a,f=u?a:c;let h=0,p=i[0],g=d.type==="element"?0:d.offset;if(d.type==="text"&&g===p.getTextContentSize()&&(h=1,p=i[1],g=0),p==null)return;const m=p.getFormatFlags(e,n);o(m);const v=s-1;let _=i[v];const y=f.type==="text"?f.offset:_.getTextContentSize();if(p.is(_)){if(g===y)return;if(ss(p)||g===0&&y===p.getTextContentSize())p.setFormat(m);else{const x=p.splitText(g,y),E=g===0?x[0]:x[1];E.setFormat(m),d.type==="text"&&d.set(E.__key,0,"text"),f.type==="text"&&f.set(E.__key,y-g,"text")}return void(this.format=m)}g===0||ss(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const w=_.getFormatFlags(e,m);y>0&&(y===_.getTextContentSize()||ss(_)||([_]=_.splitText(y)),_.setFormat(w));for(let x=h+1;x<v;x++){const E=i[x],$=E.getFormatFlags(e,w);E.setFormat($)}d.type==="text"&&d.set(p.__key,g,"text"),f.type==="text"&&f.set(_.__key,y,"text"),this.format=m|w}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=Ke();return De(g)||Be(134),g.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=ei(n,zi),i=e[e.length-1];if(ke(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=Cm(this);r.splice(g,0,e),i.selectEnd()}return}if(!e.some(g=>(ke(g)||Ht(g))&&!g.isInline())){ke(r)||Be(211,n.constructor.name,n.getType());const g=Cm(this);return r.splice(g,0,e),void i.selectEnd()}const o=(function(g){const m=Sn();let v=null;for(let _=0;_<g.length;_++){const y=g[_],w=Rn(y);if(w||Ht(y)&&y.isInline()||ke(y)&&y.isInline()||We(y)||y.isParentRequired()){if(v===null&&(v=y.createParentElementNode(),m.append(v),w))continue;v!==null&&v.append(y)}else m.append(y),v=null}return m})(e),s=o.getLastDescendant(),a=o.getChildren(),c=!ke(r)||!r.isEmpty()?this.insertParagraph():null,u=a[a.length-1];let d=a[0];var f;ke(f=d)&&zi(f)&&!f.isEmpty()&&ke(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(ke(r)||Be(211,n.constructor.name,n.getType()),r.append(...d.getChildren()),d=a[1]),d&&(r===null&&Be(212,n.constructor.name,n.getType()),(function(g,m){const v=m.getParentOrThrow().getLastChild();let _=m;const y=[m];for(;_!==v;)_.getNextSibling()||Be(140),_=_.getNextSibling(),y.push(_);let w=g;for(const x of y)w=w.insertAfter(x)})(r,d));const h=ei(s,zi);c&&ke(h)&&(c.canMergeWhenEmpty()||zi(u))&&(h.append(...c.getChildren()),c.remove()),ke(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const p=ke(r)?r.getLastChild():null;Rn(p)&&h!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Sn();return Qn().splice(this.anchor.offset,0,[s]),s.select(),s}const e=Cm(this),n=ei(this.anchor.getNode(),zi);ke(n)||Be(213);const r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const n=Pi();if(this.insertNodes([n]),e){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],n=e.length;let r=e[0],i=e[n-1];const[o,s]=Ob(this),a=this.isBackward(),[c,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=a?[s,o]:[o,s];if(n===0)return[];if(n===1){if(We(r)&&!this.isCollapsed()){const h=r.splitText(d,f),p=d===0?h[0]:h[1];return p?(c.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(We(r)&&(d===r.getTextContentSize()?e.shift():d!==0&&([,r]=r.splitText(d),e[0]=r,c.set(r.getKey(),0,"text"))),We(i)){const h=i.getTextContent().length;f===0?e.pop():f!==h&&([i]=i.splitText(f),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,n,r){if(A1(this,e,n,r))return;const i=e==="move",o=Fn(),s=go(Vi(o));if(!s)return;const a=o._blockCursorElement,c=o._rootElement,u=this.focus.getNode();if(c===null||a===null||!ke(u)||u.isInline()||u.canBeEmpty()||Fb(a,o,c),this.dirty){let d=dl(o,this.anchor.key),f=dl(o,this.focus.key);this.anchor.type==="text"&&(d=zc(d)),this.focus.type==="text"&&(f=zc(f)),d&&f&&s2(s,d,this.anchor.offset,f,this.focus.offset)}if((function(d,f,h,p){d.modify(f,h,p)})(s,e,n?"backward":"forward",r),s.rangeCount>0){const d=s.getRangeAt(0),f=this.anchor.getNode(),h=rr(f)?f:f6(f);if(this.applyDOMRange(d),this.dirty=!0,!i){const p=this.getNodes(),g=[];let m=!1;for(let v=0;v<p.length;v++){const _=p[v];Mb(_,h)?g.push(_):m=!0}if(m&&g.length>0)if(n){const v=g[0];ke(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];ke(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}s.anchorNode===d.startContainer&&s.anchorOffset===d.startOffset||(function(v){const _=v.focus,y=v.anchor,w=y.key,x=y.offset,E=y.type;y.set(_.key,_.offset,_.type,!0),_.set(w,x,E,!0)})(this)}}r==="lineboundary"&&A1(this,e,n,r,"decorators")}forwardDeletion(e,n,r){if(!r&&(e.type==="element"&&ke(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(ke(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=fw(ks(r,e?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const c of o.iterNodeCarets("shadowRoot"))if(Mo(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(a.type==="merge-block")break;if(ke(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=ro(c);Eh(this,xs(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:c,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(pl(c)){if(ke(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(o.anchor.origin))break}else a={block:c.origin,type:"merge-next-block"};continue}if(Ht(c.origin)){if(!c.origin.isIsolated())if(a.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&ke(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=o2();u.add(c.origin.getKey()),Lr(u)}else c.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:c,block:u}=a;return Eh(this,xs(!c.origin.isEmpty()&&u.isEmpty()?pw(yr(u,c.direction)):o.anchor,c)),this.removeText()}}const s=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&k1(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const c=s.offset,u=a.getTextContentSize();if(a.is(i)||e&&c!==u||!e&&c!==0)return void S1(a,e,c)}else if(i!==null&&i.isSegmented()){const c=r.offset,u=i.getTextContentSize();if(i.is(a)||e&&c!==0||!e&&c!==u)return void S1(i,e,c)}(function(c,u){const d=c.anchor,f=c.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const g=d.offset,m=f.offset,v=g<m,_=v?g:m,y=v?m:g,w=y-1;_!==w&&(function(x){return!(_2(x)||Kq(x))})(h.getTextContent().slice(_,y))&&(u?f.set(f.key,w,f.type):d.set(d.key,w,d.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&rr(r.getParent())&&r.getPreviousSibling()===null&&k1(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Gr(t){return t instanceof dg}function x1(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Ob(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,r]=e;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[x1(n),x1(r)]}function k1(t,e){for(let n=e;n;n=n.getParent()){if(ke(n)){if(n.collapseAtStart(t))return!0;if($i(n))break}if(n.getPreviousSibling())break}return!1}const Kq=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function S1(t,e,n){const r=t,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const d=u===o-1;if(a=s,s+=i[u].length,e&&s===n||s>n||d){i.splice(u,1),d&&(a=void 0);break}}const c=i.join("").trim();c===""?r.remove():(r.setTextContent(c),r.select(a,a))}function E1(t,e,n,r){let i,o=e;if(Pn(t)){let s=!1;const a=t.childNodes,c=a.length,u=r._blockCursorElement;o===c&&(s=!0,o=c-1);let d=a[o],f=!1;if(d===u)d=a[o+1],f=!0;else if(u!==null){const h=u.parentNode;t===h&&e>Array.prototype.indexOf.call(h.children,u)&&o--}if(i=lc(d),We(i))o=Zs(i,s?"next":"previous");else{let h=lc(t);if(h===null)return null;if(ke(h)){const p=r.getElementByKey(h.getKey());p===null&&Be(214),[h,o]=h.getDOMSlot(p).resolveChildIndex(h,p,t,e),ke(h)||Be(215),s&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let m=h.getChildAtIndex(o);if(ke(m)&&(function(v,_,y){const w=v.getParent();return y===null||w===null||!w.canBeEmpty()||w!==y.getNode()})(m,0,n)){const v=s?m.getLastDescendant():m.getFirstDescendant();v===null?h=m:(m=v,h=ke(m)?m:m.getParentOrThrow()),o=0}We(m)?(i=m,h=null,o=Zs(m,s?"next":"previous")):m!==h&&s&&!f&&(ke(h)||Be(216),o=Math.min(h.getChildrenSize(),o+1))}else{const p=h.getIndexWithinParent();o=e===0&&Ht(h)&&lc(t)===h?p:p+1,h=h.getParentOrThrow()}if(ke(h))return bi(h.__key,o,"element")}}else i=lc(t);return We(i)?bi(i.__key,Zs(i,o,"clamp"),"text"):null}function T1(t,e,n){const r=t.offset,i=t.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(e){if((n||!e)&&o===null&&ke(s)&&s.isInline()){const a=s.getPreviousSibling();We(a)&&t.set(a.__key,a.getTextContent().length,"text")}}else ke(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):We(o)&&t.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(e&&ke(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&o===null&&ke(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();We(a)&&t.set(a.__key,0,"text")}}}function n2(t,e,n){if(t.type==="text"&&e.type==="text"){const r=t.isBefore(e),i=t.is(e);T1(t,r,i),T1(e,!r,i),i&&e.set(t.key,t.offset,t.type);const o=Fn();if(o.isComposing()&&o._compositionKey!==t.key&&De(n)){const s=n.anchor,a=n.focus;t.set(s.key,s.offset,s.type,!0),e.set(a.key,a.offset,a.type,!0)}}}function r2(t,e,n,r,i,o){if(t===null||n===null||!_f(i,t,n))return null;const s=E1(t,e,De(o)?o.anchor:null,i);if(s===null)return null;const a=E1(n,r,De(o)?o.focus:null,i);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const c=lc(t),u=lc(n);if(Ht(c)&&Ht(u))return null}return n2(s,a,o),[s,a]}function Ib(t){return ke(t)&&!t.isInline()}function i2(t,e,n,r,i,o){const s=ma(),a=new Pl(bi(t,e,i),bi(n,r,o),0,"");return a.dirty=!0,s._selection=a,a}function fg(){const t=bi("root",0,"element"),e=bi("root",0,"element");return new Pl(t,e,0,"")}function o2(){return new dg(new Set)}function Gy(t,e,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,a=s==="selectionchange",c=!gb&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,d,f,h;if(De(t)&&!c)return t.clone();if(e===null)return null;if(u=e.anchorNode,d=e.focusNode,f=e.anchorOffset,h=e.focusOffset,(a||s===void 0)&&De(t)&&!_f(n,u,d))return t.clone();const p=r2(u,f,d,h,n,t);if(p===null)return null;const[g,m]=p;return new Pl(g,m,De(t)?t.format:0,De(t)?t.style:"")}function Ke(){return ma()._selection}function Ll(){return Fn()._editorState._selection}function sp(t,e,n,r=1){const i=t.anchor,o=t.focus,s=i.getNode(),a=o.getNode();if(!e.is(s)&&!e.is(a))return;const c=e.__key;if(t.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(c,d,"element"),o.set(c,d,"element"),$1(t)}}else{const u=t.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(e.is(f)){const g=d.offset;(n<=g&&r>0||n<g&&r<0)&&d.set(c,Math.max(0,g+r),"element")}if(e.is(p)){const g=h.offset;(n<=g&&r>0||n<g&&r<0)&&h.set(c,Math.max(0,g+r),"element")}}$1(t)}function $1(t){const e=t.anchor,n=e.offset,r=t.focus,i=r.offset,o=e.getNode(),s=r.getNode();if(t.isCollapsed()){if(!ke(o))return;const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),e.set(u.__key,d,"text"),r.set(u.__key,d,"text")}return}if(ke(o)){const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),e.set(u.__key,d,"text")}}if(ke(s)){const a=s.getChildrenSize(),c=i>=a,u=c?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}function ap(t,e,n,r,i){let o=null,s=0,a=null;r!==null?(o=r.__key,We(r)?(s=r.getTextContentSize(),a="text"):ke(r)&&(s=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,We(i)?a="text":ke(i)&&(a="element")),o!==null&&a!==null?t.set(o,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function C1(t,e,n,r,i){t.type==="text"?t.set(n,t.offset+(e?0:i),"text"):t.offset>r.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function s2(t,e,n,r,i){try{t.setBaseAndExtent(e,n,r,i)}catch{}}function Gq(t,e,n,r,i,o,s){const a=r.anchorNode,c=r.focusNode,u=r.anchorOffset,d=r.focusOffset,f=document.activeElement;if(i.has(Rq)&&f!==o||f!==null&&ew(f))return;if(!De(e))return void(t!==null&&_f(n,a,c)&&r.removeAllRanges());const h=e.anchor,p=e.focus,g=h.key,m=p.key,v=dl(n,g),_=dl(n,m),y=h.offset,w=p.offset,x=e.format,E=e.style,$=e.isCollapsed();let C=v,k=_,T=!1;if(h.type==="text"){C=zc(v);const M=h.getNode();T=M.getFormat()!==x||M.getStyle()!==E}else De(t)&&t.anchor.type==="text"&&(T=!0);var A,P,L,O,N;if(p.type==="text"&&(k=zc(_)),C!==null&&k!==null&&($&&(t===null||T||De(t)&&(t.format!==x||t.style!==E))&&(A=x,P=E,L=y,O=g,N=performance.now(),GA=[A,P,L,O,N]),u!==y||d!==w||a!==C||c!==k||r.type==="Range"&&$||(f!==null&&o.contains(f)||i.has(Fq)||o.focus({preventScroll:!0}),h.type==="element"))){if(s2(r,C,y,k,w),!i.has(Dq)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const M=De(e)&&e.anchor.type==="element"?C.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(M!==null){let U;if(M instanceof Text){const H=document.createRange();H.selectNode(M),U=H.getBoundingClientRect()}else U=M.getBoundingClientRect();(function(H,G,W){const Y=k2(W),R=sw(Y);if(Y===null||R===null)return;let{top:B,bottom:J}=G,Q=0,ee=0,te=W;for(;te!==null;){const re=te===Y.body;if(re)Q=0,ee=Vi(H).innerHeight;else{const pe=te.getBoundingClientRect();Q=pe.top,ee=pe.bottom}let he=0;if(B<Q?he=-(Q-B):J>ee&&(he=J-ee),he!==0)if(re)R.scrollBy(0,he);else{const pe=te.scrollTop;te.scrollTop+=he;const ce=te.scrollTop-pe;B-=ce,J-=ce}if(re)break;te=yf(te)}})(n,U,o)}}Ab=!0}}function hu(t){let e=Ke()||Ll();e===null&&(e=Qn().selectEnd()),e.insertNodes(t)}function Wq(){const t=Ke();return t===null?"":t.getTextContent()}function Cm(t){let e=t;t.isCollapsed()||e.removeText();const n=Ke();De(n)&&(e=n),De(e)||Be(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!zi(i);){const s=i;if([i,o]=Yq(i,o),s.is(i))break}return o}function Yq(t,e){const n=t.getParent();if(!n){const i=Sn();return Qn().append(i),i.select(),[Qn(),0]}if(We(t)){const i=t.splitText(e);if(i.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!ke(t)||e===0)return[n,t.getIndexWithinParent()];const r=t.getChildAtIndex(e);if(r){const i=new Pl(bi(t.__key,e,"element"),bi(t.__key,e,"element"),0,""),o=t.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function A1(t,e,n,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!t.isCollapsed()){const[d,f]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return f.set(d.key,d.offset,d.type),!0}const o=ks(t.focus,n?"previous":"next"),s=r==="lineboundary",a=e==="move";let c=o,u=i==="decorators-and-blocks";if(!A2(c)){for(const d of c){u=!1;const{origin:f}=d;if(!Ht(f)||f.isIsolated()||(c=d,!s||!f.isInline()))break}if(u)for(const d of fw(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Mo(d))d.origin.isInline()||(c=d);else{if(ke(d.origin))continue;Ht(d.origin)&&!d.origin.isInline()&&(c=d)}break}}if(c===o)return!1;if(a&&!s&&Ht(c.origin)&&c.origin.isKeyboardSelectable()){const d=o2();return d.add(c.origin.getKey()),Lr(d),!0}return c=ro(c),a&&jd(t.anchor,c),jd(t.focus,c),u||!s}let br=null,_r=null,gi=!1,Am=!1,kh=0;const P1={characterData:!0,childList:!0,subtree:!0};function mf(){return gi||br!==null&&br._readOnly}function vr(){gi&&Be(13)}function a2(){kh>99&&Be(14)}function ma(){return br===null&&Be(195,l2()),br}function Fn(){return _r===null&&Be(196,l2()),_r}function l2(){let t=0;const e=new Set,n=Fc.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=gg(i);if(tw(o))t++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let r=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function Jq(){return _r}function L1(t,e,n){const r=e.__type,i=p2(t,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let a=0;a<s&&(o[a](e),e.isAttached());a++);}function N1(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function c2(t,e){if(!e)return;const n=t._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)n.add(i)}function Xq(t){return Wy(t,Fn()._nodes)}function Wy(t,e){const n=t.type,r=e.get(n);r===void 0&&Be(17,n);const i=r.klass;t.type!==i.getType()&&Be(18,i.name);const o=i.importJSON(t),s=t.children;if(ke(o)&&Array.isArray(s))for(let a=0;a<s.length;a++){const c=Wy(s[a],e);o.append(c)}return o}function O1(t,e,n){const r=br,i=gi,o=_r;br=e,gi=!0,_r=t;try{return n()}finally{br=r,gi=i,_r=o}}function cs(t,e){const n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n===null)return;const o=t._editorState,s=o._selection,a=n._selection,c=t._dirtyType!==0,u=br,d=gi,f=_r,h=t._updating,p=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!i&&c&&p!==null){_r=t,br=n,gi=!1,t._updating=!0;try{const $=t._dirtyType,C=t._dirtyElements,k=t._dirtyLeaves;p.disconnect(),g=kq(o,n,t,$,C,k)}catch($){if($ instanceof Error&&t._onError($),Am)throw $;return f2(t,null,r,n),SA(t),t._dirtyType=2,Am=!0,cs(t,o),void(Am=!1)}finally{p.observe(r,P1),t._updating=h,br=u,gi=d,_r=f}}n._readOnly||(n._readOnly=!0);const m=t._dirtyLeaves,v=t._dirtyElements,_=t._normalizedNodes,y=t._updateTags,w=t._deferred;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function($,C){const k=$._decorators;let T=$._pendingDecorators||k;const A=C._nodeMap;let P;for(P in T)A.has(P)||(T===k&&(T=v2($)),delete T[P])})(t,n);const x=i?null:go(Vi(t));if(t._editable&&x!==null&&(c||a===null||a.dirty||!a.is(s))&&r!==null&&!y.has(Mq)){_r=t,br=n;try{if(p!==null&&p.disconnect(),c||a===null||a.dirty){const $=t._blockCursorElement;$!==null&&Fb($,t,r),Gq(s,a,t,x,y,r)}(function($,C,k){let T=$._blockCursorElement;if(De(k)&&k.isCollapsed()&&k.anchor.type==="element"&&C.contains(document.activeElement)){const A=k.anchor,P=A.getNode(),L=A.offset;let O=!1,N=null;if(L===P.getChildrenSize())Lm(P.getChildAtIndex(L-1))&&(O=!0);else{const M=P.getChildAtIndex(L);if(M!==null&&Lm(M)){const U=M.getPreviousSibling();(U===null||Lm(U))&&(O=!0,N=$.getElementByKey(M.__key))}}if(O){const M=$.getElementByKey(P.__key);return T===null&&($._blockCursorElement=T=(function(U){const H=U.theme,G=document.createElement("div");G.contentEditable="false",G.setAttribute("data-lexical-cursor","true");let W=H.blockCursor;if(W!==void 0){if(typeof W=="string"){const Y=vA(W);W=H.blockCursor=Y}W!==void 0&&G.classList.add(...W)}return G})($._config)),C.style.caretColor="transparent",void(N===null?M.appendChild(T):M.insertBefore(T,N))}}T!==null&&Fb(T,$,C)})(t,r,a)}finally{p!==null&&p.observe(r,P1),_r=f,br=u}}g!==null&&(function($,C,k,T,A){const P=Array.from($._listeners.mutation),L=P.length;for(let O=0;O<L;O++){const[N,M]=P[O];for(const U of M){const H=C.get(U);H!==void 0&&N(H,{dirtyLeaves:T,prevEditorState:A,updateTags:k})}}})(t,g,y,m,o),De(a)||a===null||s!==null&&s.is(a)||t.dispatchCommand(OA,void 0);const E=t._pendingDecorators;E!==null&&(t._decorators=E,t._pendingDecorators=null,fd("decorator",t,!0,E)),(function($,C,k){const T=F1(C),A=F1(k);T!==A&&fd("textcontent",$,!0,A)})(t,e||o,n),fd("update",t,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,mutatedNodes:g,normalizedNodes:_,prevEditorState:e||o,tags:y}),(function($,C){if($._deferred=[],C.length!==0){const k=$._updating;$._updating=!0;try{for(let T=0;T<C.length;T++)C[T]()}finally{$._updating=k}}})(t,w),(function($){const C=$._updates;if(C.length!==0){const k=C.shift();if(k){const[T,A]=k;hg($,T,A)}}})(t)}function fd(t,e,n,...r){const i=e._updating;e._updating=n;try{const o=Array.from(e._listeners[t]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{e._updating=i}}function I1(t,e){const n=t._updates;let r=e||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i,a=t._pendingEditorState;let c;s!==void 0&&(c=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&Be(191),a._flushSync=!0),c&&t._deferred.push(c),c2(t,s.tag)),a==null?hg(t,o,s):o()}}return r}function hg(t,e,n){const r=t._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,c2(t,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&t._deferred.push(i);const a=t._editorState;let c=t._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=t._pendingEditorState=u2(c||a),u=!0),c._flushSync=s;const d=br,f=gi,h=_r,p=t._updating;br=c,gi=!1,t._updating=!0,_r=t;const g=t._headless||t.getRootElement()===null;Zy(null);try{u&&(g?a._selection!==null&&(c._selection=a._selection.clone()):c._selection=(function(y,w){const x=y.getEditorState()._selection,E=go(Vi(y));return De(x)||x==null?Gy(x,E,y,w):x.clone()})(t,n&&n.event||null));const v=t._compositionKey;e(),o=I1(t,o),(function(y,w){const x=w.getEditorState()._selection,E=y._selection;if(De(E)){const $=E.anchor,C=E.focus;let k;if($.type==="text"&&(k=$.getNode(),k.selectionTransform(x,E)),C.type==="text"){const T=C.getNode();k!==T&&T.selectionTransform(x,E)}}})(c,t),t._dirtyType!==0&&(o?(function(y,w){const x=w._dirtyLeaves,E=y._nodeMap;for(const $ of x){const C=E.get($);We(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&d1(C)}})(c,t):(function(y,w){const x=w._dirtyLeaves,E=w._dirtyElements,$=y._nodeMap,C=Bs(),k=new Map;let T=x,A=T.size,P=E,L=P.size;for(;A>0||L>0;){if(A>0){w._dirtyLeaves=new Set;for(const O of T){const N=$.get(O);We(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&d1(N),N!==void 0&&N1(N,C)&&L1(w,N,k),x.add(O)}if(T=w._dirtyLeaves,A=T.size,A>0){kh++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const O of P){const N=O[0],M=O[1];if(E.set(N,M),!M)continue;const U=$.get(N);U!==void 0&&N1(U,C)&&L1(w,U,k)}T=w._dirtyLeaves,A=T.size,P=w._dirtyElements,L=P.size,kh++}w._dirtyLeaves=x,w._dirtyElements=E})(c,t),I1(t),(function(y,w,x,E){const $=y._nodeMap,C=w._nodeMap,k=[];for(const[T]of E){const A=C.get(T);A!==void 0&&(A.isAttached()||(ke(A)&&wA(A,T,$,C,k,E),$.has(T)||E.delete(T),k.push(T)))}for(const T of k)C.delete(T);for(const T of x){const A=C.get(T);A===void 0||A.isAttached()||($.has(T)||x.delete(T),C.delete(T))}})(a,c,t._dirtyLeaves,t._dirtyElements)),v!==t._compositionKey&&(c._flushSync=!0);const _=c._selection;if(De(_)){const y=c._nodeMap,w=_.anchor.key,x=_.focus.key;y.get(w)!==void 0&&y.get(x)!==void 0||Be(19)}else Gr(_)&&_._nodes.size===0&&(c._selection=null)}catch(v){return v instanceof Error&&t._onError(v),t._pendingEditorState=a,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void cs(t)}finally{br=d,gi=f,_r=h,t._updating=p,kh=0}t._dirtyType!==0||t._deferred.length>0||(function(v,_){const y=_.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(y))return!0}else if(y!==null)return!0;return!1})(c,t)?c._flushSync?(c._flushSync=!1,cs(t)):u&&r6(()=>{cs(t)}):(c._flushSync=!1,u&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function xi(t,e,n){_r===t&&n===void 0?e():hg(t,e,n)}class hd{element;before;after;constructor(e,n,r){this.element=e,this.before=n||null,this.after=r||null}withBefore(e){return new hd(this.element,e,this.after)}withAfter(e){return new hd(this.element,this.before,e)}withElement(e){return this.element===e?this:new hd(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&Be(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&Be(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&Be(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(Od||Rc||Nd);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&n.removeChild(r),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),e){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,r,i){if(r===this.element){const c=this.getFirstChildOffset();return[e,Math.min(c+e.getChildrenSize(),Math.max(c,i))]}const o=R1(n,r);o.push(i);const s=R1(n,this.element);let a=e.getIndexWithinParent();for(let c=0;c<s.length;c++){const u=o[c],d=s[c];if(u===void 0||u<d)break;if(u>d){a+=1;break}}return[e.getParentOrThrow(),a]}}function R1(t,e){const n=[];let r=e;for(;r!==t&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==t&&Be(225),n.reverse()}class Xn extends Do{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return cq[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=Fn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(We(n)&&e.push(n),ke(n)){const r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;ke(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;ke(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),r=n.length;if(e>=r){const o=n[r-1];return ke(o)&&o.getLastDescendant()||o||null}const i=n[e];return ke(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Dn(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&Be(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Dn(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&Be(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let r,i;if(e<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContent(),ke(o)&&i!==r-1&&!o.isInline()&&(e+=na)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContentSize(),ke(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=r1[e];return(this.getFormat()&n)!==0}return!1}hasTextFormat(e){const n=ll[e];return(this.getTextFormat()&n)!==0}getFormatFlags(e,n){return lp(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){vr();const r=Ke();let i=e,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const c=this.getFirstChild();if(We(c)||ke(c))return c.select(0,0)}else if(!(e!==void 0&&e!==s||n!==void 0&&n!==s)){const c=this.getLastChild();if(We(c)||ke(c))return c.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return De(r)?(r.anchor.set(a,i,"element"),r.focus.set(a,o,"element"),r.dirty=!0,r):i2(a,i,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?r1[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){op(this)&&Be(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+n<=i||Be(226,String(e),String(n),String(i));const s=o.__key,a=[],c=[],u=this.getChildAtIndex(e+n);let d=null,f=i-n+r.length;if(e!==0)if(e===i)d=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g<n;g++){p===null&&Be(100);const m=p.getNextSibling(),v=p.__key;Ba(p.getWritable()),c.push(v),p=m}}let h=d;for(const p of r){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===s&&f--,Ba(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===s&&Be(76),g.__parent=s,a.push(m),h=p}if(e+n===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,c.length){const p=Ke();if(De(p)){const g=new Set(c),m=new Set(a),{anchor:v,focus:_}=p;D1(v,g,m)&&ap(v,v.getNode(),this,d,u),D1(_,g,m)&&ap(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||$i(this)||this.remove()}}return o}getDOMSlot(e){return new hd(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(Pn(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(e.textFormat=n),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function ke(t){return t instanceof Xn}function D1(t,e,n){let r=t.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Yy extends Do{decorate(e,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ht(t){return t instanceof Yy}class pu extends Xn{__cachedText;static getType(){return"root"}static clone(){return new pu}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Be(51)}getTextContent(){const e=this.__cachedText;return!mf()&&Fn()._dirtyType!==0||e===null?super.getTextContent():e}remove(){Be(52)}replace(e){Be(53)}insertBefore(e){Be(54)}insertAfter(e){Be(55)}updateDOM(e,n){return!1}splice(e,n,r){for(const i of r)ke(i)||Ht(i)||Be(282);return super.splice(e,n,r)}static importJSON(e){return Qn().updateFromJSON(e)}collapseAtStart(){return!0}}function rr(t){return t instanceof pu}function u2(t){return new vf(new Map(t._nodeMap))}function Jy(){return new vf(new Map([["root",new pu]]))}function d2(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&Be(130,n.name),ke(t)){const r=e.children;Array.isArray(r)||Be(59,n.name);const i=t.getChildren();for(let o=0;o<i.length;o++){const s=d2(i[o]);r.push(s)}}return e}function Zq(t){return t instanceof vf}class vf{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return O1(n&&n.editor||null,this,e)}clone(e){const n=new vf(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return O1(null,this,()=>({root:d2(Qn())}))}}class Xy extends Xn{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class gu extends Xn{static getType(){return"paragraph"}static clone(e){return new gu(e.__key)}createDOM(e){const n=document.createElement("p"),r=vc(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(e,n,r){return!1}static importDOM(){return{p:e=>({conversion:Qq,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(Pn(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(e){return Sn().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const r=Sn();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||We(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Qq(t){const e=Sn();return t.style&&(e.setFormat(t.style.textAlign),aw(t,e)),{node:e}}function Sn(){return yi(new gu)}function bf(t){return t instanceof gu}const zt=0,Os=1,Yu=2,e6=4;function f2(t,e,n,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Jy(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function t6(t){const e=new Set,n=new Set;let r=t;for(;r;){const{ownNodeConfig:i}=bg(r),o=r.transform;if(!n.has(o)){n.add(o);const s=r.transform();s&&e.add(s)}if(i){const s=i.$transform;s&&e.add(s),r=i.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof Do&&s!==Do?s:void 0}}return e}function h2(t){const e=t||{},n=Jq(),r=e.theme||{},i=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,s=Jy(),a=e.namespace||(i!==null?i._config.namespace:y2()),c=e.editorState,u=[pu,Ls,du,fu,gu,Xy,...e.nodes||[]],{onError:d,html:f}=e,h=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m<u.length;m++){let v=u[m],_=null,y=null;if(typeof v!="function"){const E=v;v=E.replace,_=E.with,y=E.withKlass||null}bg(v);const w=v.getType(),x=t6(v);p.set(w,{exportDOM:f&&f.export?f.export.get(v):void 0,klass:v,replace:_,replaceWithKlass:y,sharedNodeState:bq(u[m]),transforms:x})}}const g=new Fc(s,i,p,{disableEvents:o,namespace:a,theme:r},d||console.error,(function(m,v){const _=new Map,y=new Set,w=x=>{Object.keys(x).forEach(E=>{let $=_.get(E);$===void 0&&($=[],_.set(E,$)),$.push(x[E])})};return m.forEach(x=>{const E=x.klass.importDOM;if(E==null||y.has(E))return;y.add(E);const $=E.call(x.klass);$!==null&&w($)}),v&&w(v),_})(p,f?f.import:void 0),h,t);return c!==void 0&&(g._pendingEditorState=c,g._dirtyType=2),g}class Fc{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,n,r,i,o,s,a,c){this._createEditorArgs=c,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=y2(),this._onError=o,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&Be(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&Be(36,String(e));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(a=>a.size===0)&&i.delete(e)}}registerMutationListener(e,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let s=o.get(n);s===void 0&&(s=new Set,o.set(n,s)),s.add(i);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,i),()=>{s.delete(i),s.size===0&&o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&Be(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const r=this._editorState,i=H1(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const r=this.getRegisteredNode(e);return r.transforms.add(n),r}registerNodeTransform(e,n){const r=this.registerNodeTransformToKlass(e,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return(function(s,a){const c=H1(s.getEditorState()),u=[];for(const d of a){const f=c.get(d);f&&u.push(f)}u.length!==0&&s.update(()=>{for(const d of u)for(const f of d.keys()){const h=Dn(f);h&&h.markDirty()}},s._pendingEditorState===null?{tag:dd}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return rt(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const r=vc(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,f2(this,n,e,i),n!==null&&(this._config.disableEvents||Nq(n),r!=null&&n.classList.remove(...r)),e!==null){const o=sw(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,SA(this),this._updateTags.add(dd),cs(this),this._config.disableEvents||(function(a,c){const u=a.ownerDocument;Cb.set(a,u);const d=ip.get(u)??0;d<1&&u.addEventListener("selectionchange",ZA),ip.set(u,d+1),a.__lexicalEditor=c;const f=XA(a);for(let h=0;h<$b.length;h++){const[p,g]=$b[h],m=typeof g=="function"?v=>{v1(v)||(m1(v),(c.isEditable()||p==="click")&&g(v,c))}:v=>{if(v1(v))return;m1(v);const _=c.isEditable();switch(p){case"cut":return _&&rt(c,Hy,v);case"copy":return rt(c,ug,v);case"paste":return _&&rt(c,Uy,v);case"dragstart":return _&&rt(c,qA,v);case"dragover":return _&&rt(c,VA,v);case"dragend":return _&&rt(c,Tq,v);case"focus":return _&&rt(c,Aq,v);case"blur":return _&&rt(c,Pq,v);case"drop":return _&&rt(c,BA,v)}};a.addEventListener(p,m),f.push(()=>{a.removeEventListener(p,m)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(dd),cs(this);fd("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&Be(38);let r=e;r._readOnly&&(r=u2(e),r._selection=e._selection?e._selection.clone():null),kA(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),cs(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||cs(this)}parseEditorState(e,n){return(function(r,i,o){const s=Jy(),a=br,c=gi,u=_r,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,br=s,gi=!1,_r=i,Zy(null);try{const g=i._nodes;Wy(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,br=a,gi=c,_r=u}return s})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return cs(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(r,i,o){r._updating?r._updates.push([i,o]):hg(r,i,o)})(this,e,n)}focus(e,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),xi(this,()=>{const i=Ke(),o=Qn();i!==null?i.dirty||Lr(i.clone()):o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),c6("focus"),u6(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=go(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,fd("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Fc.version="0.38.2+prod.esm";let Rb=null;function Zy(t){Rb=t}let n6=1;function p2(t,e){const n=Qy(t,e);return n===void 0&&Be(30,e),n}function Qy(t,e){return t._nodes.get(e)}const r6=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function M1(t){return Ht(ra(t))}function ew(t){const e=document.activeElement;if(!Pn(e))return!1;const n=e.nodeName;return Ht(ra(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&gg(e)==null)}function _f(t,e,n){const r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!ew(e)&&pg(e)===t}catch{return!1}}function tw(t){return t instanceof Fc}function pg(t){let e=t;for(;e!=null;){const n=gg(e);if(tw(n))return n;e=yf(e)}return null}function gg(t){return t?t.__lexicalEditor:null}function i6(t){return sq.test(t)?"rtl":aq.test(t)?"ltr":null}function Ua(t){return Qr(t)||t.isToken()}function ss(t){return Ua(t)||t.isSegmented()}function Ns(t){return mu(t)&&t.nodeType===3}function g2(t){return mu(t)&&t.nodeType===9}function zc(t){let e=t;for(;e!=null;){if(Ns(e))return e;e=e.firstChild}return null}function lp(t,e,n){const r=ll[e];if(n!==null&&(t&r)===(n&r))return t;let i=t^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function o6(t){return We(t)||Rn(t)||Ht(t)}function s6(t,e){const n=(function(){const s=Rb;return Rb=null,s})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);vr(),a2();const r=Fn(),i=ma(),o=""+n6++;i._nodeMap.set(o,t),ke(t)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,t.__key=o}function Ba(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),r=e.getWritable(),i=t.getPreviousSibling(),o=t.getNextSibling(),s=o!==null?o.__key:null,a=i!==null?i.__key:null,c=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=s),o===null&&(r.__last=a),c!==null&&(c.__next=s),u!==null&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function cp(t){a2(),op(t)&&Be(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent,r=ma(),i=Fn(),o=r._nodeMap,s=i._dirtyElements;n!==null&&(function(c,u,d){let f=c;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent}})(n,o,s);const a=e.__key;i._dirtyType=1,ke(t)?s.set(a,!0):i._dirtyLeaves.add(a)}function kr(t){vr();const e=Fn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const r=Dn(n);r!==null&&r.getWritable()}if(t!==null){const r=Dn(t);r!==null&&r.getWritable()}}}function Bs(){return mf()?null:Fn()._compositionKey}function Dn(t,e){const n=(e||ma())._nodeMap.get(t);return n===void 0?null:n}function m2(t,e){const n=mg(t,Fn());return n!==void 0?Dn(n,e):null}function mg(t,e){return t[`__lexicalKey_${e._key}`]}function ra(t,e){let n=t;for(;n!=null;){const r=m2(n,e);if(r!==null)return r;n=yf(n)}return null}function v2(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function F1(t){return t.read(()=>Qn().getTextContent())}function Qn(){return b2(ma())}function b2(t){return t._nodeMap.get("root")}function Lr(t){vr();const e=ma();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function lc(t){const e=Fn(),n=(function(r,i){let o=r;for(;o!=null;){const s=mg(o,i);if(s!==void 0)return s;o=yf(o)}return null})(t,e);return n===null?t===e.getRootElement()?Dn("root"):null:Dn(n)}function _2(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function nw(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function y2(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function w2(t){return Ns(t)?t.nodeValue:null}function rw(t,e,n){const r=go(Vi(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let a=w2(i);const c=ra(i);if(a!==null&&We(c)){if(a===lg&&n){const u=n.length;a=n,o=u,s=u}a!==null&&iw(c,a,o,s,t)}}}function iw(t,e,n,r,i){let o=t;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let a=e;(s||i)&&e[e.length-1]===lg&&(a=e.slice(0,-1));const c=o.getTextContent();if(i||a!==c){if(a===""){if(kr(null),Nd||Rc||Od)o.remove();else{const m=Fn();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),d=Ll(),f=o.getTextContentSize(),h=Bs(),p=o.getKey();if(o.isToken()||h!==null&&p===h&&!s||De(d)&&(u!==null&&!u.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===t.__key&&d.anchor.offset===0&&!o.canInsertTextBefore()&&!s||d.focus.key===t.__key&&d.focus.offset===f&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=Ke();if(!De(g)||n===null||r===null)return void z1(o,a,g);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const m=In(o.getTextContent());o.replace(m),o=m}z1(o,a,g)}}}function z1(t,e,n){if(t.setTextContent(e),De(n)){const r=t.getKey();for(const i of["anchor","focus"]){const o=n[i];o.type==="text"&&o.key===r&&(o.offset=Zs(t,o.offset,"clamp"))}}}function Zf(t,e,n){const r=e[n]||!1;return r==="any"||r===t[n]}function a6(t,e){return Zf(t,e,"altKey")&&Zf(t,e,"ctrlKey")&&Zf(t,e,"shiftKey")&&Zf(t,e,"metaKey")}function ln(t,e,n){return a6(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const is={ctrlKey:!Zi,metaKey:Zi},j1={altKey:Zi,ctrlKey:!Zi};function U1(t){return t.key==="Backspace"}function B1(t){return ln(t,"a",is)}function l6(t){const e=Qn();if(De(t)){const n=t.anchor,r=t.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Dc(t),t}{const n=e.select(0,e.getChildrenSize());return Lr(Dc(n)),n}}function vc(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,r=n[e];if(r!==void 0)return r;const i=t[e];if(typeof i=="string"){const o=vA(i);return n[e]=o,o}return i}function ow(t,e,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,a=e.get(o);a===void 0&&Be(33,o);const c=a.klass;let u=t.get(c);u===void 0&&(u=new Map,t.set(c,u));const d=u.get(s),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(s,f?"updated":i)}function q1(t,e,n){const r=t.getParent();let i=n,o=t;return r!==null&&(e&&n===0?(i=o.getIndexWithinParent(),o=r):e||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function Db(t,e){const n=t.offset;if(t.type==="element")return q1(t.getNode(),e,n);{const r=t.getNode();if(e&&n===0||!e&&n===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?q1(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function x2(t){const e=Vi(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function rt(t,e,n){return(function(r,i,o){const s=nw(r);for(let a=4;a>=0;a--)for(let c=0;c<s.length;c++){const u=s[c],d=u._commands.get(i);if(d!==void 0){const f=d[a];if(f!==void 0){const h=Array.from(f),p=h.length;let g=!1;if(xi(u,()=>{for(let m=0;m<p;m++)if(h[m](o,r))return void(g=!0)}),g)return g}}}return!1})(t,e,n)}function vg(t){return!rr(t)&&!t.isLastChild()&&!t.isInline()}function dl(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&Be(75,e),n}function yf(t){const e=t.assignedSlot||t.parentElement;return zb(e)?e.host:e}function k2(t){return g2(t)?t:Pn(t)?t.ownerDocument:null}function c6(t){vr(),Fn()._updateTags.add(t)}function u6(t){vr(),Fn()._deferred.push(t)}function Mb(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function sw(t){const e=k2(t);return e?e.defaultView:null}function Vi(t){const e=t._window;return e===null&&Be(78),e}function d6(t){return ke(t)&&t.isInline()||Ht(t)&&t.isInline()}function f6(t){let e=t.getParentOrThrow();for(;e!==null;){if($i(e))return e;e=e.getParentOrThrow()}return e}function $i(t){return rr(t)||ke(t)&&t.isShadowRoot()}function yi(t){const e=Fn(),n=t.getType(),r=Qy(e,n);r===void 0&&Be(200,t.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(t),a=s.constructor;return o!==null?s instanceof o||Be(201,o.name,o.getType(),a.name,a.getType(),t.constructor.name,n):s instanceof t.constructor&&a!==t.constructor||Be(202,a.name,a.getType(),t.constructor.name,n),s.__key===t.__key&&Be(203,t.constructor.name,n,a.name,a.getType()),s}return t}function Pm(t,e){!rr(t.getParent())||ke(e)||Ht(e)||Be(99)}function h6(t){const e=Dn(t);return e===null&&Be(63,t),e}function Lm(t){return(Ht(t)||ke(t)&&!t.canBeEmpty())&&!t.isInline()}function Fb(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=t.parentElement;r!==null&&r.removeChild(t)}function go(t){return _o?(t||window).getSelection():null}function p6(t){const e=sw(t);return e?e.getSelection():null}function S2(t){return Pn(t)&&t.tagName==="A"}function Pn(t){return mu(t)&&t.nodeType===1}function mu(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function zb(t){return mu(t)&&t.nodeType===11}function jb(t){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return t.nodeName.match(e)!==null}function up(t){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return t.nodeName.match(e)!==null}function zi(t){if(Ht(t)&&!t.isInline())return!0;if(!ke(t)||$i(t))return!1;const e=t.getFirstChild(),n=e===null||Rn(e)||We(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function wf(){return Fn()}const V1=new WeakMap,g6=new Map;function H1(t){if(!t._readOnly&&t.isEmpty())return g6;t._readOnly||Be(192);let e=V1.get(t);return e||(e=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(i,o)}return r})(t),V1.set(t,e)),e}function E2(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function m6(t){return(e=E2(t))[QA]=!0,e;var e}function aw(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(n/40);e.setIndent(r)}function v6(t){t.__lexicalUnmanaged=!0}function b6(t){return t.__lexicalUnmanaged===!0}function Iu(t,e){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(t,e)&&t[e]!==Do[e]}function bg(t){const e=i1 in t.prototype?t.prototype[i1]():void 0,n=(function(s){if(!(s===Do||s.prototype instanceof Do)){let a="<unknown>",c="<unknown>";try{a=s.getType()}catch{}try{Fc.version&&(c=JSON.parse(Fc.version))}catch{}Be(290,s.name,a,c)}return s===Yy||s===Xn||s===Do})(t),r=!n&&Iu(t,"getType")?t.getType():void 0;let i,o=r;if(e)if(r)i=e[r];else for(const[s,a]of Object.entries(e))o=s,i=a;if(!n&&o&&(Iu(t,"getType")||(t.getType=()=>o),Iu(t,"clone")||(t.clone=s=>(Zy(s),new t)),Iu(t,"importJSON")||(t.importJSON=i&&i.$importJSON||(s=>new t().updateFromJSON(s))),!Iu(t,"importDOM")&&i)){const{importDOM:s}=i;s&&(t.importDOM=()=>s)}return{ownNodeConfig:i,ownNodeType:o}}function _6(t){const e=wf();return vr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const ei=(t,e)=>{let n=t;for(;n!=null&&!rr(n);){if(e(n))return n;n=n.getParent()}return null},y6={next:"previous",previous:"next"};class lw{origin;constructor(e){this.origin=e}[Symbol.iterator](){return hw({hasNext:pl,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return yr(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return yr(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,n)),this}splice(e,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),a=new Map;for(let c=o.getAdjacentCaret();c!==null&&a.size<e;c=c.getAdjacentCaret()){const u=c.origin.getWritable();a.set(u.getKey(),u)}for(const c of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(c.getKey()),!(u.is(c)||o.origin.is(c))){const d=c.getParent();d&&d.is(s)&&c.remove(),u.replace(c)}}else u===null&&Be(263,Array.from(a).join(" "))}else o.insert(c);o=yr(c,this.direction)}for(const c of a.values())c.remove();return this}}class zd extends lw{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:qo(e,this.direction)}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vu(this.direction);return yr(this.getNodeAtCaret(),e)||qo(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof zd&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const w6={root:rr,shadowRoot:$i};function vu(t){return y6[t]}function cw(t,e="root"){return w6[e](t)?null:t}class fl extends lw{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:yr(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return ke(this.origin)?qo(this.origin,this.direction):null}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vu(this.direction);return yr(this.getNodeAtCaret(),e)||qo(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof fl&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof fl||e instanceof hl)&&this.direction===e.direction&&this.origin.is(e.origin)}}class hl extends lw{type="text";offset;constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ia(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ia(this.origin,vu(this.direction),this.offset)}isSamePointCaret(e){return e instanceof hl&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof fl||e instanceof hl)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return yr(this.origin,this.direction)}}function Xs(t){return t instanceof hl}function pl(t){return t instanceof fl}function Mo(t){return t instanceof zd}const x6={next:class extends hl{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends hl{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},k6={next:class extends fl{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends fl{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},S6={next:class extends zd{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends zd{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function yr(t,e){return t?new k6[e](t):null}function ia(t,e,n){return t?new x6[e](t,Zs(t,n)):null}function Zs(t,e,n="error"){const r=t.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(n!=="clamp"&&gA(284,String(e),String(r),t.getKey()),i=i<0?0:r),i}function K1(t,e){return new T6(t,e)}function qo(t,e){return ke(t)?new S6[e](t):null}function E6(t){return t&&t.getChildCaret()||t}function uw(t){return t&&E6(t.getAdjacentCaret())}class dw{type="node-caret-range";direction;anchor;focus;constructor(e,n,r){this.anchor=e,this.focus=n,this.direction=r}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new dw(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return Xs(o)?(function(s,a){const{direction:c,origin:u}=s,d=Zs(u,a==="focus"?vu(c):c);return K1(s,d-s.offset)})(o,i):null},n=e("anchor"),r=e("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[K1(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(e="root"){const n=Xs(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Xs(r),o=s=>s.isSameNodeCaret(r)?null:uw(s)||s.getParentCaret(e);return hw({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class T6{type="slice";caret;distance;constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,r=n+e;return r<n?[r,n]:[n,r]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return ia(e.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function fw(t){return xs(t,yr(Qn(),t.direction))}function $6(t){return xs(t,t)}function xs(t,e){return t.direction!==e.direction&&Be(265),new dw(t,e,t.direction)}function hw(t){const{initial:e,hasNext:n,step:r,map:i}=t;let o=e;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function T2(t,e){const n=Sh(t.origin,e.origin);switch(n===null&&Be(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const r=t.type==="text",i=e.type==="text";return r&&i?(function(o,s){return Math.sign(o-s)})(t.offset,e.offset):t.type===e.type?0:r?-1:i?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return $2(n)}}function $2(t){const{a:e,b:n}=t,r=e.__key,i=n.__key;let o=e,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function Qf(t,e){return e.is(t)}function G1(t){return ke(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function Sh(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[r,i]=G1(t);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=G1(e);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Qf(t,r)||Be(276),{commonAncestor:r,type:"ancestor"}):i===null?(Qf(e,r)||Be(277),{commonAncestor:r,type:"descendant"}):((ke(o)||Qf(t,o))&&(ke(i)||Qf(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||Be(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function ks(t,e){const{type:n,key:r,offset:i}=t,o=h6(t.key);return n==="text"?(We(o)||Be(266,o.getType(),r),ia(o,e,i)):(ke(o)||Be(267,o.getType(),r),A6(o,t.offset,e))}function jd(t,e){const{origin:n,direction:r}=e,i=r==="next";Xs(e)?t.set(n.getKey(),e.offset,"text"):pl(e)?We(n)?t.set(n.getKey(),Zs(n,r),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Mo(e)&&ke(n)||Be(268),t.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function C2(t){const e=Ke(),n=De(e)?e:fg();return Eh(n,t),Lr(n),n}function Eh(t,e){jd(t.anchor,e.anchor),jd(t.focus,e.focus)}function W1(t){const{anchor:e,focus:n}=t,r=ks(e,"next"),i=ks(n,"next"),o=T2(r,i)<=0?"next":"previous";return xs(jc(r,o),jc(i,o))}function pw(t){const{direction:e,origin:n}=t,r=yr(n,vu(e)).getNodeAtCaret();return r?yr(r,e):qo(n.getParentOrThrow(),e)}function Y1(t,e="root"){const n=[t];for(let r=Mo(t)?t.getParentCaret(e):t.getSiblingCaret();r!==null;r=r.getParentCaret(e))n.push(pw(r));return n}function Nm(t){return!!t&&t.origin.isAttached()}function C6(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",r="next";let i=e;const o=gw(t,r),s=Y1(o.anchor,n),a=Y1(o.focus.getFlipped(),n),c=new Set,u=[];for(const g of o.iterNodeCarets(n))if(Mo(g))c.add(g.origin.getKey());else if(pl(g)){const{origin:m}=g;ke(m)&&!c.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),_=pw(yr(m,r)),y=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||y==="token"&&g.distance!==0)_.remove();else if(g.distance!==0){i="removeEmptySlices";let w=g.removeTextSlice();const x=g.caret.origin;if(y==="segmented"){const E=w.origin,$=In(E.getTextContent()).setStyle(E.getStyle()).setFormat(E.getFormat());_.replaceOrInsert($),w=ia($,r,w.offset)}x.is(s[0].origin)&&(s[0]=w),x.is(a[0].origin)&&(a[0]=w.getFlipped())}}let d,f;for(const g of s)if(Nm(g)){d=ro(g);break}for(const g of a)if(Nm(g)){f=ro(g);break}const h=(function(g,m,v){if(!g||!m)return null;const _=g.getParentAtCaret(),y=m.getParentAtCaret();if(!_||!y)return null;const w=_.getParents().reverse();w.push(_);const x=y.getParents().reverse();x.push(y);const E=Math.min(w.length,x.length);let $;for($=0;$<E&&w[$]===x[$];$++);const C=(A,P)=>{let L;for(let O=$;O<A.length;O++){const N=A[O];if($i(N))return;!L&&P(N)&&(L=N)}return L},k=C(w,zi),T=k&&C(x,A=>v.has(A.getKey())&&zi(A));return k&&T?[k,T]:null})(d,f,c);if(h){const[g,m]=h;qo(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[d,f,...s,...a].find(Nm);if(p)return $6(jc(ro(p),t.direction));Be(269,JSON.stringify(s.map(g=>g.origin.__key)))}function ro(t){const e=(function(i){let o=i;for(;Mo(o);){const s=uw(o);if(!Mo(s))break;o=s}return o})(t.getLatest()),{direction:n}=e;if(We(e.origin))return Xs(e)?e:ia(e.origin,n,n);const r=e.getAdjacentCaret();return pl(r)&&We(r.origin)?ia(r.origin,n,vu(n)):e}function A2(t){return Xs(t)&&t.offset!==Zs(t.origin,t.direction)}function jc(t,e){return t.direction===e?t:t.getFlipped()}function gw(t,e){return t.direction===e?t:xs(jc(t.focus,e),jc(t.anchor,e))}function A6(t,e,n){let r=qo(t,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return jc(r,n)}function P6(...t){return t}function L6(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}const Ub=new Map;function P2(t){const e={};if(!t)return e;const n=t.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function J1(t){let e=Ub.get(t);return e===void 0&&(e=P2(t),Ub.set(t,e)),e}function L2(t){const e=wf().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function N2(t){return L2(rr(t)?t:t.getParentOrThrow())}function X1(t){const e=N2(t);return e!==null&&e.direction==="rtl"}function O2(t,e,n="self"){const r=t.getStartEndPoints();if(e.isSelected(t)&&!ss(e)&&r!==null){const[i,o]=r,s=t.isBackward(),a=i.getNode(),c=o.getNode(),u=e.is(a),d=e.is(c);if(u||d){const[f,h]=Ob(t),p=a.is(c),g=e.is(s?c:a),m=e.is(s?a:c);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):g?(_=s?h:f,v=void 0):m&&(_=0,v=s?f:h);const y=e.__text.slice(_,v);y!==e.__text&&(n==="clone"&&(e=m6(e)),e.__text=y)}}return e}function N6(t){const e=t.getStyle(),n=P2(e);Ub.set(e,n)}function O6(t,e){const n=t.getFormatType(),r=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),r!==e.getIndent()&&e.setIndent(r)}function eh(t,e,n=O6){if(t===null)return;const r=t.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,a]=r;o=fg(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(a.key,a.offset,a.type);const c=ei(s.getNode(),zi),u=ei(a.getNode(),zi);ke(c)&&i.set(c.getKey(),c),ke(u)&&i.set(u.getKey(),u)}for(const s of t.getNodes())if(ke(s)&&zi(s))i.set(s.getKey(),s);else if(r===null){const a=ei(s,zi);ke(a)&&i.set(a.getKey(),a)}for(const[s,a]of i){const c=e();n(a,c),a.replace(c,!0),o&&(s===o.anchor.key&&o.anchor.set(c.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(c.getKey(),o.focus.offset,o.focus.type))}o&&t.is(Ke())&&Lr(o)}function I2(t){const e=R2(t);return e!==null&&e.writingMode==="vertical-rl"}function R2(t){const e=t.anchor.getNode();return ke(e)?L2(e):N2(e)}function Z1(t,e){let n=I2(t)?!e:e;D2(t)&&(n=!n);const r=ks(t.focus,n?"previous":"next");if(A2(r))return!1;for(const i of fw(r)){if(Mo(i))return!i.origin.isInline();if(!ke(i.origin)){if(Ht(i.origin))return!0;break}}return!1}function I6(t,e,n,r){t.modify(e?"extend":"move",n,r)}function D2(t){const e=R2(t);return e!==null&&e.direction==="rtl"}function Q1(t,e,n){const r=D2(t);let i;i=I2(t)||r?!n:n,I6(t,e,i,"character")}function R6(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const M2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,D6=M2&&"documentMode"in document?document.documentMode:null;!(!M2||!("InputEvent"in window)||D6)&&"getTargetRanges"in new window.InputEvent("input");function F2(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}function Ud(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function Er(t,...e){const n=F2(...e);n.length>0&&t.classList.add(...n)}function qa(t,...e){const n=F2(...e);n.length>0&&t.classList.remove(...n)}function M6(t){return t?t.getAdjacentCaret():null}function pd(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function F6(t){const e=ei(t,n=>ke(n)&&!n.isInline());return ke(e)||R6(4,t.__key),e}function Oa(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function z2(t,e){const n=[],r=Array.from(t).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))n.push(i);else if(ke(i))for(const o of z6(i))r.push(o);return n}function z6(t){return j6(qo(t,"previous"))}function j6(t){return hw({hasNext:pl,initial:t.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}var Om={exports:{}},ek;function U6(){return ek||(ek=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(w){return w instanceof c?new c(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++o}),y.__id},clone:function y(w,x){x=x||{};var E,$;switch(a.util.type(w)){case"Object":if($=a.util.objId(w),x[$])return x[$];E={},x[$]=E;for(var C in w)w.hasOwnProperty(C)&&(E[C]=y(w[C],x));return E;case"Array":return $=a.util.objId(w),x[$]?x[$]:(E=[],x[$]=E,w.forEach(function(k,T){E[T]=y(k,x)}),E);default:return w}},getLanguage:function(y){for(;y;){var w=i.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(E){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(E.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var x in w)if(w[x].src==y)return w[x]}return null}},isActive:function(y,w,x){for(var E="no-"+w;y;){var $=y.classList;if($.contains(w))return!0;if($.contains(E))return!1;y=y.parentElement}return!!x}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,w){var x=a.util.clone(a.languages[y]);for(var E in w)x[E]=w[E];return x},insertBefore:function(y,w,x,E){E=E||a.languages;var $=E[y],C={};for(var k in $)if($.hasOwnProperty(k)){if(k==w)for(var T in x)x.hasOwnProperty(T)&&(C[T]=x[T]);x.hasOwnProperty(k)||(C[k]=$[k])}var A=E[y];return E[y]=C,a.languages.DFS(a.languages,function(P,L){L===A&&P!=y&&(this[P]=C)}),C},DFS:function y(w,x,E,$){$=$||{};var C=a.util.objId;for(var k in w)if(w.hasOwnProperty(k)){x.call(w,k,w[k],E||k);var T=w[k],A=a.util.type(T);A==="Object"&&!$[C(T)]?($[C(T)]=!0,y(T,x,null,$)):A==="Array"&&!$[C(T)]&&($[C(T)]=!0,y(T,x,k,$))}}},plugins:{},highlightAll:function(y,w){a.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,x){var E={callback:x,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",E),E.elements=Array.prototype.slice.apply(E.container.querySelectorAll(E.selector)),a.hooks.run("before-all-elements-highlight",E);for(var $=0,C;C=E.elements[$++];)a.highlightElement(C,w===!0,E.callback)},highlightElement:function(y,w,x){var E=a.util.getLanguage(y),$=a.languages[E];a.util.setLanguage(y,E);var C=y.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(C,E);var k=y.textContent,T={element:y,language:E,grammar:$,code:k};function A(L){T.highlightedCode=L,a.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,a.hooks.run("after-highlight",T),a.hooks.run("complete",T),x&&x.call(T.element)}if(a.hooks.run("before-sanity-check",T),C=T.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!T.code){a.hooks.run("complete",T),x&&x.call(T.element);return}if(a.hooks.run("before-highlight",T),!T.grammar){A(a.util.encode(T.code));return}if(w&&r.Worker){var P=new Worker(a.filename);P.onmessage=function(L){A(L.data)},P.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else A(a.highlight(T.code,T.grammar,T.language))},highlight:function(y,w,x){var E={code:y,grammar:w,language:x};if(a.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=a.tokenize(E.code,E.grammar),a.hooks.run("after-tokenize",E),c.stringify(a.util.encode(E.tokens),E.language)},tokenize:function(y,w){var x=w.rest;if(x){for(var E in x)w[E]=x[E];delete w.rest}var $=new f;return h($,$.head,y),d(y,$,w,$.head,0),g($)},hooks:{all:{},add:function(y,w){var x=a.hooks.all;x[y]=x[y]||[],x[y].push(w)},run:function(y,w){var x=a.hooks.all[y];if(!(!x||!x.length))for(var E=0,$;$=x[E++];)$(w)}},Token:c};r.Prism=a;function c(y,w,x,E){this.type=y,this.content=w,this.alias=x,this.length=(E||"").length|0}c.stringify=function y(w,x){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(A){E+=y(A,x)}),E}var $={type:w.type,content:y(w.content,x),tag:"span",classes:["token",w.type],attributes:{},language:x},C=w.alias;C&&(Array.isArray(C)?Array.prototype.push.apply($.classes,C):$.classes.push(C)),a.hooks.run("wrap",$);var k="";for(var T in $.attributes)k+=" "+T+'="'+($.attributes[T]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+k+">"+$.content+"</"+$.tag+">"};function u(y,w,x,E){y.lastIndex=w;var $=y.exec(x);if($&&E&&$[1]){var C=$[1].length;$.index+=C,$[0]=$[0].slice(C)}return $}function d(y,w,x,E,$,C){for(var k in x)if(!(!x.hasOwnProperty(k)||!x[k])){var T=x[k];T=Array.isArray(T)?T:[T];for(var A=0;A<T.length;++A){if(C&&C.cause==k+","+A)return;var P=T[A],L=P.inside,O=!!P.lookbehind,N=!!P.greedy,M=P.alias;if(N&&!P.pattern.global){var U=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,U+"g")}for(var H=P.pattern||P,G=E.next,W=$;G!==w.tail&&!(C&&W>=C.reach);W+=G.value.length,G=G.next){var Y=G.value;if(w.length>y.length)return;if(!(Y instanceof c)){var R=1,B;if(N){if(B=u(H,W,y,O),!B||B.index>=y.length)break;var te=B.index,J=B.index+B[0].length,Q=W;for(Q+=G.value.length;te>=Q;)G=G.next,Q+=G.value.length;if(Q-=G.value.length,W=Q,G.value instanceof c)continue;for(var ee=G;ee!==w.tail&&(Q<J||typeof ee.value=="string");ee=ee.next)R++,Q+=ee.value.length;R--,Y=y.slice(W,Q),B.index-=W}else if(B=u(H,0,Y,O),!B)continue;var te=B.index,re=B[0],he=Y.slice(0,te),pe=Y.slice(te+re.length),ce=W+Y.length;C&&ce>C.reach&&(C.reach=ce);var ge=G.prev;he&&(ge=h(w,ge,he),W+=he.length),p(w,ge,R);var Pe=new c(k,L?a.tokenize(re,L):re,M,re);if(G=h(w,ge,Pe),pe&&h(w,G,pe),R>1){var xe={cause:k+","+A,reach:ce};d(y,w,x,G.prev,W,xe),C&&xe.reach>C.reach&&(C.reach=xe.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},w={value:null,prev:y,next:null};y.next=w,this.head=y,this.tail=w,this.length=0}function h(y,w,x){var E=w.next,$={value:x,prev:w,next:E};return w.next=$,E.prev=$,y.length++,$}function p(y,w,x){for(var E=w.next,$=0;$<x&&E!==y.tail;$++)E=E.next;w.next=E,E.prev=w,y.length-=$}function g(y){for(var w=[],x=y.head.next;x!==y.tail;)w.push(x.value),x=x.next;return w}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(y){var w=JSON.parse(y.data),x=w.language,E=w.code,$=w.immediateClose;r.postMessage(a.highlight(E,a.languages[x],x)),$&&r.close()},!1)),a;var m=a.util.currentScript();m&&(a.filename=m.src,m.hasAttribute("data-manual")&&(a.manual=!0));function v(){a.manual||a.highlightAll()}if(!a.manual){var _=document.readyState;_==="loading"||_==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return a})(e);t.exports&&(t.exports=n),typeof mx<"u"&&(mx.Prism=n),n.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]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var c={};c[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\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:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.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\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,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:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(n),n.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:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.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}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.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:n.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:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.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:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.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:n.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"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.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")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",c="loading",u="loaded",d="failed",f="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+c+'"])';function h(m,v,_){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?_(i(y.status,y.statusText)):_(o))},y.send(null)}function p(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var _=Number(v[1]),y=v[2],w=v[3];return y?w?[_,Number(w)]:[_,void 0]:[_,_]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+f}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(f)){m.code="",v.setAttribute(a,c);var _=v.appendChild(document.createElement("CODE"));_.textContent=r;var y=v.getAttribute("data-src"),w=m.language;if(w==="none"){var x=(/\.(\w+)$/.exec(y)||[,"none"])[1];w=s[x]||x}n.util.setLanguage(_,w),n.util.setLanguage(v,w);var E=n.plugins.autoloader;E&&E.loadLanguages(w),h(y,function($){v.setAttribute(a,u);var C=p(v.getAttribute("data-range"));if(C){var k=$.split(/\r\n?|\n/g),T=C[0],A=C[1]==null?k.length:C[1];T<0&&(T+=k.length),T=Math.max(0,Math.min(T-1,k.length)),A<0&&(A+=k.length),A=Math.max(0,Math.min(A,k.length)),$=k.slice(T,A).join(`
|
|
403
|
+
`?r.push(Pi()):s===" "?r.push(lo()):r.push(In(s))}this.insertNodes(r)}insertText(e){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,a=n),s.type==="element"&&(function(v,_,y,w){const x=v.getNode(),E=x.getChildAtIndex(v.offset),$=In();if($.setFormat(y),$.setStyle(w),bf(E))E.splice(0,0,[$]);else{const C=rr(x)?Sn().append($):$;E===null?x.append(C):E.insertBefore(C)}v.is(_)&&_.set($.__key,0,"text"),v.set($.__key,0,"text")})(s,a,i,o),a.type==="element"&&jd(a,ro(ks(a,"next")));const c=s.offset;let u=a.offset;const d=this.getNodes(),f=d.length;let h=d[0];We(h)||Be(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&a.type==="element"&&(u=p,a.set(s.key,u,"text")),this.isCollapsed()&&c===p&&(ss(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){let v=h.getNextSibling();if(We(v)&&v.canInsertTextBefore()&&!ss(v)||(v=In(),v.setFormat(i),v.setStyle(o),g.canInsertTextAfter()?h.insertAfter(v):g.insertAfter(v)),v.select(0,0),h=v,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&c===0&&(ss(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){let v=h.getPreviousSibling();if(We(v)&&!ss(v)||(v=In(),v.setFormat(i),g.canInsertTextBefore()?h.insertBefore(v):g.insertBefore(v)),v.select(),h=v,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&c!==p){const v=In(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&e!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||ke(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),n2(this.anchor,this.focus,null),void this.insertText(e)}if(f===1){if(Ua(h)){const w=In(e);return w.select(),void h.replace(w)}const v=h.getFormat(),_=h.getStyle();if(c!==u||v===i&&_===o){if(Qr(h)){const w=In(e);return w.setFormat(i),w.setStyle(o),w.select(),void h.replace(w)}}else{if(h.getTextContent()!==""){const w=In(e);if(w.setFormat(i),w.setStyle(o),w.select(),c===0)h.insertBefore(w,!1);else{const[x]=h.splitText(c);x.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(o)}const y=u-c;h=h.spliceText(c,y,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=v,this.style=_))}else{const v=new Set([...h.getParentKeys(),...m.getParentKeys()]),_=ke(h)?h:h.getParentOrThrow();let y=ke(m)?m:m.getParentOrThrow(),w=m;if(!_.is(y)&&y.isInline())do w=y,y=y.getParentOrThrow();while(y.isInline());if(a.type==="text"&&(u!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<u)if(We(m)&&!Ua(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const k=In(m.getTextContent());m.replace(k),m=k}rr(a.getNode())||a.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const k=m.getParentOrThrow();k.canBeEmpty()||k.getChildrenSize()!==1?m.remove():k.remove()}else v.add(m.__key);const x=y.getChildren(),E=new Set(d),$=_.is(y),C=_.isInline()&&h.getNextSibling()===null?_:h;for(let k=x.length-1;k>=0;k--){const T=x[k];if(T.is(h)||ke(T)&&T.isParentOf(h))break;T.isAttached()&&(!E.has(T)||T.is(w)?$||C.insertAfter(T,!1):T.remove())}if(!$){let k=y,T=null;for(;k!==null;){const A=k.getChildren(),P=A.length;(P===0||A[P-1].is(T))&&(v.delete(k.__key),T=k),k=k.getParent()}}if(Ua(h))if(c===p)h.select();else{const k=In(e);k.select(),h.replace(k)}else h=h.spliceText(c,p-c,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let k=1;k<f;k++){const T=d[k],A=T.__key;v.has(A)||T.remove()}}}removeText(){const e=Ke()===this;Eh(this,C6(W1(this))),e&&Ke()!==this&&Lr(this)}formatText(e,n=null){if(this.isCollapsed())return this.toggleFormat(e),void kr(null);const r=this.getNodes(),i=[];for(const x of r)We(x)&&i.push(x);const o=x=>{r.forEach(E=>{if(ke(E)){const $=E.getFormatFlags(e,x);E.setTextFormat($)}})},s=i.length;if(s===0)return this.toggleFormat(e),kr(null),void o(n);const a=this.anchor,c=this.focus,u=this.isBackward(),d=u?c:a,f=u?a:c;let h=0,p=i[0],g=d.type==="element"?0:d.offset;if(d.type==="text"&&g===p.getTextContentSize()&&(h=1,p=i[1],g=0),p==null)return;const m=p.getFormatFlags(e,n);o(m);const v=s-1;let _=i[v];const y=f.type==="text"?f.offset:_.getTextContentSize();if(p.is(_)){if(g===y)return;if(ss(p)||g===0&&y===p.getTextContentSize())p.setFormat(m);else{const x=p.splitText(g,y),E=g===0?x[0]:x[1];E.setFormat(m),d.type==="text"&&d.set(E.__key,0,"text"),f.type==="text"&&f.set(E.__key,y-g,"text")}return void(this.format=m)}g===0||ss(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);const w=_.getFormatFlags(e,m);y>0&&(y===_.getTextContentSize()||ss(_)||([_]=_.splitText(y)),_.setFormat(w));for(let x=h+1;x<v;x++){const E=i[x],$=E.getFormatFlags(e,w);E.setFormat($)}d.type==="text"&&d.set(p.__key,g,"text"),f.type==="text"&&f.set(_.__key,y,"text"),this.format=m|w}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=Ke();return De(g)||Be(134),g.insertNodes(e)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=ei(n,zi),i=e[e.length-1];if(ke(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const g=Cm(this);r.splice(g,0,e),i.selectEnd()}return}if(!e.some(g=>(ke(g)||Ht(g))&&!g.isInline())){ke(r)||Be(211,n.constructor.name,n.getType());const g=Cm(this);return r.splice(g,0,e),void i.selectEnd()}const o=(function(g){const m=Sn();let v=null;for(let _=0;_<g.length;_++){const y=g[_],w=Rn(y);if(w||Ht(y)&&y.isInline()||ke(y)&&y.isInline()||We(y)||y.isParentRequired()){if(v===null&&(v=y.createParentElementNode(),m.append(v),w))continue;v!==null&&v.append(y)}else m.append(y),v=null}return m})(e),s=o.getLastDescendant(),a=o.getChildren(),c=!ke(r)||!r.isEmpty()?this.insertParagraph():null,u=a[a.length-1];let d=a[0];var f;ke(f=d)&&zi(f)&&!f.isEmpty()&&ke(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(ke(r)||Be(211,n.constructor.name,n.getType()),r.append(...d.getChildren()),d=a[1]),d&&(r===null&&Be(212,n.constructor.name,n.getType()),(function(g,m){const v=m.getParentOrThrow().getLastChild();let _=m;const y=[m];for(;_!==v;)_.getNextSibling()||Be(140),_=_.getNextSibling(),y.push(_);let w=g;for(const x of y)w=w.insertAfter(x)})(r,d));const h=ei(s,zi);c&&ke(h)&&(c.canMergeWhenEmpty()||zi(u))&&(h.append(...c.getChildren()),c.remove()),ke(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const p=ke(r)?r.getLastChild():null;Rn(p)&&h!==r&&p.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Sn();return Qn().splice(this.anchor.offset,0,[s]),s.select(),s}const e=Cm(this),n=ei(this.anchor.getNode(),zi);ke(n)||Be(213);const r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const n=Pi();if(this.insertNodes([n]),e){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],n=e.length;let r=e[0],i=e[n-1];const[o,s]=Ob(this),a=this.isBackward(),[c,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=a?[s,o]:[o,s];if(n===0)return[];if(n===1){if(We(r)&&!this.isCollapsed()){const h=r.splitText(d,f),p=d===0?h[0]:h[1];return p?(c.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[r]}if(We(r)&&(d===r.getTextContentSize()?e.shift():d!==0&&([,r]=r.splitText(d),e[0]=r,c.set(r.getKey(),0,"text"))),We(i)){const h=i.getTextContent().length;f===0?e.pop():f!==h&&([i]=i.splitText(f),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,n,r){if(A1(this,e,n,r))return;const i=e==="move",o=zn(),s=go(Vi(o));if(!s)return;const a=o._blockCursorElement,c=o._rootElement,u=this.focus.getNode();if(c===null||a===null||!ke(u)||u.isInline()||u.canBeEmpty()||Fb(a,o,c),this.dirty){let d=dl(o,this.anchor.key),f=dl(o,this.focus.key);this.anchor.type==="text"&&(d=zc(d)),this.focus.type==="text"&&(f=zc(f)),d&&f&&s2(s,d,this.anchor.offset,f,this.focus.offset)}if((function(d,f,h,p){d.modify(f,h,p)})(s,e,n?"backward":"forward",r),s.rangeCount>0){const d=s.getRangeAt(0),f=this.anchor.getNode(),h=rr(f)?f:f6(f);if(this.applyDOMRange(d),this.dirty=!0,!i){const p=this.getNodes(),g=[];let m=!1;for(let v=0;v<p.length;v++){const _=p[v];Mb(_,h)?g.push(_):m=!0}if(m&&g.length>0)if(n){const v=g[0];ke(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];ke(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}s.anchorNode===d.startContainer&&s.anchorOffset===d.startOffset||(function(v){const _=v.focus,y=v.anchor,w=y.key,x=y.offset,E=y.type;y.set(_.key,_.offset,_.type,!0),_.set(w,x,E,!0)})(this)}}r==="lineboundary"&&A1(this,e,n,r,"decorators")}forwardDeletion(e,n,r){if(!r&&(e.type==="element"&&ke(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(ke(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=fw(ks(r,e?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const c of o.iterNodeCarets("shadowRoot"))if(Mo(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(a.type==="merge-block")break;if(ke(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=ro(c);Eh(this,xs(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:c,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(pl(c)){if(ke(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(o.anchor.origin))break}else a={block:c.origin,type:"merge-next-block"};continue}if(Ht(c.origin)){if(!c.origin.isIsolated())if(a.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&ke(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=o2();u.add(c.origin.getKey()),Lr(u)}else c.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:c,block:u}=a;return Eh(this,xs(!c.origin.isEmpty()&&u.isEmpty()?pw(yr(u,c.direction)):o.anchor,c)),this.removeText()}}const s=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&k1(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const c=s.offset,u=a.getTextContentSize();if(a.is(i)||e&&c!==u||!e&&c!==0)return void S1(a,e,c)}else if(i!==null&&i.isSegmented()){const c=r.offset,u=i.getTextContentSize();if(i.is(a)||e&&c!==0||!e&&c!==u)return void S1(i,e,c)}(function(c,u){const d=c.anchor,f=c.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const g=d.offset,m=f.offset,v=g<m,_=v?g:m,y=v?m:g,w=y-1;_!==w&&(function(x){return!(_2(x)||Kq(x))})(h.getTextContent().slice(_,y))&&(u?f.set(f.key,w,f.type):d.set(d.key,w,d.type))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&rr(r.getParent())&&r.getPreviousSibling()===null&&k1(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Gr(t){return t instanceof dg}function x1(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Ob(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,r]=e;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[x1(n),x1(r)]}function k1(t,e){for(let n=e;n;n=n.getParent()){if(ke(n)){if(n.collapseAtStart(t))return!0;if($i(n))break}if(n.getPreviousSibling())break}return!1}const Kq=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function S1(t,e,n){const r=t,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const d=u===o-1;if(a=s,s+=i[u].length,e&&s===n||s>n||d){i.splice(u,1),d&&(a=void 0);break}}const c=i.join("").trim();c===""?r.remove():(r.setTextContent(c),r.select(a,a))}function E1(t,e,n,r){let i,o=e;if(Pn(t)){let s=!1;const a=t.childNodes,c=a.length,u=r._blockCursorElement;o===c&&(s=!0,o=c-1);let d=a[o],f=!1;if(d===u)d=a[o+1],f=!0;else if(u!==null){const h=u.parentNode;t===h&&e>Array.prototype.indexOf.call(h.children,u)&&o--}if(i=lc(d),We(i))o=Zs(i,s?"next":"previous");else{let h=lc(t);if(h===null)return null;if(ke(h)){const p=r.getElementByKey(h.getKey());p===null&&Be(214),[h,o]=h.getDOMSlot(p).resolveChildIndex(h,p,t,e),ke(h)||Be(215),s&&o>=h.getChildrenSize()&&(o=Math.max(0,h.getChildrenSize()-1));let m=h.getChildAtIndex(o);if(ke(m)&&(function(v,_,y){const w=v.getParent();return y===null||w===null||!w.canBeEmpty()||w!==y.getNode()})(m,0,n)){const v=s?m.getLastDescendant():m.getFirstDescendant();v===null?h=m:(m=v,h=ke(m)?m:m.getParentOrThrow()),o=0}We(m)?(i=m,h=null,o=Zs(m,s?"next":"previous")):m!==h&&s&&!f&&(ke(h)||Be(216),o=Math.min(h.getChildrenSize(),o+1))}else{const p=h.getIndexWithinParent();o=e===0&&Ht(h)&&lc(t)===h?p:p+1,h=h.getParentOrThrow()}if(ke(h))return bi(h.__key,o,"element")}}else i=lc(t);return We(i)?bi(i.__key,Zs(i,o,"clamp"),"text"):null}function T1(t,e,n){const r=t.offset,i=t.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(e){if((n||!e)&&o===null&&ke(s)&&s.isInline()){const a=s.getPreviousSibling();We(a)&&t.set(a.__key,a.getTextContent().length,"text")}}else ke(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):We(o)&&t.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(e&&ke(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&o===null&&ke(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();We(a)&&t.set(a.__key,0,"text")}}}function n2(t,e,n){if(t.type==="text"&&e.type==="text"){const r=t.isBefore(e),i=t.is(e);T1(t,r,i),T1(e,!r,i),i&&e.set(t.key,t.offset,t.type);const o=zn();if(o.isComposing()&&o._compositionKey!==t.key&&De(n)){const s=n.anchor,a=n.focus;t.set(s.key,s.offset,s.type,!0),e.set(a.key,a.offset,a.type,!0)}}}function r2(t,e,n,r,i,o){if(t===null||n===null||!_f(i,t,n))return null;const s=E1(t,e,De(o)?o.anchor:null,i);if(s===null)return null;const a=E1(n,r,De(o)?o.focus:null,i);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const c=lc(t),u=lc(n);if(Ht(c)&&Ht(u))return null}return n2(s,a,o),[s,a]}function Ib(t){return ke(t)&&!t.isInline()}function i2(t,e,n,r,i,o){const s=ma(),a=new Pl(bi(t,e,i),bi(n,r,o),0,"");return a.dirty=!0,s._selection=a,a}function fg(){const t=bi("root",0,"element"),e=bi("root",0,"element");return new Pl(t,e,0,"")}function o2(){return new dg(new Set)}function Gy(t,e,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,a=s==="selectionchange",c=!gb&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,d,f,h;if(De(t)&&!c)return t.clone();if(e===null)return null;if(u=e.anchorNode,d=e.focusNode,f=e.anchorOffset,h=e.focusOffset,(a||s===void 0)&&De(t)&&!_f(n,u,d))return t.clone();const p=r2(u,f,d,h,n,t);if(p===null)return null;const[g,m]=p;return new Pl(g,m,De(t)?t.format:0,De(t)?t.style:"")}function Ke(){return ma()._selection}function Ll(){return zn()._editorState._selection}function sp(t,e,n,r=1){const i=t.anchor,o=t.focus,s=i.getNode(),a=o.getNode();if(!e.is(s)&&!e.is(a))return;const c=e.__key;if(t.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(c,d,"element"),o.set(c,d,"element"),$1(t)}}else{const u=t.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(e.is(f)){const g=d.offset;(n<=g&&r>0||n<g&&r<0)&&d.set(c,Math.max(0,g+r),"element")}if(e.is(p)){const g=h.offset;(n<=g&&r>0||n<g&&r<0)&&h.set(c,Math.max(0,g+r),"element")}}$1(t)}function $1(t){const e=t.anchor,n=e.offset,r=t.focus,i=r.offset,o=e.getNode(),s=r.getNode();if(t.isCollapsed()){if(!ke(o))return;const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),e.set(u.__key,d,"text"),r.set(u.__key,d,"text")}return}if(ke(o)){const a=o.getChildrenSize(),c=n>=a,u=c?o.getChildAtIndex(a-1):o.getChildAtIndex(n);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),e.set(u.__key,d,"text")}}if(ke(s)){const a=s.getChildrenSize(),c=i>=a,u=c?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if(We(u)){let d=0;c&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}function ap(t,e,n,r,i){let o=null,s=0,a=null;r!==null?(o=r.__key,We(r)?(s=r.getTextContentSize(),a="text"):ke(r)&&(s=r.getChildrenSize(),a="element")):i!==null&&(o=i.__key,We(i)?a="text":ke(i)&&(a="element")),o!==null&&a!==null?t.set(o,s,a):(s=e.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function C1(t,e,n,r,i){t.type==="text"?t.set(n,t.offset+(e?0:i),"text"):t.offset>r.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function s2(t,e,n,r,i){try{t.setBaseAndExtent(e,n,r,i)}catch{}}function Gq(t,e,n,r,i,o,s){const a=r.anchorNode,c=r.focusNode,u=r.anchorOffset,d=r.focusOffset,f=document.activeElement;if(i.has(Rq)&&f!==o||f!==null&&ew(f))return;if(!De(e))return void(t!==null&&_f(n,a,c)&&r.removeAllRanges());const h=e.anchor,p=e.focus,g=h.key,m=p.key,v=dl(n,g),_=dl(n,m),y=h.offset,w=p.offset,x=e.format,E=e.style,$=e.isCollapsed();let C=v,k=_,T=!1;if(h.type==="text"){C=zc(v);const M=h.getNode();T=M.getFormat()!==x||M.getStyle()!==E}else De(t)&&t.anchor.type==="text"&&(T=!0);var A,P,L,O,N;if(p.type==="text"&&(k=zc(_)),C!==null&&k!==null&&($&&(t===null||T||De(t)&&(t.format!==x||t.style!==E))&&(A=x,P=E,L=y,O=g,N=performance.now(),GA=[A,P,L,O,N]),u!==y||d!==w||a!==C||c!==k||r.type==="Range"&&$||(f!==null&&o.contains(f)||i.has(Fq)||o.focus({preventScroll:!0}),h.type==="element"))){if(s2(r,C,y,k,w),!i.has(Dq)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const M=De(e)&&e.anchor.type==="element"?C.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(M!==null){let U;if(M instanceof Text){const H=document.createRange();H.selectNode(M),U=H.getBoundingClientRect()}else U=M.getBoundingClientRect();(function(H,G,W){const Y=k2(W),R=sw(Y);if(Y===null||R===null)return;let{top:B,bottom:J}=G,Q=0,ee=0,te=W;for(;te!==null;){const re=te===Y.body;if(re)Q=0,ee=Vi(H).innerHeight;else{const pe=te.getBoundingClientRect();Q=pe.top,ee=pe.bottom}let he=0;if(B<Q?he=-(Q-B):J>ee&&(he=J-ee),he!==0)if(re)R.scrollBy(0,he);else{const pe=te.scrollTop;te.scrollTop+=he;const ce=te.scrollTop-pe;B-=ce,J-=ce}if(re)break;te=yf(te)}})(n,U,o)}}Ab=!0}}function hu(t){let e=Ke()||Ll();e===null&&(e=Qn().selectEnd()),e.insertNodes(t)}function Wq(){const t=Ke();return t===null?"":t.getTextContent()}function Cm(t){let e=t;t.isCollapsed()||e.removeText();const n=Ke();De(n)&&(e=n),De(e)||Be(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!zi(i);){const s=i;if([i,o]=Yq(i,o),s.is(i))break}return o}function Yq(t,e){const n=t.getParent();if(!n){const i=Sn();return Qn().append(i),i.select(),[Qn(),0]}if(We(t)){const i=t.splitText(e);if(i.length===0)return[n,t.getIndexWithinParent()];const o=e===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!ke(t)||e===0)return[n,t.getIndexWithinParent()];const r=t.getChildAtIndex(e);if(r){const i=new Pl(bi(t.__key,e,"element"),bi(t.__key,e,"element"),0,""),o=t.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function A1(t,e,n,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!t.isCollapsed()){const[d,f]=n===t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];return f.set(d.key,d.offset,d.type),!0}const o=ks(t.focus,n?"previous":"next"),s=r==="lineboundary",a=e==="move";let c=o,u=i==="decorators-and-blocks";if(!A2(c)){for(const d of c){u=!1;const{origin:f}=d;if(!Ht(f)||f.isIsolated()||(c=d,!s||!f.isInline()))break}if(u)for(const d of fw(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Mo(d))d.origin.isInline()||(c=d);else{if(ke(d.origin))continue;Ht(d.origin)&&!d.origin.isInline()&&(c=d)}break}}if(c===o)return!1;if(a&&!s&&Ht(c.origin)&&c.origin.isKeyboardSelectable()){const d=o2();return d.add(c.origin.getKey()),Lr(d),!0}return c=ro(c),a&&jd(t.anchor,c),jd(t.focus,c),u||!s}let br=null,_r=null,gi=!1,Am=!1,kh=0;const P1={characterData:!0,childList:!0,subtree:!0};function mf(){return gi||br!==null&&br._readOnly}function vr(){gi&&Be(13)}function a2(){kh>99&&Be(14)}function ma(){return br===null&&Be(195,l2()),br}function zn(){return _r===null&&Be(196,l2()),_r}function l2(){let t=0;const e=new Set,n=Fc.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=gg(i);if(tw(o))t++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let r=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function Jq(){return _r}function L1(t,e,n){const r=e.__type,i=p2(t,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let a=0;a<s&&(o[a](e),e.isAttached());a++);}function N1(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function c2(t,e){if(!e)return;const n=t._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)n.add(i)}function Xq(t){return Wy(t,zn()._nodes)}function Wy(t,e){const n=t.type,r=e.get(n);r===void 0&&Be(17,n);const i=r.klass;t.type!==i.getType()&&Be(18,i.name);const o=i.importJSON(t),s=t.children;if(ke(o)&&Array.isArray(s))for(let a=0;a<s.length;a++){const c=Wy(s[a],e);o.append(c)}return o}function O1(t,e,n){const r=br,i=gi,o=_r;br=e,gi=!0,_r=t;try{return n()}finally{br=r,gi=i,_r=o}}function cs(t,e){const n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n===null)return;const o=t._editorState,s=o._selection,a=n._selection,c=t._dirtyType!==0,u=br,d=gi,f=_r,h=t._updating,p=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!i&&c&&p!==null){_r=t,br=n,gi=!1,t._updating=!0;try{const $=t._dirtyType,C=t._dirtyElements,k=t._dirtyLeaves;p.disconnect(),g=kq(o,n,t,$,C,k)}catch($){if($ instanceof Error&&t._onError($),Am)throw $;return f2(t,null,r,n),SA(t),t._dirtyType=2,Am=!0,cs(t,o),void(Am=!1)}finally{p.observe(r,P1),t._updating=h,br=u,gi=d,_r=f}}n._readOnly||(n._readOnly=!0);const m=t._dirtyLeaves,v=t._dirtyElements,_=t._normalizedNodes,y=t._updateTags,w=t._deferred;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),(function($,C){const k=$._decorators;let T=$._pendingDecorators||k;const A=C._nodeMap;let P;for(P in T)A.has(P)||(T===k&&(T=v2($)),delete T[P])})(t,n);const x=i?null:go(Vi(t));if(t._editable&&x!==null&&(c||a===null||a.dirty||!a.is(s))&&r!==null&&!y.has(Mq)){_r=t,br=n;try{if(p!==null&&p.disconnect(),c||a===null||a.dirty){const $=t._blockCursorElement;$!==null&&Fb($,t,r),Gq(s,a,t,x,y,r)}(function($,C,k){let T=$._blockCursorElement;if(De(k)&&k.isCollapsed()&&k.anchor.type==="element"&&C.contains(document.activeElement)){const A=k.anchor,P=A.getNode(),L=A.offset;let O=!1,N=null;if(L===P.getChildrenSize())Lm(P.getChildAtIndex(L-1))&&(O=!0);else{const M=P.getChildAtIndex(L);if(M!==null&&Lm(M)){const U=M.getPreviousSibling();(U===null||Lm(U))&&(O=!0,N=$.getElementByKey(M.__key))}}if(O){const M=$.getElementByKey(P.__key);return T===null&&($._blockCursorElement=T=(function(U){const H=U.theme,G=document.createElement("div");G.contentEditable="false",G.setAttribute("data-lexical-cursor","true");let W=H.blockCursor;if(W!==void 0){if(typeof W=="string"){const Y=vA(W);W=H.blockCursor=Y}W!==void 0&&G.classList.add(...W)}return G})($._config)),C.style.caretColor="transparent",void(N===null?M.appendChild(T):M.insertBefore(T,N))}}T!==null&&Fb(T,$,C)})(t,r,a)}finally{p!==null&&p.observe(r,P1),_r=f,br=u}}g!==null&&(function($,C,k,T,A){const P=Array.from($._listeners.mutation),L=P.length;for(let O=0;O<L;O++){const[N,M]=P[O];for(const U of M){const H=C.get(U);H!==void 0&&N(H,{dirtyLeaves:T,prevEditorState:A,updateTags:k})}}})(t,g,y,m,o),De(a)||a===null||s!==null&&s.is(a)||t.dispatchCommand(OA,void 0);const E=t._pendingDecorators;E!==null&&(t._decorators=E,t._pendingDecorators=null,fd("decorator",t,!0,E)),(function($,C,k){const T=F1(C),A=F1(k);T!==A&&fd("textcontent",$,!0,A)})(t,e||o,n),fd("update",t,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,mutatedNodes:g,normalizedNodes:_,prevEditorState:e||o,tags:y}),(function($,C){if($._deferred=[],C.length!==0){const k=$._updating;$._updating=!0;try{for(let T=0;T<C.length;T++)C[T]()}finally{$._updating=k}}})(t,w),(function($){const C=$._updates;if(C.length!==0){const k=C.shift();if(k){const[T,A]=k;hg($,T,A)}}})(t)}function fd(t,e,n,...r){const i=e._updating;e._updating=n;try{const o=Array.from(e._listeners[t]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{e._updating=i}}function I1(t,e){const n=t._updates;let r=e||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i,a=t._pendingEditorState;let c;s!==void 0&&(c=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&Be(191),a._flushSync=!0),c&&t._deferred.push(c),c2(t,s.tag)),a==null?hg(t,o,s):o()}}return r}function hg(t,e,n){const r=t._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,c2(t,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&t._deferred.push(i);const a=t._editorState;let c=t._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=t._pendingEditorState=u2(c||a),u=!0),c._flushSync=s;const d=br,f=gi,h=_r,p=t._updating;br=c,gi=!1,t._updating=!0,_r=t;const g=t._headless||t.getRootElement()===null;Zy(null);try{u&&(g?a._selection!==null&&(c._selection=a._selection.clone()):c._selection=(function(y,w){const x=y.getEditorState()._selection,E=go(Vi(y));return De(x)||x==null?Gy(x,E,y,w):x.clone()})(t,n&&n.event||null));const v=t._compositionKey;e(),o=I1(t,o),(function(y,w){const x=w.getEditorState()._selection,E=y._selection;if(De(E)){const $=E.anchor,C=E.focus;let k;if($.type==="text"&&(k=$.getNode(),k.selectionTransform(x,E)),C.type==="text"){const T=C.getNode();k!==T&&T.selectionTransform(x,E)}}})(c,t),t._dirtyType!==0&&(o?(function(y,w){const x=w._dirtyLeaves,E=y._nodeMap;for(const $ of x){const C=E.get($);We(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&d1(C)}})(c,t):(function(y,w){const x=w._dirtyLeaves,E=w._dirtyElements,$=y._nodeMap,C=Bs(),k=new Map;let T=x,A=T.size,P=E,L=P.size;for(;A>0||L>0;){if(A>0){w._dirtyLeaves=new Set;for(const O of T){const N=$.get(O);We(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&d1(N),N!==void 0&&N1(N,C)&&L1(w,N,k),x.add(O)}if(T=w._dirtyLeaves,A=T.size,A>0){kh++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const O of P){const N=O[0],M=O[1];if(E.set(N,M),!M)continue;const U=$.get(N);U!==void 0&&N1(U,C)&&L1(w,U,k)}T=w._dirtyLeaves,A=T.size,P=w._dirtyElements,L=P.size,kh++}w._dirtyLeaves=x,w._dirtyElements=E})(c,t),I1(t),(function(y,w,x,E){const $=y._nodeMap,C=w._nodeMap,k=[];for(const[T]of E){const A=C.get(T);A!==void 0&&(A.isAttached()||(ke(A)&&wA(A,T,$,C,k,E),$.has(T)||E.delete(T),k.push(T)))}for(const T of k)C.delete(T);for(const T of x){const A=C.get(T);A===void 0||A.isAttached()||($.has(T)||x.delete(T),C.delete(T))}})(a,c,t._dirtyLeaves,t._dirtyElements)),v!==t._compositionKey&&(c._flushSync=!0);const _=c._selection;if(De(_)){const y=c._nodeMap,w=_.anchor.key,x=_.focus.key;y.get(w)!==void 0&&y.get(x)!==void 0||Be(19)}else Gr(_)&&_._nodes.size===0&&(c._selection=null)}catch(v){return v instanceof Error&&t._onError(v),t._pendingEditorState=a,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void cs(t)}finally{br=d,gi=f,_r=h,t._updating=p,kh=0}t._dirtyType!==0||t._deferred.length>0||(function(v,_){const y=_.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(y))return!0}else if(y!==null)return!0;return!1})(c,t)?c._flushSync?(c._flushSync=!1,cs(t)):u&&r6(()=>{cs(t)}):(c._flushSync=!1,u&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function xi(t,e,n){_r===t&&n===void 0?e():hg(t,e,n)}class hd{element;before;after;constructor(e,n,r){this.element=e,this.before=n||null,this.after=r||null}withBefore(e){return new hd(this.element,e,this.after)}withAfter(e){return new hd(this.element,this.before,e)}withElement(e){return this.element===e?this:new hd(e,this.before,this.after)}insertChild(e){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&Be(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&Be(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&Be(224),this.element.replaceChild(e,n),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const n=e==="decorator"&&(Od||Rc||Nd);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const n=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&n.removeChild(r),n.removeChild(e),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const n=this.getManagedLineBreak();if(n){if(e===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),e){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let n=this.after;n!==null;n=n.previousSibling)e++;return e}resolveChildIndex(e,n,r,i){if(r===this.element){const c=this.getFirstChildOffset();return[e,Math.min(c+e.getChildrenSize(),Math.max(c,i))]}const o=R1(n,r);o.push(i);const s=R1(n,this.element);let a=e.getIndexWithinParent();for(let c=0;c<s.length;c++){const u=o[c],d=s[c];if(u===void 0||u<d)break;if(u>d){a+=1;break}}return[e.getParentOrThrow(),a]}}function R1(t,e){const n=[];let r=e;for(;r!==t&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==t&&Be(225),n.reverse()}class Xn extends Do{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return cq[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=zn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(We(n)&&e.push(n),ke(n)){const r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;ke(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;ke(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),r=n.length;if(e>=r){const o=n[r-1];return ke(o)&&o.getLastDescendant()||o||null}const i=n[e];return ke(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Dn(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&Be(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Dn(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&Be(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let r,i;if(e<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContent(),ke(o)&&i!==r-1&&!o.isInline()&&(e+=na)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];e+=o.getTextContentSize(),ke(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const n=r1[e];return(this.getFormat()&n)!==0}return!1}hasTextFormat(e){const n=ll[e];return(this.getTextFormat()&n)!==0}getFormatFlags(e,n){return lp(this.getLatest().__textFormat,e,n)}getTextStyle(){return this.getLatest().__textStyle}select(e,n){vr();const r=Ke();let i=e,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const c=this.getFirstChild();if(We(c)||ke(c))return c.select(0,0)}else if(!(e!==void 0&&e!==s||n!==void 0&&n!==s)){const c=this.getLastChild();if(We(c)||ke(c))return c.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return De(r)?(r.anchor.set(a,i,"element"),r.focus.set(a,o,"element"),r.dirty=!0,r):i2(a,i,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?r1[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}setTextStyle(e){const n=this.getWritable();return n.__textStyle=e,n}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){op(this)&&Be(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+n<=i||Be(226,String(e),String(n),String(i));const s=o.__key,a=[],c=[],u=this.getChildAtIndex(e+n);let d=null,f=i-n+r.length;if(e!==0)if(e===i)d=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g<n;g++){p===null&&Be(100);const m=p.getNextSibling(),v=p.__key;Ba(p.getWritable()),c.push(v),p=m}}let h=d;for(const p of r){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===s&&f--,Ba(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===s&&Be(76),g.__parent=s,a.push(m),h=p}if(e+n===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,c.length){const p=Ke();if(De(p)){const g=new Set(c),m=new Set(a),{anchor:v,focus:_}=p;D1(v,g,m)&&ap(v,v.getNode(),this,d,u),D1(_,g,m)&&ap(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||$i(this)||this.remove()}}return o}getDOMSlot(e){return new hd(e)}exportDOM(e){const{element:n}=super.exportDOM(e);if(Pn(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(e.textFormat=n),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,n){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function ke(t){return t instanceof Xn}function D1(t,e,n){let r=t.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Yy extends Do{decorate(e,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ht(t){return t instanceof Yy}class pu extends Xn{__cachedText;static getType(){return"root"}static clone(){return new pu}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Be(51)}getTextContent(){const e=this.__cachedText;return!mf()&&zn()._dirtyType!==0||e===null?super.getTextContent():e}remove(){Be(52)}replace(e){Be(53)}insertBefore(e){Be(54)}insertAfter(e){Be(55)}updateDOM(e,n){return!1}splice(e,n,r){for(const i of r)ke(i)||Ht(i)||Be(282);return super.splice(e,n,r)}static importJSON(e){return Qn().updateFromJSON(e)}collapseAtStart(){return!0}}function rr(t){return t instanceof pu}function u2(t){return new vf(new Map(t._nodeMap))}function Jy(){return new vf(new Map([["root",new pu]]))}function d2(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&Be(130,n.name),ke(t)){const r=e.children;Array.isArray(r)||Be(59,n.name);const i=t.getChildren();for(let o=0;o<i.length;o++){const s=d2(i[o]);r.push(s)}}return e}function Zq(t){return t instanceof vf}class vf{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,n){return O1(n&&n.editor||null,this,e)}clone(e){const n=new vf(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return O1(null,this,()=>({root:d2(Qn())}))}}class Xy extends Xn{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class gu extends Xn{static getType(){return"paragraph"}static clone(e){return new gu(e.__key)}createDOM(e){const n=document.createElement("p"),r=vc(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(e,n,r){return!1}static importDOM(){return{p:e=>({conversion:Qq,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(Pn(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(e){return Sn().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,n){const r=Sn();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||We(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Qq(t){const e=Sn();return t.style&&(e.setFormat(t.style.textAlign),aw(t,e)),{node:e}}function Sn(){return yi(new gu)}function bf(t){return t instanceof gu}const zt=0,Os=1,Yu=2,e6=4;function f2(t,e,n,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Jy(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const o=t._observer;o!==null&&(o.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function t6(t){const e=new Set,n=new Set;let r=t;for(;r;){const{ownNodeConfig:i}=bg(r),o=r.transform;if(!n.has(o)){n.add(o);const s=r.transform();s&&e.add(s)}if(i){const s=i.$transform;s&&e.add(s),r=i.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof Do&&s!==Do?s:void 0}}return e}function h2(t){const e=t||{},n=Jq(),r=e.theme||{},i=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,s=Jy(),a=e.namespace||(i!==null?i._config.namespace:y2()),c=e.editorState,u=[pu,Ls,du,fu,gu,Xy,...e.nodes||[]],{onError:d,html:f}=e,h=e.editable===void 0||e.editable;let p;if(t===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let m=0;m<u.length;m++){let v=u[m],_=null,y=null;if(typeof v!="function"){const E=v;v=E.replace,_=E.with,y=E.withKlass||null}bg(v);const w=v.getType(),x=t6(v);p.set(w,{exportDOM:f&&f.export?f.export.get(v):void 0,klass:v,replace:_,replaceWithKlass:y,sharedNodeState:bq(u[m]),transforms:x})}}const g=new Fc(s,i,p,{disableEvents:o,namespace:a,theme:r},d||console.error,(function(m,v){const _=new Map,y=new Set,w=x=>{Object.keys(x).forEach(E=>{let $=_.get(E);$===void 0&&($=[],_.set(E,$)),$.push(x[E])})};return m.forEach(x=>{const E=x.klass.importDOM;if(E==null||y.has(E))return;y.add(E);const $=E.call(x.klass);$!==null&&w($)}),v&&w(v),_})(p,f?f.import:void 0),h,t);return c!==void 0&&(g._pendingEditorState=c,g._dirtyType=2),g}class Fc{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,n,r,i,o,s,a,c){this._createEditorArgs=c,this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=y2(),this._onError=o,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&Be(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&Be(36,String(e));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(a=>a.size===0)&&i.delete(e)}}registerMutationListener(e,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let s=o.get(n);s===void 0&&(s=new Set,o.set(n,s)),s.add(i);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,i),()=>{s.delete(i),s.size===0&&o.delete(n)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return n===void 0&&Be(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,n){const r=this._editorState,i=H1(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,n){const r=this.getRegisteredNode(e);return r.transforms.add(n),r}registerNodeTransform(e,n){const r=this.registerNodeTransformToKlass(e,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return(function(s,a){const c=H1(s.getEditorState()),u=[];for(const d of a){const f=c.get(d);f&&u.push(f)}u.length!==0&&s.update(()=>{for(const d of u)for(const f of d.keys()){const h=Dn(f);h&&h.markDirty()}},s._pendingEditorState===null?{tag:dd}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return rt(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const r=vc(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,f2(this,n,e,i),n!==null&&(this._config.disableEvents||Nq(n),r!=null&&n.classList.remove(...r)),e!==null){const o=sw(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,SA(this),this._updateTags.add(dd),cs(this),this._config.disableEvents||(function(a,c){const u=a.ownerDocument;Cb.set(a,u);const d=ip.get(u)??0;d<1&&u.addEventListener("selectionchange",ZA),ip.set(u,d+1),a.__lexicalEditor=c;const f=XA(a);for(let h=0;h<$b.length;h++){const[p,g]=$b[h],m=typeof g=="function"?v=>{v1(v)||(m1(v),(c.isEditable()||p==="click")&&g(v,c))}:v=>{if(v1(v))return;m1(v);const _=c.isEditable();switch(p){case"cut":return _&&rt(c,Hy,v);case"copy":return rt(c,ug,v);case"paste":return _&&rt(c,Uy,v);case"dragstart":return _&&rt(c,qA,v);case"dragover":return _&&rt(c,VA,v);case"dragend":return _&&rt(c,Tq,v);case"focus":return _&&rt(c,Aq,v);case"blur":return _&&rt(c,Pq,v);case"drop":return _&&rt(c,BA,v)}};a.addEventListener(p,m),f.push(()=>{a.removeEventListener(p,m)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(dd),cs(this);fd("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&Be(38);let r=e;r._readOnly&&(r=u2(e),r._selection=e._selection?e._selection.clone():null),kA(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),cs(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||cs(this)}parseEditorState(e,n){return(function(r,i,o){const s=Jy(),a=br,c=gi,u=_r,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,br=s,gi=!1,_r=i,Zy(null);try{const g=i._nodes;Wy(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,br=a,gi=c,_r=u}return s})(typeof e=="string"?JSON.parse(e):e,this,n)}read(e){return cs(this),this.getEditorState().read(e,{editor:this})}update(e,n){(function(r,i,o){r._updating?r._updates.push([i,o]):hg(r,i,o)})(this,e,n)}focus(e,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),xi(this,()=>{const i=Ke(),o=Qn();i!==null?i.dirty||Lr(i.clone()):o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),c6("focus"),u6(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=go(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,fd("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Fc.version="0.38.2+prod.esm";let Rb=null;function Zy(t){Rb=t}let n6=1;function p2(t,e){const n=Qy(t,e);return n===void 0&&Be(30,e),n}function Qy(t,e){return t._nodes.get(e)}const r6=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function M1(t){return Ht(ra(t))}function ew(t){const e=document.activeElement;if(!Pn(e))return!1;const n=e.nodeName;return Ht(ra(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&gg(e)==null)}function _f(t,e,n){const r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!ew(e)&&pg(e)===t}catch{return!1}}function tw(t){return t instanceof Fc}function pg(t){let e=t;for(;e!=null;){const n=gg(e);if(tw(n))return n;e=yf(e)}return null}function gg(t){return t?t.__lexicalEditor:null}function i6(t){return sq.test(t)?"rtl":aq.test(t)?"ltr":null}function Ua(t){return Qr(t)||t.isToken()}function ss(t){return Ua(t)||t.isSegmented()}function Ns(t){return mu(t)&&t.nodeType===3}function g2(t){return mu(t)&&t.nodeType===9}function zc(t){let e=t;for(;e!=null;){if(Ns(e))return e;e=e.firstChild}return null}function lp(t,e,n){const r=ll[e];if(n!==null&&(t&r)===(n&r))return t;let i=t^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function o6(t){return We(t)||Rn(t)||Ht(t)}function s6(t,e){const n=(function(){const s=Rb;return Rb=null,s})();if((e=e||n&&n.__key)!=null)return void(t.__key=e);vr(),a2();const r=zn(),i=ma(),o=""+n6++;i._nodeMap.set(o,t),ke(t)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,t.__key=o}function Ba(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),r=e.getWritable(),i=t.getPreviousSibling(),o=t.getNextSibling(),s=o!==null?o.__key:null,a=i!==null?i.__key:null,c=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(r.__first=s),o===null&&(r.__last=a),c!==null&&(c.__next=s),u!==null&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function cp(t){a2(),op(t)&&Be(323,t.__key,t.__type);const e=t.getLatest(),n=e.__parent,r=ma(),i=zn(),o=r._nodeMap,s=i._dirtyElements;n!==null&&(function(c,u,d){let f=c;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent}})(n,o,s);const a=e.__key;i._dirtyType=1,ke(t)?s.set(a,!0):i._dirtyLeaves.add(a)}function kr(t){vr();const e=zn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const r=Dn(n);r!==null&&r.getWritable()}if(t!==null){const r=Dn(t);r!==null&&r.getWritable()}}}function Bs(){return mf()?null:zn()._compositionKey}function Dn(t,e){const n=(e||ma())._nodeMap.get(t);return n===void 0?null:n}function m2(t,e){const n=mg(t,zn());return n!==void 0?Dn(n,e):null}function mg(t,e){return t[`__lexicalKey_${e._key}`]}function ra(t,e){let n=t;for(;n!=null;){const r=m2(n,e);if(r!==null)return r;n=yf(n)}return null}function v2(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function F1(t){return t.read(()=>Qn().getTextContent())}function Qn(){return b2(ma())}function b2(t){return t._nodeMap.get("root")}function Lr(t){vr();const e=ma();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function lc(t){const e=zn(),n=(function(r,i){let o=r;for(;o!=null;){const s=mg(o,i);if(s!==void 0)return s;o=yf(o)}return null})(t,e);return n===null?t===e.getRootElement()?Dn("root"):null:Dn(n)}function _2(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function nw(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function y2(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function w2(t){return Ns(t)?t.nodeValue:null}function rw(t,e,n){const r=go(Vi(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let a=w2(i);const c=ra(i);if(a!==null&&We(c)){if(a===lg&&n){const u=n.length;a=n,o=u,s=u}a!==null&&iw(c,a,o,s,t)}}}function iw(t,e,n,r,i){let o=t;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let a=e;(s||i)&&e[e.length-1]===lg&&(a=e.slice(0,-1));const c=o.getTextContent();if(i||a!==c){if(a===""){if(kr(null),Nd||Rc||Od)o.remove();else{const m=zn();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),d=Ll(),f=o.getTextContentSize(),h=Bs(),p=o.getKey();if(o.isToken()||h!==null&&p===h&&!s||De(d)&&(u!==null&&!u.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===t.__key&&d.anchor.offset===0&&!o.canInsertTextBefore()&&!s||d.focus.key===t.__key&&d.focus.offset===f&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=Ke();if(!De(g)||n===null||r===null)return void z1(o,a,g);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const m=In(o.getTextContent());o.replace(m),o=m}z1(o,a,g)}}}function z1(t,e,n){if(t.setTextContent(e),De(n)){const r=t.getKey();for(const i of["anchor","focus"]){const o=n[i];o.type==="text"&&o.key===r&&(o.offset=Zs(t,o.offset,"clamp"))}}}function Zf(t,e,n){const r=e[n]||!1;return r==="any"||r===t[n]}function a6(t,e){return Zf(t,e,"altKey")&&Zf(t,e,"ctrlKey")&&Zf(t,e,"shiftKey")&&Zf(t,e,"metaKey")}function ln(t,e,n){return a6(t,n)&&t.key.toLowerCase()===e.toLowerCase()}const is={ctrlKey:!Zi,metaKey:Zi},j1={altKey:Zi,ctrlKey:!Zi};function U1(t){return t.key==="Backspace"}function B1(t){return ln(t,"a",is)}function l6(t){const e=Qn();if(De(t)){const n=t.anchor,r=t.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Dc(t),t}{const n=e.select(0,e.getChildrenSize());return Lr(Dc(n)),n}}function vc(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,r=n[e];if(r!==void 0)return r;const i=t[e];if(typeof i=="string"){const o=vA(i);return n[e]=o,o}return i}function ow(t,e,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,a=e.get(o);a===void 0&&Be(33,o);const c=a.klass;let u=t.get(c);u===void 0&&(u=new Map,t.set(c,u));const d=u.get(s),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(s,f?"updated":i)}function q1(t,e,n){const r=t.getParent();let i=n,o=t;return r!==null&&(e&&n===0?(i=o.getIndexWithinParent(),o=r):e||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function Db(t,e){const n=t.offset;if(t.type==="element")return q1(t.getNode(),e,n);{const r=t.getNode();if(e&&n===0||!e&&n===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?q1(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function x2(t){const e=Vi(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function rt(t,e,n){return(function(r,i,o){const s=nw(r);for(let a=4;a>=0;a--)for(let c=0;c<s.length;c++){const u=s[c],d=u._commands.get(i);if(d!==void 0){const f=d[a];if(f!==void 0){const h=Array.from(f),p=h.length;let g=!1;if(xi(u,()=>{for(let m=0;m<p;m++)if(h[m](o,r))return void(g=!0)}),g)return g}}}return!1})(t,e,n)}function vg(t){return!rr(t)&&!t.isLastChild()&&!t.isInline()}function dl(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&Be(75,e),n}function yf(t){const e=t.assignedSlot||t.parentElement;return zb(e)?e.host:e}function k2(t){return g2(t)?t:Pn(t)?t.ownerDocument:null}function c6(t){vr(),zn()._updateTags.add(t)}function u6(t){vr(),zn()._deferred.push(t)}function Mb(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function sw(t){const e=k2(t);return e?e.defaultView:null}function Vi(t){const e=t._window;return e===null&&Be(78),e}function d6(t){return ke(t)&&t.isInline()||Ht(t)&&t.isInline()}function f6(t){let e=t.getParentOrThrow();for(;e!==null;){if($i(e))return e;e=e.getParentOrThrow()}return e}function $i(t){return rr(t)||ke(t)&&t.isShadowRoot()}function yi(t){const e=zn(),n=t.getType(),r=Qy(e,n);r===void 0&&Be(200,t.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(t),a=s.constructor;return o!==null?s instanceof o||Be(201,o.name,o.getType(),a.name,a.getType(),t.constructor.name,n):s instanceof t.constructor&&a!==t.constructor||Be(202,a.name,a.getType(),t.constructor.name,n),s.__key===t.__key&&Be(203,t.constructor.name,n,a.name,a.getType()),s}return t}function Pm(t,e){!rr(t.getParent())||ke(e)||Ht(e)||Be(99)}function h6(t){const e=Dn(t);return e===null&&Be(63,t),e}function Lm(t){return(Ht(t)||ke(t)&&!t.canBeEmpty())&&!t.isInline()}function Fb(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=t.parentElement;r!==null&&r.removeChild(t)}function go(t){return _o?(t||window).getSelection():null}function p6(t){const e=sw(t);return e?e.getSelection():null}function S2(t){return Pn(t)&&t.tagName==="A"}function Pn(t){return mu(t)&&t.nodeType===1}function mu(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"}function zb(t){return mu(t)&&t.nodeType===11}function jb(t){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return t.nodeName.match(e)!==null}function up(t){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return t.nodeName.match(e)!==null}function zi(t){if(Ht(t)&&!t.isInline())return!0;if(!ke(t)||$i(t))return!1;const e=t.getFirstChild(),n=e===null||Rn(e)||We(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function wf(){return zn()}const V1=new WeakMap,g6=new Map;function H1(t){if(!t._readOnly&&t.isEmpty())return g6;t._readOnly||Be(192);let e=V1.get(t);return e||(e=(function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(i,o)}return r})(t),V1.set(t,e)),e}function E2(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function m6(t){return(e=E2(t))[QA]=!0,e;var e}function aw(t,e){const n=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(n/40);e.setIndent(r)}function v6(t){t.__lexicalUnmanaged=!0}function b6(t){return t.__lexicalUnmanaged===!0}function Iu(t,e){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(t,e)&&t[e]!==Do[e]}function bg(t){const e=i1 in t.prototype?t.prototype[i1]():void 0,n=(function(s){if(!(s===Do||s.prototype instanceof Do)){let a="<unknown>",c="<unknown>";try{a=s.getType()}catch{}try{Fc.version&&(c=JSON.parse(Fc.version))}catch{}Be(290,s.name,a,c)}return s===Yy||s===Xn||s===Do})(t),r=!n&&Iu(t,"getType")?t.getType():void 0;let i,o=r;if(e)if(r)i=e[r];else for(const[s,a]of Object.entries(e))o=s,i=a;if(!n&&o&&(Iu(t,"getType")||(t.getType=()=>o),Iu(t,"clone")||(t.clone=s=>(Zy(s),new t)),Iu(t,"importJSON")||(t.importJSON=i&&i.$importJSON||(s=>new t().updateFromJSON(s))),!Iu(t,"importDOM")&&i)){const{importDOM:s}=i;s&&(t.importDOM=()=>s)}return{ownNodeConfig:i,ownNodeType:o}}function _6(t){const e=wf();return vr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t))).klass}const ei=(t,e)=>{let n=t;for(;n!=null&&!rr(n);){if(e(n))return n;n=n.getParent()}return null},y6={next:"previous",previous:"next"};class lw{origin;constructor(e){this.origin=e}[Symbol.iterator](){return hw({hasNext:pl,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return yr(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return yr(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,n){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,n)),this}splice(e,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),a=new Map;for(let c=o.getAdjacentCaret();c!==null&&a.size<e;c=c.getAdjacentCaret()){const u=c.origin.getWritable();a.set(u.getKey(),u)}for(const c of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(c.getKey()),!(u.is(c)||o.origin.is(c))){const d=c.getParent();d&&d.is(s)&&c.remove(),u.replace(c)}}else u===null&&Be(263,Array.from(a).join(" "))}else o.insert(c);o=yr(c,this.direction)}for(const c of a.values())c.remove();return this}}class zd extends lw{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:qo(e,this.direction)}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vu(this.direction);return yr(this.getNodeAtCaret(),e)||qo(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof zd&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const w6={root:rr,shadowRoot:$i};function vu(t){return y6[t]}function cw(t,e="root"){return w6[e](t)?null:t}class fl extends lw{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:yr(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return ke(this.origin)?qo(this.origin,this.direction):null}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=vu(this.direction);return yr(this.getNodeAtCaret(),e)||qo(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof fl&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof fl||e instanceof hl)&&this.direction===e.direction&&this.origin.is(e.origin)}}class hl extends lw{type="text";offset;constructor(e,n){super(e),this.offset=n}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ia(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return yr(cw(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ia(this.origin,vu(this.direction),this.offset)}isSamePointCaret(e){return e instanceof hl&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof fl||e instanceof hl)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return yr(this.origin,this.direction)}}function Xs(t){return t instanceof hl}function pl(t){return t instanceof fl}function Mo(t){return t instanceof zd}const x6={next:class extends hl{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends hl{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},k6={next:class extends fl{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends fl{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},S6={next:class extends zd{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends zd{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function yr(t,e){return t?new k6[e](t):null}function ia(t,e,n){return t?new x6[e](t,Zs(t,n)):null}function Zs(t,e,n="error"){const r=t.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(n!=="clamp"&&gA(284,String(e),String(r),t.getKey()),i=i<0?0:r),i}function K1(t,e){return new T6(t,e)}function qo(t,e){return ke(t)?new S6[e](t):null}function E6(t){return t&&t.getChildCaret()||t}function uw(t){return t&&E6(t.getAdjacentCaret())}class dw{type="node-caret-range";direction;anchor;focus;constructor(e,n,r){this.anchor=e,this.focus=n,this.direction=r}getLatest(){const e=this.anchor.getLatest(),n=this.focus.getLatest();return e===this.anchor&&n===this.focus?this:new dw(e,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return Xs(o)?(function(s,a){const{direction:c,origin:u}=s,d=Zs(u,a==="focus"?vu(c):c);return K1(s,d-s.offset)})(o,i):null},n=e("anchor"),r=e("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[K1(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(e="root"){const n=Xs(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Xs(r),o=s=>s.isSameNodeCaret(r)?null:uw(s)||s.getParentCaret(e);return hw({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class T6{type="slice";caret;distance;constructor(e,n){this.caret=e,this.distance=n}getSliceIndices(){const{distance:e,caret:{offset:n}}=this,r=n+e;return r<n?[r,n]:[n,r]}getTextContent(){const[e,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:n}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return ia(e.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function fw(t){return xs(t,yr(Qn(),t.direction))}function $6(t){return xs(t,t)}function xs(t,e){return t.direction!==e.direction&&Be(265),new dw(t,e,t.direction)}function hw(t){const{initial:e,hasNext:n,step:r,map:i}=t;let o=e;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function T2(t,e){const n=Sh(t.origin,e.origin);switch(n===null&&Be(275,t.origin.getKey(),e.origin.getKey()),n.type){case"same":{const r=t.type==="text",i=e.type==="text";return r&&i?(function(o,s){return Math.sign(o-s)})(t.offset,e.offset):t.type===e.type?0:r?-1:i?1:t.type==="child"?-1:1}case"ancestor":return t.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return $2(n)}}function $2(t){const{a:e,b:n}=t,r=e.__key,i=n.__key;let o=e,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function Qf(t,e){return e.is(t)}function G1(t){return ke(t)?[t.getLatest(),null]:[t.getParent(),t.getLatest()]}function Sh(t,e){if(t.is(e))return{commonAncestor:t,type:"same"};const n=new Map;for(let[r,i]=G1(t);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=G1(e);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Qf(t,r)||Be(276),{commonAncestor:r,type:"ancestor"}):i===null?(Qf(e,r)||Be(277),{commonAncestor:r,type:"descendant"}):((ke(o)||Qf(t,o))&&(ke(i)||Qf(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||Be(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function ks(t,e){const{type:n,key:r,offset:i}=t,o=h6(t.key);return n==="text"?(We(o)||Be(266,o.getType(),r),ia(o,e,i)):(ke(o)||Be(267,o.getType(),r),A6(o,t.offset,e))}function jd(t,e){const{origin:n,direction:r}=e,i=r==="next";Xs(e)?t.set(n.getKey(),e.offset,"text"):pl(e)?We(n)?t.set(n.getKey(),Zs(n,r),"text"):t.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Mo(e)&&ke(n)||Be(268),t.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function C2(t){const e=Ke(),n=De(e)?e:fg();return Eh(n,t),Lr(n),n}function Eh(t,e){jd(t.anchor,e.anchor),jd(t.focus,e.focus)}function W1(t){const{anchor:e,focus:n}=t,r=ks(e,"next"),i=ks(n,"next"),o=T2(r,i)<=0?"next":"previous";return xs(jc(r,o),jc(i,o))}function pw(t){const{direction:e,origin:n}=t,r=yr(n,vu(e)).getNodeAtCaret();return r?yr(r,e):qo(n.getParentOrThrow(),e)}function Y1(t,e="root"){const n=[t];for(let r=Mo(t)?t.getParentCaret(e):t.getSiblingCaret();r!==null;r=r.getParentCaret(e))n.push(pw(r));return n}function Nm(t){return!!t&&t.origin.isAttached()}function C6(t,e="removeEmptySlices"){if(t.isCollapsed())return t;const n="root",r="next";let i=e;const o=gw(t,r),s=Y1(o.anchor,n),a=Y1(o.focus.getFlipped(),n),c=new Set,u=[];for(const g of o.iterNodeCarets(n))if(Mo(g))c.add(g.origin.getKey());else if(pl(g)){const{origin:m}=g;ke(m)&&!c.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),_=pw(yr(m,r)),y=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||y==="token"&&g.distance!==0)_.remove();else if(g.distance!==0){i="removeEmptySlices";let w=g.removeTextSlice();const x=g.caret.origin;if(y==="segmented"){const E=w.origin,$=In(E.getTextContent()).setStyle(E.getStyle()).setFormat(E.getFormat());_.replaceOrInsert($),w=ia($,r,w.offset)}x.is(s[0].origin)&&(s[0]=w),x.is(a[0].origin)&&(a[0]=w.getFlipped())}}let d,f;for(const g of s)if(Nm(g)){d=ro(g);break}for(const g of a)if(Nm(g)){f=ro(g);break}const h=(function(g,m,v){if(!g||!m)return null;const _=g.getParentAtCaret(),y=m.getParentAtCaret();if(!_||!y)return null;const w=_.getParents().reverse();w.push(_);const x=y.getParents().reverse();x.push(y);const E=Math.min(w.length,x.length);let $;for($=0;$<E&&w[$]===x[$];$++);const C=(A,P)=>{let L;for(let O=$;O<A.length;O++){const N=A[O];if($i(N))return;!L&&P(N)&&(L=N)}return L},k=C(w,zi),T=k&&C(x,A=>v.has(A.getKey())&&zi(A));return k&&T?[k,T]:null})(d,f,c);if(h){const[g,m]=h;qo(g,"previous").splice(0,m.getChildren()),m.remove()}const p=[d,f,...s,...a].find(Nm);if(p)return $6(jc(ro(p),t.direction));Be(269,JSON.stringify(s.map(g=>g.origin.__key)))}function ro(t){const e=(function(i){let o=i;for(;Mo(o);){const s=uw(o);if(!Mo(s))break;o=s}return o})(t.getLatest()),{direction:n}=e;if(We(e.origin))return Xs(e)?e:ia(e.origin,n,n);const r=e.getAdjacentCaret();return pl(r)&&We(r.origin)?ia(r.origin,n,vu(n)):e}function A2(t){return Xs(t)&&t.offset!==Zs(t.origin,t.direction)}function jc(t,e){return t.direction===e?t:t.getFlipped()}function gw(t,e){return t.direction===e?t:xs(jc(t.focus,e),jc(t.anchor,e))}function A6(t,e,n){let r=qo(t,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return jc(r,n)}function P6(...t){return t}function L6(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}const Ub=new Map;function P2(t){const e={};if(!t)return e;const n=t.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function J1(t){let e=Ub.get(t);return e===void 0&&(e=P2(t),Ub.set(t,e)),e}function L2(t){const e=wf().getElementByKey(t.getKey());if(e===null)return null;const n=e.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(e)}function N2(t){return L2(rr(t)?t:t.getParentOrThrow())}function X1(t){const e=N2(t);return e!==null&&e.direction==="rtl"}function O2(t,e,n="self"){const r=t.getStartEndPoints();if(e.isSelected(t)&&!ss(e)&&r!==null){const[i,o]=r,s=t.isBackward(),a=i.getNode(),c=o.getNode(),u=e.is(a),d=e.is(c);if(u||d){const[f,h]=Ob(t),p=a.is(c),g=e.is(s?c:a),m=e.is(s?a:c);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):g?(_=s?h:f,v=void 0):m&&(_=0,v=s?f:h);const y=e.__text.slice(_,v);y!==e.__text&&(n==="clone"&&(e=m6(e)),e.__text=y)}}return e}function N6(t){const e=t.getStyle(),n=P2(e);Ub.set(e,n)}function O6(t,e){const n=t.getFormatType(),r=t.getIndent();n!==e.getFormatType()&&e.setFormat(n),r!==e.getIndent()&&e.setIndent(r)}function eh(t,e,n=O6){if(t===null)return;const r=t.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,a]=r;o=fg(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(a.key,a.offset,a.type);const c=ei(s.getNode(),zi),u=ei(a.getNode(),zi);ke(c)&&i.set(c.getKey(),c),ke(u)&&i.set(u.getKey(),u)}for(const s of t.getNodes())if(ke(s)&&zi(s))i.set(s.getKey(),s);else if(r===null){const a=ei(s,zi);ke(a)&&i.set(a.getKey(),a)}for(const[s,a]of i){const c=e();n(a,c),a.replace(c,!0),o&&(s===o.anchor.key&&o.anchor.set(c.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(c.getKey(),o.focus.offset,o.focus.type))}o&&t.is(Ke())&&Lr(o)}function I2(t){const e=R2(t);return e!==null&&e.writingMode==="vertical-rl"}function R2(t){const e=t.anchor.getNode();return ke(e)?L2(e):N2(e)}function Z1(t,e){let n=I2(t)?!e:e;D2(t)&&(n=!n);const r=ks(t.focus,n?"previous":"next");if(A2(r))return!1;for(const i of fw(r)){if(Mo(i))return!i.origin.isInline();if(!ke(i.origin)){if(Ht(i.origin))return!0;break}}return!1}function I6(t,e,n,r){t.modify(e?"extend":"move",n,r)}function D2(t){const e=R2(t);return e!==null&&e.direction==="rtl"}function Q1(t,e,n){const r=D2(t);let i;i=I2(t)||r?!n:n,I6(t,e,i,"character")}function R6(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const M2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,D6=M2&&"documentMode"in document?document.documentMode:null;!(!M2||!("InputEvent"in window)||D6)&&"getTargetRanges"in new window.InputEvent("input");function F2(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))e.push(r);return e}function Ud(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function Er(t,...e){const n=F2(...e);n.length>0&&t.classList.add(...n)}function qa(t,...e){const n=F2(...e);n.length>0&&t.classList.remove(...n)}function M6(t){return t?t.getAdjacentCaret():null}function pd(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function F6(t){const e=ei(t,n=>ke(n)&&!n.isInline());return ke(e)||R6(4,t.__key),e}function Oa(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}function z2(t,e){const n=[],r=Array.from(t).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))n.push(i);else if(ke(i))for(const o of z6(i))r.push(o);return n}function z6(t){return j6(qo(t,"previous"))}function j6(t){return hw({hasNext:pl,initial:t.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}var Om={exports:{}},ek;function U6(){return ek||(ek=1,(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(w){return w instanceof c?new c(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++o}),y.__id},clone:function y(w,x){x=x||{};var E,$;switch(a.util.type(w)){case"Object":if($=a.util.objId(w),x[$])return x[$];E={},x[$]=E;for(var C in w)w.hasOwnProperty(C)&&(E[C]=y(w[C],x));return E;case"Array":return $=a.util.objId(w),x[$]?x[$]:(E=[],x[$]=E,w.forEach(function(k,T){E[T]=y(k,x)}),E);default:return w}},getLanguage:function(y){for(;y;){var w=i.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(E){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(E.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var x in w)if(w[x].src==y)return w[x]}return null}},isActive:function(y,w,x){for(var E="no-"+w;y;){var $=y.classList;if($.contains(w))return!0;if($.contains(E))return!1;y=y.parentElement}return!!x}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,w){var x=a.util.clone(a.languages[y]);for(var E in w)x[E]=w[E];return x},insertBefore:function(y,w,x,E){E=E||a.languages;var $=E[y],C={};for(var k in $)if($.hasOwnProperty(k)){if(k==w)for(var T in x)x.hasOwnProperty(T)&&(C[T]=x[T]);x.hasOwnProperty(k)||(C[k]=$[k])}var A=E[y];return E[y]=C,a.languages.DFS(a.languages,function(P,L){L===A&&P!=y&&(this[P]=C)}),C},DFS:function y(w,x,E,$){$=$||{};var C=a.util.objId;for(var k in w)if(w.hasOwnProperty(k)){x.call(w,k,w[k],E||k);var T=w[k],A=a.util.type(T);A==="Object"&&!$[C(T)]?($[C(T)]=!0,y(T,x,null,$)):A==="Array"&&!$[C(T)]&&($[C(T)]=!0,y(T,x,k,$))}}},plugins:{},highlightAll:function(y,w){a.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,x){var E={callback:x,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",E),E.elements=Array.prototype.slice.apply(E.container.querySelectorAll(E.selector)),a.hooks.run("before-all-elements-highlight",E);for(var $=0,C;C=E.elements[$++];)a.highlightElement(C,w===!0,E.callback)},highlightElement:function(y,w,x){var E=a.util.getLanguage(y),$=a.languages[E];a.util.setLanguage(y,E);var C=y.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(C,E);var k=y.textContent,T={element:y,language:E,grammar:$,code:k};function A(L){T.highlightedCode=L,a.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,a.hooks.run("after-highlight",T),a.hooks.run("complete",T),x&&x.call(T.element)}if(a.hooks.run("before-sanity-check",T),C=T.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!T.code){a.hooks.run("complete",T),x&&x.call(T.element);return}if(a.hooks.run("before-highlight",T),!T.grammar){A(a.util.encode(T.code));return}if(w&&r.Worker){var P=new Worker(a.filename);P.onmessage=function(L){A(L.data)},P.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else A(a.highlight(T.code,T.grammar,T.language))},highlight:function(y,w,x){var E={code:y,grammar:w,language:x};if(a.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=a.tokenize(E.code,E.grammar),a.hooks.run("after-tokenize",E),c.stringify(a.util.encode(E.tokens),E.language)},tokenize:function(y,w){var x=w.rest;if(x){for(var E in x)w[E]=x[E];delete w.rest}var $=new f;return h($,$.head,y),d(y,$,w,$.head,0),g($)},hooks:{all:{},add:function(y,w){var x=a.hooks.all;x[y]=x[y]||[],x[y].push(w)},run:function(y,w){var x=a.hooks.all[y];if(!(!x||!x.length))for(var E=0,$;$=x[E++];)$(w)}},Token:c};r.Prism=a;function c(y,w,x,E){this.type=y,this.content=w,this.alias=x,this.length=(E||"").length|0}c.stringify=function y(w,x){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(A){E+=y(A,x)}),E}var $={type:w.type,content:y(w.content,x),tag:"span",classes:["token",w.type],attributes:{},language:x},C=w.alias;C&&(Array.isArray(C)?Array.prototype.push.apply($.classes,C):$.classes.push(C)),a.hooks.run("wrap",$);var k="";for(var T in $.attributes)k+=" "+T+'="'+($.attributes[T]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+k+">"+$.content+"</"+$.tag+">"};function u(y,w,x,E){y.lastIndex=w;var $=y.exec(x);if($&&E&&$[1]){var C=$[1].length;$.index+=C,$[0]=$[0].slice(C)}return $}function d(y,w,x,E,$,C){for(var k in x)if(!(!x.hasOwnProperty(k)||!x[k])){var T=x[k];T=Array.isArray(T)?T:[T];for(var A=0;A<T.length;++A){if(C&&C.cause==k+","+A)return;var P=T[A],L=P.inside,O=!!P.lookbehind,N=!!P.greedy,M=P.alias;if(N&&!P.pattern.global){var U=P.pattern.toString().match(/[imsuy]*$/)[0];P.pattern=RegExp(P.pattern.source,U+"g")}for(var H=P.pattern||P,G=E.next,W=$;G!==w.tail&&!(C&&W>=C.reach);W+=G.value.length,G=G.next){var Y=G.value;if(w.length>y.length)return;if(!(Y instanceof c)){var R=1,B;if(N){if(B=u(H,W,y,O),!B||B.index>=y.length)break;var te=B.index,J=B.index+B[0].length,Q=W;for(Q+=G.value.length;te>=Q;)G=G.next,Q+=G.value.length;if(Q-=G.value.length,W=Q,G.value instanceof c)continue;for(var ee=G;ee!==w.tail&&(Q<J||typeof ee.value=="string");ee=ee.next)R++,Q+=ee.value.length;R--,Y=y.slice(W,Q),B.index-=W}else if(B=u(H,0,Y,O),!B)continue;var te=B.index,re=B[0],he=Y.slice(0,te),pe=Y.slice(te+re.length),ce=W+Y.length;C&&ce>C.reach&&(C.reach=ce);var ge=G.prev;he&&(ge=h(w,ge,he),W+=he.length),p(w,ge,R);var Pe=new c(k,L?a.tokenize(re,L):re,M,re);if(G=h(w,ge,Pe),pe&&h(w,G,pe),R>1){var xe={cause:k+","+A,reach:ce};d(y,w,x,G.prev,W,xe),C&&xe.reach>C.reach&&(C.reach=xe.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},w={value:null,prev:y,next:null};y.next=w,this.head=y,this.tail=w,this.length=0}function h(y,w,x){var E=w.next,$={value:x,prev:w,next:E};return w.next=$,E.prev=$,y.length++,$}function p(y,w,x){for(var E=w.next,$=0;$<x&&E!==y.tail;$++)E=E.next;w.next=E,E.prev=w,y.length-=$}function g(y){for(var w=[],x=y.head.next;x!==y.tail;)w.push(x.value),x=x.next;return w}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(y){var w=JSON.parse(y.data),x=w.language,E=w.code,$=w.immediateClose;r.postMessage(a.highlight(E,a.languages[x],x)),$&&r.close()},!1)),a;var m=a.util.currentScript();m&&(a.filename=m.src,m.hasAttribute("data-manual")&&(a.manual=!0));function v(){a.manual||a.highlightAll()}if(!a.manual){var _=document.readyState;_==="loading"||_==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return a})(e);t.exports&&(t.exports=n),typeof mx<"u"&&(mx.Prism=n),n.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]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var c={};c[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\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:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.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\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,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:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))})(n),n.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:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.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}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.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:n.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:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.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:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.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:n.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"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.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")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",c="loading",u="loaded",d="failed",f="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+c+'"])';function h(m,v,_){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?_(i(y.status,y.statusText)):_(o))},y.send(null)}function p(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var _=Number(v[1]),y=v[2],w=v[3];return y?w?[_,Number(w)]:[_,void 0]:[_,_]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+f}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(f)){m.code="",v.setAttribute(a,c);var _=v.appendChild(document.createElement("CODE"));_.textContent=r;var y=v.getAttribute("data-src"),w=m.language;if(w==="none"){var x=(/\.(\w+)$/.exec(y)||[,"none"])[1];w=s[x]||x}n.util.setLanguage(_,w),n.util.setLanguage(v,w);var E=n.plugins.autoloader;E&&E.loadLanguages(w),h(y,function($){v.setAttribute(a,u);var C=p(v.getAttribute("data-range"));if(C){var k=$.split(/\r\n?|\n/g),T=C[0],A=C[1]==null?k.length:C[1];T<0&&(T+=k.length),T=Math.max(0,Math.min(T-1,k.length)),A<0&&(A+=k.length),A=Math.max(0,Math.min(A,k.length)),$=k.slice(T,A).join(`
|
|
404
404
|
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(T+1))}_.textContent=$,n.highlightElement(_)},function($){v.setAttribute(a,d),_.textContent=$})}}),n.plugins.fileHighlight={highlight:function(v){for(var _=(v||document).querySelectorAll(f),y=0,w;w=_[y++];)n.highlightElement(w)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Om)),Om.exports}U6();Prism.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:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.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}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.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:Prism.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:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.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:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.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:Prism.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"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.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"));Prism.languages.js=Prism.languages.javascript;Prism.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]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.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:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(d){["url","bold","italic","strike","code-snippet"].forEach(function(f){d!==f&&(t.languages.markdown[d].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(d){if(d.language!=="markdown"&&d.language!=="md")return;function f(h){if(!(!h||typeof h=="string"))for(var p=0,g=h.length;p<g;p++){var m=h[p];if(m.type!=="code"){f(m.content);continue}var v=m.content[1],_=m.content[3];if(v&&_&&v.type==="code-language"&&_.type==="code-block"&&typeof v.content=="string"){var y=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var w="language-"+y;_.alias?typeof _.alias=="string"?_.alias=[_.alias,w]:_.alias.push(w):_.alias=[w]}}}f(d.tokens)}),t.hooks.add("wrap",function(d){if(d.type==="code-block"){for(var f="",h=0,p=d.classes.length;h<p;h++){var g=d.classes[h],m=/language-(.+)/.exec(g);if(m){f=m[1];break}}var v=t.languages[f];if(v)d.content=t.highlight(u(d.content),v,f);else if(f&&f!=="none"&&t.plugins.autoloader){var _="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);d.attributes.id=_,t.plugins.autoloader.loadLanguages(f,function(){var y=document.getElementById(_);y&&(y.innerHTML=t.highlight(y.textContent,t.languages[f],f))})}}});var s=RegExp(t.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;function u(d){var f=d.replace(s,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var g;return p[1]==="x"?g=parseInt(p.slice(2),16):g=Number(p.slice(1)),c(g)}else{var m=a[p];return m||h}}),f}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.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\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,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:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var tk={},nk;function B6(){return nk||(nk=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),tk}B6();var rk={},ik;function q6(){return ik||(ik=1,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),rk}q6();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});var ok={},sk;function V6(){return sk||(sk=1,(function(t){t.languages.typescript=t.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/}),t.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 t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.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:e}}}}),t.languages.ts=t.languages.typescript})(Prism)),ok}V6();var ak={},lk;function H6(){return lk||(lk=1,(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),ak}H6();var ck={},uk;function K6(){return uk||(uk=1,(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism)),ck}K6();function _g(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const i of e)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const G6="javascript";function j2(t,e){for(const n of t.childNodes){if(Pn(n)&&n.tagName===e)return!0;j2(n,e)}return!1}const Ju="data-language",Ru="data-highlight-language",th="data-theme";let Va=class U2 extends Xn{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(e){return new U2(e.__language,e.__key)}constructor(e,n){super(n),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const n=document.createElement("code");Er(n,e.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(Ju,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ru,r));const i=this.getTheme();i&&n.setAttribute(th,i);const o=this.getStyle();return o&&n.setAttribute("style",o),n}updateDOM(e,n,r){const i=this.__language,o=e.__language;i?i!==o&&n.setAttribute(Ju,i):o&&n.removeAttribute(Ju);const s=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&n.setAttribute(Ru,i):n.removeAttribute(Ru):s&&i&&n.setAttribute(Ru,i);const a=this.__theme,c=e.__theme;a?a!==c&&n.setAttribute(th,a):c&&n.removeAttribute(th);const u=this.__style,d=e.__style;return u?u!==d&&n.setAttribute("style",u):d&&n.removeAttribute("style"),!1}exportDOM(e){const n=document.createElement("pre");Er(n,e._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(Ju,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ru,r));const i=this.getTheme();i&&n.setAttribute(th,i);const o=this.getStyle();return o&&n.setAttribute("style",o),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||j2(e,"BR"))?{conversion:dk,priority:1}:null,div:()=>({conversion:W6,priority:1}),pre:()=>({conversion:dk,priority:0}),table:e=>Im(e)?{conversion:Y6,priority:3}:null,td:e=>{const n=e,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Im(r)?{conversion:fk,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&Im(n)?{conversion:fk,priority:3}:null}}}static importJSON(e){return io().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
405
405
|
`&&r[i-2].getTextContent()===`
|
|
406
406
|
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const c=Sn();return this.insertAfter(c,n),c}const{anchor:o,focus:s}=e,a=(o.isBefore(s)?o:s).getNode();if(We(a)){let c=Ha(a);const u=[];for(;;)if(Qr(c))u.push(lo()),c=c.getNextSibling();else{if(!Kn(c))break;{let v=0;const _=c.getTextContent(),y=c.getTextContentSize();for(;v<y&&_[v]===" ";)v++;if(v!==0&&u.push(mw(" ".repeat(v))),v!==y)break;c=c.getNextSibling()}}const d=a.splitText(o.offset)[0],f=o.offset===0?0:1,h=d.getIndexWithinParent()+f,p=a.getParentOrThrow(),g=[Pi(),...u];p.splice(h,0,g);const m=u[u.length-1];m?m.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(oi(a)){const{offset:c}=e.anchor;a.splice(c,0,[Pi()]),a.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const e=Sn();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}setLanguage(e){const n=this.getWritable();return n.__language=e||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const n=this.getWritable();return n.__isSyntaxHighlightSupported=e,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const n=this.getWritable();return n.__theme=e||void 0,n}getTheme(){return this.getLatest().__theme}};function io(t,e){return _6(Va).setLanguage(t).setTheme(e)}function oi(t){return t instanceof Va}function dk(t){return{node:io(t.getAttribute(Ju))}}function W6(t){const e=t,n=hk(e);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(hk(i))return!0;i=i.parentElement}return!1})(e)?{node:n?io():null}:{node:null}}function Y6(){return{node:io()}}function fk(){return{node:null}}function hk(t){return t.style.fontFamily.match("monospace")!==null}function Im(t){return t.classList.contains("js-file-line-container")}let Bd=class B2 extends Ls{__highlightType;constructor(e="",n,r){super(e,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new B2(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const n=this.getWritable();return n.__highlightType=e||void 0,n}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),r=Rm(e.theme,this.__highlightType);return Er(n,r),n}updateDOM(e,n,r){const i=super.updateDOM(e,n,r),o=Rm(r.theme,e.__highlightType),s=Rm(r.theme,this.__highlightType);return o!==s&&(o&&qa(n,o),s&&Er(n,s)),i}static importJSON(e){return mw().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return io()}};function Rm(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function mw(t="",e){return yi(new Bd(t,e))}function Kn(t){return t instanceof Bd}function q2(t,e){let n=t;for(let r=yr(t,e);r&&(Kn(r.origin)||Qr(r.origin));r=M6(r))n=r.origin;return n}function Ha(t){return q2(t,"previous")}function bc(t){return q2(t,"next")}function J6(t){const e=Ha(t),n=bc(t);let r=e;for(;r!==null;){if(Kn(r)){const o=i6(r.getTextContent());if(o!==null)return o}if(r===n)break;r=r.getNextSibling()}const i=e.getParent();if(ke(i)){const o=i.getDirection();if(o==="ltr"||o==="rtl")return o}return null}function X6(t,e){let n=null,r=null,i=t,o=e,s=t.getTextContent();for(;;){if(o===0){if(i=i.getPreviousSibling(),i===null)break;if(Kn(i)||Qr(i)||Rn(i)||_g(167),Rn(i)){n={node:i,offset:1};break}o=Math.max(0,i.getTextContentSize()-1),s=i.getTextContent()}else o--;const c=s[o];Kn(i)&&c!==" "&&(r={node:i,offset:o})}if(r!==null)return r;let a=null;if(e<t.getTextContentSize())Kn(t)&&(a=t.getTextContent()[e]);else{const c=t.getNextSibling();Kn(c)&&(a=c.getTextContent()[0])}if(a!==null&&a!==" ")return n;{const c=(function(u,d){let f=u,h=d,p=u.getTextContent(),g=u.getTextContentSize();for(;;){if(!Kn(f)||h===g){if(f=f.getNextSibling(),f===null||Rn(f))return null;Kn(f)&&(h=0,p=f.getTextContent(),g=f.getTextContentSize())}if(Kn(f)){if(p[h]!==" ")return{node:f,offset:h};h++}}})(t,e);return c!==null?c:n}}function Z6(t){const e=bc(t);return Rn(e)&&_g(168),e}(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(n){var r=e[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
|
|
@@ -489,11 +489,11 @@ ${m}`;v.inputValue=k}))}),Me(()=>{v.initialized&&(v.inputValue,Se(()=>{const{lan
|
|
|
489
489
|
@media (prefers-reduced-motion) {*,
|
|
490
490
|
::before,
|
|
491
491
|
::after {scroll-behavior:auto;transition-duration:1ms !important;}
|
|
492
|
-
}::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-1hemu1u a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-1hemu1u {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-1hemu1u {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-1hemu1u {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-1hemu1u {display:flex;flex-direction:column;overflow:hidden;}`};function AH(t,e){se(e,!0),Ee(t,CH);let n=I(e,"orientation",3,"horizontal"),r=at(e,["$$slots","$$events","$$legacy","orientation","children"]);const i=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let o=ie(void 0);Ut(()=>{const p=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:g}=document.documentElement,m=()=>{g.autoTheming!=="false"&&(g.theme=p.matches?"dark":"light")};m(),p.onchange=()=>{m()},globalThis.setTimeout(()=>{l(o)?.remove()},1e3)});var s=$H();dT("1hemu1u",p=>{var g=TH(),m=z(D(g),8);it(m,17,()=>i,dr,(v,_)=>{var y=EH(),w=D(y),x=z(w,2);Z(()=>{Te(w,"href",l(_)),Te(x,"href",l(_))}),S(v,y)}),S(p,g)});var a=D(s);eo(a,"",{},{opacity:"0"}),xt(a,p=>K(o,p),()=>l(o));var c=z(a,2),u=p=>p.preventDefault(),d=p=>p.preventDefault(),f=p=>{if(document.documentElement.matches('[data-env="dev"]'))return;const g=p.target;document.documentElement.matches('[data-env="dev"]')||g?.matches("input, textarea")&&"maxLength"in g||g?.closest('[role="textbox"]')?.contentEditable==="true"||p.preventDefault()};bt(c,()=>({...r,role:"none",class:`sui app-shell ${n()??""}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,"svelte-1hemu1u");var h=F(c);Ue(h,()=>e.children??qe),S(t,s),ae()}var PH=j('<div role="none" class="sui empty-state svelte-iv5qt3"><!></div>');const LH={hash:"svelte-iv5qt3",code:".empty-state.svelte-iv5qt3 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function nr(t,e){Ee(t,LH);let n=I(e,"children",3,void 0);var r=PH(),i=F(r);Ue(i,()=>n()??qe),S(t,r)}var NH=j('<div><div role="none" class="inner svelte-o1h6hd"><!></div></div>');const OH={hash:"svelte-o1h6hd",code:".inner.svelte-o1h6hd {display:contents;}"};function zo(t,e){Ee(t,OH);let n=I(e,"hidden",3,!1),r=I(e,"disabled",3,!1),i=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children"]);var o=NH();bt(o,()=>({...i,role:"group",class:`sui group ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,"svelte-o1h6hd");var s=F(o),a=F(s);Ue(a,()=>e.children??qe),Z(()=>s.inert=r()),S(t,o)}sA();const IP='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>',IH=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>su(i)===n);const r=ou(n);return t.filter(i=>{const o=i[e];return r?r.test(String(o??"")):o===n})},RH=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=ou(n),i={},o=oe(ue)("other");return t.forEach(s=>{const a=s[e];let c;r?[c=o]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(s)}),Object.fromEntries(Object.entries(i).sort(([s],[a])=>Ci(s,a)))},iS=(t,e)=>{const{commitAuthor:{name:n,login:r,email:i}={},commitDate:o}=t;return e==="commit_author"?n||r||i:e==="commit_date"?o:e==="name"?t.name.split(".")[0]:t[e]??""},DH=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String;return r.sort((o,s)=>{const a=iS(o,e),c=iS(s,e);return i===String?Ci(a,c):i===Date?Number(a)-Number(c):a-c}),n==="descending"&&r.reverse(),r},va=ot(!1),Ds=ot(!1),MH=un([no],([t],e)=>{e(!!t.files.length)}),Eg=({collectionName:t,fileName:e,internalPath:n})=>{if(t===void 0)return oe(ue)(n===void 0?"all_assets":"global_assets");const r=si(t),i=r?ws(r):t;if(!e)return i;const o=r?au(r,e):void 0,s=o?df(o):e;return`${i} › ${s}`},Ms=ot({type:"grid",showInfo:!0}),Ol=un([Bn,to],([t,e],n)=>{t&&e&&e.internalPath!==void 0?n(t.filter(({folder:r})=>pn(r,e))):n(t?[...t]:[])}),Cw=un([Ol,Ms],([t,e],n)=>{let r=[...t];r=DH(r,e.sort),r=IH(r,e.filter);const i=RH(r,e.group);pn(oe(Cw),i)||n(i)});Ol.subscribe(t=>{$d.set([]),oe(ft).devModeEnabled&&console.info("listedAssets",t)});const vn=ot(!1),Yo=ot(!1),Ef=ot(!1),xu=ot(!0),FH=()=>{const t=globalThis.matchMedia("(width < 768px)"),e=globalThis.matchMedia("(768px <= width < 1024px)"),n=globalThis.matchMedia("(1024px <= width)"),r=globalThis.matchMedia("(pointer: fine)"),i=()=>vn.set(t.matches),o=()=>Yo.set(e.matches),s=()=>Ef.set(n.matches),a=()=>xu.set(r.matches);i(),o(),s(),a(),t.addEventListener("change",i),e.addEventListener("change",o),n.addEventListener("change",s),r.addEventListener("change",a)},Aw=un([xl,va],([t,e])=>t||e),Zb=ot(""),fi=ot(""),Vo=(t=window.location.href)=>{const{origin:e,hash:n}=new URL(t),{pathname:r,searchParams:i}=new URL(`${e}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries(i)}},Pw=(t,e)=>{if(!oe(vn)||!document.startViewTransition){e();return}const n={types:[t],update:async()=>{e(),await Nt(50),await new Promise(r=>{Vc(()=>{r(void 0)})})}};try{document.startViewTransition(n)}catch{e()}},Lw=(t,e,n)=>{const{isTrusted:r,oldURL:i,newURL:o}=t;if(!r){e();return}const s=Vo(i).path,a=Vo(o).path,c=n.test(s)&&n.test(a),u=s.split("/").length,d=a.split("/").length,f=c&&u>d?"backwards":c&&u<d?"forwards":"unknown";Pw(f,()=>e())},Wt=async(t,{state:e={},replaceState:n=!1,notifyChange:r=!0,transitionType:i="unknown"}={})=>{const{origin:o,pathname:s,hash:a}=window.location,c=`${o}${s}${a}`,u=`${o}${s}#${t}`,d=[{...e,from:c},"",u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&Pw(i,()=>{window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:c,newURL:u}))})},oa=(t,e={})=>{const n="backwards";window.history.state?.from?Pw(n,()=>{window.history.back()}):Wt(t,{...e,transitionType:n})},RP=()=>{const{display_url:t,_siteURL:e}=oe(Ct);window.open(t||e||"/","_blank")},Tg=ot({message:"",context:"authentication"}),Bc=ot(!0),_c=ot(!1),DP=()=>{Tg.set({message:"",context:"authentication"})},Ch=(t,e="authentication")=>{let n=t.cause?.message||oe(ue)("unexpected_error");t.name==="NotFoundError"&&(n=oe(ue)("sign_in_error.not_project_root")),t.name==="AbortError"&&(n=oe(ue)(oe($l)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted")),Tg.set({message:n,context:e}),console.error(t.name,t.message,t.cause)},zH=()=>{const{path:t}=Vo(),{encodedData:e}=t.match(/^\/signin\/(?<encodedData>.+)/)?.groups??{};if(!e)return{_user:void 0,copiedPrefs:void 0};Wt("",{replaceState:!0});let n,r;try{const i=JSON.parse(atob(e));Bt(i)&&typeof i.token=="string"&&(n={token:i.token},Bt(i.prefs)&&(r=i.prefs))}catch{}return{_user:n,copiedPrefs:r}},jH=async()=>{const t=await pi.get("sveltia-cms.user")||await pi.get("decap-cms-user")||await pi.get("netlify-cms-user");if(Bt(t)&&typeof t.backendName=="string")return t},UH=t=>{const e=t?.backendName==="local"||t?.backendName==="proxy"?"local":oe(Ct).backend.name;return $l.set(e),oe(Tn)},BH=async()=>{DP();let t,e;if({_user:t,copiedPrefs:e}=zH(),t??=await jH(),!t)return;const n=UH(t);if(t&&n){Un.set(t);const{token:r,refreshToken:i}=t;_c.set(!0);try{t=await n.signIn({token:r,refreshToken:i,auto:!0})}catch{t=void 0,Un.set(void 0)}}if(_c.set(!1),Bc.set(!t),!(!t||!n)){Un.set(t),e&&ft.update(r=>({...r,...e}));try{await n.fetchFiles()}catch(r){[401,403,404].includes(r.cause?.status)?Bc.set(!0):Ch(r,"dataFetch")}}},Hm=async(t,e)=>{DP(),$l.set(t);const n=oe(Tn);if(!n)return;let r;_c.set(!0);try{r=await n.signIn({token:e,auto:!1})}catch(i){_c.set(!1),Bc.set(!0),e&&i.cause?.status===401?Ch(new Error("Invalid token",{cause:{message:oe(ue)("sign_in_error.invalid_token")}})):Ch(i);return}if(_c.set(!1),Bc.set(!r),!!r){Un.set(r);try{await n.fetchFiles()}catch(i){Ch(i,"dataFetch")}}},qH=async()=>{await oe(Tn)?.signOut(),await pi.set("sveltia-cms.user",{}),$l.set(void 0),Un.set(void 0),Bc.set(!0),eu.set(!1);const t=oe(Ct)?.logout_redirect_url;t&&(window.location.href=t)};var VH=j('<div role="alert" class="message svelte-1ff54ya"> </div>'),HH=j('<div role="alert" class="svelte-1ff54ya"> </div>'),KH=j('<div role="alert" class="svelte-1ff54ya"><!></div>'),GH=j('<div role="none"><!></div>'),WH=j("<!> <!> <!>",1),YH=j("<!> <!> <!>",1),JH=j('<div role="alert" class="error svelte-1ff54ya"><!> </div>'),XH=j(" <!>",1),ZH=j('<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>',1);const QH={hash:"svelte-1ff54ya",code:".buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;}.buttons.svelte-1ff54ya .button {width:320px;}[role=alert].svelte-1ff54ya {display:flex;align-items:center;gap:8px;}[role=alert].error.svelte-1ff54ya {color:var(--sui-error-foreground-color);}"};function eK(t,e){se(e,!0),Ee(t,QH);const n=()=>V(Ct,"$cmsConfig",s),r=()=>V(ue,"$_",s),i=()=>V(_c,"$signingIn",s),o=()=>V(Tg,"$signInError",s),[s,a]=me();let c=ie(!1),u=ie(!1),d=ie(!1),f=ie(!1),h=ie("");const p=b(()=>n()?.backend?.name),g=b(()=>l(p)?uf[l(p)]:null),m=b(()=>l(p)==="test-repo"),v=b(()=>l(m)?void 0:n()?.backend?.repo?.split("/").pop()),_=b(()=>l(c)&&!l(m)),y=({key:P,values:L,link:O})=>jr.sanitize(r()(P,{values:L}).replace("<a>",`<a href="${O}" target="_blank">`),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]});Ut(()=>{const{hostname:P}=window.location;K(c,P==="127.0.0.1"||P==="localhost"||P.endsWith(".localhost"),!0),K(u,"showDirectoryPicker"in window),K(d,navigator.userAgentData?.brands.some(({brand:L})=>L==="Brave")??!1,!0),BH()});var w=ZH(),x=D(w),E=F(x);{var $=P=>{var L=VH(),O=F(L);Z(N=>ne(O,N),[()=>r()("signing_in")]),S(P,L)},C=P=>{var L=X(),O=D(L);{var N=U=>{var H=HH(),G=F(H);Z(W=>ne(G,W),[()=>r()("config.error.unsupported_backend",{values:{name:l(p)}})]),S(U,H)},M=U=>{var H=YH(),G=D(H);{var W=J=>{var Q=WH(),ee=D(Q);{let ce=b(()=>r()("work_with_local_repo")),ge=b(()=>!l(u));et(ee,{variant:"primary",get label(){return l(ce)},get disabled(){return l(ge)},onclick:async()=>{await Hm("local")}})}var te=z(ee,2);{var re=ce=>{var ge=KH(),Pe=F(ge);{var xe=we=>{var ve=X(),fe=D(ve);cr(fe,()=>y({key:"local_backend.disabled",link:"https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave"})),S(we,ve)},de=we=>{var ve=Fe();Z(fe=>ne(ve,fe),[()=>r()("local_backend.unsupported_browser")]),S(we,ve)};q(Pe,we=>{l(d)?we(xe):we(de,!1)})}S(ce,ge)},he=ce=>{var ge=X(),Pe=D(ge);{var xe=de=>{var we=GH(),ve=F(we);{var fe=Ce=>{var ze=Fe();Z(Ne=>ne(ze,Ne),[()=>r()("work_with_local_repo_description",{values:{repo:l(v)}})]),S(Ce,ze)},_e=Ce=>{var ze=Fe();Z(Ne=>ne(ze,Ne),[()=>r()("work_with_local_repo_description_no_repo")]),S(Ce,ze)};q(ve,Ce=>{l(v)?Ce(fe):Ce(_e,!1)})}S(de,we)};q(Pe,de=>{o().message||de(xe)},!0)}S(ce,ge)};q(te,ce=>{l(u)?ce(he,!1):ce(re)})}var pe=z(te,2);ii(pe,{}),S(J,Q)};q(G,J=>{l(_)&&J(W)})}var Y=z(G,2);{let J=b(()=>l(_)?"secondary":"primary"),Q=b(()=>l(m)?r()("work_with_test_repo"):r()("sign_in_with_x",{values:{service:l(g).label}}));et(Y,{get variant(){return l(J)},get label(){return l(Q)},onclick:async()=>{await Hm(l(p))}})}var R=z(Y,2);{var B=J=>{{let Q=b(()=>r()("sign_in_with_x_using_pat",{values:{service:l(g).label}}));et(J,{variant:"secondary",get label(){return l(Q)},onclick:()=>{K(f,!0)}})}};q(R,J=>{l(m)||J(B)})}S(U,H)};q(O,U=>{l(g)?U(M,!1):U(N)},!0)}S(P,L)};q(E,P=>{i()?P($):P(C,!1)})}var k=z(E,2);{var T=P=>{var L=JH(),O=F(L);Ze(O,{name:"error"});var N=z(O);Z(()=>ne(N,` ${o().message??""}`)),S(P,L)};q(k,P=>{o().message&&o().context==="authentication"&&P(T)})}var A=z(x,2);{let P=b(()=>r()("sign_in_using_pat_title")),L=b(()=>({spellcheck:!1,"aria-label":r()("personal_access_token")})),O=b(()=>r()("sign_in")),N=b(()=>!l(h).trim());hA(A,{get title(){return l(P)},get textboxAttrs(){return l(L)},get okLabel(){return l(O)},get okDisabled(){return l(N)},onOk:async()=>{await Hm(l(p),l(h).trim())},get open(){return l(f)},set open(M){K(f,M,!0)},get value(){return l(h)},set value(M){K(h,M,!0)},children:(M,U)=>{var H=XH(),G=D(H),W=z(G);{var Y=R=>{var B=X(),J=D(B);cr(J,()=>y({key:"sign_in_using_pat_link",values:{service:l(g).label},link:l(g).repository.newPatURL})),S(R,B)};q(W,R=>{l(g)?.repository?.newPatURL&&R(Y)})}Z(R=>ne(G,`${R??""} `),[()=>r()("sign_in_using_pat_description")]),S(M,H)},$$slots:{default:!0}})}S(t,w),ae(),a()}const oS=(t,e=qe)=>{var n=X(),r=D(n);cr(r,()=>jr.sanitize(jt.parseInline(e()),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),S(t,n)};var tK=j('<img alt="" class="logo svelte-7ua6x9"/>'),nK=j("<li><!></li>"),rK=j('<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>'),iK=j('<div role="alert" class="message"> </div>'),oK=j('<div role="alert" class="message"> </div>'),sK=j('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div>'),aK=j('<div role="alert" class="message"> </div>'),lK=j('<div role="alert" class="message"> </div> <!>',1),cK=j('<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <h1 class="svelte-7ua6x9">Sveltia CMS</h1> <!></div></div>');const uK={hash:"svelte-7ua6x9",code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-7ua6x9 {filter:opacity(0);}.container.svelte-7ua6x9 .inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:160px;height:auto;}
|
|
492
|
+
}::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-1hemu1u a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-1hemu1u {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-1hemu1u {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-1hemu1u {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-1hemu1u {display:flex;flex-direction:column;overflow:hidden;}`};function AH(t,e){se(e,!0),Ee(t,CH);let n=I(e,"orientation",3,"horizontal"),r=at(e,["$$slots","$$events","$$legacy","orientation","children"]);const i=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let o=ie(void 0);Ut(()=>{const p=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:g}=document.documentElement,m=()=>{g.autoTheming!=="false"&&(g.theme=p.matches?"dark":"light")};m(),p.onchange=()=>{m()},globalThis.setTimeout(()=>{l(o)?.remove()},1e3)});var s=$H();dT("1hemu1u",p=>{var g=TH(),m=z(D(g),8);it(m,17,()=>i,dr,(v,_)=>{var y=EH(),w=D(y),x=z(w,2);Z(()=>{Te(w,"href",l(_)),Te(x,"href",l(_))}),S(v,y)}),S(p,g)});var a=D(s);eo(a,"",{},{opacity:"0"}),xt(a,p=>K(o,p),()=>l(o));var c=z(a,2),u=p=>p.preventDefault(),d=p=>p.preventDefault(),f=p=>{if(document.documentElement.matches('[data-env="dev"]'))return;const g=p.target;document.documentElement.matches('[data-env="dev"]')||g?.matches("input, textarea")&&"maxLength"in g||g?.closest('[role="textbox"]')?.contentEditable==="true"||p.preventDefault()};bt(c,()=>({...r,role:"none",class:`sui app-shell ${n()??""}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,"svelte-1hemu1u");var h=F(c);Ue(h,()=>e.children??qe),S(t,s),ae()}var PH=j('<div role="none" class="sui empty-state svelte-iv5qt3"><!></div>');const LH={hash:"svelte-iv5qt3",code:".empty-state.svelte-iv5qt3 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function nr(t,e){Ee(t,LH);let n=I(e,"children",3,void 0);var r=PH(),i=F(r);Ue(i,()=>n()??qe),S(t,r)}var NH=j('<div><div role="none" class="inner svelte-o1h6hd"><!></div></div>');const OH={hash:"svelte-o1h6hd",code:".inner.svelte-o1h6hd {display:contents;}"};function zo(t,e){Ee(t,OH);let n=I(e,"hidden",3,!1),r=I(e,"disabled",3,!1),i=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children"]);var o=NH();bt(o,()=>({...i,role:"group",class:`sui group ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,"svelte-o1h6hd");var s=F(o),a=F(s);Ue(a,()=>e.children??qe),Z(()=>s.inert=r()),S(t,o)}sA();const IP='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>',IH=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>su(i)===n);const r=ou(n);return t.filter(i=>{const o=i[e];return r?r.test(String(o??"")):o===n})},RH=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=ou(n),i={},o=oe(ue)("other");return t.forEach(s=>{const a=s[e];let c;r?[c=o]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(s)}),Object.fromEntries(Object.entries(i).sort(([s],[a])=>Ci(s,a)))},iS=(t,e)=>{const{commitAuthor:{name:n,login:r,email:i}={},commitDate:o}=t;return e==="commit_author"?n||r||i:e==="commit_date"?o:e==="name"?t.name.split(".")[0]:t[e]??""},DH=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String;return r.sort((o,s)=>{const a=iS(o,e),c=iS(s,e);return i===String?Ci(a,c):i===Date?Number(a)-Number(c):a-c}),n==="descending"&&r.reverse(),r},va=ot(!1),Ds=ot(!1),MH=un([no],([t],e)=>{e(!!t.files.length)}),Eg=({collectionName:t,fileName:e,internalPath:n})=>{if(t===void 0)return oe(ue)(n===void 0?"all_assets":"global_assets");const r=si(t),i=r?ws(r):t;if(!e)return i;const o=r?au(r,e):void 0,s=o?df(o):e;return`${i} › ${s}`},Ms=ot({type:"grid",showInfo:!0}),Ol=un([Bn,to],([t,e],n)=>{t&&e&&e.internalPath!==void 0?n(t.filter(({folder:r})=>pn(r,e))):n(t?[...t]:[])}),Cw=un([Ol,Ms],([t,e],n)=>{let r=[...t];r=DH(r,e.sort),r=IH(r,e.filter);const i=RH(r,e.group);pn(oe(Cw),i)||n(i)});Ol.subscribe(t=>{$d.set([]),oe(ft).devModeEnabled&&console.info("listedAssets",t)});const vn=ot(!1),Yo=ot(!1),Ef=ot(!1),xu=ot(!0),FH=()=>{const t=globalThis.matchMedia("(width < 768px)"),e=globalThis.matchMedia("(768px <= width < 1024px)"),n=globalThis.matchMedia("(1024px <= width)"),r=globalThis.matchMedia("(pointer: fine)"),i=()=>vn.set(t.matches),o=()=>Yo.set(e.matches),s=()=>Ef.set(n.matches),a=()=>xu.set(r.matches);i(),o(),s(),a(),t.addEventListener("change",i),e.addEventListener("change",o),n.addEventListener("change",s),r.addEventListener("change",a)},Aw=un([xl,va],([t,e])=>t||e),Zb=ot(""),fi=ot(""),Vo=(t=window.location.href)=>{const{origin:e,hash:n}=new URL(t),{pathname:r,searchParams:i}=new URL(`${e}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries(i)}},Pw=(t,e)=>{if(!oe(vn)||!document.startViewTransition){e();return}const n={types:[t],update:async()=>{e(),await Nt(50),await new Promise(r=>{Vc(()=>{r(void 0)})})}};try{document.startViewTransition(n)}catch{e()}},Lw=(t,e,n)=>{const{isTrusted:r,oldURL:i,newURL:o}=t;if(!r){e();return}const s=Vo(i).path,a=Vo(o).path,c=n.test(s)&&n.test(a),u=s.split("/").length,d=a.split("/").length,f=c&&u>d?"backwards":c&&u<d?"forwards":"unknown";Pw(f,()=>e())},Wt=async(t,{state:e={},replaceState:n=!1,notifyChange:r=!0,transitionType:i="unknown"}={})=>{const{origin:o,pathname:s,hash:a}=window.location,c=`${o}${s}${a}`,u=`${o}${s}#${t}`,d=[{...e,from:c},"",u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&Pw(i,()=>{window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:c,newURL:u}))})},oa=(t,e={})=>{const n="backwards";window.history.state?.from?Pw(n,()=>{window.history.back()}):Wt(t,{...e,transitionType:n})},RP=()=>{const{display_url:t,_siteURL:e}=oe(Ct);window.open(t||e||"/","_blank")},Tg=ot({message:"",context:"authentication"}),Bc=ot(!0),_c=ot(!1),DP=()=>{Tg.set({message:"",context:"authentication"})},Ch=(t,e="authentication")=>{let n=t.cause?.message||oe(ue)("unexpected_error");t.name==="NotFoundError"&&(n=oe(ue)("sign_in_error.not_project_root")),t.name==="AbortError"&&(n=oe(ue)(oe($l)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted")),Tg.set({message:n,context:e}),console.error(t.name,t.message,t.cause)},zH=()=>{const{path:t}=Vo(),{encodedData:e}=t.match(/^\/signin\/(?<encodedData>.+)/)?.groups??{};if(!e)return{_user:void 0,copiedPrefs:void 0};Wt("",{replaceState:!0});let n,r;try{const i=JSON.parse(atob(e));Bt(i)&&typeof i.token=="string"&&(n={token:i.token},Bt(i.prefs)&&(r=i.prefs))}catch{}return{_user:n,copiedPrefs:r}},jH=async()=>{const t=await pi.get("sveltia-cms.user")||await pi.get("decap-cms-user")||await pi.get("netlify-cms-user");if(Bt(t)&&typeof t.backendName=="string")return t},UH=t=>{const e=t?.backendName==="local"||t?.backendName==="proxy"?"local":oe(Ct).backend.name;return $l.set(e),oe(Tn)},BH=async()=>{DP();let t,e;if({_user:t,copiedPrefs:e}=zH(),t??=await jH(),!t)return;const n=UH(t);if(t&&n){Fn.set(t);const{token:r,refreshToken:i}=t;_c.set(!0);try{t=await n.signIn({token:r,refreshToken:i,auto:!0})}catch{t=void 0,Fn.set(void 0)}}if(_c.set(!1),Bc.set(!t),!(!t||!n)){Fn.set(t),e&&ft.update(r=>({...r,...e}));try{await n.fetchFiles()}catch(r){[401,403,404].includes(r.cause?.status)?Bc.set(!0):Ch(r,"dataFetch")}}},Hm=async(t,e)=>{DP(),$l.set(t);const n=oe(Tn);if(!n)return;let r;_c.set(!0);try{r=await n.signIn({token:e,auto:!1})}catch(i){_c.set(!1),Bc.set(!0),e&&i.cause?.status===401?Ch(new Error("Invalid token",{cause:{message:oe(ue)("sign_in_error.invalid_token")}})):Ch(i);return}if(_c.set(!1),Bc.set(!r),!!r){Fn.set(r);try{await n.fetchFiles()}catch(i){Ch(i,"dataFetch")}}},qH=async()=>{await oe(Tn)?.signOut(),await pi.set("sveltia-cms.user",{}),$l.set(void 0),Fn.set(void 0),Bc.set(!0),eu.set(!1);const t=oe(Ct)?.logout_redirect_url;t&&(window.location.href=t)};var VH=j('<div role="alert" class="message svelte-1ff54ya"> </div>'),HH=j('<div role="alert" class="svelte-1ff54ya"> </div>'),KH=j('<div role="alert" class="svelte-1ff54ya"><!></div>'),GH=j('<div role="none"><!></div>'),WH=j("<!> <!> <!>",1),YH=j("<!> <!> <!>",1),JH=j('<div role="alert" class="error svelte-1ff54ya"><!> </div>'),XH=j(" <!>",1),ZH=j('<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>',1);const QH={hash:"svelte-1ff54ya",code:".buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;}.buttons.svelte-1ff54ya .button {width:320px;}[role=alert].svelte-1ff54ya {display:flex;align-items:center;gap:8px;}[role=alert].error.svelte-1ff54ya {color:var(--sui-error-foreground-color);}"};function eK(t,e){se(e,!0),Ee(t,QH);const n=()=>V(Ct,"$cmsConfig",s),r=()=>V(ue,"$_",s),i=()=>V(_c,"$signingIn",s),o=()=>V(Tg,"$signInError",s),[s,a]=me();let c=ie(!1),u=ie(!1),d=ie(!1),f=ie(!1),h=ie("");const p=b(()=>n()?.backend?.name),g=b(()=>l(p)?uf[l(p)]:null),m=b(()=>l(p)==="test-repo"),v=b(()=>l(m)?void 0:n()?.backend?.repo?.split("/").pop()),_=b(()=>l(c)&&!l(m)),y=({key:P,values:L,link:O})=>jr.sanitize(r()(P,{values:L}).replace("<a>",`<a href="${O}" target="_blank">`),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]});Ut(()=>{const{hostname:P}=window.location;K(c,P==="127.0.0.1"||P==="localhost"||P.endsWith(".localhost"),!0),K(u,"showDirectoryPicker"in window),K(d,navigator.userAgentData?.brands.some(({brand:L})=>L==="Brave")??!1,!0),BH()});var w=ZH(),x=D(w),E=F(x);{var $=P=>{var L=VH(),O=F(L);Z(N=>ne(O,N),[()=>r()("signing_in")]),S(P,L)},C=P=>{var L=X(),O=D(L);{var N=U=>{var H=HH(),G=F(H);Z(W=>ne(G,W),[()=>r()("config.error.unsupported_backend",{values:{name:l(p)}})]),S(U,H)},M=U=>{var H=YH(),G=D(H);{var W=J=>{var Q=WH(),ee=D(Q);{let ce=b(()=>r()("work_with_local_repo")),ge=b(()=>!l(u));et(ee,{variant:"primary",get label(){return l(ce)},get disabled(){return l(ge)},onclick:async()=>{await Hm("local")}})}var te=z(ee,2);{var re=ce=>{var ge=KH(),Pe=F(ge);{var xe=we=>{var ve=X(),fe=D(ve);cr(fe,()=>y({key:"local_backend.disabled",link:"https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave"})),S(we,ve)},de=we=>{var ve=Fe();Z(fe=>ne(ve,fe),[()=>r()("local_backend.unsupported_browser")]),S(we,ve)};q(Pe,we=>{l(d)?we(xe):we(de,!1)})}S(ce,ge)},he=ce=>{var ge=X(),Pe=D(ge);{var xe=de=>{var we=GH(),ve=F(we);{var fe=Ce=>{var ze=Fe();Z(Ne=>ne(ze,Ne),[()=>r()("work_with_local_repo_description",{values:{repo:l(v)}})]),S(Ce,ze)},_e=Ce=>{var ze=Fe();Z(Ne=>ne(ze,Ne),[()=>r()("work_with_local_repo_description_no_repo")]),S(Ce,ze)};q(ve,Ce=>{l(v)?Ce(fe):Ce(_e,!1)})}S(de,we)};q(Pe,de=>{o().message||de(xe)},!0)}S(ce,ge)};q(te,ce=>{l(u)?ce(he,!1):ce(re)})}var pe=z(te,2);ii(pe,{}),S(J,Q)};q(G,J=>{l(_)&&J(W)})}var Y=z(G,2);{let J=b(()=>l(_)?"secondary":"primary"),Q=b(()=>l(m)?r()("work_with_test_repo"):r()("sign_in_with_x",{values:{service:l(g).label}}));et(Y,{get variant(){return l(J)},get label(){return l(Q)},onclick:async()=>{await Hm(l(p))}})}var R=z(Y,2);{var B=J=>{{let Q=b(()=>r()("sign_in_with_x_using_pat",{values:{service:l(g).label}}));et(J,{variant:"secondary",get label(){return l(Q)},onclick:()=>{K(f,!0)}})}};q(R,J=>{l(m)||J(B)})}S(U,H)};q(O,U=>{l(g)?U(M,!1):U(N)},!0)}S(P,L)};q(E,P=>{i()?P($):P(C,!1)})}var k=z(E,2);{var T=P=>{var L=JH(),O=F(L);Ze(O,{name:"error"});var N=z(O);Z(()=>ne(N,` ${o().message??""}`)),S(P,L)};q(k,P=>{o().message&&o().context==="authentication"&&P(T)})}var A=z(x,2);{let P=b(()=>r()("sign_in_using_pat_title")),L=b(()=>({spellcheck:!1,"aria-label":r()("personal_access_token")})),O=b(()=>r()("sign_in")),N=b(()=>!l(h).trim());hA(A,{get title(){return l(P)},get textboxAttrs(){return l(L)},get okLabel(){return l(O)},get okDisabled(){return l(N)},onOk:async()=>{await Hm(l(p),l(h).trim())},get open(){return l(f)},set open(M){K(f,M,!0)},get value(){return l(h)},set value(M){K(h,M,!0)},children:(M,U)=>{var H=XH(),G=D(H),W=z(G);{var Y=R=>{var B=X(),J=D(B);cr(J,()=>y({key:"sign_in_using_pat_link",values:{service:l(g).label},link:l(g).repository.newPatURL})),S(R,B)};q(W,R=>{l(g)?.repository?.newPatURL&&R(Y)})}Z(R=>ne(G,`${R??""} `),[()=>r()("sign_in_using_pat_description")]),S(M,H)},$$slots:{default:!0}})}S(t,w),ae(),a()}const oS=(t,e=qe)=>{var n=X(),r=D(n);cr(r,()=>jr.sanitize(jt.parseInline(e()),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),S(t,n)};var tK=j('<img alt="" class="logo svelte-7ua6x9"/>'),nK=j("<li><!></li>"),rK=j('<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>'),iK=j('<div role="alert" class="message"> </div>'),oK=j('<div role="alert" class="message"> </div>'),sK=j('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div>'),aK=j('<div role="alert" class="message"> </div>'),lK=j('<div role="alert" class="message"> </div> <!>',1),cK=j('<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <h1 class="svelte-7ua6x9">Sveltia CMS</h1> <!></div></div>');const uK={hash:"svelte-7ua6x9",code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-7ua6x9 {filter:opacity(0);}.container.svelte-7ua6x9 .inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:160px;height:auto;}
|
|
493
493
|
@media (width < 768px) {.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) {max-width:120px;}
|
|
494
|
-
}.container.svelte-7ua6x9 h1:where(.svelte-7ua6x9) {font-size:48px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-7ua6x9 .error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}.container.svelte-7ua6x9 .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-7ua6x9 .message ul {margin:12px 0 0;padding:0;max-height:160px;overflow-y:auto;list-style:none;}.container.svelte-7ua6x9 .message li {margin:12px;padding:0;}`};function dK(t,e){se(e,!0),Ee(t,uK);const n=()=>V(ue,"$_",p),r=()=>V(
|
|
494
|
+
}.container.svelte-7ua6x9 h1:where(.svelte-7ua6x9) {font-size:48px;}.container.svelte-7ua6x9 .logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-7ua6x9 .error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}.container.svelte-7ua6x9 .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-7ua6x9 .message ul {margin:12px 0 0;padding:0;max-height:160px;overflow-y:auto;list-style:none;}.container.svelte-7ua6x9 .message li {margin:12px;padding:0;}`};function dK(t,e){se(e,!0),Ee(t,uK);const n=()=>V(ue,"$_",p),r=()=>V(Fn,"$user",p),i=()=>V(eu,"$dataLoaded",p),o=()=>V(Ct,"$cmsConfig",p),s=()=>V(fb,"$cmsConfigErrors",p),a=()=>V(ub,"$prefsError",p),c=()=>V(ft,"$prefs",p),u=()=>V(Tg,"$signInError",p),d=()=>V(FC,"$inAuthPopup",p),f=()=>V(Bc,"$unauthenticated",p),h=()=>V(Ro,"$dataLoadedProgress",p),[p,g]=me();Me(()=>{Ye(fi,n()("welcome_to_sveltia_cms"))});var m=cK(),v=F(m),_=F(v);{var y=$=>{const C=b(()=>o()?.logo?.src??o()?.logo_url);var k=tK();Z(T=>Te(k,"src",T),[()=>l(C)||`data:image/svg+xml;base64,${btoa(IP)}`]),S($,k)};q(_,$=>{(o()||s().length)&&$(y)})}var w=z(_,4);{var x=$=>{var C=rK(),k=F(C),T=F(k),A=z(k,2);it(A,5,s,dr,(P,L)=>{var O=nK(),N=F(O);oS(N,()=>l(L)),S(P,O)}),Z(P=>ne(T,P),[()=>n()(s().length===1?"config.one_error":"config.many_errors")]),S($,C)},E=$=>{var C=X(),k=D(C);{var T=P=>{var L=iK(),O=F(L);Z(N=>ne(O,N),[()=>n()(`prefs.error.${a().type}`)]),S(P,L)},A=P=>{var L=X(),O=D(L);{var N=U=>{var H=oK(),G=F(H);Z(W=>ne(G,W),[()=>n()("loading_cms_config")]),S(U,H)},M=U=>{var H=X(),G=D(H);{var W=R=>{var B=sK(),J=F(B),Q=F(J),ee=z(J,2),te=F(ee);oS(te,()=>u().message),Z(re=>ne(Q,re),[()=>n()("loading_site_data_error")]),S(R,B)},Y=R=>{var B=X(),J=D(B);{var Q=te=>{var re=aK(),he=F(re);Z(pe=>ne(he,pe),[()=>n()("authorizing")]),S(te,re)},ee=te=>{var re=X(),he=D(re);{var pe=ge=>{eK(ge,{})},ce=ge=>{var Pe=X(),xe=D(Pe);{var de=we=>{var ve=lK(),fe=D(ve),_e=F(fe),Ce=z(fe,2);{var ze=Ne=>{t5(Ne,{get now(){return h()}})};q(Ce,Ne=>{h()!==void 0&&Ne(ze)})}Z(Ne=>ne(_e,Ne),[()=>n()("loading_site_data")]),S(we,ve)};q(xe,we=>{i()||we(de)},!0)}S(ge,Pe)};q(he,ge=>{!r()||f()?ge(pe):ge(ce,!1)},!0)}S(te,re)};q(J,te=>{d()?te(Q):te(ee,!1)},!0)}S(R,B)};q(G,R=>{u().message&&u().context==="dataFetch"?R(W):R(Y,!1)},!0)}S(U,H)};q(O,U=>{!o()||!c()?U(N):U(M,!1)},!0)}S(P,L)};q(k,P=>{a()?P(T):P(A,!1)},!0)}S($,C)};q(w,$=>{s().length?$(x):$(E,!1)})}Z(()=>m.inert=r()&&i()),S(t,m),ae(),g()}var fK=j(" <!>",1),hK=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function pK(t,e){se(e,!0);const n=()=>V(Tn,"$backend",o),r=()=>V(Ct,"$cmsConfig",o),i=()=>V(ue,"$_",o),[o,s]=me(),a=300*1e3;let c=0,u=ie(!1),d=ie("none");const f=async()=>{n()?.checkStatus&&K(d,await n().checkStatus(),!0)},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),K(d,"none")},g=()=>{l(u)&&(n()?.checkStatus&&!n().repository?.isSelfHosted?h():p())};Ut(()=>(K(u,!0),()=>{p()})),Me(()=>{l(u),n(),r(),g()});var m=X(),v=D(m);{var _=y=>{var w=hK(),x=D(w);{let E=b(()=>l(d)==="major"?"error":"warning");Gc(x,()=>({"--sui-infobar-message-justify-content":"center"})),ig(x.lastChild,{get status(){return l(E)},children:($,C)=>{var k=fK(),T=D(k),A=z(T);{let P=b(()=>i()("details"));et(A,{variant:"link",get label(){return l(P)},onclick:()=>{window.open(n()?.statusDashboardURL,"_blank")}})}Z(P=>ne(T,`${P??""} `),[()=>i()(`backend_status.${l(d)}_incident`,{values:{service:n()?.label}})]),S($,k)},$$slots:{default:!0}})}S(y,w)};q(v,y=>{["minor","major"].includes(l(d))&&y(_)})}S(t,m),ae(),s()}var gK=j(" <!>",1),mK=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function vK(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me(),o=3600*1e3,s=600*1e3;let a=0,c=0,u=ie(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==Jv&&(c=window.setTimeout(()=>{K(u,!0)},s))}catch{}};Ut(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},o),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=X(),h=D(f);{var p=g=>{var m=mK(),v=D(m);Gc(v,()=>({"--sui-infobar-message-justify-content":"center"})),ig(v.lastChild,{children:(_,y)=>{var w=gK(),x=D(w),E=z(x);{let $=b(()=>n()("update_now"));et(E,{variant:"link",get label(){return l($)},onclick:()=>{window.location.reload()}})}Z($=>ne(x,`${$??""} `),[()=>n()("update_available")]),S(_,w)},$$slots:{default:!0}}),S(g,m)};q(h,g=>{l(u)&&g(p)})}S(t,f),ae(),i()}var bK=j("<!> <!> <!>",1),_K=j("<!> <!>",1);function MP(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me(),o=k=>{var T=bK(),A=D(T);{let O=b(()=>l(f)?n()("public_url"):n()("public_urls")),N=b(()=>!l(h).length);vt(A,{get label(){return l(O)},get disabled(){return l(N)},onclick:()=>{y(m,n()("asset_url_copied"),n()("asset_urls_copied"))}})}var P=z(A,2);{let O=b(()=>l(f)?n()("file_path"):n()("file_paths"));vt(P,{get label(){return l(O)},onclick:()=>{y(v,n()("asset_path_copied"),n()("asset_paths_copied"))}})}var L=z(P,2);{let O=b(()=>n()("file_data")),N=b(()=>!l(u));vt(L,{get label(){return l(O)},get disabled(){return l(N)},onclick:()=>{y(_,n()("asset_data_copied"),n()("asset_data_copied"))}})}S(k,T)};let s=I(e,"assets",19,()=>[]),a=I(e,"useButton",3,!0),c=ie(St([])),u=ie(!1);const d=St({show:!1,text:"",status:"success"}),f=b(()=>s().length===1),h=b(()=>l(c).filter(({publicURL:k})=>!!k).map(({publicURL:k})=>k));let p;const g=async()=>{if(p=void 0,!l(f))return!1;const k=await fa(s()[0]),{type:T}=k;return p=k,wd(T)?!0:Lo.includes(T)?typeof navigator.clipboard.write=="function":!1},m=async()=>{await navigator.clipboard.writeText(l(h).join(`
|
|
495
495
|
`))},v=async()=>{await navigator.clipboard.writeText(s().map(({path:k})=>`/${k}`).join(`
|
|
496
|
-
`))},_=async()=>{let k=p;const{type:T}=k;if(wd(T)){await navigator.clipboard.writeText(await k.text());return}if(!Lo.includes(T))throw new Error("Unsupported type");T!=="image/png"&&(k=await ey(k)),await navigator.clipboard.write([new ClipboardItem({"image/png":k})])},y=async(k,T,A)=>{try{await k(),d.status="success",d.text=l(f)?T:A}catch{d.status="error",d.text=n()("clipboard_error")}finally{d.show=!0}};Me(()=>{(async()=>(K(c,await Promise.all(s().map(Gp)),!0),K(u,await g(),!0)))()});var w=_K(),x=D(w);{var E=k=>{{const T=L=>{{let O=b(()=>n()("copy_options"));hr(L,{get"aria-label"(){return l(O)},children:(N,M)=>{o(N)},$$slots:{default:!0}})}};let A=b(()=>!s().length),P=b(()=>n()("copy"));Ur(k,{variant:"ghost",get disabled(){return l(A)},get label(){return l(P)},popupPosition:"bottom-right",popup:T,$$slots:{popup:!0}})}},$=k=>{{const T=L=>{o(L)};let A=b(()=>!s().length),P=b(()=>n()("copy"));vt(k,{get disabled(){return l(A)},get label(){return l(P)},popupPosition:"left-top",items:T,$$slots:{items:!0}})}};q(x,k=>{a()?k(E):k($,!1)})}var C=z(x,2);Yn(C,{get show(){return d.show},set show(k){d.show=k},children:(k,T)=>{Mn(k,{get status(){return d.status},children:(A,P)=>{var L=Fe();Z(()=>ne(L,d.text)),S(A,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,w),ae(),i()}const Il={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},md=ot({...Il}),Fs=ot({...Il}),yK=()=>{const t=oe(Un);if(!t)return;const{name:e,email:n,id:r,login:i}=t;if(!(!e||!n))return{name:e,email:n,id:r,login:i}},wK=async({changes:t,commit:e})=>{const{databaseName:n}=oe(Tn)?.repository??{};if(!n)return;const r=new fo(n,"file-cache"),{files:i,author:o,date:s}=e,a={commitAuthor:o,commitDate:s};await Promise.all(t.map(async c=>{const{action:u,slug:d,path:f,previousPath:h,data:p}=c;if(typeof p!="string"||!d)return;if(u==="delete"){await r.delete(f);return}u==="move"&&await r.delete(h);const g={sha:i[f]?.sha,size:Z_(p).size,text:p,meta:a};await r.set(f,g)}))},xK=({changes:t,savedEntries:e,savedAssets:n})=>{const r=e.map(c=>c.id);Ai.update(c=>[...c.filter(u=>!r.includes(u.id)),...e]);const i=n.map(c=>c.path),o=t.filter(c=>c.action==="move").map(c=>c.previousPath),s=t.filter(c=>c.action==="delete").map(c=>c.path),a=[...i,...o,...s];Bn.update(c=>[...c.filter(u=>!a.includes(u.path)),...n])},Tf=async({changes:t,savingEntries:e=[],savingAssets:n=[],options:r})=>{const{commitChanges:i}=oe(Tn),o={...await i(t,r),author:yK()};oe(ft).devModeEnabled&&(console.debug("Commit changes:",t),console.debug("Commit results:",o));const{files:s,author:a,date:c}=o,u=e.map(f=>({...f,commitAuthor:a,commitDate:c})),d=n.map(f=>{const{sha:h,file:p}=s[f.path]??{},g=p?URL.createObjectURL(p):void 0;return{...f,sha:h,blobURL:g,commitAuthor:a,commitDate:c}});return await wK({changes:t,commit:o}),xK({changes:t,savedEntries:u,savedAssets:d}),{commit:o,savedEntries:u,savedAssets:d}},kK=({assets:t})=>{Bo.update(e=>t.some(({path:n})=>e?.path===n)?void 0:e),Fs.set({...Il,deleted:!0,count:t.length})},SK=async t=>{await Tf({changes:t.map(({path:e,sha:n})=>({action:"delete",path:e,previousSha:n})),options:{commitType:"deleteMedia"}}),kK({assets:t})};var EK=j("<!> <!>",1);function FP(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"assets",19,()=>[]),s=I(e,"buttonDescription",3,""),a=I(e,"dialogDescription",3,""),c=I(e,"onDelete",3,void 0),u=I(e,"useButton",3,!0),d=ie(!1);const f=b(()=>u()?et:vt);var h=EK(),p=D(h);{let m=b(()=>!o().length),v=b(()=>n()("delete"));ur(p,()=>l(f),(_,y)=>{y(_,{variant:"ghost",get disabled(){return l(m)},get label(){return l(v)},get"aria-label"(){return s()},onclick:()=>{K(d,!0)}})})}var g=z(p,2);{let m=b(()=>o().length===1?n()("delete_asset"):n()("delete_assets")),v=b(()=>n()("delete"));cu(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{SK(o()),c()?.()},get open(){return l(d)},set open(_){K(d,_,!0)},children:(_,y)=>{var w=Fe();Z(()=>ne(w,a())),S(_,w)},$$slots:{default:!0}})}S(t,h),ae(),i()}var TK=j("<!> <!>",1);function zP(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"assets",19,()=>[]),s=I(e,"useButton",3,!0),a=ie(!1);const c=b(()=>s()?et:vt),u=async()=>{for(const p of o())cI(await fa(p),p.name),await Nt(300);K(a,!0)};var d=TK(),f=D(d);{let p=b(()=>!o().length),g=b(()=>n()("download"));ur(f,()=>l(c),(m,v)=>{v(m,{variant:"ghost",get disabled(){return l(p)},get label(){return l(g)},onclick:()=>{u()}})})}var h=z(f,2);Yn(h,{get show(){return l(a)},set show(p){K(a,p,!0)},children:(p,g)=>{Mn(p,{status:"success",children:(m,v)=>{var _=Fe();Z(y=>ne(_,y),[()=>o().length===1?n()("asset_downloaded"):n()("assets_downloaded")]),S(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),ae(),i()}var $K=j("<!> <!> <!> <!> <!> <!> <!>",1);function jP(t,e){se(e,!0);const n=()=>V(ue,"$_",o),r=()=>V(ft,"$prefs",o),i=()=>V(Tn,"$backend",o),[o,s]=me();let a=I(e,"extraItems",3,void 0),c=ie(St({...Fh}));const u=b(()=>l(c).publicURL),d=b(()=>l(c).repoBlobURL),f=async()=>{K(c,e.asset?await Gp(e.asset):{...Fh},!0)};Me(()=>{e.asset,f()});{const h=g=>{{let m=b(()=>n()("edit_options"));hr(g,{get"aria-label"(){return l(m)},children:(v,_)=>{var y=$K(),w=D(y);Ue(w,()=>a()??qe);var x=z(w,2);{let P=b(()=>n()("edit")),L=b(()=>n()("edit_asset")),O=b(()=>!e.asset||!I3(e.asset));vt(x,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(rb,e.asset)}})}var E=z(x,2);{let P=b(()=>n()("rename")),L=b(()=>n()("rename_asset")),O=b(()=>!e.asset);vt(E,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(yh,e.asset)}})}var $=z(E,2);{let P=b(()=>n()("replace")),L=b(()=>n()("replace_asset")),O=b(()=>!e.asset);vt($,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(no,{folder:void 0,files:[],originalAsset:e.asset}),Ye(Ds,!0)}})}var C=z($,2);ri(C,{});var k=z(C,2);{let P=b(()=>n()("view_on_live_site")),L=b(()=>!l(u));vt(k,{get label(){return l(P)},get disabled(){return l(L)},onclick:()=>{window.open(l(u))}})}var T=z(k,2);{var A=P=>{{let L=b(()=>!i()?.repository||!l(d)),O=b(()=>n()("view_on_x",{values:{service:i()?.repository?.label},default:n()("view_in_repository")}));vt(P,{get disabled(){return l(L)},get label(){return l(O)},onclick:()=>{window.open(`${l(d)}?plain=1`)}})}};q(T,P=>{r().devModeEnabled&&P(A)})}S(v,y)},$$slots:{default:!0}})}};let p=b(()=>n()("show_edit_options"));Ur(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(p)},popup:h,$$slots:{popup:!0}})}ae(),s()}function bl(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(sl,"$isRTL",i),[i,o]=me();let s=I(e,"useShortcut",3,!1),a=I(e,"onclick",3,void 0);{const c=f=>{{let h=b(()=>r()?"arrow_forward":"arrow_back");Ze(f,{get name(){return l(h)}})}};let u=b(()=>e["aria-label"]??n()("back")),d=b(()=>s()?"Escape":void 0);et(t,{variant:"ghost",iconic:!0,get"aria-label"(){return l(u)},get keyShortcuts(){return l(d)},class:"back",get onclick(){return a()},startIcon:c,$$slots:{startIcon:!0}})}ae(),o()}var CK=j("<!> <!> <!>",1),AK=j('<!> <h2 role="none"><!></h2> <!> <!>',1);function PK(t,e){se(e,!0);const n=()=>V(ta,"$overlaidAsset",s),r=()=>V(vn,"$isSmallScreen",s),i=()=>V(ue,"$_",s),o=()=>V(to,"$selectedAssetFolder",s),[s,a]=me(),c=f=>{var h=CK(),p=D(h);MP(p,{get assets(){return l(u)},get useButton(){return l(d)}});var g=z(p,2);zP(g,{get assets(){return l(u)},get useButton(){return l(d)}});var m=z(g,2);{let v=b(()=>i()("delete_asset")),_=b(()=>i()("confirm_deleting_this_asset"));FP(m,{get assets(){return l(u)},get buttonDescription(){return l(v)},get dialogDescription(){return l(_)},onDelete:()=>{oa(`/assets/${o()?.internalPath??"-/all"}`)},get useButton(){return l(d)}})}S(f,h)},u=b(()=>n()?[n()]:[]),d=b(()=>!r());{let f=b(()=>i()("primary"));Ni(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=AK(),m=D(g);{let E=b(()=>i()("cancel_editing"));bl(m,{get"aria-label"(){return l(E)},useShortcut:!0,onclick:()=>{oa(`/assets/${o()?.internalPath??"-/all"}`)}})}var v=z(m,2),_=F(v);Pr(_,{children:(E,$)=>{var C=Fe();Z(()=>ne(C,n()?.name)),S(E,C)},$$slots:{default:!0}});var y=z(v,2);{var w=E=>{c(E)};q(y,E=>{r()||E(w)})}var x=z(y,2);jP(x,{get asset(){return n()},extraItems:$=>{var C=X(),k=D(C);{var T=A=>{c(A)};q(k,A=>{r()&&A(T)})}S($,C)},$$slots:{extraItems:!0}}),S(h,g)},$$slots:{default:!0}})}ae(),a()}var LK=j("<img/>"),NK=j("<video></video>",2),OK=j("<audio></audio>"),IK=j('<div role="none" class="blur svelte-1yaifwd"><div role="status" class="overlay svelte-1yaifwd"><!></div> <img role="none" loading="lazy" alt=""/></div>'),RK=j('<div role="none"><!> <!></div>');const DK={hash:"svelte-1yaifwd",code:".preview.svelte-1yaifwd {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1yaifwd {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1yaifwd .sui.icon {font-size:48px;}.preview.icon.svelte-1yaifwd {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) img:where(.svelte-1yaifwd) {pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) {display:contents;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) > :where(.svelte-1yaifwd) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) .overlay:where(.svelte-1yaifwd) {display:flex;justify-content:center;align-items:center;z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img:where(.svelte-1yaifwd) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img.loaded:where(.svelte-1yaifwd) {opacity:1;}.preview.cover.svelte-1yaifwd {padding:0;}.preview.cover.svelte-1yaifwd > :is(img, video) {flex:auto;}.preview.svelte-1yaifwd > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1yaifwd :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1yaifwd :is(img, video) {opacity:1;}.checkerboard.svelte-1yaifwd img:where(.svelte-1yaifwd) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1yaifwd:not(.checkerboard) img:where(.svelte-1yaifwd) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1yaifwd:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1yaifwd :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ho(t,e){se(e,!0),Ee(t,DK);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"loading",3,"lazy"),s=I(e,"asset",3,void 0),a=I(e,"src",15,void 0),c=I(e,"variant",3,void 0),u=I(e,"blurBackground",3,!1),d=I(e,"cover",3,!1),f=I(e,"checkerboard",3,!1),h=I(e,"dissolve",3,!0),p=I(e,"alt",3,""),g=I(e,"controls",3,!1),m=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),v=ie(void 0),_=ie(!1),y=ie(!1),w=ie(void 0);const x=b(()=>!!s()&&!!c()&&!g()),E=b(()=>l(x)||e.kind==="image"||s()?.name.endsWith(".pdf"));let $=!1;const C=async()=>{if(!(!s()||!l(v)||$)){$=!0,K(_,!1),o()==="lazy"&&await pb(l(v));try{a(l(x)?await Zv(s()):await ty(s()))}catch{K(_,!0)}u()&&!l(w)&&a()&&K(w,a(),!0),$=!1,Vc()}},k=async()=>{!l(v)||!a()||((l(E)?!l(v).complete:!l(v).readyState)&&await new Promise(U=>{l(v)?.addEventListener(l(E)?"load":"loadedmetadata",()=>{U(void 0)},{once:!0})}),h()&&await pb(l(v)),K(y,!0),s()&&l(x)&&a().startsWith("blob:")&&URL.revokeObjectURL(a()))};Me(()=>{s()&&!l(w)&&(async()=>K(w,await Zv(s(),{cacheOnly:!0}),!0))()}),Me(()=>{l(v)&&s()&&C()}),Me(()=>{l(v)&&a()&&k()});var T=RK();let A;var P=F(T);{var L=U=>{Ze(U,{name:"draft"})},O=U=>{var H=X(),G=D(H);{var W=R=>{var B=LK();bt(B,()=>({loading:o(),src:a(),alt:p(),...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(B,J=>K(v,J),()=>l(v)),S(R,B)},Y=R=>{var B=X(),J=D(B);{var Q=te=>{var re=NK();bt(re,()=>({src:a(),controls:g()||void 0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(re,he=>K(v,he),()=>l(v)),S(te,re)},ee=te=>{var re=X(),he=D(re);{var pe=ge=>{var Pe=X(),xe=D(Pe);{var de=ve=>{var fe=OK();bt(fe,()=>({src:a(),controls:!0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(fe,_e=>K(v,_e),()=>l(v)),S(ve,fe)},we=ve=>{Ze(ve,{name:"audio_file"})};q(xe,ve=>{g()?ve(de):ve(we,!1)})}S(ge,Pe)},ce=ge=>{Ze(ge,{name:"draft"})};q(he,ge=>{e.kind==="audio"?ge(pe):ge(ce,!1)},!0)}S(te,re)};q(J,te=>{e.kind==="video"?te(Q):te(ee,!1)},!0)}S(R,B)};q(G,R=>{l(E)?R(W):R(Y,!1)},!0)}S(U,H)};q(P,U=>{l(_)?U(L):U(O,!1)})}var N=z(P,2);{var M=U=>{var H=IK(),G=F(H),W=F(G);{var Y=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>n()("loading")]),S(J,Q)};q(W,J=>{!l(x)&&!l(y)&&J(Y)})}var R=z(G,2);let B;Z(()=>{Te(R,"src",l(w)),B=cn(R,1,"svelte-1yaifwd",null,B,{loaded:!!l(w)})}),S(U,H)};q(N,U=>{u()&&U(M)})}Z(()=>A=cn(T,1,`preview ${c()??""}`,"svelte-1yaifwd",A,{cover:d(),checkerboard:f(),dissolve:h(),loaded:l(y)})),S(t,T),ae(),i()}var MK=j('<div role="application" class="map svelte-4y1biz"></div>');const FK={hash:"svelte-4y1biz",code:".map.svelte-4y1biz {margin:var(--sui-focus-ring-width);border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);overflow:hidden;aspect-ratio:1/1;background-clip:text;}.leaflet-container {font-family:inherit !important;font-size:var(--sui-font-size-small) !important;}.leaflet-container a {color:var(--sui-primary-accent-color-text) !important;text-decoration:none !important;}.leaflet-bar a {border-color:var(--sui-button-border-color) !important;color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-button-background-color) !important;}.leaflet-control {color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-secondary-background-color-translucent) !important;}.leaflet-control-attribution {padding:4px 8px;}:root[data-theme='dark'] .leaflet-layer {filter:invert(100%) hue-rotate(180deg);}"};function zK(t,e){se(e,!0),Ee(t,FK);const n=()=>V(ue,"$_",r),[r,i]=me();let o=ie(void 0),s;const a=async()=>{if(!l(o))return;const u=await Fa("leaflet","dist/leaflet-src.esm.js"),d=`${Q_("leaflet")}/dist/images/marker-icon-2x.png`;s=u.map(l(o),{center:[0,0],zoom:2}),u.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(s);const{latitude:f,longitude:h}=e.coordinates,p=u.icon({iconUrl:d,iconSize:[25,41]});u.marker([f,h],{icon:p}).addTo(s),s.setView([f,h],12),l(o).querySelectorAll('a[href^="https:"]').forEach(g=>{g.setAttribute("target","_blank"),g.setAttribute("rel","noopener noreferrer")}),new ResizeObserver(()=>{s?.invalidateSize()}).observe(l(o))};Ut(()=>{a()});var c=MK();xt(c,u=>K(o,u),()=>l(o)),Z(u=>Te(c,"aria-label",u),[()=>n()("map_lat_lng",{values:e.coordinates})]),S(t,c),ae(),i()}const jK=t=>new Date(t*1e3).toISOString().substr(11,8),sS=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var o=BK(),s=F(o);et(s,{role:"link",variant:"link",onclick:()=>Wt(n(),{transitionType:"forwards"}),children:(a,c)=>{var u=UK(),d=F(u);Z(()=>ne(d,`${r()??""} › ${i()??""}`)),S(a,u)},$$slots:{default:!0}}),S(t,o)};var UK=j('<span role="none"> </span>'),BK=j("<p><!></p>"),qK=j('<div role="none" class="preview svelte-6mkk55"><!></div>'),VK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),HK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),KK=j('<a target="_blank"> </a>'),GK=j("<a> </a>"),WK=j("<p> </p>"),YK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),JK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),XK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),ZK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section>'),QK=j('<div role="none" class="detail svelte-6mkk55"><!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <!> <!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section> <!> <!> <!> <!></div>');const e9={hash:"svelte-6mkk55",code:".detail.svelte-6mkk55 {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-6mkk55 .preview:where(.svelte-6mkk55) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-6mkk55 section:where(.svelte-6mkk55):not(:last-child) {margin:0 0 16px;}.detail.svelte-6mkk55 section:where(.svelte-6mkk55) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-6mkk55 h4:where(.svelte-6mkk55) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function UP(t,e){se(e,!0),Ee(t,e9);const n=()=>V(qt,"$appLocale",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"showPreview",3,!1),a=ie(St({...Fh}));const c=b(()=>e.asset.path),u=b(()=>e.asset.size),d=b(()=>e.asset.kind),f=b(()=>e.asset.commitAuthor),h=b(()=>e.asset.commitDate),p=b(()=>l(a).publicURL),g=b(()=>l(a).repoBlobURL),m=b(()=>l(a).dimensions),v=b(()=>l(a).duration),_=b(()=>l(a).createdDate),y=b(()=>l(a).coordinates),w=b(()=>l(a).usedEntries),x=b(()=>gn(l(c))),E=b(()=>st(l(x).extension,"")),$=b(()=>Qp(l(d))||l(c).endsWith(".pdf")),C=be=>be.toLocaleString(n()??void 0,bM),k=async()=>{K(a,e.asset?await Gp(e.asset):{...Fh},!0)};Me(()=>{e.asset,k()});var T=QK(),A=F(T);{var P=be=>{var ye=qK(),tt=F(ye);{let Ve=b(()=>l(d)==="image"),Qe=b(()=>["audio","video"].includes(l(d)));Ho(tt,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Ve)},get controls(){return l(Qe)}})}S(be,ye)};q(A,be=>{s()&&l($)&&be(P)})}var L=z(A,2),O=F(L),N=F(O),M=z(O,2),U=F(M),H=z(L,2),G=F(H),W=F(G),Y=z(G,2),R=F(Y);or(R,n,be=>{var ye=Fe();Z(tt=>ne(ye,tt),[()=>Kp(l(u))]),S(be,ye)});var B=z(H,2);{var J=be=>{var ye=VK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z(ht=>{ne(Ve,ht),ne(Xe,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>r()("dimensions")]),S(be,ye)};q(B,be=>{l($)&&be(J)})}var Q=z(B,2);{var ee=be=>{var ye=HK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("duration"),()=>l(v)?jK(l(v)):"–"]),S(be,ye)};q(Q,be=>{["audio","video"].includes(l(d))&&be(ee)})}var te=z(Q,2),re=F(te),he=F(re),pe=z(re,2),ce=F(pe);{var ge=be=>{var ye=KK(),tt=F(ye);Z(()=>{Te(ye,"href",l(p)),ne(tt,l(p))}),S(be,ye)},Pe=be=>{var ye=Fe("–");S(be,ye)};q(ce,be=>{l(p)?be(ge):be(Pe,!1)})}var xe=z(te,2),de=F(xe),we=F(de),ve=z(de,2),fe=F(ve);{var _e=be=>{var ye=GK(),tt=F(ye);Z(()=>{Te(ye,"href",l(g)),ne(tt,`/${l(c)??""}`)}),S(be,ye)},Ce=be=>{var ye=Fe();Z(()=>ne(ye,`/${l(c)??""}`)),S(be,ye)};q(fe,be=>{l(g)?be(_e):be(Ce,!1)})}var ze=z(xe,2),Ne=F(ze),Ae=F(Ne),$e=z(Ne,2);it($e,17,()=>l(w),be=>be.id,(be,ye)=>{var tt=X(),Ve=D(tt);kn(Ve,Nt,null,Qe=>{var Xe=X(),ht=D(Xe);it(ht,17,()=>Ps(l(ye)),Pt=>Pt.name,(Pt,Qt)=>{var en=X(),pt=D(en);or(pt,n,kt=>{const tn=b(()=>ws(l(Qt)));var $n=X(),ai=D($n);it(ai,17,()=>ha(l(Qt),l(ye)),Dt=>Dt.name,(Dt,bn)=>{{let Et=b(()=>({link:`/collections/${l(Qt).name}/entries/${l(bn).name}`,collectionLabel:l(tn),entryLabel:df(l(bn))}));sS(Dt,()=>l(Et))}},Dt=>{{let bn=b(()=>({link:`/collections/${l(Qt).name}/entries/${l(ye).subPath}`,collectionLabel:l(tn),entryLabel:tu(l(Qt),l(ye),{useTemplate:!0})}));sS(Dt,()=>l(bn))}}),S(kt,$n)}),S(Pt,en)}),S(Qe,Xe)}),S(be,tt)},be=>{var ye=WK(),tt=F(ye);Z(Ve=>ne(tt,Ve),[()=>r()("sort_keys.none")]),S(be,ye)});var je=z(ze,2);{var Le=be=>{var ye=YK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z(ht=>{ne(Ve,ht),ne(Xe,l(f).name||l(f).login||l(f).email)},[()=>r()("sort_keys.commit_author")]),S(be,ye)};q(je,be=>{l(f)&&be(Le)})}var Ie=z(je,2);{var Re=be=>{var ye=JK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("sort_keys.commit_date"),()=>C(l(h))]),S(be,ye)};q(Ie,be=>{l(h)&&be(Re)})}var nt=z(Ie,2);{var Ge=be=>{var ye=XK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("created_date"),()=>C(l(_))]),S(be,ye)};q(nt,be=>{l(_)&&be(Ge)})}var ut=z(nt,2);{var Oe=be=>{var ye=ZK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2);zK(Qe,{get coordinates(){return l(y)}}),Z(Xe=>ne(Ve,Xe),[()=>r()("location")]),S(be,ye)};q(ut,be=>{l(y)&&be(Oe)})}Z((be,ye,tt,Ve,Qe,Xe)=>{ne(N,be),ne(U,ye),ne(W,tt),ne(he,Ve),ne(we,Qe),ne(Ae,Xe)},[()=>r()("kind"),()=>r()(`file_type_labels.${l(E)}`,{default:Cs.getType(l(c))??l(E).toUpperCase()}),()=>r()("size"),()=>r()("public_url"),()=>r()("file_path"),()=>r()("used_in")]),S(t,T),ae(),o()}var t9=j('<iframe class="svelte-9guikv"></iframe>'),n9=j('<div role="figure" class="markdown svelte-9guikv"><!></div>'),r9=j('<pre role="figure" class="svelte-9guikv"> </pre>'),i9=j('<pre role="figure" class="svelte-9guikv"> </pre>'),o9=j('<span role="alert"> </span>'),s9=j('<!> <div role="none" class="row svelte-9guikv"><div role="none" class="preview svelte-9guikv"><!></div> <!></div>',1),a9=j('<div role="group" class="wrapper svelte-9guikv"><!></div>');const l9={hash:"svelte-9guikv",code:`.wrapper.svelte-9guikv {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-9guikv {display:none;}.wrapper[inert].svelte-9guikv {filter:opacity(0);}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) {flex:auto;display:flex;overflow:hidden;}
|
|
496
|
+
`))},_=async()=>{let k=p;const{type:T}=k;if(wd(T)){await navigator.clipboard.writeText(await k.text());return}if(!Lo.includes(T))throw new Error("Unsupported type");T!=="image/png"&&(k=await ey(k)),await navigator.clipboard.write([new ClipboardItem({"image/png":k})])},y=async(k,T,A)=>{try{await k(),d.status="success",d.text=l(f)?T:A}catch{d.status="error",d.text=n()("clipboard_error")}finally{d.show=!0}};Me(()=>{(async()=>(K(c,await Promise.all(s().map(Gp)),!0),K(u,await g(),!0)))()});var w=_K(),x=D(w);{var E=k=>{{const T=L=>{{let O=b(()=>n()("copy_options"));hr(L,{get"aria-label"(){return l(O)},children:(N,M)=>{o(N)},$$slots:{default:!0}})}};let A=b(()=>!s().length),P=b(()=>n()("copy"));Ur(k,{variant:"ghost",get disabled(){return l(A)},get label(){return l(P)},popupPosition:"bottom-right",popup:T,$$slots:{popup:!0}})}},$=k=>{{const T=L=>{o(L)};let A=b(()=>!s().length),P=b(()=>n()("copy"));vt(k,{get disabled(){return l(A)},get label(){return l(P)},popupPosition:"left-top",items:T,$$slots:{items:!0}})}};q(x,k=>{a()?k(E):k($,!1)})}var C=z(x,2);Yn(C,{get show(){return d.show},set show(k){d.show=k},children:(k,T)=>{Mn(k,{get status(){return d.status},children:(A,P)=>{var L=Fe();Z(()=>ne(L,d.text)),S(A,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,w),ae(),i()}const Il={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},md=ot({...Il}),Fs=ot({...Il}),yK=()=>{const t=oe(Fn);if(!t)return;const{name:e,email:n,id:r,login:i}=t;if(!(!e||!n))return{name:e,email:n,id:r,login:i}},wK=async({changes:t,commit:e})=>{const{databaseName:n}=oe(Tn)?.repository??{};if(!n)return;const r=new fo(n,"file-cache"),{files:i,author:o,date:s}=e,a={commitAuthor:o,commitDate:s};await Promise.all(t.map(async c=>{const{action:u,slug:d,path:f,previousPath:h,data:p}=c;if(typeof p!="string"||!d)return;if(u==="delete"){await r.delete(f);return}u==="move"&&await r.delete(h);const g={sha:i[f]?.sha,size:Z_(p).size,text:p,meta:a};await r.set(f,g)}))},xK=({changes:t,savedEntries:e,savedAssets:n})=>{const r=e.map(c=>c.id);Ai.update(c=>[...c.filter(u=>!r.includes(u.id)),...e]);const i=n.map(c=>c.path),o=t.filter(c=>c.action==="move").map(c=>c.previousPath),s=t.filter(c=>c.action==="delete").map(c=>c.path),a=[...i,...o,...s];Bn.update(c=>[...c.filter(u=>!a.includes(u.path)),...n])},Tf=async({changes:t,savingEntries:e=[],savingAssets:n=[],options:r})=>{const{commitChanges:i}=oe(Tn),o={...await i(t,r),author:yK()};oe(ft).devModeEnabled&&(console.debug("Commit changes:",t),console.debug("Commit results:",o));const{files:s,author:a,date:c}=o,u=e.map(f=>({...f,commitAuthor:a,commitDate:c})),d=n.map(f=>{const{sha:h,file:p}=s[f.path]??{},g=p?URL.createObjectURL(p):void 0;return{...f,sha:h,blobURL:g,commitAuthor:a,commitDate:c}});return await wK({changes:t,commit:o}),xK({changes:t,savedEntries:u,savedAssets:d}),{commit:o,savedEntries:u,savedAssets:d}},kK=({assets:t})=>{Bo.update(e=>t.some(({path:n})=>e?.path===n)?void 0:e),Fs.set({...Il,deleted:!0,count:t.length})},SK=async t=>{await Tf({changes:t.map(({path:e,sha:n})=>({action:"delete",path:e,previousSha:n})),options:{commitType:"deleteMedia"}}),kK({assets:t})};var EK=j("<!> <!>",1);function FP(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"assets",19,()=>[]),s=I(e,"buttonDescription",3,""),a=I(e,"dialogDescription",3,""),c=I(e,"onDelete",3,void 0),u=I(e,"useButton",3,!0),d=ie(!1);const f=b(()=>u()?et:vt);var h=EK(),p=D(h);{let m=b(()=>!o().length),v=b(()=>n()("delete"));ur(p,()=>l(f),(_,y)=>{y(_,{variant:"ghost",get disabled(){return l(m)},get label(){return l(v)},get"aria-label"(){return s()},onclick:()=>{K(d,!0)}})})}var g=z(p,2);{let m=b(()=>o().length===1?n()("delete_asset"):n()("delete_assets")),v=b(()=>n()("delete"));cu(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{SK(o()),c()?.()},get open(){return l(d)},set open(_){K(d,_,!0)},children:(_,y)=>{var w=Fe();Z(()=>ne(w,a())),S(_,w)},$$slots:{default:!0}})}S(t,h),ae(),i()}var TK=j("<!> <!>",1);function zP(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"assets",19,()=>[]),s=I(e,"useButton",3,!0),a=ie(!1);const c=b(()=>s()?et:vt),u=async()=>{for(const p of o())cI(await fa(p),p.name),await Nt(300);K(a,!0)};var d=TK(),f=D(d);{let p=b(()=>!o().length),g=b(()=>n()("download"));ur(f,()=>l(c),(m,v)=>{v(m,{variant:"ghost",get disabled(){return l(p)},get label(){return l(g)},onclick:()=>{u()}})})}var h=z(f,2);Yn(h,{get show(){return l(a)},set show(p){K(a,p,!0)},children:(p,g)=>{Mn(p,{status:"success",children:(m,v)=>{var _=Fe();Z(y=>ne(_,y),[()=>o().length===1?n()("asset_downloaded"):n()("assets_downloaded")]),S(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),ae(),i()}var $K=j("<!> <!> <!> <!> <!> <!> <!>",1);function jP(t,e){se(e,!0);const n=()=>V(ue,"$_",o),r=()=>V(ft,"$prefs",o),i=()=>V(Tn,"$backend",o),[o,s]=me();let a=I(e,"extraItems",3,void 0),c=ie(St({...Fh}));const u=b(()=>l(c).publicURL),d=b(()=>l(c).repoBlobURL),f=async()=>{K(c,e.asset?await Gp(e.asset):{...Fh},!0)};Me(()=>{e.asset,f()});{const h=g=>{{let m=b(()=>n()("edit_options"));hr(g,{get"aria-label"(){return l(m)},children:(v,_)=>{var y=$K(),w=D(y);Ue(w,()=>a()??qe);var x=z(w,2);{let P=b(()=>n()("edit")),L=b(()=>n()("edit_asset")),O=b(()=>!e.asset||!I3(e.asset));vt(x,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(rb,e.asset)}})}var E=z(x,2);{let P=b(()=>n()("rename")),L=b(()=>n()("rename_asset")),O=b(()=>!e.asset);vt(E,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(yh,e.asset)}})}var $=z(E,2);{let P=b(()=>n()("replace")),L=b(()=>n()("replace_asset")),O=b(()=>!e.asset);vt($,{variant:"ghost",get label(){return l(P)},get"aria-label"(){return l(L)},get disabled(){return l(O)},onclick:()=>{Ye(no,{folder:void 0,files:[],originalAsset:e.asset}),Ye(Ds,!0)}})}var C=z($,2);ri(C,{});var k=z(C,2);{let P=b(()=>n()("view_on_live_site")),L=b(()=>!l(u));vt(k,{get label(){return l(P)},get disabled(){return l(L)},onclick:()=>{window.open(l(u))}})}var T=z(k,2);{var A=P=>{{let L=b(()=>!i()?.repository||!l(d)),O=b(()=>n()("view_on_x",{values:{service:i()?.repository?.label},default:n()("view_in_repository")}));vt(P,{get disabled(){return l(L)},get label(){return l(O)},onclick:()=>{window.open(`${l(d)}?plain=1`)}})}};q(T,P=>{r().devModeEnabled&&P(A)})}S(v,y)},$$slots:{default:!0}})}};let p=b(()=>n()("show_edit_options"));Ur(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(p)},popup:h,$$slots:{popup:!0}})}ae(),s()}function bl(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(sl,"$isRTL",i),[i,o]=me();let s=I(e,"useShortcut",3,!1),a=I(e,"onclick",3,void 0);{const c=f=>{{let h=b(()=>r()?"arrow_forward":"arrow_back");Ze(f,{get name(){return l(h)}})}};let u=b(()=>e["aria-label"]??n()("back")),d=b(()=>s()?"Escape":void 0);et(t,{variant:"ghost",iconic:!0,get"aria-label"(){return l(u)},get keyShortcuts(){return l(d)},class:"back",get onclick(){return a()},startIcon:c,$$slots:{startIcon:!0}})}ae(),o()}var CK=j("<!> <!> <!>",1),AK=j('<!> <h2 role="none"><!></h2> <!> <!>',1);function PK(t,e){se(e,!0);const n=()=>V(ta,"$overlaidAsset",s),r=()=>V(vn,"$isSmallScreen",s),i=()=>V(ue,"$_",s),o=()=>V(to,"$selectedAssetFolder",s),[s,a]=me(),c=f=>{var h=CK(),p=D(h);MP(p,{get assets(){return l(u)},get useButton(){return l(d)}});var g=z(p,2);zP(g,{get assets(){return l(u)},get useButton(){return l(d)}});var m=z(g,2);{let v=b(()=>i()("delete_asset")),_=b(()=>i()("confirm_deleting_this_asset"));FP(m,{get assets(){return l(u)},get buttonDescription(){return l(v)},get dialogDescription(){return l(_)},onDelete:()=>{oa(`/assets/${o()?.internalPath??"-/all"}`)},get useButton(){return l(d)}})}S(f,h)},u=b(()=>n()?[n()]:[]),d=b(()=>!r());{let f=b(()=>i()("primary"));Ni(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=AK(),m=D(g);{let E=b(()=>i()("cancel_editing"));bl(m,{get"aria-label"(){return l(E)},useShortcut:!0,onclick:()=>{oa(`/assets/${o()?.internalPath??"-/all"}`)}})}var v=z(m,2),_=F(v);Pr(_,{children:(E,$)=>{var C=Fe();Z(()=>ne(C,n()?.name)),S(E,C)},$$slots:{default:!0}});var y=z(v,2);{var w=E=>{c(E)};q(y,E=>{r()||E(w)})}var x=z(y,2);jP(x,{get asset(){return n()},extraItems:$=>{var C=X(),k=D(C);{var T=A=>{c(A)};q(k,A=>{r()&&A(T)})}S($,C)},$$slots:{extraItems:!0}}),S(h,g)},$$slots:{default:!0}})}ae(),a()}var LK=j("<img/>"),NK=j("<video></video>",2),OK=j("<audio></audio>"),IK=j('<div role="none" class="blur svelte-1yaifwd"><div role="status" class="overlay svelte-1yaifwd"><!></div> <img role="none" loading="lazy" alt=""/></div>'),RK=j('<div role="none"><!> <!></div>');const DK={hash:"svelte-1yaifwd",code:".preview.svelte-1yaifwd {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1yaifwd {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1yaifwd .sui.icon {font-size:48px;}.preview.icon.svelte-1yaifwd {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1yaifwd:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) img:where(.svelte-1yaifwd) {pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) {display:contents;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) > :where(.svelte-1yaifwd) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) .overlay:where(.svelte-1yaifwd) {display:flex;justify-content:center;align-items:center;z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img:where(.svelte-1yaifwd) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.svelte-1yaifwd .blur:where(.svelte-1yaifwd) img.loaded:where(.svelte-1yaifwd) {opacity:1;}.preview.cover.svelte-1yaifwd {padding:0;}.preview.cover.svelte-1yaifwd > :is(img, video) {flex:auto;}.preview.svelte-1yaifwd > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1yaifwd :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1yaifwd :is(img, video) {opacity:1;}.checkerboard.svelte-1yaifwd img:where(.svelte-1yaifwd) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1yaifwd:not(.checkerboard) img:where(.svelte-1yaifwd) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1yaifwd:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1yaifwd :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ho(t,e){se(e,!0),Ee(t,DK);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"loading",3,"lazy"),s=I(e,"asset",3,void 0),a=I(e,"src",15,void 0),c=I(e,"variant",3,void 0),u=I(e,"blurBackground",3,!1),d=I(e,"cover",3,!1),f=I(e,"checkerboard",3,!1),h=I(e,"dissolve",3,!0),p=I(e,"alt",3,""),g=I(e,"controls",3,!1),m=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),v=ie(void 0),_=ie(!1),y=ie(!1),w=ie(void 0);const x=b(()=>!!s()&&!!c()&&!g()),E=b(()=>l(x)||e.kind==="image"||s()?.name.endsWith(".pdf"));let $=!1;const C=async()=>{if(!(!s()||!l(v)||$)){$=!0,K(_,!1),o()==="lazy"&&await pb(l(v));try{a(l(x)?await Zv(s()):await ty(s()))}catch{K(_,!0)}u()&&!l(w)&&a()&&K(w,a(),!0),$=!1,Vc()}},k=async()=>{!l(v)||!a()||((l(E)?!l(v).complete:!l(v).readyState)&&await new Promise(U=>{l(v)?.addEventListener(l(E)?"load":"loadedmetadata",()=>{U(void 0)},{once:!0})}),h()&&await pb(l(v)),K(y,!0),s()&&l(x)&&a().startsWith("blob:")&&URL.revokeObjectURL(a()))};Me(()=>{s()&&!l(w)&&(async()=>K(w,await Zv(s(),{cacheOnly:!0}),!0))()}),Me(()=>{l(v)&&s()&&C()}),Me(()=>{l(v)&&a()&&k()});var T=RK();let A;var P=F(T);{var L=U=>{Ze(U,{name:"draft"})},O=U=>{var H=X(),G=D(H);{var W=R=>{var B=LK();bt(B,()=>({loading:o(),src:a(),alt:p(),...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(B,J=>K(v,J),()=>l(v)),S(R,B)},Y=R=>{var B=X(),J=D(B);{var Q=te=>{var re=NK();bt(re,()=>({src:a(),controls:g()||void 0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(re,he=>K(v,he),()=>l(v)),S(te,re)},ee=te=>{var re=X(),he=D(re);{var pe=ge=>{var Pe=X(),xe=D(Pe);{var de=ve=>{var fe=OK();bt(fe,()=>({src:a(),controls:!0,playsinline:!0,...m}),void 0,void 0,void 0,"svelte-1yaifwd"),xt(fe,_e=>K(v,_e),()=>l(v)),S(ve,fe)},we=ve=>{Ze(ve,{name:"audio_file"})};q(xe,ve=>{g()?ve(de):ve(we,!1)})}S(ge,Pe)},ce=ge=>{Ze(ge,{name:"draft"})};q(he,ge=>{e.kind==="audio"?ge(pe):ge(ce,!1)},!0)}S(te,re)};q(J,te=>{e.kind==="video"?te(Q):te(ee,!1)},!0)}S(R,B)};q(G,R=>{l(E)?R(W):R(Y,!1)},!0)}S(U,H)};q(P,U=>{l(_)?U(L):U(O,!1)})}var N=z(P,2);{var M=U=>{var H=IK(),G=F(H),W=F(G);{var Y=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>n()("loading")]),S(J,Q)};q(W,J=>{!l(x)&&!l(y)&&J(Y)})}var R=z(G,2);let B;Z(()=>{Te(R,"src",l(w)),B=cn(R,1,"svelte-1yaifwd",null,B,{loaded:!!l(w)})}),S(U,H)};q(N,U=>{u()&&U(M)})}Z(()=>A=cn(T,1,`preview ${c()??""}`,"svelte-1yaifwd",A,{cover:d(),checkerboard:f(),dissolve:h(),loaded:l(y)})),S(t,T),ae(),i()}var MK=j('<div role="application" class="map svelte-4y1biz"></div>');const FK={hash:"svelte-4y1biz",code:".map.svelte-4y1biz {margin:var(--sui-focus-ring-width);border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);overflow:hidden;aspect-ratio:1/1;background-clip:text;}.leaflet-container {font-family:inherit !important;font-size:var(--sui-font-size-small) !important;}.leaflet-container a {color:var(--sui-primary-accent-color-text) !important;text-decoration:none !important;}.leaflet-bar a {border-color:var(--sui-button-border-color) !important;color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-button-background-color) !important;}.leaflet-control {color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-secondary-background-color-translucent) !important;}.leaflet-control-attribution {padding:4px 8px;}:root[data-theme='dark'] .leaflet-layer {filter:invert(100%) hue-rotate(180deg);}"};function zK(t,e){se(e,!0),Ee(t,FK);const n=()=>V(ue,"$_",r),[r,i]=me();let o=ie(void 0),s;const a=async()=>{if(!l(o))return;const u=await Fa("leaflet","dist/leaflet-src.esm.js"),d=`${Q_("leaflet")}/dist/images/marker-icon-2x.png`;s=u.map(l(o),{center:[0,0],zoom:2}),u.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(s);const{latitude:f,longitude:h}=e.coordinates,p=u.icon({iconUrl:d,iconSize:[25,41]});u.marker([f,h],{icon:p}).addTo(s),s.setView([f,h],12),l(o).querySelectorAll('a[href^="https:"]').forEach(g=>{g.setAttribute("target","_blank"),g.setAttribute("rel","noopener noreferrer")}),new ResizeObserver(()=>{s?.invalidateSize()}).observe(l(o))};Ut(()=>{a()});var c=MK();xt(c,u=>K(o,u),()=>l(o)),Z(u=>Te(c,"aria-label",u),[()=>n()("map_lat_lng",{values:e.coordinates})]),S(t,c),ae(),i()}const jK=t=>new Date(t*1e3).toISOString().substr(11,8),sS=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var o=BK(),s=F(o);et(s,{role:"link",variant:"link",onclick:()=>Wt(n(),{transitionType:"forwards"}),children:(a,c)=>{var u=UK(),d=F(u);Z(()=>ne(d,`${r()??""} › ${i()??""}`)),S(a,u)},$$slots:{default:!0}}),S(t,o)};var UK=j('<span role="none"> </span>'),BK=j("<p><!></p>"),qK=j('<div role="none" class="preview svelte-6mkk55"><!></div>'),VK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),HK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),KK=j('<a target="_blank"> </a>'),GK=j("<a> </a>"),WK=j("<p> </p>"),YK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),JK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),XK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>'),ZK=j('<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section>'),QK=j('<div role="none" class="detail svelte-6mkk55"><!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <!> <!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section> <!> <!> <!> <!></div>');const e9={hash:"svelte-6mkk55",code:".detail.svelte-6mkk55 {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-6mkk55 .preview:where(.svelte-6mkk55) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-6mkk55 section:where(.svelte-6mkk55):not(:last-child) {margin:0 0 16px;}.detail.svelte-6mkk55 section:where(.svelte-6mkk55) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-6mkk55 h4:where(.svelte-6mkk55) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function UP(t,e){se(e,!0),Ee(t,e9);const n=()=>V(qt,"$appLocale",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"showPreview",3,!1),a=ie(St({...Fh}));const c=b(()=>e.asset.path),u=b(()=>e.asset.size),d=b(()=>e.asset.kind),f=b(()=>e.asset.commitAuthor),h=b(()=>e.asset.commitDate),p=b(()=>l(a).publicURL),g=b(()=>l(a).repoBlobURL),m=b(()=>l(a).dimensions),v=b(()=>l(a).duration),_=b(()=>l(a).createdDate),y=b(()=>l(a).coordinates),w=b(()=>l(a).usedEntries),x=b(()=>gn(l(c))),E=b(()=>st(l(x).extension,"")),$=b(()=>Qp(l(d))||l(c).endsWith(".pdf")),C=be=>be.toLocaleString(n()??void 0,bM),k=async()=>{K(a,e.asset?await Gp(e.asset):{...Fh},!0)};Me(()=>{e.asset,k()});var T=QK(),A=F(T);{var P=be=>{var ye=qK(),tt=F(ye);{let Ve=b(()=>l(d)==="image"),Qe=b(()=>["audio","video"].includes(l(d)));Ho(tt,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Ve)},get controls(){return l(Qe)}})}S(be,ye)};q(A,be=>{s()&&l($)&&be(P)})}var L=z(A,2),O=F(L),N=F(O),M=z(O,2),U=F(M),H=z(L,2),G=F(H),W=F(G),Y=z(G,2),R=F(Y);or(R,n,be=>{var ye=Fe();Z(tt=>ne(ye,tt),[()=>Kp(l(u))]),S(be,ye)});var B=z(H,2);{var J=be=>{var ye=VK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z(ht=>{ne(Ve,ht),ne(Xe,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>r()("dimensions")]),S(be,ye)};q(B,be=>{l($)&&be(J)})}var Q=z(B,2);{var ee=be=>{var ye=HK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("duration"),()=>l(v)?jK(l(v)):"–"]),S(be,ye)};q(Q,be=>{["audio","video"].includes(l(d))&&be(ee)})}var te=z(Q,2),re=F(te),he=F(re),pe=z(re,2),ce=F(pe);{var ge=be=>{var ye=KK(),tt=F(ye);Z(()=>{Te(ye,"href",l(p)),ne(tt,l(p))}),S(be,ye)},Pe=be=>{var ye=Fe("–");S(be,ye)};q(ce,be=>{l(p)?be(ge):be(Pe,!1)})}var xe=z(te,2),de=F(xe),we=F(de),ve=z(de,2),fe=F(ve);{var _e=be=>{var ye=GK(),tt=F(ye);Z(()=>{Te(ye,"href",l(g)),ne(tt,`/${l(c)??""}`)}),S(be,ye)},Ce=be=>{var ye=Fe();Z(()=>ne(ye,`/${l(c)??""}`)),S(be,ye)};q(fe,be=>{l(g)?be(_e):be(Ce,!1)})}var ze=z(xe,2),Ne=F(ze),Ae=F(Ne),$e=z(Ne,2);it($e,17,()=>l(w),be=>be.id,(be,ye)=>{var tt=X(),Ve=D(tt);kn(Ve,Nt,null,Qe=>{var Xe=X(),ht=D(Xe);it(ht,17,()=>Ps(l(ye)),Pt=>Pt.name,(Pt,Qt)=>{var en=X(),pt=D(en);or(pt,n,kt=>{const tn=b(()=>ws(l(Qt)));var $n=X(),ai=D($n);it(ai,17,()=>ha(l(Qt),l(ye)),Dt=>Dt.name,(Dt,bn)=>{{let Et=b(()=>({link:`/collections/${l(Qt).name}/entries/${l(bn).name}`,collectionLabel:l(tn),entryLabel:df(l(bn))}));sS(Dt,()=>l(Et))}},Dt=>{{let bn=b(()=>({link:`/collections/${l(Qt).name}/entries/${l(ye).subPath}`,collectionLabel:l(tn),entryLabel:tu(l(Qt),l(ye),{useTemplate:!0})}));sS(Dt,()=>l(bn))}}),S(kt,$n)}),S(Pt,en)}),S(Qe,Xe)}),S(be,tt)},be=>{var ye=WK(),tt=F(ye);Z(Ve=>ne(tt,Ve),[()=>r()("sort_keys.none")]),S(be,ye)});var je=z(ze,2);{var Le=be=>{var ye=YK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z(ht=>{ne(Ve,ht),ne(Xe,l(f).name||l(f).login||l(f).email)},[()=>r()("sort_keys.commit_author")]),S(be,ye)};q(je,be=>{l(f)&&be(Le)})}var Ie=z(je,2);{var Re=be=>{var ye=JK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("sort_keys.commit_date"),()=>C(l(h))]),S(be,ye)};q(Ie,be=>{l(h)&&be(Re)})}var nt=z(Ie,2);{var Ge=be=>{var ye=XK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2),Xe=F(Qe);Z((ht,Pt)=>{ne(Ve,ht),ne(Xe,Pt)},[()=>r()("created_date"),()=>C(l(_))]),S(be,ye)};q(nt,be=>{l(_)&&be(Ge)})}var ut=z(nt,2);{var Oe=be=>{var ye=ZK(),tt=F(ye),Ve=F(tt),Qe=z(tt,2);zK(Qe,{get coordinates(){return l(y)}}),Z(Xe=>ne(Ve,Xe),[()=>r()("location")]),S(be,ye)};q(ut,be=>{l(y)&&be(Oe)})}Z((be,ye,tt,Ve,Qe,Xe)=>{ne(N,be),ne(U,ye),ne(W,tt),ne(he,Ve),ne(we,Qe),ne(Ae,Xe)},[()=>r()("kind"),()=>r()(`file_type_labels.${l(E)}`,{default:Cs.getType(l(c))??l(E).toUpperCase()}),()=>r()("size"),()=>r()("public_url"),()=>r()("file_path"),()=>r()("used_in")]),S(t,T),ae(),o()}var t9=j('<iframe class="svelte-9guikv"></iframe>'),n9=j('<div role="figure" class="markdown svelte-9guikv"><!></div>'),r9=j('<pre role="figure" class="svelte-9guikv"> </pre>'),i9=j('<pre role="figure" class="svelte-9guikv"> </pre>'),o9=j('<span role="alert"> </span>'),s9=j('<!> <div role="none" class="row svelte-9guikv"><div role="none" class="preview svelte-9guikv"><!></div> <!></div>',1),a9=j('<div role="group" class="wrapper svelte-9guikv"><!></div>');const l9={hash:"svelte-9guikv",code:`.wrapper.svelte-9guikv {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-9guikv {display:none;}.wrapper[inert].svelte-9guikv {filter:opacity(0);}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) {flex:auto;display:flex;overflow:hidden;}
|
|
497
497
|
@media (width < 768px) {.wrapper.svelte-9guikv .row:where(.svelte-9guikv) {flex-direction:column;}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) .preview:where(.svelte-9guikv) {flex:none !important;aspect-ratio:1/1;}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) .detail {flex:auto;width:auto;}
|
|
498
498
|
}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) .preview:where(.svelte-9guikv) {flex:auto;overflow:hidden;}.wrapper.svelte-9guikv .row:where(.svelte-9guikv) .preview:where(.svelte-9guikv) iframe:where(.svelte-9guikv),
|
|
499
499
|
.wrapper.svelte-9guikv .row:where(.svelte-9guikv) .preview:where(.svelte-9guikv) pre:where(.svelte-9guikv),
|
|
@@ -612,21 +612,21 @@ Required JSON structure:
|
|
|
612
612
|
["translation 1", "translation 2", ...]`},pL=t=>`Translate these texts and return ONLY valid JSON (no markdown, no code blocks):
|
|
613
613
|
${JSON.stringify(t)}
|
|
614
614
|
|
|
615
|
-
Respond with JSON only:`,kG="anthropic",SG="Anthropic Claude",EG="Anthropic API",TG="https://docs.claude.com/en/api/overview",$G="https://platform.claude.com/settings/keys",CG=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,AG=async({sourceLanguage:t,targetLanguage:e})=>!!sa(t)&&!!sa(e),PG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=sa(e),o=sa(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.anthropic.com/v1/messages",a=hL(i,o),c=pL(t),u={model:"claude-haiku-4-5",max_tokens:4e3,temperature:.3,system:a,messages:[{role:"user",content:c}]};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in Anthropic API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}},LG={serviceId:kG,serviceLabel:SG,apiLabel:EG,developerURL:TG,apiKeyURL:$G,apiKeyPattern:CG,markdownSupported:!0,availability:AG,translate:PG},NG="google",OG="Google Cloud Translation",IG="Cloud Translation API",RG="https://console.cloud.google.com/apis/library/translate.googleapis.com",DG="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",MG=/AIza[0-9A-Za-z-_]{35}/,dS=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),bp=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(dS.includes(e))return e;const[n]=e.split("-");if(dS.includes(n))return n},FG=async({sourceLanguage:t,targetLanguage:e})=>!!bp(t)&&!!bp(e),zG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{if(e=bp(e)??"",n=bp(n)??"",!e)throw new Error("Source locale is not supported.");if(!n)throw new Error("Target locale is not supported.");const i="https://translation.googleapis.com/language/translate/v2",o={q:t,source:e,target:n,format:"html"};try{const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(o)});if(!s.ok){const c=await s.json().catch(()=>({}));throw new Error(`Google Translate API error: ${s.status} ${s.statusText}${c.error?.message?` - ${c.error.message}`:""}`)}const{data:a}=await s.json();return a.translations.map(c=>c.translatedText)}catch(s){throw s instanceof Error?s:new Error("Failed to translate text with Google Translate API.")}},gL={serviceId:NG,serviceLabel:OG,apiLabel:IG,developerURL:RG,apiKeyURL:DG,apiKeyPattern:MG,markdownSupported:!1,availability:FG,translate:zG},jG="openai",UG="OpenAI GPT",BG="OpenAI API",qG="https://platform.openai.com/docs/overview",VG="https://platform.openai.com/api-keys",HG=/sk-[a-zA-Z0-9-_]{40,}/,KG=async({sourceLanguage:t,targetLanguage:e})=>!!sa(t)&&!!sa(e),GG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=sa(e),o=sa(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.openai.com/v1/chat/completions",a=hL(i,o),c=pL(t),u={model:"gpt-4o-mini",messages:[{role:"system",content:a},{role:"user",content:c}],temperature:.3,max_tokens:4e3};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in OpenAI API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}},WG={serviceId:jG,serviceLabel:UG,apiLabel:BG,developerURL:qG,apiKeyURL:VG,apiKeyPattern:HG,markdownSupported:!0,availability:KG,translate:GG},Bw={google:gL,anthropic:LG,openai:WG},Pg=un([ft],([t])=>{const{defaultTranslationService:e="google"}=t;return Bw[e]??gL}),mL=new vp({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});mL.keep(["span","div"]);const YG=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLanguage:s,targetLanguage:a,keyPath:c="",translate:u=!1}=e,d=i[s],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[a][h],m=mn({...f,keyPath:h}),v=m?.widget??"string";return c&&!h.startsWith(c)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&El(m).hasSubFields||!u&&p===g||!c&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},vd=(t,e,{count:n,sourceLanguage:r})=>{Pv.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLanguage:r})},JG=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=oe(Pg),{sourceLanguage:s,targetLanguage:a}=e,c=Object.keys(n).length,u=c===1?"one":"many",d=oe(ft).apiKeys?.[r]||await new Promise(f=>{Bu.set({show:!0,multiple:c>1,resolve:f})});if(d){vd("info","translation.started",{count:c,sourceLanguage:s});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?hy(h):h),{apiKey:d,sourceLanguage:s,targetLanguage:a});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[a][h]=p&&!i?mL.turndown(m):m}),vd("success",`translation.complete.${u}`,{count:c,sourceLanguage:s})}catch(f){vd("error","translation.error",{count:c,sourceLanguage:s}),console.error(f)}}},XG=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLanguage:r,targetLanguage:i}=e,o=Object.keys(n).length,s=o===1?"one":"many";Object.entries(n).forEach(([a,{value:c}])=>{t[i][a]=c}),vd("success",`copy.complete.${s}`,{count:o,sourceLanguage:r})},vL=async t=>{const{sourceLanguage:e,translate:n=!1}=t,r=oe(Je),{currentValues:i}=r,o=YG({draft:r,options:t}),s=Object.keys(o).length;if(!s){vd("info",`${n?"translation":"copy"}.none`,{count:s,sourceLanguage:e});return}n?await JG({currentValues:i,options:t,copingFieldMap:o}):XG({currentValues:i,options:t,copingFieldMap:o}),Je.update(a=>({...a,currentValues:i}))};function qw(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",o),r=()=>V(Pg,"$translator",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"keyPath",3,""),c=I(e,"translate",3,!1);const u=async({sourceLanguage:h,targetLanguage:p})=>!n()?.currentLocales[p]||!n().currentLocales[h]||!!a()&&!jn(n().currentValues[h])[a()]||!c()&&!!a()&&jn(n().currentValues[h])[a()]===jn(n().currentValues[p])[a()]||c()&&!await r()?.availability({sourceLanguage:h,targetLanguage:p});var d=X(),f=D(d);it(f,17,()=>e.otherLocales,dr,(h,p)=>{const g=b(()=>({sourceLanguage:l(p),targetLanguage:e.locale}));var m=X(),v=D(m);kn(v,()=>u(l(g)),null,(_,y)=>{{let w=b(()=>i()(c()?"translate_from_x":"copy_from_x",{values:{locale:po(l(p))}}));vt(_,{get label(){return l(w)},get disabled(){return l(y)},onclick:()=>{vL({...l(g),keyPath:a(),translate:c()})}})}}),S(h,m)}),S(t,d),ae(),s()}var ZG=j("<section><!></section>");const QG={hash:"svelte-wzztxu",code:"section.svelte-wzztxu {padding:var(--field-editor-padding);}section.svelte-wzztxu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-wzztxu > * {margin-inline:auto !important;max-width:768px;}section.svelte-wzztxu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-wzztxu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-wzztxu > header .required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function bL(t,e){Ee(t,QG);let n=I(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=ZG();bt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,void 0,"svelte-wzztxu");var o=F(i);Ue(o,()=>n()??qe),S(t,i)}function _L(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",o),r=()=>V(Pg,"$translator",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"size",3,"medium"),c=I(e,"keyPath",3,"");const u=b(()=>!n()?.currentLocales[e.locale]),d=async({sourceLanguage:m,targetLanguage:v})=>l(u)||!n()?.currentLocales[m]||!await r()?.availability({sourceLanguage:m,targetLanguage:v});var f=X(),h=D(f);{var p=m=>{const v=b(()=>{const[E]=e.otherLocales;return{otherLocale:E}}),_=b(()=>i()("translate_from_x",{values:{locale:po(l(v).otherLocale)??l(v).otherLocale}})),y=b(()=>({sourceLanguage:l(v).otherLocale,targetLanguage:e.locale}));var w=X(),x=D(w);kn(x,()=>d(l(y)),null,(E,$)=>{et(E,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(_)},get title(){return l(_)},get disabled(){return l($)},onclick:()=>{vL({...l(y),keyPath:c(),translate:!0})},startIcon:k=>{Ze(k,{name:"translate"})},$$slots:{startIcon:!0}})}),S(m,w)},g=m=>{{const v=w=>{Ze(w,{name:"translate"})},_=w=>{{let x=b(()=>i()("translation_options"));hr(w,{get"aria-label"(){return l(x)},children:(E,$)=>{qw(E,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})}};let y=b(()=>i()("translate"));Ur(m,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get disabled(){return l(u)},endIcon:v,popup:_,$$slots:{endIcon:!0,popup:!0}})}};q(h,m=>{e.otherLocales.length===1?m(p):m(g,!1)})}S(t,f),ae(),s()}var eW=j('<div role="alert" class="validation svelte-6wra4i" aria-live="polite"><div role="none" class="svelte-6wra4i"><!> <!></div></div>');const tW={hash:"svelte-6wra4i",code:".validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-6wra4i div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-6wra4i div:where(.svelte-6wra4i) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function Vw(t,e){Ee(t,tW);var n=eW(),r=F(n),i=F(r);Ze(i,{name:"error"});var o=z(i,2);Ue(o,()=>e.children),Z(()=>Te(n,"id",e.id)),S(t,n)}function nW(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1);zy(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(s){n(s)}}),ae()}var rW=j("<p> </p>");function iW(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",3,!1);var s=X(),a=D(s);{var c=u=>{var d=rW(),f=F(d);Z(h=>ne(f,h),[()=>n()(`boolean.${o()}`)]),S(u,d)};q(a,u=>{typeof o()=="boolean"&&u(c)})}S(t,s),ae(),i()}function oW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1),d=ie(""),f=ie("");const h=b(()=>st(e.fieldConfig.default_language,"")),p=b(()=>st(e.fieldConfig.allow_language_selection,!0)),g=b(()=>st(e.fieldConfig.output_code_only,!1)),m=b(()=>st(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=b(()=>jn(n()?.[o][e.locale])??{}),_=b(()=>`${e.keyPath}.${l(m).code}`),y=b(()=>`${e.keyPath}.${l(m).lang}`),w=()=>{if(l(g))typeof s()!="string"?K(d,""):l(d)!==s()&&K(d,s(),!0);else{const C=l(v)[l(_)],k=l(v)[l(y)]||l(h);typeof C!="string"?K(d,""):l(d)!==C&&K(d,C,!0),typeof k!="string"?K(f,""):l(f)!==k&&K(f,k,!0)}},x=()=>{l(g)?s()!==l(d)&&s(l(d)):n()&&(s({}),l(v)[l(_)]!==l(d)&&_t(Je,Se(n)[o][e.locale][l(_)]=l(d),Se(n)),l(v)[l(y)]!==l(f)&&_t(Je,Se(n)[o][e.locale][l(y)]=l(f),Se(n)))};Me(()=>{l(v),Se(()=>{w()})}),Me(()=>{l(d),l(f),Se(()=>{x()})});var E=X(),$=D(E);kn($,Nt,null,C=>{var k=X(),T=D(k);or(T,()=>JSON.stringify(e.fieldConfig),A=>{QV(A,{get showLanguageSwitcher(){return l(p)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(d)},set code(P){K(d,P,!0)},get lang(){return l(f)},set lang(P){K(f,P,!0)}})}),S(C,k)}),S(t,E),ae(),i()}var sW=j("<pre> </pre>");function aW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>st(e.fieldConfig.default_language,"")),s=b(()=>st(e.fieldConfig.output_code_only,!1)),a=b(()=>st(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=b(()=>jn(n()?.currentValues[e.locale])??{}),u=b(()=>`${e.keyPath}.${l(a).code}`),d=b(()=>`${e.keyPath}.${l(a).lang}`),f=b(()=>l(s)?e.currentValue:l(c)[l(u)]),h=b(()=>l(s)?l(o):l(c)[l(d)]);var p=X(),g=D(p);{var m=v=>{var _=sW(),y=F(_);Z(()=>{cn(_,1,hT(l(h)?`language-${l(h)}`:void 0)),ne(y,l(f))}),S(v,_)};q(g,v=>{l(f)&&v(m)})}S(t,p),ae(),i()}var lW=j(" <!>",1),cW=j('<span role="none" class="value svelte-1usff15"><!> <!></span>'),uW=j('<div role="none" class="svelte-1usff15"><input type="color" class="svelte-1usff15"/> <!> <!></div>');const dW={hash:"svelte-1usff15",code:"div.svelte-1usff15 {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.text-input {width:80px;min-width:0;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-1usff15 {font-family:var(--sui-textbox-font-family);}"};function fW(t,e){const n=Vn();se(e,!0),Ee(t,dW);const r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1),d=ie(""),f=ie(255);const h=b(()=>st(e.fieldConfig.allowInput,!1)),p=b(()=>st(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:k,a:T="ff"}=s().match(m)?.groups??{};if(k&&l(d)!==k&&K(d,k,!0),k&&l(p)){const A=Number.parseInt(`0x${T}`,16);l(f)!==A&&K(f,A,!0)}},_=()=>{let k=g.test(l(d))?l(d):"";k&&l(p)&&(k+=l(f).toString(16).padStart(2,"0")),s()!==k&&s(k)};Me(()=>{s(),Se(()=>{v()})}),Me(()=>{l(d),l(f),Se(()=>{_()})});var y=uW(),w=F(y),x=z(w,2);{var E=k=>{var T=cW(),A=F(T);{var P=N=>{qn(N,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return c()},get required(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(d)},set value(M){K(d,M,!0)}})};q(A,N=>{l(h)&&N(P)})}var L=z(A,2);{var O=N=>{var M=lW(),U=D(M),H=z(U);{let G=b(()=>!l(d)),W=b(()=>r()("opacity"));C5(H,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(W)},get value(){return l(f)},set value(Y){K(f,Y,!0)}})}Z(G=>ne(U,`${G??""} `),[()=>r()("opacity")]),S(N,M)};q(L,N=>{l(p)&&N(O)})}S(k,T)};q(x,k=>{(l(h)||l(p))&&k(E)})}var $=z(x,2);{var C=k=>{{let T=b(()=>r()("clear")),A=b(()=>!l(d)),P=b(()=>`${n}-picker ${l(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return l(T)},get disabled(){return l(A)},get"aria-controls"(){return l(P)},onclick:()=>{K(d,""),K(f,255)}})}};q($,k=>{!c()&&!a()&&k(C)})}Z(()=>{Te(w,"id",`${n}-picker`),w.readOnly=c(),Te(w,"aria-invalid",u()),Te(w,"aria-readonly",c()),Te(w,"aria-required",a()),Te(w,"aria-labelledby",`${e.fieldId??""}-label`),Te(w,"aria-errormessage",`${e.fieldId??""}-error`)}),Lp(w,()=>l(d),k=>K(d,k)),S(t,y),ae(),o()}var hW=j('<p><span role="none" class="preview svelte-1pgn31g"><span role="none" class="color svelte-1pgn31g"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const pW={hash:"svelte-1pgn31g",code:".preview.svelte-1pgn31g {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-1pgn31g .color:where(.svelte-1pgn31g) {display:block;width:24px;height:24px;border-radius:24px;}"};function gW(t,e){se(e,!0),Ee(t,pW);const n=b(()=>st(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,o=b(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var s=X(),a=D(s);{var c=u=>{var d=hW(),f=F(d),h=F(f);let p;var g=z(h,2),m=F(g),v=z(g,2),_=F(v);Z(()=>{p=eo(h,"",p,{"background-color":e.currentValue}),ne(m,e.currentValue),ne(_,l(o))}),S(u,d)};q(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}S(t,s),ae()}function mW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1);const d=b(()=>st(e.fieldConfig.value,"")),f=b(()=>n()?.isIndexFile??!1),h=b(()=>n()?.collectionName??""),p=b(()=>n()?.fileName),g=b(()=>jn(n()?.[o][e.locale])??{}),m=b(()=>tl(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},_=()=>{if(!Object.keys(l(g)).includes(e.keyPath))return;const y=l(d)==="{{index}}"?v()??"":l(d).replaceAll(/{{(.+?)}}/g,(w,x)=>{if(x==="index")return String(v()??"");if(!x.startsWith("fields."))return"";const E=iu({collectionName:l(h),fileName:l(p),valueMap:l(g),keyPath:x.replace(/^fields\./,""),locale:e.locale,isIndexFile:l(f)});return Array.isArray(E)?l(m).format(E):String(E)});s()!==y&&s(y)};Me(()=>{l(g),Se(()=>{_()})});{let y=b(()=>String(s()));qn(t,{get value(){return l(y)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}ae(),i()}var vW=j('<p dir="auto"> </p>');function bW(t,e){se(e,!0);var n=vW(),r=F(n);Z(i=>{Te(n,"lang",i),ne(r,e.currentValue),n.dir=n.dir},[()=>Ar(e.locale)]),S(t,n),ae()}var _W=j('<span role="none" class="utc svelte-boo8ot">UTC</span>'),yW=j('<div role="none" class="svelte-boo8ot"><input/> <!> <!> <!></div>');const wW={hash:"svelte-boo8ot",code:"div.svelte-boo8ot {display:flex;align-items:center;}.utc.svelte-boo8ot {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function xW(t,e){se(e,!0),Ee(t,wW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=ie("");const d=b(()=>da(e.fieldConfig)),f=b(()=>l(d).dateOnly),h=b(()=>l(d).timeOnly),p=b(()=>l(d).utc),g=()=>{const k=_M(o(),e.fieldConfig);k!==void 0&&k!==l(u)&&K(u,k,!0)},m=()=>{const k=O$(l(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Lc(k,e.fieldConfig))!==Number(Lc(o(),e.fieldConfig))&&o(k)};Me(()=>{o(),Se(()=>{g()})}),Me(()=>{l(u),Se(()=>{m()})});var v=yW(),_=F(v),y=z(_,2);{var w=k=>{var T=_W();S(k,T)};q(y,k=>{l(p)&&k(w)})}var x=z(y,2);{var E=k=>{{let T=b(()=>n()(l(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return l(T)},onclick:()=>{const A=N$(e.fieldConfig);K(u,l(p)?A.replace(/:00\.000Z$/,""):A,!0)}})}};q(x,k=>{a()||k(E)})}var $=z(x,2);{var C=k=>{{let T=b(()=>n()("clear")),A=b(()=>!o());et(k,{variant:"tertiary",get label(){return l(T)},get disabled(){return l(A)},onclick:()=>{o("")}})}};q($,k=>{!a()&&!s()&&k(C)})}Z(()=>{Te(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),Te(_,"aria-readonly",a()),Te(_,"aria-required",s()),Te(_,"aria-invalid",c()),Te(_,"aria-labelledby",`${e.fieldId??""}-label`),Te(_,"aria-errormessage",`${e.fieldId??""}-error`)}),Lp(_,()=>l(u),k=>K(u,k)),S(t,v),ae(),i()}var kW=j('<p dir="auto"> <!></p>');function SW(t,e){se(e,!0);const n=b(()=>I$({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=D(r);{var o=s=>{var a=kW(),c=F(a),u=z(c);{var d=f=>{var h=Fe("UTC");S(f,h)};q(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(f=>{Te(a,"lang",f),ne(c,`${l(n)??""} `),a.dir=a.dir},[()=>Ar(e.locale)]),S(s,a)};q(i,s=>{l(n)&&s(o)})}S(t,r),ae()}const fS="https://console.cloudinary.com",EW=["cloud_name","api_key","username","timestamp","signature","integration","use_saml","saml_iframe_support"],TW=["integration","inline_container","z_index","multiple","max_files","default_transformations","insert_caption","remove_header","folder","search","collection","asset","transformation","sandboxNotAllowedAttributes","theme"],n_=t=>{const e=oe(Ct);if(t??=e,t?.media_libraries?.cloudinary)return t.media_libraries.cloudinary;if(!t?.media_library)return;const n=t.media_library.name==="cloudinary",r=!t.media_library.name&&e?.media_library?.name==="cloudinary";if(n||r)return t.media_library},$W=t=>{const e=n_()??{config:{}},n=n_(t)??{config:{}};return{...e,...n,config:{...e.config,...n.config}}},CW=()=>{const{cloud_name:t,api_key:e}=n_()?.config??{};return{cloudName:t,apiKey:e}},AW=()=>{const{cloudName:t,apiKey:e}=CW();return!!(t&&e)},PW={serviceType:"cloud_storage",serviceId:"cloudinary",serviceLabel:"Cloudinary",serviceURL:"https://cloudinary.com/",showServiceLink:!0,hotlinking:!0,authType:"widget",developerURL:"https://cloudinary.com/documentation/",apiKeyURL:"https://console.cloudinary.com/settings/api-keys",apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:AW};var LW=j('<!> <div role="none"> </div>',1),NW=j('<iframe allow="camera; storage-access" class="svelte-p06t0o"></iframe> <!>',1);const OW={hash:"svelte-p06t0o",code:"iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}"};function IW(t,e){se(e,!0),Ee(t,OW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"multiple",3,!1),s=I(e,"hidden",3,!1);const a=b(()=>$W(e.fieldConfig)??{});let c="",u=ie(!1),d=ie(!1),f=ie(void 0);const h=()=>{if(!l(f))return;c=window.crypto.randomUUID();const x=new URLSearchParams({...Object.fromEntries(Object.entries(l(a).config??{}).filter(([E])=>EW.includes(E))),ml_id:c,pmHost:window.location.origin,new_cms:"true",remove_header:"true"});l(f).src=`https://console.cloudinary.com/console/media_library/cms?${x}`},p=()=>{const x={...Object.fromEntries(Object.entries(l(a).config??{}).filter(([$])=>TW.includes($))),multiple:o(),max_files:e.fieldConfig?.max??l(a).config?.max_files??20,folder:{path:l(a).config?.folder?.path??"",resource_type:e.kind??"raw"}},E={type:"ML_WIDGET_SHOW",data:{mlId:c,config:x}};console.debug("Cloudinary Panel sending message:",E),l(f)?.contentWindow?.postMessage(JSON.stringify(E),fS)},g=({assets:x})=>{const{output_filename_only:E=!1,use_transformations:$=!0}=l(a),C=x.map(k=>{const T=k.secure_url;return E?{url:T.split("/").pop()}:$?{url:k.derived?.[0]?.secure_url??T}:{url:T}});e.onSelect(C)},m=({origin:x,data:E})=>{if(x===fS){if(typeof E=="string")try{E=JSON.parse(E)}catch{return}Bt(E)&&(console.debug("Cloudinary Panel received message:",E),E.type==="login"&&E.consoleDomain&&K(u,!0),E.type==="consoleLoaded"&&K(d,!0),E.type==="ML_WIDGET_INSERT_DATA"&&g(E.data))}};Ut(()=>(h(),window.addEventListener("message",m),()=>{window.removeEventListener("message",m)})),Me(()=>{l(a)&&l(d)&&p()});var v=NW(),_=D(v);xt(_,x=>K(f,x),()=>l(f));var y=z(_,2);{var w=x=>{nr(x,{children:(E,$)=>{var C=LW(),k=D(C);{let P=b(()=>n()("cloud_storage.cloudinary.activate.button_label"));et(k,{variant:"primary",get label(){return l(P)},onclick:async()=>{window.open("https://console.cloudinary.com/console/media_library/cms_login?cms=true")}})}var T=z(k,2),A=F(T);Z(P=>ne(A,P),[()=>n()("cloud_storage.cloudinary.activate.description")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{l(u)||x(w)})}Z(x=>{Te(_,"title",x),Te(_,"hidden",s()||!l(u))},[()=>n()("cloud_storage.cloudinary.iframe_title")]),S(t,v),ae(),i()}var RW=j('<span role="none" class="icon check-background"><!></span>'),DW=j('<div role="none"><!></div>');const MW={hash:"svelte-1fitgoo",code:".wrapper.svelte-1fitgoo {display:contents;}.wrapper.svelte-1fitgoo [role=option] {position:relative;}.wrapper.svelte-1fitgoo [role=option] > .icon.check {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background .icon {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=true] .check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}.wrapper.svelte-1fitgoo [role=option] .check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;}.wrapper.svelte-1fitgoo [role=option] .check-background .icon {color:inherit !important;font-size:20px;}.wrapper.grid.svelte-1fitgoo .check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.wrapper.list.svelte-1fitgoo .check-background {margin-inline-start:16px;}"};function yL(t,e){Ee(t,MW);let n=I(e,"viewType",3,"grid");var r=DW(),i=F(r);Tr(i,{label:"",get value(){return e.value},get selected(){return e.selected},get onChange(){return e.onChange},startIcon:s=>{var a=X(),c=D(a);{var u=d=>{var f=RW(),h=F(f);Ze(h,{name:"check",class:"icon check"}),S(d,f)};q(c,d=>{e.multiple&&d(u)})}S(s,a)},children:(s,a)=>{var c=X(),u=D(c);Ue(u,()=>e.children??qe),S(s,c)},$$slots:{startIcon:!0,default:!0}}),Z(()=>cn(r,1,`wrapper ${n()??""}`,"svelte-1fitgoo")),S(t,r)}var FW=j('<div role="none"><!></div>');const zW={hash:"svelte-umbokg",code:".wrapper.svelte-umbokg {display:contents;}.wrapper.svelte-umbokg .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-umbokg .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-umbokg .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-umbokg .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-umbokg .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-umbokg .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-umbokg .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-umbokg .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-umbokg .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-umbokg .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-umbokg :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;inset-inline-start:-99999px;}.wrapper.svelte-umbokg .listbox.list .option button {gap:16px;}.wrapper.svelte-umbokg .listbox.list .option button .preview {width:64px;}.wrapper.svelte-umbokg .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-umbokg .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function wL(t,e){se(e,!0),Ee(t,zW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"viewType",3,"grid"),s=I(e,"gridId",3,void 0),a=I(e,"multiple",3,!1),c=I(e,"showTitle",3,!1),u=I(e,"onChange",3,void 0),d=I(e,"children",3,void 0);var f=FW();let h;var p=F(f);{let g=b(()=>n()("assets_dialog.available_images"));uu(p,{get id(){return s()},get class(){return o()},get multiple(){return a()},get"aria-label"(){return l(g)},onChange:m=>{u()?.(m.detail)},children:(m,v)=>{var _=X(),y=D(_);Ue(y,()=>d()??qe),S(m,_)},$$slots:{default:!0}})}Z(()=>h=cn(f,1,"wrapper svelte-umbokg",null,h,{"show-title":c()})),S(t,f),ae(),i()}var jW=j('<span role="none" class="name"> </span>'),UW=j("<!> <!>",1),BW=j('<span role="alert"> </span>'),qW=j('<span role="alert"> </span>'),VW=j('<span role="alert"> </span>'),HW=j('<div role="none" class="input-outer svelte-mqll9n"><!></div>'),KW=j('<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>',1),GW=j('<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>',1),WW=j('<span role="alert"> </span>'),YW=j("<!> <!>",1),JW=j("<!> <!>",1);const XW={hash:"svelte-mqll9n",code:"p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}"};function ZW(t,e){se(e,!0),Ee(t,XW);const n=()=>V(Sc,"$selectAssetsView",s),r=()=>V(ft,"$prefs",s),i=()=>V(vn,"$isSmallScreen",s),o=()=>V(ue,"$_",s),[s,a]=me(),c=fe=>{wL(fe,{get viewType(){return l(L)},get gridId(){return p()},get multiple(){return f()},children:(_e,Ce)=>{{const ze=(Ae,$e=qe)=>{var je=X(),Le=D(je);kn(Le,Nt,null,Ie=>{const Re=b(()=>{const{id:nt,previewURL:Ge,description:ut,kind:Oe}=$e();return{id:nt,previewURL:Ge,description:ut,_kind:Oe}});{let nt=b(()=>he($e()));yL(Ie,{get value(){return l(Re).id},get viewType(){return l(L)},get multiple(){return f()},get selected(){return l(nt)},onChange:({detail:{selected:Ge}})=>{pe($e(),Ge)},children:(Ge,ut)=>{var Oe=UW(),be=D(Oe);Ho(be,{get kind(){return l(Re)._kind},get src(){return l(Re).previewURL},variant:"tile",crossorigin:"anonymous"});var ye=z(be,2);{var tt=Ve=>{var Qe=jW(),Xe=F(Qe);Z(()=>ne(Xe,l(Re).description)),S(Ve,Qe)};q(ye,Ve=>{(!i()||l(L)==="list")&&Ve(tt)})}S(Ge,Oe)},$$slots:{default:!0}})}}),S(Ae,je)};let Ne=b(()=>l(Y)??[]);Cl(_e,{get items(){return l(Ne)},itemKey:"id",renderItem:ze,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})};let u=I(e,"kind",3,"image"),d=I(e,"fieldConfig",3,void 0),f=I(e,"multiple",3,!1),h=I(e,"searchTerms",3,""),p=I(e,"gridId",3,void 0),g=I(e,"selectedResources",31,()=>St([]));const m=b(()=>st(e.serviceProps.serviceType,"stock_assets")),v=b(()=>st(e.serviceProps.serviceId,"")),_=b(()=>st(e.serviceProps.serviceLabel,"")),y=b(()=>st(e.serviceProps.hotlinking,!1)),w=b(()=>st(e.serviceProps.authType,"api_key")),x=b(()=>st(e.serviceProps.developerURL,"")),E=b(()=>st(e.serviceProps.apiKeyURL,"")),$=b(()=>e.serviceProps.apiKeyPattern),C=b(()=>e.serviceProps.init),k=b(()=>e.serviceProps.signIn),T=b(()=>e.serviceProps.list),A=b(()=>e.serviceProps.search),P=b(()=>e.serviceProps.upload),L=b(()=>n()?.type),O=St({userName:"",password:""});let N=ie(!0),M=ie(!1),U=ie(""),H=ie(""),G=ie(""),W=ie("initial"),Y=ie(null),R=ie(void 0),B=ie(St({show:!1,status:"info",length:0}));const J=b(()=>({kind:u(),fieldConfig:d(),apiKey:l(U),userName:l(H),password:l(G)}));let Q=0;const ee=async(fe="")=>{K(Y,null),fe=fe.trim();try{K(Y,await(fe?l(A)?.(fe,l(J)):l(T)?.(l(J)))??[],!0)}catch(_e){K(R,"search_fetch_failed"),console.error(_e)}},te=async fe=>{if(l(P)){K(B,{show:!0,status:"info",length:fe.length},!0);try{await l(P)(fe,l(J)),ee()}catch{K(B,{show:!0,status:"error",length:fe.length},!0)}}},re=async fe=>{const{downloadURL:_e,fileName:Ce,credit:ze}=fe;if(l(y))return{url:_e,credit:ze};try{const Ne=await fetch(_e),{ok:Ae,status:$e}=Ne;if(!Ae)throw new Error(`The response returned with HTTP status ${$e}.`);const je=await Ne.blob(),Le=new File([je],Ce,{type:je.type});return{url:_e,credit:ze,file:Le}}catch(Ne){K(R,"image_fetch_failed"),console.error(Ne)}},he=fe=>g().some(_e=>_e.url===fe.downloadURL),pe=async(fe,_e)=>{const Ce=g().filter(ze=>ze.url!==fe.downloadURL);if(_e){const ze=await re(fe);ze&&g([...Ce,ze])}else g(Ce)};Ut(()=>{(async()=>(typeof l(C)=="function"&&(K(N,!1),K(N,await l(C)(),!0)),l(N)&&(K(U,r().apiKeys?.[l(v)]??"",!0),(fe=>{var _e=ji(fe,2);K(H,_e[0],!0),K(G,_e[1],!0)})((r().logins?.[l(v)]??"").split(" ")),K(M,!!l(U)||!!l(G),!0),K(Y,null))))()}),Me(()=>{h(),l(M),Se(()=>{window.clearTimeout(Q),Q=window.setTimeout(()=>{l(M)&&ee(h())},1e3)})});var ce={uploadFiles:te},ge=JW(),Pe=D(ge);{var xe=fe=>{var _e=X(),Ce=D(_e);{var ze=Ae=>{nr(Ae,{children:($e,je)=>{var Le=BW(),Ie=F(Le);Z(Re=>ne(Ie,Re),[()=>o()(`assets_dialog.error.${l(R)}`)]),S($e,Le)},$$slots:{default:!0}})},Ne=Ae=>{var $e=X(),je=D($e);{var Le=Re=>{nr(Re,{children:(nt,Ge)=>{var ut=qW(),Oe=F(ut);Z(be=>ne(Oe,be),[()=>o()("searching")]),S(nt,ut)},$$slots:{default:!0}})},Ie=Re=>{var nt=X(),Ge=D(nt);{var ut=be=>{nr(be,{children:(ye,tt)=>{var Ve=VW(),Qe=F(Ve);Z(Xe=>ne(Qe,Xe),[()=>o()("no_files_found")]),S(ye,Ve)},$$slots:{default:!0}})},Oe=be=>{var ye=X(),tt=D(ye);{var Ve=Xe=>{{let ht=b(()=>d()?.accept);ku(Xe,{get accept(){return l(ht)},get multiple(){return f()},onDrop:({files:Pt})=>te(Pt),children:(Pt,Qt)=>{c(Pt)},$$slots:{default:!0}})}},Qe=Xe=>{c(Xe)};q(tt,Xe=>{l(P)?Xe(Ve):Xe(Qe,!1)},!0)}S(be,ye)};q(Ge,be=>{l(Y).length?be(Oe,!1):be(ut)},!0)}S(Re,nt)};q(je,Re=>{l(Y)?Re(Ie,!1):Re(Le)},!0)}S(Ae,$e)};q(Ce,Ae=>{l(R)?Ae(ze):Ae(Ne,!1)})}S(fe,_e)},de=fe=>{var _e=X(),Ce=D(_e);{var ze=Ae=>{nr(Ae,{children:($e,je)=>{var Le=GW(),Ie=D(Le),Re=F(Ie);{var nt=Ve=>{var Qe=X(),Xe=D(Qe);cr(Xe,()=>jr.sanitize(o()("prefs.media.stock_photos.description",{values:{service:l(_),homeHref:`href="${l(x)}"`,apiKeyHref:`href="${l(E)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(Ve,Qe)};q(Re,Ve=>{l(m)==="stock_assets"&&Ve(nt)})}var Ge=z(Re,2);{var ut=Ve=>{var Qe=X(),Xe=D(Qe);cr(Xe,()=>jr.sanitize(o()(`cloud_storage.${l(v)}.auth.${l(W)}`,{default:o()(`cloud_storage.auth.${l(w)}.${l(W)}`,{values:{service:l(_)}})}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(Ve,Qe)};q(Ge,Ve=>{l(m)==="cloud_storage"&&Ve(ut)})}var Oe=z(Ie,2);{var be=Ve=>{var Qe=HW(),Xe=F(Qe);{let ht=b(()=>o()("prefs.media.stock_photos.field_label",{values:{service:l(_)}}));qn(Xe,{flex:!0,monospace:!0,spellcheck:"false",get"aria-label"(){return l(ht)},oninput:Pt=>{const Qt=Pt.target.value.trim();l($)?.test(Qt)&&(K(U,Qt,!0),K(M,!0),_t(ft,Se(r).apiKeys??={},Se(r)),_t(ft,Se(r).apiKeys[l(v)]=l(U),Se(r)),ee())}})}S(Ve,Qe)};q(Oe,Ve=>{l(w)==="api_key"&&Ve(be)})}var ye=z(Oe,2);{var tt=Ve=>{var Qe=KW(),Xe=D(Qe),ht=F(Xe);{let kt=b(()=>o()("user_name")),tn=b(()=>l(W)==="requested");qn(ht,{flex:!0,spellcheck:"false",get"aria-label"(){return l(kt)},get disabled(){return l(tn)},get value(){return O.userName},set value($n){O.userName=$n}})}var Pt=z(Xe,2),Qt=F(Pt);{let kt=b(()=>o()("password")),tn=b(()=>l(W)==="requested");gp(Qt,{get"aria-label"(){return l(kt)},get disabled(){return l(tn)},get value(){return O.password},set value($n){O.password=$n}})}var en=z(Pt,2),pt=F(en);{let kt=b(()=>o()("sign_in")),tn=b(()=>!O.userName||!O.password||l(W)==="requested");et(pt,{variant:"secondary",get label(){return l(kt)},get disabled(){return l(tn)},onclick:async()=>{K(W,"requested"),O.userName=O.userName.trim(),O.password=O.password.trim(),await l(k)?.(O.userName,O.password)?(K(W,"success"),K(H,O.userName,!0),K(G,O.password,!0),K(M,!0),_t(ft,Se(r).logins??={},Se(r)),_t(ft,Se(r).logins[l(v)]=[l(H),l(G)].join(" "),Se(r)),ee()):K(W,"error")}})}S(Ve,Qe)};q(ye,Ve=>{l(w)==="password"&&Ve(tt)})}S($e,Le)},$$slots:{default:!0}})},Ne=Ae=>{nr(Ae,{children:($e,je)=>{var Le=WW(),Ie=F(Le);Z(Re=>ne(Ie,Re),[()=>o()("cloud_storage.invalid")]),S($e,Le)},$$slots:{default:!0}})};q(Ce,Ae=>{l(N)?Ae(ze):Ae(Ne,!1)},!0)}S(fe,_e)};q(Pe,fe=>{l(M)?fe(xe):fe(de,!1)})}var we=z(Pe,2);Yn(we,{get show(){return l(B).show},set show(fe){l(B).show=fe},children:(fe,_e)=>{Mn(fe,{get status(){return l(B).status},children:(Ce,ze)=>{var Ne=YW(),Ae=D(Ne);{var $e=Ie=>{var Re=Fe();Z(nt=>ne(Re,nt),[()=>o()(l(B).length===1?"uploading_file_progress":"uploading_files_progress",{values:{count:l(B).length}})]),S(Ie,Re)};q(Ae,Ie=>{l(B).status==="info"&&Ie($e)})}var je=z(Ae,2);{var Le=Ie=>{var Re=Fe();Z(nt=>ne(Re,nt),[()=>o()(l(B).length===1?"uploading_file_failed":"uploading_files_failed",{values:{count:l(B).length}})]),S(Ie,Re)};q(je,Ie=>{l(B).status==="error"&&Ie(Le)})}S(Ce,Ne)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,ge);var ve=ae(ce);return a(),ve}const Af=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),nc=({value:t,terms:e})=>Af(t).includes(e),hS=(t,e=qe)=>{var n=X(),r=D(n);cr(r,()=>jr.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),S(t,n)};var QW=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),eY=j('<strong class="svelte-1ong0f1"><!></strong>'),tY=j("<!>/",1),nY=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),rY=j('<span role="none" class="name svelte-1ong0f1"><!> <!></span>'),iY=j("<!> <!> <!>",1),oY=j('<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>'),sY=j('<span role="none"> </span>');const aY={hash:"svelte-1ong0f1",code:".grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;}.grid-wrapper.svelte-1ong0f1 [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-1ong0f1 [role=listbox].grid .unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}.grid-wrapper.svelte-1ong0f1 [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-1ong0f1 {color:var(--sui-tertiary-foreground-color);}.name.svelte-1ong0f1 strong:where(.svelte-1ong0f1) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function xL(t,e){se(e,!0),Ee(t,aY);const n=()=>V(ue,"$_",i),r=()=>V(vn,"$isSmallScreen",i),[i,o]=me();let s=I(e,"multiple",3,!1),a=I(e,"assets",19,()=>[]),c=I(e,"viewType",3,"grid"),u=I(e,"searchTerms",3,""),d=I(e,"basePath",3,void 0),f=I(e,"gridId",3,void 0),h=I(e,"checkerboard",3,!1),p=I(e,"selectedResources",31,()=>St([])),g=I(e,"onSelect",3,void 0);const m=b(()=>u()?a().filter(({name:$})=>Af($).includes(u())):a()),v=$=>p().some(C=>pn(C.asset,$)),_=($,C)=>{const k=p().filter(T=>!pn(T.asset,$));C?(p([...k,{asset:$}]),g()?.({asset:$})):p(k)};var y=X(),w=D(y);{var x=$=>{var C=oY(),k=F(C);wL(k,{get multiple(){return s()},get gridId(){return f()},get viewType(){return c()},showTitle:!0,children:(T,A)=>{Cl(T,{get items(){return l(m)},itemKey:"path",renderItem:(L,O=qe)=>{var N=X(),M=D(N);kn(M,Nt,null,U=>{const H=b(()=>{const{kind:Y,name:R,path:B,unsaved:J,folder:Q}=O();return{kind:Y,name:R,path:B,unsaved:J,folder:Q}}),G=b(()=>d()&&!l(H).folder.entryRelative?an(l(H).path.replace(d(),"")):l(H).name),W=b(()=>l(G).split("/"));{let Y=b(()=>v(O()));yL(U,{get value(){return l(H).path},get viewType(){return c()},get multiple(){return s()},get selected(){return l(Y)},onChange:({detail:{selected:R}})=>{_(O(),R)},children:(R,B)=>{var J=iY(),Q=D(J);{var ee=pe=>{var ce=QW(),ge=F(ce);Z(Pe=>ne(ge,Pe),[()=>n()("assets_dialog.unsaved")]),S(pe,ce)};q(Q,pe=>{c()==="grid"&&l(H).unsaved&&pe(ee)})}var te=z(Q,2);Ho(te,{get kind(){return l(H).kind},get asset(){return O()},variant:"tile",get checkerboard(){return h()}});var re=z(te,2);{var he=pe=>{var ce=rY(),ge=F(ce);Pr(ge,{lines:2,children:(de,we)=>{var ve=X(),fe=D(ve);it(fe,17,()=>l(W),dr,(_e,Ce,ze)=>{var Ne=X(),Ae=D(Ne);{var $e=Le=>{var Ie=eY(),Re=F(Ie);hS(Re,()=>l(Ce)),S(Le,Ie)},je=Le=>{var Ie=tY(),Re=D(Ie);hS(Re,()=>l(Ce)),S(Le,Ie)};q(Ae,Le=>{ze===l(W).length-1?Le($e):Le(je,!1)})}S(_e,Ne)}),S(de,ve)},$$slots:{default:!0}});var Pe=z(ge,2);{var xe=de=>{var we=nY(),ve=F(we);Z(fe=>ne(ve,fe),[()=>n()("assets_dialog.unsaved")]),S(de,we)};q(Pe,de=>{c()==="list"&&l(H).unsaved&&de(xe)})}S(pe,ce)};q(re,pe=>{(!r()||c()==="list")&&pe(he)})}S(R,J)},$$slots:{default:!0}})}}),S(L,N)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),S($,C)},E=$=>{nr($,{children:(C,k)=>{var T=sY(),A=F(T);Z(P=>ne(A,P),[()=>n()("no_files_found")]),S(C,T)},$$slots:{default:!0}})};q(w,$=>{l(m).length?$(x):$(E,!1)})}S(t,y),ae(),o()}function lY(t,e){se(e,!0);const n=()=>V(Sc,"$selectAssetsView",r),[r,i]=me();let o=I(e,"multiple",3,!1),s=I(e,"accept",3,void 0),a=I(e,"assets",19,()=>[]),c=I(e,"searchTerms",3,""),u=I(e,"basePath",3,void 0),d=I(e,"selectedResources",31,()=>St([])),f=ie(void 0);Me(()=>{d().length||Se(()=>{l(f)?.reset()})}),xt(ku(t,{get multiple(){return o()},get accept(){return s()},get onDrop(){return e.onDrop},children:(h,p)=>{{let g=b(()=>n()?.type);xL(h,{get multiple(){return o()},get assets(){return a()},get viewType(){return l(g)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResources(){return d()},set selectedResources(m){d(m)}})}},$$slots:{default:!0}}),h=>K(f,h,!0),()=>l(f)),ae(),i()}const r_=(t=oe(Ct))=>t?.media_libraries?.uploadcare??(t?.media_library?.name==="uploadcare"?t?.media_library:void 0),Hw=()=>r_()?.config?.publicKey,cY=()=>!!Hw(),kL=(t,{fieldConfig:e}={})=>{const{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=r_(e)??r_()??{};return t.map(o=>{const{uuid:s,original_filename:a,original_file_url:c,mime_type:u,datetime_uploaded:d,size:f}=o,h=`${new URL(i??c).origin}/${s}/`;return{id:s,description:a,previewURL:`${h}-/preview/400x400/`,downloadURL:`${h}${r?`-${r}`:""}${n?a:""}`,fileName:a,lastModified:new Date(d),size:f,kind:u.startsWith("image/")?"image":u.startsWith("video/")?"video":"other"}})},SL=async(t,{maxPages:e=10,filter:n}={})=>{const r=Hw();if(!r)return Promise.reject(new Error("Uploadcare public key is not configured"));const{kind:i,fieldConfig:o,apiKey:s}=t,a={Accept:"application/vnd.uploadcare-v0.7+json",Authorization:`Uploadcare.Simple ${r}:${s}`},c=new URLSearchParams({limit:"100",ordering:"-datetime_uploaded",stored:"true"}),u=[];let d=`https://api.uploadcare.com/files/?${c}`;for(let f=0;f<e&&d;f+=1){const h=await fetch(d,{headers:a});if(!h.ok)return Promise.reject(new Error(`Failed to fetch files: ${h.statusText}`));const p=await h.json();let{results:g}=p;if(i==="image"&&(g=g.filter(m=>m.is_image)),n&&(g=g.filter(n)),u.push(...g),d=p.next,!d)break;await Nt(50)}return kL(u,{fieldConfig:o})},uY=async t=>SL(t),dY=async(t,e)=>{const n=t.toLowerCase();return SL(e,{filter:i=>i.original_filename.toLowerCase().includes(n)})},fY=async(t,e)=>{const n=new TextEncoder,r=n.encode(String(e)),i=n.encode(t),o=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),s=await crypto.subtle.sign("HMAC",o,r);return Array.from(new Uint8Array(s)).map(c=>c.toString(16).padStart(2,"0")).join("")},hY=async(t,e)=>{if(t.length===0)return[];const n=Hw();if(!n)return Promise.reject(new Error("Uploadcare public key is not configured"));const{fieldConfig:r,apiKey:i}=e;if(!i)return Promise.reject(new Error("Uploadcare secret key is not provided"));const o=Math.floor(Date.now()/1e3)+1800,s=await fY(i,o),a=new FormData;a.append("UPLOADCARE_PUB_KEY",n),a.append("UPLOADCARE_STORE","1"),a.append("signature",s),a.append("expire",String(o)),t.forEach(f=>{a.append(X_(f.name),f)});const c=await fetch("https://upload.uploadcare.com/base/",{method:"POST",body:a});if(!c.ok)throw new Error(`Failed to upload files: ${c.statusText}`);const u=await c.json(),d=Object.entries(u).filter(([f])=>!f.startsWith("UPLOADCARE_")).map(([f,h])=>{const p=t.find(v=>v.name===f),g=p?.type||"application/octet-stream",m=g.startsWith("image/");return{uuid:h,original_filename:f,original_file_url:`https://ucarecdn.com/${h}/${f}`,size:p?.size||0,mime_type:g,is_image:m,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return kL(d,{fieldConfig:r})},pY={serviceType:"cloud_storage",serviceId:"uploadcare",serviceLabel:"Uploadcare",serviceURL:"https://uploadcare.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://uploadcare.com/docs/",apiKeyURL:"https://app.uploadcare.com/projects/-/api-keys/",apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:cY,list:uY,search:dY,upload:hY},Kw={cloudinary:PW,uploadcare:pY},pS=["en-US,pt-BR,es-ES,ca-ES,de-DE,it-IT,fr-FR,sv-SE,id-ID,pl-PL,ja-JP,zh-TW,zh-CN,ko-KR,th-TH,nl-NL","hu-HU,vi-VN,cs-CZ,da-DK,fi-FI,uk-UA,el-GR,ro-RO,nb-NO,sk-SK,tr-TR,ru-RU"].join(",").split(","),EL="https://api.pexels.com/v1",TL={per_page:80},gY=()=>{const t=oe(qt).toLowerCase(),[e]=t.split("-");return pS.find(n=>n.toLowerCase()===t)??pS.find(n=>n.split("-")[0]===e)??"en-US"},$L=t=>t.map(({id:e,url:n,alt:r,src:{large2x:i,medium:o},photographer:s})=>({id:String(e),description:n.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??r,previewURL:o,downloadURL:i,fileName:`pexels-${s.split(/\s+/).join("-").toLowerCase()}-${e}.jpg`,kind:"image",credit:`<a href="${n}">Photo by ${s} on Pexels</a>`})),mY=async({apiKey:t})=>{const e={Authorization:t},n=new URLSearchParams(TL),r=await fetch(`${EL}/curated?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=(await r.json()).photos;return $L(i)},vY=async(t,{apiKey:e})=>{const n={Authorization:e},r=new URLSearchParams({...TL,query:t,locale:gY()}),i=[];for(let o=1;o<=2;o+=1){r.set("page",String(o));const s=await fetch(`${EL}/search?${r}`,{headers:n});if(!s.ok)return Promise.reject();const{photos:a,next_page:c}=await s.json();if(i.push(...a),!c)break;await Nt(50)}return $L(i)},bY={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,list:mY,search:vY},_Y="cs,da,de,en,es,fr,id,it,hu,nl,no,pl,pt,ro,sk,fi,sv,tr,vi,th,bg,ru,el,ja,ko,zh".split(","),CL="https://pixabay.com/api",AL={image_type:"photo",min_width:1280,safesearch:!0,per_page:150},PL=t=>t.map(({id:e,webformatURL:n,previewURL:r,largeImageURL:i,imageWidth:o,imageHeight:s,pageURL:a,tags:c,user:u})=>({id:String(e),description:c,previewURL:n.replace("_640.",o>s?"_180.":"_340."),downloadURL:i,fileName:r.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${a}">Photo by ${u} on Pixabay`})),LL=()=>{const[t]=oe(qt).toLowerCase().split("-");return _Y.includes(t)?t:"en"},yY=async({apiKey:t})=>{const e=new URLSearchParams({...AL,key:t,lang:LL(),editors_choice:String(!0)}),n=await fetch(`${CL}/?${e}`);if(!n.ok)return Promise.reject();const r=(await n.json()).hits;return PL(r)},wY=async(t,{apiKey:e})=>{const n=new URLSearchParams({...AL,key:e,lang:LL(),q:t}),r=await fetch(`${CL}/?${n}`);if(!r.ok)return Promise.reject();const i=(await r.json()).hits;return PL(i)},xY={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,list:yY,search:wY},gS=["af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj","fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr","ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm","sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu"].join(",").split(","),NL="https://api.unsplash.com",mS="utm_source=sveltia-cms&utm_medium=referral",OL={per_page:30},kY=()=>{const t=oe(qt).toLowerCase(),[e]=t.split("-");return gS.find(n=>n.toLowerCase()===t)??gS.find(n=>n.split("-")[0]===e)??"en"},IL=t=>t.map(({id:e,description:n,alt_description:r,urls:{regular:i,thumb:o},user:{username:s,name:a}})=>({id:String(e),description:[n,r].filter(Boolean).join(" — "),previewURL:o,downloadURL:i,fileName:`${a.split(/\s+/).join("-").toLowerCase()}-${e}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${s}?${mS}">${a}</a> on <a href="https://unsplash.com/?${mS}">Unsplash</a>`})),SY=async({apiKey:t})=>{const e={Authorization:`Client-ID ${t}`},n=new URLSearchParams(OL),r=await fetch(`${NL}/photos?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=await r.json();return IL(i)},EY=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},r=new URLSearchParams({...OL,query:t,lang:kY()}),i=[];for(let o=1;o<=5;o+=1){r.set("page",String(o));const s=await fetch(`${NL}/search/photos?${r}`,{headers:n});if(!s.ok)return Promise.reject();const{results:a,total_pages:c}=await s.json();if(i.push(...a),c===o)break;await Nt(50)}return IL(i)},TY={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,list:SY,search:EY},_p={pexels:bY,pixabay:xY,unsplash:TY},RL=({fieldConfig:t}={})=>{const e=mC({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(_p),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var $Y=j("<!> <!>",1),CY=j("<!> <!>",1),AY=j("<a> </a>"),PY=j("<!> <!>",1),LY=j("<!> <!> <!>",1),NY=j('<div role="none" class="filter-tools svelte-5b1zbe"><!></div>'),OY=j('<div role="none"> </div> <!>',1),IY=j('<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>'),RY=j("<!> <!>",1);const DY={hash:"svelte-5b1zbe",code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;}
|
|
615
|
+
Respond with JSON only:`,kG="anthropic",SG="Anthropic Claude",EG="Anthropic API",TG="https://docs.claude.com/en/api/overview",$G="https://platform.claude.com/settings/keys",CG=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,AG=async({sourceLanguage:t,targetLanguage:e})=>!!sa(t)&&!!sa(e),PG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=sa(e),o=sa(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.anthropic.com/v1/messages",a=hL(i,o),c=pL(t),u={model:"claude-haiku-4-5",max_tokens:4e3,temperature:.3,system:a,messages:[{role:"user",content:c}]};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in Anthropic API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}},LG={serviceId:kG,serviceLabel:SG,apiLabel:EG,developerURL:TG,apiKeyURL:$G,apiKeyPattern:CG,markdownSupported:!0,availability:AG,translate:PG},NG="google",OG="Google Cloud Translation",IG="Cloud Translation API",RG="https://console.cloud.google.com/apis/library/translate.googleapis.com",DG="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",MG=/AIza[0-9A-Za-z-_]{35}/,dS=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),bp=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(dS.includes(e))return e;const[n]=e.split("-");if(dS.includes(n))return n},FG=async({sourceLanguage:t,targetLanguage:e})=>!!bp(t)&&!!bp(e),zG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{if(e=bp(e)??"",n=bp(n)??"",!e)throw new Error("Source locale is not supported.");if(!n)throw new Error("Target locale is not supported.");const i="https://translation.googleapis.com/language/translate/v2",o={q:t,source:e,target:n,format:"html"};try{const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(o)});if(!s.ok){const c=await s.json().catch(()=>({}));throw new Error(`Google Translate API error: ${s.status} ${s.statusText}${c.error?.message?` - ${c.error.message}`:""}`)}const{data:a}=await s.json();return a.translations.map(c=>c.translatedText)}catch(s){throw s instanceof Error?s:new Error("Failed to translate text with Google Translate API.")}},gL={serviceId:NG,serviceLabel:OG,apiLabel:IG,developerURL:RG,apiKeyURL:DG,apiKeyPattern:MG,markdownSupported:!1,availability:FG,translate:zG},jG="openai",UG="OpenAI GPT",BG="OpenAI API",qG="https://platform.openai.com/docs/overview",VG="https://platform.openai.com/api-keys",HG=/sk-[a-zA-Z0-9-_]{40,}/,KG=async({sourceLanguage:t,targetLanguage:e})=>!!sa(t)&&!!sa(e),GG=async(t,{sourceLanguage:e,targetLanguage:n,apiKey:r})=>{const i=sa(e),o=sa(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.openai.com/v1/chat/completions",a=hL(i,o),c=pL(t),u={model:"gpt-4o-mini",messages:[{role:"system",content:a},{role:"user",content:c}],temperature:.3,max_tokens:4e3};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const g=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${g.error?.message?` - ${g.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!Array.isArray(p))throw new Error("Invalid JSON structure in OpenAI API response.");if(p.length!==t.length){const g=t.length,m=p.length;throw new Error(`Translation count mismatch: expected ${g}, got ${m}`)}return p}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}},WG={serviceId:jG,serviceLabel:UG,apiLabel:BG,developerURL:qG,apiKeyURL:VG,apiKeyPattern:HG,markdownSupported:!0,availability:KG,translate:GG},Bw={google:gL,anthropic:LG,openai:WG},Pg=un([ft],([t])=>{const{defaultTranslationService:e="google"}=t;return Bw[e]??gL}),mL=new vp({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});mL.keep(["span","div"]);const YG=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLanguage:s,targetLanguage:a,keyPath:c="",translate:u=!1}=e,d=i[s],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[a][h],m=mn({...f,keyPath:h}),v=m?.widget??"string";return c&&!h.startsWith(c)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&El(m).hasSubFields||!u&&p===g||!c&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},vd=(t,e,{count:n,sourceLanguage:r})=>{Pv.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLanguage:r})},JG=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=oe(Pg),{sourceLanguage:s,targetLanguage:a}=e,c=Object.keys(n).length,u=c===1?"one":"many",d=oe(ft).apiKeys?.[r]||await new Promise(f=>{Bu.set({show:!0,multiple:c>1,resolve:f})});if(d){vd("info","translation.started",{count:c,sourceLanguage:s});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?hy(h):h),{apiKey:d,sourceLanguage:s,targetLanguage:a});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[a][h]=p&&!i?mL.turndown(m):m}),vd("success",`translation.complete.${u}`,{count:c,sourceLanguage:s})}catch(f){vd("error","translation.error",{count:c,sourceLanguage:s}),console.error(f)}}},XG=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLanguage:r,targetLanguage:i}=e,o=Object.keys(n).length,s=o===1?"one":"many";Object.entries(n).forEach(([a,{value:c}])=>{t[i][a]=c}),vd("success",`copy.complete.${s}`,{count:o,sourceLanguage:r})},vL=async t=>{const{sourceLanguage:e,translate:n=!1}=t,r=oe(Je),{currentValues:i}=r,o=YG({draft:r,options:t}),s=Object.keys(o).length;if(!s){vd("info",`${n?"translation":"copy"}.none`,{count:s,sourceLanguage:e});return}n?await JG({currentValues:i,options:t,copingFieldMap:o}):XG({currentValues:i,options:t,copingFieldMap:o}),Je.update(a=>({...a,currentValues:i}))};function qw(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",o),r=()=>V(Pg,"$translator",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"keyPath",3,""),c=I(e,"translate",3,!1);const u=async({sourceLanguage:h,targetLanguage:p})=>!n()?.currentLocales[p]||!n().currentLocales[h]||!!a()&&!Un(n().currentValues[h])[a()]||!c()&&!!a()&&Un(n().currentValues[h])[a()]===Un(n().currentValues[p])[a()]||c()&&!await r()?.availability({sourceLanguage:h,targetLanguage:p});var d=X(),f=D(d);it(f,17,()=>e.otherLocales,dr,(h,p)=>{const g=b(()=>({sourceLanguage:l(p),targetLanguage:e.locale}));var m=X(),v=D(m);kn(v,()=>u(l(g)),null,(_,y)=>{{let w=b(()=>i()(c()?"translate_from_x":"copy_from_x",{values:{locale:po(l(p))}}));vt(_,{get label(){return l(w)},get disabled(){return l(y)},onclick:()=>{vL({...l(g),keyPath:a(),translate:c()})}})}}),S(h,m)}),S(t,d),ae(),s()}var ZG=j("<section><!></section>");const QG={hash:"svelte-wzztxu",code:"section.svelte-wzztxu {padding:var(--field-editor-padding);}section.svelte-wzztxu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-wzztxu > * {margin-inline:auto !important;max-width:768px;}section.svelte-wzztxu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-wzztxu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-wzztxu > header .required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function bL(t,e){Ee(t,QG);let n=I(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=ZG();bt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,void 0,"svelte-wzztxu");var o=F(i);Ue(o,()=>n()??qe),S(t,i)}function _L(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",o),r=()=>V(Pg,"$translator",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"size",3,"medium"),c=I(e,"keyPath",3,"");const u=b(()=>!n()?.currentLocales[e.locale]),d=async({sourceLanguage:m,targetLanguage:v})=>l(u)||!n()?.currentLocales[m]||!await r()?.availability({sourceLanguage:m,targetLanguage:v});var f=X(),h=D(f);{var p=m=>{const v=b(()=>{const[E]=e.otherLocales;return{otherLocale:E}}),_=b(()=>i()("translate_from_x",{values:{locale:po(l(v).otherLocale)??l(v).otherLocale}})),y=b(()=>({sourceLanguage:l(v).otherLocale,targetLanguage:e.locale}));var w=X(),x=D(w);kn(x,()=>d(l(y)),null,(E,$)=>{et(E,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(_)},get title(){return l(_)},get disabled(){return l($)},onclick:()=>{vL({...l(y),keyPath:c(),translate:!0})},startIcon:k=>{Ze(k,{name:"translate"})},$$slots:{startIcon:!0}})}),S(m,w)},g=m=>{{const v=w=>{Ze(w,{name:"translate"})},_=w=>{{let x=b(()=>i()("translation_options"));hr(w,{get"aria-label"(){return l(x)},children:(E,$)=>{qw(E,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})}};let y=b(()=>i()("translate"));Ur(m,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get disabled(){return l(u)},endIcon:v,popup:_,$$slots:{endIcon:!0,popup:!0}})}};q(h,m=>{e.otherLocales.length===1?m(p):m(g,!1)})}S(t,f),ae(),s()}var eW=j('<div role="alert" class="validation svelte-6wra4i" aria-live="polite"><div role="none" class="svelte-6wra4i"><!> <!></div></div>');const tW={hash:"svelte-6wra4i",code:".validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-6wra4i div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-6wra4i div:where(.svelte-6wra4i) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function Vw(t,e){Ee(t,tW);var n=eW(),r=F(n),i=F(r);Ze(i,{name:"error"});var o=z(i,2);Ue(o,()=>e.children),Z(()=>Te(n,"id",e.id)),S(t,n)}function nW(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1);zy(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(s){n(s)}}),ae()}var rW=j("<p> </p>");function iW(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",3,!1);var s=X(),a=D(s);{var c=u=>{var d=rW(),f=F(d);Z(h=>ne(f,h),[()=>n()(`boolean.${o()}`)]),S(u,d)};q(a,u=>{typeof o()=="boolean"&&u(c)})}S(t,s),ae(),i()}function oW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1),d=ie(""),f=ie("");const h=b(()=>st(e.fieldConfig.default_language,"")),p=b(()=>st(e.fieldConfig.allow_language_selection,!0)),g=b(()=>st(e.fieldConfig.output_code_only,!1)),m=b(()=>st(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=b(()=>Un(n()?.[o][e.locale])??{}),_=b(()=>`${e.keyPath}.${l(m).code}`),y=b(()=>`${e.keyPath}.${l(m).lang}`),w=()=>{if(l(g))typeof s()!="string"?K(d,""):l(d)!==s()&&K(d,s(),!0);else{const C=l(v)[l(_)],k=l(v)[l(y)]||l(h);typeof C!="string"?K(d,""):l(d)!==C&&K(d,C,!0),typeof k!="string"?K(f,""):l(f)!==k&&K(f,k,!0)}},x=()=>{l(g)?s()!==l(d)&&s(l(d)):n()&&(s({}),l(v)[l(_)]!==l(d)&&_t(Je,Se(n)[o][e.locale][l(_)]=l(d),Se(n)),l(v)[l(y)]!==l(f)&&_t(Je,Se(n)[o][e.locale][l(y)]=l(f),Se(n)))};Me(()=>{l(v),Se(()=>{w()})}),Me(()=>{l(d),l(f),Se(()=>{x()})});var E=X(),$=D(E);kn($,Nt,null,C=>{var k=X(),T=D(k);or(T,()=>JSON.stringify(e.fieldConfig),A=>{QV(A,{get showLanguageSwitcher(){return l(p)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(d)},set code(P){K(d,P,!0)},get lang(){return l(f)},set lang(P){K(f,P,!0)}})}),S(C,k)}),S(t,E),ae(),i()}var sW=j("<pre> </pre>");function aW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>st(e.fieldConfig.default_language,"")),s=b(()=>st(e.fieldConfig.output_code_only,!1)),a=b(()=>st(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=b(()=>Un(n()?.currentValues[e.locale])??{}),u=b(()=>`${e.keyPath}.${l(a).code}`),d=b(()=>`${e.keyPath}.${l(a).lang}`),f=b(()=>l(s)?e.currentValue:l(c)[l(u)]),h=b(()=>l(s)?l(o):l(c)[l(d)]);var p=X(),g=D(p);{var m=v=>{var _=sW(),y=F(_);Z(()=>{cn(_,1,hT(l(h)?`language-${l(h)}`:void 0)),ne(y,l(f))}),S(v,_)};q(g,v=>{l(f)&&v(m)})}S(t,p),ae(),i()}var lW=j(" <!>",1),cW=j('<span role="none" class="value svelte-1usff15"><!> <!></span>'),uW=j('<div role="none" class="svelte-1usff15"><input type="color" class="svelte-1usff15"/> <!> <!></div>');const dW={hash:"svelte-1usff15",code:"div.svelte-1usff15 {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) {display:flex;align-items:center;gap:8px;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.text-input {width:80px;min-width:0;}div.svelte-1usff15 .value:where(.svelte-1usff15) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-1usff15 {font-family:var(--sui-textbox-font-family);}"};function fW(t,e){const n=Vn();se(e,!0),Ee(t,dW);const r=()=>V(ue,"$_",i),[i,o]=me();let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1),d=ie(""),f=ie(255);const h=b(()=>st(e.fieldConfig.allowInput,!1)),p=b(()=>st(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:k,a:T="ff"}=s().match(m)?.groups??{};if(k&&l(d)!==k&&K(d,k,!0),k&&l(p)){const A=Number.parseInt(`0x${T}`,16);l(f)!==A&&K(f,A,!0)}},_=()=>{let k=g.test(l(d))?l(d):"";k&&l(p)&&(k+=l(f).toString(16).padStart(2,"0")),s()!==k&&s(k)};Me(()=>{s(),Se(()=>{v()})}),Me(()=>{l(d),l(f),Se(()=>{_()})});var y=uW(),w=F(y),x=z(w,2);{var E=k=>{var T=cW(),A=F(T);{var P=N=>{qn(N,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return c()},get required(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(d)},set value(M){K(d,M,!0)}})};q(A,N=>{l(h)&&N(P)})}var L=z(A,2);{var O=N=>{var M=lW(),U=D(M),H=z(U);{let G=b(()=>!l(d)),W=b(()=>r()("opacity"));C5(H,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(W)},get value(){return l(f)},set value(Y){K(f,Y,!0)}})}Z(G=>ne(U,`${G??""} `),[()=>r()("opacity")]),S(N,M)};q(L,N=>{l(p)&&N(O)})}S(k,T)};q(x,k=>{(l(h)||l(p))&&k(E)})}var $=z(x,2);{var C=k=>{{let T=b(()=>r()("clear")),A=b(()=>!l(d)),P=b(()=>`${n}-picker ${l(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return l(T)},get disabled(){return l(A)},get"aria-controls"(){return l(P)},onclick:()=>{K(d,""),K(f,255)}})}};q($,k=>{!c()&&!a()&&k(C)})}Z(()=>{Te(w,"id",`${n}-picker`),w.readOnly=c(),Te(w,"aria-invalid",u()),Te(w,"aria-readonly",c()),Te(w,"aria-required",a()),Te(w,"aria-labelledby",`${e.fieldId??""}-label`),Te(w,"aria-errormessage",`${e.fieldId??""}-error`)}),Lp(w,()=>l(d),k=>K(d,k)),S(t,y),ae(),o()}var hW=j('<p><span role="none" class="preview svelte-1pgn31g"><span role="none" class="color svelte-1pgn31g"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const pW={hash:"svelte-1pgn31g",code:".preview.svelte-1pgn31g {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-1pgn31g .color:where(.svelte-1pgn31g) {display:block;width:24px;height:24px;border-radius:24px;}"};function gW(t,e){se(e,!0),Ee(t,pW);const n=b(()=>st(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,o=b(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var s=X(),a=D(s);{var c=u=>{var d=hW(),f=F(d),h=F(f);let p;var g=z(h,2),m=F(g),v=z(g,2),_=F(v);Z(()=>{p=eo(h,"",p,{"background-color":e.currentValue}),ne(m,e.currentValue),ne(_,l(o))}),S(u,d)};q(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}S(t,s),ae()}function mW(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"currentValue",15),a=I(e,"required",3,!0),c=I(e,"readonly",3,!1),u=I(e,"invalid",3,!1);const d=b(()=>st(e.fieldConfig.value,"")),f=b(()=>n()?.isIndexFile??!1),h=b(()=>n()?.collectionName??""),p=b(()=>n()?.fileName),g=b(()=>Un(n()?.[o][e.locale])??{}),m=b(()=>tl(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},_=()=>{if(!Object.keys(l(g)).includes(e.keyPath))return;const y=l(d)==="{{index}}"?v()??"":l(d).replaceAll(/{{(.+?)}}/g,(w,x)=>{if(x==="index")return String(v()??"");if(!x.startsWith("fields."))return"";const E=iu({collectionName:l(h),fileName:l(p),valueMap:l(g),keyPath:x.replace(/^fields\./,""),locale:e.locale,isIndexFile:l(f)});return Array.isArray(E)?l(m).format(E):String(E)});s()!==y&&s(y)};Me(()=>{l(g),Se(()=>{_()})});{let y=b(()=>String(s()));qn(t,{get value(){return l(y)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}ae(),i()}var vW=j('<p dir="auto"> </p>');function bW(t,e){se(e,!0);var n=vW(),r=F(n);Z(i=>{Te(n,"lang",i),ne(r,e.currentValue),n.dir=n.dir},[()=>Ar(e.locale)]),S(t,n),ae()}var _W=j('<span role="none" class="utc svelte-boo8ot">UTC</span>'),yW=j('<div role="none" class="svelte-boo8ot"><input/> <!> <!> <!></div>');const wW={hash:"svelte-boo8ot",code:"div.svelte-boo8ot {display:flex;align-items:center;}.utc.svelte-boo8ot {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function xW(t,e){se(e,!0),Ee(t,wW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=ie("");const d=b(()=>da(e.fieldConfig)),f=b(()=>l(d).dateOnly),h=b(()=>l(d).timeOnly),p=b(()=>l(d).utc),g=()=>{const k=_M(o(),e.fieldConfig);k!==void 0&&k!==l(u)&&K(u,k,!0)},m=()=>{const k=O$(l(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Lc(k,e.fieldConfig))!==Number(Lc(o(),e.fieldConfig))&&o(k)};Me(()=>{o(),Se(()=>{g()})}),Me(()=>{l(u),Se(()=>{m()})});var v=yW(),_=F(v),y=z(_,2);{var w=k=>{var T=_W();S(k,T)};q(y,k=>{l(p)&&k(w)})}var x=z(y,2);{var E=k=>{{let T=b(()=>n()(l(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return l(T)},onclick:()=>{const A=N$(e.fieldConfig);K(u,l(p)?A.replace(/:00\.000Z$/,""):A,!0)}})}};q(x,k=>{a()||k(E)})}var $=z(x,2);{var C=k=>{{let T=b(()=>n()("clear")),A=b(()=>!o());et(k,{variant:"tertiary",get label(){return l(T)},get disabled(){return l(A)},onclick:()=>{o("")}})}};q($,k=>{!a()&&!s()&&k(C)})}Z(()=>{Te(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),Te(_,"aria-readonly",a()),Te(_,"aria-required",s()),Te(_,"aria-invalid",c()),Te(_,"aria-labelledby",`${e.fieldId??""}-label`),Te(_,"aria-errormessage",`${e.fieldId??""}-error`)}),Lp(_,()=>l(u),k=>K(u,k)),S(t,v),ae(),i()}var kW=j('<p dir="auto"> <!></p>');function SW(t,e){se(e,!0);const n=b(()=>I$({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=D(r);{var o=s=>{var a=kW(),c=F(a),u=z(c);{var d=f=>{var h=Fe("UTC");S(f,h)};q(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(f=>{Te(a,"lang",f),ne(c,`${l(n)??""} `),a.dir=a.dir},[()=>Ar(e.locale)]),S(s,a)};q(i,s=>{l(n)&&s(o)})}S(t,r),ae()}const fS="https://console.cloudinary.com",EW=["cloud_name","api_key","username","timestamp","signature","integration","use_saml","saml_iframe_support"],TW=["integration","inline_container","z_index","multiple","max_files","default_transformations","insert_caption","remove_header","folder","search","collection","asset","transformation","sandboxNotAllowedAttributes","theme"],n_=t=>{const e=oe(Ct);if(t??=e,t?.media_libraries?.cloudinary)return t.media_libraries.cloudinary;if(!t?.media_library)return;const n=t.media_library.name==="cloudinary",r=!t.media_library.name&&e?.media_library?.name==="cloudinary";if(n||r)return t.media_library},$W=t=>{const e=n_()??{config:{}},n=n_(t)??{config:{}};return{...e,...n,config:{...e.config,...n.config}}},CW=()=>{const{cloud_name:t,api_key:e}=n_()?.config??{};return{cloudName:t,apiKey:e}},AW=()=>{const{cloudName:t,apiKey:e}=CW();return!!(t&&e)},PW={serviceType:"cloud_storage",serviceId:"cloudinary",serviceLabel:"Cloudinary",serviceURL:"https://cloudinary.com/",showServiceLink:!0,hotlinking:!0,authType:"widget",developerURL:"https://cloudinary.com/documentation/",apiKeyURL:"https://console.cloudinary.com/settings/api-keys",apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:AW};var LW=j('<!> <div role="none"> </div>',1),NW=j('<iframe allow="camera; storage-access" class="svelte-p06t0o"></iframe> <!>',1);const OW={hash:"svelte-p06t0o",code:"iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}"};function IW(t,e){se(e,!0),Ee(t,OW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"multiple",3,!1),s=I(e,"hidden",3,!1);const a=b(()=>$W(e.fieldConfig)??{});let c="",u=ie(!1),d=ie(!1),f=ie(void 0);const h=()=>{if(!l(f))return;c=window.crypto.randomUUID();const x=new URLSearchParams({...Object.fromEntries(Object.entries(l(a).config??{}).filter(([E])=>EW.includes(E))),ml_id:c,pmHost:window.location.origin,new_cms:"true",remove_header:"true"});l(f).src=`https://console.cloudinary.com/console/media_library/cms?${x}`},p=()=>{const x={...Object.fromEntries(Object.entries(l(a).config??{}).filter(([$])=>TW.includes($))),multiple:o(),max_files:e.fieldConfig?.max??l(a).config?.max_files??20,folder:{path:l(a).config?.folder?.path??"",resource_type:e.kind??"raw"}},E={type:"ML_WIDGET_SHOW",data:{mlId:c,config:x}};console.debug("Cloudinary Panel sending message:",E),l(f)?.contentWindow?.postMessage(JSON.stringify(E),fS)},g=({assets:x})=>{const{output_filename_only:E=!1,use_transformations:$=!0}=l(a),C=x.map(k=>{const T=k.secure_url;return E?{url:T.split("/").pop()}:$?{url:k.derived?.[0]?.secure_url??T}:{url:T}});e.onSelect(C)},m=({origin:x,data:E})=>{if(x===fS){if(typeof E=="string")try{E=JSON.parse(E)}catch{return}Bt(E)&&(console.debug("Cloudinary Panel received message:",E),E.type==="login"&&E.consoleDomain&&K(u,!0),E.type==="consoleLoaded"&&K(d,!0),E.type==="ML_WIDGET_INSERT_DATA"&&g(E.data))}};Ut(()=>(h(),window.addEventListener("message",m),()=>{window.removeEventListener("message",m)})),Me(()=>{l(a)&&l(d)&&p()});var v=NW(),_=D(v);xt(_,x=>K(f,x),()=>l(f));var y=z(_,2);{var w=x=>{nr(x,{children:(E,$)=>{var C=LW(),k=D(C);{let P=b(()=>n()("cloud_storage.cloudinary.activate.button_label"));et(k,{variant:"primary",get label(){return l(P)},onclick:async()=>{window.open("https://console.cloudinary.com/console/media_library/cms_login?cms=true")}})}var T=z(k,2),A=F(T);Z(P=>ne(A,P),[()=>n()("cloud_storage.cloudinary.activate.description")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{l(u)||x(w)})}Z(x=>{Te(_,"title",x),Te(_,"hidden",s()||!l(u))},[()=>n()("cloud_storage.cloudinary.iframe_title")]),S(t,v),ae(),i()}var RW=j('<span role="none" class="icon check-background"><!></span>'),DW=j('<div role="none"><!></div>');const MW={hash:"svelte-1fitgoo",code:".wrapper.svelte-1fitgoo {display:contents;}.wrapper.svelte-1fitgoo [role=option] {position:relative;}.wrapper.svelte-1fitgoo [role=option] > .icon.check {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);}.wrapper.svelte-1fitgoo [role=option][aria-selected=false] .check-background .icon {display:none;}.wrapper.svelte-1fitgoo [role=option][aria-selected=true] .check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}.wrapper.svelte-1fitgoo [role=option] .check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;}.wrapper.svelte-1fitgoo [role=option] .check-background .icon {color:inherit !important;font-size:20px;}.wrapper.grid.svelte-1fitgoo .check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.wrapper.list.svelte-1fitgoo .check-background {margin-inline-start:16px;}"};function yL(t,e){Ee(t,MW);let n=I(e,"viewType",3,"grid");var r=DW(),i=F(r);Tr(i,{label:"",get value(){return e.value},get selected(){return e.selected},get onChange(){return e.onChange},startIcon:s=>{var a=X(),c=D(a);{var u=d=>{var f=RW(),h=F(f);Ze(h,{name:"check",class:"icon check"}),S(d,f)};q(c,d=>{e.multiple&&d(u)})}S(s,a)},children:(s,a)=>{var c=X(),u=D(c);Ue(u,()=>e.children??qe),S(s,c)},$$slots:{startIcon:!0,default:!0}}),Z(()=>cn(r,1,`wrapper ${n()??""}`,"svelte-1fitgoo")),S(t,r)}var FW=j('<div role="none"><!></div>');const zW={hash:"svelte-umbokg",code:".wrapper.svelte-umbokg {display:contents;}.wrapper.svelte-umbokg .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-umbokg .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-umbokg .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-umbokg .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-umbokg .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-umbokg .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-umbokg .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-umbokg .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-umbokg .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-umbokg .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-umbokg :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;inset-inline-start:-99999px;}.wrapper.svelte-umbokg .listbox.list .option button {gap:16px;}.wrapper.svelte-umbokg .listbox.list .option button .preview {width:64px;}.wrapper.svelte-umbokg .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-umbokg .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function wL(t,e){se(e,!0),Ee(t,zW);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"viewType",3,"grid"),s=I(e,"gridId",3,void 0),a=I(e,"multiple",3,!1),c=I(e,"showTitle",3,!1),u=I(e,"onChange",3,void 0),d=I(e,"children",3,void 0);var f=FW();let h;var p=F(f);{let g=b(()=>n()("assets_dialog.available_images"));uu(p,{get id(){return s()},get class(){return o()},get multiple(){return a()},get"aria-label"(){return l(g)},onChange:m=>{u()?.(m.detail)},children:(m,v)=>{var _=X(),y=D(_);Ue(y,()=>d()??qe),S(m,_)},$$slots:{default:!0}})}Z(()=>h=cn(f,1,"wrapper svelte-umbokg",null,h,{"show-title":c()})),S(t,f),ae(),i()}var jW=j('<span role="none" class="name"> </span>'),UW=j("<!> <!>",1),BW=j('<span role="alert"> </span>'),qW=j('<span role="alert"> </span>'),VW=j('<span role="alert"> </span>'),HW=j('<div role="none" class="input-outer svelte-mqll9n"><!></div>'),KW=j('<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>',1),GW=j('<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>',1),WW=j('<span role="alert"> </span>'),YW=j("<!> <!>",1),JW=j("<!> <!>",1);const XW={hash:"svelte-mqll9n",code:"p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}"};function ZW(t,e){se(e,!0),Ee(t,XW);const n=()=>V(Sc,"$selectAssetsView",s),r=()=>V(ft,"$prefs",s),i=()=>V(vn,"$isSmallScreen",s),o=()=>V(ue,"$_",s),[s,a]=me(),c=fe=>{wL(fe,{get viewType(){return l(L)},get gridId(){return p()},get multiple(){return f()},children:(_e,Ce)=>{{const ze=(Ae,$e=qe)=>{var je=X(),Le=D(je);kn(Le,Nt,null,Ie=>{const Re=b(()=>{const{id:nt,previewURL:Ge,description:ut,kind:Oe}=$e();return{id:nt,previewURL:Ge,description:ut,_kind:Oe}});{let nt=b(()=>he($e()));yL(Ie,{get value(){return l(Re).id},get viewType(){return l(L)},get multiple(){return f()},get selected(){return l(nt)},onChange:({detail:{selected:Ge}})=>{pe($e(),Ge)},children:(Ge,ut)=>{var Oe=UW(),be=D(Oe);Ho(be,{get kind(){return l(Re)._kind},get src(){return l(Re).previewURL},variant:"tile",crossorigin:"anonymous"});var ye=z(be,2);{var tt=Ve=>{var Qe=jW(),Xe=F(Qe);Z(()=>ne(Xe,l(Re).description)),S(Ve,Qe)};q(ye,Ve=>{(!i()||l(L)==="list")&&Ve(tt)})}S(Ge,Oe)},$$slots:{default:!0}})}}),S(Ae,je)};let Ne=b(()=>l(Y)??[]);Cl(_e,{get items(){return l(Ne)},itemKey:"id",renderItem:ze,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})};let u=I(e,"kind",3,"image"),d=I(e,"fieldConfig",3,void 0),f=I(e,"multiple",3,!1),h=I(e,"searchTerms",3,""),p=I(e,"gridId",3,void 0),g=I(e,"selectedResources",31,()=>St([]));const m=b(()=>st(e.serviceProps.serviceType,"stock_assets")),v=b(()=>st(e.serviceProps.serviceId,"")),_=b(()=>st(e.serviceProps.serviceLabel,"")),y=b(()=>st(e.serviceProps.hotlinking,!1)),w=b(()=>st(e.serviceProps.authType,"api_key")),x=b(()=>st(e.serviceProps.developerURL,"")),E=b(()=>st(e.serviceProps.apiKeyURL,"")),$=b(()=>e.serviceProps.apiKeyPattern),C=b(()=>e.serviceProps.init),k=b(()=>e.serviceProps.signIn),T=b(()=>e.serviceProps.list),A=b(()=>e.serviceProps.search),P=b(()=>e.serviceProps.upload),L=b(()=>n()?.type),O=St({userName:"",password:""});let N=ie(!0),M=ie(!1),U=ie(""),H=ie(""),G=ie(""),W=ie("initial"),Y=ie(null),R=ie(void 0),B=ie(St({show:!1,status:"info",length:0}));const J=b(()=>({kind:u(),fieldConfig:d(),apiKey:l(U),userName:l(H),password:l(G)}));let Q=0;const ee=async(fe="")=>{K(Y,null),fe=fe.trim();try{K(Y,await(fe?l(A)?.(fe,l(J)):l(T)?.(l(J)))??[],!0)}catch(_e){K(R,"search_fetch_failed"),console.error(_e)}},te=async fe=>{if(l(P)){K(B,{show:!0,status:"info",length:fe.length},!0);try{await l(P)(fe,l(J)),ee()}catch{K(B,{show:!0,status:"error",length:fe.length},!0)}}},re=async fe=>{const{downloadURL:_e,fileName:Ce,credit:ze}=fe;if(l(y))return{url:_e,credit:ze};try{const Ne=await fetch(_e),{ok:Ae,status:$e}=Ne;if(!Ae)throw new Error(`The response returned with HTTP status ${$e}.`);const je=await Ne.blob(),Le=new File([je],Ce,{type:je.type});return{url:_e,credit:ze,file:Le}}catch(Ne){K(R,"image_fetch_failed"),console.error(Ne)}},he=fe=>g().some(_e=>_e.url===fe.downloadURL),pe=async(fe,_e)=>{const Ce=g().filter(ze=>ze.url!==fe.downloadURL);if(_e){const ze=await re(fe);ze&&g([...Ce,ze])}else g(Ce)};Ut(()=>{(async()=>(typeof l(C)=="function"&&(K(N,!1),K(N,await l(C)(),!0)),l(N)&&(K(U,r().apiKeys?.[l(v)]??"",!0),(fe=>{var _e=ji(fe,2);K(H,_e[0],!0),K(G,_e[1],!0)})((r().logins?.[l(v)]??"").split(" ")),K(M,!!l(U)||!!l(G),!0),K(Y,null))))()}),Me(()=>{h(),l(M),Se(()=>{window.clearTimeout(Q),Q=window.setTimeout(()=>{l(M)&&ee(h())},1e3)})});var ce={uploadFiles:te},ge=JW(),Pe=D(ge);{var xe=fe=>{var _e=X(),Ce=D(_e);{var ze=Ae=>{nr(Ae,{children:($e,je)=>{var Le=BW(),Ie=F(Le);Z(Re=>ne(Ie,Re),[()=>o()(`assets_dialog.error.${l(R)}`)]),S($e,Le)},$$slots:{default:!0}})},Ne=Ae=>{var $e=X(),je=D($e);{var Le=Re=>{nr(Re,{children:(nt,Ge)=>{var ut=qW(),Oe=F(ut);Z(be=>ne(Oe,be),[()=>o()("searching")]),S(nt,ut)},$$slots:{default:!0}})},Ie=Re=>{var nt=X(),Ge=D(nt);{var ut=be=>{nr(be,{children:(ye,tt)=>{var Ve=VW(),Qe=F(Ve);Z(Xe=>ne(Qe,Xe),[()=>o()("no_files_found")]),S(ye,Ve)},$$slots:{default:!0}})},Oe=be=>{var ye=X(),tt=D(ye);{var Ve=Xe=>{{let ht=b(()=>d()?.accept);ku(Xe,{get accept(){return l(ht)},get multiple(){return f()},onDrop:({files:Pt})=>te(Pt),children:(Pt,Qt)=>{c(Pt)},$$slots:{default:!0}})}},Qe=Xe=>{c(Xe)};q(tt,Xe=>{l(P)?Xe(Ve):Xe(Qe,!1)},!0)}S(be,ye)};q(Ge,be=>{l(Y).length?be(Oe,!1):be(ut)},!0)}S(Re,nt)};q(je,Re=>{l(Y)?Re(Ie,!1):Re(Le)},!0)}S(Ae,$e)};q(Ce,Ae=>{l(R)?Ae(ze):Ae(Ne,!1)})}S(fe,_e)},de=fe=>{var _e=X(),Ce=D(_e);{var ze=Ae=>{nr(Ae,{children:($e,je)=>{var Le=GW(),Ie=D(Le),Re=F(Ie);{var nt=Ve=>{var Qe=X(),Xe=D(Qe);cr(Xe,()=>jr.sanitize(o()("prefs.media.stock_photos.description",{values:{service:l(_),homeHref:`href="${l(x)}"`,apiKeyHref:`href="${l(E)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(Ve,Qe)};q(Re,Ve=>{l(m)==="stock_assets"&&Ve(nt)})}var Ge=z(Re,2);{var ut=Ve=>{var Qe=X(),Xe=D(Qe);cr(Xe,()=>jr.sanitize(o()(`cloud_storage.${l(v)}.auth.${l(W)}`,{default:o()(`cloud_storage.auth.${l(w)}.${l(W)}`,{values:{service:l(_)}})}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(Ve,Qe)};q(Ge,Ve=>{l(m)==="cloud_storage"&&Ve(ut)})}var Oe=z(Ie,2);{var be=Ve=>{var Qe=HW(),Xe=F(Qe);{let ht=b(()=>o()("prefs.media.stock_photos.field_label",{values:{service:l(_)}}));qn(Xe,{flex:!0,monospace:!0,spellcheck:"false",get"aria-label"(){return l(ht)},oninput:Pt=>{const Qt=Pt.target.value.trim();l($)?.test(Qt)&&(K(U,Qt,!0),K(M,!0),_t(ft,Se(r).apiKeys??={},Se(r)),_t(ft,Se(r).apiKeys[l(v)]=l(U),Se(r)),ee())}})}S(Ve,Qe)};q(Oe,Ve=>{l(w)==="api_key"&&Ve(be)})}var ye=z(Oe,2);{var tt=Ve=>{var Qe=KW(),Xe=D(Qe),ht=F(Xe);{let kt=b(()=>o()("user_name")),tn=b(()=>l(W)==="requested");qn(ht,{flex:!0,spellcheck:"false",get"aria-label"(){return l(kt)},get disabled(){return l(tn)},get value(){return O.userName},set value($n){O.userName=$n}})}var Pt=z(Xe,2),Qt=F(Pt);{let kt=b(()=>o()("password")),tn=b(()=>l(W)==="requested");gp(Qt,{get"aria-label"(){return l(kt)},get disabled(){return l(tn)},get value(){return O.password},set value($n){O.password=$n}})}var en=z(Pt,2),pt=F(en);{let kt=b(()=>o()("sign_in")),tn=b(()=>!O.userName||!O.password||l(W)==="requested");et(pt,{variant:"secondary",get label(){return l(kt)},get disabled(){return l(tn)},onclick:async()=>{K(W,"requested"),O.userName=O.userName.trim(),O.password=O.password.trim(),await l(k)?.(O.userName,O.password)?(K(W,"success"),K(H,O.userName,!0),K(G,O.password,!0),K(M,!0),_t(ft,Se(r).logins??={},Se(r)),_t(ft,Se(r).logins[l(v)]=[l(H),l(G)].join(" "),Se(r)),ee()):K(W,"error")}})}S(Ve,Qe)};q(ye,Ve=>{l(w)==="password"&&Ve(tt)})}S($e,Le)},$$slots:{default:!0}})},Ne=Ae=>{nr(Ae,{children:($e,je)=>{var Le=WW(),Ie=F(Le);Z(Re=>ne(Ie,Re),[()=>o()("cloud_storage.invalid")]),S($e,Le)},$$slots:{default:!0}})};q(Ce,Ae=>{l(N)?Ae(ze):Ae(Ne,!1)},!0)}S(fe,_e)};q(Pe,fe=>{l(M)?fe(xe):fe(de,!1)})}var we=z(Pe,2);Yn(we,{get show(){return l(B).show},set show(fe){l(B).show=fe},children:(fe,_e)=>{Mn(fe,{get status(){return l(B).status},children:(Ce,ze)=>{var Ne=YW(),Ae=D(Ne);{var $e=Ie=>{var Re=Fe();Z(nt=>ne(Re,nt),[()=>o()(l(B).length===1?"uploading_file_progress":"uploading_files_progress",{values:{count:l(B).length}})]),S(Ie,Re)};q(Ae,Ie=>{l(B).status==="info"&&Ie($e)})}var je=z(Ae,2);{var Le=Ie=>{var Re=Fe();Z(nt=>ne(Re,nt),[()=>o()(l(B).length===1?"uploading_file_failed":"uploading_files_failed",{values:{count:l(B).length}})]),S(Ie,Re)};q(je,Ie=>{l(B).status==="error"&&Ie(Le)})}S(Ce,Ne)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,ge);var ve=ae(ce);return a(),ve}const Af=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),nc=({value:t,terms:e})=>Af(t).includes(e),hS=(t,e=qe)=>{var n=X(),r=D(n);cr(r,()=>jr.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),S(t,n)};var QW=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),eY=j('<strong class="svelte-1ong0f1"><!></strong>'),tY=j("<!>/",1),nY=j('<div role="none" class="unsaved svelte-1ong0f1"> </div>'),rY=j('<span role="none" class="name svelte-1ong0f1"><!> <!></span>'),iY=j("<!> <!> <!>",1),oY=j('<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>'),sY=j('<span role="none"> </span>');const aY={hash:"svelte-1ong0f1",code:".grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;}.grid-wrapper.svelte-1ong0f1 [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-1ong0f1 [role=listbox].grid .unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}.grid-wrapper.svelte-1ong0f1 [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-1ong0f1 {color:var(--sui-tertiary-foreground-color);}.name.svelte-1ong0f1 strong:where(.svelte-1ong0f1) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function xL(t,e){se(e,!0),Ee(t,aY);const n=()=>V(ue,"$_",i),r=()=>V(vn,"$isSmallScreen",i),[i,o]=me();let s=I(e,"multiple",3,!1),a=I(e,"assets",19,()=>[]),c=I(e,"viewType",3,"grid"),u=I(e,"searchTerms",3,""),d=I(e,"basePath",3,void 0),f=I(e,"gridId",3,void 0),h=I(e,"checkerboard",3,!1),p=I(e,"selectedResources",31,()=>St([])),g=I(e,"onSelect",3,void 0);const m=b(()=>u()?a().filter(({name:$})=>Af($).includes(u())):a()),v=$=>p().some(C=>pn(C.asset,$)),_=($,C)=>{const k=p().filter(T=>!pn(T.asset,$));C?(p([...k,{asset:$}]),g()?.({asset:$})):p(k)};var y=X(),w=D(y);{var x=$=>{var C=oY(),k=F(C);wL(k,{get multiple(){return s()},get gridId(){return f()},get viewType(){return c()},showTitle:!0,children:(T,A)=>{Cl(T,{get items(){return l(m)},itemKey:"path",renderItem:(L,O=qe)=>{var N=X(),M=D(N);kn(M,Nt,null,U=>{const H=b(()=>{const{kind:Y,name:R,path:B,unsaved:J,folder:Q}=O();return{kind:Y,name:R,path:B,unsaved:J,folder:Q}}),G=b(()=>d()&&!l(H).folder.entryRelative?an(l(H).path.replace(d(),"")):l(H).name),W=b(()=>l(G).split("/"));{let Y=b(()=>v(O()));yL(U,{get value(){return l(H).path},get viewType(){return c()},get multiple(){return s()},get selected(){return l(Y)},onChange:({detail:{selected:R}})=>{_(O(),R)},children:(R,B)=>{var J=iY(),Q=D(J);{var ee=pe=>{var ce=QW(),ge=F(ce);Z(Pe=>ne(ge,Pe),[()=>n()("assets_dialog.unsaved")]),S(pe,ce)};q(Q,pe=>{c()==="grid"&&l(H).unsaved&&pe(ee)})}var te=z(Q,2);Ho(te,{get kind(){return l(H).kind},get asset(){return O()},variant:"tile",get checkerboard(){return h()}});var re=z(te,2);{var he=pe=>{var ce=rY(),ge=F(ce);Pr(ge,{lines:2,children:(de,we)=>{var ve=X(),fe=D(ve);it(fe,17,()=>l(W),dr,(_e,Ce,ze)=>{var Ne=X(),Ae=D(Ne);{var $e=Le=>{var Ie=eY(),Re=F(Ie);hS(Re,()=>l(Ce)),S(Le,Ie)},je=Le=>{var Ie=tY(),Re=D(Ie);hS(Re,()=>l(Ce)),S(Le,Ie)};q(Ae,Le=>{ze===l(W).length-1?Le($e):Le(je,!1)})}S(_e,Ne)}),S(de,ve)},$$slots:{default:!0}});var Pe=z(ge,2);{var xe=de=>{var we=nY(),ve=F(we);Z(fe=>ne(ve,fe),[()=>n()("assets_dialog.unsaved")]),S(de,we)};q(Pe,de=>{c()==="list"&&l(H).unsaved&&de(xe)})}S(pe,ce)};q(re,pe=>{(!r()||c()==="list")&&pe(he)})}S(R,J)},$$slots:{default:!0}})}}),S(L,N)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),S($,C)},E=$=>{nr($,{children:(C,k)=>{var T=sY(),A=F(T);Z(P=>ne(A,P),[()=>n()("no_files_found")]),S(C,T)},$$slots:{default:!0}})};q(w,$=>{l(m).length?$(x):$(E,!1)})}S(t,y),ae(),o()}function lY(t,e){se(e,!0);const n=()=>V(Sc,"$selectAssetsView",r),[r,i]=me();let o=I(e,"multiple",3,!1),s=I(e,"accept",3,void 0),a=I(e,"assets",19,()=>[]),c=I(e,"searchTerms",3,""),u=I(e,"basePath",3,void 0),d=I(e,"selectedResources",31,()=>St([])),f=ie(void 0);Me(()=>{d().length||Se(()=>{l(f)?.reset()})}),xt(ku(t,{get multiple(){return o()},get accept(){return s()},get onDrop(){return e.onDrop},children:(h,p)=>{{let g=b(()=>n()?.type);xL(h,{get multiple(){return o()},get assets(){return a()},get viewType(){return l(g)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResources(){return d()},set selectedResources(m){d(m)}})}},$$slots:{default:!0}}),h=>K(f,h,!0),()=>l(f)),ae(),i()}const r_=(t=oe(Ct))=>t?.media_libraries?.uploadcare??(t?.media_library?.name==="uploadcare"?t?.media_library:void 0),Hw=()=>r_()?.config?.publicKey,cY=()=>!!Hw(),kL=(t,{fieldConfig:e}={})=>{const{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=r_(e)??r_()??{};return t.map(o=>{const{uuid:s,original_filename:a,original_file_url:c,mime_type:u,datetime_uploaded:d,size:f}=o,h=`${new URL(i??c).origin}/${s}/`;return{id:s,description:a,previewURL:`${h}-/preview/400x400/`,downloadURL:`${h}${r?`-${r}`:""}${n?a:""}`,fileName:a,lastModified:new Date(d),size:f,kind:u.startsWith("image/")?"image":u.startsWith("video/")?"video":"other"}})},SL=async(t,{maxPages:e=10,filter:n}={})=>{const r=Hw();if(!r)return Promise.reject(new Error("Uploadcare public key is not configured"));const{kind:i,fieldConfig:o,apiKey:s}=t,a={Accept:"application/vnd.uploadcare-v0.7+json",Authorization:`Uploadcare.Simple ${r}:${s}`},c=new URLSearchParams({limit:"100",ordering:"-datetime_uploaded",stored:"true"}),u=[];let d=`https://api.uploadcare.com/files/?${c}`;for(let f=0;f<e&&d;f+=1){const h=await fetch(d,{headers:a});if(!h.ok)return Promise.reject(new Error(`Failed to fetch files: ${h.statusText}`));const p=await h.json();let{results:g}=p;if(i==="image"&&(g=g.filter(m=>m.is_image)),n&&(g=g.filter(n)),u.push(...g),d=p.next,!d)break;await Nt(50)}return kL(u,{fieldConfig:o})},uY=async t=>SL(t),dY=async(t,e)=>{const n=t.toLowerCase();return SL(e,{filter:i=>i.original_filename.toLowerCase().includes(n)})},fY=async(t,e)=>{const n=new TextEncoder,r=n.encode(String(e)),i=n.encode(t),o=await crypto.subtle.importKey("raw",i,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),s=await crypto.subtle.sign("HMAC",o,r);return Array.from(new Uint8Array(s)).map(c=>c.toString(16).padStart(2,"0")).join("")},hY=async(t,e)=>{if(t.length===0)return[];const n=Hw();if(!n)return Promise.reject(new Error("Uploadcare public key is not configured"));const{fieldConfig:r,apiKey:i}=e;if(!i)return Promise.reject(new Error("Uploadcare secret key is not provided"));const o=Math.floor(Date.now()/1e3)+1800,s=await fY(i,o),a=new FormData;a.append("UPLOADCARE_PUB_KEY",n),a.append("UPLOADCARE_STORE","1"),a.append("signature",s),a.append("expire",String(o)),t.forEach(f=>{a.append(X_(f.name),f)});const c=await fetch("https://upload.uploadcare.com/base/",{method:"POST",body:a});if(!c.ok)throw new Error(`Failed to upload files: ${c.statusText}`);const u=await c.json(),d=Object.entries(u).filter(([f])=>!f.startsWith("UPLOADCARE_")).map(([f,h])=>{const p=t.find(v=>v.name===f),g=p?.type||"application/octet-stream",m=g.startsWith("image/");return{uuid:h,original_filename:f,original_file_url:`https://ucarecdn.com/${h}/${f}`,size:p?.size||0,mime_type:g,is_image:m,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return kL(d,{fieldConfig:r})},pY={serviceType:"cloud_storage",serviceId:"uploadcare",serviceLabel:"Uploadcare",serviceURL:"https://uploadcare.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://uploadcare.com/docs/",apiKeyURL:"https://app.uploadcare.com/projects/-/api-keys/",apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:cY,list:uY,search:dY,upload:hY},Kw={cloudinary:PW,uploadcare:pY},pS=["en-US,pt-BR,es-ES,ca-ES,de-DE,it-IT,fr-FR,sv-SE,id-ID,pl-PL,ja-JP,zh-TW,zh-CN,ko-KR,th-TH,nl-NL","hu-HU,vi-VN,cs-CZ,da-DK,fi-FI,uk-UA,el-GR,ro-RO,nb-NO,sk-SK,tr-TR,ru-RU"].join(",").split(","),EL="https://api.pexels.com/v1",TL={per_page:80},gY=()=>{const t=oe(qt).toLowerCase(),[e]=t.split("-");return pS.find(n=>n.toLowerCase()===t)??pS.find(n=>n.split("-")[0]===e)??"en-US"},$L=t=>t.map(({id:e,url:n,alt:r,src:{large2x:i,medium:o},photographer:s})=>({id:String(e),description:n.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??r,previewURL:o,downloadURL:i,fileName:`pexels-${s.split(/\s+/).join("-").toLowerCase()}-${e}.jpg`,kind:"image",credit:`<a href="${n}">Photo by ${s} on Pexels</a>`})),mY=async({apiKey:t})=>{const e={Authorization:t},n=new URLSearchParams(TL),r=await fetch(`${EL}/curated?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=(await r.json()).photos;return $L(i)},vY=async(t,{apiKey:e})=>{const n={Authorization:e},r=new URLSearchParams({...TL,query:t,locale:gY()}),i=[];for(let o=1;o<=2;o+=1){r.set("page",String(o));const s=await fetch(`${EL}/search?${r}`,{headers:n});if(!s.ok)return Promise.reject();const{photos:a,next_page:c}=await s.json();if(i.push(...a),!c)break;await Nt(50)}return $L(i)},bY={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,list:mY,search:vY},_Y="cs,da,de,en,es,fr,id,it,hu,nl,no,pl,pt,ro,sk,fi,sv,tr,vi,th,bg,ru,el,ja,ko,zh".split(","),CL="https://pixabay.com/api",AL={image_type:"photo",min_width:1280,safesearch:!0,per_page:150},PL=t=>t.map(({id:e,webformatURL:n,previewURL:r,largeImageURL:i,imageWidth:o,imageHeight:s,pageURL:a,tags:c,user:u})=>({id:String(e),description:c,previewURL:n.replace("_640.",o>s?"_180.":"_340."),downloadURL:i,fileName:r.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${a}">Photo by ${u} on Pixabay`})),LL=()=>{const[t]=oe(qt).toLowerCase().split("-");return _Y.includes(t)?t:"en"},yY=async({apiKey:t})=>{const e=new URLSearchParams({...AL,key:t,lang:LL(),editors_choice:String(!0)}),n=await fetch(`${CL}/?${e}`);if(!n.ok)return Promise.reject();const r=(await n.json()).hits;return PL(r)},wY=async(t,{apiKey:e})=>{const n=new URLSearchParams({...AL,key:e,lang:LL(),q:t}),r=await fetch(`${CL}/?${n}`);if(!r.ok)return Promise.reject();const i=(await r.json()).hits;return PL(i)},xY={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,list:yY,search:wY},gS=["af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj","fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr","ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm","sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu"].join(",").split(","),NL="https://api.unsplash.com",mS="utm_source=sveltia-cms&utm_medium=referral",OL={per_page:30},kY=()=>{const t=oe(qt).toLowerCase(),[e]=t.split("-");return gS.find(n=>n.toLowerCase()===t)??gS.find(n=>n.split("-")[0]===e)??"en"},IL=t=>t.map(({id:e,description:n,alt_description:r,urls:{regular:i,thumb:o},user:{username:s,name:a}})=>({id:String(e),description:[n,r].filter(Boolean).join(" — "),previewURL:o,downloadURL:i,fileName:`${a.split(/\s+/).join("-").toLowerCase()}-${e}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${s}?${mS}">${a}</a> on <a href="https://unsplash.com/?${mS}">Unsplash</a>`})),SY=async({apiKey:t})=>{const e={Authorization:`Client-ID ${t}`},n=new URLSearchParams(OL),r=await fetch(`${NL}/photos?${n}`,{headers:e});if(!r.ok)return Promise.reject();const i=await r.json();return IL(i)},EY=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},r=new URLSearchParams({...OL,query:t,lang:kY()}),i=[];for(let o=1;o<=5;o+=1){r.set("page",String(o));const s=await fetch(`${NL}/search/photos?${r}`,{headers:n});if(!s.ok)return Promise.reject();const{results:a,total_pages:c}=await s.json();if(i.push(...a),c===o)break;await Nt(50)}return IL(i)},TY={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,list:SY,search:EY},_p={pexels:bY,pixabay:xY,unsplash:TY},RL=({fieldConfig:t}={})=>{const e=mC({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(_p),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var $Y=j("<!> <!>",1),CY=j("<!> <!>",1),AY=j("<a> </a>"),PY=j("<!> <!>",1),LY=j("<!> <!> <!>",1),NY=j('<div role="none" class="filter-tools svelte-5b1zbe"><!></div>'),OY=j('<div role="none"> </div> <!>',1),IY=j('<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>'),RY=j("<!> <!>",1);const DY={hash:"svelte-5b1zbe",code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;}
|
|
616
616
|
@media (width < 768px) {.wrapper.svelte-5b1zbe {flex-direction:column;overflow:hidden;height:72dvh;}
|
|
617
617
|
}.wrapper.svelte-5b1zbe .nav:where(.svelte-5b1zbe) {display:flex;gap:4px;}
|
|
618
618
|
@media (width < 768px) {.wrapper.svelte-5b1zbe .nav:where(.svelte-5b1zbe) {flex-direction:column;}
|
|
619
|
-
}.wrapper.svelte-5b1zbe .listbox {flex:none;background-color:transparent;}.wrapper.svelte-5b1zbe .content-pane:where(.svelte-5b1zbe) {overflow:auto;flex:auto;}.filter-tools.svelte-5b1zbe {display:flex;gap:8px;}`};function MY(t,e){const n=Vn();se(e,!0),Ee(t,DY);const r=()=>V(ue,"$_",d),i=()=>V(e.entryDraft,"$entryDraft",d),o=()=>V(Bn,"$allAssets",d),s=()=>V(ft,"$prefs",d),a=()=>V(vn,"$isSmallScreen",d),c=()=>V(xl,"$showContentOverlay",d),u=()=>V(Sc,"$selectAssetsView",d),[d,f]=me(),h=de=>{var we=CY(),ve=D(we);{var fe=ze=>{var Ne=$Y(),Ae=D(Ne);{var $e=Le=>{{let Ie=b(()=>Sc);Dw(Le,{get currentView(){return l(Ie)},"aria-controls":"select-assets-grid"})}};q(Ae,Le=>{u()&&Le($e)})}var je=z(Ae,2);{let Le=b(()=>l(k).some(Re=>Re.file)),Ie=b(()=>r()(`assets_dialog.search_for_${e.kind??"file"}`));ag(je,{get flex(){return a()},get disabled(){return l(Le)},get"aria-label"(){return l(Ie)},get value(){return l(w)},set value(Re){K(w,Re,!0)}})}S(ze,Ne)};q(ve,ze=>{(l(O)||l(R)&&l(x)!=="cloudinary"||l(B))&&ze(fe)})}var _e=z(ve,2);{var Ce=ze=>{{const Ne=$e=>{Ze($e,{name:"cloud_upload"})};let Ae=b(()=>r()("upload"));et(ze,{variant:"primary",get label(){return l(Ae)},onclick:()=>{l(C)?.open()},startIcon:Ne,$$slots:{startIcon:!0}})}};q(_e,ze=>{(l(O)||l(R)&&l(x)!=="cloudinary")&&ze(Ce)})}S(de,we)};let p=I(e,"open",15,!1),g=I(e,"multiple",3,!1),m=I(e,"accept",19,()=>e.kind==="image"?Lo.join(","):void 0),v=I(e,"canEnterURL",3,!0),_=I(e,"onSelect",3,void 0),y=ie(""),w=ie(""),x=ie("default-global"),E=ie(St([])),$=ie(St([])),C=ie(void 0),k=ie(St([])),T=ie(void 0);const A=b(()=>e.kind==="image"?r()("assets_dialog.title.image"):r()("assets_dialog.title.file")),P=b(()=>Af(l(w))),L=b(()=>Object.values(e.assetLibraryFolderMap).some(({enabled:de})=>de)),O=b(()=>l(x).startsWith("default-")),N=b(()=>{if(!l(O))return;const de=l(x).replace("default-",""),{folder:we}=e.assetLibraryFolderMap[de];return we}),M=b(()=>{const{originalEntry:de}=i()??{};return l(N)?.entryRelative&&de?gn(Object.values(de.locales)[0].path).dirname:l(N)?.internalPath}),U=b(()=>[...o(),...l($)].filter(de=>!e.kind||e.kind===de.kind).sort((de,we)=>de.name.localeCompare(we.name)).sort((de,we)=>+!!we.unsaved-+!!de.unsaved)),H=b(()=>{const{providers:de=[]}=RL({fieldConfig:e.fieldConfig});return Object.entries(_p).filter(([we,{hotlinking:ve}])=>de.includes(we)&&(ve||l(L)))}),G=b(()=>l(H).map(([de])=>de).includes(l(x))&&!!s()?.apiKeys?.[l(x)]),W=b(()=>Object.entries(Kw).filter(([,{isEnabled:de}])=>de?.()??!0)),Y=b(()=>[...l(W),...l(H)]),R=b(()=>l(W).map(([de])=>de).includes(l(x))),B=b(()=>l(H).map(([de])=>de).includes(l(x))),J=b(()=>a()?Al:uu),Q=async({file:de,blobURL:we,folder:ve})=>{const{name:fe,size:_e}=de;return{unsaved:!0,file:de,blobURL:we??URL.createObjectURL(de),name:fe,path:`${l(M)}/${fe}`,sha:await nl(de),size:_e,kind:su(fe),folder:ve}},ee=async()=>Promise.all([...Object.entries(i()?.files??{}).map(async([de,{file:we,folder:ve}])=>Q({file:we,blobURL:de,folder:ve})),...Object.values(l(E))]),te=async({hash:de,folder:we})=>(await Promise.all(l($).map(async fe=>!!fe.file&&pn(fe.folder,we)&&await Za(fe.file)===de))).includes(!0),re=async de=>{const we=await Za(de),ve=l(N);if(await te({hash:we,folder:ve}))return;const fe=await Q({file:de,folder:ve});return l(E).push(fe),{asset:fe}},he=async de=>{K(k,(await Promise.all(de.map(re))).filter(we=>!!we),!0)},pe=()=>{K(y,""),K(w,""),K(E,[],!0),K($,[],!0),K(k,[],!0)},ce=()=>{if(!l(k).length)return;const de=jn(l(k)).map(we=>{const{unsaved:ve,file:fe,folder:_e}=we.asset??{};return ve?{file:fe,folder:_e}:we});_()?.(de)};_O(()=>{const de=Object.entries(e.assetLibraryFolderMap).find(([,{enabled:we}])=>we)?.[0];de?K(x,`default-${de}`):K(x,l(Y)[0]?.[0],!0)}),Me(()=>{i()?.files,l(E),(async()=>K($,await ee(),!0))()}),Me(()=>{c()||p(!1)});var ge=RY(),Pe=D(ge);{const de=_e=>{var Ce=X(),ze=D(Ce);{var Ne=Ae=>{h(Ae)};q(ze,Ae=>{a()||Ae(Ne)})}S(_e,Ce)},we=_e=>{var Ce=X(),ze=D(Ce);{var Ne=Ae=>{const $e=b(()=>{const{showServiceLink:Re,serviceLabel:nt,serviceURL:Ge}=_p[l(x)]??{};return{showServiceLink:Re,serviceLabel:nt,serviceURL:Ge}});var je=X(),Le=D(je);{var Ie=Re=>{var nt=AY(),Ge=F(nt);Z(ut=>{Te(nt,"href",l($e).serviceURL),ne(Ge,ut)},[()=>r()("prefs.media.stock_photos.credit",{values:{service:l($e).serviceLabel}})]),S(Re,nt)};q(Le,Re=>{l($e).showServiceLink&&Re(Ie)})}S(Ae,je)};q(ze,Ae=>{l(G)&&Ae(Ne)})}S(_e,Ce)};let ve=b(()=>r()("insert")),fe=b(()=>!l(k).length);Ki(Pe,{get title(){return l(A)},size:"x-large",get okLabel(){return l(ve)},get okDisabled(){return l(fe)},keepContent:!0,focusInput:!1,onOk:ce,onClose:()=>{pe()},get open(){return p()},set open(_e){p(_e)},headerExtra:de,footerExtra:we,children:(_e,Ce)=>{var ze=IY(),Ne=F(ze),Ae=F(Ne);{let Oe=b(()=>r()("assets_dialog.locations"));ur(Ae,()=>l(J),(be,ye)=>{ye(be,{class:"tabs",get"aria-label"(){return l(Oe)},get"aria-controls"(){return`${n}-content-pane`},filterThreshold:-1,onChange:tt=>{K(x,tt.detail.name,!0),K(k,[],!0)},children:(tt,Ve)=>{var Qe=LY(),Xe=D(Qe);{var ht=kt=>{{let tn=b(()=>r()("asset_location.repository"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=X(),bn=D(Dt);it(bn,17,()=>Object.entries(e.assetLibraryFolderMap),([Et,{enabled:_n}])=>Et,(Et,_n)=>{var nn=b(()=>ji(l(_n),2));let rn=()=>l(nn)[0],gt=()=>l(nn)[1].enabled;var Mt=X(),on=D(Mt);{var yn=Cn=>{const An=b(()=>`default-${rn()}`);{let Tt=b(()=>r()(`assets_dialog.folder.${rn()}`)),dn=b(()=>l(x)===l(An));Tr(Cn,{get name(){return l(An)},get label(){return l(Tt)},get selected(){return l(dn)}})}};q(on,Cn=>{gt()&&Cn(yn)})}S(Et,Mt)}),S($n,Dt)},$$slots:{default:!0}})}};q(Xe,kt=>{l(L)&&kt(ht)})}var Pt=z(Xe,2);{var Qt=kt=>{{let tn=b(()=>r()("asset_location.external"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=PY(),bn=D(Dt);it(bn,17,()=>l(W),([,{serviceId:nn,serviceLabel:rn}])=>nn,(nn,rn)=>{var gt=b(()=>ji(l(rn),2));let Mt=()=>l(gt)[1].serviceId,on=()=>l(gt)[1].serviceLabel;{let yn=b(()=>l(x)===Mt());Tr(nn,{get name(){return Mt()},get label(){return on()},get selected(){return l(yn)}})}});var Et=z(bn,2);{var _n=nn=>{{let rn=b(()=>r()("assets_dialog.enter_url")),gt=b(()=>l(x)==="enter-url");Tr(nn,{name:"enter-url",get label(){return l(rn)},get selected(){return l(gt)}})}};q(Et,nn=>{v()&&nn(_n)})}S($n,Dt)},$$slots:{default:!0}})}};q(Pt,kt=>{(v()||Object.keys(l(W)).length)&&kt(Qt)})}var en=z(Pt,2);{var pt=kt=>{{let tn=b(()=>r()("asset_location.stock_photos"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=X(),bn=D(Dt);it(bn,17,()=>l(H),([Et,{serviceLabel:_n}])=>Et,(Et,_n)=>{var nn=b(()=>ji(l(_n),2));let rn=()=>l(nn)[0],gt=()=>l(nn)[1].serviceLabel;{let Mt=b(()=>l(x)===rn());Tr(Et,{get name(){return rn()},get label(){return gt()},get selected(){return l(Mt)}})}}),S($n,Dt)},$$slots:{default:!0}})}};q(en,kt=>{l(H).length&&kt(pt)})}S(tt,Qe)},$$slots:{default:!0}})})}var $e=z(Ae,2);{var je=Oe=>{var be=NY(),ye=F(be);h(ye),S(Oe,be)};q($e,Oe=>{a()&&Oe(je)})}var Le=z(Ne,2),Ie=F(Le);{var Re=Oe=>{{let be=b(()=>l(U).filter(ye=>pn(ye.folder,l(N))&&(l(N).entryRelative?gn(ye.path).dirname===l(M):!0)));lY(Oe,{get accept(){return m()},get multiple(){return g()},get assets(){return l(be)},get searchTerms(){return l(P)},get basePath(){return l(N).internalPath},onDrop:({files:ye})=>{he(ye)},get selectedResources(){return l(k)},set selectedResources(ye){K(k,ye,!0)}})}};q(Ie,Oe=>{l(O)&&l(N)&&Oe(Re)})}var nt=z(Ie,2);{var Ge=Oe=>{nr(Oe,{children:(be,ye)=>{var tt=OY(),Ve=D(tt),Qe=F(Ve),Xe=z(Ve,2);qn(Xe,{flex:!0,oninput:()=>{const ht=l(y).trim();K(k,ht?[{url:ht}]:[],!0)},get value(){return l(y)},set value(ht){K(y,ht,!0)}}),Z(ht=>ne(Qe,ht),[()=>e.kind==="image"?r()("assets_dialog.enter_image_url"):r()("assets_dialog.enter_file_url")]),S(be,tt)},$$slots:{default:!0}})};q(nt,Oe=>{v()&&l(x)==="enter-url"&&Oe(Ge)})}var ut=z(nt,2);it(ut,17,()=>l(Y),([Oe,be])=>Oe,(Oe,be)=>{var ye=b(()=>ji(l(be),2));let tt=()=>l(ye)[0],Ve=()=>l(ye)[1];var Qe=X(),Xe=D(Qe);{var ht=Qt=>{{let en=b(()=>l(x)!=="cloudinary");IW(Qt,{get kind(){return e.kind},get fieldConfig(){return e.fieldConfig},get multiple(){return g()},get hidden(){return l(en)},onSelect:pt=>{K(k,pt,!0),ce(),p(!1)}})}},Pt=Qt=>{var en=X(),pt=D(en);{var kt=tn=>{xt(ZW(tn,{get kind(){return e.kind},get fieldConfig(){return e.fieldConfig},get multiple(){return g()},get searchTerms(){return l(P)},get serviceProps(){return Ve()},gridId:"select-assets-grid",get selectedResources(){return l(k)},set selectedResources($n){K(k,$n,!0)}}),$n=>K(T,$n,!0),()=>l(T))};q(pt,tn=>{l(x)===tt()&&tn(kt)},!0)}S(Qt,en)};q(Xe,Qt=>{tt()==="cloudinary"?Qt(ht):Qt(Pt,!1)})}S(Oe,Qe)}),Z(()=>Te(Le,"id",`${n}-content-pane`)),S(_e,ze)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}})}var xe=z(Pe,2);xt(Fy(xe,{get accept(){return m()},get multiple(){return g()},onSelect:({files:de})=>{l(R)?l(T)?.uploadFiles(de):he(de)}}),de=>K(C,de,!0),()=>l(C)),S(t,ge),ae(),f()}var FY=j('<div role="toolbar" class="reorder-controls svelte-1ncvwuf"><!> <!></div>'),zY=j('<span role="none" class="preview no-thumbnail"><!></span>'),jY=j('<div role="textbox" tabindex="0" class="filename svelte-1ncvwuf"> </div>'),UY=j('<div role="none" class="filled svelte-1ncvwuf"><!> <!> <div role="none" class="svelte-1ncvwuf"><!> <div role="none"><!> <!></div></div></div>');const BY={hash:"svelte-1ncvwuf",code:".filled.svelte-1ncvwuf {display:flex !important;align-items:center;gap:12px;margin:var(--sui-focus-ring-width);}.filled.svelte-1ncvwuf .preview {flex:none;width:120px !important;height:120px !important;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);padding:8px !important;}.filled.svelte-1ncvwuf .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-1ncvwuf .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) {flex:auto;overflow:hidden;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) .filename:where(.svelte-1ncvwuf) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) .filename:where(.svelte-1ncvwuf):empty {margin:0;padding:0;}.reorder-controls.svelte-1ncvwuf {flex:none !important;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:4px;border:1px solid var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);height:-moz-available;height:-webkit-fill-available;height:stretch;background-color:var(--sui-secondary-border-color);}.reorder-controls.svelte-1ncvwuf button {padding:0;height:16px;}"};function vS(t,e){se(e,!0),Ee(t,BY);const n=()=>V(Je,"$entryDraft",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=I(e,"readonly",3,!1),a=I(e,"invalid",3,!1),c=I(e,"required",3,!1),u=I(e,"collectionName",3,""),d=I(e,"fileName",3,void 0),f=I(e,"entry",3,void 0);let h=ie(void 0),p=ie(void 0),g=ie(void 0),m=ie(void 0);const v=b(()=>e.widgetName==="image"),_=b(()=>{if(!e.value)return"";if(l(p)){const{publicPath:H,entryRelative:G,hasTemplateTags:W}=n()?.files[e.value].folder??{};return Nc([G||W?"":H||"",decodeURI(l(p).name.normalize())])}if(!e.value.startsWith("blob:")){const H=decodeURI(e.value);if(Yd(H)){const G=new URL(H);if(G.search)return G.search="",`${G}…`}return H}return""}),y=async()=>{if(e.value?.startsWith("blob:")&&n()&&K(p,n().files[e.value]?.file,!0),e.value){const H={value:e.value,entry:f(),collectionName:u(),fileName:d()};e.value.startsWith("blob:")?(K(h,void 0),K(g,e.value?await _C(e.value):void 0,!0),K(m,e.value&&l(g)?await rl({...H,thumbnail:!0}):void 0,!0)):l(v)&&/^https?:/.test(e.value)?(K(h,void 0),K(g,"image"),K(m,e.value,!0)):(K(h,my({...H}),!0),K(g,void 0),K(m,void 0))}else K(h,void 0),K(p,void 0),K(g,void 0),K(m,void 0)};Me(()=>{e.value,Se(()=>{y()})});var w=UY(),x=F(w);{var E=H=>{var G=FY(),W=F(G);{const R=Q=>{Ze(Q,{name:"arrow_upward"})};let B=b(()=>!e.onMoveUp),J=b(()=>r()("move_up"));et(W,{size:"small",iconic:!0,get disabled(){return l(B)},get"aria-label"(){return l(J)},onclick:()=>{e.onMoveUp?.()},startIcon:R,$$slots:{startIcon:!0}})}var Y=z(W,2);{const R=Q=>{Ze(Q,{name:"arrow_downward"})};let B=b(()=>!e.onMoveDown),J=b(()=>r()("move_down"));et(Y,{size:"small",iconic:!0,get disabled(){return l(B)},get"aria-label"(){return l(J)},onclick:()=>{e.onMoveDown?.()},startIcon:R,$$slots:{startIcon:!0}})}S(H,G)};q(x,H=>{(e.onMoveUp||e.onMoveDown)&&!s()&&H(E)})}var $=z(x,2);{var C=H=>{Ho(H,{get kind(){return l(g)},get src(){return l(m)},variant:"tile",checkerboard:!0})},k=H=>{var G=X(),W=D(G);{var Y=B=>{Ho(B,{get kind(){return l(h).kind},get asset(){return l(h)},variant:"tile",checkerboard:!0})},R=B=>{var J=zY(),Q=F(J);Ze(Q,{name:"draft"}),S(B,J)};q(W,B=>{l(h)?B(Y):B(R,!1)},!0)}S(H,G)};q($,H=>{l(g)&&l(m)?H(C):H(k,!1)})}var T=z($,2),A=F(T);{var P=H=>{var G=jY(),W=F(G);Z(()=>{Te(G,"id",`${e.fieldId??""}-value`),Te(G,"aria-readonly",s()),Te(G,"aria-invalid",a()),Te(G,"aria-required",c()),Te(G,"aria-labelledby",`${e.fieldId??""}-label`),Te(G,"aria-errormessage",`${e.fieldId??""}-error`),ne(W,l(_))}),S(H,G)};q(A,H=>{typeof e.value=="string"&&H(P)})}var L=z(A,2),O=F(L);{var N=H=>{{let G=b(()=>r()("replace")),W=b(()=>r()(`replace_${e.widgetName}`));et(H,{get disabled(){return s()},variant:"tertiary",size:"small",get label(){return l(G)},get"aria-label"(){return l(W)},get"aria-controls"(){return`${e.fieldId??""}-value`},onclick:()=>{e.onReplace()}})}};q(O,H=>{e.onReplace&&H(N)})}var M=z(O,2);{var U=H=>{{let G=b(()=>r()("remove")),W=b(()=>r()(`remove_${e.widgetName}`));et(H,{get disabled(){return s()},variant:"tertiary",size:"small",get label(){return l(G)},get"aria-label"(){return l(W)},get"aria-controls"(){return`${e.fieldId??""}-value`},onclick:()=>{e.onRemove()}})}};q(M,H=>{e.onRemove&&H(U)})}S(t,w),ae(),o()}var qY=j('<div role="status"> </div>'),VY=j('<!> <div role="none"><!></div>',1),HY=j('<div role="none"><!></div>');const KY={hash:"svelte-nslz3b",code:".empty.svelte-nslz3b button {flex-direction:column;justify-content:center;height:120px;font-size:var(--sui-font-size-small);}.empty.svelte-nslz3b button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-nslz3b button:disabled {pointer-events:none !important;}.empty.svelte-nslz3b button:disabled * {opacity:0.5;}.empty.invalid.svelte-nslz3b button {border-color:var(--sui-error-border-color);}"};function GY(t,e){se(e,!0),Ee(t,KY);const n=()=>V(ue,"$_",i),r=()=>V(xu,"$hasMouse",i),[i,o]=me();let s=I(e,"showSelectAssetsDialog",15,!1),a=I(e,"replaceMode",15,!1);var c=HY();let u;var d=F(c);{let f=b(()=>e.readonly||e.processing);et(d,{flex:!0,role:"button",variant:"tertiary",get disabled(){return l(f)},tabindex:"0",onclick:()=>{e.readonly||(a(!1),s(!0))},children:(h,p)=>{var g=VY(),m=D(g);Ze(m,{name:"cloud_upload"});var v=z(m,2),_=F(v);{var y=x=>{var E=qY(),$=F(E);Z(C=>ne($,C),[()=>n()("processing_file")]),S(x,E)},w=x=>{var E=X(),$=D(E);{var C=T=>{var A=X(),P=D(A);{var L=N=>{var M=Fe();Z(U=>ne(M,U),[()=>n()("click_to_browse")]),S(N,M)},O=N=>{var M=X(),U=D(M);{var H=W=>{var Y=Fe();Z(R=>ne(Y,R),[()=>n()(`drop_image_${e.multiple?"files":"file"}_or_click_to_browse`)]),S(W,Y)},G=W=>{var Y=Fe();Z(R=>ne(Y,R),[()=>n()(`drop_${e.multiple?"files":"file"}_or_click_to_browse`)]),S(W,Y)};q(U,W=>{e.isImageWidget?W(H):W(G,!1)},!0)}S(N,M)};q(P,N=>{e.allowDrop?N(O,!1):N(L)})}S(T,A)},k=T=>{var A=Fe();Z(P=>ne(A,P),[()=>n()("tap_to_browse")]),S(T,A)};q($,T=>{r()?T(C):T(k,!1)},!0)}S(x,E)};q(_,x=>{e.processing?x(y):x(w,!1)})}S(h,g)},$$slots:{default:!0}})}Z(()=>u=cn(c,1,"empty svelte-nslz3b",null,u,{invalid:e.invalid,processing:e.processing})),S(t,c),ae(),o()}const WY=({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r})=>{const i=Io({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r}),o=e?Io({collectionName:t,fileName:e}):void 0,s=Io({collectionName:t}),a=o??s,c=oe(Qc);return{field:{folder:i,enabled:i!==void 0},entry:{folder:a,enabled:!!a&&(a.entryRelative||a.hasTemplateTags)},file:{folder:o,enabled:!!o&&!o.entryRelative&&!o.hasTemplateTags},collection:{folder:s,enabled:!!s&&!s.entryRelative&&!s.hasTemplateTags},global:{folder:c,enabled:c!==void 0}}},bS=async({draft:t,file:e})=>{const n=await Za(e);let r;return await Promise.all(Object.entries(t.files??{}).map(async([i,o])=>{!r&&await Za(o.file)===n&&(r=i)})),r},YY=async({draft:t,resource:e,libraryConfig:n})=>{const{transformations:r,max_file_size:i}=n??{},{url:o,credit:s}=e;let{asset:a,file:c}=e,u="",d;if(c){const f=await bS({draft:t,file:c});if(f)u=f;else{r&&(c=await vC(c,r));const h=await nl(c),{folder:p}=e,g=oe(Bn).find(m=>m.sha===h&&pn(m.folder,p));g?(a=g,c=void 0):c.size>i?(d=c.name,c=void 0):(u=URL.createObjectURL(c),t.files[u]={file:c,folder:p})}}return a&&(a.unsaved?a.file&&(u=await bS({draft:t,file:a.file})):u=Ed(a,{pathOnly:!0,allowSpecial:!0,entry:t.originalEntry})),o&&!c&&!a&&(u=o),{value:u,credit:s?jr.sanitize(s,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]}):"",oversizedFileName:d}};var JY=j('<div role="none" class="item-list svelte-1libnfj"></div> <!>',1),XY=j('<div role="none"> </div> <div role="none"><!></div>',1),ZY=j("<!> <!> <!> <!>",1);const QY={hash:"svelte-1libnfj",code:".item-list.svelte-1libnfj {display:flex;flex-direction:column;gap:4px;}"};function _S(t,e){se(e,!0),Ee(t,QY);const n=()=>V(Je,"$entryDraft",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=ve=>{GY(ve,{get allowDrop(){return l(J)},get invalid(){return p()},get readonly(){return h()},get processing(){return l(E)},get isImageWidget(){return l(N)},get multiple(){return l(G)},get showSelectAssetsDialog(){return l(g)},set showSelectAssetsDialog(fe){K(g,fe,!0)},get replaceMode(){return l(m)},set replaceMode(fe){K(m,fe,!0)}})},a=ve=>{var fe=X(),_e=D(fe);{var Ce=Ne=>{var Ae=X(),$e=D(Ae);{var je=Ie=>{var Re=X(),nt=D(Re);{var Ge=ut=>{var Oe=JY(),be=D(Oe);it(be,23,d,(Ve,Qe)=>`${Ve}|${Qe}`,(Ve,Qe,Xe)=>{{let ht=b(()=>l(Xe)>0?()=>he(l(Xe)-1):void 0),Pt=b(()=>l(Xe)<d().length-1?()=>he(l(Xe)):void 0);vS(Ve,Yt(()=>l(R),{get value(){return l(Qe)},get fieldId(){return`${e.fieldId??""}-${l(Xe)??""}`},onReplace:()=>{K(m,!0),K(v,l(Xe),!0),K(g,!0)},onRemove:()=>re(l(Xe)),get onMoveUp(){return l(ht)},get onMoveDown(){return l(Pt)}}))}});var ye=z(be,2);{var tt=Ve=>{s(Ve)};q(ye,Ve=>{d().length<l(C)&&Ve(tt)})}S(ut,Oe)};q(nt,ut=>{Array.isArray(d())&&ut(Ge)})}S(Ie,Re)},Le=Ie=>{var Re=X(),nt=D(Re);{var Ge=ut=>{vS(ut,Yt(()=>l(R),{get value(){return d()},get fieldId(){return e.fieldId},onReplace:()=>{K(m,!0),K(g,!0)},onRemove:Q}))};q(nt,ut=>{typeof d()=="string"&&d()&&ut(Ge)},!0)}S(Ie,Re)};q($e,Ie=>{l(G)?Ie(je):Ie(Le,!1)})}S(Ne,Ae)},ze=Ne=>{s(Ne)};q(_e,Ne=>{d()?.length&&!l(E)?Ne(Ce):Ne(ze,!1)})}S(ve,fe)},{widgetContext:c=void 0}=sr("field-editor")??{},u=c==="markdown-editor-component";let d=I(e,"currentValue",15),f=I(e,"required",3,!0),h=I(e,"readonly",3,!1),p=I(e,"invalid",3,!1),g=ie(!1),m=ie(!1),v=ie(-1),_=ie(!1),y=ie(!1),w=ie(""),x=ie(void 0),E=ie(!1);const $=b(()=>e.fieldConfig.widget),C=b(()=>st(e.fieldConfig.max,1/0)),k=b(()=>e.fieldConfig.accept),T=b(()=>st(e.fieldConfig.choose_url,!0)),A=b(()=>n()?.originalEntry),P=b(()=>n()?.collectionName??""),L=b(()=>n()?.fileName),O=b(()=>n()?.isIndexFile??!1),N=b(()=>l($)==="image"),M=b(()=>sf({fieldConfig:e.fieldConfig}).config),U=b(()=>WY({collectionName:l(P),fileName:l(L),typedKeyPath:e.typedKeyPath,isIndexFile:l(O)})),H=b(()=>Object.values(l(U)).find(({enabled:ve})=>ve)?.folder),G=b(()=>Xp(e.fieldConfig)&&!u),W=b(()=>l(M).max_file_size),Y=b(()=>!f()&&(!c||!["markdown-editor-component","single-subfield-list-widget"].includes(c))),R=b(()=>({widgetName:l($),readonly:h(),invalid:p(),required:f(),showRemoveButton:l(Y),collectionName:l(P),fileName:l(L),entry:l(A)})),B=b(()=>Object.entries(Kw).filter(([,{isEnabled:ve}])=>ve?.()??!0)),J=b(()=>!l(B).length),Q=()=>{l(x)?.reset(),l(G)||(d(""),Vc())},ee=async ve=>{if(!n())return;Q(),K(E,!0);const fe=await Promise.all(ve.map(Ne=>YY({draft:n(),resource:Ne,libraryConfig:l(M)}))),_e=[],Ce=[],ze=l(G)?Object.keys(n().currentValues[e.locale]).filter(Ne=>Ne.startsWith(`${e.keyPath}.`)).map(Ne=>Number(Ne.replace(`${e.keyPath}.`,""))).pop()??-1:-1;fe.forEach(({value:Ne,credit:Ae,oversizedFileName:$e},je)=>{if(Ne)if(l(G)){const Le=l(m)?l(v):ze+1+je;_t(Je,Se(n).currentValues[e.locale][`${e.keyPath}.${Le}`]=Ne,Se(n))}else d(u?Ne.replaceAll(" ","%20"):Ne);Ae&&_e.push(Ae),$e&&Ce.push($e)}),_e.length?(K(w,_e.join(`
|
|
620
|
-
`),!0),K(y,!0)):K(w,""),Ce.length&&K(_,!0),K(E,!1)},te=({files:ve})=>{ve.length&&ee(ve.map(fe=>({file:fe,folder:l(H)})))},re=ve=>{if(!n())return;const fe=
|
|
621
|
-
td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}th.key.svelte-18v8t2h, th.value.svelte-18v8t2h {width:50%;}td.svelte-18v8t2h {padding:0;vertical-align:middle;}`};function dJ(t,e){se(e,!0),Ee(t,uJ);const n=()=>V(ue,"$_",i),r=()=>V(Je,"$entryDraft",i),[i,o]=me(),{valueStoreKey:s="currentValues"}=sr("field-editor")??{};let a=I(e,"readonly",3,!1);const c=b(()=>st(e.fieldConfig.i18n,!1)),u=b(()=>e.fieldConfig.key_label),d=b(()=>e.fieldConfig.value_label),f=b(()=>st(e.fieldConfig.max,1/0)),h=b(()=>l(u)||n()("key_value.key")),p=b(()=>l(d)||n()("key_value.value"));let g=ie(St([]));const m=St([]);let v=ie(St([])),_=ie(St([]));const y=()=>{if(!r())return;const N=Gw({entryDraft:Je,valueStoreKey:s,keyPath:e.keyPath,locale:e.locale});pn(l(g),N)||(K(g,[...N],!0),K(v,N.map(()=>!1),!0)),!l(g).length&&r()[s][e.locale][e.keyPath]!==null&&_t(Je,Se(r)[s][e.locale][e.keyPath]=null,Se(r))},w=()=>{r()&&(Object.entries(r()[s]).forEach(([O,N])=>{(O===e.locale||l(c)==="duplicate")&&delete N[e.keyPath]}),l(g).push(["",""]),l(v).push(!1),window.requestAnimationFrame(()=>{m[l(g).length-1].querySelector("input").focus()}))},x=O=>{l(g).splice(O,1),l(v).splice(O,1)},E=()=>{if(K(_,nJ({pairs:l(g),edited:l(v)}),!0),!r()||l(_).some(Boolean)||l(g).some(([N])=>!N.trim()))return;rJ({entryDraft:Je,fieldConfig:e.fieldConfig,keyPath:e.keyPath,locale:e.locale,pairs:l(g)})};Me(()=>{jn(r()?.[s][e.locale]),Se(()=>{y()})}),Me(()=>{jn(l(g)),Se(()=>{E()})});var $=cJ(),C=D($);{var k=O=>{var N=aJ(),M=F(N),U=F(M),H=F(U),G=F(H),W=z(H),Y=F(W),R=z(W);{var B=Q=>{var ee=iJ();Z(te=>Te(ee,"aria-label",te),[()=>n()("key_value.action")]),S(Q,ee)};q(R,Q=>{a()||Q(B)})}var J=z(M);it(J,21,()=>l(g),dr,(Q,ee,te)=>{var re=sJ(),he=F(re),pe=F(he);{let de=b(()=>!!l(_)[te]),we=b(()=>l(_)[te]?`${e.fieldId}-kv-error`:void 0);qn(pe,{get readonly(){return a()},flex:!0,get invalid(){return l(de)},get"aria-label"(){return l(h)},get"aria-errormessage"(){return l(we)},oninput:()=>{l(v)[te]=!0},onkeydown:ve=>{ve.key==="Enter"&&!ve.isComposing&&m[te].querySelector("td.value input").focus()},get value(){return l(ee)[0]},set value(ve){l(ee)[0]=ve}})}var ce=z(he),ge=F(ce);qn(ge,{get readonly(){return a()},flex:!0,get"aria-label"(){return l(p)},onkeydown:de=>{de.key==="Enter"&&!de.isComposing&&(te<l(g).length-1?m[te+1].querySelector("input").focus():l(g).length<l(f)&&w())},get value(){return l(ee)[1]},set value(de){l(ee)[1]=de}});var Pe=z(ce);{var xe=de=>{var we=oJ(),ve=F(we);{const fe=Ce=>{Ze(Ce,{name:"close"})};let _e=b(()=>n()("remove"));et(ve,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(_e)},onclick:()=>{x(te)},startIcon:fe,$$slots:{startIcon:!0}})}S(de,we)};q(Pe,de=>{a()||de(xe)})}xt(re,(de,we)=>m[we]=de,de=>m?.[de],()=>[te]),S(Q,re)}),Z(()=>{ne(G,l(h)),ne(Y,l(p))}),S(O,N)};q(C,O=>{l(g).length&&O(k)})}var T=z(C,2);{var A=O=>{Vw(O,{get id(){return`${e.fieldId??""}-kv-error`},children:(N,M)=>{var U=lJ(),H=D(U);{var G=R=>{var B=Fe();Z(J=>ne(B,J),[()=>n()("key_value.empty_key")]),S(R,B)};q(H,R=>{l(_).includes("empty")&&R(G)})}var W=z(H,2);{var Y=R=>{var B=Fe();Z(J=>ne(B,J),[()=>n()("key_value.duplicate_key")]),S(R,B)};q(W,R=>{l(_).includes("duplicate")&&R(Y)})}S(N,U)}})};q(T,O=>{l(_).some(Boolean)&&O(A)})}var P=z(T,2),L=F(P);{let O=b(()=>n()("add")),N=b(()=>a()||l(g).length>=l(f));et(L,{get label(){return l(O)},variant:"tertiary",get disabled(){return l(N)},onclick:()=>{w()}})}S(t,$),ae(),o()}var fJ=j('<tr><td class="svelte-dq8vuc"> </td><td class="svelte-dq8vuc"> </td></tr>'),hJ=j('<table class="svelte-dq8vuc"><thead><tr><th scope="col" class="svelte-dq8vuc"> </th><th scope="col" class="svelte-dq8vuc"> </th></tr></thead><tbody></tbody></table>');const pJ={hash:"svelte-dq8vuc",code:'@charset "UTF-8";table.svelte-dq8vuc {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-dq8vuc {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-dq8vuc:empty::after {content:" ";}'};function gJ(t,e){se(e,!0),Ee(t,pJ);const n=()=>V(ue,"$_",i),r=()=>V(Je,"$entryDraft",i),[i,o]=me(),s=b(()=>e.fieldConfig.key_label),a=b(()=>e.fieldConfig.value_label),c=b(()=>l(s)||n()("key_value.key")),u=b(()=>l(a)||n()("key_value.value"));let d=ie(St([]));const f=()=>{const v=Gw({entryDraft:Je,keyPath:e.keyPath,locale:e.locale});pn(l(d),v)||K(d,v,!0)};Me(()=>{r()&&(jn(r().currentValues[e.locale]),Se(()=>{f()}))});var h=X(),p=D(h);{var g=m=>{var v=hJ(),_=F(v),y=F(_),w=F(y),x=F(w),E=z(w),$=F(E),C=z(_);it(C,21,()=>l(d),dr,(k,T)=>{var A=b(()=>ji(l(T),2));let P=()=>l(A)[0],L=()=>l(A)[1];var O=fJ(),N=F(O),M=F(N),U=z(N),H=F(U);Z(()=>{ne(M,P()),ne(H,L())}),S(k,O)}),Z(()=>{ne(x,l(c)),ne($,l(u))}),S(m,v)};q(p,m=>{l(d).length&&m(g)})}S(t,h),ae(),o()}function DL(t,e){const n=()=>V(sl,"$isRTL",r),[r,i]=me();let o=I(e,"expanded",3,!1);{let s=b(()=>o()?"expand_more":n()?"chevron_left":"chevron_right");Ze(t,{get name(){return l(s)}})}i()}function i_(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"disabled",3,!1),s=I(e,"items",19,()=>[]),a=I(e,"addItem",3,()=>{});const c=b(()=>e.fieldConfig.name),u=b(()=>e.fieldConfig.label),d=b(()=>e.fieldConfig.types),f=b(()=>e.fieldConfig.widget==="list"?e.fieldConfig:void 0),h=b(()=>l(f)?.label_singular??""),p=b(()=>l(f)?.max??void 0),g=b(()=>n()("add_x",{values:{name:l(h)||l(u)||l(c)}})),m=b(()=>o()||typeof l(p)=="number"&&s().length===l(p));var v=X(),_=D(v);{var y=x=>{Ur(x,{variant:"tertiary",get label(){return l(g)},get disabled(){return l(m)},startIcon:k=>{Ze(k,{name:"add"})},endIcon:k=>{},popup:k=>{{let T=b(()=>n()("select_list_type"));hr(k,{get"aria-label"(){return l(T)},children:(A,P)=>{var L=X(),O=D(L);it(O,17,()=>l(d),({name:N,label:M})=>N,(N,M)=>{let U=()=>l(M).name,H=()=>l(M).label;{let G=b(()=>H()||U());vt(N,{get label(){return l(G)},onclick:()=>a()({type:U()})})}}),S(A,L)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},w=x=>{et(x,{variant:"tertiary",get label(){return l(g)},get disabled(){return l(m)},onclick:()=>a()(),startIcon:$=>{Ze($,{name:"add"})},$$slots:{startIcon:!0}})};q(_,x=>{Array.isArray(l(d))?x(y):x(w,!1)})}S(t,v),ae(),i()}var mJ=j('<span role="none" class="type svelte-12y2c75"> </span>'),vJ=j('<div role="none" class="header svelte-12y2c75"><div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div></div>');const bJ={hash:"svelte-12y2c75",code:".header.svelte-12y2c75 {display:flex;align-items:center;gap:8px;height:24px;background-color:var(--sui-secondary-border-color);}.header.svelte-12y2c75 > div:where(.svelte-12y2c75) {display:flex;align-items:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):first-child {justify-content:flex-start;width:40%;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):nth-child(2) {width:20%;justify-content:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):last-child {width:40%;justify-content:flex-end;}.header.svelte-12y2c75 button {padding:0;height:16px;}.header.svelte-12y2c75 .type:where(.svelte-12y2c75) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function Ww(t,e){se(e,!0),Ee(t,bJ);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"label",3,""),s=I(e,"expanded",15),a=I(e,"centerContent",3,void 0),c=I(e,"endContent",3,void 0);var u=vJ(),d=F(u),f=F(d);{const v=y=>{DL(y,{get expanded(){return s()}})};let _=b(()=>s()?n()("collapse"):n()("expand"));et(f,{size:"small",get"aria-label"(){return l(_)},get"aria-expanded"(){return s()},get"aria-controls"(){return e.controlId},onclick:()=>{s(!s()),e.toggleExpanded?.()},startIcon:v,children:(y,w)=>{var x=X(),E=D(x);{var $=C=>{var k=mJ(),T=F(k);Z(()=>ne(T,o())),S(C,k)};q(E,C=>{o()&&C($)})}S(y,x)},$$slots:{startIcon:!0,default:!0}})}var h=z(d,2),p=F(h);Ue(p,()=>a()??qe);var g=z(h,2),m=F(g);Ue(m,()=>c()??qe),S(t,u),ae(),i()}const _J=({fieldConfig:t,dynamicValue:e})=>{if(e!==void 0)return e==="true";const{default:n}=t;return typeof n=="boolean"?n:!1},yJ=t=>({[t.keyPath]:_J(t)}),wJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,output_code_only:i=!1,keys:o={code:"code",lang:"lang"}}=t,s=n!==void 0?n:r;if(i)return{[e]:typeof s=="string"?s:""};const a=Bt(s)?s:void 0,c=a?.[o.code]??s,u=a?.[o.lang]??"";return{[e]:{},[`${e}.${o.code}`]:typeof c=="string"?c:"",[`${e}.${o.lang}`]:typeof u=="string"?u:""}},xJ=({fieldConfig:t,dynamicValue:e})=>{const n=t,r=n.default,i=e??r;return typeof i!="string"?"":i==="{{now}}"?O$(N$(n),"",n):i},kJ=t=>({[t.keyPath]:xJ(t)}),xS=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,i=r.default,o=Xp(r);let s="";n!==void 0?s=o?n.split(/,\s*/):n:o?s=Array.isArray(i)?i:[]:s=typeof i=="string"?i:"";const a={};return o&&Array.isArray(s)&&(s=s.map(c=>c.trim()).filter(c=>c!==""),s.length&&(a[e]=[],s.forEach((c,u)=>{a[`${e}.${u}`]=c}))),!o&&typeof s=="string"&&(a[e]=s.trim()),a},SJ=({fieldConfig:t,locale:e,dynamicValue:n})=>{const{default:r}=t,i=n??r;return typeof i!="string"?i:i.replaceAll(/{{(.+?)}}/g,(o,s)=>s==="locale"?e:s==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):s==="uuid"?Si():s==="uuid_short"?Si("short"):s==="uuid_shorter"?Si("shorter"):"")},ML=t=>({[t.keyPath]:SJ(t)}),EJ=({fieldConfig:t,locale:e})=>{const{default:n}=t,r=ru({fieldConfig:t,locale:e});return Bt(n)?n:r?{"":""}:{}},TJ=t=>{const{keyPath:e,dynamicValue:n}=t;let r;if(n!==void 0)try{const i=JSON.parse(n);Bt(i)&&(r=i)}catch{}return r??=EJ(t),Object.fromEntries(Object.entries(r).filter(([,i])=>typeof i=="string").map(([i,o])=>[`${e}.${i}`,o]))},$J=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t,{fields:i}=t,{types:o}=t;let s;if(n!==void 0?s=n.split(/,\s*/).map(u=>u.trim()).filter(u=>u!==""):s=Array.isArray(r)?r:[],!(Array.isArray(s)&&!!s.length))return{[e]:[]};const c={[e]:s};return i||o?s.forEach((u,d)=>{Bt(u)?Object.entries(ho(u)).forEach(([f,h])=>{c[`${e}.${d}.${f}`]=h}):c[`${e}.${d}`]=u}):s.forEach((u,d)=>{Bt(u)||(c[`${e}.${d}`]=u)}),c},CJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t;let i;if(n!==void 0)try{i=tI(n)}catch{i=n.replace(/<[^>]*>/g,"")}else i=r||"";return{[e]:i}},AJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,value_type:i="int"}=t,o=n??r,s=typeof o=="string";if(o===void 0)return i==="int"||i==="float"?{[e]:null}:{[e]:""};if(i==="int"){const a=s?Number.parseInt(o,10):o;return Number.isInteger(a)?{[e]:a}:{}}if(i==="float"){const a=s?Number.parseFloat(o):o;return Number.isFinite(a)?{[e]:a}:{}}return s?{[e]:o}:{}},PJ=({fieldConfig:t,keyPath:e,locale:n})=>{const{default:r}=t,{fields:i}=t,{types:o}=t,s=ru({fieldConfig:t,locale:n}),a={};return Bt(r)?(Object.entries(ho(r)).forEach(([c,u])=>{a[`${e}.${c}`]=u}),a):!s||Array.isArray(o)?(a[e]=null,a):(i&&i.length>0&&i.forEach(c=>{FL({content:a,keyPath:[e,c.name].join("."),fieldConfig:c,locale:n,dynamicValues:{}})}),a)},kS=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,{default:i,multiple:o=!1}=r,s=n!==void 0?n.split(/,\s*/).map(c=>c.trim()):i,a=Array.isArray(s)&&!!s.length;if(!o){if(n!==void 0){const c=n.split(/,\s*/).map(u=>u.trim());return{[e]:c[0]||""}}return{[e]:s!==void 0?s:""}}return a?Object.fromEntries(s.map((c,u)=>[`${e}.${u}`,c])):{[e]:[]}},SS={boolean:yJ,code:wJ,datetime:kJ,file:xS,hidden:ML,image:xS,keyvalue:TJ,list:$J,markdown:CJ,number:AJ,object:PJ,relation:kS,select:kS},FL=({content:t,keyPath:e,fieldConfig:n,locale:r,dynamicValues:i})=>{const{widget:o="string",default:s}=n;if(o==="compute"){t[e]="";return}const a=e in i&&!/\.\d+(?:\.|$)/.test(e)&&i[e].trim()||void 0;if(o in SS){Object.assign(t,SS[o]({fieldConfig:n,keyPath:e,locale:r,dynamicValue:a}));return}t[e]=a||s||""},Pf=(t,e,n={})=>{const r={};return t.forEach(i=>{FL({content:r,keyPath:i.name,fieldConfig:i,locale:e,dynamicValues:n})}),r},ES=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t[n]!==r&&(t[n]=r)}),Object.keys(t).forEach(n=>{n in e||delete t[n]})},TS=(t,e)=>{const n=new RegExp(`^${Gt(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,o])=>[i.replace(n,"_"),o]).sort();return[ys(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},zL=({locale:t,valueStoreKey:e="currentValues",keyPath:n,manipulate:r})=>{const i=oe(Je),{collection:o,collectionFile:s}=i,{defaultLocale:a}=(s??o)._i18n,[c,u]=TS(i[e][t],n),[d,f]=t===a?TS(i.expanderStates._,n):[[],[]];r({valueList:c,expanderStateList:d}),oo.set(!1),Je.update(h=>(ES(h[e][t],{...ho({[n]:c}),...u}),t===a&&ES(h.expanderStates._,{...ho({[n]:d}),...f}),h)),oo.set(!0)},jL=({key:t,locale:e,collapsed:n=!1})=>{const r=oe(Je),i=r?.expanderStates?._[t];if(i!==void 0)return i;if(n==="auto"){const o=r?.currentValues?.[e]??{},s=new RegExp(`^${Gt(t.replace(/#$/,""))}\\.[^\\.]+$`);return!Object.entries(o).some(([a,c])=>s.test(a)&&!!c)}return!n},Co=t=>{Je.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},UL=({collectionName:t,fileName:e,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{const o=new Set,s={collectionName:t,fileName:e,valueMap:n,isIndexFile:i};return r.split(".").forEach((a,c,u)=>{const d=u.slice(0,c+1).join("."),f=mn({...s,keyPath:d}),h=/\.\d+$/.test(d);if(f?.widget==="object")h&&o.add(d),o.add(`${d}#`);else if(f?.widget==="list")o.add(h?d:`${d}#`);else if(c>0){const p=u.slice(0,c).join("."),g=mn({...s,keyPath:p});g?.widget==="object"&&"fields"in g&&o.add(`${p}.${g.name}#`),g?.widget==="list"&&"field"in g&&o.add(d)}}),[...o]},LJ=({collectionName:t,fileName:e,currentValues:n})=>{const{validities:r,isIndexFile:i}=oe(Je),o={};Object.entries(r??{}).forEach(([s,a])=>{Object.entries(a).forEach(([c,{valid:u}])=>{u||UL({collectionName:t,fileName:e,valueMap:n[s],keyPath:c,isIndexFile:i}).forEach(d=>{o[d]=!0})})}),Co(o)};var NJ=j("<!> <!>",1),OJ=j('<div role="none" class="toolbar top add svelte-1eiee9e"><!></div>'),IJ=j("<!> <!> <!>",1),RJ=j("<!> <!>",1),DJ=j("<!> <!>",1),MJ=j("<!> <!>",1),FJ=j("<!> <!>",1),zJ=j('<div role="none" class="summary svelte-1eiee9e"><!> <!></div>'),jJ=j('<div role="none" class="item svelte-1eiee9e"><!> <div role="none" class="item-body"><!></div></div>'),UJ=j('<div role="none" class="toolbar bottom add svelte-1eiee9e"><!> <!></div>'),BJ=j('<div role="none" class="toolbar top svelte-1eiee9e"><!> <div role="none" class="summary"> </div> <!> <!></div> <!> <div role="none"></div> <!>',1);const qJ={hash:"svelte-1eiee9e",code:".toolbar.svelte-1eiee9e {display:flex;align-items:center;}.toolbar.top.add.svelte-1eiee9e {margin-block:8px 16px !important;}.toolbar.bottom.add.svelte-1eiee9e {margin-block:16px 0 !important;}.item-list.collapsed.svelte-1eiee9e {display:none;}.item.svelte-1eiee9e {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e) {display:flex;align-items:center;gap:8px;padding:8px;}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e):empty {display:none;}"};function VJ(t,e){const n=Vn();se(e,!0),Ee(t,qJ);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(vn,"$isSmallScreen",s),[s,a]=me(),{valueStoreKey:c="currentValues"}=sr("field-editor")??{},u=b(()=>e.fieldConfig.name),d=b(()=>e.fieldConfig.label),f=b(()=>e.fieldConfig.i18n),h=b(()=>st(e.fieldConfig.allow_add,!0)),p=b(()=>st(e.fieldConfig.allow_remove,!0)),g=b(()=>st(e.fieldConfig.allow_reorder,!0)),m=b(()=>e.fieldConfig.collapsed),v=b(()=>e.fieldConfig.summary),_=b(()=>e.fieldConfig.thumbnail),y=b(()=>st(e.fieldConfig.minimize_collapsed,!1)),w=b(()=>e.fieldConfig.label_singular),x=b(()=>st(e.fieldConfig.max,1/0)),E=b(()=>st(e.fieldConfig.add_to_top,!1)),$=b(()=>e.fieldConfig.field),C=b(()=>e.fieldConfig.fields),k=b(()=>e.fieldConfig.types),T=b(()=>st(e.fieldConfig.typeKey,"type")),A=b(()=>El(e.fieldConfig)),P=b(()=>l(A).hasSingleSubField),L=b(()=>l(A).hasVariableTypes),O=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.(\\d+)(.*)?`)),N=b(()=>r()?.isIndexFile??!1),M=b(()=>r()?.collection),U=b(()=>r()?.collectionName??""),H=b(()=>r()?.collectionFile),G=b(()=>r()?.fileName),W=b(()=>(l(H)??l(M))?._i18n??bo),Y=b(()=>l(W).defaultLocale),R=b(()=>e.locale!==l(Y)&&l(f)==="duplicate"),B=b(()=>jn(r()?.[c][e.locale])??{}),J=b(()=>`${e.keyPath}#`),Q=b(()=>r()?.expanderStates?._[l(J)]??!0),ee=b(()=>ys(Object.fromEntries(Object.entries(l(B)).filter(([Oe])=>l(O).test(Oe)).map(([Oe,be])=>[Oe.replace(new RegExp(`^${Gt(e.keyPath)}`),l(u)),be])))[l(u)]??[]),te=b(()=>l(ee).map((Oe,be)=>{const ye=`${e.keyPath}.${be}`;return[ye,r()?.expanderStates?._[ye]??!0]})),re=b(()=>l(ee).length>=l(x)),he=St([]),pe=()=>{Co({[l(J)]:l(y)==="auto"?!l(ee).length:!l(y),...Object.fromEntries(l(ee).map((Oe,be)=>{const ye=`${e.keyPath}.${be}`;return[ye,jL({key:ye,locale:e.locale,collapsed:l(m)})]}))})},ce=Oe=>{Object.keys(r()?.[c]??{}).forEach(be=>{l(f)!=="duplicate"&&be!==e.locale||zL({locale:be,valueStoreKey:c,keyPath:e.keyPath,manipulate:Oe})})},ge=({index:Oe=l(E)?0:l(ee).length,dupIndex:be,type:ye}={})=>{ce(({valueList:tt,expanderStateList:Ve})=>{const Qe=ye?l(k)?.find(({name:ht})=>ht===ye)?.fields??[]:l(C)??(l($)?[l($)]:[]),Xe=(()=>{if(typeof be=="number")return structuredClone(tt[be]);const ht=ys(Pf(Qe,e.locale));return l(P)&&l($)?ht[l($).name]:ht})();ye&&(Xe[l(T)]=ye),l(P)||(Xe.__sc_item_id=crypto.randomUUID()),tt.splice(Oe,0,Xe),Ve.splice(Oe,0,!0)}),Co({[l(J)]:!0})},Pe=Oe=>{ce(({valueList:be,expanderStateList:ye})=>{be.splice(Oe,1),ye.splice(Oe,1)})},xe=Oe=>{ce(({valueList:be,expanderStateList:ye})=>{l(P)||(be[Oe].__sc_item_id??=crypto.randomUUID(),be[Oe+1].__sc_item_id??=crypto.randomUUID()),[be[Oe],be[Oe+1]]=[be[Oe+1],be[Oe]],[ye[Oe],ye[Oe+1]]=[ye[Oe+1],ye[Oe]]})},de=(Oe,be)=>rz({collectionName:l(U),fileName:l(G),keyPath:e.keyPath,valueMap:l(B),locale:e.locale,summaryTemplate:be,hasSingleSubField:l(P),index:Oe,isIndexFile:l(N)}),we=async Oe=>{if(!l(_))return;const be=`${e.keyPath}.${Oe}.${l(_).replace(/^fields\./,"")}`,ye=l(B)[be];if(!(!ye||mn({collectionName:l(U),fileName:l(G),valueMap:l(B),keyPath:be,isIndexFile:l(N)})?.widget!=="image"))return rl({value:ye,entry:r()?.originalEntry,collectionName:l(U),fileName:l(G)})},ve=async()=>{l(_)&&(he.length=l(ee).length,l(ee).forEach(async(Oe,be)=>{const ye=await we(be);he[be]!==ye&&(he[be]=ye)}))};Me(()=>{l(ee),Se(()=>{ve()})}),Ut(()=>{pe()});var fe=BJ(),_e=D(fe),Ce=F(_e);{const Oe=tt=>{DL(tt,{get expanded(){return l(Q)}})};let be=b(()=>!l(ee).length),ye=b(()=>l(Q)?i()("collapse"):i()("expand"));et(Ce,{iconic:!0,get disabled(){return l(be)},get"aria-label"(){return l(ye)},get"aria-expanded"(){return l(Q)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{Co({[l(J)]:!l(Q)})},startIcon:Oe,$$slots:{startIcon:!0}})}var ze=z(Ce,2),Ne=F(ze),Ae=z(ze,2);ii(Ae,{flex:!0});var $e=z(Ae,2);{var je=Oe=>{var be=NJ(),ye=D(be);{let Ve=b(()=>i()("expand_all")),Qe=b(()=>l(te).every(([,Xe])=>Xe));et(ye,{variant:"tertiary",size:"small",get label(){return l(Ve)},get disabled(){return l(Qe)},onclick:()=>{Co(Object.fromEntries(l(te).map(([Xe])=>[Xe,!0])))}})}var tt=z(ye,2);{let Ve=b(()=>i()("collapse_all")),Qe=b(()=>l(te).every(([,Xe])=>!Xe));et(tt,{variant:"tertiary",size:"small",get label(){return l(Ve)},get disabled(){return l(Qe)},onclick:()=>{Co(Object.fromEntries(l(te).map(([Xe])=>[Xe,!1])))}})}S(Oe,be)};q($e,Oe=>{l(Q)&&l(ee).length>1&&Oe(je)})}var Le=z(_e,2);{var Ie=Oe=>{var be=OJ(),ye=F(be);i_(ye,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},get items(){return l(ee)},addItem:ge}),S(Oe,be)};q(Le,Oe=>{l(h)&&(l(E)||!l(ee).length)&&Oe(Ie)})}var Re=z(Le,2);let nt;it(Re,23,()=>l(ee),(Oe,be)=>Bt(Oe)?Oe.__sc_item_id??be:be,(Oe,be,ye)=>{Hi(Oe,{children:(tt,Ve)=>{const Qe=b(()=>`${e.keyPath}.${l(ye)}`),Xe=b(()=>r()?.expanderStates?._[l(Qe)]??!0),ht=b(()=>l(L)?l(k)?.find(({name:Dt})=>Dt===l(be)[l(T)]):void 0),Pt=b(()=>l(L)?l(ht)?.fields??[]:l(C)??(l($)?[l($)]:[])),Qt=b(()=>l(L)&&l(ht)?.summary||l(v));var en=jJ(),pt=F(en);{const Dt=nn=>{var rn=X(),gt=D(rn);{var Mt=on=>{var yn=IJ(),Cn=D(yn);{const dn=It=>{Ze(It,{name:"arrow_upward"})};let Ot=b(()=>l(R)||l(ye)===0),Nr=b(()=>i()("move_up"));et(Cn,{size:"small",iconic:!0,get disabled(){return l(Ot)},get"aria-label"(){return l(Nr)},onclick:()=>xe(l(ye)-1),startIcon:dn,$$slots:{startIcon:!0}})}var An=z(Cn,2);ii(An,{});var Tt=z(An,2);{const dn=It=>{Ze(It,{name:"arrow_downward"})};let Ot=b(()=>l(R)||l(ye)===l(ee).length-1),Nr=b(()=>i()("move_down"));et(Tt,{iconic:!0,size:"small",get disabled(){return l(Ot)},get"aria-label"(){return l(Nr)},onclick:()=>xe(l(ye)),startIcon:dn,$$slots:{startIcon:!0}})}S(on,yn)};q(gt,on=>{l(g)&&on(Mt)})}S(nn,rn)},bn=nn=>{var rn=FJ(),gt=D(rn);{var Mt=Cn=>{{const An=dn=>{{let Ot=b(()=>i()("translation_options"));hr(dn,{get"aria-label"(){return l(Ot)},children:(Nr,It)=>{var li=MJ(),er=D(li);{let Vr=b(()=>i()("duplicate"));vt(er,{get label(){return l(Vr)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)+1,dupIndex:l(ye)})})}var qr=z(er,2);{var Gi=Vr=>{var fn=RJ(),dt=D(fn);{const Xt=Wi=>{var Or=X(),zn=D(Or);it(zn,17,()=>l(k)??[],({name:Ln,label:pr})=>Ln,(Ln,pr)=>{let Oi=()=>l(pr).name,Xo=()=>l(pr).label;{let Hn=b(()=>Xo()||Oi());vt(Ln,{get label(){return l(Hn)},onclick:()=>ge({index:l(ye),type:Oi()})})}}),S(Wi,Or)};let ar=b(()=>i()("add_item_above"));vt(dt,{get label(){return l(ar)},get disabled(){return l(re)},items:Xt,$$slots:{items:!0}})}var $t=z(dt,2);{const Xt=Wi=>{var Or=X(),zn=D(Or);it(zn,17,()=>l(k)??[],({name:Ln,label:pr})=>Ln,(Ln,pr)=>{let Oi=()=>l(pr).name,Xo=()=>l(pr).label;{let Hn=b(()=>Xo()||Oi());vt(Ln,{get label(){return l(Hn)},onclick:()=>ge({index:l(ye)+1,type:Oi()})})}}),S(Wi,Or)};let ar=b(()=>i()("add_item_below"));vt($t,{get label(){return l(ar)},get disabled(){return l(re)},items:Xt,$$slots:{items:!0}})}S(Vr,fn)},Jo=Vr=>{var fn=DJ(),dt=D(fn);{let Xt=b(()=>i()("add_item_above"));vt(dt,{get label(){return l(Xt)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)})})}var $t=z(dt,2);{let Xt=b(()=>i()("add_item_below"));vt($t,{get label(){return l(Xt)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)+1})})}S(Vr,fn)};q(qr,Vr=>{l(L)?Vr(Gi):Vr(Jo,!1)})}S(Nr,li)},$$slots:{default:!0}})}};let Tt=b(()=>i()("list_item_options"));Ur(Cn,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(Tt)},get disabled(){return l(R)},popup:An,$$slots:{popup:!0}})}};q(gt,Cn=>{l(h)&&Cn(Mt)})}var on=z(gt,2);{var yn=Cn=>{{const An=dn=>{Ze(dn,{name:"close"})};let Tt=b(()=>i()("remove"));et(Cn,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(Tt)},onclick:()=>Pe(l(ye)),startIcon:An,$$slots:{startIcon:!0}})}};q(on,Cn=>{l(p)&&Cn(yn)})}S(nn,rn)};let Et=b(()=>l(L)?l(ht)?.label||l(ht)?.name:""),_n=b(()=>l(Pt).length?()=>Co({[l(Qe)]:!l(Xe)}):void 0);Ww(pt,{get label(){return l(Et)},get controlId(){return`list-${n}-item-${l(ye)??""}-body`},get expanded(){return l(Xe)},get toggleExpanded(){return l(_n)},centerContent:Dt,endContent:bn,$$slots:{centerContent:!0,endContent:!0}})}var kt=z(pt,2),tn=F(kt);{var $n=Dt=>{var bn=X(),Et=D(bn);it(Et,17,()=>l(Pt),_n=>_n.name,(_n,nn)=>{Hi(_n,{children:(rn,gt)=>{{let Mt=b(()=>l(P)?l(Qe):`${l(Qe)}.${l(nn).name}`),on=b(()=>l(L)?`${e.keyPath}.*<${l(be)[l(T)]}>.${l(nn).name}`:`${e.keyPath}.*.${l(nn).name}`),yn=b(()=>l(P)?"single-subfield-list-widget":void 0);Lg(rn,{get keyPath(){return l(Mt)},get typedKeyPath(){return l(on)},get locale(){return e.locale},get fieldConfig(){return l(nn)},get context(){return l(yn)}})}},$$slots:{default:!0}})}),S(Dt,bn)},ai=Dt=>{var bn=zJ(),Et=F(bn);{var _n=rn=>{$g(rn,{get src(){return he[l(ye)]},variant:"icon",cover:!0})};q(Et,rn=>{he[l(ye)]&&rn(_n)})}var nn=z(Et,2);{let rn=b(()=>o()?2:1);Pr(nn,{get lines(){return l(rn)},children:(gt,Mt)=>{var on=Fe();Z(yn=>ne(on,yn),[()=>de(l(ye),l(Qt))]),S(gt,on)},$$slots:{default:!0}})}S(Dt,bn)};q(tn,Dt=>{l(Xe)?Dt($n):Dt(ai,!1)})}Z(()=>Te(kt,"id",`list-${n}-item-${l(ye)??""}-body`)),S(tt,en)},$$slots:{default:!0}})});var Ge=z(Re,2);{var ut=Oe=>{var be=UJ(),ye=F(be);i_(ye,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},get items(){return l(ee)},addItem:ge});var tt=z(ye,2);ii(tt,{flex:!0}),S(Oe,be)};q(Ge,Oe=>{l(h)&&!l(E)&&l(ee).length&&Oe(ut)})}Z(()=>{Te(ze,"id",`object-${n}-summary`),ne(Ne,`${l(ee).length??""}
|
|
619
|
+
}.wrapper.svelte-5b1zbe .listbox {flex:none;background-color:transparent;}.wrapper.svelte-5b1zbe .content-pane:where(.svelte-5b1zbe) {overflow:auto;flex:auto;}.filter-tools.svelte-5b1zbe {display:flex;gap:8px;}`};function MY(t,e){const n=Vn();se(e,!0),Ee(t,DY);const r=()=>V(ue,"$_",d),i=()=>V(e.entryDraft,"$entryDraft",d),o=()=>V(Bn,"$allAssets",d),s=()=>V(ft,"$prefs",d),a=()=>V(vn,"$isSmallScreen",d),c=()=>V(xl,"$showContentOverlay",d),u=()=>V(Sc,"$selectAssetsView",d),[d,f]=me(),h=de=>{var we=CY(),ve=D(we);{var fe=ze=>{var Ne=$Y(),Ae=D(Ne);{var $e=Le=>{{let Ie=b(()=>Sc);Dw(Le,{get currentView(){return l(Ie)},"aria-controls":"select-assets-grid"})}};q(Ae,Le=>{u()&&Le($e)})}var je=z(Ae,2);{let Le=b(()=>l(k).some(Re=>Re.file)),Ie=b(()=>r()(`assets_dialog.search_for_${e.kind??"file"}`));ag(je,{get flex(){return a()},get disabled(){return l(Le)},get"aria-label"(){return l(Ie)},get value(){return l(w)},set value(Re){K(w,Re,!0)}})}S(ze,Ne)};q(ve,ze=>{(l(O)||l(R)&&l(x)!=="cloudinary"||l(B))&&ze(fe)})}var _e=z(ve,2);{var Ce=ze=>{{const Ne=$e=>{Ze($e,{name:"cloud_upload"})};let Ae=b(()=>r()("upload"));et(ze,{variant:"primary",get label(){return l(Ae)},onclick:()=>{l(C)?.open()},startIcon:Ne,$$slots:{startIcon:!0}})}};q(_e,ze=>{(l(O)||l(R)&&l(x)!=="cloudinary")&&ze(Ce)})}S(de,we)};let p=I(e,"open",15,!1),g=I(e,"multiple",3,!1),m=I(e,"accept",19,()=>e.kind==="image"?Lo.join(","):void 0),v=I(e,"canEnterURL",3,!0),_=I(e,"onSelect",3,void 0),y=ie(""),w=ie(""),x=ie("default-global"),E=ie(St([])),$=ie(St([])),C=ie(void 0),k=ie(St([])),T=ie(void 0);const A=b(()=>e.kind==="image"?r()("assets_dialog.title.image"):r()("assets_dialog.title.file")),P=b(()=>Af(l(w))),L=b(()=>Object.values(e.assetLibraryFolderMap).some(({enabled:de})=>de)),O=b(()=>l(x).startsWith("default-")),N=b(()=>{if(!l(O))return;const de=l(x).replace("default-",""),{folder:we}=e.assetLibraryFolderMap[de];return we}),M=b(()=>{const{originalEntry:de}=i()??{};return l(N)?.entryRelative&&de?gn(Object.values(de.locales)[0].path).dirname:l(N)?.internalPath}),U=b(()=>[...o(),...l($)].filter(de=>!e.kind||e.kind===de.kind).sort((de,we)=>de.name.localeCompare(we.name)).sort((de,we)=>+!!we.unsaved-+!!de.unsaved)),H=b(()=>{const{providers:de=[]}=RL({fieldConfig:e.fieldConfig});return Object.entries(_p).filter(([we,{hotlinking:ve}])=>de.includes(we)&&(ve||l(L)))}),G=b(()=>l(H).map(([de])=>de).includes(l(x))&&!!s()?.apiKeys?.[l(x)]),W=b(()=>Object.entries(Kw).filter(([,{isEnabled:de}])=>de?.()??!0)),Y=b(()=>[...l(W),...l(H)]),R=b(()=>l(W).map(([de])=>de).includes(l(x))),B=b(()=>l(H).map(([de])=>de).includes(l(x))),J=b(()=>a()?Al:uu),Q=async({file:de,blobURL:we,folder:ve})=>{const{name:fe,size:_e}=de;return{unsaved:!0,file:de,blobURL:we??URL.createObjectURL(de),name:fe,path:`${l(M)}/${fe}`,sha:await nl(de),size:_e,kind:su(fe),folder:ve}},ee=async()=>Promise.all([...Object.entries(i()?.files??{}).map(async([de,{file:we,folder:ve}])=>Q({file:we,blobURL:de,folder:ve})),...Object.values(l(E))]),te=async({hash:de,folder:we})=>(await Promise.all(l($).map(async fe=>!!fe.file&&pn(fe.folder,we)&&await Za(fe.file)===de))).includes(!0),re=async de=>{const we=await Za(de),ve=l(N);if(await te({hash:we,folder:ve}))return;const fe=await Q({file:de,folder:ve});return l(E).push(fe),{asset:fe}},he=async de=>{K(k,(await Promise.all(de.map(re))).filter(we=>!!we),!0)},pe=()=>{K(y,""),K(w,""),K(E,[],!0),K($,[],!0),K(k,[],!0)},ce=()=>{if(!l(k).length)return;const de=Un(l(k)).map(we=>{const{unsaved:ve,file:fe,folder:_e}=we.asset??{};return ve?{file:fe,folder:_e}:we});_()?.(de)};_O(()=>{const de=Object.entries(e.assetLibraryFolderMap).find(([,{enabled:we}])=>we)?.[0];de?K(x,`default-${de}`):K(x,l(Y)[0]?.[0],!0)}),Me(()=>{i()?.files,l(E),(async()=>K($,await ee(),!0))()}),Me(()=>{c()||p(!1)});var ge=RY(),Pe=D(ge);{const de=_e=>{var Ce=X(),ze=D(Ce);{var Ne=Ae=>{h(Ae)};q(ze,Ae=>{a()||Ae(Ne)})}S(_e,Ce)},we=_e=>{var Ce=X(),ze=D(Ce);{var Ne=Ae=>{const $e=b(()=>{const{showServiceLink:Re,serviceLabel:nt,serviceURL:Ge}=_p[l(x)]??{};return{showServiceLink:Re,serviceLabel:nt,serviceURL:Ge}});var je=X(),Le=D(je);{var Ie=Re=>{var nt=AY(),Ge=F(nt);Z(ut=>{Te(nt,"href",l($e).serviceURL),ne(Ge,ut)},[()=>r()("prefs.media.stock_photos.credit",{values:{service:l($e).serviceLabel}})]),S(Re,nt)};q(Le,Re=>{l($e).showServiceLink&&Re(Ie)})}S(Ae,je)};q(ze,Ae=>{l(G)&&Ae(Ne)})}S(_e,Ce)};let ve=b(()=>r()("insert")),fe=b(()=>!l(k).length);Ki(Pe,{get title(){return l(A)},size:"x-large",get okLabel(){return l(ve)},get okDisabled(){return l(fe)},keepContent:!0,focusInput:!1,onOk:ce,onClose:()=>{pe()},get open(){return p()},set open(_e){p(_e)},headerExtra:de,footerExtra:we,children:(_e,Ce)=>{var ze=IY(),Ne=F(ze),Ae=F(Ne);{let Oe=b(()=>r()("assets_dialog.locations"));ur(Ae,()=>l(J),(be,ye)=>{ye(be,{class:"tabs",get"aria-label"(){return l(Oe)},get"aria-controls"(){return`${n}-content-pane`},filterThreshold:-1,onChange:tt=>{K(x,tt.detail.name,!0),K(k,[],!0)},children:(tt,Ve)=>{var Qe=LY(),Xe=D(Qe);{var ht=kt=>{{let tn=b(()=>r()("asset_location.repository"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=X(),bn=D(Dt);it(bn,17,()=>Object.entries(e.assetLibraryFolderMap),([Et,{enabled:_n}])=>Et,(Et,_n)=>{var nn=b(()=>ji(l(_n),2));let rn=()=>l(nn)[0],gt=()=>l(nn)[1].enabled;var Mt=X(),on=D(Mt);{var yn=Cn=>{const An=b(()=>`default-${rn()}`);{let Tt=b(()=>r()(`assets_dialog.folder.${rn()}`)),dn=b(()=>l(x)===l(An));Tr(Cn,{get name(){return l(An)},get label(){return l(Tt)},get selected(){return l(dn)}})}};q(on,Cn=>{gt()&&Cn(yn)})}S(Et,Mt)}),S($n,Dt)},$$slots:{default:!0}})}};q(Xe,kt=>{l(L)&&kt(ht)})}var Pt=z(Xe,2);{var Qt=kt=>{{let tn=b(()=>r()("asset_location.external"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=PY(),bn=D(Dt);it(bn,17,()=>l(W),([,{serviceId:nn,serviceLabel:rn}])=>nn,(nn,rn)=>{var gt=b(()=>ji(l(rn),2));let Mt=()=>l(gt)[1].serviceId,on=()=>l(gt)[1].serviceLabel;{let yn=b(()=>l(x)===Mt());Tr(nn,{get name(){return Mt()},get label(){return on()},get selected(){return l(yn)}})}});var Et=z(bn,2);{var _n=nn=>{{let rn=b(()=>r()("assets_dialog.enter_url")),gt=b(()=>l(x)==="enter-url");Tr(nn,{name:"enter-url",get label(){return l(rn)},get selected(){return l(gt)}})}};q(Et,nn=>{v()&&nn(_n)})}S($n,Dt)},$$slots:{default:!0}})}};q(Pt,kt=>{(v()||Object.keys(l(W)).length)&&kt(Qt)})}var en=z(Pt,2);{var pt=kt=>{{let tn=b(()=>r()("asset_location.stock_photos"));za(kt,{get label(){return l(tn)},children:($n,ai)=>{var Dt=X(),bn=D(Dt);it(bn,17,()=>l(H),([Et,{serviceLabel:_n}])=>Et,(Et,_n)=>{var nn=b(()=>ji(l(_n),2));let rn=()=>l(nn)[0],gt=()=>l(nn)[1].serviceLabel;{let Mt=b(()=>l(x)===rn());Tr(Et,{get name(){return rn()},get label(){return gt()},get selected(){return l(Mt)}})}}),S($n,Dt)},$$slots:{default:!0}})}};q(en,kt=>{l(H).length&&kt(pt)})}S(tt,Qe)},$$slots:{default:!0}})})}var $e=z(Ae,2);{var je=Oe=>{var be=NY(),ye=F(be);h(ye),S(Oe,be)};q($e,Oe=>{a()&&Oe(je)})}var Le=z(Ne,2),Ie=F(Le);{var Re=Oe=>{{let be=b(()=>l(U).filter(ye=>pn(ye.folder,l(N))&&(l(N).entryRelative?gn(ye.path).dirname===l(M):!0)));lY(Oe,{get accept(){return m()},get multiple(){return g()},get assets(){return l(be)},get searchTerms(){return l(P)},get basePath(){return l(N).internalPath},onDrop:({files:ye})=>{he(ye)},get selectedResources(){return l(k)},set selectedResources(ye){K(k,ye,!0)}})}};q(Ie,Oe=>{l(O)&&l(N)&&Oe(Re)})}var nt=z(Ie,2);{var Ge=Oe=>{nr(Oe,{children:(be,ye)=>{var tt=OY(),Ve=D(tt),Qe=F(Ve),Xe=z(Ve,2);qn(Xe,{flex:!0,oninput:()=>{const ht=l(y).trim();K(k,ht?[{url:ht}]:[],!0)},get value(){return l(y)},set value(ht){K(y,ht,!0)}}),Z(ht=>ne(Qe,ht),[()=>e.kind==="image"?r()("assets_dialog.enter_image_url"):r()("assets_dialog.enter_file_url")]),S(be,tt)},$$slots:{default:!0}})};q(nt,Oe=>{v()&&l(x)==="enter-url"&&Oe(Ge)})}var ut=z(nt,2);it(ut,17,()=>l(Y),([Oe,be])=>Oe,(Oe,be)=>{var ye=b(()=>ji(l(be),2));let tt=()=>l(ye)[0],Ve=()=>l(ye)[1];var Qe=X(),Xe=D(Qe);{var ht=Qt=>{{let en=b(()=>l(x)!=="cloudinary");IW(Qt,{get kind(){return e.kind},get fieldConfig(){return e.fieldConfig},get multiple(){return g()},get hidden(){return l(en)},onSelect:pt=>{K(k,pt,!0),ce(),p(!1)}})}},Pt=Qt=>{var en=X(),pt=D(en);{var kt=tn=>{xt(ZW(tn,{get kind(){return e.kind},get fieldConfig(){return e.fieldConfig},get multiple(){return g()},get searchTerms(){return l(P)},get serviceProps(){return Ve()},gridId:"select-assets-grid",get selectedResources(){return l(k)},set selectedResources($n){K(k,$n,!0)}}),$n=>K(T,$n,!0),()=>l(T))};q(pt,tn=>{l(x)===tt()&&tn(kt)},!0)}S(Qt,en)};q(Xe,Qt=>{tt()==="cloudinary"?Qt(ht):Qt(Pt,!1)})}S(Oe,Qe)}),Z(()=>Te(Le,"id",`${n}-content-pane`)),S(_e,ze)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}})}var xe=z(Pe,2);xt(Fy(xe,{get accept(){return m()},get multiple(){return g()},onSelect:({files:de})=>{l(R)?l(T)?.uploadFiles(de):he(de)}}),de=>K(C,de,!0),()=>l(C)),S(t,ge),ae(),f()}var FY=j('<div role="toolbar" class="reorder-controls svelte-1ncvwuf"><!> <!></div>'),zY=j('<span role="none" class="preview no-thumbnail"><!></span>'),jY=j('<div role="textbox" tabindex="0" class="filename svelte-1ncvwuf"> </div>'),UY=j('<div role="none" class="filled svelte-1ncvwuf"><!> <!> <div role="none" class="svelte-1ncvwuf"><!> <div role="none"><!> <!></div></div></div>');const BY={hash:"svelte-1ncvwuf",code:".filled.svelte-1ncvwuf {display:flex !important;align-items:center;gap:12px;margin:var(--sui-focus-ring-width);}.filled.svelte-1ncvwuf .preview {flex:none;width:120px !important;height:120px !important;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);padding:8px !important;}.filled.svelte-1ncvwuf .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-1ncvwuf .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) {flex:auto;overflow:hidden;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) .filename:where(.svelte-1ncvwuf) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-1ncvwuf > div:where(.svelte-1ncvwuf) .filename:where(.svelte-1ncvwuf):empty {margin:0;padding:0;}.reorder-controls.svelte-1ncvwuf {flex:none !important;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:4px;border:1px solid var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);height:-moz-available;height:-webkit-fill-available;height:stretch;background-color:var(--sui-secondary-border-color);}.reorder-controls.svelte-1ncvwuf button {padding:0;height:16px;}"};function vS(t,e){se(e,!0),Ee(t,BY);const n=()=>V(Je,"$entryDraft",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=I(e,"readonly",3,!1),a=I(e,"invalid",3,!1),c=I(e,"required",3,!1),u=I(e,"collectionName",3,""),d=I(e,"fileName",3,void 0),f=I(e,"entry",3,void 0);let h=ie(void 0),p=ie(void 0),g=ie(void 0),m=ie(void 0);const v=b(()=>e.widgetName==="image"),_=b(()=>{if(!e.value)return"";if(l(p)){const{publicPath:H,entryRelative:G,hasTemplateTags:W}=n()?.files[e.value].folder??{};return Nc([G||W?"":H||"",decodeURI(l(p).name.normalize())])}if(!e.value.startsWith("blob:")){const H=decodeURI(e.value);if(Yd(H)){const G=new URL(H);if(G.search)return G.search="",`${G}…`}return H}return""}),y=async()=>{if(e.value?.startsWith("blob:")&&n()&&K(p,n().files[e.value]?.file,!0),e.value){const H={value:e.value,entry:f(),collectionName:u(),fileName:d()};e.value.startsWith("blob:")?(K(h,void 0),K(g,e.value?await _C(e.value):void 0,!0),K(m,e.value&&l(g)?await rl({...H,thumbnail:!0}):void 0,!0)):l(v)&&/^https?:/.test(e.value)?(K(h,void 0),K(g,"image"),K(m,e.value,!0)):(K(h,my({...H}),!0),K(g,void 0),K(m,void 0))}else K(h,void 0),K(p,void 0),K(g,void 0),K(m,void 0)};Me(()=>{e.value,Se(()=>{y()})});var w=UY(),x=F(w);{var E=H=>{var G=FY(),W=F(G);{const R=Q=>{Ze(Q,{name:"arrow_upward"})};let B=b(()=>!e.onMoveUp),J=b(()=>r()("move_up"));et(W,{size:"small",iconic:!0,get disabled(){return l(B)},get"aria-label"(){return l(J)},onclick:()=>{e.onMoveUp?.()},startIcon:R,$$slots:{startIcon:!0}})}var Y=z(W,2);{const R=Q=>{Ze(Q,{name:"arrow_downward"})};let B=b(()=>!e.onMoveDown),J=b(()=>r()("move_down"));et(Y,{size:"small",iconic:!0,get disabled(){return l(B)},get"aria-label"(){return l(J)},onclick:()=>{e.onMoveDown?.()},startIcon:R,$$slots:{startIcon:!0}})}S(H,G)};q(x,H=>{(e.onMoveUp||e.onMoveDown)&&!s()&&H(E)})}var $=z(x,2);{var C=H=>{Ho(H,{get kind(){return l(g)},get src(){return l(m)},variant:"tile",checkerboard:!0})},k=H=>{var G=X(),W=D(G);{var Y=B=>{Ho(B,{get kind(){return l(h).kind},get asset(){return l(h)},variant:"tile",checkerboard:!0})},R=B=>{var J=zY(),Q=F(J);Ze(Q,{name:"draft"}),S(B,J)};q(W,B=>{l(h)?B(Y):B(R,!1)},!0)}S(H,G)};q($,H=>{l(g)&&l(m)?H(C):H(k,!1)})}var T=z($,2),A=F(T);{var P=H=>{var G=jY(),W=F(G);Z(()=>{Te(G,"id",`${e.fieldId??""}-value`),Te(G,"aria-readonly",s()),Te(G,"aria-invalid",a()),Te(G,"aria-required",c()),Te(G,"aria-labelledby",`${e.fieldId??""}-label`),Te(G,"aria-errormessage",`${e.fieldId??""}-error`),ne(W,l(_))}),S(H,G)};q(A,H=>{typeof e.value=="string"&&H(P)})}var L=z(A,2),O=F(L);{var N=H=>{{let G=b(()=>r()("replace")),W=b(()=>r()(`replace_${e.widgetName}`));et(H,{get disabled(){return s()},variant:"tertiary",size:"small",get label(){return l(G)},get"aria-label"(){return l(W)},get"aria-controls"(){return`${e.fieldId??""}-value`},onclick:()=>{e.onReplace()}})}};q(O,H=>{e.onReplace&&H(N)})}var M=z(O,2);{var U=H=>{{let G=b(()=>r()("remove")),W=b(()=>r()(`remove_${e.widgetName}`));et(H,{get disabled(){return s()},variant:"tertiary",size:"small",get label(){return l(G)},get"aria-label"(){return l(W)},get"aria-controls"(){return`${e.fieldId??""}-value`},onclick:()=>{e.onRemove()}})}};q(M,H=>{e.onRemove&&H(U)})}S(t,w),ae(),o()}var qY=j('<div role="status"> </div>'),VY=j('<!> <div role="none"><!></div>',1),HY=j('<div role="none"><!></div>');const KY={hash:"svelte-nslz3b",code:".empty.svelte-nslz3b button {flex-direction:column;justify-content:center;height:120px;font-size:var(--sui-font-size-small);}.empty.svelte-nslz3b button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-nslz3b button:disabled {pointer-events:none !important;}.empty.svelte-nslz3b button:disabled * {opacity:0.5;}.empty.invalid.svelte-nslz3b button {border-color:var(--sui-error-border-color);}"};function GY(t,e){se(e,!0),Ee(t,KY);const n=()=>V(ue,"$_",i),r=()=>V(xu,"$hasMouse",i),[i,o]=me();let s=I(e,"showSelectAssetsDialog",15,!1),a=I(e,"replaceMode",15,!1);var c=HY();let u;var d=F(c);{let f=b(()=>e.readonly||e.processing);et(d,{flex:!0,role:"button",variant:"tertiary",get disabled(){return l(f)},tabindex:"0",onclick:()=>{e.readonly||(a(!1),s(!0))},children:(h,p)=>{var g=VY(),m=D(g);Ze(m,{name:"cloud_upload"});var v=z(m,2),_=F(v);{var y=x=>{var E=qY(),$=F(E);Z(C=>ne($,C),[()=>n()("processing_file")]),S(x,E)},w=x=>{var E=X(),$=D(E);{var C=T=>{var A=X(),P=D(A);{var L=N=>{var M=Fe();Z(U=>ne(M,U),[()=>n()("click_to_browse")]),S(N,M)},O=N=>{var M=X(),U=D(M);{var H=W=>{var Y=Fe();Z(R=>ne(Y,R),[()=>n()(`drop_image_${e.multiple?"files":"file"}_or_click_to_browse`)]),S(W,Y)},G=W=>{var Y=Fe();Z(R=>ne(Y,R),[()=>n()(`drop_${e.multiple?"files":"file"}_or_click_to_browse`)]),S(W,Y)};q(U,W=>{e.isImageWidget?W(H):W(G,!1)},!0)}S(N,M)};q(P,N=>{e.allowDrop?N(O,!1):N(L)})}S(T,A)},k=T=>{var A=Fe();Z(P=>ne(A,P),[()=>n()("tap_to_browse")]),S(T,A)};q($,T=>{r()?T(C):T(k,!1)},!0)}S(x,E)};q(_,x=>{e.processing?x(y):x(w,!1)})}S(h,g)},$$slots:{default:!0}})}Z(()=>u=cn(c,1,"empty svelte-nslz3b",null,u,{invalid:e.invalid,processing:e.processing})),S(t,c),ae(),o()}const WY=({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r})=>{const i=Io({collectionName:t,fileName:e,typedKeyPath:n,isIndexFile:r}),o=e?Io({collectionName:t,fileName:e}):void 0,s=Io({collectionName:t}),a=o??s,c=oe(Qc);return{field:{folder:i,enabled:i!==void 0},entry:{folder:a,enabled:!!a&&(a.entryRelative||a.hasTemplateTags)},file:{folder:o,enabled:!!o&&!o.entryRelative&&!o.hasTemplateTags},collection:{folder:s,enabled:!!s&&!s.entryRelative&&!s.hasTemplateTags},global:{folder:c,enabled:c!==void 0}}},bS=async({draft:t,file:e})=>{const n=await Za(e);let r;return await Promise.all(Object.entries(t.files??{}).map(async([i,o])=>{!r&&await Za(o.file)===n&&(r=i)})),r},YY=async({draft:t,resource:e,libraryConfig:n})=>{const{transformations:r,max_file_size:i}=n??{},{url:o,credit:s}=e;let{asset:a,file:c}=e,u="",d;if(c){const f=await bS({draft:t,file:c});if(f)u=f;else{r&&(c=await vC(c,r));const h=await nl(c),{folder:p}=e,g=oe(Bn).find(m=>m.sha===h&&pn(m.folder,p));g?(a=g,c=void 0):c.size>i?(d=c.name,c=void 0):(u=URL.createObjectURL(c),t.files[u]={file:c,folder:p})}}return a&&(a.unsaved?a.file&&(u=await bS({draft:t,file:a.file})):u=Ed(a,{pathOnly:!0,allowSpecial:!0,entry:t.originalEntry})),o&&!c&&!a&&(u=o),{value:u,credit:s?jr.sanitize(s,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]}):"",oversizedFileName:d}};var JY=j('<div role="none" class="item-list svelte-1libnfj"></div> <!>',1),XY=j('<div role="none"> </div> <div role="none"><!></div>',1),ZY=j("<!> <!> <!> <!>",1);const QY={hash:"svelte-1libnfj",code:".item-list.svelte-1libnfj {display:flex;flex-direction:column;gap:4px;}"};function _S(t,e){se(e,!0),Ee(t,QY);const n=()=>V(Je,"$entryDraft",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=ve=>{GY(ve,{get allowDrop(){return l(J)},get invalid(){return p()},get readonly(){return h()},get processing(){return l(E)},get isImageWidget(){return l(N)},get multiple(){return l(G)},get showSelectAssetsDialog(){return l(g)},set showSelectAssetsDialog(fe){K(g,fe,!0)},get replaceMode(){return l(m)},set replaceMode(fe){K(m,fe,!0)}})},a=ve=>{var fe=X(),_e=D(fe);{var Ce=Ne=>{var Ae=X(),$e=D(Ae);{var je=Ie=>{var Re=X(),nt=D(Re);{var Ge=ut=>{var Oe=JY(),be=D(Oe);it(be,23,d,(Ve,Qe)=>`${Ve}|${Qe}`,(Ve,Qe,Xe)=>{{let ht=b(()=>l(Xe)>0?()=>he(l(Xe)-1):void 0),Pt=b(()=>l(Xe)<d().length-1?()=>he(l(Xe)):void 0);vS(Ve,Yt(()=>l(R),{get value(){return l(Qe)},get fieldId(){return`${e.fieldId??""}-${l(Xe)??""}`},onReplace:()=>{K(m,!0),K(v,l(Xe),!0),K(g,!0)},onRemove:()=>re(l(Xe)),get onMoveUp(){return l(ht)},get onMoveDown(){return l(Pt)}}))}});var ye=z(be,2);{var tt=Ve=>{s(Ve)};q(ye,Ve=>{d().length<l(C)&&Ve(tt)})}S(ut,Oe)};q(nt,ut=>{Array.isArray(d())&&ut(Ge)})}S(Ie,Re)},Le=Ie=>{var Re=X(),nt=D(Re);{var Ge=ut=>{vS(ut,Yt(()=>l(R),{get value(){return d()},get fieldId(){return e.fieldId},onReplace:()=>{K(m,!0),K(g,!0)},onRemove:Q}))};q(nt,ut=>{typeof d()=="string"&&d()&&ut(Ge)},!0)}S(Ie,Re)};q($e,Ie=>{l(G)?Ie(je):Ie(Le,!1)})}S(Ne,Ae)},ze=Ne=>{s(Ne)};q(_e,Ne=>{d()?.length&&!l(E)?Ne(Ce):Ne(ze,!1)})}S(ve,fe)},{widgetContext:c=void 0}=sr("field-editor")??{},u=c==="markdown-editor-component";let d=I(e,"currentValue",15),f=I(e,"required",3,!0),h=I(e,"readonly",3,!1),p=I(e,"invalid",3,!1),g=ie(!1),m=ie(!1),v=ie(-1),_=ie(!1),y=ie(!1),w=ie(""),x=ie(void 0),E=ie(!1);const $=b(()=>e.fieldConfig.widget),C=b(()=>st(e.fieldConfig.max,1/0)),k=b(()=>e.fieldConfig.accept),T=b(()=>st(e.fieldConfig.choose_url,!0)),A=b(()=>n()?.originalEntry),P=b(()=>n()?.collectionName??""),L=b(()=>n()?.fileName),O=b(()=>n()?.isIndexFile??!1),N=b(()=>l($)==="image"),M=b(()=>sf({fieldConfig:e.fieldConfig}).config),U=b(()=>WY({collectionName:l(P),fileName:l(L),typedKeyPath:e.typedKeyPath,isIndexFile:l(O)})),H=b(()=>Object.values(l(U)).find(({enabled:ve})=>ve)?.folder),G=b(()=>Xp(e.fieldConfig)&&!u),W=b(()=>l(M).max_file_size),Y=b(()=>!f()&&(!c||!["markdown-editor-component","single-subfield-list-widget"].includes(c))),R=b(()=>({widgetName:l($),readonly:h(),invalid:p(),required:f(),showRemoveButton:l(Y),collectionName:l(P),fileName:l(L),entry:l(A)})),B=b(()=>Object.entries(Kw).filter(([,{isEnabled:ve}])=>ve?.()??!0)),J=b(()=>!l(B).length),Q=()=>{l(x)?.reset(),l(G)||(d(""),Vc())},ee=async ve=>{if(!n())return;Q(),K(E,!0);const fe=await Promise.all(ve.map(Ne=>YY({draft:n(),resource:Ne,libraryConfig:l(M)}))),_e=[],Ce=[],ze=l(G)?Object.keys(n().currentValues[e.locale]).filter(Ne=>Ne.startsWith(`${e.keyPath}.`)).map(Ne=>Number(Ne.replace(`${e.keyPath}.`,""))).pop()??-1:-1;fe.forEach(({value:Ne,credit:Ae,oversizedFileName:$e},je)=>{if(Ne)if(l(G)){const Le=l(m)?l(v):ze+1+je;_t(Je,Se(n).currentValues[e.locale][`${e.keyPath}.${Le}`]=Ne,Se(n))}else d(u?Ne.replaceAll(" ","%20"):Ne);Ae&&_e.push(Ae),$e&&Ce.push($e)}),_e.length?(K(w,_e.join(`
|
|
620
|
+
`),!0),K(y,!0)):K(w,""),Ce.length&&K(_,!0),K(E,!1)},te=({files:ve})=>{ve.length&&ee(ve.map(fe=>({file:fe,folder:l(H)})))},re=ve=>{if(!n())return;const fe=Un(n().currentValues[e.locale]),_e=[];for(let Ce=0;;Ce+=1){const ze=`${e.keyPath}.${Ce}`,Ne=`${e.keyPath}.${Ce+1}`;if(Ce<ve)_e.push(fe[ze]);else if(Ne in fe)_e.push(fe[Ne]),_t(Je,Se(n).currentValues[e.locale][ze]=fe[Ne],Se(n));else{_t(Je,Se(n).currentValues[e.locale][ze]=null,Se(n)),delete n().currentValues[e.locale][ze];break}}d(Object.values(_e))},he=ve=>{n()&&(fe=>{var _e=ji(fe,2);_t(Je,Se(n).currentValues[e.locale][`${e.keyPath}.${ve}`]=_e[0],Se(n)),_t(Je,Se(n).currentValues[e.locale][`${e.keyPath}.${ve+1}`]=_e[1],Se(n))})([n().currentValues[e.locale][`${e.keyPath}.${ve+1}`],n().currentValues[e.locale][`${e.keyPath}.${ve}`]])};var pe=ZY(),ce=D(pe);{var ge=ve=>{{let fe=b(()=>l(k)??(l(N)?Lo.join(","):void 0));xt(ku(ve,{get multiple(){return l(G)},get disabled(){return h()},get accept(){return l(fe)},onDrop:te,children:(_e,Ce)=>{a(_e)},$$slots:{default:!0}}),_e=>K(x,_e,!0),()=>l(x))}},Pe=ve=>{a(ve)};q(ce,ve=>{l(J)?ve(ge):ve(Pe,!1)})}var xe=z(ce,2);{let ve=b(()=>l(N)?"image":void 0),fe=b(()=>l(m)?!1:l(G));MY(xe,{get kind(){return l(ve)},get multiple(){return l(fe)},get accept(){return l(k)},get canEnterURL(){return l(T)},get entryDraft(){return Je},get fieldConfig(){return e.fieldConfig},get assetLibraryFolderMap(){return l(U)},onSelect:ee,get open(){return l(g)},set open(_e){K(g,_e,!0)}})}var de=z(xe,2);{let ve=b(()=>r()("assets_dialog.large_file.title"));sg(de,{get title(){return l(ve)},get open(){return l(_)},set open(fe){K(_,fe,!0)},children:(fe,_e)=>{var Ce=Fe();Z(ze=>ne(Ce,ze),[()=>r()("warning_oversized_file",{values:{size:Kp(l(W))}})]),S(fe,Ce)},$$slots:{default:!0}})}var we=z(de,2);{let ve=b(()=>r()("assets_dialog.photo_credit.title")),fe=b(()=>r()("copy"));cu(we,{get title(){return l(ve)},get okLabel(){return l(fe)},onOk:()=>{navigator.clipboard.writeText(l(w))},get open(){return l(y)},set open(_e){K(y,_e,!0)},children:(_e,Ce)=>{var ze=XY(),Ne=D(ze),Ae=F(Ne),$e=z(Ne,2),je=F($e);Sf(je,{flex:!0,readonly:!0,get value(){return l(w)},onclick:Le=>{Le.target.focus(),Le.target.select()}}),Z(Le=>ne(Ae,Le),[()=>r()("assets_dialog.photo_credit.description")]),S(_e,ze)},$$slots:{default:!0}})}S(t,pe),ae(),o()}var eJ=j("<p><!></p>"),tJ=j("<p> </p>");function yS(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me();let o=ie(void 0),s=ie(void 0);const a=b(()=>n()?.originalEntry),c=b(()=>n()?.collectionName??""),u=b(()=>n()?.fileName);Me(()=>{e.value,Se(async()=>{K(o,e.value?await _C(e.value):void 0,!0),K(s,l(o)?await rl({value:e.value,entry:l(a),collectionName:l(c),fileName:l(u)}):void 0,!0)})});var d=X(),f=D(d);{var h=g=>{var m=eJ(),v=F(m);{let _=b(()=>["audio","video"].includes(l(o)));Ho(v,{get kind(){return l(o)},get src(){return l(s)},get controls(){return l(_)}})}S(g,m)},p=g=>{var m=X(),v=D(m);{var _=y=>{var w=tJ(),x=F(w);Z(()=>ne(x,e.value)),S(y,w)};q(v,y=>{e.value.trim()&&!e.value.startsWith("blob:")&&y(_)},!0)}S(g,m)};q(f,g=>{l(o)&&l(s)?g(h):g(p,!1)})}S(t,d),ae(),i()}function wS(t,e){se(e,!0);var n=X(),r=D(n);{var i=s=>{var a=X(),c=D(a);{var u=d=>{var f=X(),h=D(f);it(h,17,()=>e.currentValue,dr,(p,g)=>{yS(p,{get value(){return l(g)}})}),S(d,f)};q(c,d=>{Array.isArray(e.currentValue)&&d(u)})}S(s,a)},o=s=>{var a=X(),c=D(a);{var u=d=>{yS(d,{get value(){return e.currentValue}})};q(c,d=>{typeof e.currentValue=="string"&&e.currentValue&&d(u)},!0)}S(s,a)};q(r,s=>{Xp(e.fieldConfig)?s(i):s(o,!1)})}S(t,n),ae()}const Gw=({entryDraft:t,valueStoreKey:e="currentValues",keyPath:n,locale:r})=>Object.entries(oe(t)[e][r]??{}).filter(([i])=>i.startsWith(`${n}.`)).map(([i,o])=>[i.replace(`${n}.`,""),o]),nJ=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(o=>o[0]===n)!==r)return"duplicate"}),rJ=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:o}=r;oo.set(!1),t.update(s=>(s&&Object.entries(s.currentValues).forEach(([a,c])=>{(a===n||o==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),s)),oo.set(!0)};var iJ=j('<th scope="col" class="action svelte-18v8t2h"></th>'),oJ=j('<td class="action svelte-18v8t2h"><!></td>'),sJ=j('<tr><td class="key svelte-18v8t2h"><!></td><td class="value svelte-18v8t2h"><!></td><!></tr>'),aJ=j('<table class="svelte-18v8t2h"><thead><tr><th scope="col" class="key svelte-18v8t2h"> </th><th scope="col" class="value svelte-18v8t2h"> </th><!></tr></thead><tbody></tbody></table>'),lJ=j("<!> <!>",1),cJ=j('<!> <!> <div role="none"><!></div>',1);const uJ={hash:"svelte-18v8t2h",code:`table.svelte-18v8t2h {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-18v8t2h,
|
|
621
|
+
td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}th.key.svelte-18v8t2h, th.value.svelte-18v8t2h {width:50%;}td.svelte-18v8t2h {padding:0;vertical-align:middle;}`};function dJ(t,e){se(e,!0),Ee(t,uJ);const n=()=>V(ue,"$_",i),r=()=>V(Je,"$entryDraft",i),[i,o]=me(),{valueStoreKey:s="currentValues"}=sr("field-editor")??{};let a=I(e,"readonly",3,!1);const c=b(()=>st(e.fieldConfig.i18n,!1)),u=b(()=>e.fieldConfig.key_label),d=b(()=>e.fieldConfig.value_label),f=b(()=>st(e.fieldConfig.max,1/0)),h=b(()=>l(u)||n()("key_value.key")),p=b(()=>l(d)||n()("key_value.value"));let g=ie(St([]));const m=St([]);let v=ie(St([])),_=ie(St([]));const y=()=>{if(!r())return;const N=Gw({entryDraft:Je,valueStoreKey:s,keyPath:e.keyPath,locale:e.locale});pn(l(g),N)||(K(g,[...N],!0),K(v,N.map(()=>!1),!0)),!l(g).length&&r()[s][e.locale][e.keyPath]!==null&&_t(Je,Se(r)[s][e.locale][e.keyPath]=null,Se(r))},w=()=>{r()&&(Object.entries(r()[s]).forEach(([O,N])=>{(O===e.locale||l(c)==="duplicate")&&delete N[e.keyPath]}),l(g).push(["",""]),l(v).push(!1),window.requestAnimationFrame(()=>{m[l(g).length-1].querySelector("input").focus()}))},x=O=>{l(g).splice(O,1),l(v).splice(O,1)},E=()=>{if(K(_,nJ({pairs:l(g),edited:l(v)}),!0),!r()||l(_).some(Boolean)||l(g).some(([N])=>!N.trim()))return;rJ({entryDraft:Je,fieldConfig:e.fieldConfig,keyPath:e.keyPath,locale:e.locale,pairs:l(g)})};Me(()=>{Un(r()?.[s][e.locale]),Se(()=>{y()})}),Me(()=>{Un(l(g)),Se(()=>{E()})});var $=cJ(),C=D($);{var k=O=>{var N=aJ(),M=F(N),U=F(M),H=F(U),G=F(H),W=z(H),Y=F(W),R=z(W);{var B=Q=>{var ee=iJ();Z(te=>Te(ee,"aria-label",te),[()=>n()("key_value.action")]),S(Q,ee)};q(R,Q=>{a()||Q(B)})}var J=z(M);it(J,21,()=>l(g),dr,(Q,ee,te)=>{var re=sJ(),he=F(re),pe=F(he);{let de=b(()=>!!l(_)[te]),we=b(()=>l(_)[te]?`${e.fieldId}-kv-error`:void 0);qn(pe,{get readonly(){return a()},flex:!0,get invalid(){return l(de)},get"aria-label"(){return l(h)},get"aria-errormessage"(){return l(we)},oninput:()=>{l(v)[te]=!0},onkeydown:ve=>{ve.key==="Enter"&&!ve.isComposing&&m[te].querySelector("td.value input").focus()},get value(){return l(ee)[0]},set value(ve){l(ee)[0]=ve}})}var ce=z(he),ge=F(ce);qn(ge,{get readonly(){return a()},flex:!0,get"aria-label"(){return l(p)},onkeydown:de=>{de.key==="Enter"&&!de.isComposing&&(te<l(g).length-1?m[te+1].querySelector("input").focus():l(g).length<l(f)&&w())},get value(){return l(ee)[1]},set value(de){l(ee)[1]=de}});var Pe=z(ce);{var xe=de=>{var we=oJ(),ve=F(we);{const fe=Ce=>{Ze(Ce,{name:"close"})};let _e=b(()=>n()("remove"));et(ve,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(_e)},onclick:()=>{x(te)},startIcon:fe,$$slots:{startIcon:!0}})}S(de,we)};q(Pe,de=>{a()||de(xe)})}xt(re,(de,we)=>m[we]=de,de=>m?.[de],()=>[te]),S(Q,re)}),Z(()=>{ne(G,l(h)),ne(Y,l(p))}),S(O,N)};q(C,O=>{l(g).length&&O(k)})}var T=z(C,2);{var A=O=>{Vw(O,{get id(){return`${e.fieldId??""}-kv-error`},children:(N,M)=>{var U=lJ(),H=D(U);{var G=R=>{var B=Fe();Z(J=>ne(B,J),[()=>n()("key_value.empty_key")]),S(R,B)};q(H,R=>{l(_).includes("empty")&&R(G)})}var W=z(H,2);{var Y=R=>{var B=Fe();Z(J=>ne(B,J),[()=>n()("key_value.duplicate_key")]),S(R,B)};q(W,R=>{l(_).includes("duplicate")&&R(Y)})}S(N,U)}})};q(T,O=>{l(_).some(Boolean)&&O(A)})}var P=z(T,2),L=F(P);{let O=b(()=>n()("add")),N=b(()=>a()||l(g).length>=l(f));et(L,{get label(){return l(O)},variant:"tertiary",get disabled(){return l(N)},onclick:()=>{w()}})}S(t,$),ae(),o()}var fJ=j('<tr><td class="svelte-dq8vuc"> </td><td class="svelte-dq8vuc"> </td></tr>'),hJ=j('<table class="svelte-dq8vuc"><thead><tr><th scope="col" class="svelte-dq8vuc"> </th><th scope="col" class="svelte-dq8vuc"> </th></tr></thead><tbody></tbody></table>');const pJ={hash:"svelte-dq8vuc",code:'@charset "UTF-8";table.svelte-dq8vuc {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-dq8vuc {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-dq8vuc:empty::after {content:" ";}'};function gJ(t,e){se(e,!0),Ee(t,pJ);const n=()=>V(ue,"$_",i),r=()=>V(Je,"$entryDraft",i),[i,o]=me(),s=b(()=>e.fieldConfig.key_label),a=b(()=>e.fieldConfig.value_label),c=b(()=>l(s)||n()("key_value.key")),u=b(()=>l(a)||n()("key_value.value"));let d=ie(St([]));const f=()=>{const v=Gw({entryDraft:Je,keyPath:e.keyPath,locale:e.locale});pn(l(d),v)||K(d,v,!0)};Me(()=>{r()&&(Un(r().currentValues[e.locale]),Se(()=>{f()}))});var h=X(),p=D(h);{var g=m=>{var v=hJ(),_=F(v),y=F(_),w=F(y),x=F(w),E=z(w),$=F(E),C=z(_);it(C,21,()=>l(d),dr,(k,T)=>{var A=b(()=>ji(l(T),2));let P=()=>l(A)[0],L=()=>l(A)[1];var O=fJ(),N=F(O),M=F(N),U=z(N),H=F(U);Z(()=>{ne(M,P()),ne(H,L())}),S(k,O)}),Z(()=>{ne(x,l(c)),ne($,l(u))}),S(m,v)};q(p,m=>{l(d).length&&m(g)})}S(t,h),ae(),o()}function DL(t,e){const n=()=>V(sl,"$isRTL",r),[r,i]=me();let o=I(e,"expanded",3,!1);{let s=b(()=>o()?"expand_more":n()?"chevron_left":"chevron_right");Ze(t,{get name(){return l(s)}})}i()}function i_(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"disabled",3,!1),s=I(e,"items",19,()=>[]),a=I(e,"addItem",3,()=>{});const c=b(()=>e.fieldConfig.name),u=b(()=>e.fieldConfig.label),d=b(()=>e.fieldConfig.types),f=b(()=>e.fieldConfig.widget==="list"?e.fieldConfig:void 0),h=b(()=>l(f)?.label_singular??""),p=b(()=>l(f)?.max??void 0),g=b(()=>n()("add_x",{values:{name:l(h)||l(u)||l(c)}})),m=b(()=>o()||typeof l(p)=="number"&&s().length===l(p));var v=X(),_=D(v);{var y=x=>{Ur(x,{variant:"tertiary",get label(){return l(g)},get disabled(){return l(m)},startIcon:k=>{Ze(k,{name:"add"})},endIcon:k=>{},popup:k=>{{let T=b(()=>n()("select_list_type"));hr(k,{get"aria-label"(){return l(T)},children:(A,P)=>{var L=X(),O=D(L);it(O,17,()=>l(d),({name:N,label:M})=>N,(N,M)=>{let U=()=>l(M).name,H=()=>l(M).label;{let G=b(()=>H()||U());vt(N,{get label(){return l(G)},onclick:()=>a()({type:U()})})}}),S(A,L)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},w=x=>{et(x,{variant:"tertiary",get label(){return l(g)},get disabled(){return l(m)},onclick:()=>a()(),startIcon:$=>{Ze($,{name:"add"})},$$slots:{startIcon:!0}})};q(_,x=>{Array.isArray(l(d))?x(y):x(w,!1)})}S(t,v),ae(),i()}var mJ=j('<span role="none" class="type svelte-12y2c75"> </span>'),vJ=j('<div role="none" class="header svelte-12y2c75"><div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div> <div role="none" class="svelte-12y2c75"><!></div></div>');const bJ={hash:"svelte-12y2c75",code:".header.svelte-12y2c75 {display:flex;align-items:center;gap:8px;height:24px;background-color:var(--sui-secondary-border-color);}.header.svelte-12y2c75 > div:where(.svelte-12y2c75) {display:flex;align-items:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):first-child {justify-content:flex-start;width:40%;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):nth-child(2) {width:20%;justify-content:center;}.header.svelte-12y2c75 > div:where(.svelte-12y2c75):last-child {width:40%;justify-content:flex-end;}.header.svelte-12y2c75 button {padding:0;height:16px;}.header.svelte-12y2c75 .type:where(.svelte-12y2c75) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function Ww(t,e){se(e,!0),Ee(t,bJ);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"label",3,""),s=I(e,"expanded",15),a=I(e,"centerContent",3,void 0),c=I(e,"endContent",3,void 0);var u=vJ(),d=F(u),f=F(d);{const v=y=>{DL(y,{get expanded(){return s()}})};let _=b(()=>s()?n()("collapse"):n()("expand"));et(f,{size:"small",get"aria-label"(){return l(_)},get"aria-expanded"(){return s()},get"aria-controls"(){return e.controlId},onclick:()=>{s(!s()),e.toggleExpanded?.()},startIcon:v,children:(y,w)=>{var x=X(),E=D(x);{var $=C=>{var k=mJ(),T=F(k);Z(()=>ne(T,o())),S(C,k)};q(E,C=>{o()&&C($)})}S(y,x)},$$slots:{startIcon:!0,default:!0}})}var h=z(d,2),p=F(h);Ue(p,()=>a()??qe);var g=z(h,2),m=F(g);Ue(m,()=>c()??qe),S(t,u),ae(),i()}const _J=({fieldConfig:t,dynamicValue:e})=>{if(e!==void 0)return e==="true";const{default:n}=t;return typeof n=="boolean"?n:!1},yJ=t=>({[t.keyPath]:_J(t)}),wJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,output_code_only:i=!1,keys:o={code:"code",lang:"lang"}}=t,s=n!==void 0?n:r;if(i)return{[e]:typeof s=="string"?s:""};const a=Bt(s)?s:void 0,c=a?.[o.code]??s,u=a?.[o.lang]??"";return{[e]:{},[`${e}.${o.code}`]:typeof c=="string"?c:"",[`${e}.${o.lang}`]:typeof u=="string"?u:""}},xJ=({fieldConfig:t,dynamicValue:e})=>{const n=t,r=n.default,i=e??r;return typeof i!="string"?"":i==="{{now}}"?O$(N$(n),"",n):i},kJ=t=>({[t.keyPath]:xJ(t)}),xS=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,i=r.default,o=Xp(r);let s="";n!==void 0?s=o?n.split(/,\s*/):n:o?s=Array.isArray(i)?i:[]:s=typeof i=="string"?i:"";const a={};return o&&Array.isArray(s)&&(s=s.map(c=>c.trim()).filter(c=>c!==""),s.length&&(a[e]=[],s.forEach((c,u)=>{a[`${e}.${u}`]=c}))),!o&&typeof s=="string"&&(a[e]=s.trim()),a},SJ=({fieldConfig:t,locale:e,dynamicValue:n})=>{const{email:r="",login:i="",name:o=""}=oe(Fn),{default:s}=t,a=n??s;return typeof a!="string"?a:a.replaceAll(/{{(.+?)}}/g,(c,u)=>u==="locale"?e:u==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):u==="uuid"?Si():u==="uuid_short"?Si("short"):u==="uuid_shorter"?Si("shorter"):u==="author-email"?r:u==="author-login"?i:u==="author-name"?o:"")},ML=t=>({[t.keyPath]:SJ(t)}),EJ=({fieldConfig:t,locale:e})=>{const{default:n}=t,r=ru({fieldConfig:t,locale:e});return Bt(n)?n:r?{"":""}:{}},TJ=t=>{const{keyPath:e,dynamicValue:n}=t;let r;if(n!==void 0)try{const i=JSON.parse(n);Bt(i)&&(r=i)}catch{}return r??=EJ(t),Object.fromEntries(Object.entries(r).filter(([,i])=>typeof i=="string").map(([i,o])=>[`${e}.${i}`,o]))},$J=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t,{fields:i}=t,{types:o}=t;let s;if(n!==void 0?s=n.split(/,\s*/).map(u=>u.trim()).filter(u=>u!==""):s=Array.isArray(r)?r:[],!(Array.isArray(s)&&!!s.length))return{[e]:[]};const c={[e]:s};return i||o?s.forEach((u,d)=>{Bt(u)?Object.entries(ho(u)).forEach(([f,h])=>{c[`${e}.${d}.${f}`]=h}):c[`${e}.${d}`]=u}):s.forEach((u,d)=>{Bt(u)||(c[`${e}.${d}`]=u)}),c},CJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r}=t;let i;if(n!==void 0)try{i=tI(n)}catch{i=n.replace(/<[^>]*>/g,"")}else i=r||"";return{[e]:i}},AJ=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const{default:r,value_type:i="int"}=t,o=n??r,s=typeof o=="string";if(o===void 0)return i==="int"||i==="float"?{[e]:null}:{[e]:""};if(i==="int"){const a=s?Number.parseInt(o,10):o;return Number.isInteger(a)?{[e]:a}:{}}if(i==="float"){const a=s?Number.parseFloat(o):o;return Number.isFinite(a)?{[e]:a}:{}}return s?{[e]:o}:{}},PJ=({fieldConfig:t,keyPath:e,locale:n})=>{const{default:r}=t,{fields:i}=t,{types:o}=t,s=ru({fieldConfig:t,locale:n}),a={};return Bt(r)?(Object.entries(ho(r)).forEach(([c,u])=>{a[`${e}.${c}`]=u}),a):!s||Array.isArray(o)?(a[e]=null,a):(i&&i.length>0&&i.forEach(c=>{FL({content:a,keyPath:[e,c.name].join("."),fieldConfig:c,locale:n,dynamicValues:{}})}),a)},kS=({fieldConfig:t,keyPath:e,dynamicValue:n})=>{const r=t,{default:i,multiple:o=!1}=r,s=n!==void 0?n.split(/,\s*/).map(c=>c.trim()):i,a=Array.isArray(s)&&!!s.length;if(!o){if(n!==void 0){const c=n.split(/,\s*/).map(u=>u.trim());return{[e]:c[0]||""}}return{[e]:s!==void 0?s:""}}return a?Object.fromEntries(s.map((c,u)=>[`${e}.${u}`,c])):{[e]:[]}},SS={boolean:yJ,code:wJ,datetime:kJ,file:xS,hidden:ML,image:xS,keyvalue:TJ,list:$J,markdown:CJ,number:AJ,object:PJ,relation:kS,select:kS},FL=({content:t,keyPath:e,fieldConfig:n,locale:r,dynamicValues:i})=>{const{widget:o="string",default:s}=n;if(o==="compute"){t[e]="";return}const a=e in i&&!/\.\d+(?:\.|$)/.test(e)&&i[e].trim()||void 0;if(o in SS){Object.assign(t,SS[o]({fieldConfig:n,keyPath:e,locale:r,dynamicValue:a}));return}t[e]=a||s||""},Pf=(t,e,n={})=>{const r={};return t.forEach(i=>{FL({content:r,keyPath:i.name,fieldConfig:i,locale:e,dynamicValues:n})}),r},ES=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t[n]!==r&&(t[n]=r)}),Object.keys(t).forEach(n=>{n in e||delete t[n]})},TS=(t,e)=>{const n=new RegExp(`^${Gt(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,o])=>[i.replace(n,"_"),o]).sort();return[ys(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},zL=({locale:t,valueStoreKey:e="currentValues",keyPath:n,manipulate:r})=>{const i=oe(Je),{collection:o,collectionFile:s}=i,{defaultLocale:a}=(s??o)._i18n,[c,u]=TS(i[e][t],n),[d,f]=t===a?TS(i.expanderStates._,n):[[],[]];r({valueList:c,expanderStateList:d}),oo.set(!1),Je.update(h=>(ES(h[e][t],{...ho({[n]:c}),...u}),t===a&&ES(h.expanderStates._,{...ho({[n]:d}),...f}),h)),oo.set(!0)},jL=({key:t,locale:e,collapsed:n=!1})=>{const r=oe(Je),i=r?.expanderStates?._[t];if(i!==void 0)return i;if(n==="auto"){const o=r?.currentValues?.[e]??{},s=new RegExp(`^${Gt(t.replace(/#$/,""))}\\.[^\\.]+$`);return!Object.entries(o).some(([a,c])=>s.test(a)&&!!c)}return!n},Co=t=>{Je.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},UL=({collectionName:t,fileName:e,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{const o=new Set,s={collectionName:t,fileName:e,valueMap:n,isIndexFile:i};return r.split(".").forEach((a,c,u)=>{const d=u.slice(0,c+1).join("."),f=mn({...s,keyPath:d}),h=/\.\d+$/.test(d);if(f?.widget==="object")h&&o.add(d),o.add(`${d}#`);else if(f?.widget==="list")o.add(h?d:`${d}#`);else if(c>0){const p=u.slice(0,c).join("."),g=mn({...s,keyPath:p});g?.widget==="object"&&"fields"in g&&o.add(`${p}.${g.name}#`),g?.widget==="list"&&"field"in g&&o.add(d)}}),[...o]},LJ=({collectionName:t,fileName:e,currentValues:n})=>{const{validities:r,isIndexFile:i}=oe(Je),o={};Object.entries(r??{}).forEach(([s,a])=>{Object.entries(a).forEach(([c,{valid:u}])=>{u||UL({collectionName:t,fileName:e,valueMap:n[s],keyPath:c,isIndexFile:i}).forEach(d=>{o[d]=!0})})}),Co(o)};var NJ=j("<!> <!>",1),OJ=j('<div role="none" class="toolbar top add svelte-1eiee9e"><!></div>'),IJ=j("<!> <!> <!>",1),RJ=j("<!> <!>",1),DJ=j("<!> <!>",1),MJ=j("<!> <!>",1),FJ=j("<!> <!>",1),zJ=j('<div role="none" class="summary svelte-1eiee9e"><!> <!></div>'),jJ=j('<div role="none" class="item svelte-1eiee9e"><!> <div role="none" class="item-body"><!></div></div>'),UJ=j('<div role="none" class="toolbar bottom add svelte-1eiee9e"><!> <!></div>'),BJ=j('<div role="none" class="toolbar top svelte-1eiee9e"><!> <div role="none" class="summary"> </div> <!> <!></div> <!> <div role="none"></div> <!>',1);const qJ={hash:"svelte-1eiee9e",code:".toolbar.svelte-1eiee9e {display:flex;align-items:center;}.toolbar.top.add.svelte-1eiee9e {margin-block:8px 16px !important;}.toolbar.bottom.add.svelte-1eiee9e {margin-block:16px 0 !important;}.item-list.collapsed.svelte-1eiee9e {display:none;}.item.svelte-1eiee9e {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e) {display:flex;align-items:center;gap:8px;padding:8px;}.item.svelte-1eiee9e .summary:where(.svelte-1eiee9e):empty {display:none;}"};function VJ(t,e){const n=Vn();se(e,!0),Ee(t,qJ);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(vn,"$isSmallScreen",s),[s,a]=me(),{valueStoreKey:c="currentValues"}=sr("field-editor")??{},u=b(()=>e.fieldConfig.name),d=b(()=>e.fieldConfig.label),f=b(()=>e.fieldConfig.i18n),h=b(()=>st(e.fieldConfig.allow_add,!0)),p=b(()=>st(e.fieldConfig.allow_remove,!0)),g=b(()=>st(e.fieldConfig.allow_reorder,!0)),m=b(()=>e.fieldConfig.collapsed),v=b(()=>e.fieldConfig.summary),_=b(()=>e.fieldConfig.thumbnail),y=b(()=>st(e.fieldConfig.minimize_collapsed,!1)),w=b(()=>e.fieldConfig.label_singular),x=b(()=>st(e.fieldConfig.max,1/0)),E=b(()=>st(e.fieldConfig.add_to_top,!1)),$=b(()=>e.fieldConfig.field),C=b(()=>e.fieldConfig.fields),k=b(()=>e.fieldConfig.types),T=b(()=>st(e.fieldConfig.typeKey,"type")),A=b(()=>El(e.fieldConfig)),P=b(()=>l(A).hasSingleSubField),L=b(()=>l(A).hasVariableTypes),O=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.(\\d+)(.*)?`)),N=b(()=>r()?.isIndexFile??!1),M=b(()=>r()?.collection),U=b(()=>r()?.collectionName??""),H=b(()=>r()?.collectionFile),G=b(()=>r()?.fileName),W=b(()=>(l(H)??l(M))?._i18n??bo),Y=b(()=>l(W).defaultLocale),R=b(()=>e.locale!==l(Y)&&l(f)==="duplicate"),B=b(()=>Un(r()?.[c][e.locale])??{}),J=b(()=>`${e.keyPath}#`),Q=b(()=>r()?.expanderStates?._[l(J)]??!0),ee=b(()=>ys(Object.fromEntries(Object.entries(l(B)).filter(([Oe])=>l(O).test(Oe)).map(([Oe,be])=>[Oe.replace(new RegExp(`^${Gt(e.keyPath)}`),l(u)),be])))[l(u)]??[]),te=b(()=>l(ee).map((Oe,be)=>{const ye=`${e.keyPath}.${be}`;return[ye,r()?.expanderStates?._[ye]??!0]})),re=b(()=>l(ee).length>=l(x)),he=St([]),pe=()=>{Co({[l(J)]:l(y)==="auto"?!l(ee).length:!l(y),...Object.fromEntries(l(ee).map((Oe,be)=>{const ye=`${e.keyPath}.${be}`;return[ye,jL({key:ye,locale:e.locale,collapsed:l(m)})]}))})},ce=Oe=>{Object.keys(r()?.[c]??{}).forEach(be=>{l(f)!=="duplicate"&&be!==e.locale||zL({locale:be,valueStoreKey:c,keyPath:e.keyPath,manipulate:Oe})})},ge=({index:Oe=l(E)?0:l(ee).length,dupIndex:be,type:ye}={})=>{ce(({valueList:tt,expanderStateList:Ve})=>{const Qe=ye?l(k)?.find(({name:ht})=>ht===ye)?.fields??[]:l(C)??(l($)?[l($)]:[]),Xe=(()=>{if(typeof be=="number")return structuredClone(tt[be]);const ht=ys(Pf(Qe,e.locale));return l(P)&&l($)?ht[l($).name]:ht})();ye&&(Xe[l(T)]=ye),l(P)||(Xe.__sc_item_id=crypto.randomUUID()),tt.splice(Oe,0,Xe),Ve.splice(Oe,0,!0)}),Co({[l(J)]:!0})},Pe=Oe=>{ce(({valueList:be,expanderStateList:ye})=>{be.splice(Oe,1),ye.splice(Oe,1)})},xe=Oe=>{ce(({valueList:be,expanderStateList:ye})=>{l(P)||(be[Oe].__sc_item_id??=crypto.randomUUID(),be[Oe+1].__sc_item_id??=crypto.randomUUID()),[be[Oe],be[Oe+1]]=[be[Oe+1],be[Oe]],[ye[Oe],ye[Oe+1]]=[ye[Oe+1],ye[Oe]]})},de=(Oe,be)=>rz({collectionName:l(U),fileName:l(G),keyPath:e.keyPath,valueMap:l(B),locale:e.locale,summaryTemplate:be,hasSingleSubField:l(P),index:Oe,isIndexFile:l(N)}),we=async Oe=>{if(!l(_))return;const be=`${e.keyPath}.${Oe}.${l(_).replace(/^fields\./,"")}`,ye=l(B)[be];if(!(!ye||mn({collectionName:l(U),fileName:l(G),valueMap:l(B),keyPath:be,isIndexFile:l(N)})?.widget!=="image"))return rl({value:ye,entry:r()?.originalEntry,collectionName:l(U),fileName:l(G)})},ve=async()=>{l(_)&&(he.length=l(ee).length,l(ee).forEach(async(Oe,be)=>{const ye=await we(be);he[be]!==ye&&(he[be]=ye)}))};Me(()=>{l(ee),Se(()=>{ve()})}),Ut(()=>{pe()});var fe=BJ(),_e=D(fe),Ce=F(_e);{const Oe=tt=>{DL(tt,{get expanded(){return l(Q)}})};let be=b(()=>!l(ee).length),ye=b(()=>l(Q)?i()("collapse"):i()("expand"));et(Ce,{iconic:!0,get disabled(){return l(be)},get"aria-label"(){return l(ye)},get"aria-expanded"(){return l(Q)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{Co({[l(J)]:!l(Q)})},startIcon:Oe,$$slots:{startIcon:!0}})}var ze=z(Ce,2),Ne=F(ze),Ae=z(ze,2);ii(Ae,{flex:!0});var $e=z(Ae,2);{var je=Oe=>{var be=NJ(),ye=D(be);{let Ve=b(()=>i()("expand_all")),Qe=b(()=>l(te).every(([,Xe])=>Xe));et(ye,{variant:"tertiary",size:"small",get label(){return l(Ve)},get disabled(){return l(Qe)},onclick:()=>{Co(Object.fromEntries(l(te).map(([Xe])=>[Xe,!0])))}})}var tt=z(ye,2);{let Ve=b(()=>i()("collapse_all")),Qe=b(()=>l(te).every(([,Xe])=>!Xe));et(tt,{variant:"tertiary",size:"small",get label(){return l(Ve)},get disabled(){return l(Qe)},onclick:()=>{Co(Object.fromEntries(l(te).map(([Xe])=>[Xe,!1])))}})}S(Oe,be)};q($e,Oe=>{l(Q)&&l(ee).length>1&&Oe(je)})}var Le=z(_e,2);{var Ie=Oe=>{var be=OJ(),ye=F(be);i_(ye,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},get items(){return l(ee)},addItem:ge}),S(Oe,be)};q(Le,Oe=>{l(h)&&(l(E)||!l(ee).length)&&Oe(Ie)})}var Re=z(Le,2);let nt;it(Re,23,()=>l(ee),(Oe,be)=>Bt(Oe)?Oe.__sc_item_id??be:be,(Oe,be,ye)=>{Hi(Oe,{children:(tt,Ve)=>{const Qe=b(()=>`${e.keyPath}.${l(ye)}`),Xe=b(()=>r()?.expanderStates?._[l(Qe)]??!0),ht=b(()=>l(L)?l(k)?.find(({name:Dt})=>Dt===l(be)[l(T)]):void 0),Pt=b(()=>l(L)?l(ht)?.fields??[]:l(C)??(l($)?[l($)]:[])),Qt=b(()=>l(L)&&l(ht)?.summary||l(v));var en=jJ(),pt=F(en);{const Dt=nn=>{var rn=X(),gt=D(rn);{var Mt=on=>{var yn=IJ(),Cn=D(yn);{const dn=It=>{Ze(It,{name:"arrow_upward"})};let Ot=b(()=>l(R)||l(ye)===0),Nr=b(()=>i()("move_up"));et(Cn,{size:"small",iconic:!0,get disabled(){return l(Ot)},get"aria-label"(){return l(Nr)},onclick:()=>xe(l(ye)-1),startIcon:dn,$$slots:{startIcon:!0}})}var An=z(Cn,2);ii(An,{});var Tt=z(An,2);{const dn=It=>{Ze(It,{name:"arrow_downward"})};let Ot=b(()=>l(R)||l(ye)===l(ee).length-1),Nr=b(()=>i()("move_down"));et(Tt,{iconic:!0,size:"small",get disabled(){return l(Ot)},get"aria-label"(){return l(Nr)},onclick:()=>xe(l(ye)),startIcon:dn,$$slots:{startIcon:!0}})}S(on,yn)};q(gt,on=>{l(g)&&on(Mt)})}S(nn,rn)},bn=nn=>{var rn=FJ(),gt=D(rn);{var Mt=Cn=>{{const An=dn=>{{let Ot=b(()=>i()("translation_options"));hr(dn,{get"aria-label"(){return l(Ot)},children:(Nr,It)=>{var li=MJ(),er=D(li);{let Vr=b(()=>i()("duplicate"));vt(er,{get label(){return l(Vr)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)+1,dupIndex:l(ye)})})}var qr=z(er,2);{var Gi=Vr=>{var fn=RJ(),dt=D(fn);{const Xt=Wi=>{var Or=X(),jn=D(Or);it(jn,17,()=>l(k)??[],({name:Ln,label:pr})=>Ln,(Ln,pr)=>{let Oi=()=>l(pr).name,Xo=()=>l(pr).label;{let Hn=b(()=>Xo()||Oi());vt(Ln,{get label(){return l(Hn)},onclick:()=>ge({index:l(ye),type:Oi()})})}}),S(Wi,Or)};let ar=b(()=>i()("add_item_above"));vt(dt,{get label(){return l(ar)},get disabled(){return l(re)},items:Xt,$$slots:{items:!0}})}var $t=z(dt,2);{const Xt=Wi=>{var Or=X(),jn=D(Or);it(jn,17,()=>l(k)??[],({name:Ln,label:pr})=>Ln,(Ln,pr)=>{let Oi=()=>l(pr).name,Xo=()=>l(pr).label;{let Hn=b(()=>Xo()||Oi());vt(Ln,{get label(){return l(Hn)},onclick:()=>ge({index:l(ye)+1,type:Oi()})})}}),S(Wi,Or)};let ar=b(()=>i()("add_item_below"));vt($t,{get label(){return l(ar)},get disabled(){return l(re)},items:Xt,$$slots:{items:!0}})}S(Vr,fn)},Jo=Vr=>{var fn=DJ(),dt=D(fn);{let Xt=b(()=>i()("add_item_above"));vt(dt,{get label(){return l(Xt)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)})})}var $t=z(dt,2);{let Xt=b(()=>i()("add_item_below"));vt($t,{get label(){return l(Xt)},get disabled(){return l(re)},onclick:()=>ge({index:l(ye)+1})})}S(Vr,fn)};q(qr,Vr=>{l(L)?Vr(Gi):Vr(Jo,!1)})}S(Nr,li)},$$slots:{default:!0}})}};let Tt=b(()=>i()("list_item_options"));Ur(Cn,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(Tt)},get disabled(){return l(R)},popup:An,$$slots:{popup:!0}})}};q(gt,Cn=>{l(h)&&Cn(Mt)})}var on=z(gt,2);{var yn=Cn=>{{const An=dn=>{Ze(dn,{name:"close"})};let Tt=b(()=>i()("remove"));et(Cn,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(Tt)},onclick:()=>Pe(l(ye)),startIcon:An,$$slots:{startIcon:!0}})}};q(on,Cn=>{l(p)&&Cn(yn)})}S(nn,rn)};let Et=b(()=>l(L)?l(ht)?.label||l(ht)?.name:""),_n=b(()=>l(Pt).length?()=>Co({[l(Qe)]:!l(Xe)}):void 0);Ww(pt,{get label(){return l(Et)},get controlId(){return`list-${n}-item-${l(ye)??""}-body`},get expanded(){return l(Xe)},get toggleExpanded(){return l(_n)},centerContent:Dt,endContent:bn,$$slots:{centerContent:!0,endContent:!0}})}var kt=z(pt,2),tn=F(kt);{var $n=Dt=>{var bn=X(),Et=D(bn);it(Et,17,()=>l(Pt),_n=>_n.name,(_n,nn)=>{Hi(_n,{children:(rn,gt)=>{{let Mt=b(()=>l(P)?l(Qe):`${l(Qe)}.${l(nn).name}`),on=b(()=>l(L)?`${e.keyPath}.*<${l(be)[l(T)]}>.${l(nn).name}`:`${e.keyPath}.*.${l(nn).name}`),yn=b(()=>l(P)?"single-subfield-list-widget":void 0);Lg(rn,{get keyPath(){return l(Mt)},get typedKeyPath(){return l(on)},get locale(){return e.locale},get fieldConfig(){return l(nn)},get context(){return l(yn)}})}},$$slots:{default:!0}})}),S(Dt,bn)},ai=Dt=>{var bn=zJ(),Et=F(bn);{var _n=rn=>{$g(rn,{get src(){return he[l(ye)]},variant:"icon",cover:!0})};q(Et,rn=>{he[l(ye)]&&rn(_n)})}var nn=z(Et,2);{let rn=b(()=>o()?2:1);Pr(nn,{get lines(){return l(rn)},children:(gt,Mt)=>{var on=Fe();Z(yn=>ne(on,yn),[()=>de(l(ye),l(Qt))]),S(gt,on)},$$slots:{default:!0}})}S(Dt,bn)};q(tn,Dt=>{l(Xe)?Dt($n):Dt(ai,!1)})}Z(()=>Te(kt,"id",`list-${n}-item-${l(ye)??""}-body`)),S(tt,en)},$$slots:{default:!0}})});var Ge=z(Re,2);{var ut=Oe=>{var be=UJ(),ye=F(be);i_(ye,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},get items(){return l(ee)},addItem:ge});var tt=z(ye,2);ii(tt,{flex:!0}),S(Oe,be)};q(Ge,Oe=>{l(h)&&!l(E)&&l(ee).length&&Oe(ut)})}Z(()=>{Te(ze,"id",`object-${n}-summary`),ne(Ne,`${l(ee).length??""}
|
|
622
622
|
${((l(ee).length===1?l(w):void 0)||l(d)||l(u))??""}`),Te(Re,"id",`list-${n}-item-list`),nt=cn(Re,1,"item-list svelte-1eiee9e",null,nt,{collapsed:!l(Q)})}),S(t,fe),ae(),a()}function HJ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=ie(!1),d=ie("");const f=b(()=>e.fieldConfig.i18n),h=()=>{K(d,e.currentValue?.join(`
|
|
623
|
-
`)??"",!0)},p=()=>{const g=l(d).split(/\n/g);Object.keys(n()?.[o]??{}).forEach(m=>{l(f)!=="duplicate"&&m!==e.locale||(Object.keys(n()?.[o][m]??{}).forEach(v=>{v.match(`^${Gt(e.keyPath)}\\.\\d+$`)&&delete n()?.[o][m][v]}),g.forEach((v,_)=>{_t(Je,Se(n)[o][m][`${e.keyPath}.${_}`]=v,Se(n))}))})};Ut(()=>{K(u,!0)}),Me(()=>{l(u)&&(e.currentValue,Se(()=>{h()}))}),Sf(t,{autoResize:!0,flex:!0,get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-errormessage"(){return`${e.fieldId??""}-error`},oninput:()=>{p()},get value(){return l(d)},set value(g){K(d,g,!0)}}),ae(),i()}function KJ(t,e){const n=Vn();se(e,!0);let r=at(e,["$$slots","$$events","$$legacy","fieldConfig"]);zo(t,{get"aria-labelledby"(){return`list-${n}-summary`},children:(i,o)=>{var s=X(),a=D(s);{var c=d=>{{let f=b(()=>({...r,fieldConfig:e.fieldConfig}));VJ(d,Yt(()=>l(f)))}},u=d=>{{let f=b(()=>({...r,fieldConfig:e.fieldConfig}));HJ(d,Yt(()=>l(f)))}};q(a,d=>{El(e.fieldConfig).hasSubFields?d(c):d(u,!1)})}S(i,s)},$$slots:{default:!0}}),ae()}var GJ=j('<section role="group" tabindex="0" class="svelte-s650n2"><h4 class="svelte-s650n2"> </h4> <!></section>');const WJ={hash:"svelte-s650n2",code:"[role='document'] section.svelte-s650n2 {overflow:hidden;margin:8px 0;padding:8px 0;}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2):not(:last-child) {margin-bottom:8px;}[role='document'] section.svelte-s650n2 > * {margin-inline:auto;max-width:768px;}[role='document'] section.svelte-s650n2 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}[role='document'] section.svelte-s650n2 img {max-height:800px !important;}"};function Yw(t,e){se(e,!0),Ee(t,WJ);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.name),s=b(()=>st(e.fieldConfig.label,"")),a=b(()=>st(e.fieldConfig.widget,"string")),c=b(()=>st(e.fieldConfig.preview,!0)),u=b(()=>st(e.fieldConfig.i18n,!1)),d=b(()=>nu(e.fieldConfig)),f=b(()=>l(a)==="list"||l(d)),h=b(()=>n()?.isIndexFile??!1),p=b(()=>n()?.collection),g=b(()=>n()?.collectionName??""),m=b(()=>n()?.collectionFile),v=b(()=>n()?.fileName),_=b(()=>jn(n()?.currentValues[e.locale]??{})),y=b(()=>UL({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath,isIndexFile:l(h)})),w=b(()=>(l(m)??l(p))?._i18n??bo),x=b(()=>l(w).i18nEnabled),E=b(()=>l(w).defaultLocale),$=b(()=>l(x)&&(l(u)===!0||l(u)==="translate")),C=b(()=>l(x)&&l(u)==="duplicate"),k=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+$`)),T=b(()=>l(f)?Object.entries(l(_)).filter(([N])=>l(k).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{Co(Object.fromEntries(l(y).map(N=>[N,!0]))),window.requestAnimationFrame(()=>{const N=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);if(N){typeof N.scrollIntoViewIfNeeded=="function"?N.scrollIntoViewIfNeeded():N.scrollIntoView();const M=N.querySelector(".widget-wrapper");(M?.querySelector('[contenteditable="true"], [tabindex="0"]')??M?.querySelector("input, textarea, button"))?.focus()}})};var P=X(),L=D(P);{var O=N=>{var M=GJ();M.__keydown=Y=>{Y.key==="Enter"&&(Y.stopPropagation(),A())},M.__click=Y=>{Y.stopPropagation(),A()};var U=F(M),H=F(U),G=z(U,2);{var W=Y=>{const R=b(()=>CS[l(a)]);var B=X(),J=D(B);ur(J,()=>l(R),(Q,ee)=>{ee(Q,{get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(T)}})}),S(Y,B)};q(G,Y=>{l(a)in CS&&Y(W)})}Z(()=>{Te(M,"data-widget",l(a)),Te(M,"data-key-path",e.keyPath),Te(M,"data-typed-key-path",e.typedKeyPath),ne(H,l(s)||l(o))}),S(N,M)};q(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(E)||l($)||l(C))&&N(O)})}S(t,P),ae(),i()}wl(["keydown","click"]);var YJ=j('<div role="none" class="header svelte-1fo9sk9"> </div>'),JJ=j('<div role="group" class="subsection svelte-1fo9sk9"><!> <div role="none" class="items svelte-1fo9sk9"><!></div></div>');const XJ={hash:"svelte-1fo9sk9",code:".subsection.svelte-1fo9sk9 {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1fo9sk9 .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1fo9sk9 {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1fo9sk9 {padding:8px 16px;}.items.svelte-1fo9sk9:empty {display:none;}"};function BL(t,e){const n=Vn();Ee(t,XJ);const r=`${n}-header`;var i=JJ(),o=F(i);{var s=u=>{var d=YJ(),f=F(d);Z(()=>{Te(d,"id",r),ne(f,e.label)}),S(u,d)};q(o,u=>{e.label&&u(s)})}var a=z(o,2),c=F(a);Ue(c,()=>e.children??qe),Z(()=>Te(i,"aria-labelledby",e.label?r:void 0)),S(t,i)}function ZJ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.name),s=b(()=>e.fieldConfig.field),a=b(()=>e.fieldConfig.fields),c=b(()=>e.fieldConfig.types),u=b(()=>st(e.fieldConfig.typeKey,"type")),d=b(()=>El(e.fieldConfig)),f=b(()=>l(d).hasSingleSubField),h=b(()=>l(d).hasVariableTypes),p=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+`)),g=b(()=>ys(Object.fromEntries(Object.entries(jn(n()?.currentValues[e.locale])??{}).filter(([_])=>l(p).test(_)).map(([_,y])=>[_.replace(new RegExp(`^${Gt(e.keyPath)}`),l(o)),y])))[l(o)]??[]);var m=X(),v=D(m);it(v,19,()=>l(g),(_,y)=>Bt(_)?_.__sc_item_id??y:y,(_,y,w)=>{Hi(_,{children:(x,E)=>{const $=b(()=>`${e.keyPath}.${l(w)}`),C=b(()=>Array.isArray(l(c))?n()?.currentValues[e.locale][`${l($)}.${l(u)}`]:void 0),k=b(()=>l(c)?.find(({name:P})=>P===l(C))),T=b(()=>l(k)?l(k).label||l(k).name:void 0),A=b(()=>l(C)?l(k)?.fields??[]:l(a)??(l(s)?[l(s)]:[]));BL(x,{get label(){return l(T)},children:(P,L)=>{var O=X(),N=D(O);it(N,17,()=>l(A),M=>M.name,(M,U)=>{Hi(M,{children:(H,G)=>{{let W=b(()=>l(f)?l($):`${l($)}.${l(U).name}`),Y=b(()=>l(h)?`${e.keyPath}.*<${l(C)}>.${l(U).name}`:`${e.keyPath}.*.${l(U).name}`);Yw(H,{get keyPath(){return l(W)},get typedKeyPath(){return l(Y)},get locale(){return e.locale},get fieldConfig(){return l(U)}})}},$$slots:{default:!0}})}),S(P,O)}})},$$slots:{default:!0}})}),S(t,m),ae(),i()}var QJ=j("<li> </li>"),eX=j('<ul dir="auto"></ul>');function tX(t,e){se(e,!0);var n=X(),r=D(n);{var i=o=>{var s=eX();it(s,21,()=>e.currentValue,dr,(a,c)=>{var u=QJ(),d=F(u);Z(()=>ne(d,l(c))),S(a,u)}),Z(a=>{Te(s,"lang",a),s.dir=s.dir},[()=>Ar(e.locale)]),S(o,s)};q(r,o=>{Array.isArray(e.currentValue)&&e.currentValue.length&&o(i)})}S(t,n),ae()}function nX(t,e){se(e,!0);let n=at(e,["$$slots","$$events","$$legacy","fieldConfig"]);var r=X(),i=D(r);{var o=a=>{{let c=b(()=>({...n,fieldConfig:e.fieldConfig}));ZJ(a,Yt(()=>l(c)))}},s=a=>{{let c=b(()=>({...n,fieldConfig:e.fieldConfig}));tX(a,Yt(()=>l(c)))}};q(i,a=>{El(e.fieldConfig).hasSubFields?a(o):a(s,!1)})}S(t,r),ae()}var rX=j('<div role="alert" class="search-result searching svelte-s9eab1"> </div>'),iX=j('<div role="alert" class="search-result no-result svelte-s9eab1"> </div>'),oX=j('<div role="none" class="toolbar svelte-s9eab1"><!> <!> <!></div> <!> <div role="application"></div> <!>',1);const sX={hash:"svelte-s9eab1",code:".toolbar.svelte-s9eab1 {display:flex;align-items:center;margin-bottom:var(--sui-spacing-2x);}.search-result.svelte-s9eab1 {padding:12px;color:var(--sui-secondary-foreground-color);}.map.svelte-s9eab1 {margin:var(--sui-focus-ring-width);border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);overflow:hidden;height:400px;background-clip:text;}.map.invalid.svelte-s9eab1 {border-color:var(--sui-error-border-color);}.leaflet-container {font-family:inherit !important;font-size:var(--sui-font-size-small) !important;}.leaflet-container a {color:var(--sui-primary-accent-color-text) !important;text-decoration:none !important;}.leaflet-bar a {border-color:var(--sui-button-border-color) !important;color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-button-background-color) !important;}.leaflet-control {color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-secondary-background-color-translucent) !important;}.leaflet-control-attribution {padding:4px 8px;}:root[data-theme='dark'] .leaflet-layer {filter:invert(100%) hue-rotate(180deg);}"};function aX(t,e){se(e,!0),Ee(t,sX);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"readonly",3,!1),a=I(e,"invalid",3,!1);const c=b(()=>st(e.fieldConfig.decimals,7)),u=b(()=>st(e.fieldConfig.type,"Point")),d=b(()=>l(u).toLowerCase());let f=ie(void 0),h=ie(void 0),p=ie(""),g=ie(""),m=ie(void 0),v=ie(!1),_=ie(!1),y=ie(""),w=0,x;const E=async()=>{if(!l(f))return;const ee=await Fa("leaflet","dist/leaflet-src.esm.js");x=ee.map(l(f),{center:[0,0],zoom:2}),ee.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(x),l(f).querySelectorAll('a[href^="https:"]').forEach(xe=>{xe.setAttribute("target","_blank"),xe.setAttribute("rel","noopener noreferrer")}),new ResizeObserver(()=>{x?.invalidateSize()}).observe(l(f));const{TerraDraw:te,TerraDrawLineStringMode:re,TerraDrawPointMode:he,TerraDrawPolygonMode:pe}=await Fa("terra-draw","dist/terra-draw.module.js"),{TerraDrawLeafletAdapter:ce}=await Fa("terra-draw-leaflet-adapter","dist/terra-draw-leaflet-adapter.module.js?module"),ge={Point:he,LineString:re,Polygon:pe},Pe=new te({adapter:new ce({lib:ee,map:x}),modes:[new ge[l(u)]]});Pe.start(),Pe.setMode(l(d)),Pe.on("change",(xe,de)=>{$(de)}),K(h,Pe,!0)},$=ee=>{if(!l(h))return;const te=l(h).getSnapshot(),re=te[te.length-1];!re||ee!==(l(u)==="Point"?"create":"delete")||(K(p,JSON.stringify({type:l(u),coordinates:re.geometry.coordinates.map(he=>Array.isArray(he)?he.map(pe=>Array.isArray(pe)?pe.map(ce=>Ea(ce,l(c))):Ea(pe,l(c))):Ea(he,l(c)))}),!0),te.length>1&&l(h).removeFeatures(te.filter(he=>he.id!==re.id).map(he=>he.id)))},C=()=>{if(!l(h))return;let ee=o()??"",te;try{if(ee!==void 0&&(te=JSON.parse(ee),!Bt(te)||te.type!==l(u)||!Array.isArray(te.coordinates)))throw new Error("Invalid object")}catch{ee="",te=void 0}if(l(p)!==ee&&(K(p,ee,!0),l(h).clear(),te&&(l(h).addFeatures([{type:"Feature",geometry:te,properties:{mode:l(d)}}]),te.coordinates.every(re=>typeof re=="number")))){const[re,he]=te.coordinates;x?.setView([he,re],15)}},k=()=>{if(!l(h))return;const ee=l(p);o()!==ee&&o(ee)},T=()=>{window.clearTimeout(w),w=window.setTimeout(async()=>{const ee=l(g).trim();if(!ee)return;K(v,!0);const re=`https://nominatim.openstreetmap.org/search?${new URLSearchParams({q:ee,format:"jsonv2"})}`;try{K(m,await lf(re),!0)}catch{K(m,[],!0)}K(v,!1)},500)},A=({latitude:ee,longitude:te})=>{if(!l(h)||(ee=Ea(ee,l(c)),te=Ea(te,l(c)),x?.setView([ee,te],15),l(u)!=="Point"))return;const re={type:"Point",coordinates:[te,ee]};l(h).clear(),l(h).addFeatures([{type:"Feature",geometry:re,properties:{mode:"point"}}]),K(p,JSON.stringify(re),!0)},P=({lat:ee,lon:te})=>{A({latitude:parseFloat(ee),longitude:parseFloat(te)})},L=()=>{if(!navigator.geolocation){K(_,!0),K(y,n()("geolocation_unsupported"),!0);return}navigator.geolocation.getCurrentPosition(({coords:{latitude:ee,longitude:te}})=>{A({latitude:ee,longitude:te})},ee=>{K(_,!0),K(y,n()("geolocation_error_body"),!0),console.error("Error getting current location:",ee)})},O=()=>{o("")};Ut(()=>{E()}),Me(()=>{l(h),o(),Se(()=>{C()})}),Me(()=>{l(p),Se(()=>{k()})}),Me(()=>{l(g),Se(()=>{T()})});var N=oX(),M=D(N),U=F(M);{let ee=b(()=>n()("find_place"));ag(U,{get readonly(){return s()},flex:!0,get placeholder(){return l(ee)},get value(){return l(g)},set value(te){K(g,te,!0)}})}var H=z(U,2);{const ee=he=>{Ze(he,{name:"near_me"})};let te=b(()=>n()("use_your_location")),re=b(()=>n()("use_your_location"));et(H,{variant:"tertiary",iconic:!0,get title(){return l(te)},get"aria-label"(){return l(re)},get disabled(){return s()},onclick:()=>{L()},startIcon:ee,$$slots:{startIcon:!0}})}var G=z(H,2);{let ee=b(()=>n()("clear")),te=b(()=>s()||!o());et(G,{variant:"tertiary",get label(){return l(ee)},get disabled(){return l(te)},onclick:()=>{O()}})}var W=z(M,2);{var Y=ee=>{var te=rX(),re=F(te);Z(he=>ne(re,he),[()=>n()("searching")]),S(ee,te)},R=ee=>{var te=X(),re=D(te);{var he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{var de=X(),we=D(de);{var ve=_e=>{{let Ce=b(()=>n()("search_results"));uu(_e,{get"aria-label"(){return l(Ce)},children:(ze,Ne)=>{var Ae=X(),$e=D(Ae);it($e,17,()=>l(m),je=>je.place_id,(je,Le)=>{Tr(je,{get label(){return l(Le).display_name},onSelect:()=>{P(l(Le))}})}),S(ze,Ae)},$$slots:{default:!0}})}},fe=_e=>{var Ce=iX(),ze=F(Ce);Z(Ne=>ne(ze,Ne),[()=>n()("no_results")]),S(_e,Ce)};q(we,_e=>{l(m).length?_e(ve):_e(fe,!1)})}S(xe,de)};q(ge,xe=>{l(m)&&xe(Pe)})}S(pe,ce)};q(re,pe=>{l(g)&&pe(he)},!0)}S(ee,te)};q(W,ee=>{l(v)?ee(Y):ee(R,!1)})}var B=z(W,2);let J;xt(B,ee=>K(f,ee),()=>l(f));var Q=z(B,2);{let ee=b(()=>n()("geolocation_error_title"));sg(Q,{get title(){return l(ee)},get open(){return l(_)},set open(te){K(_,te,!0)},children:(te,re)=>{var he=Fe();Z(()=>ne(he,l(y))),S(te,he)},$$slots:{default:!0}})}Z(()=>{J=cn(B,1,"map svelte-s9eab1",null,J,{invalid:a()}),B.inert=s()}),S(t,N),ae(),i()}var lX=j('<pre class="svelte-ise554"> </pre>');const cX={hash:"svelte-ise554",code:"pre.svelte-ise554 {white-space:pre-wrap;}"};function uX(t,e){Ee(t,cX);var n=X(),r=D(n);{var i=o=>{var s=lX(),a=F(s);Z(()=>ne(a,e.currentValue)),S(o,s)};q(r,o=>{e.currentValue&&o(i)})}S(t,n)}const Vd=/^.+?:\w+:/,dX=["rich_text","raw"],fX={rich_text:"rich-text",raw:"plain-text"},hX=["bold","italic","strikethrough","code","link","heading-one","heading-two","heading-three","heading-four","heading-five","heading-six","bulleted-list","numbered-list","quote"],pX={bold:"bold",italic:"italic",strikethrough:"strikethrough",code:"code",link:"link","heading-one":"heading-1","heading-two":"heading-2","heading-three":"heading-3","heading-four":"heading-4","heading-five":"heading-5","heading-six":"heading-6","bulleted-list":"bulleted-list","numbered-list":"numbered-list",quote:"blockquote","code-block":"code-block"},gX=["code-block","image"];var mX=j('<div role="group" class="wrapper svelte-ykjmq3" contenteditable="false" tabindex="0"><!> <div role="none" class="item-list"><!></div></div>');const vX={hash:"svelte-ykjmq3",code:`.wrapper.svelte-ykjmq3 {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-ykjmq3:focus {outline-color:var(--sui-primary-accent-color-translucent);}
|
|
623
|
+
`)??"",!0)},p=()=>{const g=l(d).split(/\n/g);Object.keys(n()?.[o]??{}).forEach(m=>{l(f)!=="duplicate"&&m!==e.locale||(Object.keys(n()?.[o][m]??{}).forEach(v=>{v.match(`^${Gt(e.keyPath)}\\.\\d+$`)&&delete n()?.[o][m][v]}),g.forEach((v,_)=>{_t(Je,Se(n)[o][m][`${e.keyPath}.${_}`]=v,Se(n))}))})};Ut(()=>{K(u,!0)}),Me(()=>{l(u)&&(e.currentValue,Se(()=>{h()}))}),Sf(t,{autoResize:!0,flex:!0,get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-errormessage"(){return`${e.fieldId??""}-error`},oninput:()=>{p()},get value(){return l(d)},set value(g){K(d,g,!0)}}),ae(),i()}function KJ(t,e){const n=Vn();se(e,!0);let r=at(e,["$$slots","$$events","$$legacy","fieldConfig"]);zo(t,{get"aria-labelledby"(){return`list-${n}-summary`},children:(i,o)=>{var s=X(),a=D(s);{var c=d=>{{let f=b(()=>({...r,fieldConfig:e.fieldConfig}));VJ(d,Yt(()=>l(f)))}},u=d=>{{let f=b(()=>({...r,fieldConfig:e.fieldConfig}));HJ(d,Yt(()=>l(f)))}};q(a,d=>{El(e.fieldConfig).hasSubFields?d(c):d(u,!1)})}S(i,s)},$$slots:{default:!0}}),ae()}var GJ=j('<section role="group" tabindex="0" class="svelte-s650n2"><h4 class="svelte-s650n2"> </h4> <!></section>');const WJ={hash:"svelte-s650n2",code:"[role='document'] section.svelte-s650n2 {overflow:hidden;margin:8px 0;padding:8px 0;}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}[role='document'] section.svelte-s650n2 h4:where(.svelte-s650n2):not(:last-child) {margin-bottom:8px;}[role='document'] section.svelte-s650n2 > * {margin-inline:auto;max-width:768px;}[role='document'] section.svelte-s650n2 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}[role='document'] section.svelte-s650n2 img {max-height:800px !important;}"};function Yw(t,e){se(e,!0),Ee(t,WJ);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.name),s=b(()=>st(e.fieldConfig.label,"")),a=b(()=>st(e.fieldConfig.widget,"string")),c=b(()=>st(e.fieldConfig.preview,!0)),u=b(()=>st(e.fieldConfig.i18n,!1)),d=b(()=>nu(e.fieldConfig)),f=b(()=>l(a)==="list"||l(d)),h=b(()=>n()?.isIndexFile??!1),p=b(()=>n()?.collection),g=b(()=>n()?.collectionName??""),m=b(()=>n()?.collectionFile),v=b(()=>n()?.fileName),_=b(()=>Un(n()?.currentValues[e.locale]??{})),y=b(()=>UL({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath,isIndexFile:l(h)})),w=b(()=>(l(m)??l(p))?._i18n??bo),x=b(()=>l(w).i18nEnabled),E=b(()=>l(w).defaultLocale),$=b(()=>l(x)&&(l(u)===!0||l(u)==="translate")),C=b(()=>l(x)&&l(u)==="duplicate"),k=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+$`)),T=b(()=>l(f)?Object.entries(l(_)).filter(([N])=>l(k).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{Co(Object.fromEntries(l(y).map(N=>[N,!0]))),window.requestAnimationFrame(()=>{const N=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);if(N){typeof N.scrollIntoViewIfNeeded=="function"?N.scrollIntoViewIfNeeded():N.scrollIntoView();const M=N.querySelector(".widget-wrapper");(M?.querySelector('[contenteditable="true"], [tabindex="0"]')??M?.querySelector("input, textarea, button"))?.focus()}})};var P=X(),L=D(P);{var O=N=>{var M=GJ();M.__keydown=Y=>{Y.key==="Enter"&&(Y.stopPropagation(),A())},M.__click=Y=>{Y.stopPropagation(),A()};var U=F(M),H=F(U),G=z(U,2);{var W=Y=>{const R=b(()=>CS[l(a)]);var B=X(),J=D(B);ur(J,()=>l(R),(Q,ee)=>{ee(Q,{get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(T)}})}),S(Y,B)};q(G,Y=>{l(a)in CS&&Y(W)})}Z(()=>{Te(M,"data-widget",l(a)),Te(M,"data-key-path",e.keyPath),Te(M,"data-typed-key-path",e.typedKeyPath),ne(H,l(s)||l(o))}),S(N,M)};q(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(E)||l($)||l(C))&&N(O)})}S(t,P),ae(),i()}wl(["keydown","click"]);var YJ=j('<div role="none" class="header svelte-1fo9sk9"> </div>'),JJ=j('<div role="group" class="subsection svelte-1fo9sk9"><!> <div role="none" class="items svelte-1fo9sk9"><!></div></div>');const XJ={hash:"svelte-1fo9sk9",code:".subsection.svelte-1fo9sk9 {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1fo9sk9 .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1fo9sk9 {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1fo9sk9 {padding:8px 16px;}.items.svelte-1fo9sk9:empty {display:none;}"};function BL(t,e){const n=Vn();Ee(t,XJ);const r=`${n}-header`;var i=JJ(),o=F(i);{var s=u=>{var d=YJ(),f=F(d);Z(()=>{Te(d,"id",r),ne(f,e.label)}),S(u,d)};q(o,u=>{e.label&&u(s)})}var a=z(o,2),c=F(a);Ue(c,()=>e.children??qe),Z(()=>Te(i,"aria-labelledby",e.label?r:void 0)),S(t,i)}function ZJ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.name),s=b(()=>e.fieldConfig.field),a=b(()=>e.fieldConfig.fields),c=b(()=>e.fieldConfig.types),u=b(()=>st(e.fieldConfig.typeKey,"type")),d=b(()=>El(e.fieldConfig)),f=b(()=>l(d).hasSingleSubField),h=b(()=>l(d).hasVariableTypes),p=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+`)),g=b(()=>ys(Object.fromEntries(Object.entries(Un(n()?.currentValues[e.locale])??{}).filter(([_])=>l(p).test(_)).map(([_,y])=>[_.replace(new RegExp(`^${Gt(e.keyPath)}`),l(o)),y])))[l(o)]??[]);var m=X(),v=D(m);it(v,19,()=>l(g),(_,y)=>Bt(_)?_.__sc_item_id??y:y,(_,y,w)=>{Hi(_,{children:(x,E)=>{const $=b(()=>`${e.keyPath}.${l(w)}`),C=b(()=>Array.isArray(l(c))?n()?.currentValues[e.locale][`${l($)}.${l(u)}`]:void 0),k=b(()=>l(c)?.find(({name:P})=>P===l(C))),T=b(()=>l(k)?l(k).label||l(k).name:void 0),A=b(()=>l(C)?l(k)?.fields??[]:l(a)??(l(s)?[l(s)]:[]));BL(x,{get label(){return l(T)},children:(P,L)=>{var O=X(),N=D(O);it(N,17,()=>l(A),M=>M.name,(M,U)=>{Hi(M,{children:(H,G)=>{{let W=b(()=>l(f)?l($):`${l($)}.${l(U).name}`),Y=b(()=>l(h)?`${e.keyPath}.*<${l(C)}>.${l(U).name}`:`${e.keyPath}.*.${l(U).name}`);Yw(H,{get keyPath(){return l(W)},get typedKeyPath(){return l(Y)},get locale(){return e.locale},get fieldConfig(){return l(U)}})}},$$slots:{default:!0}})}),S(P,O)}})},$$slots:{default:!0}})}),S(t,m),ae(),i()}var QJ=j("<li> </li>"),eX=j('<ul dir="auto"></ul>');function tX(t,e){se(e,!0);var n=X(),r=D(n);{var i=o=>{var s=eX();it(s,21,()=>e.currentValue,dr,(a,c)=>{var u=QJ(),d=F(u);Z(()=>ne(d,l(c))),S(a,u)}),Z(a=>{Te(s,"lang",a),s.dir=s.dir},[()=>Ar(e.locale)]),S(o,s)};q(r,o=>{Array.isArray(e.currentValue)&&e.currentValue.length&&o(i)})}S(t,n),ae()}function nX(t,e){se(e,!0);let n=at(e,["$$slots","$$events","$$legacy","fieldConfig"]);var r=X(),i=D(r);{var o=a=>{{let c=b(()=>({...n,fieldConfig:e.fieldConfig}));ZJ(a,Yt(()=>l(c)))}},s=a=>{{let c=b(()=>({...n,fieldConfig:e.fieldConfig}));tX(a,Yt(()=>l(c)))}};q(i,a=>{El(e.fieldConfig).hasSubFields?a(o):a(s,!1)})}S(t,r),ae()}var rX=j('<div role="alert" class="search-result searching svelte-s9eab1"> </div>'),iX=j('<div role="alert" class="search-result no-result svelte-s9eab1"> </div>'),oX=j('<div role="none" class="toolbar svelte-s9eab1"><!> <!> <!></div> <!> <div role="application"></div> <!>',1);const sX={hash:"svelte-s9eab1",code:".toolbar.svelte-s9eab1 {display:flex;align-items:center;margin-bottom:var(--sui-spacing-2x);}.search-result.svelte-s9eab1 {padding:12px;color:var(--sui-secondary-foreground-color);}.map.svelte-s9eab1 {margin:var(--sui-focus-ring-width);border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);overflow:hidden;height:400px;background-clip:text;}.map.invalid.svelte-s9eab1 {border-color:var(--sui-error-border-color);}.leaflet-container {font-family:inherit !important;font-size:var(--sui-font-size-small) !important;}.leaflet-container a {color:var(--sui-primary-accent-color-text) !important;text-decoration:none !important;}.leaflet-bar a {border-color:var(--sui-button-border-color) !important;color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-button-background-color) !important;}.leaflet-control {color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-secondary-background-color-translucent) !important;}.leaflet-control-attribution {padding:4px 8px;}:root[data-theme='dark'] .leaflet-layer {filter:invert(100%) hue-rotate(180deg);}"};function aX(t,e){se(e,!0),Ee(t,sX);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"readonly",3,!1),a=I(e,"invalid",3,!1);const c=b(()=>st(e.fieldConfig.decimals,7)),u=b(()=>st(e.fieldConfig.type,"Point")),d=b(()=>l(u).toLowerCase());let f=ie(void 0),h=ie(void 0),p=ie(""),g=ie(""),m=ie(void 0),v=ie(!1),_=ie(!1),y=ie(""),w=0,x;const E=async()=>{if(!l(f))return;const ee=await Fa("leaflet","dist/leaflet-src.esm.js");x=ee.map(l(f),{center:[0,0],zoom:2}),ee.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(x),l(f).querySelectorAll('a[href^="https:"]').forEach(xe=>{xe.setAttribute("target","_blank"),xe.setAttribute("rel","noopener noreferrer")}),new ResizeObserver(()=>{x?.invalidateSize()}).observe(l(f));const{TerraDraw:te,TerraDrawLineStringMode:re,TerraDrawPointMode:he,TerraDrawPolygonMode:pe}=await Fa("terra-draw","dist/terra-draw.module.js"),{TerraDrawLeafletAdapter:ce}=await Fa("terra-draw-leaflet-adapter","dist/terra-draw-leaflet-adapter.module.js?module"),ge={Point:he,LineString:re,Polygon:pe},Pe=new te({adapter:new ce({lib:ee,map:x}),modes:[new ge[l(u)]]});Pe.start(),Pe.setMode(l(d)),Pe.on("change",(xe,de)=>{$(de)}),K(h,Pe,!0)},$=ee=>{if(!l(h))return;const te=l(h).getSnapshot(),re=te[te.length-1];!re||ee!==(l(u)==="Point"?"create":"delete")||(K(p,JSON.stringify({type:l(u),coordinates:re.geometry.coordinates.map(he=>Array.isArray(he)?he.map(pe=>Array.isArray(pe)?pe.map(ce=>Ea(ce,l(c))):Ea(pe,l(c))):Ea(he,l(c)))}),!0),te.length>1&&l(h).removeFeatures(te.filter(he=>he.id!==re.id).map(he=>he.id)))},C=()=>{if(!l(h))return;let ee=o()??"",te;try{if(ee!==void 0&&(te=JSON.parse(ee),!Bt(te)||te.type!==l(u)||!Array.isArray(te.coordinates)))throw new Error("Invalid object")}catch{ee="",te=void 0}if(l(p)!==ee&&(K(p,ee,!0),l(h).clear(),te&&(l(h).addFeatures([{type:"Feature",geometry:te,properties:{mode:l(d)}}]),te.coordinates.every(re=>typeof re=="number")))){const[re,he]=te.coordinates;x?.setView([he,re],15)}},k=()=>{if(!l(h))return;const ee=l(p);o()!==ee&&o(ee)},T=()=>{window.clearTimeout(w),w=window.setTimeout(async()=>{const ee=l(g).trim();if(!ee)return;K(v,!0);const re=`https://nominatim.openstreetmap.org/search?${new URLSearchParams({q:ee,format:"jsonv2"})}`;try{K(m,await lf(re),!0)}catch{K(m,[],!0)}K(v,!1)},500)},A=({latitude:ee,longitude:te})=>{if(!l(h)||(ee=Ea(ee,l(c)),te=Ea(te,l(c)),x?.setView([ee,te],15),l(u)!=="Point"))return;const re={type:"Point",coordinates:[te,ee]};l(h).clear(),l(h).addFeatures([{type:"Feature",geometry:re,properties:{mode:"point"}}]),K(p,JSON.stringify(re),!0)},P=({lat:ee,lon:te})=>{A({latitude:parseFloat(ee),longitude:parseFloat(te)})},L=()=>{if(!navigator.geolocation){K(_,!0),K(y,n()("geolocation_unsupported"),!0);return}navigator.geolocation.getCurrentPosition(({coords:{latitude:ee,longitude:te}})=>{A({latitude:ee,longitude:te})},ee=>{K(_,!0),K(y,n()("geolocation_error_body"),!0),console.error("Error getting current location:",ee)})},O=()=>{o("")};Ut(()=>{E()}),Me(()=>{l(h),o(),Se(()=>{C()})}),Me(()=>{l(p),Se(()=>{k()})}),Me(()=>{l(g),Se(()=>{T()})});var N=oX(),M=D(N),U=F(M);{let ee=b(()=>n()("find_place"));ag(U,{get readonly(){return s()},flex:!0,get placeholder(){return l(ee)},get value(){return l(g)},set value(te){K(g,te,!0)}})}var H=z(U,2);{const ee=he=>{Ze(he,{name:"near_me"})};let te=b(()=>n()("use_your_location")),re=b(()=>n()("use_your_location"));et(H,{variant:"tertiary",iconic:!0,get title(){return l(te)},get"aria-label"(){return l(re)},get disabled(){return s()},onclick:()=>{L()},startIcon:ee,$$slots:{startIcon:!0}})}var G=z(H,2);{let ee=b(()=>n()("clear")),te=b(()=>s()||!o());et(G,{variant:"tertiary",get label(){return l(ee)},get disabled(){return l(te)},onclick:()=>{O()}})}var W=z(M,2);{var Y=ee=>{var te=rX(),re=F(te);Z(he=>ne(re,he),[()=>n()("searching")]),S(ee,te)},R=ee=>{var te=X(),re=D(te);{var he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{var de=X(),we=D(de);{var ve=_e=>{{let Ce=b(()=>n()("search_results"));uu(_e,{get"aria-label"(){return l(Ce)},children:(ze,Ne)=>{var Ae=X(),$e=D(Ae);it($e,17,()=>l(m),je=>je.place_id,(je,Le)=>{Tr(je,{get label(){return l(Le).display_name},onSelect:()=>{P(l(Le))}})}),S(ze,Ae)},$$slots:{default:!0}})}},fe=_e=>{var Ce=iX(),ze=F(Ce);Z(Ne=>ne(ze,Ne),[()=>n()("no_results")]),S(_e,Ce)};q(we,_e=>{l(m).length?_e(ve):_e(fe,!1)})}S(xe,de)};q(ge,xe=>{l(m)&&xe(Pe)})}S(pe,ce)};q(re,pe=>{l(g)&&pe(he)},!0)}S(ee,te)};q(W,ee=>{l(v)?ee(Y):ee(R,!1)})}var B=z(W,2);let J;xt(B,ee=>K(f,ee),()=>l(f));var Q=z(B,2);{let ee=b(()=>n()("geolocation_error_title"));sg(Q,{get title(){return l(ee)},get open(){return l(_)},set open(te){K(_,te,!0)},children:(te,re)=>{var he=Fe();Z(()=>ne(he,l(y))),S(te,he)},$$slots:{default:!0}})}Z(()=>{J=cn(B,1,"map svelte-s9eab1",null,J,{invalid:a()}),B.inert=s()}),S(t,N),ae(),i()}var lX=j('<pre class="svelte-ise554"> </pre>');const cX={hash:"svelte-ise554",code:"pre.svelte-ise554 {white-space:pre-wrap;}"};function uX(t,e){Ee(t,cX);var n=X(),r=D(n);{var i=o=>{var s=lX(),a=F(s);Z(()=>ne(a,e.currentValue)),S(o,s)};q(r,o=>{e.currentValue&&o(i)})}S(t,n)}const Vd=/^.+?:\w+:/,dX=["rich_text","raw"],fX={rich_text:"rich-text",raw:"plain-text"},hX=["bold","italic","strikethrough","code","link","heading-one","heading-two","heading-three","heading-four","heading-five","heading-six","bulleted-list","numbered-list","quote"],pX={bold:"bold",italic:"italic",strikethrough:"strikethrough",code:"code",link:"link","heading-one":"heading-1","heading-two":"heading-2","heading-three":"heading-3","heading-four":"heading-4","heading-five":"heading-5","heading-six":"heading-6","bulleted-list":"bulleted-list","numbered-list":"numbered-list",quote:"blockquote","code-block":"code-block"},gX=["code-block","image"];var mX=j('<div role="group" class="wrapper svelte-ykjmq3" contenteditable="false" tabindex="0"><!> <div role="none" class="item-list"><!></div></div>');const vX={hash:"svelte-ykjmq3",code:`.wrapper.svelte-ykjmq3 {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-ykjmq3:focus {outline-color:var(--sui-primary-accent-color-translucent);}
|
|
624
624
|
@media (768px <= width) {.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) [data-widget] {border-width:0;}.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) [data-widget=string] {display:flex;align-items:center;gap:8px;padding-block:0 16px;}.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) [data-widget=string] h4 {margin-bottom:0 !important;}.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) [data-widget=string] .widget-wrapper {flex:auto;}
|
|
625
|
-
}.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) button {margin:var(--sui-focus-ring-width);}.wrapper.svelte-ykjmq3 + .wrapper {margin-top:16px;}`};function bX(t,e){const n=Vn();se(e,!0),Ee(t,vX);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"collapsed",3,!1),c=I(e,"values",7),u=I(e,"onChange",3,()=>{}),d=ie(void 0),f=ie(""),h=ie(""),p=ie(!a());const g=b(()=>l(h)?`${l(h)}:${n}:`:""),m=()=>l(d),v="extraValues";let _;const y=b(()=>{if(r()&&l(f)&&l(h))return ys(Object.fromEntries(Object.entries(
|
|
625
|
+
}.wrapper.svelte-ykjmq3:is([data-component-name=image]:where(.svelte-ykjmq3), [data-component-name=linked-image]:where(.svelte-ykjmq3)) button {margin:var(--sui-focus-ring-width);}.wrapper.svelte-ykjmq3 + .wrapper {margin-top:16px;}`};function bX(t,e){const n=Vn();se(e,!0),Ee(t,vX);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"collapsed",3,!1),c=I(e,"values",7),u=I(e,"onChange",3,()=>{}),d=ie(void 0),f=ie(""),h=ie(""),p=ie(!a());const g=b(()=>l(h)?`${l(h)}:${n}:`:""),m=()=>l(d),v="extraValues";let _;const y=b(()=>{if(r()&&l(f)&&l(h))return ys(Object.fromEntries(Object.entries(Un(r()[v][l(f)]??{})).filter(([A])=>A.startsWith(l(g))).map(([A,P])=>[A.replace(l(g),""),P])))});Ut(()=>(window.requestAnimationFrame(()=>{K(f,l(d)?.closest("[data-locale]")?.dataset.locale,!0),K(h,l(d)?.closest("[data-key-path]")?.dataset.keyPath,!0)}),()=>{r()&&v==="extraValues"&&Object.keys(r()[v][l(f)]??{}).forEach(A=>{A.startsWith(l(g))&&delete r()[v][l(f)][A]})})),Me(()=>{c(),l(f),l(h),Se(()=>{r()&&l(f)&&l(h)&&(c(c()??ys(Pf(e.fields,l(f)))??{}),c().__sc_component_name=e.componentName,pn(c(),l(y))||Object.assign(r()[v][l(f)],Object.fromEntries(Object.entries(ho(c())).map(([A,P])=>[`${l(g)}${A}`,P]))))})}),Me(()=>{l(y),Se(()=>{pn(_,l(y))||(u()(new CustomEvent("update",{detail:l(y)})),_=l(y))})});var w={getElement:m},x=mX();x.__keydown=A=>{!A.target.matches("button, input, textarea")&&A.key!=="Tab"&&A.preventDefault(),A.target===l(d)&&A.key==="Backspace"&&u()(new CustomEvent("remove"))};var E=F(x);Ww(E,{get label(){return e.label},get controlId(){return`object-${n}-item-list`},get expanded(){return l(p)},set expanded(P){K(p,P,!0)},endContent:P=>{{const L=N=>{Ze(N,{name:"close"})};let O=b(()=>i()("remove"));et(P,{size:"small",iconic:!0,get"aria-label"(){return l(O)},onclick:()=>{u()(new CustomEvent("remove"))},startIcon:L,$$slots:{startIcon:!0}})}},$$slots:{endContent:!0}});var $=z(E,2),C=F($);{var k=A=>{var P=X(),L=D(P);it(L,17,()=>e.fields,O=>O.name,(O,N)=>{Hi(O,{children:(M,U)=>{Lg(M,{get locale(){return l(f)},get keyPath(){return`${l(g)??""}${l(N).name??""}`},get typedKeyPath(){return`${l(g)??""}${l(N).name??""}`},get fieldConfig(){return l(N)},context:"markdown-editor-component",valueStoreKey:v})},$$slots:{default:!0}})}),S(A,P)};q(C,A=>{l(f)&&l(h)&&l(p)&&A(k)})}xt(x,A=>K(d,A),()=>l(d)),Z(()=>{Te(x,"aria-label",e.label),Te(x,"data-key-path-prefix",l(g)),Te(x,"data-component-name",e.componentName),Te($,"id",`object-${n}-item-list`)}),Xr("keydown",x,A=>{A.stopPropagation()},!0),S(t,x);var T=ae(w);return s(),T}wl(["keydown"]);const _X=t=>{const{id:e,label:n,collapsed:r,fields:i,pattern:o,toBlock:s,toPreview:a}=t,c=W$(o),u=a({}),d=s({}),f=typeof u=="string"?u.trim().match(/^<(?<tagName>[a-z]+)/i)?.groups?.tagName??(typeof d=="string"?d.trim().match(/^<(?<tagName>[a-z]+)/i)?.groups?.tagName:void 0):void 0;class h extends Yy{__props;constructor(g,m){super(m),this.__props=g}static getType(){return e}isInline(){return!c}static clone(g){return new h(g.__props,g.__key)}static importJSON(g){return new h().updateFromJSON(g)}exportJSON(){return{...Y$(this.__props??{}),type:e,version:1}}createDOM(){let g,m=null,v;const _=async({type:y,detail:w})=>{await Ma(),m??=pg(g),m?.update(()=>{if(y==="update")try{this.getWritable().__props=w}catch{}y==="remove"&&(uT(v),this.remove())})};return v=Pp(bX,{target:document.createElement("div"),props:{componentName:e,label:n,collapsed:r,fields:i,values:this.__props,onChange:_}}),Vc(),g=v.getElement(),window.requestAnimationFrame(()=>{g.focus()}),g}exportDOM(){return{element:this.createDOM()}}static importDOM(){const g={};return f&&(g[f]=()=>({conversion:m=>({node:new h(Object.fromEntries(i.map(({name:v})=>[v,m[v]??""])))}),priority:3})),e==="linked-image"&&Object.assign(g,{a:m=>{if(m.firstChild?.nodeName.toLowerCase()==="img"){const{href:v}=m,{src:_,alt:y,title:w}=m.firstChild;return{conversion:()=>({node:new h({src:_,alt:y,title:w,link:v}),after:()=>[]}),priority:4}}return null}}),g}updateDOM(){return!1}}return h},yX=({componentDef:t,CustomNode:e})=>{const{id:n,pattern:r,fromBlock:i,toBlock:o}=t,s=new RegExp(r.source,r.flags.replace("g","")),a=d=>i?.(d)??d.groups??{},c=d=>d instanceof e&&d.getType()===n,u=d=>c(d)?o(Y$(d.__props??{})):null;return W$(r)?{type:"multiline-element",dependencies:[e],regExpStart:/^./,regExpEnd:{optional:!0,regExp:/.$/},handleImportAfterStartMatch:({lines:d,rootNode:f,startLineIndex:h})=>{const p=d.slice(h).join(`
|
|
626
626
|
`),[g]=p.match(s)??[];if(!g||!p.startsWith(g))return null;const m=g.match(s),v=h+g.split(`
|
|
627
627
|
`).length-1;return m?(f.append(new e(a(m))),[!0,v]):[!1,v]},replace:()=>{},export:u}:{type:"text-match",dependencies:[e],importRegExp:s,regExp:s,replace:(d,f)=>{d.replace(new e(a(f)))},export:u}},$S=new Map,wX=t=>{const e=_X(t);return{node:e,createNode:n=>new e(n),transformer:yX({componentDef:t,CustomNode:e})}};class xX{constructor(e){const{id:n}=e,r=$S.get(n),i=r??wX(e);r||$S.set(n,i),Object.assign(this,{...e,...i})}}var kX=j('<div role="none"><!></div>');const SX={hash:"svelte-eev3hl",code:`.wrapper.svelte-eev3hl {display:contents;}.wrapper.minimal.svelte-eev3hl :is([role=textbox], textarea) {overflow:auto;max-height:240px;}
|
|
628
628
|
@media (width < 768px) {.wrapper.svelte-eev3hl .sui.text-editor {margin:0 calc(var(--field-editor-padding) * -1) calc(var(--field-editor-padding) * -1);width:100dvw;}.wrapper.svelte-eev3hl :is(.sui.toolbar, .lexical-root, textarea) {border:0;border-radius:0;}
|
|
629
|
-
}`};function EX(t,e){se(e,!0),Ee(t,SX);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{widgetContext:o=void 0}=sr("field-editor")??{},s=o==="markdown-editor-component";let a=I(e,"currentValue",15),c=I(e,"required",3,!0),u=I(e,"readonly",3,!1),d=I(e,"invalid",3,!1),f=ie(void 0),h=ie(""),p=0;const g=b(()=>st(e.fieldConfig.modes,()=>[...dX],!0)),m=b(()=>st(e.fieldConfig.buttons,()=>[...hX],!0)),v=b(()=>st(e.fieldConfig.editor_components,()=>[...gX,...zh.keys()],!0)),_=b(()=>st(e.fieldConfig.linked_images,!0)),y=b(()=>st(e.fieldConfig.minimal,!1)),w=b(()=>l(g).map(M=>fX[M]).filter(Boolean)),x=b(()=>[...l(m),...l(v).includes("code-block")?["code-block"]:[]].map(M=>pX[M]).filter(Boolean)),E=b(()=>s?[]:l(v).map(M=>Z$(M==="image"&&l(_)?"linked-image":M)).filter(M=>!!M).map(M=>new xX(M))),$=b(()=>l(E).find(({id:M})=>M==="image"||M==="linked-image")),C=({target:M,images:U})=>{const H=M?.closest("div"),G=pg(H);!l($)||!H?.matches(".lexical-root")||!G||U.forEach(({file:W,src:Y,alt:R=""})=>{W&&(Y=URL.createObjectURL(W)),G.update(()=>{hu([l($).createNode({src:Y,alt:R}),Sn()])},{onUpdate:async()=>{if(!W)return;await Nt(250),H.querySelector(`img[src="${Y}"]`)?.closest(".drop-target")?.dispatchEvent(new CustomEvent("Select",{detail:{files:[W]}}))}})})},k=async M=>{const{target:U,clipboardData:H}=M,G=H?.items;if(!G)return;let W=[];const Y=[...G].findIndex(({kind:B,type:J})=>B==="file"&&Lo.includes(J)),R=[...G].findIndex(({kind:B,type:J})=>B==="string"&&J==="text/html");if(Y>-1&&R>-1){const B=Y>-1?G[Y].getAsFile():void 0;if(!B)return;G.clear(),M.stopPropagation();let J="",Q=B.name;const ee=await new Promise(te=>{G[R].getAsString(re=>{te(new DOMParser().parseFromString(re,"text/html").querySelector("img"))})});if(ee&&(J=ee.alt,/^https?:/.test(ee.src))){const te=new URL(ee.src).pathname.split("/").pop()??"";(Xv.test(te)||KM.test(te))&&(Q=te)}W=[{file:new File([B],Q,{type:B.type}),alt:J}]}else W=[...H.files].filter(({type:B})=>Lo.includes(B)).map(B=>({file:B}));W.length&&(W=W.map(({file:B,alt:J},Q)=>{if(B?.name==="image.png"){const{year:ee,month:te,day:re,hour:he,minute:pe,second:ce}=el(),ge=W.length>1?`-${Q+1}`:"",Pe=`${ee}${te}${re}-${he}${pe}${ce}${ge}.png`;B=new File([B],Pe,{type:B.type})}return{file:B,alt:J}}),C({target:U,images:W}))},T=async M=>{const{target:U,dataTransfer:H}=M,G=H?.files;let W=[];if(G?.length)W=[...G].filter(({type:Y})=>Lo.includes(Y)).map(Y=>({file:Y}));else{const Y=M.dataTransfer?.getData("text/html");if(Y){const R=new DOMParser().parseFromString(Y,"text/html").querySelector("img");if(R){const{src:B,alt:J}=R,Q=B.match(/^data:(?<type>image\/.+?);base64,.+/);let ee;if(Q){const te=Q.groups?.type??"";if(Lo.includes(te))try{const re=await(await fetch(B)).blob(),{year:he,month:pe,day:ce,hour:ge,minute:Pe,second:xe}=el(),de=te.split("/")[1],we=`${he}${pe}${ce}-${ge}${Pe}${xe}.${de}`;ee=new File([re],we,{type:te})}catch{return}}W=[{file:ee,src:B,alt:J}]}}}W.length&&C({target:U,images:W})},A=()=>{const M=typeof a()=="string"?a():"";l(h)!==M&&K(h,M,!0),!(!n()||s)&&(window.clearTimeout(p),p=window.setTimeout(()=>{Object.keys(n()?.extraValues[e.locale]??{}).forEach(U=>{const[H]=U.match(Vd)??[];H?.startsWith(`${e.keyPath}:`)&&!l(f)?.querySelector(`[data-key-path-prefix="${H}"]`)&&delete n().extraValues[e.locale][U]})},500))},P=()=>{const M=l(h);a()!==M&&a(M)};Me(()=>{a(),Se(()=>{A()})}),Me(()=>{l(h),Se(()=>{P()})});var L=kX();let O;var N=F(L);kn(N,Nt,null,M=>{var U=X(),H=D(U);or(H,()=>JSON.stringify(e.fieldConfig),G=>{{let W=b(()=>Ar(e.locale));_H(G,{get lang(){return l(W)},get modes(){return l(w)},get buttons(){return l(x)},get components(){return l(E)},flex:!0,get readonly(){return u()},get required(){return c()},get invalid(){return d()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,onpastecapture:Y=>{k(Y)},ondrop:Y=>{T(Y)},get value(){return l(h)},set value(Y){K(h,Y,!0)}})}}),S(M,U)}),xt(L,M=>K(f,M),()=>l(f)),Z(()=>O=cn(L,1,"wrapper svelte-eev3hl",null,O,{minimal:l(y)})),S(t,L),ae(),i()}function TX(){return{useNewRenderer:!0,renderer:{heading(...t){return jt.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return jt.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return jt.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}const $X=(...t)=>{const{alt:e,src:n,title:r}=t.at(-1),i=n.replaceAll(" ","%20");return r?``:``};var CX=j('<div role="none" class="svelte-lijj98"><!></div>');const AX={hash:"svelte-lijj98",code:"[role='document'] div.svelte-lijj98 :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}[role='document'] div.svelte-lijj98 :is(video, img) {max-width:100%;max-height:100%;}[role='document'] div.svelte-lijj98 :is(a:has(img)) {display:inline-block;}[role='document'] div.svelte-lijj98 :is(a:has(img)) img {pointer-events:none;}"};function PX(t,e){se(e,!0),Ee(t,AX);const n=()=>V(Je,"$entryDraft",r),[r,i]=me();let o=ie("");const s=b(()=>n()?.originalEntry),a=b(()=>n()?.collectionName??""),c=b(()=>n()?.fileName),u=b(()=>st(e.fieldConfig.sanitize_preview,!0)),d=b(()=>(e.currentValue??"").replace(oF,$X)),f={breaks:!0,async:!0,walkTokens:async v=>{if(v.type==="image"){const _=await rl({value:v.href,entry:l(s),collectionName:l(a),fileName:l(c)});_&&(v.href=_)}}},h={ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i};GF(TX()),Me(()=>{(async()=>K(o,await hy(l(d),f),!0))()});var p=CX(),g=F(p);{var m=v=>{var _=X(),y=D(_);cr(y,()=>l(u)?jr.sanitize(l(o),h):l(o)),S(v,_)};q(g,v=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&v(m)})}S(t,p),ae(),i()}function LX(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1),s=ie(void 0),a=ie("");const c=b(()=>st(e.fieldConfig.value_type,"int")),u=b(()=>e.fieldConfig.min),d=b(()=>e.fieldConfig.max),f=b(()=>st(e.fieldConfig.step,1)),h=b(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(s)!==n())if(typeof n()=="number")K(s,n(),!0);else if(typeof n()=="string"){const w=n().trim()?Number(n()):NaN;K(s,Number.isNaN(w)?void 0:w,!0)}else K(s,void 0);!l(h)&&l(a)!==n()&&K(a,String(n()),!0)}},g=()=>{let w;l(h)?l(s)===void 0?w=NaN:l(c)==="int"?w=Number.parseInt(l(h)?String(l(s)):l(a),10):w=Number.parseFloat(l(h)?String(l(s)):l(a)):w=l(a),l(h)&&Number.isNaN(w)&&(w=null),n()!==w&&n(w)};Me(()=>{n(),Se(()=>{p()})}),Me(()=>{l(a),Se(()=>{g()})}),Me(()=>{l(s),Se(()=>{g()})});var m=X(),v=D(m);{var _=w=>{xH(w,{get min(){return l(u)},get max(){return l(d)},get step(){return l(f)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(s)},set value(x){K(s,x,!0)}})},y=w=>{qn(w,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(x){K(a,x,!0)}})};q(v,w=>{l(h)?w(_):w(y,!1)})}S(t,m),ae()}var NX=j('<p dir="auto"><!></p>');function OX(t,e){se(e,!0);const n=b(()=>st(e.fieldConfig.value_type,"int")),r=b(()=>Ar(e.locale)),i=b(()=>Intl.NumberFormat(l(r)));var o=X(),s=D(o);{var a=c=>{var u=NX(),d=F(u);{var f=p=>{var g=Fe();Z(m=>ne(g,m),[()=>l(i).format(Number(e.currentValue))]),S(p,g)},h=p=>{var g=Fe();Z(()=>ne(g,e.currentValue)),S(p,g)};q(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}Z(()=>{Te(u,"lang",l(r)),u.dir=u.dir}),S(c,u)};q(s,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}S(t,o),ae()}const qL=t=>{const{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,isIndexFile:s}=oe(Je),{defaultLocale:a}=(i??r)._i18n,c={...ea(t),...ea(o[a])},u={collectionName:e,fileName:n,valueMap:c,isIndexFile:s},d=[];return Object.keys(c).forEach(f=>{const h=mn({...u,keyPath:f});if(!h)return;const{widget:p="text",i18n:g=!1}=h;["text","string","markdown"].includes(p)&&[!0,"translate"].includes(g)&&(c[f]=t[f]??""),([!1,"none"].includes(g)||d.some(m=>new RegExp(`^${Gt(m)}\\b`).test(f)))&&(delete c[f],d.push(f))}),c},VL=t=>{Je.update(e=>{const{fields:n,currentLocales:r,currentValues:i,validities:o}=e,s=!r[t];if(s&&!i[t]){const{collectionName:a,fileName:c,originalValues:u}=e,d=Pf(n,t);return{...e,currentLocales:{...r,[t]:s},originalValues:{...u,[t]:d},currentValues:{...i,[t]:Mw({draft:{collectionName:a,fileName:c},locale:t,target:qL(d)})}}}return{...e,currentLocales:{...r,[t]:s},validities:{...o,[t]:{}}}})},IX=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s})=>{const a={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i};return s?s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/);return iu({...a,keyPath:`${n}.${d.replace(/^fields\./,"")}`,locale:o,transformations:f})}):pC({valueMap:r,locale:o,keyPath:n,keyPathRegex:new RegExp(`^${Gt(n)}\\.`),getFieldArgs:a})};var RX=j('<div role="none" class="summary svelte-ztn6n1"><!></div>'),DX=j('<div role="group" class="wrapper svelte-ztn6n1"><!> <div role="none" class="item-list"><!></div></div>'),MX=j("<!> <!> <!>",1);const FX={hash:"svelte-ztn6n1",code:".wrapper.svelte-ztn6n1 {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.sui.checkbox + .wrapper.svelte-ztn6n1 > .group {margin-top:8px;}.summary.svelte-ztn6n1 {padding:8px;}"};function zX(t,e){const n=Vn();se(e,!0),Ee(t,FX);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(vn,"$isSmallScreen",s),[s,a]=me(),{widgetContext:c,valueStoreKey:u="currentValues"}=sr("field-editor")??{},d=c==="single-subfield-list-widget";let f=I(e,"required",3,!0);const h=b(()=>e.fieldConfig.name),p=b(()=>st(e.fieldConfig.i18n,!1)),g=b(()=>e.fieldConfig.collapsed),m=b(()=>e.fieldConfig.summary),v=b(()=>e.fieldConfig.fields),_=b(()=>e.fieldConfig.types),y=b(()=>st(e.fieldConfig.typeKey,"type")),w=b(()=>r()?.isIndexFile??!1),x=b(()=>r()?.collection),E=b(()=>r()?.collectionName??""),$=b(()=>r()?.collectionFile),C=b(()=>r()?.fileName),k=b(()=>(l($)??l(x))?._i18n??bo),T=b(()=>l(k).defaultLocale),A=b(()=>jn(r()?.[u][e.locale])??{}),P=b(()=>({collectionName:l(E),fileName:l(C),valueMap:l(A),isIndexFile:l(w)})),L=b(()=>Object.entries(l(A)).some(([xe,de])=>!!xe.startsWith(`${e.keyPath}.`)&&(de!==null||mn({...l(P),keyPath:xe})?.widget==="object"))),O=b(()=>c==="markdown-editor-component"||e.locale===l(T)||l(p)!==!1),N=b(()=>`${e.keyPath}#`),M=b(()=>r()?.expanderStates?._[l(N)]??!0),U=b(()=>Array.isArray(l(_))),H=b(()=>`${e.keyPath}.${l(y)}`),G=b(()=>l(U)?l(_)?.find(({name:xe})=>xe===l(A)[l(H)]):void 0),W=b(()=>(l(U)?l(G)?.fields:l(v))??[]),Y=b(()=>l(U)&&l(G)?.summary||l(m)),R=b(()=>e.locale!==l(T)&&l(p)==="duplicate"),B=()=>{if(d)return;const xe=l(N);Co({[xe]:jL({key:xe,locale:e.locale,collapsed:l(g)})})},J=async({type:xe}={})=>{Ye(oo,!1),xe&&(Object.keys(r()?.[u]??{}).forEach(ve=>{(ve===e.locale||l(p)==="duplicate")&&_t(Je,Se(r)[u][ve][l(H)]=xe,Se(r))}),await Ma());const de=Object.fromEntries(Object.entries(Pf(l(W),e.locale)).map(([ve,fe])=>[`${e.keyPath}.${ve}`,fe])),we=e.locale===l(T)?de:qL(de);Object.entries(r()?.[u]??{}).forEach(([ve,fe])=>{(ve===e.locale||l(p)==="duplicate")&&(_t(Je,Se(r)[u][ve]=Object.assign(fe,ea({...we,...fe})),Se(r)),delete r()[u][ve][e.keyPath])}),Ye(oo,!0)},Q=()=>{Ye(oo,!1),Object.entries(r()?.[u]??{}).forEach(([xe,de])=>{(xe===e.locale||l(p)==="duplicate")&&(Object.keys(de).forEach(we=>{we.startsWith(`${e.keyPath}.`)&&(_t(Je,Se(r)[u][xe][we]=null,Se(r)),delete r()?.[u][xe][we])}),_t(Je,Se(r)[u][xe][e.keyPath]=null,Se(r)))}),Ye(oo,!0)},ee=()=>IX({...l(P),keyPath:e.keyPath,locale:e.locale,summaryTemplate:l(Y)});Ut(()=>{B()});var te=MX(),re=D(te);{var he=xe=>{{let de=b(()=>i()("add_x",{values:{name:e.fieldLabel||l(h)}}));pf(xe,{get label(){return l(de)},get checked(){return l(L)},get disabled(){return l(R)},onChange:({detail:{checked:we}})=>{we?J():Q()}})}};q(re,xe=>{!l(U)&&!f()&&xe(he)})}var pe=z(re,2);{var ce=xe=>{i_(xe,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},addItem:J})};q(pe,xe=>{l(U)&&!l(L)&&xe(ce)})}var ge=z(pe,2);{var Pe=xe=>{var de=DX(),we=F(de);{var ve=Ne=>{{const Ae=Le=>{var Ie=X(),Re=D(Ie);{var nt=Ge=>{{const ut=be=>{Ze(be,{name:"close"})};let Oe=b(()=>i()("remove"));et(Ge,{size:"small",iconic:!0,get disabled(){return l(R)},get"aria-label"(){return l(Oe)},onclick:()=>{Q()},startIcon:ut,$$slots:{startIcon:!0}})}};q(Re,Ge=>{l(U)&&Ge(nt)})}S(Le,Ie)};let $e=b(()=>l(U)?l(G)?.label||l(G)?.name:""),je=b(()=>l(W).length?()=>Co({[l(N)]:!l(M)}):void 0);Ww(Ne,{get label(){return l($e)},get controlId(){return`object-${n}-item-list`},get expanded(){return l(M)},get toggleExpanded(){return l(je)},endContent:Ae,$$slots:{endContent:!0}})}};q(we,Ne=>{d||Ne(ve)})}var fe=z(we,2),_e=F(fe);{var Ce=Ne=>{var Ae=X(),$e=D(Ae);it($e,17,()=>l(W),je=>je.name,(je,Le)=>{const Ie=b(()=>`${e.keyPath}.${l(Le).name}`);Hi(je,{children:(Re,nt)=>{{let Ge=b(()=>l(U)&&l(G)?.name?`${e.keyPath}<${l(G).name}>.${l(Le).name}`:l(Ie));Lg(Re,{get keyPath(){return l(Ie)},get typedKeyPath(){return l(Ge)},get locale(){return e.locale},get fieldConfig(){return l(Le)}})}},$$slots:{default:!0}})}),S(Ne,Ae)},ze=Ne=>{const Ae=b(ee);var $e=X(),je=D($e);{var Le=Ie=>{var Re=RX(),nt=F(Re);{let Ge=b(()=>o()?2:1);Pr(nt,{get lines(){return l(Ge)},children:(ut,Oe)=>{var be=Fe();Z(()=>ne(be,l(Ae))),S(ut,be)},$$slots:{default:!0}})}Z(()=>Te(Re,"id",`object-${n}-summary`)),S(Ie,Re)};q(je,Ie=>{l(Ae)&&Ie(Le)})}S(Ne,$e)};q(_e,Ne=>{l(M)?Ne(Ce):Ne(ze,!1)})}Z(()=>{Te(de,"aria-labelledby",l(M)?void 0:`object-${n}-summary`),Te(fe,"id",`object-${n}-item-list`)}),S(xe,de)};q(ge,xe=>{(!(!f()||l(U))||l(L))&&l(O)&&xe(Pe)})}S(t,te),ae(),a()}function jX(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.fields),s=b(()=>e.fieldConfig.types),a=b(()=>st(e.fieldConfig.typeKey,"type")),c=b(()=>jn(n()?.currentValues[e.locale])??{}),u=b(()=>Object.entries(l(c)).some(([y,w])=>!!y.startsWith(`${e.keyPath}.`)&&!!w)),d=b(()=>Array.isArray(l(s))),f=b(()=>`${e.keyPath}.${l(a)}`),h=b(()=>l(d)?l(s)?.find(({name:y})=>y===l(c)[l(f)]):void 0),p=b(()=>l(h)?l(h).label||l(h).name:void 0),g=b(()=>(l(d)?l(h)?.fields:l(o))??[]);var m=X(),v=D(m);{var _=y=>{BL(y,{get label(){return l(p)},children:(w,x)=>{var E=X(),$=D(E);it($,17,()=>l(g),C=>C.name,(C,k)=>{const T=b(()=>`${e.keyPath}.${l(k).name}`);Hi(C,{children:(A,P)=>{{let L=b(()=>l(d)&&l(h)?.name?`${e.keyPath}<${l(h).name}>.${l(k).name}`:l(T));Yw(A,{get keyPath(){return l(T)},get typedKeyPath(){return l(L)},get locale(){return e.locale},get fieldConfig(){return l(k)}})}},$$slots:{default:!0}})}),S(w,E)}})};q(v,y=>{l(u)&&y(_)})}S(t,m),ae(),i()}function UX(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1);const u=b(()=>e.fieldConfig.i18n),d=b(()=>e.fieldConfig.max),f=b(()=>st(e.fieldConfig.dropdown_threshold,5)),h=w=>{n()&&Object.keys(jn(n()[o])??{}).forEach(x=>{l(u)!=="duplicate"&&x!==e.locale||zL({locale:x,valueStoreKey:o,keyPath:e.keyPath,manipulate:w})})},p=w=>{h(({valueList:x})=>{x.push(w)})},g=w=>{h(({valueList:x})=>{x.splice(x.indexOf(w),1)})};var m=X(),v=D(m);{var _=w=>{k5(w,Yt({get disabled(){return a()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get options(){return e.options}},()=>({values:e.currentValue}),{get max(){return l(d)},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onAddValue:({detail:{value:x}})=>{p(x)},onRemoveValue:({detail:{value:x}})=>{g(x)}}))},y=w=>{p4(w,{get"aria-labelledby"(){return`${e.fieldId??""}-label`},children:(x,E)=>{var $=X(),C=D($);it(C,17,()=>e.options,({label:k,value:T})=>T,(k,T)=>{let A=()=>l(T).label,P=()=>l(T).value;{let L=b(()=>e.currentValue?.includes(P())??!1);pf(k,{get label(){return A()},get value(){return P()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get checked(){return l(L)},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{checked:O}})=>{O?p(P()):g(P())}})}}),S(x,$)},$$slots:{default:!0}})};q(v,w=>{e.options.length>l(f)?w(_):w(y,!1)})}S(t,m),ae(),i()}function BX(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=I(e,"options",7);const d=b(()=>st(e.fieldConfig.dropdown_threshold,5));let f=ie(void 0);Me(()=>{l(f)||K(f,u()[0]?.value!==void 0?typeof u()[0]?.value:"string",!0)}),Me(()=>{!s()&&!u().some(({value:v})=>!v)&&u([{label:n()("unselected_option"),value:l(f)==="number"?null:"",searchValue:""},...u()])});var h=X(),p=D(h);{var g=v=>{Al(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(_){o(_)},children:(_,y)=>{var w=X(),x=D(w);it(x,17,u,({label:E,value:$,searchValue:C})=>$,(E,$)=>{let C=()=>l($).label,k=()=>l($).value,T=()=>l($).searchValue;{let A=b(()=>k()===o());Tr(E,{get label(){return C()},get value(){return k()},get valueType(){return l(f)},get searchValue(){return T()},get selected(){return l(A)},wrap:!0})}}),S(_,w)},$$slots:{default:!0}})},m=v=>{i5(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{value:_}})=>{o(_)},children:(_,y)=>{var w=X(),x=D(w);it(x,17,u,({label:E,value:$})=>$,(E,$)=>{let C=()=>l($).label,k=()=>l($).value;{let T=b(()=>k()===o());l5(E,{get label(){return C()},get value(){return k()},get valueType(){return l(f)},get checked(){return l(T)}})}}),S(_,w)},$$slots:{default:!0}})};q(p,v=>{u().length>l(d)?v(g):v(m,!1)})}S(t,h),ae(),i()}function HL(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1),s=I(e,"sortOptions",3,!1);const a=b(()=>e.fieldConfig.options),c=b(()=>e.fieldConfig.multiple),u=b(()=>l(c)?UX:BX),d=b(()=>{const p=l(a).map(g=>Bt(g)?g:{label:g,value:g});return s()&&p.sort((g,m)=>Ci(g.label,m.label)),p});var f=X(),h=D(f);or(h,()=>JSON.stringify(l(d)),p=>{var g=X(),m=D(g);ur(m,()=>l(u),(v,_)=>{_(v,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldConfig(){return e.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get options(){return l(d)},get currentValue(){return n()},set currentValue(y){n(y)}})}),S(p,g)}),S(t,f),ae()}var qX=j('<div role="none" class="wrapper"><!></div>');function VX(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1);const s=b(()=>e.fieldConfig.collection),a=b(()=>e.fieldConfig.file),c=b(()=>l(a)?[Oy(l(s),l(a))].filter(h=>!!h):Wo(l(s))),u=b(()=>({...e.fieldConfig,widget:"select",options:gy(e.locale,e.fieldConfig,l(c))}));var d=qX(),f=F(d);HL(f,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return e.fieldId},get fieldLabel(){return e.fieldLabel},get fieldConfig(){return l(u)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},sortOptions:!0,get currentValue(){return n()},set currentValue(h){n(h)}}),S(t,d),ae()}var HX=j('<p dir="auto"> </p>');function KX(t,e){se(e,!0);const n=b(()=>e.fieldConfig.collection),r=b(()=>e.fieldConfig.file),i=b(()=>st(e.fieldConfig.multiple,!1)),o=b(()=>st(e.fieldConfig.value_field,"{{slug}}")),s=b(()=>tl(e.locale)),a=b(()=>l(r)?[Oy(l(n),l(r))].filter(p=>!!p):Wo(l(n))),c=b(()=>gy(e.locale,e.fieldConfig,l(a))),u=b(()=>(l(i)?e.currentValue:[e.currentValue]).filter(p=>p!==void 0).map(p=>{const g=l(c).find(m=>m.value===p)?.label;return g&&g!==p?["slug","{{slug}}","{{fields.slug}}"].includes(l(o))?g:`${g} (${p})`:p}));var d=X(),f=D(d);{var h=p=>{var g=HX(),m=F(g);Z((v,_)=>{Te(g,"lang",v),ne(m,_),g.dir=g.dir},[()=>Ar(e.locale),()=>l(s).format(l(u))]),S(p,g)};q(f,p=>{l(u).length&&p(h)})}S(t,d),ae()}var GX=j('<p dir="auto"> </p>'),WX=j('<p dir="auto"> </p>');function YX(t,e){se(e,!0);const n=b(()=>e.fieldConfig.options),r=b(()=>e.fieldConfig.multiple),i=b(()=>C$(l(n))),o=b(()=>tl(e.locale)),s=f=>l(i)&&l(n).find(h=>h.value===f)?.label||String(f);var a=X(),c=D(a);{var u=f=>{var h=GX(),p=F(h);Z((g,m)=>{Te(h,"lang",g),ne(p,m),h.dir=h.dir},[()=>Ar(e.locale),()=>l(o).format(e.currentValue.map(s).sort())]),S(f,h)},d=f=>{var h=X(),p=D(h);{var g=m=>{var v=WX(),_=F(v);Z((y,w)=>{Te(v,"lang",y),ne(_,w),v.dir=v.dir},[()=>Ar(e.locale),()=>s(e.currentValue)]),S(m,v)};q(p,m=>{e.currentValue!==void 0&&m(g)},!0)}S(f,h)};q(c,f=>{l(r)&&Array.isArray(e.currentValue)&&e.currentValue.length?f(u):f(d,!1)})}S(t,a),ae()}const KL=({fieldConfig:t,value:e})=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),o=Number.isInteger(r)&&(n??0)<=r,s=e?[...e.trim()].length:0,a=i&&s<n,c=o&&s>r;return{count:s,hasMin:i,hasMax:o,tooShort:a,tooLong:c,invalid:a||c}};var JX=j('<div class="wrapper svelte-18cyzaa"><!> <span role="none"> </span> <!></div>');const XX={hash:"svelte-18cyzaa",code:".wrapper.svelte-18cyzaa {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:end;}.count.invalid.svelte-18cyzaa {color:var(--sui-error-foreground-color);}.count.svelte-18cyzaa:not(.invalid) {color:var(--sui-success-foreground-color);}"};function GL(t,e){se(e,!0),Ee(t,XX);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>e.fieldConfig.minlength),s=b(()=>e.fieldConfig.maxlength),a=b(()=>KL({fieldConfig:e.fieldConfig,value:e.currentValue})),c=b(()=>l(a).count),u=b(()=>l(a).hasMin),d=b(()=>l(a).hasMax),f=b(()=>l(a).invalid);var h=X(),p=D(h);{var g=m=>{var v=JX(),_=F(v);{var y=k=>{var T=Fe();Z(()=>ne(T,`${l(o)??""}
|
|
629
|
+
}`};function EX(t,e){se(e,!0),Ee(t,SX);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{widgetContext:o=void 0}=sr("field-editor")??{},s=o==="markdown-editor-component";let a=I(e,"currentValue",15),c=I(e,"required",3,!0),u=I(e,"readonly",3,!1),d=I(e,"invalid",3,!1),f=ie(void 0),h=ie(""),p=0;const g=b(()=>st(e.fieldConfig.modes,()=>[...dX],!0)),m=b(()=>st(e.fieldConfig.buttons,()=>[...hX],!0)),v=b(()=>st(e.fieldConfig.editor_components,()=>[...gX,...zh.keys()],!0)),_=b(()=>st(e.fieldConfig.linked_images,!0)),y=b(()=>st(e.fieldConfig.minimal,!1)),w=b(()=>l(g).map(M=>fX[M]).filter(Boolean)),x=b(()=>[...l(m),...l(v).includes("code-block")?["code-block"]:[]].map(M=>pX[M]).filter(Boolean)),E=b(()=>s?[]:l(v).map(M=>Z$(M==="image"&&l(_)?"linked-image":M)).filter(M=>!!M).map(M=>new xX(M))),$=b(()=>l(E).find(({id:M})=>M==="image"||M==="linked-image")),C=({target:M,images:U})=>{const H=M?.closest("div"),G=pg(H);!l($)||!H?.matches(".lexical-root")||!G||U.forEach(({file:W,src:Y,alt:R=""})=>{W&&(Y=URL.createObjectURL(W)),G.update(()=>{hu([l($).createNode({src:Y,alt:R}),Sn()])},{onUpdate:async()=>{if(!W)return;await Nt(250),H.querySelector(`img[src="${Y}"]`)?.closest(".drop-target")?.dispatchEvent(new CustomEvent("Select",{detail:{files:[W]}}))}})})},k=async M=>{const{target:U,clipboardData:H}=M,G=H?.items;if(!G)return;let W=[];const Y=[...G].findIndex(({kind:B,type:J})=>B==="file"&&Lo.includes(J)),R=[...G].findIndex(({kind:B,type:J})=>B==="string"&&J==="text/html");if(Y>-1&&R>-1){const B=Y>-1?G[Y].getAsFile():void 0;if(!B)return;G.clear(),M.stopPropagation();let J="",Q=B.name;const ee=await new Promise(te=>{G[R].getAsString(re=>{te(new DOMParser().parseFromString(re,"text/html").querySelector("img"))})});if(ee&&(J=ee.alt,/^https?:/.test(ee.src))){const te=new URL(ee.src).pathname.split("/").pop()??"";(Xv.test(te)||KM.test(te))&&(Q=te)}W=[{file:new File([B],Q,{type:B.type}),alt:J}]}else W=[...H.files].filter(({type:B})=>Lo.includes(B)).map(B=>({file:B}));W.length&&(W=W.map(({file:B,alt:J},Q)=>{if(B?.name==="image.png"){const{year:ee,month:te,day:re,hour:he,minute:pe,second:ce}=el(),ge=W.length>1?`-${Q+1}`:"",Pe=`${ee}${te}${re}-${he}${pe}${ce}${ge}.png`;B=new File([B],Pe,{type:B.type})}return{file:B,alt:J}}),C({target:U,images:W}))},T=async M=>{const{target:U,dataTransfer:H}=M,G=H?.files;let W=[];if(G?.length)W=[...G].filter(({type:Y})=>Lo.includes(Y)).map(Y=>({file:Y}));else{const Y=M.dataTransfer?.getData("text/html");if(Y){const R=new DOMParser().parseFromString(Y,"text/html").querySelector("img");if(R){const{src:B,alt:J}=R,Q=B.match(/^data:(?<type>image\/.+?);base64,.+/);let ee;if(Q){const te=Q.groups?.type??"";if(Lo.includes(te))try{const re=await(await fetch(B)).blob(),{year:he,month:pe,day:ce,hour:ge,minute:Pe,second:xe}=el(),de=te.split("/")[1],we=`${he}${pe}${ce}-${ge}${Pe}${xe}.${de}`;ee=new File([re],we,{type:te})}catch{return}}W=[{file:ee,src:B,alt:J}]}}}W.length&&C({target:U,images:W})},A=()=>{const M=typeof a()=="string"?a():"";l(h)!==M&&K(h,M,!0),!(!n()||s)&&(window.clearTimeout(p),p=window.setTimeout(()=>{Object.keys(n()?.extraValues[e.locale]??{}).forEach(U=>{const[H]=U.match(Vd)??[];H?.startsWith(`${e.keyPath}:`)&&!l(f)?.querySelector(`[data-key-path-prefix="${H}"]`)&&delete n().extraValues[e.locale][U]})},500))},P=()=>{const M=l(h);a()!==M&&a(M)};Me(()=>{a(),Se(()=>{A()})}),Me(()=>{l(h),Se(()=>{P()})});var L=kX();let O;var N=F(L);kn(N,Nt,null,M=>{var U=X(),H=D(U);or(H,()=>JSON.stringify(e.fieldConfig),G=>{{let W=b(()=>Ar(e.locale));_H(G,{get lang(){return l(W)},get modes(){return l(w)},get buttons(){return l(x)},get components(){return l(E)},flex:!0,get readonly(){return u()},get required(){return c()},get invalid(){return d()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,onpastecapture:Y=>{k(Y)},ondrop:Y=>{T(Y)},get value(){return l(h)},set value(Y){K(h,Y,!0)}})}}),S(M,U)}),xt(L,M=>K(f,M),()=>l(f)),Z(()=>O=cn(L,1,"wrapper svelte-eev3hl",null,O,{minimal:l(y)})),S(t,L),ae(),i()}function TX(){return{useNewRenderer:!0,renderer:{heading(...t){return jt.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return jt.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return jt.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}const $X=(...t)=>{const{alt:e,src:n,title:r}=t.at(-1),i=n.replaceAll(" ","%20");return r?``:``};var CX=j('<div role="none" class="svelte-lijj98"><!></div>');const AX={hash:"svelte-lijj98",code:"[role='document'] div.svelte-lijj98 :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}[role='document'] div.svelte-lijj98 :is(video, img) {max-width:100%;max-height:100%;}[role='document'] div.svelte-lijj98 :is(a:has(img)) {display:inline-block;}[role='document'] div.svelte-lijj98 :is(a:has(img)) img {pointer-events:none;}"};function PX(t,e){se(e,!0),Ee(t,AX);const n=()=>V(Je,"$entryDraft",r),[r,i]=me();let o=ie("");const s=b(()=>n()?.originalEntry),a=b(()=>n()?.collectionName??""),c=b(()=>n()?.fileName),u=b(()=>st(e.fieldConfig.sanitize_preview,!0)),d=b(()=>(e.currentValue??"").replace(oF,$X)),f={breaks:!0,async:!0,walkTokens:async v=>{if(v.type==="image"){const _=await rl({value:v.href,entry:l(s),collectionName:l(a),fileName:l(c)});_&&(v.href=_)}}},h={ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i};GF(TX()),Me(()=>{(async()=>K(o,await hy(l(d),f),!0))()});var p=CX(),g=F(p);{var m=v=>{var _=X(),y=D(_);cr(y,()=>l(u)?jr.sanitize(l(o),h):l(o)),S(v,_)};q(g,v=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&v(m)})}S(t,p),ae(),i()}function LX(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1),s=ie(void 0),a=ie("");const c=b(()=>st(e.fieldConfig.value_type,"int")),u=b(()=>e.fieldConfig.min),d=b(()=>e.fieldConfig.max),f=b(()=>st(e.fieldConfig.step,1)),h=b(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(s)!==n())if(typeof n()=="number")K(s,n(),!0);else if(typeof n()=="string"){const w=n().trim()?Number(n()):NaN;K(s,Number.isNaN(w)?void 0:w,!0)}else K(s,void 0);!l(h)&&l(a)!==n()&&K(a,String(n()),!0)}},g=()=>{let w;l(h)?l(s)===void 0?w=NaN:l(c)==="int"?w=Number.parseInt(l(h)?String(l(s)):l(a),10):w=Number.parseFloat(l(h)?String(l(s)):l(a)):w=l(a),l(h)&&Number.isNaN(w)&&(w=null),n()!==w&&n(w)};Me(()=>{n(),Se(()=>{p()})}),Me(()=>{l(a),Se(()=>{g()})}),Me(()=>{l(s),Se(()=>{g()})});var m=X(),v=D(m);{var _=w=>{xH(w,{get min(){return l(u)},get max(){return l(d)},get step(){return l(f)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(s)},set value(x){K(s,x,!0)}})},y=w=>{qn(w,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(x){K(a,x,!0)}})};q(v,w=>{l(h)?w(_):w(y,!1)})}S(t,m),ae()}var NX=j('<p dir="auto"><!></p>');function OX(t,e){se(e,!0);const n=b(()=>st(e.fieldConfig.value_type,"int")),r=b(()=>Ar(e.locale)),i=b(()=>Intl.NumberFormat(l(r)));var o=X(),s=D(o);{var a=c=>{var u=NX(),d=F(u);{var f=p=>{var g=Fe();Z(m=>ne(g,m),[()=>l(i).format(Number(e.currentValue))]),S(p,g)},h=p=>{var g=Fe();Z(()=>ne(g,e.currentValue)),S(p,g)};q(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}Z(()=>{Te(u,"lang",l(r)),u.dir=u.dir}),S(c,u)};q(s,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}S(t,o),ae()}const qL=t=>{const{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,isIndexFile:s}=oe(Je),{defaultLocale:a}=(i??r)._i18n,c={...ea(t),...ea(o[a])},u={collectionName:e,fileName:n,valueMap:c,isIndexFile:s},d=[];return Object.keys(c).forEach(f=>{const h=mn({...u,keyPath:f});if(!h)return;const{widget:p="text",i18n:g=!1}=h;["text","string","markdown"].includes(p)&&[!0,"translate"].includes(g)&&(c[f]=t[f]??""),([!1,"none"].includes(g)||d.some(m=>new RegExp(`^${Gt(m)}\\b`).test(f)))&&(delete c[f],d.push(f))}),c},VL=t=>{Je.update(e=>{const{fields:n,currentLocales:r,currentValues:i,validities:o}=e,s=!r[t];if(s&&!i[t]){const{collectionName:a,fileName:c,originalValues:u}=e,d=Pf(n,t);return{...e,currentLocales:{...r,[t]:s},originalValues:{...u,[t]:d},currentValues:{...i,[t]:Mw({draft:{collectionName:a,fileName:c},locale:t,target:qL(d)})}}}return{...e,currentLocales:{...r,[t]:s},validities:{...o,[t]:{}}}})},IX=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s})=>{const a={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i};return s?s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/);return iu({...a,keyPath:`${n}.${d.replace(/^fields\./,"")}`,locale:o,transformations:f})}):pC({valueMap:r,locale:o,keyPath:n,keyPathRegex:new RegExp(`^${Gt(n)}\\.`),getFieldArgs:a})};var RX=j('<div role="none" class="summary svelte-ztn6n1"><!></div>'),DX=j('<div role="group" class="wrapper svelte-ztn6n1"><!> <div role="none" class="item-list"><!></div></div>'),MX=j("<!> <!> <!>",1);const FX={hash:"svelte-ztn6n1",code:".wrapper.svelte-ztn6n1 {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.sui.checkbox + .wrapper.svelte-ztn6n1 > .group {margin-top:8px;}.summary.svelte-ztn6n1 {padding:8px;}"};function zX(t,e){const n=Vn();se(e,!0),Ee(t,FX);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(vn,"$isSmallScreen",s),[s,a]=me(),{widgetContext:c,valueStoreKey:u="currentValues"}=sr("field-editor")??{},d=c==="single-subfield-list-widget";let f=I(e,"required",3,!0);const h=b(()=>e.fieldConfig.name),p=b(()=>st(e.fieldConfig.i18n,!1)),g=b(()=>e.fieldConfig.collapsed),m=b(()=>e.fieldConfig.summary),v=b(()=>e.fieldConfig.fields),_=b(()=>e.fieldConfig.types),y=b(()=>st(e.fieldConfig.typeKey,"type")),w=b(()=>r()?.isIndexFile??!1),x=b(()=>r()?.collection),E=b(()=>r()?.collectionName??""),$=b(()=>r()?.collectionFile),C=b(()=>r()?.fileName),k=b(()=>(l($)??l(x))?._i18n??bo),T=b(()=>l(k).defaultLocale),A=b(()=>Un(r()?.[u][e.locale])??{}),P=b(()=>({collectionName:l(E),fileName:l(C),valueMap:l(A),isIndexFile:l(w)})),L=b(()=>Object.entries(l(A)).some(([xe,de])=>!!xe.startsWith(`${e.keyPath}.`)&&(de!==null||mn({...l(P),keyPath:xe})?.widget==="object"))),O=b(()=>c==="markdown-editor-component"||e.locale===l(T)||l(p)!==!1),N=b(()=>`${e.keyPath}#`),M=b(()=>r()?.expanderStates?._[l(N)]??!0),U=b(()=>Array.isArray(l(_))),H=b(()=>`${e.keyPath}.${l(y)}`),G=b(()=>l(U)?l(_)?.find(({name:xe})=>xe===l(A)[l(H)]):void 0),W=b(()=>(l(U)?l(G)?.fields:l(v))??[]),Y=b(()=>l(U)&&l(G)?.summary||l(m)),R=b(()=>e.locale!==l(T)&&l(p)==="duplicate"),B=()=>{if(d)return;const xe=l(N);Co({[xe]:jL({key:xe,locale:e.locale,collapsed:l(g)})})},J=async({type:xe}={})=>{Ye(oo,!1),xe&&(Object.keys(r()?.[u]??{}).forEach(ve=>{(ve===e.locale||l(p)==="duplicate")&&_t(Je,Se(r)[u][ve][l(H)]=xe,Se(r))}),await Ma());const de=Object.fromEntries(Object.entries(Pf(l(W),e.locale)).map(([ve,fe])=>[`${e.keyPath}.${ve}`,fe])),we=e.locale===l(T)?de:qL(de);Object.entries(r()?.[u]??{}).forEach(([ve,fe])=>{(ve===e.locale||l(p)==="duplicate")&&(_t(Je,Se(r)[u][ve]=Object.assign(fe,ea({...we,...fe})),Se(r)),delete r()[u][ve][e.keyPath])}),Ye(oo,!0)},Q=()=>{Ye(oo,!1),Object.entries(r()?.[u]??{}).forEach(([xe,de])=>{(xe===e.locale||l(p)==="duplicate")&&(Object.keys(de).forEach(we=>{we.startsWith(`${e.keyPath}.`)&&(_t(Je,Se(r)[u][xe][we]=null,Se(r)),delete r()?.[u][xe][we])}),_t(Je,Se(r)[u][xe][e.keyPath]=null,Se(r)))}),Ye(oo,!0)},ee=()=>IX({...l(P),keyPath:e.keyPath,locale:e.locale,summaryTemplate:l(Y)});Ut(()=>{B()});var te=MX(),re=D(te);{var he=xe=>{{let de=b(()=>i()("add_x",{values:{name:e.fieldLabel||l(h)}}));pf(xe,{get label(){return l(de)},get checked(){return l(L)},get disabled(){return l(R)},onChange:({detail:{checked:we}})=>{we?J():Q()}})}};q(re,xe=>{!l(U)&&!f()&&xe(he)})}var pe=z(re,2);{var ce=xe=>{i_(xe,{get disabled(){return l(R)},get fieldConfig(){return e.fieldConfig},addItem:J})};q(pe,xe=>{l(U)&&!l(L)&&xe(ce)})}var ge=z(pe,2);{var Pe=xe=>{var de=DX(),we=F(de);{var ve=Ne=>{{const Ae=Le=>{var Ie=X(),Re=D(Ie);{var nt=Ge=>{{const ut=be=>{Ze(be,{name:"close"})};let Oe=b(()=>i()("remove"));et(Ge,{size:"small",iconic:!0,get disabled(){return l(R)},get"aria-label"(){return l(Oe)},onclick:()=>{Q()},startIcon:ut,$$slots:{startIcon:!0}})}};q(Re,Ge=>{l(U)&&Ge(nt)})}S(Le,Ie)};let $e=b(()=>l(U)?l(G)?.label||l(G)?.name:""),je=b(()=>l(W).length?()=>Co({[l(N)]:!l(M)}):void 0);Ww(Ne,{get label(){return l($e)},get controlId(){return`object-${n}-item-list`},get expanded(){return l(M)},get toggleExpanded(){return l(je)},endContent:Ae,$$slots:{endContent:!0}})}};q(we,Ne=>{d||Ne(ve)})}var fe=z(we,2),_e=F(fe);{var Ce=Ne=>{var Ae=X(),$e=D(Ae);it($e,17,()=>l(W),je=>je.name,(je,Le)=>{const Ie=b(()=>`${e.keyPath}.${l(Le).name}`);Hi(je,{children:(Re,nt)=>{{let Ge=b(()=>l(U)&&l(G)?.name?`${e.keyPath}<${l(G).name}>.${l(Le).name}`:l(Ie));Lg(Re,{get keyPath(){return l(Ie)},get typedKeyPath(){return l(Ge)},get locale(){return e.locale},get fieldConfig(){return l(Le)}})}},$$slots:{default:!0}})}),S(Ne,Ae)},ze=Ne=>{const Ae=b(ee);var $e=X(),je=D($e);{var Le=Ie=>{var Re=RX(),nt=F(Re);{let Ge=b(()=>o()?2:1);Pr(nt,{get lines(){return l(Ge)},children:(ut,Oe)=>{var be=Fe();Z(()=>ne(be,l(Ae))),S(ut,be)},$$slots:{default:!0}})}Z(()=>Te(Re,"id",`object-${n}-summary`)),S(Ie,Re)};q(je,Ie=>{l(Ae)&&Ie(Le)})}S(Ne,$e)};q(_e,Ne=>{l(M)?Ne(Ce):Ne(ze,!1)})}Z(()=>{Te(de,"aria-labelledby",l(M)?void 0:`object-${n}-summary`),Te(fe,"id",`object-${n}-item-list`)}),S(xe,de)};q(ge,xe=>{(!(!f()||l(U))||l(L))&&l(O)&&xe(Pe)})}S(t,te),ae(),a()}function jX(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>e.fieldConfig.fields),s=b(()=>e.fieldConfig.types),a=b(()=>st(e.fieldConfig.typeKey,"type")),c=b(()=>Un(n()?.currentValues[e.locale])??{}),u=b(()=>Object.entries(l(c)).some(([y,w])=>!!y.startsWith(`${e.keyPath}.`)&&!!w)),d=b(()=>Array.isArray(l(s))),f=b(()=>`${e.keyPath}.${l(a)}`),h=b(()=>l(d)?l(s)?.find(({name:y})=>y===l(c)[l(f)]):void 0),p=b(()=>l(h)?l(h).label||l(h).name:void 0),g=b(()=>(l(d)?l(h)?.fields:l(o))??[]);var m=X(),v=D(m);{var _=y=>{BL(y,{get label(){return l(p)},children:(w,x)=>{var E=X(),$=D(E);it($,17,()=>l(g),C=>C.name,(C,k)=>{const T=b(()=>`${e.keyPath}.${l(k).name}`);Hi(C,{children:(A,P)=>{{let L=b(()=>l(d)&&l(h)?.name?`${e.keyPath}<${l(h).name}>.${l(k).name}`:l(T));Yw(A,{get keyPath(){return l(T)},get typedKeyPath(){return l(L)},get locale(){return e.locale},get fieldConfig(){return l(k)}})}},$$slots:{default:!0}})}),S(w,E)}})};q(v,y=>{l(u)&&y(_)})}S(t,m),ae(),i()}function UX(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),{valueStoreKey:o="currentValues"}=sr("field-editor")??{};let s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1);const u=b(()=>e.fieldConfig.i18n),d=b(()=>e.fieldConfig.max),f=b(()=>st(e.fieldConfig.dropdown_threshold,5)),h=w=>{n()&&Object.keys(Un(n()[o])??{}).forEach(x=>{l(u)!=="duplicate"&&x!==e.locale||zL({locale:x,valueStoreKey:o,keyPath:e.keyPath,manipulate:w})})},p=w=>{h(({valueList:x})=>{x.push(w)})},g=w=>{h(({valueList:x})=>{x.splice(x.indexOf(w),1)})};var m=X(),v=D(m);{var _=w=>{k5(w,Yt({get disabled(){return a()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get options(){return e.options}},()=>({values:e.currentValue}),{get max(){return l(d)},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onAddValue:({detail:{value:x}})=>{p(x)},onRemoveValue:({detail:{value:x}})=>{g(x)}}))},y=w=>{p4(w,{get"aria-labelledby"(){return`${e.fieldId??""}-label`},children:(x,E)=>{var $=X(),C=D($);it(C,17,()=>e.options,({label:k,value:T})=>T,(k,T)=>{let A=()=>l(T).label,P=()=>l(T).value;{let L=b(()=>e.currentValue?.includes(P())??!1);pf(k,{get label(){return A()},get value(){return P()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get checked(){return l(L)},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{checked:O}})=>{O?p(P()):g(P())}})}}),S(x,$)},$$slots:{default:!0}})};q(v,w=>{e.options.length>l(f)?w(_):w(y,!1)})}S(t,m),ae(),i()}function BX(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=I(e,"options",7);const d=b(()=>st(e.fieldConfig.dropdown_threshold,5));let f=ie(void 0);Me(()=>{l(f)||K(f,u()[0]?.value!==void 0?typeof u()[0]?.value:"string",!0)}),Me(()=>{!s()&&!u().some(({value:v})=>!v)&&u([{label:n()("unselected_option"),value:l(f)==="number"?null:"",searchValue:""},...u()])});var h=X(),p=D(h);{var g=v=>{Al(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(_){o(_)},children:(_,y)=>{var w=X(),x=D(w);it(x,17,u,({label:E,value:$,searchValue:C})=>$,(E,$)=>{let C=()=>l($).label,k=()=>l($).value,T=()=>l($).searchValue;{let A=b(()=>k()===o());Tr(E,{get label(){return C()},get value(){return k()},get valueType(){return l(f)},get searchValue(){return T()},get selected(){return l(A)},wrap:!0})}}),S(_,w)},$$slots:{default:!0}})},m=v=>{i5(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{value:_}})=>{o(_)},children:(_,y)=>{var w=X(),x=D(w);it(x,17,u,({label:E,value:$})=>$,(E,$)=>{let C=()=>l($).label,k=()=>l($).value;{let T=b(()=>k()===o());l5(E,{get label(){return C()},get value(){return k()},get valueType(){return l(f)},get checked(){return l(T)}})}}),S(_,w)},$$slots:{default:!0}})};q(p,v=>{u().length>l(d)?v(g):v(m,!1)})}S(t,h),ae(),i()}function HL(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1),s=I(e,"sortOptions",3,!1);const a=b(()=>e.fieldConfig.options),c=b(()=>e.fieldConfig.multiple),u=b(()=>l(c)?UX:BX),d=b(()=>{const p=l(a).map(g=>Bt(g)?g:{label:g,value:g});return s()&&p.sort((g,m)=>Ci(g.label,m.label)),p});var f=X(),h=D(f);or(h,()=>JSON.stringify(l(d)),p=>{var g=X(),m=D(g);ur(m,()=>l(u),(v,_)=>{_(v,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldConfig(){return e.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get options(){return l(d)},get currentValue(){return n()},set currentValue(y){n(y)}})}),S(p,g)}),S(t,f),ae()}var qX=j('<div role="none" class="wrapper"><!></div>');function VX(t,e){se(e,!0);let n=I(e,"currentValue",15),r=I(e,"required",3,!0),i=I(e,"readonly",3,!1),o=I(e,"invalid",3,!1);const s=b(()=>e.fieldConfig.collection),a=b(()=>e.fieldConfig.file),c=b(()=>l(a)?[Oy(l(s),l(a))].filter(h=>!!h):Wo(l(s))),u=b(()=>({...e.fieldConfig,widget:"select",options:gy(e.locale,e.fieldConfig,l(c))}));var d=qX(),f=F(d);HL(f,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return e.fieldId},get fieldLabel(){return e.fieldLabel},get fieldConfig(){return l(u)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},sortOptions:!0,get currentValue(){return n()},set currentValue(h){n(h)}}),S(t,d),ae()}var HX=j('<p dir="auto"> </p>');function KX(t,e){se(e,!0);const n=b(()=>e.fieldConfig.collection),r=b(()=>e.fieldConfig.file),i=b(()=>st(e.fieldConfig.multiple,!1)),o=b(()=>st(e.fieldConfig.value_field,"{{slug}}")),s=b(()=>tl(e.locale)),a=b(()=>l(r)?[Oy(l(n),l(r))].filter(p=>!!p):Wo(l(n))),c=b(()=>gy(e.locale,e.fieldConfig,l(a))),u=b(()=>(l(i)?e.currentValue:[e.currentValue]).filter(p=>p!==void 0).map(p=>{const g=l(c).find(m=>m.value===p)?.label;return g&&g!==p?["slug","{{slug}}","{{fields.slug}}"].includes(l(o))?g:`${g} (${p})`:p}));var d=X(),f=D(d);{var h=p=>{var g=HX(),m=F(g);Z((v,_)=>{Te(g,"lang",v),ne(m,_),g.dir=g.dir},[()=>Ar(e.locale),()=>l(s).format(l(u))]),S(p,g)};q(f,p=>{l(u).length&&p(h)})}S(t,d),ae()}var GX=j('<p dir="auto"> </p>'),WX=j('<p dir="auto"> </p>');function YX(t,e){se(e,!0);const n=b(()=>e.fieldConfig.options),r=b(()=>e.fieldConfig.multiple),i=b(()=>C$(l(n))),o=b(()=>tl(e.locale)),s=f=>l(i)&&l(n).find(h=>h.value===f)?.label||String(f);var a=X(),c=D(a);{var u=f=>{var h=GX(),p=F(h);Z((g,m)=>{Te(h,"lang",g),ne(p,m),h.dir=h.dir},[()=>Ar(e.locale),()=>l(o).format(e.currentValue.map(s).sort())]),S(f,h)},d=f=>{var h=X(),p=D(h);{var g=m=>{var v=WX(),_=F(v);Z((y,w)=>{Te(v,"lang",y),ne(_,w),v.dir=v.dir},[()=>Ar(e.locale),()=>s(e.currentValue)]),S(m,v)};q(p,m=>{e.currentValue!==void 0&&m(g)},!0)}S(f,h)};q(c,f=>{l(r)&&Array.isArray(e.currentValue)&&e.currentValue.length?f(u):f(d,!1)})}S(t,a),ae()}const KL=({fieldConfig:t,value:e})=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),o=Number.isInteger(r)&&(n??0)<=r,s=e?[...e.trim()].length:0,a=i&&s<n,c=o&&s>r;return{count:s,hasMin:i,hasMax:o,tooShort:a,tooLong:c,invalid:a||c}};var JX=j('<div class="wrapper svelte-18cyzaa"><!> <span role="none"> </span> <!></div>');const XX={hash:"svelte-18cyzaa",code:".wrapper.svelte-18cyzaa {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:end;}.count.invalid.svelte-18cyzaa {color:var(--sui-error-foreground-color);}.count.svelte-18cyzaa:not(.invalid) {color:var(--sui-success-foreground-color);}"};function GL(t,e){se(e,!0),Ee(t,XX);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>e.fieldConfig.minlength),s=b(()=>e.fieldConfig.maxlength),a=b(()=>KL({fieldConfig:e.fieldConfig,value:e.currentValue})),c=b(()=>l(a).count),u=b(()=>l(a).hasMin),d=b(()=>l(a).hasMax),f=b(()=>l(a).invalid);var h=X(),p=D(h);{var g=m=>{var v=JX(),_=F(v);{var y=k=>{var T=Fe();Z(()=>ne(T,`${l(o)??""}
|
|
630
630
|
/ `)),S(k,T)};q(_,k=>{l(u)&&k(y)})}var w=z(_,2);let x;var E=F(w),$=z(w,2);{var C=k=>{var T=Fe();Z(()=>ne(T,` /
|
|
631
631
|
${l(s)??""}`)),S(k,T)};q($,k=>{l(d)&&k(C)})}Z(k=>{Te(v,"aria-label",k),x=cn(w,1,"count svelte-18cyzaa",null,x,{invalid:l(f)}),ne(E,l(c))},[()=>n()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(o),max:l(s)}})]),S(m,v)};q(p,m=>{(l(u)||l(d))&&m(g)})}S(t,h),ae(),i()}function ZX(t,e){se(e,!0);const[n,r]=me();let i=I(e,"currentValue",15),o=I(e,"required",3,!0),s=I(e,"readonly",3,!1),a=I(e,"invalid",3,!1);const{extraHint:c}=sr("field-editor")??{};let u=ie("");const d=b(()=>st(e.fieldConfig.type,"text")),f=b(()=>st(e.fieldConfig.prefix,"")),h=b(()=>st(e.fieldConfig.suffix,"")),p=()=>{let m=typeof i()=="string"?i():"";l(f)&&m.startsWith(l(f))&&(m=m.slice(l(f).length)),l(h)&&m.endsWith(l(h))&&(m=m.slice(0,-l(h).length)),l(u)!==m&&K(u,m,!0)},g=()=>{let m=l(u);m.trim()&&(l(f)||l(h))&&(m=`${l(f)}${m}${l(h)}`),i()!==m&&i(m)};Me(()=>{i(),Se(()=>{p()})}),Me(()=>{l(u),Se(()=>{g()})}),Me(()=>{c&&Ye(c,GL)});{let m=b(()=>Ar(e.locale));qn(t,{get lang(){return l(m)},get type(){return l(d)},get inputmode(){return l(d)},flex:!0,get readonly(){return s()},get required(){return o()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(v){K(u,v,!0)}})}ae(),r()}const QX=t=>{if(!Yd(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},eZ=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const o=new URLSearchParams(i);let s=`${e}/embed/${o.get("v")}`;return o.get("list")&&(o.delete("v"),o.set("listType","playlist"),s+=`?${o}`),s}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`};var tZ=j('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-1l0g75t"></iframe>'),nZ=j("<a> </a>"),rZ=j('<div role="none"><!></div>');const iZ={hash:"svelte-1l0g75t",code:"iframe.svelte-1l0g75t {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function oZ(t,e){se(e,!0),Ee(t,iZ);const n=()=>V(ue,"$_",r),[r,i]=me();let o=ie(!0);const s=b(()=>eZ(e.url));Ut(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:f,violatedDirective:h})=>{f===new URL(l(s)).origin&&h==="frame-src"&&K(o,!1)})});var a=rZ(),c=F(a);{var u=f=>{Hi(f,{children:(h,p)=>{var g=tZ();Z((m,v)=>{Te(g,"src",m),Te(g,"title",v)},[()=>encodeURI(l(s)),()=>n()("youtube_video_player")]),S(h,g)},$$slots:{default:!0}})},d=f=>{var h=nZ(),p=F(h);Z(g=>{Te(h,"href",g),ne(p,e.url)},[()=>encodeURI(e.url)]),S(f,h)};q(c,f=>{l(o)?f(u):f(d,!1)})}S(t,a),ae(),i()}var sZ=j("<a> </a>"),aZ=j("<a> </a>"),lZ=j('<p dir="auto"><!></p>');const cZ={hash:"svelte-uv5j28",code:".title.svelte-uv5j28 {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function uZ(t,e){se(e,!0),Ee(t,cZ);const n=b(()=>e.fieldConfig.name),r=b(()=>st(e.fieldConfig.type,"text"));var i=X(),o=D(i);{var s=a=>{var c=lZ();let u;var d=F(c);{var f=p=>{var g=X(),m=D(g);{var v=y=>{oZ(y,{get url(){return e.currentValue}})},_=y=>{var w=sZ(),x=F(w);Z(E=>{Te(w,"href",E),ne(x,e.currentValue)},[()=>encodeURI(e.currentValue)]),S(y,w)};q(m,y=>{QX(e.currentValue)?y(v):y(_,!1)})}S(p,g)},h=p=>{var g=X(),m=D(g);{var v=y=>{var w=aZ(),x=F(w);Z(E=>{Te(w,"href",`mailto:${E??""}`),ne(x,e.currentValue)},[()=>encodeURI(e.currentValue)]),S(y,w)},_=y=>{var w=Fe();Z(()=>ne(w,e.currentValue)),S(y,w)};q(m,y=>{l(r)==="email"?y(v):y(_,!1)},!0)}S(p,g)};q(d,p=>{l(r)==="url"||Yd(e.currentValue)?p(f):p(h,!1)})}Z(p=>{Te(c,"lang",p),u=cn(c,1,"svelte-uv5j28",null,u,{title:l(n)==="title"}),c.dir=c.dir},[()=>Ar(e.locale)]),S(a,c)};q(o,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(s)})}S(t,i),ae()}function dZ(t,e){se(e,!0);const[n,r]=me(),{extraHint:i}=sr("field-editor")??{};let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!1),c=I(e,"invalid",3,!1),u=ie("");const d=()=>{const h=typeof o()=="string"?o():"";l(u)!==h&&K(u,h,!0)},f=()=>{const h=l(u);o()!==h&&o(h)};Me(()=>{o(),Se(()=>{d()})}),Me(()=>{l(u),Se(()=>{f()})}),Me(()=>{i&&Ye(i,GL)});{let h=b(()=>Ar(e.locale));Sf(t,{get lang(){return l(h)},flex:!0,get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(u)},set value(p){K(u,p,!0)}})}ae(),r()}var fZ=j('<p dir="auto" class="svelte-4kf06s"> </p>');const hZ={hash:"svelte-4kf06s",code:"p.svelte-4kf06s {white-space:pre-wrap;}"};function pZ(t,e){se(e,!0),Ee(t,hZ);var n=X(),r=D(n);{var i=o=>{var s=fZ(),a=F(s);Z(c=>{Te(s,"lang",c),ne(a,e.currentValue),s.dir=s.dir},[()=>Ar(e.locale)]),S(o,s)};q(r,o=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&o(i)})}S(t,n),ae()}const WL=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?Nv():Si();return e?`${e}${r}`:r};function gZ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me();let o=I(e,"currentValue",15),s=I(e,"required",3,!0),a=I(e,"readonly",3,!0),c=I(e,"invalid",3,!1);const u=b(()=>n()?.collection),d=b(()=>n()?.collectionFile),f=b(()=>(l(d)??l(u))?._i18n??bo),h=b(()=>l(f).defaultLocale);Ut(()=>{o()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&o(WL(e.fieldConfig)),"read_only"in e.fieldConfig&&Np("uuid_read_only")});{let p=b(()=>a()&&e.fieldConfig.read_only!==!1);qn(t,{flex:!0,get readonly(){return l(p)},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(g){o(g)}})}ae(),i()}var mZ=j('<p class="svelte-12jrvw4"> </p>');const vZ={hash:"svelte-12jrvw4",code:"p.svelte-12jrvw4 {font-family:var(--sui-font-family-monospace);}"};function bZ(t,e){se(e,!0),Ee(t,vZ);var n=X(),r=D(n);{var i=o=>{var s=mZ(),a=F(s);Z(()=>ne(a,e.currentValue)),S(o,s)};q(r,o=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&o(i)})}S(t,n),ae()}const Ym={boolean:nW,code:oW,color:fW,compute:mW,datetime:xW,file:_S,image:_S,keyvalue:dJ,list:KJ,map:aX,markdown:EX,number:LX,object:zX,relation:VX,select:HL,string:ZX,text:dZ,uuid:gZ},CS={boolean:iW,code:aW,color:gW,compute:bW,datetime:SW,file:wS,image:wS,keyvalue:gJ,list:nX,map:uX,markdown:PX,number:OX,object:jX,relation:KX,select:YX,string:uZ,text:pZ,uuid:bZ},AS=({locale:t,isDefaultLocale:e,keyPath:n,getFieldArgs:r,currentValues:i,reset:o=!1})=>{const{valueMap:s={}}=r;Object.entries(s).forEach(([a,c])=>{if(!n||a.startsWith(n)){const u=mn({...r,keyPath:a});(e||[!0,"translate"].includes(u?.i18n??!1))&&(o?delete i[t][a]:i[t][a]=c)}})},_Z=({draft:t,keyPath:e,locale:n})=>{const{collection:r,collectionName:i,collectionFile:o,fileName:s,currentValues:a,originalValues:c,isIndexFile:u}=t,{defaultLocale:d}=(o??r)._i18n,h={keyPath:e,locale:n,isDefaultLocale:n===d,currentValues:a},p={collectionName:i,fileName:s,keyPath:"",isIndexFile:u};AS({...h,getFieldArgs:{...p,valueMap:a[n]},reset:!0}),AS({...h,getFieldArgs:{...p,valueMap:c[n]}})},Jw=({locale:t="",keyPath:e=""}={})=>{const n=oe(Je),{collection:r,collectionFile:i,currentValues:o}=n,{allLocales:s}=(i??r)._i18n;(t?[t]:s).forEach(c=>{_Z({draft:n,keyPath:e,locale:c})}),Je.update(()=>({...n,currentValues:o}))};var yZ=j('<div class="required">*</div>'),wZ=j("<!> <!>",1),xZ=j('<p class="comment svelte-dkfcyc"><!></p>'),kZ=j("<!> <!> <!> <!> <!> <!> <!>",1),SZ=j('<div role="none"> </div>'),EZ=j('<div role="none" class="before-input svelte-dkfcyc"><!></div>'),TZ=j('<div role="none" class="prefix svelte-dkfcyc"> </div>'),$Z=j('<div role="none" class="suffix svelte-dkfcyc"> </div>'),CZ=j('<div role="none" class="after-input svelte-dkfcyc"><!></div>'),AZ=j("<!> <!> <!> <!> <!>",1),PZ=j('<p class="hint svelte-dkfcyc"><!></p>'),LZ=j('<div role="none" class="footer svelte-dkfcyc"><!> <!></div>'),NZ=j('<header role="none"><h4 role="none"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none"><!></div> <!>',1);const OZ={hash:"svelte-dkfcyc",code:`.widget-wrapper.has-extra-labels.svelte-dkfcyc {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-dkfcyc :is(input[type=text], textarea) {width:100%;}.widget-wrapper.svelte-dkfcyc input:is([type=color], [type=number]) {outline:0;border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);height:var(--sui-button-medium-height);color:inherit;background-color:var(--sui-textbox-background-color);}.widget-wrapper.svelte-dkfcyc input:is([type=file], [type=checkbox]) {color:inherit;}.widget-wrapper.svelte-dkfcyc > div {color:inherit;}.widget-wrapper.svelte-dkfcyc input:is([type=date], [type=datetime-local], [type=time]) {outline:0;margin:var(--sui-focus-ring-width);border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:var(--sui-textbox-singleline-padding);width:auto;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);text-transform:uppercase;}.widget-wrapper.svelte-dkfcyc input:is([type=date], [type=datetime-local], [type=time]):disabled {opacity:0.4;}.widget-wrapper.svelte-dkfcyc input[aria-invalid=true]:is([type=color],
|
|
632
632
|
[type=date],
|
|
@@ -634,7 +634,7 @@ td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:va
|
|
|
634
634
|
[type=time]) {border-color:var(--sui-error-border-color);}.widget-wrapper.svelte-dkfcyc input:read-only {-webkit-user-select:text;user-select:text;pointer-events:auto;}.before-input.svelte-dkfcyc,
|
|
635
635
|
.after-input.svelte-dkfcyc,
|
|
636
636
|
.prefix.svelte-dkfcyc,
|
|
637
|
-
.suffix.svelte-dkfcyc {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-dkfcyc {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-dkfcyc {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-dkfcyc {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function Lg(t,e){const n=Vn();se(e,!0),Ee(t,OZ);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(h,"$extraHint",s),[s,a]=me(),c=sr("field-editor")??{};let u=I(e,"context",19,()=>c.widgetContext??void 0),d=I(e,"valueStoreKey",19,()=>c.valueStoreKey??"currentValues");const f=Ie=>jr.sanitize(uC(Ie.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),h=ot();f_("field-editor",{widgetContext:u(),extraHint:h,valueStoreKey:d()});const p=b(()=>u()==="markdown-editor-component"),g=b(()=>e.fieldConfig.name),m=b(()=>st(e.fieldConfig.label,"")),v=b(()=>st(e.fieldConfig.comment,"")),_=b(()=>st(e.fieldConfig.hint,"")),y=b(()=>st(e.fieldConfig.widget,"string")),w=b(()=>st(e.fieldConfig.i18n,!1)),x=b(()=>st(e.fieldConfig.pattern,()=>[],!0)),E=b(()=>st(e.fieldConfig.readonly,!1)),$=b(()=>ru({fieldConfig:e.fieldConfig,locale:e.locale})),C=b(()=>l(y)==="list"?El(e.fieldConfig):{hasSubFields:!1}),k=b(()=>l(C).hasSubFields),T=b(()=>nu(e.fieldConfig)),A=b(()=>G$.includes(l(y))?e.fieldConfig:{}),P=b(()=>st(l(A).min,0)),L=b(()=>st(l(A).max,1/0)),O=b(()=>l(y)==="string"?e.fieldConfig.type??"text":l(y)==="number"?"number":void 0),N=b(()=>["string"].includes(l(y))),M=b(()=>l(N)?e.fieldConfig.prefix:void 0),U=b(()=>l(N)?e.fieldConfig.suffix:void 0),H=b(()=>["boolean","number","string"].includes(l(y))),G=b(()=>l(H)?e.fieldConfig.before_input:void 0),W=b(()=>l(H)?e.fieldConfig.after_input:void 0),Y=b(()=>!!(l(M)||l(U)||l(G)||l(W))),R=b(()=>l(y)==="list"&&l(k)||l(T)||l(y)==="keyvalue"),B=b(()=>l(y)==="list"||l(T)),J=b(()=>r()?.collection),Q=b(()=>r()?.collectionFile),ee=b(()=>r()?.originalValues),te=b(()=>(l(Q)??l(J))?._i18n??bo),re=b(()=>l(te).i18nEnabled),he=b(()=>l(te).allLocales),pe=b(()=>l(te).defaultLocale),ce=b(()=>l(re)?l(he).filter(Ie=>Ie!==e.locale):[]),ge=b(()=>l(re)&&(l(w)===!0||l(w)==="translate")),Pe=b(()=>l(re)&&l(w)==="duplicate"),xe=b(()=>l(p)||e.locale===l(pe)||l(ge)||l(Pe)),de=b(()=>!l(p)&&l(ge)&&l(ce).length),we=b(()=>!l(p)&&!(l(Pe)&&e.locale!==l(pe))),ve=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+$`)),fe=b(()=>{const Ie=jn(r()?.[d()][e.locale]??{}),Re=Ie[e.keyPath];if(!l(B))return Re;const nt=Object.entries(Ie).filter(([Ge])=>l(ve).test(Ge));return nt.length?nt.map(([,Ge])=>Ge).filter(Ge=>Ge!==void 0):l(T)&&Re!==void 0&&typeof Re!="object"?[Re]:[]}),_e=b(()=>l(B)?Object.entries(l(ee)?.[e.locale]??{}).filter(([Ie])=>l(ve).test(Ie)).map(([,Ie])=>Ie).filter(Ie=>Ie!==void 0):l(ee)?.[e.locale]?.[e.keyPath]),Ce=b(()=>r()?.validities[e.locale][e.keyPath]),ze=b(()=>l(m)||l(g)),Ne=b(()=>l(E)||l(w)==="duplicate"&&e.locale!==l(pe)||l(y)==="compute"||l(y)==="uuid"),Ae=b(()=>l(Ce)?.valid===!1);Me(()=>{if(r()&&l(T)&&Array.isArray(l(fe))){const Ie=r()[d()][e.locale]?.[`${e.keyPath}.0`],[Re]=l(fe);Ie===void 0&&Re!==void 0&&(_t(Je,Se(r)[d()][e.locale][`${e.keyPath}.0`]=Re,Se(r)),delete r()[d()][e.locale][e.keyPath])}}),Me(()=>{if(r()&&!l(T)&&l(fe)===void 0){const Ie=r()[d()][e.locale]?.[`${e.keyPath}.0`];Ie!==void 0&&(_t(Je,Se(r)[d()][e.locale][e.keyPath]=Ie,Se(r)),Object.keys(r()[d()][e.locale]).forEach(Re=>{l(ve).test(Re)&&delete r()[d()][e.locale][Re]}))}});var $e=X(),je=D($e);{var Le=Ie=>{{let Re=b(()=>i()("x_field",{values:{field:l(ze)}})),nt=b(()=>l(y)==="compute");bL(Ie,{get"aria-label"(){return l(Re)},get"data-widget"(){return l(y)},get"data-key-path"(){return e.keyPath},get"data-typed-key-path"(){return e.typedKeyPath},get hidden(){return l(nt)},children:(Ge,ut)=>{var Oe=NZ(),be=D(Oe),ye=F(be),tt=F(ye),Ve=z(ye,2);{var Qe=gt=>{var Mt=yZ();Z(on=>Te(Mt,"aria-label",on),[()=>i()("required")]),S(gt,Mt)};q(Ve,gt=>{!l(Ne)&&l($)&>(Qe)})}var Xe=z(Ve,2);ii(Xe,{flex:!0});var ht=z(Xe,2);{var Pt=gt=>{_L(gt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(ce)},get keyPath(){return e.keyPath}})};q(ht,gt=>{l(de)&&["markdown","string","text","list","object"].includes(l(y))&>(Pt)})}var Qt=z(ht,2);{var en=gt=>{{const Mt=yn=>{{let Cn=b(()=>i()("field_options"));hr(yn,{get"aria-label"(){return l(Cn)},children:(An,Tt)=>{var dn=wZ(),Ot=D(dn);{var Nr=er=>{qw(er,{get locale(){return e.locale},get otherLocales(){return l(ce)},get keyPath(){return e.keyPath}})};q(Ot,er=>{l(de)&&er(Nr)})}var It=z(Ot,2);{var li=er=>{{let qr=b(()=>i()("revert_changes")),Gi=b(()=>pn(l(fe),l(_e))||/\.\d+\./.test(e.keyPath));vt(er,{get label(){return l(qr)},get disabled(){return l(Gi)},onclick:()=>{Jw({locale:e.locale,keyPath:e.keyPath})}})}};q(It,er=>{l(we)&&er(li)})}S(An,dn)},$$slots:{default:!0}})}};let on=b(()=>i()("show_field_options"));Ur(gt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(on)},popup:Mt,$$slots:{popup:!0}})}};q(Qt,gt=>{(l(de)||l(we))&>(en)})}var pt=z(be,2);{var kt=gt=>{var Mt=xZ(),on=F(Mt);cr(on,()=>f(l(v))),S(gt,Mt)};q(pt,gt=>{!l(Ne)&&l(v)&>(kt)})}var tn=z(pt,2);{var $n=gt=>{Vw(gt,{get id(){return`${n}-error`},children:(Mt,on)=>{var yn=kZ(),Cn=D(yn);{var An=dt=>{var $t=Fe();Z(Xt=>ne($t,Xt),[()=>i()("validation.value_missing")]),S(dt,$t)};q(Cn,dt=>{l(Ce).valueMissing&&dt(An)})}var Tt=z(Cn,2);{var dn=dt=>{const $t=b(()=>{const{minlength:ar}=e.fieldConfig;return{minlength:ar}});var Xt=Fe();Z(ar=>ne(Xt,ar),[()=>i()(l($t).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l($t).minlength}})]),S(dt,Xt)};q(Tt,dt=>{l(Ce).tooShort&&dt(dn)})}var Ot=z(Tt,2);{var Nr=dt=>{const $t=b(()=>{const{maxlength:ar}=e.fieldConfig;return{maxlength:ar}});var Xt=Fe();Z(ar=>ne(Xt,ar),[()=>i()(l($t).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l($t).maxlength}})]),S(dt,Xt)};q(Ot,dt=>{l(Ce).tooLong&&dt(Nr)})}var It=z(Ot,2);{var li=dt=>{const $t=b(()=>l(P)===1?"one":"many");var Xt=X(),ar=D(Xt);{var Wi=zn=>{var Ln=Fe();Z(pr=>ne(Ln,pr),[()=>i()("validation.range_underflow.number",{values:{min:l(P)}})]),S(zn,Ln)},Or=zn=>{var Ln=X(),pr=D(Ln);{var Oi=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_underflow.add_${l($t)}`,{values:{min:l(P)}})]),S(Hn,wr)},Xo=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_underflow.select_${l($t)}`,{values:{min:l(P)}})]),S(Hn,wr)};q(pr,Hn=>{l(R)?Hn(Oi):Hn(Xo,!1)},!0)}S(zn,Ln)};q(ar,zn=>{l(y)==="number"?zn(Wi):zn(Or,!1)})}S(dt,Xt)};q(It,dt=>{l(Ce).rangeUnderflow&&dt(li)})}var er=z(It,2);{var qr=dt=>{const $t=b(()=>l(L)===1?"one":"many");var Xt=X(),ar=D(Xt);{var Wi=zn=>{var Ln=Fe();Z(pr=>ne(Ln,pr),[()=>i()("validation.range_overflow.number",{values:{max:l(L)}})]),S(zn,Ln)},Or=zn=>{var Ln=X(),pr=D(Ln);{var Oi=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_overflow.add_${l($t)}`,{values:{max:l(L)}})]),S(Hn,wr)},Xo=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_overflow.select_${l($t)}`,{values:{max:l(L)}})]),S(Hn,wr)};q(pr,Hn=>{l(R)?Hn(Oi):Hn(Xo,!1)},!0)}S(zn,Ln)};q(ar,zn=>{l(y)==="number"?zn(Wi):zn(Or,!1)})}S(dt,Xt)};q(er,dt=>{l(Ce).rangeOverflow&&dt(qr)})}var Gi=z(er,2);{var Jo=dt=>{var $t=Fe();Z(()=>ne($t,l(x)[1])),S(dt,$t)};q(Gi,dt=>{l(Ce).patternMismatch&&dt(Jo)})}var Vr=z(Gi,2);{var fn=dt=>{var $t=Fe();Z(Xt=>ne($t,Xt),[()=>i()(`validation.type_mismatch.${l(O)}`)]),S(dt,$t)};q(Vr,dt=>{l(Ce).typeMismatch&&dt(fn)})}S(Mt,yn)}})};q(tn,gt=>{l(Ce)?.valid===!1&>($n)})}var ai=z(tn,2);let Dt;var bn=F(ai);{var Et=gt=>{var Mt=SZ(),on=F(Mt);Z(yn=>ne(on,yn),[()=>i()("unsupported_widget_x",{values:{name:l(y)}})]),S(gt,Mt)},_n=gt=>{var Mt=X(),on=D(Mt);{var yn=An=>{const Tt=b(()=>Ym[l(y)]);var dn=X(),Ot=D(dn);ur(Ot,()=>l(Tt),(Nr,It)=>{It(Nr,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return n},get fieldLabel(){return l(ze)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(fe)},get readonly(){return l(Ne)},get required(){return l($)},get invalid(){return l(Ae)}})}),S(An,dn)},Cn=An=>{const Tt=b(()=>Ym[l(y)]);var dn=AZ(),Ot=D(dn);{var Nr=fn=>{var dt=EZ(),$t=F(dt);cr($t,()=>f(l(G))),S(fn,dt)};q(Ot,fn=>{l(G)&&fn(Nr)})}var It=z(Ot,2);{var li=fn=>{var dt=TZ(),$t=F(dt);Z(()=>ne($t,l(M))),S(fn,dt)};q(It,fn=>{l(M)&&fn(li)})}var er=z(It,2);ur(er,()=>l(Tt),(fn,dt)=>{dt(fn,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return n},get fieldLabel(){return l(ze)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ne)},get required(){return l($)},get invalid(){return l(Ae)},get currentValue(){return r()[d()][e.locale][e.keyPath]},set currentValue($t){_t(Je,Se(r)[d()][e.locale][e.keyPath]=$t,Se(r))}})});var qr=z(er,2);{var Gi=fn=>{var dt=$Z(),$t=F(dt);Z(()=>ne($t,l(U))),S(fn,dt)};q(qr,fn=>{l(U)&&fn(Gi)})}var Jo=z(qr,2);{var Vr=fn=>{var dt=CZ(),$t=F(dt);cr($t,()=>f(l(W))),S(fn,dt)};q(Jo,fn=>{l(W)&&fn(Vr)})}S(An,dn)};q(on,An=>{l(B)?An(yn):An(Cn,!1)},!0)}S(gt,Mt)};q(bn,gt=>{l(y)in Ym?gt(_n,!1):gt(Et)})}var nn=z(ai,2);{var rn=gt=>{const Mt=b(o);var on=LZ(),yn=F(on);{var Cn=Tt=>{var dn=PZ(),Ot=F(dn);cr(Ot,()=>f(l(_))),S(Tt,dn)};q(yn,Tt=>{l(_)&&Tt(Cn)})}var An=z(yn,2);ur(An,()=>l(Mt),(Tt,dn)=>{dn(Tt,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(fe)}})}),S(gt,on)};q(nn,gt=>{!l(Ne)&&(l(_)||o())&>(rn)})}Z(()=>{Te(ye,"id",`${n}-label`),ne(tt,l(ze)),Dt=cn(ai,1,"widget-wrapper svelte-dkfcyc",null,Dt,{"has-extra-labels":l(Y)})}),S(Ge,Oe)},$$slots:{default:!0}})}};q(je,Ie=>{r()&&l(xe)&&l(y)!=="hidden"&&Ie(Le)})}S(t,$e),ae(),a()}var IZ=j('<div class="required">*</div>'),RZ=j('<header role="none"><h4 role="none"> </h4> <!></header> <!> <div role="none" class="widget-wrapper"><!></div>',1);function DZ(t,e){const n=Vn();se(e,!0);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me(),a=b(()=>r()?.collection),c=b(()=>r()?.collectionFile),u=b(()=>(l(c)??l(a))?._i18n??bo),d=b(()=>l(u).defaultLocale),f=b(()=>r()?.slugEditor[e.locale]),h=b(()=>l(f)===!0),p=b(()=>l(f)==="readonly"),g=b(()=>r()?.validities[e.locale]._slug),m=b(()=>!l(p)&&l(g)?.valid===!1);let v=ie("");Me(()=>{l(v),Se(()=>{r()&&Object.entries(r().slugEditor).forEach(([x,E])=>{(e.locale===x||e.locale===l(d)&&E==="readonly")&&_t(Je,Se(r).currentSlugs[x]=l(v),Se(r))})})}),Me(()=>{l(p)&&K(v,r()?.currentSlugs[e.locale]??"",!0)});var _=X(),y=D(_);{var w=x=>{bL(x,{children:(E,$)=>{var C=RZ(),k=D(C),T=F(k),A=F(T),P=z(T,2);{var L=H=>{var G=IZ();Z(W=>Te(G,"aria-label",W),[()=>i()("required")]),S(H,G)};q(P,H=>{l(h)&&H(L)})}var O=z(k,2);{var N=H=>{Vw(H,{get id(){return`${n}-error`},children:(G,W)=>{var Y=X(),R=D(Y);{var B=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("validation.value_missing")]),S(J,Q)};q(R,J=>{l(g)?.valueMissing&&J(B)})}S(G,Y)}})};q(O,H=>{l(m)&&H(N)})}var M=z(O,2),U=F(M);qn(U,{flex:!0,get readonly(){return l(p)},get required(){return l(h)},get invalid(){return l(m)},get"aria-labelledby"(){return`${n}-label`},get"aria-errormessage"(){return`${n}-error`},get value(){return l(v)},set value(H){K(v,H,!0)}}),Z(H=>{Te(T,"id",`${n}-label`),ne(A,H)},[()=>i()("slug")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{r()&&x(w)})}S(t,_),ae(),s()}var MZ=j("<!> <!>",1);function FZ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>n()?.fields??[]);Hi(t,{children:(s,a)=>{var c=MZ(),u=D(c);{var d=h=>{DZ(h,{get locale(){return e.locale}})};q(u,h=>{n()?.slugEditor[e.locale]&&h(d)})}var f=z(u,2);it(f,17,()=>l(o),h=>h.name,(h,p)=>{Hi(h,{children:(g,m)=>{Lg(g,{get keyPath(){return l(p).name},get typedKeyPath(){return l(p).name},get locale(){return e.locale},get fieldConfig(){return l(p)}})},$$slots:{default:!0}})}),S(s,c)},$$slots:{default:!0}}),ae(),i()}function zZ(t,e){let n=I(e,"children",3,void 0);var r=X(),i=D(r);Ue(i,()=>n()??qe),S(t,r)}var jZ=j('<iframe class="preview svelte-1k58u5t"></iframe>');const UZ={hash:"svelte-1k58u5t",code:"iframe.svelte-1k58u5t {display:block;border:none;width:100%;height:100%;}"};function BZ(t,e){se(e,!0),Ee(t,UZ);const n=()=>V(ue,"$_",r),[r,i]=me();let o=ie(void 0);const s=()=>`
|
|
637
|
+
.suffix.svelte-dkfcyc {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-dkfcyc {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-dkfcyc {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-dkfcyc {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function Lg(t,e){const n=Vn();se(e,!0),Ee(t,OZ);const r=()=>V(Je,"$entryDraft",s),i=()=>V(ue,"$_",s),o=()=>V(h,"$extraHint",s),[s,a]=me(),c=sr("field-editor")??{};let u=I(e,"context",19,()=>c.widgetContext??void 0),d=I(e,"valueStoreKey",19,()=>c.valueStoreKey??"currentValues");const f=Ie=>jr.sanitize(uC(Ie.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),h=ot();f_("field-editor",{widgetContext:u(),extraHint:h,valueStoreKey:d()});const p=b(()=>u()==="markdown-editor-component"),g=b(()=>e.fieldConfig.name),m=b(()=>st(e.fieldConfig.label,"")),v=b(()=>st(e.fieldConfig.comment,"")),_=b(()=>st(e.fieldConfig.hint,"")),y=b(()=>st(e.fieldConfig.widget,"string")),w=b(()=>st(e.fieldConfig.i18n,!1)),x=b(()=>st(e.fieldConfig.pattern,()=>[],!0)),E=b(()=>st(e.fieldConfig.readonly,!1)),$=b(()=>ru({fieldConfig:e.fieldConfig,locale:e.locale})),C=b(()=>l(y)==="list"?El(e.fieldConfig):{hasSubFields:!1}),k=b(()=>l(C).hasSubFields),T=b(()=>nu(e.fieldConfig)),A=b(()=>G$.includes(l(y))?e.fieldConfig:{}),P=b(()=>st(l(A).min,0)),L=b(()=>st(l(A).max,1/0)),O=b(()=>l(y)==="string"?e.fieldConfig.type??"text":l(y)==="number"?"number":void 0),N=b(()=>["string"].includes(l(y))),M=b(()=>l(N)?e.fieldConfig.prefix:void 0),U=b(()=>l(N)?e.fieldConfig.suffix:void 0),H=b(()=>["boolean","number","string"].includes(l(y))),G=b(()=>l(H)?e.fieldConfig.before_input:void 0),W=b(()=>l(H)?e.fieldConfig.after_input:void 0),Y=b(()=>!!(l(M)||l(U)||l(G)||l(W))),R=b(()=>l(y)==="list"&&l(k)||l(T)||l(y)==="keyvalue"),B=b(()=>l(y)==="list"||l(T)),J=b(()=>r()?.collection),Q=b(()=>r()?.collectionFile),ee=b(()=>r()?.originalValues),te=b(()=>(l(Q)??l(J))?._i18n??bo),re=b(()=>l(te).i18nEnabled),he=b(()=>l(te).allLocales),pe=b(()=>l(te).defaultLocale),ce=b(()=>l(re)?l(he).filter(Ie=>Ie!==e.locale):[]),ge=b(()=>l(re)&&(l(w)===!0||l(w)==="translate")),Pe=b(()=>l(re)&&l(w)==="duplicate"),xe=b(()=>l(p)||e.locale===l(pe)||l(ge)||l(Pe)),de=b(()=>!l(p)&&l(ge)&&l(ce).length),we=b(()=>!l(p)&&!(l(Pe)&&e.locale!==l(pe))),ve=b(()=>new RegExp(`^${Gt(e.keyPath)}\\.\\d+$`)),fe=b(()=>{const Ie=Un(r()?.[d()][e.locale]??{}),Re=Ie[e.keyPath];if(!l(B))return Re;const nt=Object.entries(Ie).filter(([Ge])=>l(ve).test(Ge));return nt.length?nt.map(([,Ge])=>Ge).filter(Ge=>Ge!==void 0):l(T)&&Re!==void 0&&typeof Re!="object"?[Re]:[]}),_e=b(()=>l(B)?Object.entries(l(ee)?.[e.locale]??{}).filter(([Ie])=>l(ve).test(Ie)).map(([,Ie])=>Ie).filter(Ie=>Ie!==void 0):l(ee)?.[e.locale]?.[e.keyPath]),Ce=b(()=>r()?.validities[e.locale][e.keyPath]),ze=b(()=>l(m)||l(g)),Ne=b(()=>l(E)||l(w)==="duplicate"&&e.locale!==l(pe)||l(y)==="compute"||l(y)==="uuid"),Ae=b(()=>l(Ce)?.valid===!1);Me(()=>{if(r()&&l(T)&&Array.isArray(l(fe))){const Ie=r()[d()][e.locale]?.[`${e.keyPath}.0`],[Re]=l(fe);Ie===void 0&&Re!==void 0&&(_t(Je,Se(r)[d()][e.locale][`${e.keyPath}.0`]=Re,Se(r)),delete r()[d()][e.locale][e.keyPath])}}),Me(()=>{if(r()&&!l(T)&&l(fe)===void 0){const Ie=r()[d()][e.locale]?.[`${e.keyPath}.0`];Ie!==void 0&&(_t(Je,Se(r)[d()][e.locale][e.keyPath]=Ie,Se(r)),Object.keys(r()[d()][e.locale]).forEach(Re=>{l(ve).test(Re)&&delete r()[d()][e.locale][Re]}))}});var $e=X(),je=D($e);{var Le=Ie=>{{let Re=b(()=>i()("x_field",{values:{field:l(ze)}})),nt=b(()=>l(y)==="compute");bL(Ie,{get"aria-label"(){return l(Re)},get"data-widget"(){return l(y)},get"data-key-path"(){return e.keyPath},get"data-typed-key-path"(){return e.typedKeyPath},get hidden(){return l(nt)},children:(Ge,ut)=>{var Oe=NZ(),be=D(Oe),ye=F(be),tt=F(ye),Ve=z(ye,2);{var Qe=gt=>{var Mt=yZ();Z(on=>Te(Mt,"aria-label",on),[()=>i()("required")]),S(gt,Mt)};q(Ve,gt=>{!l(Ne)&&l($)&>(Qe)})}var Xe=z(Ve,2);ii(Xe,{flex:!0});var ht=z(Xe,2);{var Pt=gt=>{_L(gt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(ce)},get keyPath(){return e.keyPath}})};q(ht,gt=>{l(de)&&["markdown","string","text","list","object"].includes(l(y))&>(Pt)})}var Qt=z(ht,2);{var en=gt=>{{const Mt=yn=>{{let Cn=b(()=>i()("field_options"));hr(yn,{get"aria-label"(){return l(Cn)},children:(An,Tt)=>{var dn=wZ(),Ot=D(dn);{var Nr=er=>{qw(er,{get locale(){return e.locale},get otherLocales(){return l(ce)},get keyPath(){return e.keyPath}})};q(Ot,er=>{l(de)&&er(Nr)})}var It=z(Ot,2);{var li=er=>{{let qr=b(()=>i()("revert_changes")),Gi=b(()=>pn(l(fe),l(_e))||/\.\d+\./.test(e.keyPath));vt(er,{get label(){return l(qr)},get disabled(){return l(Gi)},onclick:()=>{Jw({locale:e.locale,keyPath:e.keyPath})}})}};q(It,er=>{l(we)&&er(li)})}S(An,dn)},$$slots:{default:!0}})}};let on=b(()=>i()("show_field_options"));Ur(gt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(on)},popup:Mt,$$slots:{popup:!0}})}};q(Qt,gt=>{(l(de)||l(we))&>(en)})}var pt=z(be,2);{var kt=gt=>{var Mt=xZ(),on=F(Mt);cr(on,()=>f(l(v))),S(gt,Mt)};q(pt,gt=>{!l(Ne)&&l(v)&>(kt)})}var tn=z(pt,2);{var $n=gt=>{Vw(gt,{get id(){return`${n}-error`},children:(Mt,on)=>{var yn=kZ(),Cn=D(yn);{var An=dt=>{var $t=Fe();Z(Xt=>ne($t,Xt),[()=>i()("validation.value_missing")]),S(dt,$t)};q(Cn,dt=>{l(Ce).valueMissing&&dt(An)})}var Tt=z(Cn,2);{var dn=dt=>{const $t=b(()=>{const{minlength:ar}=e.fieldConfig;return{minlength:ar}});var Xt=Fe();Z(ar=>ne(Xt,ar),[()=>i()(l($t).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l($t).minlength}})]),S(dt,Xt)};q(Tt,dt=>{l(Ce).tooShort&&dt(dn)})}var Ot=z(Tt,2);{var Nr=dt=>{const $t=b(()=>{const{maxlength:ar}=e.fieldConfig;return{maxlength:ar}});var Xt=Fe();Z(ar=>ne(Xt,ar),[()=>i()(l($t).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l($t).maxlength}})]),S(dt,Xt)};q(Ot,dt=>{l(Ce).tooLong&&dt(Nr)})}var It=z(Ot,2);{var li=dt=>{const $t=b(()=>l(P)===1?"one":"many");var Xt=X(),ar=D(Xt);{var Wi=jn=>{var Ln=Fe();Z(pr=>ne(Ln,pr),[()=>i()("validation.range_underflow.number",{values:{min:l(P)}})]),S(jn,Ln)},Or=jn=>{var Ln=X(),pr=D(Ln);{var Oi=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_underflow.add_${l($t)}`,{values:{min:l(P)}})]),S(Hn,wr)},Xo=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_underflow.select_${l($t)}`,{values:{min:l(P)}})]),S(Hn,wr)};q(pr,Hn=>{l(R)?Hn(Oi):Hn(Xo,!1)},!0)}S(jn,Ln)};q(ar,jn=>{l(y)==="number"?jn(Wi):jn(Or,!1)})}S(dt,Xt)};q(It,dt=>{l(Ce).rangeUnderflow&&dt(li)})}var er=z(It,2);{var qr=dt=>{const $t=b(()=>l(L)===1?"one":"many");var Xt=X(),ar=D(Xt);{var Wi=jn=>{var Ln=Fe();Z(pr=>ne(Ln,pr),[()=>i()("validation.range_overflow.number",{values:{max:l(L)}})]),S(jn,Ln)},Or=jn=>{var Ln=X(),pr=D(Ln);{var Oi=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_overflow.add_${l($t)}`,{values:{max:l(L)}})]),S(Hn,wr)},Xo=Hn=>{var wr=Fe();Z(ci=>ne(wr,ci),[()=>i()(`validation.range_overflow.select_${l($t)}`,{values:{max:l(L)}})]),S(Hn,wr)};q(pr,Hn=>{l(R)?Hn(Oi):Hn(Xo,!1)},!0)}S(jn,Ln)};q(ar,jn=>{l(y)==="number"?jn(Wi):jn(Or,!1)})}S(dt,Xt)};q(er,dt=>{l(Ce).rangeOverflow&&dt(qr)})}var Gi=z(er,2);{var Jo=dt=>{var $t=Fe();Z(()=>ne($t,l(x)[1])),S(dt,$t)};q(Gi,dt=>{l(Ce).patternMismatch&&dt(Jo)})}var Vr=z(Gi,2);{var fn=dt=>{var $t=Fe();Z(Xt=>ne($t,Xt),[()=>i()(`validation.type_mismatch.${l(O)}`)]),S(dt,$t)};q(Vr,dt=>{l(Ce).typeMismatch&&dt(fn)})}S(Mt,yn)}})};q(tn,gt=>{l(Ce)?.valid===!1&>($n)})}var ai=z(tn,2);let Dt;var bn=F(ai);{var Et=gt=>{var Mt=SZ(),on=F(Mt);Z(yn=>ne(on,yn),[()=>i()("unsupported_widget_x",{values:{name:l(y)}})]),S(gt,Mt)},_n=gt=>{var Mt=X(),on=D(Mt);{var yn=An=>{const Tt=b(()=>Ym[l(y)]);var dn=X(),Ot=D(dn);ur(Ot,()=>l(Tt),(Nr,It)=>{It(Nr,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return n},get fieldLabel(){return l(ze)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(fe)},get readonly(){return l(Ne)},get required(){return l($)},get invalid(){return l(Ae)}})}),S(An,dn)},Cn=An=>{const Tt=b(()=>Ym[l(y)]);var dn=AZ(),Ot=D(dn);{var Nr=fn=>{var dt=EZ(),$t=F(dt);cr($t,()=>f(l(G))),S(fn,dt)};q(Ot,fn=>{l(G)&&fn(Nr)})}var It=z(Ot,2);{var li=fn=>{var dt=TZ(),$t=F(dt);Z(()=>ne($t,l(M))),S(fn,dt)};q(It,fn=>{l(M)&&fn(li)})}var er=z(It,2);ur(er,()=>l(Tt),(fn,dt)=>{dt(fn,{get locale(){return e.locale},get keyPath(){return e.keyPath},get typedKeyPath(){return e.typedKeyPath},get fieldId(){return n},get fieldLabel(){return l(ze)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ne)},get required(){return l($)},get invalid(){return l(Ae)},get currentValue(){return r()[d()][e.locale][e.keyPath]},set currentValue($t){_t(Je,Se(r)[d()][e.locale][e.keyPath]=$t,Se(r))}})});var qr=z(er,2);{var Gi=fn=>{var dt=$Z(),$t=F(dt);Z(()=>ne($t,l(U))),S(fn,dt)};q(qr,fn=>{l(U)&&fn(Gi)})}var Jo=z(qr,2);{var Vr=fn=>{var dt=CZ(),$t=F(dt);cr($t,()=>f(l(W))),S(fn,dt)};q(Jo,fn=>{l(W)&&fn(Vr)})}S(An,dn)};q(on,An=>{l(B)?An(yn):An(Cn,!1)},!0)}S(gt,Mt)};q(bn,gt=>{l(y)in Ym?gt(_n,!1):gt(Et)})}var nn=z(ai,2);{var rn=gt=>{const Mt=b(o);var on=LZ(),yn=F(on);{var Cn=Tt=>{var dn=PZ(),Ot=F(dn);cr(Ot,()=>f(l(_))),S(Tt,dn)};q(yn,Tt=>{l(_)&&Tt(Cn)})}var An=z(yn,2);ur(An,()=>l(Mt),(Tt,dn)=>{dn(Tt,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(fe)}})}),S(gt,on)};q(nn,gt=>{!l(Ne)&&(l(_)||o())&>(rn)})}Z(()=>{Te(ye,"id",`${n}-label`),ne(tt,l(ze)),Dt=cn(ai,1,"widget-wrapper svelte-dkfcyc",null,Dt,{"has-extra-labels":l(Y)})}),S(Ge,Oe)},$$slots:{default:!0}})}};q(je,Ie=>{r()&&l(xe)&&l(y)!=="hidden"&&Ie(Le)})}S(t,$e),ae(),a()}var IZ=j('<div class="required">*</div>'),RZ=j('<header role="none"><h4 role="none"> </h4> <!></header> <!> <div role="none" class="widget-wrapper"><!></div>',1);function DZ(t,e){const n=Vn();se(e,!0);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me(),a=b(()=>r()?.collection),c=b(()=>r()?.collectionFile),u=b(()=>(l(c)??l(a))?._i18n??bo),d=b(()=>l(u).defaultLocale),f=b(()=>r()?.slugEditor[e.locale]),h=b(()=>l(f)===!0),p=b(()=>l(f)==="readonly"),g=b(()=>r()?.validities[e.locale]._slug),m=b(()=>!l(p)&&l(g)?.valid===!1);let v=ie("");Me(()=>{l(v),Se(()=>{r()&&Object.entries(r().slugEditor).forEach(([x,E])=>{(e.locale===x||e.locale===l(d)&&E==="readonly")&&_t(Je,Se(r).currentSlugs[x]=l(v),Se(r))})})}),Me(()=>{l(p)&&K(v,r()?.currentSlugs[e.locale]??"",!0)});var _=X(),y=D(_);{var w=x=>{bL(x,{children:(E,$)=>{var C=RZ(),k=D(C),T=F(k),A=F(T),P=z(T,2);{var L=H=>{var G=IZ();Z(W=>Te(G,"aria-label",W),[()=>i()("required")]),S(H,G)};q(P,H=>{l(h)&&H(L)})}var O=z(k,2);{var N=H=>{Vw(H,{get id(){return`${n}-error`},children:(G,W)=>{var Y=X(),R=D(Y);{var B=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("validation.value_missing")]),S(J,Q)};q(R,J=>{l(g)?.valueMissing&&J(B)})}S(G,Y)}})};q(O,H=>{l(m)&&H(N)})}var M=z(O,2),U=F(M);qn(U,{flex:!0,get readonly(){return l(p)},get required(){return l(h)},get invalid(){return l(m)},get"aria-labelledby"(){return`${n}-label`},get"aria-errormessage"(){return`${n}-error`},get value(){return l(v)},set value(H){K(v,H,!0)}}),Z(H=>{Te(T,"id",`${n}-label`),ne(A,H)},[()=>i()("slug")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{r()&&x(w)})}S(t,_),ae(),s()}var MZ=j("<!> <!>",1);function FZ(t,e){se(e,!0);const n=()=>V(Je,"$entryDraft",r),[r,i]=me(),o=b(()=>n()?.fields??[]);Hi(t,{children:(s,a)=>{var c=MZ(),u=D(c);{var d=h=>{DZ(h,{get locale(){return e.locale}})};q(u,h=>{n()?.slugEditor[e.locale]&&h(d)})}var f=z(u,2);it(f,17,()=>l(o),h=>h.name,(h,p)=>{Hi(h,{children:(g,m)=>{Lg(g,{get keyPath(){return l(p).name},get typedKeyPath(){return l(p).name},get locale(){return e.locale},get fieldConfig(){return l(p)}})},$$slots:{default:!0}})}),S(s,c)},$$slots:{default:!0}}),ae(),i()}function zZ(t,e){let n=I(e,"children",3,void 0);var r=X(),i=D(r);Ue(i,()=>n()??qe),S(t,r)}var jZ=j('<iframe class="preview svelte-1k58u5t"></iframe>');const UZ={hash:"svelte-1k58u5t",code:"iframe.svelte-1k58u5t {display:block;border:none;width:100%;height:100%;}"};function BZ(t,e){se(e,!0),Ee(t,UZ);const n=()=>V(ue,"$_",r),[r,i]=me();let o=ie(void 0);const s=()=>`
|
|
638
638
|
<!DOCTYPE html>
|
|
639
639
|
<html lang="${jr.sanitize(e.locale)}">
|
|
640
640
|
<head>
|
|
@@ -646,15 +646,15 @@ td.svelte-18v8t2h {border-width:0;}th.svelte-18v8t2h {padding-block:4px;color:va
|
|
|
646
646
|
</html>
|
|
647
647
|
`,a=()=>{const d=l(o)?.contentDocument?.body;d&&Pp(zZ,{target:d,props:{children:e.children}})},c=()=>{l(o)&&(l(o).addEventListener("load",a,{once:!0}),l(o).src=URL.createObjectURL(new Blob([s()],{type:"text/html"})))};Me(()=>{l(o)&&c()});var u=jZ();xt(u,d=>K(o,d),()=>l(o)),Z(d=>Te(u,"title",d),[()=>n()("content_preview")]),S(t,u),ae(),i()}var qZ=j('<div role="document" class="svelte-17akd4q"><!></div>');const VZ={hash:"svelte-17akd4q",code:"div.svelte-17akd4q {padding:8px 16px;}"};function HZ(t,e){se(e,!0),Ee(t,VZ);const n=()=>V(Je,"$entryDraft",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=c=>{var u=X(),d=D(u);it(d,17,()=>l(a),f=>f.name,(f,h)=>{Hi(f,{children:(p,g)=>{Yw(p,{get keyPath(){return l(h).name},get typedKeyPath(){return l(h).name},get locale(){return e.locale},get fieldConfig(){return l(h)}})},$$slots:{default:!0}})}),S(c,u)},a=b(()=>n()?.fields??[]);Hi(t,{children:(c,u)=>{var d=X(),f=D(d);{var h=g=>{{let m=b(()=>[...Lv]);BZ(g,{get locale(){return e.locale},get styleURLs(){return l(m)},get children(){return s}})}},p=g=>{var m=qZ(),v=F(m);s(v),Z(_=>Te(m,"aria-label",_),[()=>r()("content_preview")]),S(g,m)};q(f,g=>{Lv.size?g(h):g(p,!1)})}S(c,d)},$$slots:{default:!0}}),ae(),o()}const Ui=ot(),sh={},KZ=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new fo(e,"ui-settings"):null,r="entry-view",i={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await n?.get(r)};Ui.set(i),Sc.set(i.selectAssetsView),sh.entryEditorSettingsUnsubscribe?.(),sh.selectAssetsViewUnsubscribe?.(),sh.entryEditorSettingsUnsubscribe=Ui.subscribe(o=>{(async()=>{try{pn(o,await n?.get(r))||await n?.set(r,o)}catch{}})()}),sh.selectAssetsViewUnsubscribe=Sc.subscribe(o=>{if(!o||!Object.keys(o).length)return;const s=oe(Ui)?.selectAssetsView??{};pn(o,s)||Ui.update(a=>({...a,selectAssetsView:o}))})};Tn.subscribe(t=>{t&&!oe(Ui)&&KZ(t)});var GZ=j('<div role="none" class="content svelte-1vy4qxn"><!></div>'),WZ=j('<span role="alert"> </span> <!>',1),YZ=j('<div role="none" class="wrapper svelte-1vy4qxn"><!></div>');const JZ={hash:"svelte-1vy4qxn",code:`@charset "UTF-8";.wrapper.svelte-1vy4qxn {display:contents;}.content.svelte-1vy4qxn {--field-editor-padding: 16px;flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;}
|
|
648
648
|
@media (width < 768px) {.content.svelte-1vy4qxn {--field-editor-padding: 12px;}
|
|
649
|
-
}`};function PS(t,e){se(e,!0),Ee(t,JZ);const n=()=>V(Ui,"$entryEditorSettings",s),r=()=>V(e.thisPane,"$thisPane",s),i=()=>V(Je,"$entryDraft",s),o=()=>V(ue,"$_",s),[s,a]=me();let c=I(e,"thisPaneContentArea",15),u=I(e,"thatPaneContentArea",15);const d=b(()=>n()??{}),f=b(()=>l(d).syncScrolling),h=b(()=>r()?.locale),p=b(()=>r()?.mode),g=b(()=>!!l(h)&&!!
|
|
649
|
+
}`};function PS(t,e){se(e,!0),Ee(t,JZ);const n=()=>V(Ui,"$entryEditorSettings",s),r=()=>V(e.thisPane,"$thisPane",s),i=()=>V(Je,"$entryDraft",s),o=()=>V(ue,"$_",s),[s,a]=me();let c=I(e,"thisPaneContentArea",15),u=I(e,"thatPaneContentArea",15);const d=b(()=>n()??{}),f=b(()=>l(d).syncScrolling),h=b(()=>r()?.locale),p=b(()=>r()?.mode),g=b(()=>!!l(h)&&!!Un(i()?.currentValues[l(h)])),m=b(()=>({values:{locale:l(h)?po(l(h))??l(h):""}})),v=b(()=>l(p)==="preview"?HZ:FZ);let _=ie(void 0);const y=()=>{window.requestAnimationFrame(()=>{if(!l(f)||!l(_)||!c()||!u())return;const T=c()!==l(_),{x:A,y:P}=T?{x:0,y:0}:c().getBoundingClientRect(),{ownerDocument:L,scrollTop:O,scrollHeight:N,clientHeight:M}=c(),U=N-M,H=O/U,G=L.elementsFromPoint(A+80,P).find(Q=>Q.matches("[data-key-path]"));if(!G){u(u().scrollTop=u().scrollHeight*H,!0);return}const{keyPath:W}=G.dataset,{top:Y,height:R}=G.getBoundingClientRect(),B=(P-Y)/R,J=u().querySelector(`[data-key-path="${CSS.escape(W??"")}"]`);B<0||B>1||!J||u(u().scrollTop=J.offsetTop-P+J.clientHeight*B,!0)})},w={capture:!0,passive:!0},x=async()=>{if(!l(_))return;c()&&(c().removeEventListener("wheel",y,w),c().removeEventListener("touchmove",y,w));const T=l(_).querySelector("iframe.preview");T?(await Nt(250),c(T?.contentDocument?.firstElementChild)):c(l(_)),c()&&(c(c().scrollTop=0,!0),c().addEventListener("wheel",y,w),c().addEventListener("touchmove",y,w))};Me(()=>{r()?.mode,l(_),x()});var E=YZ(),$=F(E);{var C=T=>{var A=GZ(),P=F(A);ur(P,()=>l(v),(L,O)=>{O(L,{get locale(){return l(h)}})}),xt(A,L=>K(_,L),()=>l(_)),S(T,A)},k=T=>{var A=X(),P=D(A);{var L=O=>{nr(O,{children:(N,M)=>{var U=WZ(),H=D(U),G=F(H),W=z(H,2);{let Y=b(()=>o()(l(g)?"reenable_x_locale":"enable_x_locale",l(m)));et(W,{variant:"tertiary",get label(){return l(Y)},onclick:()=>{l(h)&&VL(l(h))}})}Z(Y=>ne(G,Y),[()=>o()(l(g)?"locale_x_now_disabled":"locale_x_has_been_disabled",l(m))]),S(N,U)},$$slots:{default:!0}})};q(P,O=>{l(p)==="edit"&&O(L)},!0)}S(T,A)};q($,T=>{l(h)&&i()?.currentLocales[l(h)]?T(C):T(k,!1)})}Z(()=>Te(E,"id",e.id)),S(t,E),ae(),a()}var XZ=j('<div role="none" class="inner svelte-1ibgz0y"><!> <!></div>'),ZZ=j('<div role="none" class="wrapper svelte-1ibgz0y"><!></div>');const QZ={hash:"svelte-1ibgz0y",code:`.wrapper.svelte-1ibgz0y {display:contents;}
|
|
650
650
|
@media (width < 1024px) {.wrapper.svelte-1ibgz0y .combobox {min-width:128px;--sui-textbox-height: 32px;--sui-button-medium-height: 32px;}
|
|
651
651
|
}.wrapper.svelte-1ibgz0y .combobox.error [role=combobox] {border-color:var(--sui-error-border-color);}.inner.svelte-1ibgz0y {display:contents;}.inner.svelte-1ibgz0y :is(.error, .error button[data-mode=edit]) {color:var(--sui-error-foreground-color) !important;}`};function eQ(t,e){se(e,!0),Ee(t,QZ);const n=()=>V(Je,"$entryDraft",u),r=()=>V(vn,"$isSmallScreen",u),i=()=>V(Yo,"$isMediumScreen",u),o=()=>V(f(),"$thatPane",u),s=()=>V(ue,"$_",u),a=()=>V(e.thisPane,"$thisPane",u),c=()=>V(Ui,"$entryEditorSettings",u),[u,d]=me();let f=I(e,"thatPane",19,()=>ot(null));const h=b(()=>n()?.collection),p=b(()=>n()?.collectionFile),g=b(()=>(l(p)??l(h))?._i18n??bo),m=b(()=>l(g).allLocales),v=b(()=>r()||i()?[...l(m)]:l(m).filter(A=>!(o()?.mode==="edit"&&o().locale===A))),_=b(()=>Object.entries(n()?.validities??{}).some(([A,P])=>l(v).includes(A)&&Object.values(P??{}).some(({valid:L})=>!L))),y=b(()=>n()?.canPreview??!0),w=b(()=>r()||i()||l(m).length>=5),x=b(()=>l(w)?Al:og),E=b(()=>l(w)?Tr:Pd),$=b(()=>l(w)?void 0:"tertiary"),C=b(()=>l(w)?void 0:"small");var k=ZZ(),T=F(k);{let A=b(()=>l(_)&&l(w)?"error":void 0),P=b(()=>s()("switch_locale")),L=b(()=>e.id.replace("-header","-body"));ur(T,()=>l(x),(O,N)=>{N(O,{get class(){return l(A)},get"aria-label"(){return l(P)},get"aria-controls"(){return l(L)},children:(M,U)=>{var H=XZ(),G=F(H);it(G,17,()=>l(v),dr,(R,B)=>{const J=b(()=>po(l(B))??l(B)),Q=b(()=>!n()?.currentLocales[l(B)]),ee=b(()=>Object.values(n()?.validities[l(B)]??{}).some(({valid:he})=>!he));var te=X(),re=D(te);{const he=xe=>{var de=X(),we=D(de);{var ve=_e=>{Ze(_e,{name:"edit_off"})},fe=_e=>{var Ce=X(),ze=D(Ce);{var Ne=Ae=>{Ze(Ae,{name:"error"})};q(ze,Ae=>{l(ee)&&Ae(Ne)},!0)}S(_e,Ce)};q(we,_e=>{l(Q)?_e(ve):_e(fe,!1)})}S(xe,de)};let pe=b(()=>l(J)),ce=b(()=>l(Q)?s()("locale_content_disabled_short"):l(ee)?s()("locale_content_error_short"):""),ge=b(()=>a()?.mode==="edit"&&a().locale===l(B)),Pe=b(()=>l(ee)?"error":"");ur(re,()=>l(E),(xe,de)=>{de(xe,{get variant(){return l($)},get size(){return l(C)},get label(){return l(J)},get"aria-label"(){return`${l(pe)??""} ${l(ce)??""}`},get selected(){return l(ge)},get class(){return l(Pe)},"data-mode":"edit",onSelect:()=>{Ye(e.thisPane,{mode:"edit",locale:l(B)}),o()?.mode==="preview"&&Ye(f(),{mode:"preview",locale:l(B)})},startIcon:he,$$slots:{startIcon:!0}})})}S(R,te)});var W=z(G,2);{var Y=R=>{var B=X(),J=D(B);{let Q=b(()=>s()("preview")),ee=b(()=>a()?.mode==="preview");ur(J,()=>l(E),(te,re)=>{re(te,{get variant(){return l($)},get size(){return l(C)},get label(){return l(Q)},get selected(){return l(ee)},"data-mode":"preview",onSelect:()=>{Ye(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})})}S(R,B)};q(W,R=>{o()?.mode==="edit"&&l(y)&&c()?.showPreview&&R(Y)})}S(M,H)},$$slots:{default:!0}})})}S(t,k),ae(),d()}function LS(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(e.thisPane,"$thisPane",i),[i,o]=me();{const s=u=>{Ze(u,{name:"visibility"})};let a=b(()=>n()("preview")),c=b(()=>r()?.mode==="preview");et(t,{variant:"ghost",iconic:!0,get"aria-label"(){return l(a)},get pressed(){return l(c)},onclick:()=>{Ye(e.thisPane,{mode:r()?.mode==="preview"?"edit":"preview",locale:r()?.locale??""})},startIcon:s,$$slots:{startIcon:!0}})}ae(),o()}var tQ=j("<!> <!>",1),nQ=j('<h3 role="none"> </h3>'),rQ=j("<!> <!>",1),iQ=j("<!> <!> <!>",1),oQ=j("<!> <!> <!> <!>",1),sQ=j("<!> <!>",1),aQ=j("<!> <!> <!>",1),lQ=j('<div role="none" class="header svelte-uj56is"><!></div>');const cQ={hash:"svelte-uj56is",code:`.header.svelte-uj56is {flex:none !important;}.header.svelte-uj56is > .sui.toolbar {margin-inline:auto;max-width:800px;}
|
|
652
652
|
@media (width < 768px) {.header.svelte-uj56is > .sui.toolbar {padding:0;}
|
|
653
|
-
}.header.svelte-uj56is > .sui.toolbar h3 {margin:0 8px;font-size:var(--sui-font-size-default);}`};function NS(t,e){se(e,!0),Ee(t,cQ);const n=()=>V(Je,"$entryDraft",u),r=()=>V(e.thisPane,"$thisPane",u),i=()=>V(ue,"$_",u),o=()=>V(vn,"$isSmallScreen",u),s=()=>V(Yo,"$isMediumScreen",u),a=()=>V(ft,"$prefs",u),c=()=>V(Tn,"$backend",u),[u,d]=me();let f=I(e,"thatPane",19,()=>ot(null));const h=b(()=>n()?.collection),p=b(()=>n()?.collectionFile),g=b(()=>n()?.originalEntry),m=b(()=>n()?.originalValues??{}),v=b(()=>(l(p)??l(h))?._i18n??bo),_=b(()=>l(v).i18nEnabled),y=b(()=>l(v).saveAllLocales),w=b(()=>l(v).allLocales),x=b(()=>l(v).defaultLocale),E=b(()=>n()?.currentLocales[r()?.locale??""]),$=b(()=>Object.values(n()?.currentLocales??{}).filter(N=>N).length===1),C=b(()=>l(_)?l(w).filter(N=>N!==r()?.locale):[]),k=b(()=>!!l(C).length),T=b(()=>r()?.locale&&!pn(jn(n()?.currentValues[r().locale]),l(m)[r().locale])),A=b(()=>n()?.canPreview??!0),P=b(()=>l(h)&&l(g)&&r()?.locale?WC(l(g),r().locale,l(h),l(p)):void 0);var L=lQ(),O=F(L);{let N=b(()=>i()("secondary"));Ni(O,{variant:"secondary",get"aria-label"(){return l(N)},children:(M,U)=>{var H=aQ(),G=D(H);{var W=Q=>{var ee=tQ(),te=D(ee);eQ(te,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return f()}});var re=z(te,2);{var he=pe=>{LS(pe,{get thisPane(){return e.thisPane}})};q(re,pe=>{(o()||s())&&l(A)&&pe(he)})}S(Q,ee)},Y=Q=>{var ee=X(),te=D(ee);{var re=pe=>{var ce=nQ(),ge=F(ce);Z(Pe=>ne(ge,Pe),[()=>r()?.mode==="preview"?i()("preview"):i()("edit")]),S(pe,ce)},he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{LS(xe,{get thisPane(){return e.thisPane}})};q(ge,xe=>{l(A)&&xe(Pe)},!0)}S(pe,ce)};q(te,pe=>{o()||s()?pe(he,!1):pe(re)},!0)}S(Q,ee)};q(G,Q=>{l(_)&&l(w).length>1?Q(W):Q(Y,!1)})}var R=z(G,2);ii(R,{flex:!0});var B=z(R,2);{var J=Q=>{const ee=b(()=>po(r().locale)??r().locale);var te=sQ(),re=D(te);{var he=ce=>{_L(ce,{get locale(){return r().locale},get otherLocales(){return l(C)}})};q(re,ce=>{l(k)&&ce(he)})}var pe=z(re,2);{const ce=Pe=>{{let xe=b(()=>i()("content_options_x_locale",{values:{locale:l(ee)}}));hr(Pe,{get"aria-label"(){return l(xe)},children:(de,we)=>{var ve=oQ(),fe=D(ve);{var _e=je=>{qw(je,{get locale(){return r().locale},get otherLocales(){return l(C)}})};q(fe,je=>{l(k)&&r()?.locale&&je(_e)})}var Ce=z(fe,2);{let je=b(()=>i()("revert_changes")),Le=b(()=>!l(T));vt(Ce,{get label(){return l(je)},get disabled(){return l(Le)},onclick:()=>{Jw({locale:r()?.locale})}})}var ze=z(Ce,2);{var Ne=je=>{var Le=rQ(),Ie=D(Le);ri(Ie,{});var Re=z(Ie,2);{let nt=b(()=>i()(l(E)?"disable_x_locale":jn(n()?.currentValues[r().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(ee)}})),Ge=b(()=>r().locale===l(x)||l(E)&&l($));vt(Re,{get label(){return l(nt)},get disabled(){return l(Ge)},onclick:()=>{VL(r()?.locale??"")}})}S(je,Le)};q(ze,je=>{!l(y)&&r()?.locale&&je(Ne)})}var Ae=z(ze,2);{var $e=je=>{var Le=iQ(),Ie=D(Le);ri(Ie,{});var Re=z(Ie,2);{var nt=Oe=>{{let be=b(()=>i()("view_on_live_site"));vt(Oe,{get label(){return l(be)},onclick:()=>{window.open(l(P))}})}};q(Re,Oe=>{l(P)&&Oe(nt)})}var Ge=z(Re,2);{var ut=Oe=>{{let be=b(()=>!c()?.repository?.blobBaseURL),ye=b(()=>i()("view_on_x",{values:{service:c()?.repository?.label},default:i()("view_in_repository")}));vt(Oe,{get disabled(){return l(be)},get label(){return l(ye)},onclick:()=>{l(g)&&r()&&window.open(wU(l(g),r().locale))}})}};q(Ge,Oe=>{a().devModeEnabled&&Oe(ut)})}S(je,Le)};q(Ae,je=>{l(g)&&(l(P)||a().devModeEnabled)&&je($e)})}S(de,ve)},$$slots:{default:!0}})}};let ge=b(()=>i()("show_content_options_x_locale",{values:{locale:l(ee)}}));Ur(pe,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ge)},popup:ce,$$slots:{popup:!0}})}S(Q,te)};q(B,Q=>{r()?.mode==="edit"&&Q(J)})}S(M,H)},$$slots:{default:!0}})}Z(()=>Te(L,"id",e.id)),S(t,L),ae(),d()}var uQ=j('<div role="none" class="svelte-wdavy7"><h3 class="svelte-wdavy7"> </h3></div>'),dQ=j('<section class="svelte-wdavy7"><!> <div role="none" class="svelte-wdavy7"><!> <p class="error svelte-wdavy7"><!> <!></p></div></section>'),fQ=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper> <div role="none" class="locales svelte-wdavy7"></div>',1);const hQ={hash:"svelte-wdavy7",code:"p.svelte-wdavy7:not(:empty) {margin-top:0;}.locales.svelte-wdavy7 {display:table;margin:16px 0 0;width:100%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) {display:table-row;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7):last-child {width:90%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) h3:where(.svelte-wdavy7) {margin-inline-end:8px;font-size:inherit;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) p.error:where(.svelte-wdavy7) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function pQ(t,e){const n=Vn();se(e,!0),Ee(t,hQ);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"open",15,!1);const c=b(()=>r()?.collectionName??""),u=b(()=>r()?.currentSlugs??{});let d=ie(St([]));const f=St({}),h=St({}),p=()=>{K(d,Wo(l(c)).map(g=>Object.values(g.locales).map(({slug:m})=>m)).flat(1).filter(g=>!Object.values(l(u)).includes(g)),!0),Object.assign(f,l(u)),Object.assign(h,Object.fromEntries(Object.keys(l(u)).map(g=>[g,!1])))};Me(()=>{a()&&p()});{let g=b(()=>i()("edit_slug")),m=b(()=>i()("update")),v=b(()=>pn(l(u),f)||Object.values(h).some(_=>_!==!1));Ki(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{_t(Je,Se(r).currentSlugs=f,Se(r))},get open(){return a()},set open(_){a(_)},children:(_,y)=>{var w=fQ(),x=D(w);Gc(x,()=>({"--font-size":"var(--sui-font-size-small)"})),Mn(x.lastChild,{status:"warning",children:($,C)=>{var k=Fe();Z(T=>ne(k,T),[()=>i()("edit_slug_warning")]),S($,k)},$$slots:{default:!0}});var E=z(x,2);it(E,21,()=>Object.keys(f),dr,($,C)=>{var k=dQ(),T=F(k);{var A=G=>{var W=uQ(),Y=F(W),R=F(Y);Z(B=>ne(R,B),[()=>po(l(C))??l(C)]),S(G,W)};q(T,G=>{["_","_default"].includes(l(C))||G(A)})}var P=z(T,2),L=F(P);{let G=b(()=>h[l(C)]!==!1);qn(L,{flex:!0,oninput:()=>{h[l(C)]=f[l(C)].trim()?l(d).includes(f[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(G)},get"aria-errormessage"(){return`${n}-${l(C)??""}-error`},get value(){return f[l(C)]},set value(W){f[l(C)]=W}})}var O=z(L,2),N=F(O);{var M=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.empty")]),S(G,W)};q(N,G=>{h[l(C)]==="empty"&&G(M)})}var U=z(N,2);{var H=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.duplicate")]),S(G,W)};q(U,G=>{h[l(C)]==="duplicate"&&G(H)})}Z(()=>Te(O,"id",`${n}-${l(C)??""}-error`)),S($,k)}),S(_,w)},$$slots:{default:!0}})}ae(),s()}const gQ=({ids:t,assetPaths:e})=>{const n=oe(Ai);Ai.set(n.filter(r=>!t.includes(r.id))),md.set({...Il,deleted:!0,count:t.length}),e.length&&Bn.update(r=>r.filter(i=>!e.includes(i.path)))},YL=async(t,e=[])=>{const n=oe(Tn)?.repository?.databaseName,r=n?new fo(n,"file-cache"):void 0,i=[],o="delete",s=await Promise.all(t.map(async({id:c,locales:u,slug:d})=>{const f=Pc(Object.values(u).map(h=>h.path));return await Promise.all(f.map(async h=>{const p=await Iw({cacheDB:r,previousPath:h});i.push({action:o,slug:d,path:h,previousSha:p})})),c})),a=e.map(({path:c,sha:u})=>(i.push({action:o,path:c,previousSha:u}),c));await Tf({changes:i,options:{commitType:"delete",collection:oe(Wn)}}),gQ({ids:s,assetPaths:a})},mQ="{{fields._slug}}",vQ="{{fields._slug | localize}}",bQ=({collection:t,collectionFile:e,originalEntry:n})=>{const{_type:r}=t,{identifier_field:i="title",slug:o=`{{${i}}}`}=r==="entry"?t:{},{id:s}=n,a=s===void 0,{_i18n:c}=e??t,{allLocales:u,defaultLocale:d}=c,f=r==="entry"&&a,h=f&&o.includes(vQ),p=f&&(o.includes(mQ)||h);return Object.fromEntries(u.map(g=>[g,p?g===d||h?!0:"readonly":!1]))},Qu=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i,isIndexFile:o=Go(t,n)})=>{const s=t.name,a=e?.name,{id:c,slug:u,locales:d}=n,f=c===void 0,{fields:h=[],_i18n:p}=e??t,g=o?_i(t):void 0,m=g?.fields??h,v=g?.editor?.preview??e?.editor?.preview??t.editor?.preview??oe(Ct)?.editor?.preview??!0,{allLocales:_,initialLocales:y,defaultLocale:w,canonicalSlug:{key:x="translationKey"}}=p,E=f?y:_.filter(T=>!!d?.[T]?.content),$=Object.fromEntries(_.map(T=>[T,E.includes(T)])),C=f?{}:x in(d?.[w]?.content??{})?Object.fromEntries(_.map(T=>[T,d?.[T]?.slug])):{_:d?.[w].slug},k=Object.fromEntries(E.map(T=>f?[T,Pf(m,T,r)]:[T,structuredClone(d?.[T]?.content)]));Je.set({id:f?crypto.randomUUID():c,createdAt:Date.now(),isNew:f,isIndexFile:o,canPreview:v,collectionName:s,collection:t,fileName:a,collectionFile:e,fields:m,originalEntry:f?void 0:n,originalLocales:$,currentLocales:structuredClone($),originalSlugs:C,currentSlugs:structuredClone(C),originalValues:k,currentValues:Object.fromEntries(E.map(T=>[T,Mw({draft:{collectionName:s,fileName:a,isIndexFile:o},locale:T,target:structuredClone(k[T])})])),files:{},extraValues:Object.fromEntries(_.map(T=>[T,{}])),validities:Object.fromEntries(_.map(T=>[T,{}])),expanderStates:i??{_:{}},slugEditor:bQ({collection:t,collectionFile:e,originalEntry:n})}),G7({collectionName:s,fileName:a,slug:u})},_Q=()=>{const t=oe(Je),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,validities:s,isIndexFile:a}=t,{defaultLocale:c,canonicalSlug:{key:u}}=(i??r)._i18n;Object.entries(o).forEach(([d,f])=>{delete f[u];const h={collectionName:e,fileName:n,valueMap:f,isIndexFile:a};Object.keys(f).forEach(p=>{const g=mn({...h,keyPath:p});if(g?.widget==="uuid"&&(d===c||[!0,"translate"].includes(g?.i18n??!1))&&(f[p]=WL(g)),g?.widget==="hidden"){if(Array.isArray(g.default)&&p.match(/\.\d+$/)&&(delete f[p],p=p.replace(/\.\d+$/,""),p in f))return;(d===c||[!0,"translate"].includes(g?.i18n??!1))&&Object.assign(f,ML({fieldConfig:g,keyPath:p,locale:d}))}})}),Object.keys(s).forEach(d=>{s[d]={}}),Je.set({...t,id:crypto.randomUUID(),createdAt:Date.now(),isNew:!0,originalEntry:void 0,originalSlugs:{},currentSlugs:{}}),Av.set(!0)},OS=/\.\d+$/,yQ={valueMissing:!1,tooShort:!1,tooLong:!1,rangeUnderflow:!1,rangeOverflow:!1,patternMismatch:!1,typeMismatch:!1},wQ={get:(t,e)=>e==="valid"?!Object.values(t).some(Boolean):t[e]},xQ=t=>{const{draft:e,locale:n,valueMap:r,componentName:i,validities:o}=t,{collection:s,collectionName:a,fileName:c,collectionFile:u,files:d,isIndexFile:f}=e;let{keyPath:h,value:p}=t;const g={collectionName:a,fileName:c,componentName:i,valueMap:r,keyPath:h.replace(Vd,""),isIndexFile:f},m=mn({...g});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:y}=m,w=nu(m),{min:x=0,max:E=1/0}=G$.includes(v)?m:{},{i18nEnabled:$,defaultLocale:C}=(u??s)._i18n;if(!i&&n!==C&&(!$||_===!1||_==="none"||_==="duplicate"))return;const k=Object.entries(r),T=ru({fieldConfig:m,locale:n}),A={...yQ};if(v==="list"||w){if(h in o[n])return;const P=new RegExp(`^${Gt(h)}\\.\\d+`),L=Array.isArray(p)&&p.length?p.length:new Set(k.map(([O])=>O.match(P)?.[0]).filter(Boolean)).size;T&&!L?A.valueMissing=!0:typeof x=="number"&&L<x?A.rangeUnderflow=!0:typeof E=="number"&&L>E&&(A.rangeOverflow=!0)}if(v==="object"&&T&&!p&&(A.valueMissing=!0),v==="keyvalue"){const P=h.match(/(.+?)(?:\.[^.]*)?$/)?.[1],L=mn({...g,keyPath:P.replace(Vd,"")});if(P in o[n]||L?.widget!=="keyvalue")return;h=P;const N=Gw({entryDraft:Je,keyPath:P,locale:n});T&&!N.length?A.valueMissing=!0:typeof x=="number"&&N.length<x?A.rangeUnderflow=!0:typeof E=="number"&&N.length>E&&(A.rangeOverflow=!0)}if(v==="code"){const{output_code_only:P=!1,keys:L={code:"code",lang:"lang"}}=m,O=h.match(`(.+)\\.(?:${L.code}|${L.lang})$`)?.[1]??"";if(O&&(h=O),h in o[n])return;P||(p=r[`${h}.${L.code}`])}if(ny.includes(v)&&typeof p=="string"&&p.startsWith("blob:")&&(p=d[p]?.file?.name),!(["object","list","hidden","compute","keyvalue"].includes(v)||w)&&(typeof p=="string"&&(p=p.trim()),T&&(p==null||p===""||w&&!p.length)&&(A.valueMissing=!0),Array.isArray(y))){const P=ou(y[0]);P&&!P.test(String(p))&&(A.patternMismatch=!0)}if(["string","text"].includes(v)){const P=KL({fieldConfig:m,value:p});A.tooShort=P.tooShort,A.tooLong=P.tooLong}if(v==="string"&&p){const{type:P="text"}=m;if(P!=="text"){const L=Object.assign(document.createElement("input"),{type:P,value:p});A.typeMismatch=L.validity.typeMismatch}P==="email"&&!A.typeMismatch&&!p.split("@")[1]?.includes(".")&&(A.typeMismatch=!0)}if(v==="number"){const{value_type:P="int"}=m;typeof x=="number"&&p!==null&&Number(p)<x?A.rangeUnderflow=!0:typeof E=="number"&&p!==null&&Number(p)>E&&(A.rangeOverflow=!0),(P==="int"||P==="float")&&T&&p===null&&(A.typeMismatch=!0)}return new Proxy(A,wQ)},JL=t=>{const{validities:e,locale:n,keyPath:r}=t,i=xQ(t);let o=!0;return i&&(e[n][r]=i,i.valid||(o=!1)),o},kQ=({fieldConfig:t,validateArgs:e})=>{const{validities:n,locale:r,keyPath:i}=e,o=n[r][i]?.valid??JL(e),{widget:s="string"}=t;return s==="list"&&!El(t).hasSubFields?{valid:o,validateItems:!1}:nu(t)?{valid:o,validateItems:!1}:{valid:o,validateItems:!0}},IS=t=>{const e=oe(Je),{collectionName:n,fileName:r,isIndexFile:i,currentLocales:o}=e,s={},a={collectionName:n,fileName:r,isIndexFile:i,keyPath:"",valueMap:{}};let c=!0;return Object.entries(e[t]).forEach(([u,d])=>{const f=Object.entries(d);if(!o[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}const h={draft:e,locale:u,valueMap:d,validities:s};s[u]={},f.forEach(([p,g])=>{const[m]=p.match(Vd)??[],v=m?d[`${m}__sc_component_name`]:void 0,_=mn({...a,keyPath:p.replace(Vd,""),valueMap:d,componentName:v});if(_){if(OS.test(p)){const{valid:y,validateItems:w}=kQ({fieldConfig:_,validateArgs:{...h,keyPath:p.replace(OS,""),value:"",componentName:v}});if(y||(c=!1),!w)return}JL({...h,keyPath:p,value:g,componentName:v})||(c=!1)}})}),{valid:c,validities:s}},SQ=()=>{const{currentSlugs:t,slugEditor:e}=oe(Je),n={};let r=!0;return Object.entries(t).forEach(([i,o])=>{const s=!!e[i]&&!o?.trim();s&&(r=!1),n[i]={_slug:{valueMissing:s,valid:!s}}}),{valid:r,validities:n}},EQ=()=>{const{valid:t,validities:e}=IS("currentValues"),{valid:n,validities:r}=IS("extraValues"),{valid:i,validities:o}=SQ();return Je.update(s=>({...s,validities:Object.fromEntries(Object.keys(e).map(a=>[a,{...e[a],...r[a],...o[a]}]))})),t&&n&&i},TQ=({skipCI:t})=>{const e=!!oe(Tn)?.isGit&&!(t??oe(Ow));md.set({...Il,saved:!0,published:e,count:1}),Gh.set(e)},$Q=async({skipCI:t=void 0}={})=>{const e=oe(Je),{collection:n,isNew:r,collectionName:i,fileName:o,currentValues:s}=e;if(!EQ())throw LJ({collectionName:i,fileName:o,currentValues:s}),new Error("validation_failed");const a=HP({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await JP({draft:e,slugs:a});let h;try{h=await Tf({changes:d,savingEntries:[u],savingAssets:f,options:{commitType:r?"create":"update",collection:n,skipCI:t}})}catch(p){throw console.error(p.cause??p),new Error("saving_failed",{cause:p.cause??p})}return TQ({skipCI:t}),Ag(i,r?"":c),h.savedEntries[0]},XL=async(t,e)=>{const{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=t,{locales:o}=e,{content:s}=o[r]??Object.values(o)[0]??{};if(!s)return;const a=i.map(c=>{if(c.includes("*")){const u=new RegExp(`^${Gt(c).replace("\\*",".+")}$`);return Object.keys(s).filter(d=>u.test(d))}return c}).flat(1);for(const c of a){const u=s[c]?await rl({value:s[c],entry:e,collectionName:n,thumbnail:!0}):void 0;if(u)return u}},ZL=({entry:t,collectionName:e,fileName:n,relative:r=!1})=>{const{locales:i}=t,o=si(e);if(!o)return[];const s=Go(o,t),a=Object.values(i).map(({content:c})=>Object.entries(c??{}).map(([u,d])=>{if(typeof d=="string"&&(!r||!/^[/@]/.test(d))&&["image","file"].includes(mn({collectionName:e,keyPath:u,isIndexFile:s})?.widget??"string")){const f=my({value:d,entry:t,collectionName:e,fileName:n});if(f&&Hp(f.path).some(h=>h.collectionName===e&&h.fileName===n&&(r?h.entryRelative:!0)))return f}})).flat(1).filter((c,u,d)=>!!c&&d.indexOf(c)===u);if(r&&Io({collectionName:e,fileName:n})?.entryRelative){const c=gn(Object.values(t.locales)[0].path).dirname;oe(Bn).forEach(u=>{gn(u.path).dirname===c&&!a.find(({path:d})=>d===u.path)&&a.push(u)})}return a};var CQ=j("<!> <!>",1),AQ=j("<!> <!> <!>",1),PQ=j("<!> <!> <!> <!>",1),LQ=j('<!> <h2 role="none"><!></h2> <!> <!> <!> <!>',1),NQ=j('<div role="none" class="error svelte-zjrq31"> </div>'),OQ=j(" <!>",1),IQ=j("<!> <!> <!> <!> <!> <!>",1);const RQ={hash:"svelte-zjrq31",code:".error.svelte-zjrq31 {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function DQ(t,e){se(e,!0),Ee(t,RQ);const n=()=>V(Je,"$entryDraft",p),r=()=>V(qt,"$appLocale",p),i=()=>V(tL,"$entryDraftModified",p),o=()=>V(ft,"$prefs",p),s=()=>V(ue,"$_",p),a=()=>V(vn,"$isSmallScreen",p),c=()=>V(Yo,"$isMediumScreen",p),u=()=>V(Ui,"$entryEditorSettings",p),d=()=>V(Nw,"$skipCIConfigured",p),f=()=>V(Ow,"$skipCIEnabled",p),h=()=>V(Pv,"$copyFromLocaleToast",p),[p,g]=me(),m=de=>{const we=b(()=>a()?vt:et);var ve=CQ(),fe=D(ve);{let Ce=b(()=>s()("duplicate")),ze=b(()=>s()("duplicate_entry")),Ne=b(()=>l(T)||!!l(P)?.path||!Zp(l(A)));ur(fe,()=>l(we),(Ae,$e)=>{$e(Ae,{variant:"ghost",get label(){return l(Ce)},get"aria-label"(){return l(ze)},get disabled(){return l(Ne)},onclick:()=>{Wt(`/collections/${l(U)}/new`,{replaceState:!0,notifyChange:!1,transitionType:"forwards"}),_Q()}})})}var _e=z(fe,2);{let Ce=b(()=>s()("delete")),ze=b(()=>s()("delete_entry")),Ne=b(()=>l(P)?.delete===!1);ur(_e,()=>l(we),(Ae,$e)=>{$e(Ae,{variant:"ghost",get label(){return l(Ce)},get"aria-label"(){return l(ze)},get disabled(){return l(Ne)},onclick:()=>{K(w,!0)}})})}S(de,ve)};let v=I(e,"disabled",3,!1),_=ie(!1),y=ie(!1),w=ie(!1),x=ie(!1),E=ie(""),$=ie(!1),C=ie(void 0);const k=b(()=>n()?.isNew??!0),T=b(()=>n()?.isIndexFile??!1),A=b(()=>n()?.collection),P=b(()=>l(A)?._type==="entry"?l(A):void 0),L=b(()=>n()?.collectionFile),O=b(()=>n()?.originalEntry),N=b(()=>(l(L)??l(A))?._i18n??bo),M=b(()=>l(N).defaultLocale),U=b(()=>l(A)?.name),H=b(()=>l(L)?.name),G=b(()=>r()&&l(A)?ws(l(A)):""),W=b(()=>r()&&l(A)?ws(l(A),{useSingular:!0}):""),Y=b(()=>n()?.canPreview??!0),R=b(()=>l(k)||i()),B=b(()=>Object.values(n()?.validities??{}).map(de=>Object.values(de).map(({valid:we})=>!we)).flat(1).filter(Boolean).length),J=b(()=>l(U)&&l(O)&&Io({collectionName:l(U),fileName:l(H)})?.entryRelative?ZL({entry:l(O),collectionName:l(U),fileName:l(H),relative:!0}):[]),Q=b(()=>l(A)&&l(O)?WC(l(O),l(M),l(A),l(L)):void 0),ee=()=>{oa(l(U)==="_singletons"?"/collections":`/collections/${l(U)}`)},te=async({skipCI:de=void 0}={})=>{if(K($,!0),!!l(A))try{const we=await $Q({skipCI:de});o()?.closeOnSave??!0?(ee(),Ye(Je,null)):(l(k)&&Wt(`/collections/${l(U)}/entries/${we.subPath}`,{replaceState:!0,notifyChange:!1,transitionType:"backwards"}),Qu({collection:l(A),collectionFile:l(L),originalEntry:we,expanderStates:n()?.expanderStates}))}catch(we){we.message==="validation_failed"?K(_,!0):we.message==="saving_failed"?(K(x,!0),K(E,we.cause?.message??we.message??s()("unexpected_error"),!0)):(K(x,!0),K(E,""),console.error(we))}finally{K($,!1)}};var re=IQ(),he=D(re);{let de=b(()=>s()("primary"));Ni(he,{variant:"primary",get"aria-label"(){return l(de)},children:(we,ve)=>{var fe=LQ(),_e=D(fe);{let Ge=b(()=>s()("cancel_editing"));bl(_e,{get"aria-label"(){return l(Ge)},get useShortcut(){return o().closeWithEscape},onclick:()=>{ee()}})}var Ce=z(_e,2),ze=F(Ce);Pr(ze,{children:(Ge,ut)=>{var Oe=X(),be=D(Oe);{var ye=Ve=>{var Qe=Fe();Z(Xe=>ne(Qe,Xe),[()=>s()("create_entry_title",{values:{name:l(W)}})]),S(Ve,Qe)},tt=Ve=>{const Qe=b(()=>l(L)?df(l(L)):l(A)&&l(O)&&r()?tu(l(A),l(O)):"");var Xe=X(),ht=D(Xe);{var Pt=en=>{var pt=Fe();Z(()=>ne(pt,l(Qe))),S(en,pt)},Qt=en=>{var pt=Fe();Z(kt=>ne(pt,kt),[()=>s()("edit_entry_title",{values:{collection:l(G),entry:l(Qe)}})]),S(en,pt)};q(ht,en=>{a()?en(Pt):en(Qt,!1)})}S(Ve,Xe)};q(be,Ve=>{l(k)?Ve(ye):Ve(tt,!1)})}S(Ge,Oe)},$$slots:{default:!0}});var Ne=z(Ce,2);{var Ae=Ge=>{{let ut=b(()=>s()("view_on_live_site"));et(Ge,{variant:"tertiary",get label(){return l(ut)},onclick:()=>{window.open(l(Q))}})}};q(Ne,Ge=>{!v()&&l(Q)&&Ge(Ae)})}var $e=z(Ne,2);{var je=Ge=>{m(Ge)};q($e,Ge=>{!a()&&!v()&&!l(L)&&!l(k)&&Ge(je)})}var Le=z($e,2);{const Ge=Oe=>{{let be=b(()=>s()("editor_options"));hr(Oe,{get"aria-label"(){return l(be)},children:(ye,tt)=>{var Ve=PQ(),Qe=D(Ve);{var Xe=pt=>{m(pt)};q(Qe,pt=>{a()&&!v()&&!l(L)&&!l(k)&&pt(Xe)})}var ht=z(Qe,2);{let pt=b(()=>s()("edit_slug")),kt=b(()=>!!l(L)||l(k)||l(T)||l(P)?.delete===!1);vt(ht,{get label(){return l(pt)},get disabled(){return l(kt)},onclick:()=>{K(y,!0)}})}var Pt=z(ht,2);{let pt=b(()=>s()("revert_all_changes")),kt=b(()=>!l(R));vt(Pt,{get label(){return l(pt)},get disabled(){return l(kt)},onclick:()=>{Jw()}})}var Qt=z(Pt,2);{var en=pt=>{var kt=AQ(),tn=D(kt);ri(tn,{});var $n=z(tn,2);{let Dt=b(()=>s()("show_preview")),bn=b(()=>u()?.showPreview),Et=b(()=>!l(Y));Yh($n,{get label(){return l(Dt)},get checked(){return l(bn)},get disabled(){return l(Et)},onChange:()=>{Ui.update((_n={})=>({..._n,showPreview:!_n.showPreview}))}})}var ai=z($n,2);{let Dt=b(()=>s()("sync_scrolling")),bn=b(()=>u()?.syncScrolling),Et=b(()=>!l(Y)&&Object.keys(n()?.currentValues??{}).length===1);Yh(ai,{get label(){return l(Dt)},get checked(){return l(bn)},get disabled(){return l(Et)},onChange:()=>{Ui.update((_n={})=>({..._n,syncScrolling:!_n.syncScrolling}))}})}S(pt,kt)};q(Qt,pt=>{a()||c()||pt(en)})}S(ye,Ve)},$$slots:{default:!0}})}};let ut=b(()=>s()("show_editor_options"));xt(Ur(Le,{get disabled(){return v()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ut)},popup:Ge,$$slots:{popup:!0}}),Oe=>K(C,Oe,!0),()=>l(C))}var Ie=z(Le,2);{var Re=Ge=>{{const ut=ye=>{hr(ye,{children:(tt,Ve)=>{{let Qe=b(()=>s()(f()?"save_and_publish":"save_without_publishing"));vt(tt,{get label(){return l(Qe)},onclick:()=>{te({skipCI:!f()})}})}},$$slots:{default:!0}})};let Oe=b(()=>s()(l($)?"saving":"save")),be=b(()=>v()||!l(R)||l($));fA(Ge,{variant:"primary",get label(){return l(Oe)},get disabled(){return l(be)},keyShortcuts:"Accel+S",onclick:()=>{te()},popup:ut,$$slots:{popup:!0}})}},nt=Ge=>{{let ut=b(()=>s()(l($)?"saving":"save")),Oe=b(()=>v()||!l(R)||l($));et(Ge,{variant:"primary",get label(){return l(ut)},get disabled(){return l(Oe)},keyShortcuts:"Accel+S",onclick:()=>{te()}})}};q(Ie,Ge=>{d()?Ge(Re):Ge(nt,!1)})}S(we,fe)},$$slots:{default:!0}})}var pe=z(he,2);Yn(pe,{get show(){return l(_)},set show(de){K(_,de,!0)},children:(de,we)=>{Mn(de,{status:"error",children:(ve,fe)=>{var _e=Fe();Z(Ce=>ne(_e,Ce),[()=>s()(l(B)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(B)}})]),S(ve,_e)},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=z(pe,2);Yn(ce,{get id(){return h().id},get show(){return h().show},set show(de){_t(Pv,Se(h).show=de,Se(h))},children:(de,we)=>{const ve=b(()=>{const{status:fe,message:_e,count:Ce,sourceLanguage:ze}=h();return{status:fe,message:_e,count:Ce,sourceLanguage:ze}});Mn(de,{get status(){return l(ve).status},children:(fe,_e)=>{var Ce=Fe();Z(ze=>ne(Ce,ze),[()=>s()(`editor.${l(ve).message}`,{values:{count:l(ve).count,source:l(ve).sourceLanguage?po(l(ve).sourceLanguage)??l(ve).sourceLanguage:""}})]),S(fe,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}});var ge=z(ce,2);pQ(ge,{get open(){return l(y)},set open(de){K(y,de,!0)}});var Pe=z(ge,2);{let de=b(()=>s()("delete_entry")),we=b(()=>s()("delete"));cu(Pe,{get title(){return l(de)},get okLabel(){return l(we)},onOk:async()=>{l(O)&&await YL([l(O)],l(J)),ee()},onClose:()=>{l(C)?.focus()},get open(){return l(w)},set open(ve){K(w,ve,!0)},children:(ve,fe)=>{var _e=Fe();Z(Ce=>ne(_e,Ce),[()=>s()(l(J).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),S(ve,_e)},$$slots:{default:!0}})}var xe=z(Pe,2);{let de=b(()=>s()("saving_entry.error.title"));sg(xe,{get title(){return l(de)},onClose:()=>{l(C)?.focus()},get open(){return l(x)},set open(we){K(x,we,!0)},children:(we,ve)=>{var fe=OQ(),_e=D(fe),Ce=z(_e);{var ze=Ne=>{var Ae=NQ(),$e=F(Ae);Z(()=>ne($e,l(E))),S(Ne,Ae)};q(Ce,Ne=>{l(E)&&Ne(ze)})}Z(Ne=>ne(_e,`${Ne??""} `),[()=>s()("saving_entry.error.description")]),S(we,fe)},$$slots:{default:!0}})}S(t,re),ae(),g()}var MQ=j('<div role="none"><!></div> <div role="none"><!></div>',1),FQ=j("<!> <!>",1),zQ=j("<!> <!>",1),jQ=j("<!> <!>",1),UQ=j('<div role="none" class="cols svelte-jrunrx"><!></div>'),BQ=j("<!> <!>",1),qQ=j('<div role="group" class="wrapper content-editor svelte-jrunrx"><!></div> <!> <!>',1);const VQ={hash:"svelte-jrunrx",code:`.wrapper.svelte-jrunrx {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-jrunrx {display:none;}.wrapper[inert].svelte-jrunrx {filter:opacity(0);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=edit] {flex:1 1;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=preview] {flex:2 1;}
|
|
653
|
+
}.header.svelte-uj56is > .sui.toolbar h3 {margin:0 8px;font-size:var(--sui-font-size-default);}`};function NS(t,e){se(e,!0),Ee(t,cQ);const n=()=>V(Je,"$entryDraft",u),r=()=>V(e.thisPane,"$thisPane",u),i=()=>V(ue,"$_",u),o=()=>V(vn,"$isSmallScreen",u),s=()=>V(Yo,"$isMediumScreen",u),a=()=>V(ft,"$prefs",u),c=()=>V(Tn,"$backend",u),[u,d]=me();let f=I(e,"thatPane",19,()=>ot(null));const h=b(()=>n()?.collection),p=b(()=>n()?.collectionFile),g=b(()=>n()?.originalEntry),m=b(()=>n()?.originalValues??{}),v=b(()=>(l(p)??l(h))?._i18n??bo),_=b(()=>l(v).i18nEnabled),y=b(()=>l(v).saveAllLocales),w=b(()=>l(v).allLocales),x=b(()=>l(v).defaultLocale),E=b(()=>n()?.currentLocales[r()?.locale??""]),$=b(()=>Object.values(n()?.currentLocales??{}).filter(N=>N).length===1),C=b(()=>l(_)?l(w).filter(N=>N!==r()?.locale):[]),k=b(()=>!!l(C).length),T=b(()=>r()?.locale&&!pn(Un(n()?.currentValues[r().locale]),l(m)[r().locale])),A=b(()=>n()?.canPreview??!0),P=b(()=>l(h)&&l(g)&&r()?.locale?WC(l(g),r().locale,l(h),l(p)):void 0);var L=lQ(),O=F(L);{let N=b(()=>i()("secondary"));Ni(O,{variant:"secondary",get"aria-label"(){return l(N)},children:(M,U)=>{var H=aQ(),G=D(H);{var W=Q=>{var ee=tQ(),te=D(ee);eQ(te,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return f()}});var re=z(te,2);{var he=pe=>{LS(pe,{get thisPane(){return e.thisPane}})};q(re,pe=>{(o()||s())&&l(A)&&pe(he)})}S(Q,ee)},Y=Q=>{var ee=X(),te=D(ee);{var re=pe=>{var ce=nQ(),ge=F(ce);Z(Pe=>ne(ge,Pe),[()=>r()?.mode==="preview"?i()("preview"):i()("edit")]),S(pe,ce)},he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{LS(xe,{get thisPane(){return e.thisPane}})};q(ge,xe=>{l(A)&&xe(Pe)},!0)}S(pe,ce)};q(te,pe=>{o()||s()?pe(he,!1):pe(re)},!0)}S(Q,ee)};q(G,Q=>{l(_)&&l(w).length>1?Q(W):Q(Y,!1)})}var R=z(G,2);ii(R,{flex:!0});var B=z(R,2);{var J=Q=>{const ee=b(()=>po(r().locale)??r().locale);var te=sQ(),re=D(te);{var he=ce=>{_L(ce,{get locale(){return r().locale},get otherLocales(){return l(C)}})};q(re,ce=>{l(k)&&ce(he)})}var pe=z(re,2);{const ce=Pe=>{{let xe=b(()=>i()("content_options_x_locale",{values:{locale:l(ee)}}));hr(Pe,{get"aria-label"(){return l(xe)},children:(de,we)=>{var ve=oQ(),fe=D(ve);{var _e=je=>{qw(je,{get locale(){return r().locale},get otherLocales(){return l(C)}})};q(fe,je=>{l(k)&&r()?.locale&&je(_e)})}var Ce=z(fe,2);{let je=b(()=>i()("revert_changes")),Le=b(()=>!l(T));vt(Ce,{get label(){return l(je)},get disabled(){return l(Le)},onclick:()=>{Jw({locale:r()?.locale})}})}var ze=z(Ce,2);{var Ne=je=>{var Le=rQ(),Ie=D(Le);ri(Ie,{});var Re=z(Ie,2);{let nt=b(()=>i()(l(E)?"disable_x_locale":Un(n()?.currentValues[r().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(ee)}})),Ge=b(()=>r().locale===l(x)||l(E)&&l($));vt(Re,{get label(){return l(nt)},get disabled(){return l(Ge)},onclick:()=>{VL(r()?.locale??"")}})}S(je,Le)};q(ze,je=>{!l(y)&&r()?.locale&&je(Ne)})}var Ae=z(ze,2);{var $e=je=>{var Le=iQ(),Ie=D(Le);ri(Ie,{});var Re=z(Ie,2);{var nt=Oe=>{{let be=b(()=>i()("view_on_live_site"));vt(Oe,{get label(){return l(be)},onclick:()=>{window.open(l(P))}})}};q(Re,Oe=>{l(P)&&Oe(nt)})}var Ge=z(Re,2);{var ut=Oe=>{{let be=b(()=>!c()?.repository?.blobBaseURL),ye=b(()=>i()("view_on_x",{values:{service:c()?.repository?.label},default:i()("view_in_repository")}));vt(Oe,{get disabled(){return l(be)},get label(){return l(ye)},onclick:()=>{l(g)&&r()&&window.open(wU(l(g),r().locale))}})}};q(Ge,Oe=>{a().devModeEnabled&&Oe(ut)})}S(je,Le)};q(Ae,je=>{l(g)&&(l(P)||a().devModeEnabled)&&je($e)})}S(de,ve)},$$slots:{default:!0}})}};let ge=b(()=>i()("show_content_options_x_locale",{values:{locale:l(ee)}}));Ur(pe,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ge)},popup:ce,$$slots:{popup:!0}})}S(Q,te)};q(B,Q=>{r()?.mode==="edit"&&Q(J)})}S(M,H)},$$slots:{default:!0}})}Z(()=>Te(L,"id",e.id)),S(t,L),ae(),d()}var uQ=j('<div role="none" class="svelte-wdavy7"><h3 class="svelte-wdavy7"> </h3></div>'),dQ=j('<section class="svelte-wdavy7"><!> <div role="none" class="svelte-wdavy7"><!> <p class="error svelte-wdavy7"><!> <!></p></div></section>'),fQ=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper> <div role="none" class="locales svelte-wdavy7"></div>',1);const hQ={hash:"svelte-wdavy7",code:"p.svelte-wdavy7:not(:empty) {margin-top:0;}.locales.svelte-wdavy7 {display:table;margin:16px 0 0;width:100%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) {display:table-row;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) div:where(.svelte-wdavy7):last-child {width:90%;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) h3:where(.svelte-wdavy7) {margin-inline-end:8px;font-size:inherit;}.locales.svelte-wdavy7 section:where(.svelte-wdavy7) p.error:where(.svelte-wdavy7) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function pQ(t,e){const n=Vn();se(e,!0),Ee(t,hQ);const r=()=>V(Je,"$entryDraft",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=I(e,"open",15,!1);const c=b(()=>r()?.collectionName??""),u=b(()=>r()?.currentSlugs??{});let d=ie(St([]));const f=St({}),h=St({}),p=()=>{K(d,Wo(l(c)).map(g=>Object.values(g.locales).map(({slug:m})=>m)).flat(1).filter(g=>!Object.values(l(u)).includes(g)),!0),Object.assign(f,l(u)),Object.assign(h,Object.fromEntries(Object.keys(l(u)).map(g=>[g,!1])))};Me(()=>{a()&&p()});{let g=b(()=>i()("edit_slug")),m=b(()=>i()("update")),v=b(()=>pn(l(u),f)||Object.values(h).some(_=>_!==!1));Ki(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{_t(Je,Se(r).currentSlugs=f,Se(r))},get open(){return a()},set open(_){a(_)},children:(_,y)=>{var w=fQ(),x=D(w);Gc(x,()=>({"--font-size":"var(--sui-font-size-small)"})),Mn(x.lastChild,{status:"warning",children:($,C)=>{var k=Fe();Z(T=>ne(k,T),[()=>i()("edit_slug_warning")]),S($,k)},$$slots:{default:!0}});var E=z(x,2);it(E,21,()=>Object.keys(f),dr,($,C)=>{var k=dQ(),T=F(k);{var A=G=>{var W=uQ(),Y=F(W),R=F(Y);Z(B=>ne(R,B),[()=>po(l(C))??l(C)]),S(G,W)};q(T,G=>{["_","_default"].includes(l(C))||G(A)})}var P=z(T,2),L=F(P);{let G=b(()=>h[l(C)]!==!1);qn(L,{flex:!0,oninput:()=>{h[l(C)]=f[l(C)].trim()?l(d).includes(f[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(G)},get"aria-errormessage"(){return`${n}-${l(C)??""}-error`},get value(){return f[l(C)]},set value(W){f[l(C)]=W}})}var O=z(L,2),N=F(O);{var M=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.empty")]),S(G,W)};q(N,G=>{h[l(C)]==="empty"&&G(M)})}var U=z(N,2);{var H=G=>{var W=Fe();Z(Y=>ne(W,Y),[()=>i()("edit_slug_error.duplicate")]),S(G,W)};q(U,G=>{h[l(C)]==="duplicate"&&G(H)})}Z(()=>Te(O,"id",`${n}-${l(C)??""}-error`)),S($,k)}),S(_,w)},$$slots:{default:!0}})}ae(),s()}const gQ=({ids:t,assetPaths:e})=>{const n=oe(Ai);Ai.set(n.filter(r=>!t.includes(r.id))),md.set({...Il,deleted:!0,count:t.length}),e.length&&Bn.update(r=>r.filter(i=>!e.includes(i.path)))},YL=async(t,e=[])=>{const n=oe(Tn)?.repository?.databaseName,r=n?new fo(n,"file-cache"):void 0,i=[],o="delete",s=await Promise.all(t.map(async({id:c,locales:u,slug:d})=>{const f=Pc(Object.values(u).map(h=>h.path));return await Promise.all(f.map(async h=>{const p=await Iw({cacheDB:r,previousPath:h});i.push({action:o,slug:d,path:h,previousSha:p})})),c})),a=e.map(({path:c,sha:u})=>(i.push({action:o,path:c,previousSha:u}),c));await Tf({changes:i,options:{commitType:"delete",collection:oe(Wn)}}),gQ({ids:s,assetPaths:a})},mQ="{{fields._slug}}",vQ="{{fields._slug | localize}}",bQ=({collection:t,collectionFile:e,originalEntry:n})=>{const{_type:r}=t,{identifier_field:i="title",slug:o=`{{${i}}}`}=r==="entry"?t:{},{id:s}=n,a=s===void 0,{_i18n:c}=e??t,{allLocales:u,defaultLocale:d}=c,f=r==="entry"&&a,h=f&&o.includes(vQ),p=f&&(o.includes(mQ)||h);return Object.fromEntries(u.map(g=>[g,p?g===d||h?!0:"readonly":!1]))},Qu=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i,isIndexFile:o=Go(t,n)})=>{const s=t.name,a=e?.name,{id:c,slug:u,locales:d}=n,f=c===void 0,{fields:h=[],_i18n:p}=e??t,g=o?_i(t):void 0,m=g?.fields??h,v=g?.editor?.preview??e?.editor?.preview??t.editor?.preview??oe(Ct)?.editor?.preview??!0,{allLocales:_,initialLocales:y,defaultLocale:w,canonicalSlug:{key:x="translationKey"}}=p,E=f?y:_.filter(T=>!!d?.[T]?.content),$=Object.fromEntries(_.map(T=>[T,E.includes(T)])),C=f?{}:x in(d?.[w]?.content??{})?Object.fromEntries(_.map(T=>[T,d?.[T]?.slug])):{_:d?.[w].slug},k=Object.fromEntries(E.map(T=>f?[T,Pf(m,T,r)]:[T,structuredClone(d?.[T]?.content)]));Je.set({id:f?crypto.randomUUID():c,createdAt:Date.now(),isNew:f,isIndexFile:o,canPreview:v,collectionName:s,collection:t,fileName:a,collectionFile:e,fields:m,originalEntry:f?void 0:n,originalLocales:$,currentLocales:structuredClone($),originalSlugs:C,currentSlugs:structuredClone(C),originalValues:k,currentValues:Object.fromEntries(E.map(T=>[T,Mw({draft:{collectionName:s,fileName:a,isIndexFile:o},locale:T,target:structuredClone(k[T])})])),files:{},extraValues:Object.fromEntries(_.map(T=>[T,{}])),validities:Object.fromEntries(_.map(T=>[T,{}])),expanderStates:i??{_:{}},slugEditor:bQ({collection:t,collectionFile:e,originalEntry:n})}),G7({collectionName:s,fileName:a,slug:u})},_Q=()=>{const t=oe(Je),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,validities:s,isIndexFile:a}=t,{defaultLocale:c,canonicalSlug:{key:u}}=(i??r)._i18n;Object.entries(o).forEach(([d,f])=>{delete f[u];const h={collectionName:e,fileName:n,valueMap:f,isIndexFile:a};Object.keys(f).forEach(p=>{const g=mn({...h,keyPath:p});if(g?.widget==="uuid"&&(d===c||[!0,"translate"].includes(g?.i18n??!1))&&(f[p]=WL(g)),g?.widget==="hidden"){if(Array.isArray(g.default)&&p.match(/\.\d+$/)&&(delete f[p],p=p.replace(/\.\d+$/,""),p in f))return;(d===c||[!0,"translate"].includes(g?.i18n??!1))&&Object.assign(f,ML({fieldConfig:g,keyPath:p,locale:d}))}})}),Object.keys(s).forEach(d=>{s[d]={}}),Je.set({...t,id:crypto.randomUUID(),createdAt:Date.now(),isNew:!0,originalEntry:void 0,originalSlugs:{},currentSlugs:{}}),Av.set(!0)},OS=/\.\d+$/,yQ={valueMissing:!1,tooShort:!1,tooLong:!1,rangeUnderflow:!1,rangeOverflow:!1,patternMismatch:!1,typeMismatch:!1},wQ={get:(t,e)=>e==="valid"?!Object.values(t).some(Boolean):t[e]},xQ=t=>{const{draft:e,locale:n,valueMap:r,componentName:i,validities:o}=t,{collection:s,collectionName:a,fileName:c,collectionFile:u,files:d,isIndexFile:f}=e;let{keyPath:h,value:p}=t;const g={collectionName:a,fileName:c,componentName:i,valueMap:r,keyPath:h.replace(Vd,""),isIndexFile:f},m=mn({...g});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:y}=m,w=nu(m),{min:x=0,max:E=1/0}=G$.includes(v)?m:{},{i18nEnabled:$,defaultLocale:C}=(u??s)._i18n;if(!i&&n!==C&&(!$||_===!1||_==="none"||_==="duplicate"))return;const k=Object.entries(r),T=ru({fieldConfig:m,locale:n}),A={...yQ};if(v==="list"||w){if(h in o[n])return;const P=new RegExp(`^${Gt(h)}\\.\\d+`),L=Array.isArray(p)&&p.length?p.length:new Set(k.map(([O])=>O.match(P)?.[0]).filter(Boolean)).size;T&&!L?A.valueMissing=!0:typeof x=="number"&&L<x?A.rangeUnderflow=!0:typeof E=="number"&&L>E&&(A.rangeOverflow=!0)}if(v==="object"&&T&&!p&&(A.valueMissing=!0),v==="keyvalue"){const P=h.match(/(.+?)(?:\.[^.]*)?$/)?.[1],L=mn({...g,keyPath:P.replace(Vd,"")});if(P in o[n]||L?.widget!=="keyvalue")return;h=P;const N=Gw({entryDraft:Je,keyPath:P,locale:n});T&&!N.length?A.valueMissing=!0:typeof x=="number"&&N.length<x?A.rangeUnderflow=!0:typeof E=="number"&&N.length>E&&(A.rangeOverflow=!0)}if(v==="code"){const{output_code_only:P=!1,keys:L={code:"code",lang:"lang"}}=m,O=h.match(`(.+)\\.(?:${L.code}|${L.lang})$`)?.[1]??"";if(O&&(h=O),h in o[n])return;P||(p=r[`${h}.${L.code}`])}if(ny.includes(v)&&typeof p=="string"&&p.startsWith("blob:")&&(p=d[p]?.file?.name),!(["object","list","hidden","compute","keyvalue"].includes(v)||w)&&(typeof p=="string"&&(p=p.trim()),T&&(p==null||p===""||w&&!p.length)&&(A.valueMissing=!0),Array.isArray(y))){const P=ou(y[0]);P&&!P.test(String(p))&&(A.patternMismatch=!0)}if(["string","text"].includes(v)){const P=KL({fieldConfig:m,value:p});A.tooShort=P.tooShort,A.tooLong=P.tooLong}if(v==="string"&&p){const{type:P="text"}=m;if(P!=="text"){const L=Object.assign(document.createElement("input"),{type:P,value:p});A.typeMismatch=L.validity.typeMismatch}P==="email"&&!A.typeMismatch&&!p.split("@")[1]?.includes(".")&&(A.typeMismatch=!0)}if(v==="number"){const{value_type:P="int"}=m;typeof x=="number"&&p!==null&&Number(p)<x?A.rangeUnderflow=!0:typeof E=="number"&&p!==null&&Number(p)>E&&(A.rangeOverflow=!0),(P==="int"||P==="float")&&T&&p===null&&(A.typeMismatch=!0)}return new Proxy(A,wQ)},JL=t=>{const{validities:e,locale:n,keyPath:r}=t,i=xQ(t);let o=!0;return i&&(e[n][r]=i,i.valid||(o=!1)),o},kQ=({fieldConfig:t,validateArgs:e})=>{const{validities:n,locale:r,keyPath:i}=e,o=n[r][i]?.valid??JL(e),{widget:s="string"}=t;return s==="list"&&!El(t).hasSubFields?{valid:o,validateItems:!1}:nu(t)?{valid:o,validateItems:!1}:{valid:o,validateItems:!0}},IS=t=>{const e=oe(Je),{collectionName:n,fileName:r,isIndexFile:i,currentLocales:o}=e,s={},a={collectionName:n,fileName:r,isIndexFile:i,keyPath:"",valueMap:{}};let c=!0;return Object.entries(e[t]).forEach(([u,d])=>{const f=Object.entries(d);if(!o[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}const h={draft:e,locale:u,valueMap:d,validities:s};s[u]={},f.forEach(([p,g])=>{const[m]=p.match(Vd)??[],v=m?d[`${m}__sc_component_name`]:void 0,_=mn({...a,keyPath:p.replace(Vd,""),valueMap:d,componentName:v});if(_){if(OS.test(p)){const{valid:y,validateItems:w}=kQ({fieldConfig:_,validateArgs:{...h,keyPath:p.replace(OS,""),value:"",componentName:v}});if(y||(c=!1),!w)return}JL({...h,keyPath:p,value:g,componentName:v})||(c=!1)}})}),{valid:c,validities:s}},SQ=()=>{const{currentSlugs:t,slugEditor:e}=oe(Je),n={};let r=!0;return Object.entries(t).forEach(([i,o])=>{const s=!!e[i]&&!o?.trim();s&&(r=!1),n[i]={_slug:{valueMissing:s,valid:!s}}}),{valid:r,validities:n}},EQ=()=>{const{valid:t,validities:e}=IS("currentValues"),{valid:n,validities:r}=IS("extraValues"),{valid:i,validities:o}=SQ();return Je.update(s=>({...s,validities:Object.fromEntries(Object.keys(e).map(a=>[a,{...e[a],...r[a],...o[a]}]))})),t&&n&&i},TQ=({skipCI:t})=>{const e=!!oe(Tn)?.isGit&&!(t??oe(Ow));md.set({...Il,saved:!0,published:e,count:1}),Gh.set(e)},$Q=async({skipCI:t=void 0}={})=>{const e=oe(Je),{collection:n,isNew:r,collectionName:i,fileName:o,currentValues:s}=e;if(!EQ())throw LJ({collectionName:i,fileName:o,currentValues:s}),new Error("validation_failed");const a=HP({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await JP({draft:e,slugs:a});let h;try{h=await Tf({changes:d,savingEntries:[u],savingAssets:f,options:{commitType:r?"create":"update",collection:n,skipCI:t}})}catch(p){throw console.error(p.cause??p),new Error("saving_failed",{cause:p.cause??p})}return TQ({skipCI:t}),Ag(i,r?"":c),h.savedEntries[0]},XL=async(t,e)=>{const{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=t,{locales:o}=e,{content:s}=o[r]??Object.values(o)[0]??{};if(!s)return;const a=i.map(c=>{if(c.includes("*")){const u=new RegExp(`^${Gt(c).replace("\\*",".+")}$`);return Object.keys(s).filter(d=>u.test(d))}return c}).flat(1);for(const c of a){const u=s[c]?await rl({value:s[c],entry:e,collectionName:n,thumbnail:!0}):void 0;if(u)return u}},ZL=({entry:t,collectionName:e,fileName:n,relative:r=!1})=>{const{locales:i}=t,o=si(e);if(!o)return[];const s=Go(o,t),a=Object.values(i).map(({content:c})=>Object.entries(c??{}).map(([u,d])=>{if(typeof d=="string"&&(!r||!/^[/@]/.test(d))&&["image","file"].includes(mn({collectionName:e,keyPath:u,isIndexFile:s})?.widget??"string")){const f=my({value:d,entry:t,collectionName:e,fileName:n});if(f&&Hp(f.path).some(h=>h.collectionName===e&&h.fileName===n&&(r?h.entryRelative:!0)))return f}})).flat(1).filter((c,u,d)=>!!c&&d.indexOf(c)===u);if(r&&Io({collectionName:e,fileName:n})?.entryRelative){const c=gn(Object.values(t.locales)[0].path).dirname;oe(Bn).forEach(u=>{gn(u.path).dirname===c&&!a.find(({path:d})=>d===u.path)&&a.push(u)})}return a};var CQ=j("<!> <!>",1),AQ=j("<!> <!> <!>",1),PQ=j("<!> <!> <!> <!>",1),LQ=j('<!> <h2 role="none"><!></h2> <!> <!> <!> <!>',1),NQ=j('<div role="none" class="error svelte-zjrq31"> </div>'),OQ=j(" <!>",1),IQ=j("<!> <!> <!> <!> <!> <!>",1);const RQ={hash:"svelte-zjrq31",code:".error.svelte-zjrq31 {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function DQ(t,e){se(e,!0),Ee(t,RQ);const n=()=>V(Je,"$entryDraft",p),r=()=>V(qt,"$appLocale",p),i=()=>V(tL,"$entryDraftModified",p),o=()=>V(ft,"$prefs",p),s=()=>V(ue,"$_",p),a=()=>V(vn,"$isSmallScreen",p),c=()=>V(Yo,"$isMediumScreen",p),u=()=>V(Ui,"$entryEditorSettings",p),d=()=>V(Nw,"$skipCIConfigured",p),f=()=>V(Ow,"$skipCIEnabled",p),h=()=>V(Pv,"$copyFromLocaleToast",p),[p,g]=me(),m=de=>{const we=b(()=>a()?vt:et);var ve=CQ(),fe=D(ve);{let Ce=b(()=>s()("duplicate")),ze=b(()=>s()("duplicate_entry")),Ne=b(()=>l(T)||!!l(P)?.path||!Zp(l(A)));ur(fe,()=>l(we),(Ae,$e)=>{$e(Ae,{variant:"ghost",get label(){return l(Ce)},get"aria-label"(){return l(ze)},get disabled(){return l(Ne)},onclick:()=>{Wt(`/collections/${l(U)}/new`,{replaceState:!0,notifyChange:!1,transitionType:"forwards"}),_Q()}})})}var _e=z(fe,2);{let Ce=b(()=>s()("delete")),ze=b(()=>s()("delete_entry")),Ne=b(()=>l(P)?.delete===!1);ur(_e,()=>l(we),(Ae,$e)=>{$e(Ae,{variant:"ghost",get label(){return l(Ce)},get"aria-label"(){return l(ze)},get disabled(){return l(Ne)},onclick:()=>{K(w,!0)}})})}S(de,ve)};let v=I(e,"disabled",3,!1),_=ie(!1),y=ie(!1),w=ie(!1),x=ie(!1),E=ie(""),$=ie(!1),C=ie(void 0);const k=b(()=>n()?.isNew??!0),T=b(()=>n()?.isIndexFile??!1),A=b(()=>n()?.collection),P=b(()=>l(A)?._type==="entry"?l(A):void 0),L=b(()=>n()?.collectionFile),O=b(()=>n()?.originalEntry),N=b(()=>(l(L)??l(A))?._i18n??bo),M=b(()=>l(N).defaultLocale),U=b(()=>l(A)?.name),H=b(()=>l(L)?.name),G=b(()=>r()&&l(A)?ws(l(A)):""),W=b(()=>r()&&l(A)?ws(l(A),{useSingular:!0}):""),Y=b(()=>n()?.canPreview??!0),R=b(()=>l(k)||i()),B=b(()=>Object.values(n()?.validities??{}).map(de=>Object.values(de).map(({valid:we})=>!we)).flat(1).filter(Boolean).length),J=b(()=>l(U)&&l(O)&&Io({collectionName:l(U),fileName:l(H)})?.entryRelative?ZL({entry:l(O),collectionName:l(U),fileName:l(H),relative:!0}):[]),Q=b(()=>l(A)&&l(O)?WC(l(O),l(M),l(A),l(L)):void 0),ee=()=>{oa(l(U)==="_singletons"?"/collections":`/collections/${l(U)}`)},te=async({skipCI:de=void 0}={})=>{if(K($,!0),!!l(A))try{const we=await $Q({skipCI:de});o()?.closeOnSave??!0?(ee(),Ye(Je,null)):(l(k)&&Wt(`/collections/${l(U)}/entries/${we.subPath}`,{replaceState:!0,notifyChange:!1,transitionType:"backwards"}),Qu({collection:l(A),collectionFile:l(L),originalEntry:we,expanderStates:n()?.expanderStates}))}catch(we){we.message==="validation_failed"?K(_,!0):we.message==="saving_failed"?(K(x,!0),K(E,we.cause?.message??we.message??s()("unexpected_error"),!0)):(K(x,!0),K(E,""),console.error(we))}finally{K($,!1)}};var re=IQ(),he=D(re);{let de=b(()=>s()("primary"));Ni(he,{variant:"primary",get"aria-label"(){return l(de)},children:(we,ve)=>{var fe=LQ(),_e=D(fe);{let Ge=b(()=>s()("cancel_editing"));bl(_e,{get"aria-label"(){return l(Ge)},get useShortcut(){return o().closeWithEscape},onclick:()=>{ee()}})}var Ce=z(_e,2),ze=F(Ce);Pr(ze,{children:(Ge,ut)=>{var Oe=X(),be=D(Oe);{var ye=Ve=>{var Qe=Fe();Z(Xe=>ne(Qe,Xe),[()=>s()("create_entry_title",{values:{name:l(W)}})]),S(Ve,Qe)},tt=Ve=>{const Qe=b(()=>l(L)?df(l(L)):l(A)&&l(O)&&r()?tu(l(A),l(O)):"");var Xe=X(),ht=D(Xe);{var Pt=en=>{var pt=Fe();Z(()=>ne(pt,l(Qe))),S(en,pt)},Qt=en=>{var pt=Fe();Z(kt=>ne(pt,kt),[()=>s()("edit_entry_title",{values:{collection:l(G),entry:l(Qe)}})]),S(en,pt)};q(ht,en=>{a()?en(Pt):en(Qt,!1)})}S(Ve,Xe)};q(be,Ve=>{l(k)?Ve(ye):Ve(tt,!1)})}S(Ge,Oe)},$$slots:{default:!0}});var Ne=z(Ce,2);{var Ae=Ge=>{{let ut=b(()=>s()("view_on_live_site"));et(Ge,{variant:"tertiary",get label(){return l(ut)},onclick:()=>{window.open(l(Q))}})}};q(Ne,Ge=>{!v()&&l(Q)&&Ge(Ae)})}var $e=z(Ne,2);{var je=Ge=>{m(Ge)};q($e,Ge=>{!a()&&!v()&&!l(L)&&!l(k)&&Ge(je)})}var Le=z($e,2);{const Ge=Oe=>{{let be=b(()=>s()("editor_options"));hr(Oe,{get"aria-label"(){return l(be)},children:(ye,tt)=>{var Ve=PQ(),Qe=D(Ve);{var Xe=pt=>{m(pt)};q(Qe,pt=>{a()&&!v()&&!l(L)&&!l(k)&&pt(Xe)})}var ht=z(Qe,2);{let pt=b(()=>s()("edit_slug")),kt=b(()=>!!l(L)||l(k)||l(T)||l(P)?.delete===!1);vt(ht,{get label(){return l(pt)},get disabled(){return l(kt)},onclick:()=>{K(y,!0)}})}var Pt=z(ht,2);{let pt=b(()=>s()("revert_all_changes")),kt=b(()=>!l(R));vt(Pt,{get label(){return l(pt)},get disabled(){return l(kt)},onclick:()=>{Jw()}})}var Qt=z(Pt,2);{var en=pt=>{var kt=AQ(),tn=D(kt);ri(tn,{});var $n=z(tn,2);{let Dt=b(()=>s()("show_preview")),bn=b(()=>u()?.showPreview),Et=b(()=>!l(Y));Yh($n,{get label(){return l(Dt)},get checked(){return l(bn)},get disabled(){return l(Et)},onChange:()=>{Ui.update((_n={})=>({..._n,showPreview:!_n.showPreview}))}})}var ai=z($n,2);{let Dt=b(()=>s()("sync_scrolling")),bn=b(()=>u()?.syncScrolling),Et=b(()=>!l(Y)&&Object.keys(n()?.currentValues??{}).length===1);Yh(ai,{get label(){return l(Dt)},get checked(){return l(bn)},get disabled(){return l(Et)},onChange:()=>{Ui.update((_n={})=>({..._n,syncScrolling:!_n.syncScrolling}))}})}S(pt,kt)};q(Qt,pt=>{a()||c()||pt(en)})}S(ye,Ve)},$$slots:{default:!0}})}};let ut=b(()=>s()("show_editor_options"));xt(Ur(Le,{get disabled(){return v()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ut)},popup:Ge,$$slots:{popup:!0}}),Oe=>K(C,Oe,!0),()=>l(C))}var Ie=z(Le,2);{var Re=Ge=>{{const ut=ye=>{hr(ye,{children:(tt,Ve)=>{{let Qe=b(()=>s()(f()?"save_and_publish":"save_without_publishing"));vt(tt,{get label(){return l(Qe)},onclick:()=>{te({skipCI:!f()})}})}},$$slots:{default:!0}})};let Oe=b(()=>s()(l($)?"saving":"save")),be=b(()=>v()||!l(R)||l($));fA(Ge,{variant:"primary",get label(){return l(Oe)},get disabled(){return l(be)},keyShortcuts:"Accel+S",onclick:()=>{te()},popup:ut,$$slots:{popup:!0}})}},nt=Ge=>{{let ut=b(()=>s()(l($)?"saving":"save")),Oe=b(()=>v()||!l(R)||l($));et(Ge,{variant:"primary",get label(){return l(ut)},get disabled(){return l(Oe)},keyShortcuts:"Accel+S",onclick:()=>{te()}})}};q(Ie,Ge=>{d()?Ge(Re):Ge(nt,!1)})}S(we,fe)},$$slots:{default:!0}})}var pe=z(he,2);Yn(pe,{get show(){return l(_)},set show(de){K(_,de,!0)},children:(de,we)=>{Mn(de,{status:"error",children:(ve,fe)=>{var _e=Fe();Z(Ce=>ne(_e,Ce),[()=>s()(l(B)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(B)}})]),S(ve,_e)},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=z(pe,2);Yn(ce,{get id(){return h().id},get show(){return h().show},set show(de){_t(Pv,Se(h).show=de,Se(h))},children:(de,we)=>{const ve=b(()=>{const{status:fe,message:_e,count:Ce,sourceLanguage:ze}=h();return{status:fe,message:_e,count:Ce,sourceLanguage:ze}});Mn(de,{get status(){return l(ve).status},children:(fe,_e)=>{var Ce=Fe();Z(ze=>ne(Ce,ze),[()=>s()(`editor.${l(ve).message}`,{values:{count:l(ve).count,source:l(ve).sourceLanguage?po(l(ve).sourceLanguage)??l(ve).sourceLanguage:""}})]),S(fe,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}});var ge=z(ce,2);pQ(ge,{get open(){return l(y)},set open(de){K(y,de,!0)}});var Pe=z(ge,2);{let de=b(()=>s()("delete_entry")),we=b(()=>s()("delete"));cu(Pe,{get title(){return l(de)},get okLabel(){return l(we)},onOk:async()=>{l(O)&&await YL([l(O)],l(J)),ee()},onClose:()=>{l(C)?.focus()},get open(){return l(w)},set open(ve){K(w,ve,!0)},children:(ve,fe)=>{var _e=Fe();Z(Ce=>ne(_e,Ce),[()=>s()(l(J).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),S(ve,_e)},$$slots:{default:!0}})}var xe=z(Pe,2);{let de=b(()=>s()("saving_entry.error.title"));sg(xe,{get title(){return l(de)},onClose:()=>{l(C)?.focus()},get open(){return l(x)},set open(we){K(x,we,!0)},children:(we,ve)=>{var fe=OQ(),_e=D(fe),Ce=z(_e);{var ze=Ne=>{var Ae=NQ(),$e=F(Ae);Z(()=>ne($e,l(E))),S(Ne,Ae)};q(Ce,Ne=>{l(E)&&Ne(ze)})}Z(Ne=>ne(_e,`${Ne??""} `),[()=>s()("saving_entry.error.description")]),S(we,fe)},$$slots:{default:!0}})}S(t,re),ae(),g()}var MQ=j('<div role="none"><!></div> <div role="none"><!></div>',1),FQ=j("<!> <!>",1),zQ=j("<!> <!>",1),jQ=j("<!> <!>",1),UQ=j('<div role="none" class="cols svelte-jrunrx"><!></div>'),BQ=j("<!> <!>",1),qQ=j('<div role="group" class="wrapper content-editor svelte-jrunrx"><!></div> <!> <!>',1);const VQ={hash:"svelte-jrunrx",code:`.wrapper.svelte-jrunrx {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[hidden].svelte-jrunrx {display:none;}.wrapper[inert].svelte-jrunrx {filter:opacity(0);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=edit] {flex:1 1;}.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div[data-mode=preview] {flex:2 1;}
|
|
654
654
|
@media (width < 768px) {.wrapper.svelte-jrunrx .cols:where(.svelte-jrunrx) > div {min-width:auto;}
|
|
655
|
-
}`};function HQ(t,e){se(e,!0),Ee(t,VQ);const n=()=>V(Je,"$entryDraft",f),r=()=>V(Ui,"$entryEditorSettings",f),i=()=>V(ya,"$editorFirstPane",f),o=()=>V(wo,"$editorSecondPane",f),s=()=>V(vn,"$isSmallScreen",f),a=()=>V(Yo,"$isMediumScreen",f),c=()=>V(xl,"$showContentOverlay",f),u=()=>V(ue,"$_",f),d=()=>V(Av,"$showDuplicateToast",f),[f,h]=me();let p=!1,g=ie(!0),m=ie(void 0),v=ie(void 0),_=ie(void 0);const y=b(()=>n()?.isNew??!0),w=b(()=>n()?.collection),x=b(()=>l(w)?._type==="entry"?l(w):void 0),E=b(()=>n()?.collectionFile),$=b(()=>r()??{}),C=b(()=>l($).showPreview),k=b(()=>(l(E)??l(w))?._i18n??bo),T=b(()=>l(k).i18nEnabled),A=b(()=>l(k).allLocales),P=b(()=>l(k).defaultLocale),L=b(()=>n()?.canPreview??!0),O=b(()=>l(E)?.name?[l(w)?.name,l(E).name].join("|"):l(w)?.name),N=b(()=>l(x)?.create??!1),M=b(()=>l(x)?.limit??1/0),U=b(()=>!Zp(l(w))),H=async()=>{const[te,re]=r()?.paneStates?.[l(O)??""]??[];return p||!te||!re||te.locale&&!l(A).includes(te.locale)||re.locale&&!l(A).includes(re.locale)||(!l(C)||!l(L))&&(te.mode==="preview"||re.mode==="preview")?!1:(p=!0,await Ma(),Ye(ya,te),Ye(wo,re),await Ma(),p=!1,(s()||a())&&Ye(wo,null),!0)},G=async()=>{if(n()&&!await H())if(Ye(ya,{mode:"edit",locale:i()?.locale??l(P)}),s()||a())Ye(wo,null);else if(!l(C)||!l(L)){const te=l(T)?l(A).filter(re=>re!==i()?.locale):[];Ye(wo,te.length?{mode:"edit",locale:te[0]}:null)}else Ye(wo,{mode:"preview",locale:i().locale})},W=()=>{!l(w)||p||!i()||!o()||!l(O)||Ui.update((te={})=>({...te,paneStates:{...te.paneStates,[l(O)]:[i(),o()]}}))},Y=async()=>{await Ma(),l(m)&&(l(m).tabIndex=0,l(m).focus())};Ut(()=>{l(m)?.addEventListener("transitionend",()=>{c()||(K(g,!0),Ye(Je,null))})}),Me(()=>{l(O)&&(Ye(ya,null),Ye(wo,null))}),Me(()=>{l(C),l(L),s(),a(),Se(()=>{G()})}),Me(()=>{i(),o(),W()}),Me(()=>{l(m)&&(c()?l(g)&&(K(g,!1),G(),Y(),Y7()):W7())});var R=qQ(),B=D(R),J=F(B);or(J,()=>n()?.id,te=>{var re=BQ(),he=D(re);{let Pe=b(()=>l(y)&&l(U));DQ(he,{get disabled(){return l(Pe)}})}var pe=z(he,2);{var ce=Pe=>{},ge=Pe=>{var xe=X(),de=D(xe);{var we=fe=>{nr(fe,{children:(_e,Ce)=>{var ze=MQ(),Ne=D(ze),Ae=F(Ne);{var $e=Re=>{var nt=Fe();Z(Ge=>ne(nt,Ge),[()=>u()("creating_entries_disabled_by_admin")]),S(Re,nt)},je=Re=>{var nt=Fe();Z(Ge=>ne(nt,Ge),[()=>u()("creating_entries_disabled_by_limit",{values:{limit:l(M)}})]),S(Re,nt)};q(Ae,Re=>{l(N)?Re(je,!1):Re($e)})}var Le=z(Ne,2),Ie=F(Le);et(Ie,{variant:"primary",onclick:()=>{Wt(`/collection/${l(w)?.name}`,{replaceState:!0,transitionType:"backwards"})},children:(Re,nt)=>{var Ge=Fe();Z(ut=>ne(Ge,ut),[()=>u()("back_to_collection")]),S(Re,Ge)},$$slots:{default:!0}}),S(_e,ze)},$$slots:{default:!0}})},ve=fe=>{var _e=UQ(),Ce=F(_e);{var ze=Ne=>{var Ae=jQ(),$e=D(Ae);{var je=Re=>{const nt=b(()=>{const{locale:Ge,mode:ut}=i()??{};return{locale:Ge,mode:ut}});{let Ge=b(()=>u()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:po(l(nt).locale)??l(nt).locale}}));zo(Re,{class:"pane",get"aria-label"(){return l(Ge)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,Oe)=>{var be=FQ(),ye=D(be);NS(ye,{id:"first-pane-header",get thisPane(){return ya},get thatPane(){return wo}});var tt=z(ye,2);PS(tt,{id:"first-pane-body",get thisPane(){return ya},get thisPaneContentArea(){return l(v)},set thisPaneContentArea(Ve){K(v,Ve,!0)},get thatPaneContentArea(){return l(_)},set thatPaneContentArea(Ve){K(_,Ve,!0)}}),S(ut,be)},$$slots:{default:!0}})}};q($e,Re=>{i()&&Re(je)})}var Le=z($e,2);{var Ie=Re=>{const nt=b(()=>{const{locale:Ge,mode:ut}=o()??{};return{locale:Ge,mode:ut}});{let Ge=b(()=>u()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:po(l(nt).locale)??l(nt).locale}}));zo(Re,{get"aria-label"(){return l(Ge)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,Oe)=>{var be=zQ(),ye=D(be);NS(ye,{id:"second-pane-header",get thisPane(){return wo},get thatPane(){return ya}});var tt=z(ye,2);PS(tt,{id:"second-pane-body",get thisPane(){return wo},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(Ve){K(_,Ve,!0)},get thatPaneContentArea(){return l(v)},set thatPaneContentArea(Ve){K(v,Ve,!0)}}),S(ut,be)},$$slots:{default:!0}})}};q(Le,Re=>{o()&&Re(Ie)})}S(Ne,Ae)};q(Ce,Ne=>{l(w)&&Ne(ze)})}S(fe,_e)};q(de,fe=>{l(y)&&l(U)?fe(we):fe(ve,!1)},!0)}S(Pe,xe)};q(pe,Pe=>{n()?Pe(ge,!1):Pe(ce)})}S(te,re)}),xt(B,te=>K(m,te),()=>l(m));var Q=z(B,2);X7(Q,{});var ee=z(Q,2);Yn(ee,{get show(){return y_(),d()},set show(te){Ye(Av,te)},children:(te,re)=>{Mn(te,{status:"success",children:(he,pe)=>{var ce=Fe();Z(ge=>ne(ce,ge),[()=>u()("entry_duplicated")]),S(he,ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),Z(te=>{Te(B,"hidden",l(g)),B.inert=!c(),Te(B,"aria-label",te)},[()=>u()("content_editor")]),S(t,R),ae(),h()}const QL=t=>{if(Array.isArray(t))return{options:t};if(Bt(t)){const{filters:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},KQ=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:o}}=e,{options:s}=QL(i),a=n.filter(({field:c,pattern:u})=>c!==void 0&&u!==void 0&&s.some(d=>d.field===c&&String(d.pattern)===String(u)));return t.filter(c=>a.every(({field:u,pattern:d})=>{const f={entry:c,locale:o,collectionName:r,key:u},h=Td({...f,resolveRef:!1}),p=Td({...f}),g=ou(d);return h===void 0||p===void 0?!1:g?g.test(String(h))||g.test(String(p)):h===d||p===d}))},GQ=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=QL(t.view_filters);e(n),Jr.update(i=>({...i,filters:i.filters??(r?[r]:void 0)}))},WQ=un([Wn],([t],e)=>{GQ(t,e)}),YQ=t=>{if(Array.isArray(t))return{options:t};if(Bt(t)){const{groups:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},JQ=(t,e,n)=>{const{field:r,pattern:i}=n??{field:"",pattern:void 0};if(!r)return t.length?[{name:"*",entries:t}]:[];const{name:o,_i18n:{defaultLocale:s}}=e,a=oe(Jr).sort,c=ou(i),u={},d=oe(ue)("other");t.forEach(h=>{const p=Td({entry:h,locale:s,collectionName:o,key:r}),g=p===void 0?d:c?String(p).match(c)?.[0]??d:String(p);g in u||(u[g]=[]),u[g].push(h)});const f=Object.entries(u).map(([h,p])=>({name:h,entries:p})).sort(({name:h},{name:p})=>Ci(h,p));return a?.key===r&&a.order==="descending"&&f.reverse(),f},XQ=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=YQ(t.view_groups);e(n),Jr.update(i=>({...i,group:i.group===void 0?r:i.group}))},ZQ=un([Wn],([t],e)=>{XQ(t,e)}),cc=ot(),QQ=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new fo(e,"ui-settings"):null,r="contents-view";cc.set(await n?.get(r)??{}),cc.subscribe(i=>{(async()=>{try{pn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),Jr.subscribe(i=>{const{name:o}=oe(Wn)??{},s=oe(cc)?.[o??""]??{};o&&!pn(i,s)&&cc.update(a=>({...a,[o]:i}))})};Tn.subscribe(t=>{t&&!oe(cc)&&QQ(t)});const RS=["title","name","date","author","description"],o_={slug:String,commit_author:String,commit_date:Date},eN=Object.keys(o_),DS=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),eee=t=>{if(DS(t))return{keys:t};if(Bt(t)){const{fields:e,default:n}=t;return DS(e)?Bt(n)?{keys:e,defaultKey:n.field,defaultOrder:["descending","Descending"].includes(n.direction??"")?"descending":"ascending"}:{keys:e}:{keys:[]}}return{keys:[]}},tee=t=>{if(t){const e=RS.filter(n=>n!==t);return{keys:[t,...e],defaultKey:t}}return{keys:[...RS]}},nee=({collection:t,isCommitAuthorAvailable:e,isCommitDateAvailable:n})=>{const{name:r,identifier_field:i,sortable_fields:o}=t;let{keys:s,defaultKey:a,defaultOrder:c}=o?eee(o):tee(i);const u=s.includes("commit_author"),d=s.includes("commit_date");return e?!s.includes("author")&&!u&&s.push("commit_author"):u&&(s=s.filter(f=>f!=="commit_author")),n?!s.includes("date")&&!d&&s.push("commit_date"):d&&(s=s.filter(f=>f!=="commit_date")),s=Pc(s).filter(f=>!!f&&(eN.includes(f)||!!mn({collectionName:r,keyPath:f}))),a=a&&s.includes(a)?a:s[0],c??=a?"ascending":void 0,{keys:s,default:{key:a,order:c}}},ree=({key:t,fieldConfig:e})=>{if(t in o_)return o_[t];if(e?.widget==="boolean")return Boolean;if(e?.widget==="number"){const{value_type:n="int"}=e;if(n==="int"||n==="float")return Number}return String},iee=({collection:t,key:e})=>[...eN,"name"].includes(e)?oe(ue)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const o=i.slice(0,r+1).join(".");return mn({collectionName:t.name,keyPath:o})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,oee=un([Wn,Ai,qt],([t,e],n)=>{if(!t||!("folder"in t)){n([]);return}const r=oe(cc)?.[t.name]??{type:"list"},{keys:i,default:o}=nee({collection:t,isCommitAuthorAvailable:e.some(s=>!!s.commitAuthor),isCommitDateAvailable:e.some(s=>!!s.commitDate)});r.sort??=o,n(i.map(s=>({key:s,label:iee({collection:t,key:s})}))),pn(r,oe(Jr))||Jr.set(r)}),MS=t=>{let e=t,n=!0;for(;n;){const r=e;e=e.replaceAll(/([_*`~])([^_*`~]+)\1/g,"$2"),e=e.replaceAll(/([_*`~]{2,})(.+?)\1/g,"$2"),n=e!==r}return e},see=["title","summary","description"],aee=(t,e,{key:n,order:r}={})=>{const i=[...t];if(n===void 0)return i;const{name:o,_i18n:{defaultLocale:s}}=e,a=mn({collectionName:o,keyPath:n}),c=ree({key:n,fieldConfig:a}),u=Object.fromEntries(i.map(p=>[p.slug,Td({entry:p,locale:s,collectionName:o,key:n})])),d=a?.widget==="datetime"?a:void 0,f=a?.widget==="markdown"||see.includes(n);i.sort((p,g)=>{const m=u[p.slug],v=u[g.slug];if(d){const _=m?Lc(m,d):void 0,y=v?Lc(v,d):void 0;return Number(_??0)-Number(y??0)}if(c===String){const _=m?String(m):"",y=v?String(v):"";return f?Ci(MS(_),MS(y)):Ci(_,y)}return Number(m??0)-Number(v??0)}),r==="descending"&&i.reverse();const h=_i(e)?.name;if(h){const p=i.findIndex(g=>g.slug===h);p>-1&&i.unshift(i.splice(p,1)[0])}return i},Jr=ot({type:"list"}),ba=un([Ai,Wn],([t,e],n)=>{n(t&&e?Wo(e.name):[])});let FS="";const Xw=un([ba,Jr,qt],([t,e],n)=>{const r=JSON.stringify({_listedEntries:t,_currentView:e});if(r===FS)return;FS=r,n([]);const i=oe(Wn);let o=[...t];if(!o.length||ha(i,o[0]).length)return;e.sort&&(o=aee(o,i,e.sort)),e.filters&&(o=KQ(o,i,e.filters));const s=JQ(o,i,e.group);pn(oe(Xw),s)||n(s)});ba.subscribe(t=>{Ic.set([]),oe(ft).devModeEnabled&&console.info("listedEntries",t)});Wn.subscribe(t=>{t&&oe(ft).devModeEnabled&&console.info("selectedCollection",t)});var lee=j("<!> <!>",1),cee=j('<div role="none" class="label svelte-cy8v6x"><!></div>'),uee=j("<!> <!> <!>",1);const dee={hash:"svelte-cy8v6x",code:".label.svelte-cy8v6x .icon.home {opacity:0.5;font-size:20px;vertical-align:-4px;}"};function fee(t,e){se(e,!0),Ee(t,dee);const n=()=>V(ba,"$listedEntries",a),r=()=>V(vn,"$isSmallScreen",a),i=()=>V(Yo,"$isMediumScreen",a),o=()=>V(Ic,"$selectedEntries",a),s=()=>V(qt,"$appLocale",a),[a,c]=me(),u=d=>{Ic.update(f=>{const h=f.indexOf(e.entry);return d&&h===-1&&f.push(e.entry),!d&&h>-1&&f.splice(h,1),f})};{let d=b(()=>n().indexOf(e.entry));gf(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onclick:()=>{Wt(`/collections/${e.collection.name}/entries/${e.entry.subPath}`,{transitionType:"forwards"})},children:(f,h)=>{var p=uee(),g=D(p);{var m=w=>{Ti(w,{class:"checkbox",children:(x,E)=>{{let $=b(()=>o().includes(e.entry));pf(x,{role:"none",tabindex:"-1",get checked(){return l($)},onChange:({detail:{checked:C}})=>{u(C)}})}},$$slots:{default:!0}})};q(g,w=>{r()||i()||w(m)})}var v=z(g,2);{var _=w=>{Ti(w,{class:"image",children:(x,E)=>{var $=X(),C=D($);kn(C,()=>XL(e.collection,e.entry),null,(k,T)=>{var A=X(),P=D(A);{var L=O=>{{let N=b(()=>e.viewType==="list"?"icon":"tile");$g(O,{get src(){return l(T)},get variant(){return l(N)},cover:!0})}};q(P,O=>{l(T)&&O(L)})}S(k,A)}),S(x,$)},$$slots:{default:!0}})};q(v,w=>{e.collection._thumbnailFieldNames.length&&w(_)})}var y=z(v,2);Ti(y,{class:"title",children:(w,x)=>{var E=cee(),$=F(E);Pr($,{lines:2,children:(C,k)=>{var T=lee(),A=D(T);or(A,s,O=>{var N=X(),M=D(N);cr(M,()=>tu(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),S(O,N)});var P=z(A,2);{var L=O=>{{let N=b(()=>_i(e.collection)?.icon);Ze(O,{get name(){return l(N)},class:"home"})}};q(P,O=>{Go(e.collection,e.entry)&&O(L)})}S(C,T)},$$slots:{default:!0}}),S(w,E)},$$slots:{default:!0}}),S(f,p)},$$slots:{default:!0}})}ae(),c()}var hee=j("<!> <!>",1);function tN(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",s),r=()=>V(Ai,"$allEntries",s),i=()=>V(qt,"$appLocale",s),o=()=>V(ue,"$_",s),[s,a]=me();let c=I(e,"label",3,void 0),u=I(e,"keyShortcuts",3,void 0);const d=b(()=>!Zp(n())),f=b(()=>r()&&n()?iF(n()):!1),h=b(()=>i()&&n()?_i(n())?.label:""),p=b(()=>l(f)?fA:et),g=(_=!1)=>{Wt(`/collections/${e.collectionName}/new`,{state:{index:_},transitionType:"forwards"})};var m=X(),v=D(m);{const _=E=>{Ze(E,{name:"edit"})},y=E=>{var $=X(),C=D($);{var k=T=>{hr(T,{children:(A,P)=>{var L=hee(),O=D(L);{let M=b(()=>o()("entry"));vt(O,{get label(){return l(M)},onclick:()=>g()})}var N=z(O,2);vt(N,{get label(){return l(h)},onclick:()=>g(!0)}),S(A,L)},$$slots:{default:!0}})};q(C,T=>{l(f)&&T(k)})}S(E,$)};let w=b(()=>!c()),x=b(()=>o()("create_new_entry"));ur(v,()=>l(p),(E,$)=>{$(E,{variant:"primary",get iconic(){return l(w)},get disabled(){return l(d)},get label(){return c()},get"aria-label"(){return l(x)},get keyShortcuts(){return u()},onclick:()=>g(),startIcon:_,popup:y,$$slots:{startIcon:!0,popup:!0}})})}S(t,m),ae(),a()}var pee=j('<span role="none"> </span>'),gee=j('<span role="none"> </span> <!>',1),mee=j('<span role="none"> </span>');function vee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",a),r=()=>V(Jr,"$currentView",a),i=()=>V(Xw,"$entryGroups",a),o=()=>V(ue,"$_",a),s=()=>V(ba,"$listedEntries",a),[a,c]=me(),u=b(n),d=b(()=>r().type),f=b(()=>i().map(({entries:h})=>h).flat(1));{let h=b(()=>o()("entry_list"));Rw(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=X(),v=D(m);{var _=w=>{var x=X(),E=D(x);{var $=k=>{const T=b(()=>{const{defaultLocale:A}=l(u)._i18n;return{defaultLocale:A}});{let A=b(()=>o()("entries"));$f(k,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(A)},get"aria-rowcount"(){return s().length},children:(P,L)=>{var O=X(),N=D(O);it(N,1,i,({name:M,entries:U})=>M,(M,U)=>{let H=()=>l(U).name,G=()=>l(U).entries;var W=X(),Y=D(W);kn(Y,Nt,null,R=>{{let B=b(()=>H()!=="*"?H():void 0);pA(R,{get label(){return l(B)},children:(J,Q)=>{{const ee=(re,he=qe)=>{var pe=X(),ce=D(pe);kn(ce,Nt,null,ge=>{fee(ge,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})}),S(re,pe)};let te=b(()=>G().filter(({locales:re})=>!!(re[l(T).defaultLocale]??Object.values(re)[0])?.content));Cl(J,{get items(){return l(te)},itemKey:"id",renderItem:ee,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})}}),S(M,W)}),S(P,O)},$$slots:{default:!0}})}},C=k=>{var T=X(),A=D(T);{var P=O=>{nr(O,{children:(N,M)=>{var U=pee(),H=F(U);Z(G=>ne(H,G),[()=>o()("no_entries_found")]),S(N,U)},$$slots:{default:!0}})},L=O=>{nr(O,{children:(N,M)=>{var U=gee(),H=D(U),G=F(H),W=z(H,2);{let Y=b(()=>o()("create_new_entry"));tN(W,{get collectionName(){return l(u).name},get label(){return l(Y)}})}Z(Y=>ne(G,Y),[()=>o()("no_entries_created")]),S(N,U)},$$slots:{default:!0}})};q(A,O=>{s().length?O(P):O(L,!1)},!0)}S(k,T)};q(E,k=>{l(f).length?k($):k(C,!1)})}S(w,x)},y=w=>{nr(w,{children:(x,E)=>{var $=mee(),C=F($);Z(k=>ne(C,k),[()=>o()("collection_not_found")]),S(x,$)},$$slots:{default:!0}})};q(v,w=>{l(u)?w(_):w(y,!1)})}S(p,m)},$$slots:{default:!0}})}ae(),c()}var bee=j('<div role="none" class="label svelte-1nfjp1"><!> <!></div>'),_ee=j('<span role="none"> </span>');const yee={hash:"svelte-1nfjp1",code:".label.svelte-1nfjp1 {display:flex;align-items:center;gap:16px;}.label.svelte-1nfjp1 .icon {display:flex;align-items:center;justify-content:center;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);}"};function wee(t,e){se(e,!0),Ee(t,yee);const n=()=>V(Wn,"$selectedCollection",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=b(()=>n()?.files.filter(eg)??[]);{let a=b(()=>r()("file_list"));Rw(t,{get"aria-label"(){return l(a)},children:(c,u)=>{var d=X(),f=D(d);{var h=g=>{{let m=b(()=>r()("files"));$f(g,{viewType:"list",get"aria-label"(){return l(m)},get"aria-rowcount"(){return l(s).length},children:(v,_)=>{Cl(v,{get items(){return l(s)},itemKey:"name",renderItem:(w,x)=>{let E=()=>x?.().name,$=()=>x?.().label,C=()=>x?.().icon;var k=X(),T=D(k);kn(T,Nt,null,A=>{gf(A,{onclick:()=>{Wt(`/collections/${n()?.name}/entries/${E()}`,{transitionType:"forwards"})},children:(P,L)=>{Ti(P,{class:"title",children:(O,N)=>{var M=bee(),U=F(M);{var H=W=>{Ze(W,{get name(){return C()}})};q(U,W=>{C()&&W(H)})}var G=z(U,2);Pr(G,{lines:2,children:(W,Y)=>{var R=Fe();Z(()=>ne(R,$()||E())),S(W,R)},$$slots:{default:!0}}),S(O,M)},$$slots:{default:!0}})},$$slots:{default:!0}})}),S(w,k)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}},p=g=>{nr(g,{children:(m,v)=>{var _=_ee(),y=F(_);Z(w=>ne(y,w),[()=>r()("no_files_in_collection")]),S(m,_)},$$slots:{default:!0}})};q(f,g=>{l(s)?.length?g(h):g(p,!1)})}S(c,d)},$$slots:{default:!0}})}ae(),o()}var xee=j('<div class="wrapper svelte-w0jevb"><!></div>');const kee={hash:"svelte-w0jevb",code:".wrapper.svelte-w0jevb {display:contents;}"};function See(t,e){se(e,!0),Ee(t,kee);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>e.file.name),s=b(()=>e.file.label),a=b(()=>e.file.icon);let c=ie(!1),u=ie(void 0);var d=xee(),f=F(d);{const h=g=>{{let m=b(()=>l(a)||"edit_document");Ze(g,{get name(){return l(m)}})}};let p=b(()=>l(s)||l(o));Tr(f,{get label(){return l(p)},onSelect:()=>{Ye(fi,n()("singleton_selected_announcement",{values:{file:l(s)||l(o)}}))},onclick:()=>{Wt(`/collections/_singletons/entries/${l(o)}`,{transitionType:"forwards"}),K(c,!1),l(u)?.querySelector('[role="option"]')?.classList.remove("focused")},get selected(){return l(c)},set selected(g){K(c,g,!0)},startIcon:h,$$slots:{startIcon:!0}})}xt(d,h=>K(u,h),()=>l(u)),S(t,d),ae(),i()}var Eee=j("<!> <!>",1);function nN(t,e){se(e,!0);const n=()=>V(ft,"$prefs",c),r=()=>V(Tn,"$backend",c),i=()=>V(Gh,"$isLastCommitPublished",c),o=()=>V(Nw,"$skipCIConfigured",c),s=()=>V(vn,"$isSmallScreen",c),a=()=>V(ue,"$_",c),[c,u]=me(),d=b(()=>n().deployHookURL),f=b(()=>n().deployHookAuthHeader),h=b(()=>r()?.triggerDeployment),p=b(()=>(!!l(d)||typeof l(h)=="function")&&!i());let g=ie("info"),m=ie(!1);const v=async()=>{K(g,"info"),K(m,!0);try{const{ok:x,status:E}=l(d)?await fetch(l(d),{method:"POST",mode:l(f)?"cors":"no-cors",headers:l(f)?{Authorization:l(f)}:{}}):await l(h)?.()??{};if(!x&&(l(f)||E!==0))throw new Error(`Webhook returned ${E} error`);Ye(Gh,!0)}catch(x){K(g,"error"),K(m,!0),console.error(x)}};var _=X(),y=D(_);{var w=x=>{var E=Eee(),$=D(E);{let k=b(()=>s()?"small":"medium"),T=b(()=>a()("publish_changes")),A=b(()=>!l(p));et($,{variant:"secondary",get size(){return l(k)},get label(){return l(T)},get disabled(){return l(A)},onclick:()=>v()})}var C=z($,2);Yn(C,{get show(){return l(m)},set show(k){K(m,k,!0)},children:(k,T)=>{Mn(k,{get status(){return l(g)},children:(A,P)=>{var L=Fe();Z(O=>ne(L,O),[()=>a()(l(g)==="error"?"publishing_changes_failed":"publishing_changes")]),S(A,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(x,E)};q(y,x=>{o()&&x(w)})}S(t,_),ae(),u()}var Tee=j("<header><h2> </h2> <!></header> <!>",1),$ee=j('<span class="count"> </span>'),Cee=j('<span class="count"> </span>'),Aee=j("<!> <!>",1),Pee=j('<div role="none" class="primary-sidebar"><!> <!></div>');function Lee(t,e){se(e,!0);const n=()=>V(qt,"$appLocale",c),r=()=>V(Ct,"$cmsConfig",c),i=()=>V(vn,"$isSmallScreen",c),o=()=>V(ue,"$_",c),s=()=>V(Wn,"$selectedCollection",c),a=()=>V(Ai,"$allEntries",c),[c,u]=me(),d=b(()=>Intl.NumberFormat(n()??void 0)),f=b(()=>r()?.collections?.filter(({hide:_})=>!_)??[]),h=b(()=>r()?.singletons??[]);var p=Pee(),g=F(p);{var m=_=>{var y=Tee(),w=D(y),x=F(w),E=F(x),$=z(x,2);nN($,{});var C=z(w,2);Cg(C,{onclick:k=>{k.preventDefault(),Wt("/search")}}),Z(k=>ne(E,k),[()=>o()("contents")]),S(_,y)};q(g,_=>{i()&&_(m)})}var v=z(g,2);{let _=b(()=>o()("collection_list"));uu(v,{get"aria-label"(){return l(_)},"aria-controls":"collection-container",children:(y,w)=>{var x=Aee(),E=D(x);{var $=T=>{{let A=b(()=>o()("collections"));za(T,{get label(){return l(A)},children:(P,L)=>{var O=X(),N=D(O);it(N,19,()=>l(f),(M,U)=>M.name??U,(M,U)=>{var H=X(),G=D(H);kn(G,Nt,null,W=>{var Y=X(),R=D(Y);{var B=Q=>{const ee=b(()=>{const{name:te,label:re,icon:he}=l(U);return{name:te,label:re,icon:he}});{const te=ce=>{{let ge=b(()=>l(ee).icon||"bookmark_manager");Ze(ce,{get name(){return l(ge)}})}},re=ce=>{var ge=X(),Pe=D(ge);or(Pe,a,xe=>{const de=b(()=>("files"in l(U)?l(U).files:Wo(l(ee).name)).length);var we=$ee(),ve=F(we);Z((fe,_e)=>{Te(we,"aria-label",`(${fe??""})`),ne(ve,_e)},[()=>o()(l(de)>1?"many_entries":l(de)===1?"one_entry":"no_entries",{values:{count:l(de)}}),()=>l(d).format(l(de))]),S(xe,we)}),S(ce,ge)};let he=b(()=>l(ee).label||l(ee).name),pe=b(()=>i()?!1:s()?.name===l(ee).name);Tr(Q,{get label(){return l(he)},get selected(){return l(pe)},onSelect:()=>{Wt(`/collections/${l(ee).name}`,{transitionType:"forwards"})},startIcon:te,endIcon:re,$$slots:{startIcon:!0,endIcon:!0}})}},J=Q=>{var ee=X(),te=D(ee);{var re=he=>{ri(he,{})};q(te,he=>{l(U).divider&&he(re)},!0)}S(Q,ee)};q(R,Q=>{"divider"in l(U)?Q(J,!1):Q(B)})}S(W,Y)}),S(M,H)}),S(P,O)},$$slots:{default:!0}})}};q(E,T=>{l(f).length&&T($)})}var C=z(E,2);{var k=T=>{var A=X(),P=D(A);{var L=N=>{{let M=b(()=>o()("files"));za(N,{get label(){return l(M)},children:(U,H)=>{var G=X(),W=D(G);it(W,19,()=>l(h),(Y,R)=>Y.name??R,(Y,R)=>{var B=X(),J=D(B);kn(J,Nt,null,Q=>{var ee=X(),te=D(ee);{var re=pe=>{See(pe,{get file(){return l(R)}})},he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{ri(xe,{})};q(ge,xe=>{l(R).divider&&xe(Pe)},!0)}S(pe,ce)};q(te,pe=>{"divider"in l(R)?pe(he,!1):pe(re)})}S(Q,ee)}),S(Y,B)}),S(U,G)},$$slots:{default:!0}})}},O=N=>{const M=b(()=>l(h).length);{let U=b(()=>o()("collections"));za(N,{get label(){return l(U)},children:(H,G)=>{{const W=J=>{Ze(J,{name:"bookmark_manager"})},Y=J=>{var Q=Cee(),ee=F(Q);Z((te,re)=>{Te(Q,"aria-label",`(${te??""})`),ne(ee,re)},[()=>o()(l(M)>1?"many_entries":l(M)===1?"one_entry":"no_entries",{values:{count:l(M)}}),()=>l(d).format(l(M))]),S(J,Q)};let R=b(()=>o()("files")),B=b(()=>s()?.name==="_singletons");Tr(H,{get label(){return l(R)},get selected(){return l(B)},onSelect:()=>{Wt("/collections/_singletons",{transitionType:"forwards"})},startIcon:W,endIcon:Y,$$slots:{startIcon:!0,endIcon:!0}})}},$$slots:{default:!0}})}};q(P,N=>{i()||l(f).length?N(L):N(O,!1)})}S(T,A)};q(C,T=>{l(h).length&&T(k)})}S(y,x)},$$slots:{default:!0}})}S(t,p),ae(),u()}function Nee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",s),r=()=>V(Ic,"$selectedEntries",s),i=()=>V(ue,"$_",s),o=()=>V(ba,"$listedEntries",s),[s,a]=me();let c=I(e,"open",15,!1);const u=b(()=>{const d=n()?.name;return r().length&&d&&Io({collectionName:d})?.entryRelative?r().map(f=>ZL({entry:f,collectionName:d,relative:!0})).flat(1):[]});{let d=b(()=>r().length===1?i()("delete_entry"):i()("delete_entries")),f=b(()=>i()("delete"));cu(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{YL(r(),l(u))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=X(),m=D(g);{var v=y=>{var w=Fe();Z(x=>ne(w,x),[()=>i()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),S(y,w)},_=y=>{var w=X(),x=D(w);{var E=C=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),S(C,k)},$=C=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:r().length}})]),S(C,k)};q(x,C=>{r().length===o().length?C(E):C($,!1)},!0)}S(y,w)};q(m,y=>{r().length===1?y(v):y(_,!1)})}S(h,g)},$$slots:{default:!0}})}ae(),a()}var Oee=j('<div role="none" class="description svelte-83jnuc"><!></div>'),Iee=j("<!> <!>",1),Ree=j('<!> <h2 role="none" class="svelte-83jnuc"> </h2> <!> <!>',1),Dee=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),Mee=j("<!> <!>",1),Fee=j("<!> <!>",1);const zee={hash:"svelte-83jnuc",code:"h2.svelte-83jnuc {flex:none !important;}.description.svelte-83jnuc {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;}"};function jee(t,e){se(e,!0),Ee(t,zee);const n=()=>V(Wn,"$selectedCollection",c),r=()=>V(qt,"$appLocale",c),i=()=>V(ue,"$_",c),o=()=>V(vn,"$isSmallScreen",c),s=()=>V(Ic,"$selectedEntries",c),a=()=>V(ba,"$listedEntries",c),[c,u]=me();let d=ie(!1);const f=T=>jr.sanitize(jt.parseInline(T),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),h=b(()=>n()?.name??""),p=b(()=>n()?.description),g=b(()=>!Zp(n())),m=b(()=>r()&&n()?ws(n()):l(h)),v=b(()=>{const T=n();return T?._type==="entry"?{isEntryCollection:!0,canCreate:T.create??!1,canDelete:T.delete??!0,limit:T.limit??1/0}:{isEntryCollection:!1,canCreate:!1,canDelete:!1,limit:1/0}}),_=b(()=>l(v).isEntryCollection),y=b(()=>l(v).canCreate),w=b(()=>l(v).canDelete),x=b(()=>l(v).limit);var E=Fee(),$=D(E);{var C=T=>{var A=Mee(),P=D(A);{let N=b(()=>i()("collection"));Ni(P,{variant:"primary",get"aria-label"(){return l(N)},children:(M,U)=>{var H=Ree(),G=D(H);{var W=re=>{{let he=b(()=>i()("back_to_collection_list"));bl(re,{get"aria-label"(){return l(he)},onclick:()=>{oa("/collections")}})}};q(G,re=>{o()&&re(W)})}var Y=z(G,2),R=F(Y),B=z(Y,2);{var J=re=>{ii(re,{flex:!0})},Q=re=>{var he=Oee(),pe=F(he);Pr(pe,{children:(ce,ge)=>{var Pe=X(),xe=D(Pe);cr(xe,()=>f(l(p)||"")),S(ce,Pe)},$$slots:{default:!0}}),S(re,he)};q(B,re=>{o()?re(J):re(Q,!1)})}var ee=z(B,2);{var te=re=>{var he=Iee(),pe=D(he);{var ce=Pe=>{{let xe=b(()=>i()("delete")),de=b(()=>s().length===1?i()("delete_selected_entry"):i()("delete_selected_entries")),we=b(()=>!s().length||!l(w));et(Pe,{variant:"ghost",get label(){return l(xe)},get"aria-label"(){return l(de)},get disabled(){return l(we)},onclick:()=>{K(d,!0)}})}};q(pe,Pe=>{o()||Pe(ce)})}var ge=z(pe,2);uA(ge,{children:(Pe,xe)=>{var de=X(),we=D(de);{var ve=fe=>{{let _e=b(()=>o()?void 0:i()("create"));tN(fe,{get collectionName(){return l(h)},get label(){return l(_e)},keyShortcuts:"Accel+E"})}};q(we,fe=>{(!o()||a().length&&!l(g))&&fe(ve)})}S(Pe,de)},$$slots:{default:!0}}),S(re,he)};q(ee,re=>{l(_)&&re(te)})}Z(()=>ne(R,l(m))),S(M,H)},$$slots:{default:!0}})}var L=z(P,2);{var O=N=>{var M=Dee(),U=D(M);Gc(U,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),ig(U.lastChild,{dismissible:!1,children:(H,G)=>{var W=X(),Y=D(W);{var R=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_admin")]),S(J,Q)},B=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_limit",{values:{limit:l(x)}})]),S(J,Q)};q(Y,J=>{l(y)?J(B,!1):J(R)})}S(H,W)},$$slots:{default:!0}}),S(N,M)};q(L,N=>{l(_)&&l(g)&&N(O)})}S(T,A)};q($,T=>{n()&&T(C)})}var k=z($,2);Nee(k,{get open(){return l(d)},set open(T){K(d,T,!0)}}),S(t,E),ae(),u()}function Uee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",a),r=()=>V(Ef,"$isLargeScreen",a),i=()=>V(Jr,"$currentView",a),o=()=>V(ue,"$_",a),s=()=>V(Bn,"$allAssets",a),[a,c]=me(),u=b(()=>Io({collectionName:n()?.name})),d=b(()=>l(u)??{internalPath:void 0,entryRelative:!1,hasTemplateTags:!1}),f=b(()=>l(d).internalPath),h=b(()=>l(d).entryRelative),p=b(()=>l(d).hasTemplateTags),g=b(()=>l(h)||l(p));var m=X(),v=D(m);{var _=y=>{{let w=b(()=>o()("collection_assets"));zo(y,{id:"collection-assets",class:"secondary-sidebar",get"aria-label"(){return l(w)},children:(x,E)=>{ku(x,{get disabled(){return l(g)},multiple:!0,onDrop:({files:$})=>{Ye(no,{folder:l(u),files:$})},children:($,C)=>{{let k=b(()=>s().filter(T=>pn(T.folder,l(u))));xL($,{get assets(){return l(k)},onSelect:({asset:T})=>{Wt(`/assets/${T.path}`,{transitionType:"forwards"})}})}},$$slots:{default:!0}})},$$slots:{default:!0}})}};q(v,y=>{l(f)!==void 0&&r()&&i().showMedia&&y(_)})}S(t,m),ae(),c()}var Bee=j("<!> <!>",1);function qee(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(e.currentView,"$currentView",i),[i,o]=me();let s=I(e,"label",3,""),a=I(e,"disabled",3,!1),c=I(e,"noneLabel",3,""),u=I(e,"groups",19,()=>[]);{const d=h=>{{let p=b(()=>n()("grouping_options"));hr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=Bee(),_=D(v);{let w=b(()=>c()||n()("sort_keys.none")),x=b(()=>!r().group);Ld(_,{get label(){return l(w)},get checked(){return l(x)},onSelect:()=>{e.currentView.update(E=>({...E,group:null}))}})}var y=z(_,2);it(y,17,u,dr,(w,x)=>{let E=()=>l(x).label,$=()=>l(x).field,C=()=>l(x).pattern;{let k=b(()=>r().group?.field===$()&&String(r().group.pattern)===String(C()));Ld(w,{get label(){return E()},get checked(){return l(k)},onSelect:()=>{e.currentView.update(T=>({...T,group:{field:$(),pattern:C()}}))}})}}),S(g,v)},$$slots:{default:!0}})}};let f=b(()=>s()||n()("group"));Ur(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:d,$$slots:{popup:!0}})}ae(),o()}var Vee=j("<!> <!>",1),Hee=j("<!> <!> <!> <!> <!> <!> <!>",1);function Kee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",h),r=()=>V(ba,"$listedEntries",h),i=()=>V(ue,"$_",h),o=()=>V(vn,"$isSmallScreen",h),s=()=>V(Yo,"$isMediumScreen",h),a=()=>V(Xw,"$entryGroups",h),c=()=>V(oee,"$sortKeys",h),u=()=>V(WQ,"$viewFilters",h),d=()=>V(ZQ,"$viewGroups",h),f=()=>V(Jr,"$currentView",h),[h,p]=me(),g=b(()=>n()?._type==="entry"?n():void 0),m=b(()=>l(g)?.name),v=b(()=>l(g)?._thumbnailFieldNames??[]),_=b(()=>!!r().length),y=b(()=>r().length>1);var w=X(),x=D(w);{var E=$=>{{let C=b(()=>i()("entry_list"));Ni($,{variant:"secondary",get"aria-label"(){return l(C)},children:(k,T)=>{var A=Hee(),P=D(A);{var L=J=>{{let Q=b(()=>a().map(({entries:ee})=>ee).flat(1));QP(J,{get allItems(){return l(Q)},get selectedItems(){return Ic}})}};q(P,J=>{o()||s()||J(L)})}var O=z(P,2);ii(O,{flex:!0});var N=z(O,2);{let J=b(()=>!l(y)||!c().length);eL(N,{get disabled(){return l(J)},get currentView(){return Jr},get sortKeys(){return c()},get collectionName(){return l(m)},"aria-controls":"entry-list"})}var M=z(N,2);{var U=J=>{{let Q=b(()=>!l(y));ZP(J,{get disabled(){return l(Q)},get currentView(){return Jr},get filters(){return u()},multiple:!0,"aria-controls":"entry-list"})}};q(M,J=>{u()?.length&&J(U)})}var H=z(M,2);{var G=J=>{{let Q=b(()=>!l(y));qee(J,{get disabled(){return l(Q)},get currentView(){return Jr},get groups(){return d()},"aria-controls":"entry-list"})}};q(H,J=>{d()?.length&&J(G)})}var W=z(H,2);{var Y=J=>{{let Q=b(()=>!l(_));Dw(J,{get disabled(){return l(Q)},get currentView(){return Jr},"aria-controls":"entry-list"})}};q(W,J=>{l(v).length&&J(Y)})}var R=z(W,2);{var B=J=>{var Q=Vee(),ee=D(Q);ri(ee,{orientation:"vertical"});var te=z(ee,2);{const re=ge=>{Ze(ge,{name:"photo_library"})};let he=b(()=>!l(_)||!Io({collectionName:l(m)})),pe=b(()=>!!f().showMedia),ce=b(()=>i()(f().showMedia?"hide_assets":"show_assets"));et(te,{variant:"ghost",iconic:!0,get disabled(){return l(he)},get pressed(){return l(pe)},"aria-controls":"collection-assets",get"aria-expanded"(){return f().showMedia},get"aria-label"(){return l(ce)},onclick:()=>{Jr.update(ge=>({...ge,showMedia:!f().showMedia}))},startIcon:re,$$slots:{startIcon:!0}})}S(J,Q)};q(R,J=>{o()||s()||J(B)})}S(k,A)},$$slots:{default:!0}})}};q(x,$=>{l(g)&&$(E)})}S(t,w),ae(),p()}var Gee=j("<!> <!> <!> <!>",1);function Wee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",c),r=()=>V(vn,"$isSmallScreen",c),i=()=>V(ue,"$_",c),o=()=>V(ba,"$listedEntries",c),s=()=>V(qt,"$appLocale",c),a=()=>V(md,"$contentUpdatesToast",c),[c,u]=me(),d=/^\/collections(?:\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?)?$/;let f=ie(!1);const h=b(()=>"files"in(n()??{})?wee:vee),p=()=>{const{path:w,params:x}=Vo(),E=w.match(d);if(K(f,!1),n()?.name==="_singletons"&&ga().length&&Ye(Wn,void 0),!E?.groups)return;const{_collectionName:$,routeType:C,subPath:k}=E.groups;if(!$){if(r())Ye(Wn,void 0),Ye(fi,i()("viewing_collection_list")),K(f,!0);else{const O=n()||hB()||nA();Wt(`/collections/${O?.name}`,{replaceState:!0})}return}const T=si($);if(!T||T.hide?Ye(Wn,void 0):n()?.name!==T.name&&Ye(Wn,T),!T||!n()){Ye(fi,i()("collection_not_found"));return}const{name:A}=n(),P=ws(n()),L="_fileMap"in n()?n()._fileMap:void 0;if(!C){const O=o().length;Ye(fi,i()(O>1?"viewing_x_collection_many_entries":O===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:P,count:O}}));return}if(Ye(xl,!0),L){if(C==="entries"&&k){const O=Oy(A,k),N=L[k];Qu(O?{collection:T,collectionFile:N,originalEntry:O}:{collection:T,collectionFile:N,originalEntry:{slug:N.name,locales:Object.fromEntries(N._i18n.initialLocales.map(M=>[M,{}]))}}),Ye(fi,i()(`edit_${T._type}_announcement`,{values:{collection:P,file:df(N)}}))}}else if(C==="new"&&!k&&(Qu({collection:T,dynamicValues:x,isIndexFile:!!window.history.state?.index}),Ye(fi,i()("create_entry_announcement",{values:{collection:P}}))),C==="entries"&&k){const O=o().find(N=>N.subPath===k);O&&s()&&(Qu({collection:T,originalEntry:O}),Ye(fi,i()("edit_entry_announcement",{values:{collection:P,entry:tu(n(),O)}})))}};Ut(()=>{p()});var g=Gee();Xr("hashchange",Xa,w=>{Lw(w,p,d)});var m=D(g);{const w=$=>{var C=X(),k=D(C);{var T=A=>{Lee(A,{})};q(k,A=>{(!r()||l(f))&&A(T)})}S($,C)},x=$=>{var C=X(),k=D(C);{var T=A=>{{const P=H=>{jee(H,{})},L=H=>{var G=X(),W=D(G);{var Y=R=>{Kee(R,{})};q(W,R=>{n()?._type==="entry"&&o().length&&R(Y)})}S(H,G)},O=H=>{var G=X(),W=D(G);ur(W,()=>l(h),(Y,R)=>{R(Y,{})}),S(H,G)},N=H=>{Uee(H,{})};let M=b(()=>i()("x_collection",{values:{collection:s()&&n()?ws(n()):""}})),U=b(()=>n()?.description);Cf(A,{get"aria-label"(){return l(M)},get"aria-description"(){return l(U)},primaryToolbar:P,secondaryToolbar:L,mainContent:O,secondarySidebar:N,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};q(k,A=>{(!r()||!l(f))&&A(T)})}S($,C)};let E=b(()=>i()("content_library"));Rl(m,{get"aria-label"(){return l(E)},primarySidebar:w,main:x,$$slots:{primarySidebar:!0,main:!0}})}var v=z(m,2);HQ(v,{});var _=z(v,2);Yn(_,{get show(){return a().saved},set show(w){_t(md,Se(a).saved=w,Se(a))},children:(w,x)=>{Mn(w,{status:"success",children:(E,$)=>{var C=Fe();Z(k=>ne(C,k),[()=>i()(a().published?"entry_saved_and_published":"entry_saved")]),S(E,C)},$$slots:{default:!0}})},$$slots:{default:!0}});var y=z(_,2);Yn(y,{get show(){return a().deleted},set show(w){_t(md,Se(a).deleted=w,Se(a))},children:(w,x)=>{Mn(w,{status:"success",children:(E,$)=>{var C=Fe();Z(k=>ne(C,k),[()=>i()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),S(E,C)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,g),ae(),u()}function rN(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();{let s=b(()=>n()("prefs.i18n.default_translator.select_service"));Al(t,{get"aria-label"(){return l(s)},get value(){return r().defaultTranslationService},onChange:a=>{Ye(ft,{...r(),defaultTranslationService:a.detail.value})},children:(a,c)=>{var u=X(),d=D(u);it(d,17,()=>Object.entries(Bw),([f,{serviceLabel:h}])=>f,(f,h)=>{var p=b(()=>ji(l(h),2));let g=()=>l(p)[0],m=()=>l(p)[1].serviceLabel;{let v=b(()=>g()===r().defaultTranslationService);Tr(f,{get label(){return m()},get value(){return g()},get selected(){return l(v)}})}}),S(a,u)},$$slots:{default:!0}})}ae(),o()}var Yee=j("<!> <!> <!>",1);function Jee(t,e){se(e,!0);const n=()=>V(Pg,"$translator",a),r=()=>V(xl,"$showContentOverlay",a),i=()=>V(Bu,"$translatorApiKeyDialogState",a),o=()=>V(ue,"$_",a),s=()=>V(ft,"$prefs",a),[a,c]=me(),u=b(()=>n().serviceId),d=b(()=>n().apiLabel),f=b(()=>n().developerURL),h=b(()=>n().apiKeyURL),p=b(()=>n().apiKeyPattern);Me(()=>{!r()&&i().show&&(_t(Bu,Se(i).show=!1,Se(i)),i().resolve?.())});{let g=b(()=>o()(i().multiple?"translate_fields":"translate_field")),m=b(()=>({spellcheck:!1,monospace:!0,"aria-label":o()("api_key")}));hA(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(_t(ft,Se(s).apiKeys??={},Se(s)),_t(ft,Se(s).apiKeys[l(u)]=_,Se(s)),_t(Bu,Se(i).show=!1,Se(i)),i().resolve?.(_))},onCancel:()=>{i().resolve?.()},get open(){return i().show},set open(v){_t(Bu,Se(i).show=v,Se(i))},children:(v,_)=>{var y=Yee(),w=D(y);rN(w,{});var x=z(w,2);ii(x,{});var E=z(x,2);cr(E,()=>jr.sanitize(o()("prefs.i18n.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(v,y)},$$slots:{default:!0}})}ae(),c()}function Xee(t,e){se(e,!0);const n=()=>V(V_,"$entryParseErrors",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=ie(!!n().length);Yn(t,{get show(){return l(s)},set show(a){K(s,a,!0)},children:(a,c)=>{Mn(a,{status:"error",children:(u,d)=>{var f=Fe();Z(h=>ne(f,h),[()=>r()(n().length===1?"entry_parse_error":"entry_parse_errors")]),S(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),ae(),o()}const iN=un([Ef,xu,Tn,Un],([t,e,n,r])=>t&&e&&!!n?.isGit&&!!r?.token),yp=ot(!1);var Zee=j(" <!> <!>",1),Qee=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function ete(t,e){se(e,!0);const n=()=>V(Tn,"$backend",i),r=()=>V(ue,"$_",i),[i,o]=me();let s,a=ie(!1);Me(()=>{const{databaseName:d}=n()?.repository??{};d&&(s=new fo(d,"ui-settings"),(async()=>{const f=await s.get("onboarding")??{};f.mobileCta||K(a,!0),await s.set("onboarding",{...f,mobileCta:!0})})())});var c=Qee(),u=D(c);Gc(u,()=>({"--sui-infobar-message-justify-content":"center"})),ig(u.lastChild,{get show(){return l(a)},dismissible:!1,children:(d,f)=>{var h=Zee(),p=D(h),g=z(p);{let v=b(()=>r()("mobile_promo_button"));et(g,{variant:"link",get label(){return l(v)},onclick:()=>{K(a,!1),Ye(yp,!0)}})}var m=z(g,2);{let v=b(()=>r()("later"));et(m,{variant:"link",get label(){return l(v)},onclick:()=>{K(a,!1)}})}Z(v=>ne(p,`${v??""} `),[()=>r()("mobile_promo_title")]),S(d,h)},$$slots:{default:!0}}),S(t,c),ae(),o()}var tte=j('<div role="none" class="wrapper svelte-t2r4ty"><!></div>');const nte={hash:"svelte-t2r4ty",code:`.wrapper.svelte-t2r4ty {display:contents;}.wrapper.svelte-t2r4ty .sui.select-button-group {gap:4px;}
|
|
655
|
+
}`};function HQ(t,e){se(e,!0),Ee(t,VQ);const n=()=>V(Je,"$entryDraft",f),r=()=>V(Ui,"$entryEditorSettings",f),i=()=>V(ya,"$editorFirstPane",f),o=()=>V(wo,"$editorSecondPane",f),s=()=>V(vn,"$isSmallScreen",f),a=()=>V(Yo,"$isMediumScreen",f),c=()=>V(xl,"$showContentOverlay",f),u=()=>V(ue,"$_",f),d=()=>V(Av,"$showDuplicateToast",f),[f,h]=me();let p=!1,g=ie(!0),m=ie(void 0),v=ie(void 0),_=ie(void 0);const y=b(()=>n()?.isNew??!0),w=b(()=>n()?.collection),x=b(()=>l(w)?._type==="entry"?l(w):void 0),E=b(()=>n()?.collectionFile),$=b(()=>r()??{}),C=b(()=>l($).showPreview),k=b(()=>(l(E)??l(w))?._i18n??bo),T=b(()=>l(k).i18nEnabled),A=b(()=>l(k).allLocales),P=b(()=>l(k).defaultLocale),L=b(()=>n()?.canPreview??!0),O=b(()=>l(E)?.name?[l(w)?.name,l(E).name].join("|"):l(w)?.name),N=b(()=>l(x)?.create??!1),M=b(()=>l(x)?.limit??1/0),U=b(()=>!Zp(l(w))),H=async()=>{const[te,re]=r()?.paneStates?.[l(O)??""]??[];return p||!te||!re||te.locale&&!l(A).includes(te.locale)||re.locale&&!l(A).includes(re.locale)||(!l(C)||!l(L))&&(te.mode==="preview"||re.mode==="preview")?!1:(p=!0,await Ma(),Ye(ya,te),Ye(wo,re),await Ma(),p=!1,(s()||a())&&Ye(wo,null),!0)},G=async()=>{if(n()&&!await H())if(Ye(ya,{mode:"edit",locale:i()?.locale??l(P)}),s()||a())Ye(wo,null);else if(!l(C)||!l(L)){const te=l(T)?l(A).filter(re=>re!==i()?.locale):[];Ye(wo,te.length?{mode:"edit",locale:te[0]}:null)}else Ye(wo,{mode:"preview",locale:i().locale})},W=()=>{!l(w)||p||!i()||!o()||!l(O)||Ui.update((te={})=>({...te,paneStates:{...te.paneStates,[l(O)]:[i(),o()]}}))},Y=async()=>{await Ma(),l(m)&&(l(m).tabIndex=0,l(m).focus())};Ut(()=>{l(m)?.addEventListener("transitionend",()=>{c()||(K(g,!0),Ye(Je,null))})}),Me(()=>{l(O)&&(Ye(ya,null),Ye(wo,null))}),Me(()=>{l(C),l(L),s(),a(),Se(()=>{G()})}),Me(()=>{i(),o(),W()}),Me(()=>{l(m)&&(c()?l(g)&&(K(g,!1),G(),Y(),Y7()):W7())});var R=qQ(),B=D(R),J=F(B);or(J,()=>n()?.id,te=>{var re=BQ(),he=D(re);{let Pe=b(()=>l(y)&&l(U));DQ(he,{get disabled(){return l(Pe)}})}var pe=z(he,2);{var ce=Pe=>{},ge=Pe=>{var xe=X(),de=D(xe);{var we=fe=>{nr(fe,{children:(_e,Ce)=>{var ze=MQ(),Ne=D(ze),Ae=F(Ne);{var $e=Re=>{var nt=Fe();Z(Ge=>ne(nt,Ge),[()=>u()("creating_entries_disabled_by_admin")]),S(Re,nt)},je=Re=>{var nt=Fe();Z(Ge=>ne(nt,Ge),[()=>u()("creating_entries_disabled_by_limit",{values:{limit:l(M)}})]),S(Re,nt)};q(Ae,Re=>{l(N)?Re(je,!1):Re($e)})}var Le=z(Ne,2),Ie=F(Le);et(Ie,{variant:"primary",onclick:()=>{Wt(`/collection/${l(w)?.name}`,{replaceState:!0,transitionType:"backwards"})},children:(Re,nt)=>{var Ge=Fe();Z(ut=>ne(Ge,ut),[()=>u()("back_to_collection")]),S(Re,Ge)},$$slots:{default:!0}}),S(_e,ze)},$$slots:{default:!0}})},ve=fe=>{var _e=UQ(),Ce=F(_e);{var ze=Ne=>{var Ae=jQ(),$e=D(Ae);{var je=Re=>{const nt=b(()=>{const{locale:Ge,mode:ut}=i()??{};return{locale:Ge,mode:ut}});{let Ge=b(()=>u()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:po(l(nt).locale)??l(nt).locale}}));zo(Re,{class:"pane",get"aria-label"(){return l(Ge)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,Oe)=>{var be=FQ(),ye=D(be);NS(ye,{id:"first-pane-header",get thisPane(){return ya},get thatPane(){return wo}});var tt=z(ye,2);PS(tt,{id:"first-pane-body",get thisPane(){return ya},get thisPaneContentArea(){return l(v)},set thisPaneContentArea(Ve){K(v,Ve,!0)},get thatPaneContentArea(){return l(_)},set thatPaneContentArea(Ve){K(_,Ve,!0)}}),S(ut,be)},$$slots:{default:!0}})}};q($e,Re=>{i()&&Re(je)})}var Le=z($e,2);{var Ie=Re=>{const nt=b(()=>{const{locale:Ge,mode:ut}=o()??{};return{locale:Ge,mode:ut}});{let Ge=b(()=>u()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:po(l(nt).locale)??l(nt).locale}}));zo(Re,{get"aria-label"(){return l(Ge)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,Oe)=>{var be=zQ(),ye=D(be);NS(ye,{id:"second-pane-header",get thisPane(){return wo},get thatPane(){return ya}});var tt=z(ye,2);PS(tt,{id:"second-pane-body",get thisPane(){return wo},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(Ve){K(_,Ve,!0)},get thatPaneContentArea(){return l(v)},set thatPaneContentArea(Ve){K(v,Ve,!0)}}),S(ut,be)},$$slots:{default:!0}})}};q(Le,Re=>{o()&&Re(Ie)})}S(Ne,Ae)};q(Ce,Ne=>{l(w)&&Ne(ze)})}S(fe,_e)};q(de,fe=>{l(y)&&l(U)?fe(we):fe(ve,!1)},!0)}S(Pe,xe)};q(pe,Pe=>{n()?Pe(ge,!1):Pe(ce)})}S(te,re)}),xt(B,te=>K(m,te),()=>l(m));var Q=z(B,2);X7(Q,{});var ee=z(Q,2);Yn(ee,{get show(){return y_(),d()},set show(te){Ye(Av,te)},children:(te,re)=>{Mn(te,{status:"success",children:(he,pe)=>{var ce=Fe();Z(ge=>ne(ce,ge),[()=>u()("entry_duplicated")]),S(he,ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),Z(te=>{Te(B,"hidden",l(g)),B.inert=!c(),Te(B,"aria-label",te)},[()=>u()("content_editor")]),S(t,R),ae(),h()}const QL=t=>{if(Array.isArray(t))return{options:t};if(Bt(t)){const{filters:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},KQ=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:o}}=e,{options:s}=QL(i),a=n.filter(({field:c,pattern:u})=>c!==void 0&&u!==void 0&&s.some(d=>d.field===c&&String(d.pattern)===String(u)));return t.filter(c=>a.every(({field:u,pattern:d})=>{const f={entry:c,locale:o,collectionName:r,key:u},h=Td({...f,resolveRef:!1}),p=Td({...f}),g=ou(d);return h===void 0||p===void 0?!1:g?g.test(String(h))||g.test(String(p)):h===d||p===d}))},GQ=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=QL(t.view_filters);e(n),Jr.update(i=>({...i,filters:i.filters??(r?[r]:void 0)}))},WQ=un([Wn],([t],e)=>{GQ(t,e)}),YQ=t=>{if(Array.isArray(t))return{options:t};if(Bt(t)){const{groups:e,default:n}=t;if(Array.isArray(e)){const r=n?e.find(({name:i})=>i===n):void 0;return{options:e,default:r?{field:r.field,pattern:r.pattern}:void 0}}}return{options:[]}},JQ=(t,e,n)=>{const{field:r,pattern:i}=n??{field:"",pattern:void 0};if(!r)return t.length?[{name:"*",entries:t}]:[];const{name:o,_i18n:{defaultLocale:s}}=e,a=oe(Jr).sort,c=ou(i),u={},d=oe(ue)("other");t.forEach(h=>{const p=Td({entry:h,locale:s,collectionName:o,key:r}),g=p===void 0?d:c?String(p).match(c)?.[0]??d:String(p);g in u||(u[g]=[]),u[g].push(h)});const f=Object.entries(u).map(([h,p])=>({name:h,entries:p})).sort(({name:h},{name:p})=>Ci(h,p));return a?.key===r&&a.order==="descending"&&f.reverse(),f},XQ=(t,e)=>{if(!t||!("folder"in t)){e([]);return}const{options:n,default:r}=YQ(t.view_groups);e(n),Jr.update(i=>({...i,group:i.group===void 0?r:i.group}))},ZQ=un([Wn],([t],e)=>{XQ(t,e)}),cc=ot(),QQ=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new fo(e,"ui-settings"):null,r="contents-view";cc.set(await n?.get(r)??{}),cc.subscribe(i=>{(async()=>{try{pn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),Jr.subscribe(i=>{const{name:o}=oe(Wn)??{},s=oe(cc)?.[o??""]??{};o&&!pn(i,s)&&cc.update(a=>({...a,[o]:i}))})};Tn.subscribe(t=>{t&&!oe(cc)&&QQ(t)});const RS=["title","name","date","author","description"],o_={slug:String,commit_author:String,commit_date:Date},eN=Object.keys(o_),DS=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),eee=t=>{if(DS(t))return{keys:t};if(Bt(t)){const{fields:e,default:n}=t;return DS(e)?Bt(n)?{keys:e,defaultKey:n.field,defaultOrder:["descending","Descending"].includes(n.direction??"")?"descending":"ascending"}:{keys:e}:{keys:[]}}return{keys:[]}},tee=t=>{if(t){const e=RS.filter(n=>n!==t);return{keys:[t,...e],defaultKey:t}}return{keys:[...RS]}},nee=({collection:t,isCommitAuthorAvailable:e,isCommitDateAvailable:n})=>{const{name:r,identifier_field:i,sortable_fields:o}=t;let{keys:s,defaultKey:a,defaultOrder:c}=o?eee(o):tee(i);const u=s.includes("commit_author"),d=s.includes("commit_date");return e?!s.includes("author")&&!u&&s.push("commit_author"):u&&(s=s.filter(f=>f!=="commit_author")),n?!s.includes("date")&&!d&&s.push("commit_date"):d&&(s=s.filter(f=>f!=="commit_date")),s=Pc(s).filter(f=>!!f&&(eN.includes(f)||!!mn({collectionName:r,keyPath:f}))),a=a&&s.includes(a)?a:s[0],c??=a?"ascending":void 0,{keys:s,default:{key:a,order:c}}},ree=({key:t,fieldConfig:e})=>{if(t in o_)return o_[t];if(e?.widget==="boolean")return Boolean;if(e?.widget==="number"){const{value_type:n="int"}=e;if(n==="int"||n==="float")return Number}return String},iee=({collection:t,key:e})=>[...eN,"name"].includes(e)?oe(ue)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const o=i.slice(0,r+1).join(".");return mn({collectionName:t.name,keyPath:o})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,oee=un([Wn,Ai,qt],([t,e],n)=>{if(!t||!("folder"in t)){n([]);return}const r=oe(cc)?.[t.name]??{type:"list"},{keys:i,default:o}=nee({collection:t,isCommitAuthorAvailable:e.some(s=>!!s.commitAuthor),isCommitDateAvailable:e.some(s=>!!s.commitDate)});r.sort??=o,n(i.map(s=>({key:s,label:iee({collection:t,key:s})}))),pn(r,oe(Jr))||Jr.set(r)}),MS=t=>{let e=t,n=!0;for(;n;){const r=e;e=e.replaceAll(/([_*`~])([^_*`~]+)\1/g,"$2"),e=e.replaceAll(/([_*`~]{2,})(.+?)\1/g,"$2"),n=e!==r}return e},see=["title","summary","description"],aee=(t,e,{key:n,order:r}={})=>{const i=[...t];if(n===void 0)return i;const{name:o,_i18n:{defaultLocale:s}}=e,a=mn({collectionName:o,keyPath:n}),c=ree({key:n,fieldConfig:a}),u=Object.fromEntries(i.map(p=>[p.slug,Td({entry:p,locale:s,collectionName:o,key:n})])),d=a?.widget==="datetime"?a:void 0,f=a?.widget==="markdown"||see.includes(n);i.sort((p,g)=>{const m=u[p.slug],v=u[g.slug];if(d){const _=m?Lc(m,d):void 0,y=v?Lc(v,d):void 0;return Number(_??0)-Number(y??0)}if(c===String){const _=m?String(m):"",y=v?String(v):"";return f?Ci(MS(_),MS(y)):Ci(_,y)}return Number(m??0)-Number(v??0)}),r==="descending"&&i.reverse();const h=_i(e)?.name;if(h){const p=i.findIndex(g=>g.slug===h);p>-1&&i.unshift(i.splice(p,1)[0])}return i},Jr=ot({type:"list"}),ba=un([Ai,Wn],([t,e],n)=>{n(t&&e?Wo(e.name):[])});let FS="";const Xw=un([ba,Jr,qt],([t,e],n)=>{const r=JSON.stringify({_listedEntries:t,_currentView:e});if(r===FS)return;FS=r,n([]);const i=oe(Wn);let o=[...t];if(!o.length||ha(i,o[0]).length)return;e.sort&&(o=aee(o,i,e.sort)),e.filters&&(o=KQ(o,i,e.filters));const s=JQ(o,i,e.group);pn(oe(Xw),s)||n(s)});ba.subscribe(t=>{Ic.set([]),oe(ft).devModeEnabled&&console.info("listedEntries",t)});Wn.subscribe(t=>{t&&oe(ft).devModeEnabled&&console.info("selectedCollection",t)});var lee=j("<!> <!>",1),cee=j('<div role="none" class="label svelte-cy8v6x"><!></div>'),uee=j("<!> <!> <!>",1);const dee={hash:"svelte-cy8v6x",code:".label.svelte-cy8v6x .icon.home {opacity:0.5;font-size:20px;vertical-align:-4px;}"};function fee(t,e){se(e,!0),Ee(t,dee);const n=()=>V(ba,"$listedEntries",a),r=()=>V(vn,"$isSmallScreen",a),i=()=>V(Yo,"$isMediumScreen",a),o=()=>V(Ic,"$selectedEntries",a),s=()=>V(qt,"$appLocale",a),[a,c]=me(),u=d=>{Ic.update(f=>{const h=f.indexOf(e.entry);return d&&h===-1&&f.push(e.entry),!d&&h>-1&&f.splice(h,1),f})};{let d=b(()=>n().indexOf(e.entry));gf(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onclick:()=>{Wt(`/collections/${e.collection.name}/entries/${e.entry.subPath}`,{transitionType:"forwards"})},children:(f,h)=>{var p=uee(),g=D(p);{var m=w=>{Ti(w,{class:"checkbox",children:(x,E)=>{{let $=b(()=>o().includes(e.entry));pf(x,{role:"none",tabindex:"-1",get checked(){return l($)},onChange:({detail:{checked:C}})=>{u(C)}})}},$$slots:{default:!0}})};q(g,w=>{r()||i()||w(m)})}var v=z(g,2);{var _=w=>{Ti(w,{class:"image",children:(x,E)=>{var $=X(),C=D($);kn(C,()=>XL(e.collection,e.entry),null,(k,T)=>{var A=X(),P=D(A);{var L=O=>{{let N=b(()=>e.viewType==="list"?"icon":"tile");$g(O,{get src(){return l(T)},get variant(){return l(N)},cover:!0})}};q(P,O=>{l(T)&&O(L)})}S(k,A)}),S(x,$)},$$slots:{default:!0}})};q(v,w=>{e.collection._thumbnailFieldNames.length&&w(_)})}var y=z(v,2);Ti(y,{class:"title",children:(w,x)=>{var E=cee(),$=F(E);Pr($,{lines:2,children:(C,k)=>{var T=lee(),A=D(T);or(A,s,O=>{var N=X(),M=D(N);cr(M,()=>tu(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),S(O,N)});var P=z(A,2);{var L=O=>{{let N=b(()=>_i(e.collection)?.icon);Ze(O,{get name(){return l(N)},class:"home"})}};q(P,O=>{Go(e.collection,e.entry)&&O(L)})}S(C,T)},$$slots:{default:!0}}),S(w,E)},$$slots:{default:!0}}),S(f,p)},$$slots:{default:!0}})}ae(),c()}var hee=j("<!> <!>",1);function tN(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",s),r=()=>V(Ai,"$allEntries",s),i=()=>V(qt,"$appLocale",s),o=()=>V(ue,"$_",s),[s,a]=me();let c=I(e,"label",3,void 0),u=I(e,"keyShortcuts",3,void 0);const d=b(()=>!Zp(n())),f=b(()=>r()&&n()?iF(n()):!1),h=b(()=>i()&&n()?_i(n())?.label:""),p=b(()=>l(f)?fA:et),g=(_=!1)=>{Wt(`/collections/${e.collectionName}/new`,{state:{index:_},transitionType:"forwards"})};var m=X(),v=D(m);{const _=E=>{Ze(E,{name:"edit"})},y=E=>{var $=X(),C=D($);{var k=T=>{hr(T,{children:(A,P)=>{var L=hee(),O=D(L);{let M=b(()=>o()("entry"));vt(O,{get label(){return l(M)},onclick:()=>g()})}var N=z(O,2);vt(N,{get label(){return l(h)},onclick:()=>g(!0)}),S(A,L)},$$slots:{default:!0}})};q(C,T=>{l(f)&&T(k)})}S(E,$)};let w=b(()=>!c()),x=b(()=>o()("create_new_entry"));ur(v,()=>l(p),(E,$)=>{$(E,{variant:"primary",get iconic(){return l(w)},get disabled(){return l(d)},get label(){return c()},get"aria-label"(){return l(x)},get keyShortcuts(){return u()},onclick:()=>g(),startIcon:_,popup:y,$$slots:{startIcon:!0,popup:!0}})})}S(t,m),ae(),a()}var pee=j('<span role="none"> </span>'),gee=j('<span role="none"> </span> <!>',1),mee=j('<span role="none"> </span>');function vee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",a),r=()=>V(Jr,"$currentView",a),i=()=>V(Xw,"$entryGroups",a),o=()=>V(ue,"$_",a),s=()=>V(ba,"$listedEntries",a),[a,c]=me(),u=b(n),d=b(()=>r().type),f=b(()=>i().map(({entries:h})=>h).flat(1));{let h=b(()=>o()("entry_list"));Rw(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=X(),v=D(m);{var _=w=>{var x=X(),E=D(x);{var $=k=>{const T=b(()=>{const{defaultLocale:A}=l(u)._i18n;return{defaultLocale:A}});{let A=b(()=>o()("entries"));$f(k,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(A)},get"aria-rowcount"(){return s().length},children:(P,L)=>{var O=X(),N=D(O);it(N,1,i,({name:M,entries:U})=>M,(M,U)=>{let H=()=>l(U).name,G=()=>l(U).entries;var W=X(),Y=D(W);kn(Y,Nt,null,R=>{{let B=b(()=>H()!=="*"?H():void 0);pA(R,{get label(){return l(B)},children:(J,Q)=>{{const ee=(re,he=qe)=>{var pe=X(),ce=D(pe);kn(ce,Nt,null,ge=>{fee(ge,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})}),S(re,pe)};let te=b(()=>G().filter(({locales:re})=>!!(re[l(T).defaultLocale]??Object.values(re)[0])?.content));Cl(J,{get items(){return l(te)},itemKey:"id",renderItem:ee,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})}}),S(M,W)}),S(P,O)},$$slots:{default:!0}})}},C=k=>{var T=X(),A=D(T);{var P=O=>{nr(O,{children:(N,M)=>{var U=pee(),H=F(U);Z(G=>ne(H,G),[()=>o()("no_entries_found")]),S(N,U)},$$slots:{default:!0}})},L=O=>{nr(O,{children:(N,M)=>{var U=gee(),H=D(U),G=F(H),W=z(H,2);{let Y=b(()=>o()("create_new_entry"));tN(W,{get collectionName(){return l(u).name},get label(){return l(Y)}})}Z(Y=>ne(G,Y),[()=>o()("no_entries_created")]),S(N,U)},$$slots:{default:!0}})};q(A,O=>{s().length?O(P):O(L,!1)},!0)}S(k,T)};q(E,k=>{l(f).length?k($):k(C,!1)})}S(w,x)},y=w=>{nr(w,{children:(x,E)=>{var $=mee(),C=F($);Z(k=>ne(C,k),[()=>o()("collection_not_found")]),S(x,$)},$$slots:{default:!0}})};q(v,w=>{l(u)?w(_):w(y,!1)})}S(p,m)},$$slots:{default:!0}})}ae(),c()}var bee=j('<div role="none" class="label svelte-1nfjp1"><!> <!></div>'),_ee=j('<span role="none"> </span>');const yee={hash:"svelte-1nfjp1",code:".label.svelte-1nfjp1 {display:flex;align-items:center;gap:16px;}.label.svelte-1nfjp1 .icon {display:flex;align-items:center;justify-content:center;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);}"};function wee(t,e){se(e,!0),Ee(t,yee);const n=()=>V(Wn,"$selectedCollection",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=b(()=>n()?.files.filter(eg)??[]);{let a=b(()=>r()("file_list"));Rw(t,{get"aria-label"(){return l(a)},children:(c,u)=>{var d=X(),f=D(d);{var h=g=>{{let m=b(()=>r()("files"));$f(g,{viewType:"list",get"aria-label"(){return l(m)},get"aria-rowcount"(){return l(s).length},children:(v,_)=>{Cl(v,{get items(){return l(s)},itemKey:"name",renderItem:(w,x)=>{let E=()=>x?.().name,$=()=>x?.().label,C=()=>x?.().icon;var k=X(),T=D(k);kn(T,Nt,null,A=>{gf(A,{onclick:()=>{Wt(`/collections/${n()?.name}/entries/${E()}`,{transitionType:"forwards"})},children:(P,L)=>{Ti(P,{class:"title",children:(O,N)=>{var M=bee(),U=F(M);{var H=W=>{Ze(W,{get name(){return C()}})};q(U,W=>{C()&&W(H)})}var G=z(U,2);Pr(G,{lines:2,children:(W,Y)=>{var R=Fe();Z(()=>ne(R,$()||E())),S(W,R)},$$slots:{default:!0}}),S(O,M)},$$slots:{default:!0}})},$$slots:{default:!0}})}),S(w,k)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}},p=g=>{nr(g,{children:(m,v)=>{var _=_ee(),y=F(_);Z(w=>ne(y,w),[()=>r()("no_files_in_collection")]),S(m,_)},$$slots:{default:!0}})};q(f,g=>{l(s)?.length?g(h):g(p,!1)})}S(c,d)},$$slots:{default:!0}})}ae(),o()}var xee=j('<div class="wrapper svelte-w0jevb"><!></div>');const kee={hash:"svelte-w0jevb",code:".wrapper.svelte-w0jevb {display:contents;}"};function See(t,e){se(e,!0),Ee(t,kee);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>e.file.name),s=b(()=>e.file.label),a=b(()=>e.file.icon);let c=ie(!1),u=ie(void 0);var d=xee(),f=F(d);{const h=g=>{{let m=b(()=>l(a)||"edit_document");Ze(g,{get name(){return l(m)}})}};let p=b(()=>l(s)||l(o));Tr(f,{get label(){return l(p)},onSelect:()=>{Ye(fi,n()("singleton_selected_announcement",{values:{file:l(s)||l(o)}}))},onclick:()=>{Wt(`/collections/_singletons/entries/${l(o)}`,{transitionType:"forwards"}),K(c,!1),l(u)?.querySelector('[role="option"]')?.classList.remove("focused")},get selected(){return l(c)},set selected(g){K(c,g,!0)},startIcon:h,$$slots:{startIcon:!0}})}xt(d,h=>K(u,h),()=>l(u)),S(t,d),ae(),i()}var Eee=j("<!> <!>",1);function nN(t,e){se(e,!0);const n=()=>V(ft,"$prefs",c),r=()=>V(Tn,"$backend",c),i=()=>V(Gh,"$isLastCommitPublished",c),o=()=>V(Nw,"$skipCIConfigured",c),s=()=>V(vn,"$isSmallScreen",c),a=()=>V(ue,"$_",c),[c,u]=me(),d=b(()=>n().deployHookURL),f=b(()=>n().deployHookAuthHeader),h=b(()=>r()?.triggerDeployment),p=b(()=>(!!l(d)||typeof l(h)=="function")&&!i());let g=ie("info"),m=ie(!1);const v=async()=>{K(g,"info"),K(m,!0);try{const{ok:x,status:E}=l(d)?await fetch(l(d),{method:"POST",mode:l(f)?"cors":"no-cors",headers:l(f)?{Authorization:l(f)}:{}}):await l(h)?.()??{};if(!x&&(l(f)||E!==0))throw new Error(`Webhook returned ${E} error`);Ye(Gh,!0)}catch(x){K(g,"error"),K(m,!0),console.error(x)}};var _=X(),y=D(_);{var w=x=>{var E=Eee(),$=D(E);{let k=b(()=>s()?"small":"medium"),T=b(()=>a()("publish_changes")),A=b(()=>!l(p));et($,{variant:"secondary",get size(){return l(k)},get label(){return l(T)},get disabled(){return l(A)},onclick:()=>v()})}var C=z($,2);Yn(C,{get show(){return l(m)},set show(k){K(m,k,!0)},children:(k,T)=>{Mn(k,{get status(){return l(g)},children:(A,P)=>{var L=Fe();Z(O=>ne(L,O),[()=>a()(l(g)==="error"?"publishing_changes_failed":"publishing_changes")]),S(A,L)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(x,E)};q(y,x=>{o()&&x(w)})}S(t,_),ae(),u()}var Tee=j("<header><h2> </h2> <!></header> <!>",1),$ee=j('<span class="count"> </span>'),Cee=j('<span class="count"> </span>'),Aee=j("<!> <!>",1),Pee=j('<div role="none" class="primary-sidebar"><!> <!></div>');function Lee(t,e){se(e,!0);const n=()=>V(qt,"$appLocale",c),r=()=>V(Ct,"$cmsConfig",c),i=()=>V(vn,"$isSmallScreen",c),o=()=>V(ue,"$_",c),s=()=>V(Wn,"$selectedCollection",c),a=()=>V(Ai,"$allEntries",c),[c,u]=me(),d=b(()=>Intl.NumberFormat(n()??void 0)),f=b(()=>r()?.collections?.filter(({hide:_})=>!_)??[]),h=b(()=>r()?.singletons??[]);var p=Pee(),g=F(p);{var m=_=>{var y=Tee(),w=D(y),x=F(w),E=F(x),$=z(x,2);nN($,{});var C=z(w,2);Cg(C,{onclick:k=>{k.preventDefault(),Wt("/search")}}),Z(k=>ne(E,k),[()=>o()("contents")]),S(_,y)};q(g,_=>{i()&&_(m)})}var v=z(g,2);{let _=b(()=>o()("collection_list"));uu(v,{get"aria-label"(){return l(_)},"aria-controls":"collection-container",children:(y,w)=>{var x=Aee(),E=D(x);{var $=T=>{{let A=b(()=>o()("collections"));za(T,{get label(){return l(A)},children:(P,L)=>{var O=X(),N=D(O);it(N,19,()=>l(f),(M,U)=>M.name??U,(M,U)=>{var H=X(),G=D(H);kn(G,Nt,null,W=>{var Y=X(),R=D(Y);{var B=Q=>{const ee=b(()=>{const{name:te,label:re,icon:he}=l(U);return{name:te,label:re,icon:he}});{const te=ce=>{{let ge=b(()=>l(ee).icon||"bookmark_manager");Ze(ce,{get name(){return l(ge)}})}},re=ce=>{var ge=X(),Pe=D(ge);or(Pe,a,xe=>{const de=b(()=>("files"in l(U)?l(U).files:Wo(l(ee).name)).length);var we=$ee(),ve=F(we);Z((fe,_e)=>{Te(we,"aria-label",`(${fe??""})`),ne(ve,_e)},[()=>o()(l(de)>1?"many_entries":l(de)===1?"one_entry":"no_entries",{values:{count:l(de)}}),()=>l(d).format(l(de))]),S(xe,we)}),S(ce,ge)};let he=b(()=>l(ee).label||l(ee).name),pe=b(()=>i()?!1:s()?.name===l(ee).name);Tr(Q,{get label(){return l(he)},get selected(){return l(pe)},onSelect:()=>{Wt(`/collections/${l(ee).name}`,{transitionType:"forwards"})},startIcon:te,endIcon:re,$$slots:{startIcon:!0,endIcon:!0}})}},J=Q=>{var ee=X(),te=D(ee);{var re=he=>{ri(he,{})};q(te,he=>{l(U).divider&&he(re)},!0)}S(Q,ee)};q(R,Q=>{"divider"in l(U)?Q(J,!1):Q(B)})}S(W,Y)}),S(M,H)}),S(P,O)},$$slots:{default:!0}})}};q(E,T=>{l(f).length&&T($)})}var C=z(E,2);{var k=T=>{var A=X(),P=D(A);{var L=N=>{{let M=b(()=>o()("files"));za(N,{get label(){return l(M)},children:(U,H)=>{var G=X(),W=D(G);it(W,19,()=>l(h),(Y,R)=>Y.name??R,(Y,R)=>{var B=X(),J=D(B);kn(J,Nt,null,Q=>{var ee=X(),te=D(ee);{var re=pe=>{See(pe,{get file(){return l(R)}})},he=pe=>{var ce=X(),ge=D(ce);{var Pe=xe=>{ri(xe,{})};q(ge,xe=>{l(R).divider&&xe(Pe)},!0)}S(pe,ce)};q(te,pe=>{"divider"in l(R)?pe(he,!1):pe(re)})}S(Q,ee)}),S(Y,B)}),S(U,G)},$$slots:{default:!0}})}},O=N=>{const M=b(()=>l(h).length);{let U=b(()=>o()("collections"));za(N,{get label(){return l(U)},children:(H,G)=>{{const W=J=>{Ze(J,{name:"bookmark_manager"})},Y=J=>{var Q=Cee(),ee=F(Q);Z((te,re)=>{Te(Q,"aria-label",`(${te??""})`),ne(ee,re)},[()=>o()(l(M)>1?"many_entries":l(M)===1?"one_entry":"no_entries",{values:{count:l(M)}}),()=>l(d).format(l(M))]),S(J,Q)};let R=b(()=>o()("files")),B=b(()=>s()?.name==="_singletons");Tr(H,{get label(){return l(R)},get selected(){return l(B)},onSelect:()=>{Wt("/collections/_singletons",{transitionType:"forwards"})},startIcon:W,endIcon:Y,$$slots:{startIcon:!0,endIcon:!0}})}},$$slots:{default:!0}})}};q(P,N=>{i()||l(f).length?N(L):N(O,!1)})}S(T,A)};q(C,T=>{l(h).length&&T(k)})}S(y,x)},$$slots:{default:!0}})}S(t,p),ae(),u()}function Nee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",s),r=()=>V(Ic,"$selectedEntries",s),i=()=>V(ue,"$_",s),o=()=>V(ba,"$listedEntries",s),[s,a]=me();let c=I(e,"open",15,!1);const u=b(()=>{const d=n()?.name;return r().length&&d&&Io({collectionName:d})?.entryRelative?r().map(f=>ZL({entry:f,collectionName:d,relative:!0})).flat(1):[]});{let d=b(()=>r().length===1?i()("delete_entry"):i()("delete_entries")),f=b(()=>i()("delete"));cu(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{YL(r(),l(u))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=X(),m=D(g);{var v=y=>{var w=Fe();Z(x=>ne(w,x),[()=>i()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),S(y,w)},_=y=>{var w=X(),x=D(w);{var E=C=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),S(C,k)},$=C=>{var k=Fe();Z(T=>ne(k,T),[()=>i()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:r().length}})]),S(C,k)};q(x,C=>{r().length===o().length?C(E):C($,!1)},!0)}S(y,w)};q(m,y=>{r().length===1?y(v):y(_,!1)})}S(h,g)},$$slots:{default:!0}})}ae(),a()}var Oee=j('<div role="none" class="description svelte-83jnuc"><!></div>'),Iee=j("<!> <!>",1),Ree=j('<!> <h2 role="none" class="svelte-83jnuc"> </h2> <!> <!>',1),Dee=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),Mee=j("<!> <!>",1),Fee=j("<!> <!>",1);const zee={hash:"svelte-83jnuc",code:"h2.svelte-83jnuc {flex:none !important;}.description.svelte-83jnuc {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;}"};function jee(t,e){se(e,!0),Ee(t,zee);const n=()=>V(Wn,"$selectedCollection",c),r=()=>V(qt,"$appLocale",c),i=()=>V(ue,"$_",c),o=()=>V(vn,"$isSmallScreen",c),s=()=>V(Ic,"$selectedEntries",c),a=()=>V(ba,"$listedEntries",c),[c,u]=me();let d=ie(!1);const f=T=>jr.sanitize(jt.parseInline(T),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),h=b(()=>n()?.name??""),p=b(()=>n()?.description),g=b(()=>!Zp(n())),m=b(()=>r()&&n()?ws(n()):l(h)),v=b(()=>{const T=n();return T?._type==="entry"?{isEntryCollection:!0,canCreate:T.create??!1,canDelete:T.delete??!0,limit:T.limit??1/0}:{isEntryCollection:!1,canCreate:!1,canDelete:!1,limit:1/0}}),_=b(()=>l(v).isEntryCollection),y=b(()=>l(v).canCreate),w=b(()=>l(v).canDelete),x=b(()=>l(v).limit);var E=Fee(),$=D(E);{var C=T=>{var A=Mee(),P=D(A);{let N=b(()=>i()("collection"));Ni(P,{variant:"primary",get"aria-label"(){return l(N)},children:(M,U)=>{var H=Ree(),G=D(H);{var W=re=>{{let he=b(()=>i()("back_to_collection_list"));bl(re,{get"aria-label"(){return l(he)},onclick:()=>{oa("/collections")}})}};q(G,re=>{o()&&re(W)})}var Y=z(G,2),R=F(Y),B=z(Y,2);{var J=re=>{ii(re,{flex:!0})},Q=re=>{var he=Oee(),pe=F(he);Pr(pe,{children:(ce,ge)=>{var Pe=X(),xe=D(Pe);cr(xe,()=>f(l(p)||"")),S(ce,Pe)},$$slots:{default:!0}}),S(re,he)};q(B,re=>{o()?re(J):re(Q,!1)})}var ee=z(B,2);{var te=re=>{var he=Iee(),pe=D(he);{var ce=Pe=>{{let xe=b(()=>i()("delete")),de=b(()=>s().length===1?i()("delete_selected_entry"):i()("delete_selected_entries")),we=b(()=>!s().length||!l(w));et(Pe,{variant:"ghost",get label(){return l(xe)},get"aria-label"(){return l(de)},get disabled(){return l(we)},onclick:()=>{K(d,!0)}})}};q(pe,Pe=>{o()||Pe(ce)})}var ge=z(pe,2);uA(ge,{children:(Pe,xe)=>{var de=X(),we=D(de);{var ve=fe=>{{let _e=b(()=>o()?void 0:i()("create"));tN(fe,{get collectionName(){return l(h)},get label(){return l(_e)},keyShortcuts:"Accel+E"})}};q(we,fe=>{(!o()||a().length&&!l(g))&&fe(ve)})}S(Pe,de)},$$slots:{default:!0}}),S(re,he)};q(ee,re=>{l(_)&&re(te)})}Z(()=>ne(R,l(m))),S(M,H)},$$slots:{default:!0}})}var L=z(P,2);{var O=N=>{var M=Dee(),U=D(M);Gc(U,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),ig(U.lastChild,{dismissible:!1,children:(H,G)=>{var W=X(),Y=D(W);{var R=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_admin")]),S(J,Q)},B=J=>{var Q=Fe();Z(ee=>ne(Q,ee),[()=>i()("creating_entries_disabled_by_limit",{values:{limit:l(x)}})]),S(J,Q)};q(Y,J=>{l(y)?J(B,!1):J(R)})}S(H,W)},$$slots:{default:!0}}),S(N,M)};q(L,N=>{l(_)&&l(g)&&N(O)})}S(T,A)};q($,T=>{n()&&T(C)})}var k=z($,2);Nee(k,{get open(){return l(d)},set open(T){K(d,T,!0)}}),S(t,E),ae(),u()}function Uee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",a),r=()=>V(Ef,"$isLargeScreen",a),i=()=>V(Jr,"$currentView",a),o=()=>V(ue,"$_",a),s=()=>V(Bn,"$allAssets",a),[a,c]=me(),u=b(()=>Io({collectionName:n()?.name})),d=b(()=>l(u)??{internalPath:void 0,entryRelative:!1,hasTemplateTags:!1}),f=b(()=>l(d).internalPath),h=b(()=>l(d).entryRelative),p=b(()=>l(d).hasTemplateTags),g=b(()=>l(h)||l(p));var m=X(),v=D(m);{var _=y=>{{let w=b(()=>o()("collection_assets"));zo(y,{id:"collection-assets",class:"secondary-sidebar",get"aria-label"(){return l(w)},children:(x,E)=>{ku(x,{get disabled(){return l(g)},multiple:!0,onDrop:({files:$})=>{Ye(no,{folder:l(u),files:$})},children:($,C)=>{{let k=b(()=>s().filter(T=>pn(T.folder,l(u))));xL($,{get assets(){return l(k)},onSelect:({asset:T})=>{Wt(`/assets/${T.path}`,{transitionType:"forwards"})}})}},$$slots:{default:!0}})},$$slots:{default:!0}})}};q(v,y=>{l(f)!==void 0&&r()&&i().showMedia&&y(_)})}S(t,m),ae(),c()}var Bee=j("<!> <!>",1);function qee(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(e.currentView,"$currentView",i),[i,o]=me();let s=I(e,"label",3,""),a=I(e,"disabled",3,!1),c=I(e,"noneLabel",3,""),u=I(e,"groups",19,()=>[]);{const d=h=>{{let p=b(()=>n()("grouping_options"));hr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=Bee(),_=D(v);{let w=b(()=>c()||n()("sort_keys.none")),x=b(()=>!r().group);Ld(_,{get label(){return l(w)},get checked(){return l(x)},onSelect:()=>{e.currentView.update(E=>({...E,group:null}))}})}var y=z(_,2);it(y,17,u,dr,(w,x)=>{let E=()=>l(x).label,$=()=>l(x).field,C=()=>l(x).pattern;{let k=b(()=>r().group?.field===$()&&String(r().group.pattern)===String(C()));Ld(w,{get label(){return E()},get checked(){return l(k)},onSelect:()=>{e.currentView.update(T=>({...T,group:{field:$(),pattern:C()}}))}})}}),S(g,v)},$$slots:{default:!0}})}};let f=b(()=>s()||n()("group"));Ur(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:d,$$slots:{popup:!0}})}ae(),o()}var Vee=j("<!> <!>",1),Hee=j("<!> <!> <!> <!> <!> <!> <!>",1);function Kee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",h),r=()=>V(ba,"$listedEntries",h),i=()=>V(ue,"$_",h),o=()=>V(vn,"$isSmallScreen",h),s=()=>V(Yo,"$isMediumScreen",h),a=()=>V(Xw,"$entryGroups",h),c=()=>V(oee,"$sortKeys",h),u=()=>V(WQ,"$viewFilters",h),d=()=>V(ZQ,"$viewGroups",h),f=()=>V(Jr,"$currentView",h),[h,p]=me(),g=b(()=>n()?._type==="entry"?n():void 0),m=b(()=>l(g)?.name),v=b(()=>l(g)?._thumbnailFieldNames??[]),_=b(()=>!!r().length),y=b(()=>r().length>1);var w=X(),x=D(w);{var E=$=>{{let C=b(()=>i()("entry_list"));Ni($,{variant:"secondary",get"aria-label"(){return l(C)},children:(k,T)=>{var A=Hee(),P=D(A);{var L=J=>{{let Q=b(()=>a().map(({entries:ee})=>ee).flat(1));QP(J,{get allItems(){return l(Q)},get selectedItems(){return Ic}})}};q(P,J=>{o()||s()||J(L)})}var O=z(P,2);ii(O,{flex:!0});var N=z(O,2);{let J=b(()=>!l(y)||!c().length);eL(N,{get disabled(){return l(J)},get currentView(){return Jr},get sortKeys(){return c()},get collectionName(){return l(m)},"aria-controls":"entry-list"})}var M=z(N,2);{var U=J=>{{let Q=b(()=>!l(y));ZP(J,{get disabled(){return l(Q)},get currentView(){return Jr},get filters(){return u()},multiple:!0,"aria-controls":"entry-list"})}};q(M,J=>{u()?.length&&J(U)})}var H=z(M,2);{var G=J=>{{let Q=b(()=>!l(y));qee(J,{get disabled(){return l(Q)},get currentView(){return Jr},get groups(){return d()},"aria-controls":"entry-list"})}};q(H,J=>{d()?.length&&J(G)})}var W=z(H,2);{var Y=J=>{{let Q=b(()=>!l(_));Dw(J,{get disabled(){return l(Q)},get currentView(){return Jr},"aria-controls":"entry-list"})}};q(W,J=>{l(v).length&&J(Y)})}var R=z(W,2);{var B=J=>{var Q=Vee(),ee=D(Q);ri(ee,{orientation:"vertical"});var te=z(ee,2);{const re=ge=>{Ze(ge,{name:"photo_library"})};let he=b(()=>!l(_)||!Io({collectionName:l(m)})),pe=b(()=>!!f().showMedia),ce=b(()=>i()(f().showMedia?"hide_assets":"show_assets"));et(te,{variant:"ghost",iconic:!0,get disabled(){return l(he)},get pressed(){return l(pe)},"aria-controls":"collection-assets",get"aria-expanded"(){return f().showMedia},get"aria-label"(){return l(ce)},onclick:()=>{Jr.update(ge=>({...ge,showMedia:!f().showMedia}))},startIcon:re,$$slots:{startIcon:!0}})}S(J,Q)};q(R,J=>{o()||s()||J(B)})}S(k,A)},$$slots:{default:!0}})}};q(x,$=>{l(g)&&$(E)})}S(t,w),ae(),p()}var Gee=j("<!> <!> <!> <!>",1);function Wee(t,e){se(e,!0);const n=()=>V(Wn,"$selectedCollection",c),r=()=>V(vn,"$isSmallScreen",c),i=()=>V(ue,"$_",c),o=()=>V(ba,"$listedEntries",c),s=()=>V(qt,"$appLocale",c),a=()=>V(md,"$contentUpdatesToast",c),[c,u]=me(),d=/^\/collections(?:\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?)?$/;let f=ie(!1);const h=b(()=>"files"in(n()??{})?wee:vee),p=()=>{const{path:w,params:x}=Vo(),E=w.match(d);if(K(f,!1),n()?.name==="_singletons"&&ga().length&&Ye(Wn,void 0),!E?.groups)return;const{_collectionName:$,routeType:C,subPath:k}=E.groups;if(!$){if(r())Ye(Wn,void 0),Ye(fi,i()("viewing_collection_list")),K(f,!0);else{const O=n()||hB()||nA();Wt(`/collections/${O?.name}`,{replaceState:!0})}return}const T=si($);if(!T||T.hide?Ye(Wn,void 0):n()?.name!==T.name&&Ye(Wn,T),!T||!n()){Ye(fi,i()("collection_not_found"));return}const{name:A}=n(),P=ws(n()),L="_fileMap"in n()?n()._fileMap:void 0;if(!C){const O=o().length;Ye(fi,i()(O>1?"viewing_x_collection_many_entries":O===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:P,count:O}}));return}if(Ye(xl,!0),L){if(C==="entries"&&k){const O=Oy(A,k),N=L[k];Qu(O?{collection:T,collectionFile:N,originalEntry:O}:{collection:T,collectionFile:N,originalEntry:{slug:N.name,locales:Object.fromEntries(N._i18n.initialLocales.map(M=>[M,{}]))}}),Ye(fi,i()(`edit_${T._type}_announcement`,{values:{collection:P,file:df(N)}}))}}else if(C==="new"&&!k&&(Qu({collection:T,dynamicValues:x,isIndexFile:!!window.history.state?.index}),Ye(fi,i()("create_entry_announcement",{values:{collection:P}}))),C==="entries"&&k){const O=o().find(N=>N.subPath===k);O&&s()&&(Qu({collection:T,originalEntry:O}),Ye(fi,i()("edit_entry_announcement",{values:{collection:P,entry:tu(n(),O)}})))}};Ut(()=>{p()});var g=Gee();Xr("hashchange",Xa,w=>{Lw(w,p,d)});var m=D(g);{const w=$=>{var C=X(),k=D(C);{var T=A=>{Lee(A,{})};q(k,A=>{(!r()||l(f))&&A(T)})}S($,C)},x=$=>{var C=X(),k=D(C);{var T=A=>{{const P=H=>{jee(H,{})},L=H=>{var G=X(),W=D(G);{var Y=R=>{Kee(R,{})};q(W,R=>{n()?._type==="entry"&&o().length&&R(Y)})}S(H,G)},O=H=>{var G=X(),W=D(G);ur(W,()=>l(h),(Y,R)=>{R(Y,{})}),S(H,G)},N=H=>{Uee(H,{})};let M=b(()=>i()("x_collection",{values:{collection:s()&&n()?ws(n()):""}})),U=b(()=>n()?.description);Cf(A,{get"aria-label"(){return l(M)},get"aria-description"(){return l(U)},primaryToolbar:P,secondaryToolbar:L,mainContent:O,secondarySidebar:N,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};q(k,A=>{(!r()||!l(f))&&A(T)})}S($,C)};let E=b(()=>i()("content_library"));Rl(m,{get"aria-label"(){return l(E)},primarySidebar:w,main:x,$$slots:{primarySidebar:!0,main:!0}})}var v=z(m,2);HQ(v,{});var _=z(v,2);Yn(_,{get show(){return a().saved},set show(w){_t(md,Se(a).saved=w,Se(a))},children:(w,x)=>{Mn(w,{status:"success",children:(E,$)=>{var C=Fe();Z(k=>ne(C,k),[()=>i()(a().published?"entry_saved_and_published":"entry_saved")]),S(E,C)},$$slots:{default:!0}})},$$slots:{default:!0}});var y=z(_,2);Yn(y,{get show(){return a().deleted},set show(w){_t(md,Se(a).deleted=w,Se(a))},children:(w,x)=>{Mn(w,{status:"success",children:(E,$)=>{var C=Fe();Z(k=>ne(C,k),[()=>i()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),S(E,C)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,g),ae(),u()}function rN(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();{let s=b(()=>n()("prefs.i18n.default_translator.select_service"));Al(t,{get"aria-label"(){return l(s)},get value(){return r().defaultTranslationService},onChange:a=>{Ye(ft,{...r(),defaultTranslationService:a.detail.value})},children:(a,c)=>{var u=X(),d=D(u);it(d,17,()=>Object.entries(Bw),([f,{serviceLabel:h}])=>f,(f,h)=>{var p=b(()=>ji(l(h),2));let g=()=>l(p)[0],m=()=>l(p)[1].serviceLabel;{let v=b(()=>g()===r().defaultTranslationService);Tr(f,{get label(){return m()},get value(){return g()},get selected(){return l(v)}})}}),S(a,u)},$$slots:{default:!0}})}ae(),o()}var Yee=j("<!> <!> <!>",1);function Jee(t,e){se(e,!0);const n=()=>V(Pg,"$translator",a),r=()=>V(xl,"$showContentOverlay",a),i=()=>V(Bu,"$translatorApiKeyDialogState",a),o=()=>V(ue,"$_",a),s=()=>V(ft,"$prefs",a),[a,c]=me(),u=b(()=>n().serviceId),d=b(()=>n().apiLabel),f=b(()=>n().developerURL),h=b(()=>n().apiKeyURL),p=b(()=>n().apiKeyPattern);Me(()=>{!r()&&i().show&&(_t(Bu,Se(i).show=!1,Se(i)),i().resolve?.())});{let g=b(()=>o()(i().multiple?"translate_fields":"translate_field")),m=b(()=>({spellcheck:!1,monospace:!0,"aria-label":o()("api_key")}));hA(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(_t(ft,Se(s).apiKeys??={},Se(s)),_t(ft,Se(s).apiKeys[l(u)]=_,Se(s)),_t(Bu,Se(i).show=!1,Se(i)),i().resolve?.(_))},onCancel:()=>{i().resolve?.()},get open(){return i().show},set open(v){_t(Bu,Se(i).show=v,Se(i))},children:(v,_)=>{var y=Yee(),w=D(y);rN(w,{});var x=z(w,2);ii(x,{});var E=z(x,2);cr(E,()=>jr.sanitize(o()("prefs.i18n.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),S(v,y)},$$slots:{default:!0}})}ae(),c()}function Xee(t,e){se(e,!0);const n=()=>V(V_,"$entryParseErrors",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=ie(!!n().length);Yn(t,{get show(){return l(s)},set show(a){K(s,a,!0)},children:(a,c)=>{Mn(a,{status:"error",children:(u,d)=>{var f=Fe();Z(h=>ne(f,h),[()=>r()(n().length===1?"entry_parse_error":"entry_parse_errors")]),S(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),ae(),o()}const iN=un([Ef,xu,Tn,Fn],([t,e,n,r])=>t&&e&&!!n?.isGit&&!!r?.token),yp=ot(!1);var Zee=j(" <!> <!>",1),Qee=j('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function ete(t,e){se(e,!0);const n=()=>V(Tn,"$backend",i),r=()=>V(ue,"$_",i),[i,o]=me();let s,a=ie(!1);Me(()=>{const{databaseName:d}=n()?.repository??{};d&&(s=new fo(d,"ui-settings"),(async()=>{const f=await s.get("onboarding")??{};f.mobileCta||K(a,!0),await s.set("onboarding",{...f,mobileCta:!0})})())});var c=Qee(),u=D(c);Gc(u,()=>({"--sui-infobar-message-justify-content":"center"})),ig(u.lastChild,{get show(){return l(a)},dismissible:!1,children:(d,f)=>{var h=Zee(),p=D(h),g=z(p);{let v=b(()=>r()("mobile_promo_button"));et(g,{variant:"link",get label(){return l(v)},onclick:()=>{K(a,!1),Ye(yp,!0)}})}var m=z(g,2);{let v=b(()=>r()("later"));et(m,{variant:"link",get label(){return l(v)},onclick:()=>{K(a,!1)}})}Z(v=>ne(p,`${v??""} `),[()=>r()("mobile_promo_title")]),S(d,h)},$$slots:{default:!0}}),S(t,c),ae(),o()}var tte=j('<div role="none" class="wrapper svelte-t2r4ty"><!></div>');const nte={hash:"svelte-t2r4ty",code:`.wrapper.svelte-t2r4ty {display:contents;}.wrapper.svelte-t2r4ty .sui.select-button-group {gap:4px;}
|
|
656
656
|
@media (width < 768px) {.wrapper.svelte-t2r4ty .sui.select-button-group {justify-content:space-evenly;width:100%;}
|
|
657
|
-
}.wrapper.svelte-t2r4ty .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}`};function oN(t,e){se(e,!0),Ee(t,nte);const n=()=>V(ue,"$_",s),r=()=>V(vn,"$isSmallScreen",s),i=()=>V(to,"$selectedAssetFolder",s),o=()=>V(Zb,"$selectedPageName",s),[s,a]=me(),c=b(()=>[{key:"collections",label:n()("contents"),icon:"library_books",link:"/collections"},{key:"assets",label:n()("assets"),icon:"photo_library",link:r()?"/assets":`/assets/${i()?.internalPath??"-/all"}`},...r()?[{key:"menu",label:n()("menu"),icon:"menu",link:"/menu"}]:[]]);var u=tte(),d=F(u);{let f=b(()=>n()("switch_page"));og(d,{get"aria-label"(){return l(f)},"aria-controls":"page-container",children:(h,p)=>{var g=X(),m=D(g);it(m,19,()=>l(c),({key:v,label:_,icon:y,link:w})=>v,(v,_,y)=>{let w=()=>l(_).key,x=()=>l(_).label,E=()=>l(_).icon,$=()=>l(_).link;{const C=A=>{Ze(A,{get name(){return E()}})};let k=b(()=>o()===w()),T=b(()=>l(y)+1);Pd(v,{variant:"ghost",iconic:!0,get selected(){return l(k)},get"aria-label"(){return x()},get keyShortcuts(){return`Alt+${l(T)??""}`},onclick:()=>{Wt($())},startIcon:C,$$slots:{startIcon:!0}})}}),S(h,g)},$$slots:{default:!0}})}S(t,u),ae(),a()}var rte=j('<div role="none" class="buttons"><!></div>');function ite(t,e){se(e,!0);const n=()=>V(Aw,"$hasOverlay",i),r=()=>V(ue,"$_",i),[i,o]=me();YB(t,{get inert(){return n()},children:(s,a)=>{{let c=b(()=>r()("global"));Ni(s,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=rte(),h=F(f);oN(h,{}),S(u,f)},$$slots:{default:!0}})}},$$slots:{default:!0}}),ae(),o()}var ote=j('<span class="version svelte-wmw2gz"> </span>');const ste={hash:"svelte-wmw2gz",code:".version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function ate(t,e){se(e,!0),Ee(t,ste);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();{const s=c=>{var u=X(),d=D(u);{var f=h=>{var p=ote(),g=F(p);Z(m=>{Te(p,"aria-label",`(${m??""})`),ne(g,`v${Jv}`)},[()=>n()("version_x",{values:{version:Jv}})]),S(h,p)};q(d,h=>{r().devModeEnabled&&h(f)})}S(c,u)};let a=b(()=>n()("release_notes"));vt(t,{get label(){return l(a)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:s,$$slots:{endIcon:!0}})}ae(),o()}var lte=j('<kbd class="svelte-13q15u"> </kbd>'),cte=j("<!> <!>",1),ute=j('<div role="none" class="wrapper svelte-13q15u"><!></div>');const dte={hash:"svelte-13q15u",code:".wrapper.svelte-13q15u {display:contents;}.wrapper.svelte-13q15u .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row .feature {flex:auto;}.wrapper.svelte-13q15u .table-row .keys {display:flex;gap:8px;}kbd.svelte-13q15u {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function fte(t,e){se(e,!0),Ee(t,dte);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"open",15,!1),s=I(e,"onClose",3,void 0);const a=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let c=ie("Ctrl");Ut(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&K(c,"⌘")});{let u=b(()=>n()("keyboard_shortcuts"));Ki(t,{get title(){return l(u)},size:"small",showOk:!1,showCancel:!1,showClose:!0,style:"--sui-dialog-small-content-max-height:auto",onClose:()=>{s()?.()},get open(){return o()},set open(d){o(d)},children:(d,f)=>{var h=ute(),p=F(h);{let g=b(()=>n()("keyboard_shortcuts"));F5(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=X(),y=D(_);it(y,17,()=>a,({feature:w,keys:x})=>x,(w,x)=>{let E=()=>l(x).feature,$=()=>l(x).keys;R5(w,{children:(C,k)=>{var T=cte(),A=D(T);t1(A,{class:"feature",children:(L,O)=>{var N=Fe();Z(M=>ne(N,M),[()=>n()(`keyboard_shortcuts_.${E()}`)]),S(L,N)},$$slots:{default:!0}});var P=z(A,2);t1(P,{class:"keys",children:(L,O)=>{var N=X(),M=D(N);it(M,17,()=>$().split("+"),dr,(U,H)=>{var G=lte(),W=F(G);Z(Y=>ne(W,Y),[()=>l(H).replace("Accel",l(c))]),S(U,G)}),S(L,N)},$$slots:{default:!0}}),S(C,T)},$$slots:{default:!0}})}),S(m,_)},$$slots:{default:!0}})}S(d,h)},$$slots:{default:!0}})}ae(),i()}var hte=j("<!> <!>",1);function pte(t,e){se(e,!0);const n=()=>V(xu,"$hasMouse",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=ie(!1);var a=hte(),c=D(a);{var u=f=>{{let h=b(()=>r()("keyboard_shortcuts"));vt(f,{get label(){return l(h)},onclick:()=>{K(s,!0)}})}};q(c,f=>{n()&&f(u)})}var d=z(c,2);fte(d,{onClose:()=>{e.menuButton?.focus()},get open(){return l(s)},set open(f){K(s,f,!0)}}),S(t,a),ae(),o()}function yc(t,e){se(e,!0);const n=()=>V(ft,"$prefs",r),[r,i]=me();let o=I(e,"defaultValue",3,!0),s=ie(!0);Me(()=>{K(s,!!(n()[e.key]??o()),!0)}),Me(()=>{n()[e.key]!==l(s)&&_t(ft,Se(n)[e.key]=l(s),Se(n))}),zy(t,{get label(){return e.label},get checked(){return l(s)},set checked(a){K(s,a,!0)}}),ae(),i()}var gte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function mte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();I(e,"onChange",3,void 0);var o=gte(),s=F(o),a=F(s),c=z(s,2),u=F(c),d=z(c,2),f=F(d);{let h=b(()=>n()("prefs.accessibility.underline_links.switch_label"));yc(f,{key:"underlineLinks",get label(){return l(h)}})}Z((h,p)=>{ne(a,h),ne(u,p)},[()=>n()("prefs.accessibility.underline_links.title"),()=>n()("prefs.accessibility.underline_links.description")]),S(t,o),ae(),i()}var vte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>'),bte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section> <section><h4> </h4> <p> </p> <div role="none"><!></div></section> <!>',1);function _te(t,e){se(e,!0);const n=()=>V(ue,"$_",o),r=()=>V(Nw,"$skipCIConfigured",o),i=()=>V(ft,"$prefs",o),[o,s]=me();let a=I(e,"onChange",3,void 0);var c=bte(),u=D(c),d=F(u),f=F(d),h=z(d,2),p=F(h),g=z(h,2),m=F(g);{let T=b(()=>n()("prefs.advanced.beta.switch_label"));yc(m,{key:"beta",get label(){return l(T)},defaultValue:!1})}var v=z(u,2),_=F(v),y=F(_),w=z(_,2),x=F(w),E=z(w,2),$=F(E);{let T=b(()=>n()("prefs.advanced.developer_mode.switch_label"));yc($,{key:"devModeEnabled",get label(){return l(T)},defaultValue:!1})}var C=z(v,2);{var k=T=>{var A=vte(),P=F(A),L=F(P),O=z(P,2),N=F(O),M=z(O,2),U=F(M);{let W=b(()=>n()("prefs.advanced.deploy_hook.url.field_label"));qn(U,{flex:!0,get"aria-label"(){return l(W)},showInlineLabel:!0,onchange:()=>{a()?.({message:n()(i().deployHookURL?"prefs.advanced.deploy_hook.url.saved":"prefs.advanced.deploy_hook.url.removed")})},get value(){return i().deployHookURL},set value(Y){_t(ft,Se(i).deployHookURL=Y,Se(i))}})}var H=z(M,2),G=F(H);{let W=b(()=>n()("prefs.advanced.deploy_hook.auth.field_label"));qn(G,{flex:!0,get"aria-label"(){return l(W)},showInlineLabel:!0,onchange:()=>{a()?.({message:n()(i().deployHookAuthHeader?"prefs.advanced.deploy_hook.auth.saved":"prefs.advanced.deploy_hook.auth.removed")})},get value(){return i().deployHookAuthHeader},set value(Y){_t(ft,Se(i).deployHookAuthHeader=Y,Se(i))}})}Z((W,Y)=>{ne(L,W),ne(N,Y)},[()=>n()("prefs.advanced.deploy_hook.title"),()=>n()("prefs.advanced.deploy_hook.description")]),S(T,A)};q(C,T=>{r()&&T(k)})}Z((T,A,P,L)=>{ne(f,T),ne(p,A),ne(y,P),ne(x,L)},[()=>n()("prefs.advanced.beta.title"),()=>n()("prefs.advanced.beta.description"),()=>n()("prefs.advanced.developer_mode.title"),()=>n()("prefs.advanced.developer_mode.description")]),S(t,c),ae(),s()}var yte=j('<section><h4> </h4> <div role="none"><!></div></section>');function wte(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();I(e,"onChange",3,void 0);var s=yte(),a=F(s),c=F(a),u=z(a,2),d=F(u);{let f=b(()=>n()("prefs.appearance.select_theme"));og(d,{get"aria-label"(){return l(f)},onChange:h=>{Ye(ft,{...r(),theme:h.detail.value})},children:(h,p)=>{var g=X(),m=D(g);it(m,16,()=>["auto","dark","light"],dr,(v,_)=>{{let y=b(()=>n()(`prefs.theme.${_}`)),w=b(()=>!r().theme&&_==="auto"||r().theme===_);Pd(v,{variant:"tertiary",get label(){return l(y)},get value(){return _},get selected(){return l(w)}})}}),S(h,g)},$$slots:{default:!0}})}Z(f=>ne(c,f),[()=>n()("prefs.appearance.theme")]),S(t,s),ae(),o()}var xte=j('<section><h4> </h4> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>');function kte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();I(e,"onChange",3,void 0);var o=xte(),s=F(o),a=F(s),c=z(s,2),u=F(c);{let g=b(()=>n()("prefs.contents.editor.use_draft_backup.switch_label"));yc(u,{key:"useDraftBackup",get label(){return l(g)}})}var d=z(c,2),f=F(d);{let g=b(()=>n()("prefs.contents.editor.close_on_save.switch_label"));yc(f,{key:"closeOnSave",get label(){return l(g)}})}var h=z(d,2),p=F(h);{let g=b(()=>n()("prefs.contents.editor.close_with_escape.switch_label"));yc(p,{key:"closeWithEscape",get label(){return l(g)}})}Z(g=>ne(a,g),[()=>n()("prefs.contents.editor.title")]),S(t,o),ae(),i()}var Ste=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Ete=j('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function Tte(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();let s=I(e,"onChange",3,void 0);var a=Ete(),c=D(a),u=F(c),d=F(u),f=z(u,2),h=F(f);rN(h,{});var p=z(c,2);it(p,17,()=>Object.entries(Bw),([g,m])=>g,(g,m)=>{var v=b(()=>ji(l(m),2));let _=()=>l(v)[0],y=()=>l(v)[1];const w=b(()=>{const{serviceLabel:L,apiLabel:O,developerURL:N,apiKeyURL:M}=y();return{serviceLabel:L,apiLabel:O,developerURL:N,apiKeyURL:M}});var x=Ste(),E=F(x),$=F(E),C=z(E,2),k=F(C);cr(k,()=>jr.sanitize(n()("prefs.i18n.translator.description",{values:{service:l(w).apiLabel,homeHref:`href="${l(w).developerURL}"`,apiKeyHref:`href="${l(w).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var T=z(C,2),A=F(T);{var P=L=>{{let O=b(()=>n()("prefs.i18n.translator.field_label",{values:{service:l(w).serviceLabel}}));gp(L,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(O)},onchange:()=>{s()?.({message:n()(r().apiKeys?.[_()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return r().apiKeys[_()]},set value(N){_t(ft,Se(r).apiKeys[_()]=N,Se(r))}})}};q(A,L=>{r().apiKeys&&L(P)})}Z(()=>ne($,l(w).serviceLabel)),S(g,x)}),Z(g=>ne(d,g),[()=>n()("prefs.i18n.default_translator.title")]),S(t,a),ae(),o()}var $te=j('<section><h4> </h4> <div role="none"><!></div></section>');function Cte(t,e){se(e,!0);const n=()=>V(ue,"$_",s),r=()=>V(qt,"$appLocale",s),i=()=>V(ft,"$prefs",s),o=()=>V(zT,"$appLocales",s),[s,a]=me();I(e,"onChange",3,void 0);var c=$te(),u=F(c),d=F(u),f=z(u,2),h=F(f);or(h,r,p=>{{let g=b(()=>n()("prefs.language.ui_language.select_language")),m=b(()=>r()??void 0);Al(p,{get"aria-label"(){return l(g)},get value(){return l(m)},onChange:v=>{Ye(ft,{...i(),locale:v.detail.value})},children:(v,_)=>{var y=X(),w=D(y);it(w,1,o,dr,(x,E)=>{{let $=b(()=>po(l(E),{displayLocale:l(E)})??l(E)),C=b(()=>l(E)===r());Tr(x,{get label(){return l($)},get value(){return l(E)},get selected(){return l(C)},dir:"auto"})}}),S(v,y)},$$slots:{default:!0}})}}),Z(p=>ne(d,p),[()=>n()("prefs.language.ui_language.title")]),S(t,c),ae(),a()}var Ate=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Pte=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Lte=j("<!> <!>",1),Nte=j('<div role="none"> </div>');function Ote(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();let s=I(e,"onChange",3,void 0);const a=b(()=>{const{providers:m=[]}=RL();return Object.entries(_p).filter(([v])=>m.includes(v))}),c=b(()=>Object.entries(Kw).filter(([,{isEnabled:m,authType:v}])=>(m?.()??!0)&&v!=="widget")),u=m=>jr.sanitize(m,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}),d=m=>{s()?.({message:n()(r().apiKeys?.[m]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})};var f=X(),h=D(f);{var p=m=>{var v=X(),_=D(v);{var y=w=>{var x=Lte(),E=D(x);it(E,17,()=>l(c),([C,k])=>C,(C,k)=>{var T=b(()=>ji(l(k),2));let A=()=>l(T)[0],P=()=>l(T)[1];const L=b(()=>{const{serviceLabel:Y}=P();return{serviceLabel:Y}});var O=Ate(),N=F(O),M=F(N),U=z(N,2),H=F(U);cr(H,()=>u(n()("prefs.media.cloud_storage.description",{values:{service:l(L).serviceLabel}})));var G=z(U,2),W=F(G);{let Y=b(()=>n()("prefs.media.cloud_storage.field_label",{values:{service:l(L).serviceLabel}}));gp(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(Y)},onchange:()=>d(A()),get value(){return r().apiKeys[A()]},set value(R){_t(ft,Se(r).apiKeys[A()]=R,Se(r))}})}Z(()=>ne(M,l(L).serviceLabel)),S(C,O)});var $=z(E,2);it($,17,()=>l(a),([C,k])=>C,(C,k)=>{var T=b(()=>ji(l(k),2));let A=()=>l(T)[0],P=()=>l(T)[1];const L=b(()=>{const{serviceLabel:Y,developerURL:R,apiKeyURL:B}=P();return{serviceLabel:Y,developerURL:R,apiKeyURL:B}});var O=Pte(),N=F(O),M=F(N),U=z(N,2),H=F(U);cr(H,()=>u(n()("prefs.media.stock_photos.description",{values:{service:l(L).serviceLabel,homeHref:`href="${l(L).developerURL}"`,apiKeyHref:`href="${l(L).apiKeyURL}"`}})));var G=z(U,2),W=F(G);{let Y=b(()=>n()("prefs.media.stock_photos.field_label",{values:{service:l(L).serviceLabel}}));gp(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(Y)},onchange:()=>d(A()),get value(){return r().apiKeys[A()]},set value(R){_t(ft,Se(r).apiKeys[A()]=R,Se(r))}})}Z(Y=>ne(M,Y),[()=>n()("prefs.media.stock_photos.title",{values:{service:l(L).serviceLabel}})]),S(C,O)}),S(w,x)};q(_,w=>{r().apiKeys&&w(y)})}S(m,v)},g=m=>{nr(m,{children:(v,_)=>{var y=Nte(),w=F(y);Z(x=>ne(w,x),[()=>n()("prefs.media.libraries_disabled")]),S(v,y)},$$slots:{default:!0}})};q(h,m=>{l(a).length||l(c).length?m(p):m(g,!1)})}S(t,f),ae(),o()}const wp=un([Ct],([t])=>[{key:"appearance",icon:"palette",component:wte},{key:"language",icon:"language",component:Cte},{key:"contents",icon:"library_books",component:kte},{key:"i18n",icon:"translate",component:Tte,enabled:(t?.i18n?.locales?.length??0)>1},{key:"media",icon:"photo_library",component:Ote},{key:"accessibility",icon:"accessibility_new",component:mte},{key:"advanced",icon:"build",component:_te}]);var Ite=j('<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>'),Rte=j("<!> <!>",1);const Dte={hash:"svelte-pwxwga",code:".wrapper.svelte-pwxwga {display:flex;}.wrapper.svelte-pwxwga .sui.tab-list {flex:none;}.wrapper.svelte-pwxwga .sui.tab-panel {flex:auto;border-width:0;}.wrapper.svelte-pwxwga .sui.tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel p {margin-top:0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 {font-size:inherit;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function Mte(t,e){se(e,!0),Ee(t,Dte);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"open",15,!1),s=I(e,"onClose",3,void 0),a=ie("appearance"),c=ie(""),u=ie(!1);var d=Rte(),f=D(d);{let p=b(()=>n()("settings"));Ki(f,{get title(){return l(p)},size:"large",showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{s()?.()},get open(){return o()},set open(g){o(g)},children:(g,m)=>{var v=Ite(),_=F(v);{let w=b(()=>n()("categories"));U5(_,{orientation:"vertical",get"aria-label"(){return l(w)},children:(x,E)=>{var $=X(),C=D($);it(C,17,()=>oe(wp),({key:k,icon:T,enabled:A=!0})=>k,(k,T)=>{let A=()=>l(T).key,P=()=>l(T).icon,L=h_(()=>st(l(T).enabled,!0));var O=X(),N=D(O);{var M=U=>{{const H=Y=>{Ze(Y,{get name(){return P()}})};let G=b(()=>n()(`prefs.${A()}.title`)),W=b(()=>A()===l(a));H5(U,{get label(){return l(G)},get selected(){return l(W)},get"aria-controls"(){return`prefs-tab-${A()??""}`},onSelect:()=>{K(a,A(),!0)},startIcon:H,$$slots:{startIcon:!0}})}};q(N,U=>{l(L)&&U(M)})}S(k,O)}),S(x,$)},$$slots:{default:!0}})}var y=z(_,2);it(y,17,()=>oe(wp),({key:w,component:x})=>w,(w,x)=>{let E=()=>l(x).key,$=()=>l(x).component;V5(w,{get id(){return`prefs-tab-${E()??""}`},children:(C,k)=>{var T=X(),A=D(T);ur(A,$,(P,L)=>{L(P,{onChange:({message:O})=>{K(c,O,!0),K(u,!0)}})}),S(C,T)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})}var h=z(f,2);Yn(h,{get show(){return l(u)},set show(p){K(u,p,!0)},children:(p,g)=>{Mn(p,{status:"success",children:(m,v)=>{var _=Fe();Z(()=>ne(_,l(c))),S(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),ae(),i()}var Fte=j("<!> <!>",1),zte=j("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),jte=j("<!> <!>",1);function sN(t,e){se(e,!0);const n=()=>V($l,"$backendName",u),r=()=>V(ue,"$_",u),i=()=>V(Un,"$user",u),o=()=>V(ft,"$prefs",u),s=()=>V(Tn,"$backend",u),a=()=>V(vn,"$isSmallScreen",u),c=()=>V(iN,"$canShowMobileSignInDialog",u),[u,d]=me();let f=ie(!1);const h=b(()=>n()==="local"),p=b(()=>n()==="test-repo");var g=jte(),m=D(g);{let _=b(()=>r()("account"));hr(m,{get"aria-label"(){return l(_)},children:(y,w)=>{var x=zte(),E=D(x);{let W=b(()=>l(h)?r()("working_with_local_repo"):l(p)?r()("working_with_test_repo"):r()("signed_in_as_x",{values:{name:i()?.login}})),Y=b(()=>l(h)||l(p));vt(E,{get label(){return l(W)},get disabled(){return l(Y)},onclick:()=>{window.open(i()?.profileURL,"_blank")}})}var $=z(E,2);ri($,{});var C=z($,2);{let W=b(()=>r()("live_site"));vt(C,{get label(){return l(W)},onclick:()=>{RP()}})}var k=z(C,2);{var T=W=>{var Y=Fte(),R=D(Y);{let J=b(()=>r()("git_repository")),Q=b(()=>!s()?.repository?.treeBaseURL);vt(R,{get label(){return l(J)},get disabled(){return l(Q)},onclick:()=>{window.open(s()?.repository?.treeBaseURL)}})}var B=z(R,2);{let J=b(()=>r()("cms_config"));vt(B,{get label(){return l(J)},onclick:()=>{Wt("/config",{transitionType:"forwards"})}})}S(W,Y)};q(k,W=>{o().devModeEnabled&&W(T)})}var A=z(k,2);ri(A,{});var P=z(A,2);{let W=b(()=>r()("settings"));vt(P,{get label(){return l(W)},onclick:()=>{a()?Wt("/settings",{transitionType:"forwards"}):K(f,!0)}})}var L=z(P,2);pte(L,{get menuButton(){return e.menuButton}});var O=z(L,2);{var N=W=>{ate(W,{})};q(O,W=>{o().devModeEnabled&&W(N)})}var M=z(O,2);{var U=W=>{{let Y=b(()=>r()("sign_in_with_mobile"));vt(W,{get label(){return l(Y)},onclick:()=>{Ye(yp,!0)}})}};q(M,W=>{c()&&W(U)})}var H=z(M,2);ri(H,{});var G=z(H,2);{let W=b(()=>r()("sign_out"));vt(G,{get label(){return l(W)},onclick:async()=>{window.requestAnimationFrame(()=>{qH()})}})}S(y,x)},$$slots:{default:!0}})}var v=z(m,2);Mte(v,{onClose:()=>{e.menuButton?.focus()},get open(){return l(f)},set open(_){K(f,_,!0)}}),S(t,g),ae(),d()}var Ute=j('<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>'),Bte=j('<div role="none" class="wrapper svelte-q0ng4j"><!></div>');const qte={hash:"svelte-q0ng4j",code:".wrapper.svelte-q0ng4j {display:contents;}.wrapper.svelte-q0ng4j button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function Vte(t,e){se(e,!0),Ee(t,qte);const n=()=>V($l,"$backendName",o),r=()=>V(Un,"$user",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=ie(void 0);const c=b(()=>n()==="local"),u=b(()=>!!r()?.avatarURL);var d=Bte(),f=F(d);{const h=y=>{var w=X(),x=D(w);{var E=C=>{Ze(C,{name:"arrow_drop_down",class:"small-arrow"})},$=C=>{var k=X(),T=D(k);{var A=L=>{var O=Ute();Z(()=>Te(O,"src",r()?.avatarURL)),S(L,O)},P=L=>{Ze(L,{name:"account_circle"})};q(T,L=>{l(u)?L(A):L(P,!1)},!0)}S(C,k)};q(x,C=>{l(c)?C(E):C($,!1)})}S(y,w)},p=y=>{sN(y,{get menuButton(){return l(a)}})};let g=b(()=>!l(c)),m=b(()=>l(c)?i()("local_backend.indicator"):void 0),v=b(()=>l(u)?"avatar":""),_=b(()=>i()("show_account_menu"));xt(Ur(f,{variant:"ghost",get iconic(){return l(g)},get label(){return l(m)},get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:h,popup:p,$$slots:{endIcon:!0,popup:!0}}),y=>K(a,y,!0),()=>l(a))}S(t,d),ae(),s()}var Hte=j("<!> <!>",1),Kte=j("<!> <!>",1);function Gte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>ga({visible:!0,type:"entry"}));{const s=u=>{Ze(u,{name:"add"})},a=u=>{{let d=b(()=>n()("create_entry_or_assets"));hr(u,{get"aria-label"(){return l(d)},children:(f,h)=>{var p=Kte(),g=D(p);{var m=_=>{var y=Hte(),w=D(y);it(w,17,()=>l(o),E=>E.name,(E,$)=>{const C=b(()=>{const{name:k,label:T,label_singular:A,create:P=!1,limit:L=1/0}=l($);return{name:k,label:T,labelSingular:A,create:P,limit:L}});{let k=b(()=>l(C).labelSingular||l(C).label||l(C).name),T=b(()=>!l(C).create||Wo(l(C).name).length>=l(C).limit);vt(E,{get label(){return l(k)},get disabled(){return l(T)},onclick:()=>{Wt(`/collections/${l(C).name}/new`,{transitionType:"forwards"})}})}});var x=z(w,2);ri(x,{}),S(_,y)};q(g,_=>{l(o).length&&_(m)})}var v=z(g,2);{let _=b(()=>n()("assets"));vt(v,{get label(){return l(_)},onclick:async()=>{Wt("/assets",{transitionType:"forwards"}),await Nt(100),Ye(Ds,!0)}})}S(f,p)},$$slots:{default:!0}})}};let c=b(()=>n()("create_entry_or_assets"));Ur(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(c)},endIcon:s,popup:a,$$slots:{endIcon:!0,popup:!0}})}ae(),i()}function Wte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();{const o=a=>{Ze(a,{name:"notifications"})};let s=b(()=>n()("show_notifications"));et(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:o,$$slots:{startIcon:!0}})}ae(),i()}var Yte=j('<img loading="lazy" alt="" class="logo svelte-15c9hhi"/>');const Jte={hash:"svelte-15c9hhi",code:"img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}"};function Xte(t,e){se(e,!0),Ee(t,Jte);const n=()=>V(Ct,"$cmsConfig",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=b(()=>n()?.logo?.src??n()?.logo_url),a=b(()=>n()?.logo?.show_in_header??!0);var c=X(),u=D(c);{var d=f=>{{let h=b(()=>r()("visit_live_site"));et(f,{variant:"ghost",iconic:!0,get"aria-label"(){return l(h)},onclick:()=>{RP()},children:(p,g)=>{var m=Yte();Z(()=>Te(m,"src",l(s))),S(p,m)},$$slots:{default:!0}})}};q(u,f=>{l(s)&&l(a)&&f(d)})}S(t,c),ae(),o()}var Zte=j('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),Qte=j('<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>');const ene={hash:"svelte-1kz79fh",code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;}.toolbar-wrapper[inert].svelte-1kz79fh {display:none;}
|
|
657
|
+
}.wrapper.svelte-t2r4ty .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}`};function oN(t,e){se(e,!0),Ee(t,nte);const n=()=>V(ue,"$_",s),r=()=>V(vn,"$isSmallScreen",s),i=()=>V(to,"$selectedAssetFolder",s),o=()=>V(Zb,"$selectedPageName",s),[s,a]=me(),c=b(()=>[{key:"collections",label:n()("contents"),icon:"library_books",link:"/collections"},{key:"assets",label:n()("assets"),icon:"photo_library",link:r()?"/assets":`/assets/${i()?.internalPath??"-/all"}`},...r()?[{key:"menu",label:n()("menu"),icon:"menu",link:"/menu"}]:[]]);var u=tte(),d=F(u);{let f=b(()=>n()("switch_page"));og(d,{get"aria-label"(){return l(f)},"aria-controls":"page-container",children:(h,p)=>{var g=X(),m=D(g);it(m,19,()=>l(c),({key:v,label:_,icon:y,link:w})=>v,(v,_,y)=>{let w=()=>l(_).key,x=()=>l(_).label,E=()=>l(_).icon,$=()=>l(_).link;{const C=A=>{Ze(A,{get name(){return E()}})};let k=b(()=>o()===w()),T=b(()=>l(y)+1);Pd(v,{variant:"ghost",iconic:!0,get selected(){return l(k)},get"aria-label"(){return x()},get keyShortcuts(){return`Alt+${l(T)??""}`},onclick:()=>{Wt($())},startIcon:C,$$slots:{startIcon:!0}})}}),S(h,g)},$$slots:{default:!0}})}S(t,u),ae(),a()}var rte=j('<div role="none" class="buttons"><!></div>');function ite(t,e){se(e,!0);const n=()=>V(Aw,"$hasOverlay",i),r=()=>V(ue,"$_",i),[i,o]=me();YB(t,{get inert(){return n()},children:(s,a)=>{{let c=b(()=>r()("global"));Ni(s,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=rte(),h=F(f);oN(h,{}),S(u,f)},$$slots:{default:!0}})}},$$slots:{default:!0}}),ae(),o()}var ote=j('<span class="version svelte-wmw2gz"> </span>');const ste={hash:"svelte-wmw2gz",code:".version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function ate(t,e){se(e,!0),Ee(t,ste);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();{const s=c=>{var u=X(),d=D(u);{var f=h=>{var p=ote(),g=F(p);Z(m=>{Te(p,"aria-label",`(${m??""})`),ne(g,`v${Jv}`)},[()=>n()("version_x",{values:{version:Jv}})]),S(h,p)};q(d,h=>{r().devModeEnabled&&h(f)})}S(c,u)};let a=b(()=>n()("release_notes"));vt(t,{get label(){return l(a)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:s,$$slots:{endIcon:!0}})}ae(),o()}var lte=j('<kbd class="svelte-13q15u"> </kbd>'),cte=j("<!> <!>",1),ute=j('<div role="none" class="wrapper svelte-13q15u"><!></div>');const dte={hash:"svelte-13q15u",code:".wrapper.svelte-13q15u {display:contents;}.wrapper.svelte-13q15u .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-13q15u .table-row .feature {flex:auto;}.wrapper.svelte-13q15u .table-row .keys {display:flex;gap:8px;}kbd.svelte-13q15u {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function fte(t,e){se(e,!0),Ee(t,dte);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"open",15,!1),s=I(e,"onClose",3,void 0);const a=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let c=ie("Ctrl");Ut(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&K(c,"⌘")});{let u=b(()=>n()("keyboard_shortcuts"));Ki(t,{get title(){return l(u)},size:"small",showOk:!1,showCancel:!1,showClose:!0,style:"--sui-dialog-small-content-max-height:auto",onClose:()=>{s()?.()},get open(){return o()},set open(d){o(d)},children:(d,f)=>{var h=ute(),p=F(h);{let g=b(()=>n()("keyboard_shortcuts"));F5(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=X(),y=D(_);it(y,17,()=>a,({feature:w,keys:x})=>x,(w,x)=>{let E=()=>l(x).feature,$=()=>l(x).keys;R5(w,{children:(C,k)=>{var T=cte(),A=D(T);t1(A,{class:"feature",children:(L,O)=>{var N=Fe();Z(M=>ne(N,M),[()=>n()(`keyboard_shortcuts_.${E()}`)]),S(L,N)},$$slots:{default:!0}});var P=z(A,2);t1(P,{class:"keys",children:(L,O)=>{var N=X(),M=D(N);it(M,17,()=>$().split("+"),dr,(U,H)=>{var G=lte(),W=F(G);Z(Y=>ne(W,Y),[()=>l(H).replace("Accel",l(c))]),S(U,G)}),S(L,N)},$$slots:{default:!0}}),S(C,T)},$$slots:{default:!0}})}),S(m,_)},$$slots:{default:!0}})}S(d,h)},$$slots:{default:!0}})}ae(),i()}var hte=j("<!> <!>",1);function pte(t,e){se(e,!0);const n=()=>V(xu,"$hasMouse",i),r=()=>V(ue,"$_",i),[i,o]=me();let s=ie(!1);var a=hte(),c=D(a);{var u=f=>{{let h=b(()=>r()("keyboard_shortcuts"));vt(f,{get label(){return l(h)},onclick:()=>{K(s,!0)}})}};q(c,f=>{n()&&f(u)})}var d=z(c,2);fte(d,{onClose:()=>{e.menuButton?.focus()},get open(){return l(s)},set open(f){K(s,f,!0)}}),S(t,a),ae(),o()}function yc(t,e){se(e,!0);const n=()=>V(ft,"$prefs",r),[r,i]=me();let o=I(e,"defaultValue",3,!0),s=ie(!0);Me(()=>{K(s,!!(n()[e.key]??o()),!0)}),Me(()=>{n()[e.key]!==l(s)&&_t(ft,Se(n)[e.key]=l(s),Se(n))}),zy(t,{get label(){return e.label},get checked(){return l(s)},set checked(a){K(s,a,!0)}}),ae(),i()}var gte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function mte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();I(e,"onChange",3,void 0);var o=gte(),s=F(o),a=F(s),c=z(s,2),u=F(c),d=z(c,2),f=F(d);{let h=b(()=>n()("prefs.accessibility.underline_links.switch_label"));yc(f,{key:"underlineLinks",get label(){return l(h)}})}Z((h,p)=>{ne(a,h),ne(u,p)},[()=>n()("prefs.accessibility.underline_links.title"),()=>n()("prefs.accessibility.underline_links.description")]),S(t,o),ae(),i()}var vte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>'),bte=j('<section><h4> </h4> <p> </p> <div role="none"><!></div></section> <section><h4> </h4> <p> </p> <div role="none"><!></div></section> <!>',1);function _te(t,e){se(e,!0);const n=()=>V(ue,"$_",o),r=()=>V(Nw,"$skipCIConfigured",o),i=()=>V(ft,"$prefs",o),[o,s]=me();let a=I(e,"onChange",3,void 0);var c=bte(),u=D(c),d=F(u),f=F(d),h=z(d,2),p=F(h),g=z(h,2),m=F(g);{let T=b(()=>n()("prefs.advanced.beta.switch_label"));yc(m,{key:"beta",get label(){return l(T)},defaultValue:!1})}var v=z(u,2),_=F(v),y=F(_),w=z(_,2),x=F(w),E=z(w,2),$=F(E);{let T=b(()=>n()("prefs.advanced.developer_mode.switch_label"));yc($,{key:"devModeEnabled",get label(){return l(T)},defaultValue:!1})}var C=z(v,2);{var k=T=>{var A=vte(),P=F(A),L=F(P),O=z(P,2),N=F(O),M=z(O,2),U=F(M);{let W=b(()=>n()("prefs.advanced.deploy_hook.url.field_label"));qn(U,{flex:!0,get"aria-label"(){return l(W)},showInlineLabel:!0,onchange:()=>{a()?.({message:n()(i().deployHookURL?"prefs.advanced.deploy_hook.url.saved":"prefs.advanced.deploy_hook.url.removed")})},get value(){return i().deployHookURL},set value(Y){_t(ft,Se(i).deployHookURL=Y,Se(i))}})}var H=z(M,2),G=F(H);{let W=b(()=>n()("prefs.advanced.deploy_hook.auth.field_label"));qn(G,{flex:!0,get"aria-label"(){return l(W)},showInlineLabel:!0,onchange:()=>{a()?.({message:n()(i().deployHookAuthHeader?"prefs.advanced.deploy_hook.auth.saved":"prefs.advanced.deploy_hook.auth.removed")})},get value(){return i().deployHookAuthHeader},set value(Y){_t(ft,Se(i).deployHookAuthHeader=Y,Se(i))}})}Z((W,Y)=>{ne(L,W),ne(N,Y)},[()=>n()("prefs.advanced.deploy_hook.title"),()=>n()("prefs.advanced.deploy_hook.description")]),S(T,A)};q(C,T=>{r()&&T(k)})}Z((T,A,P,L)=>{ne(f,T),ne(p,A),ne(y,P),ne(x,L)},[()=>n()("prefs.advanced.beta.title"),()=>n()("prefs.advanced.beta.description"),()=>n()("prefs.advanced.developer_mode.title"),()=>n()("prefs.advanced.developer_mode.description")]),S(t,c),ae(),s()}var yte=j('<section><h4> </h4> <div role="none"><!></div></section>');function wte(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();I(e,"onChange",3,void 0);var s=yte(),a=F(s),c=F(a),u=z(a,2),d=F(u);{let f=b(()=>n()("prefs.appearance.select_theme"));og(d,{get"aria-label"(){return l(f)},onChange:h=>{Ye(ft,{...r(),theme:h.detail.value})},children:(h,p)=>{var g=X(),m=D(g);it(m,16,()=>["auto","dark","light"],dr,(v,_)=>{{let y=b(()=>n()(`prefs.theme.${_}`)),w=b(()=>!r().theme&&_==="auto"||r().theme===_);Pd(v,{variant:"tertiary",get label(){return l(y)},get value(){return _},get selected(){return l(w)}})}}),S(h,g)},$$slots:{default:!0}})}Z(f=>ne(c,f),[()=>n()("prefs.appearance.theme")]),S(t,s),ae(),o()}var xte=j('<section><h4> </h4> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>');function kte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();I(e,"onChange",3,void 0);var o=xte(),s=F(o),a=F(s),c=z(s,2),u=F(c);{let g=b(()=>n()("prefs.contents.editor.use_draft_backup.switch_label"));yc(u,{key:"useDraftBackup",get label(){return l(g)}})}var d=z(c,2),f=F(d);{let g=b(()=>n()("prefs.contents.editor.close_on_save.switch_label"));yc(f,{key:"closeOnSave",get label(){return l(g)}})}var h=z(d,2),p=F(h);{let g=b(()=>n()("prefs.contents.editor.close_with_escape.switch_label"));yc(p,{key:"closeWithEscape",get label(){return l(g)}})}Z(g=>ne(a,g),[()=>n()("prefs.contents.editor.title")]),S(t,o),ae(),i()}var Ste=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Ete=j('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function Tte(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();let s=I(e,"onChange",3,void 0);var a=Ete(),c=D(a),u=F(c),d=F(u),f=z(u,2),h=F(f);rN(h,{});var p=z(c,2);it(p,17,()=>Object.entries(Bw),([g,m])=>g,(g,m)=>{var v=b(()=>ji(l(m),2));let _=()=>l(v)[0],y=()=>l(v)[1];const w=b(()=>{const{serviceLabel:L,apiLabel:O,developerURL:N,apiKeyURL:M}=y();return{serviceLabel:L,apiLabel:O,developerURL:N,apiKeyURL:M}});var x=Ste(),E=F(x),$=F(E),C=z(E,2),k=F(C);cr(k,()=>jr.sanitize(n()("prefs.i18n.translator.description",{values:{service:l(w).apiLabel,homeHref:`href="${l(w).developerURL}"`,apiKeyHref:`href="${l(w).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var T=z(C,2),A=F(T);{var P=L=>{{let O=b(()=>n()("prefs.i18n.translator.field_label",{values:{service:l(w).serviceLabel}}));gp(L,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(O)},onchange:()=>{s()?.({message:n()(r().apiKeys?.[_()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return r().apiKeys[_()]},set value(N){_t(ft,Se(r).apiKeys[_()]=N,Se(r))}})}};q(A,L=>{r().apiKeys&&L(P)})}Z(()=>ne($,l(w).serviceLabel)),S(g,x)}),Z(g=>ne(d,g),[()=>n()("prefs.i18n.default_translator.title")]),S(t,a),ae(),o()}var $te=j('<section><h4> </h4> <div role="none"><!></div></section>');function Cte(t,e){se(e,!0);const n=()=>V(ue,"$_",s),r=()=>V(qt,"$appLocale",s),i=()=>V(ft,"$prefs",s),o=()=>V(zT,"$appLocales",s),[s,a]=me();I(e,"onChange",3,void 0);var c=$te(),u=F(c),d=F(u),f=z(u,2),h=F(f);or(h,r,p=>{{let g=b(()=>n()("prefs.language.ui_language.select_language")),m=b(()=>r()??void 0);Al(p,{get"aria-label"(){return l(g)},get value(){return l(m)},onChange:v=>{Ye(ft,{...i(),locale:v.detail.value})},children:(v,_)=>{var y=X(),w=D(y);it(w,1,o,dr,(x,E)=>{{let $=b(()=>po(l(E),{displayLocale:l(E)})??l(E)),C=b(()=>l(E)===r());Tr(x,{get label(){return l($)},get value(){return l(E)},get selected(){return l(C)},dir:"auto"})}}),S(v,y)},$$slots:{default:!0}})}}),Z(p=>ne(d,p),[()=>n()("prefs.language.ui_language.title")]),S(t,c),ae(),a()}var Ate=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Pte=j('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),Lte=j("<!> <!>",1),Nte=j('<div role="none"> </div>');function Ote(t,e){se(e,!0);const n=()=>V(ue,"$_",i),r=()=>V(ft,"$prefs",i),[i,o]=me();let s=I(e,"onChange",3,void 0);const a=b(()=>{const{providers:m=[]}=RL();return Object.entries(_p).filter(([v])=>m.includes(v))}),c=b(()=>Object.entries(Kw).filter(([,{isEnabled:m,authType:v}])=>(m?.()??!0)&&v!=="widget")),u=m=>jr.sanitize(m,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}),d=m=>{s()?.({message:n()(r().apiKeys?.[m]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})};var f=X(),h=D(f);{var p=m=>{var v=X(),_=D(v);{var y=w=>{var x=Lte(),E=D(x);it(E,17,()=>l(c),([C,k])=>C,(C,k)=>{var T=b(()=>ji(l(k),2));let A=()=>l(T)[0],P=()=>l(T)[1];const L=b(()=>{const{serviceLabel:Y}=P();return{serviceLabel:Y}});var O=Ate(),N=F(O),M=F(N),U=z(N,2),H=F(U);cr(H,()=>u(n()("prefs.media.cloud_storage.description",{values:{service:l(L).serviceLabel}})));var G=z(U,2),W=F(G);{let Y=b(()=>n()("prefs.media.cloud_storage.field_label",{values:{service:l(L).serviceLabel}}));gp(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(Y)},onchange:()=>d(A()),get value(){return r().apiKeys[A()]},set value(R){_t(ft,Se(r).apiKeys[A()]=R,Se(r))}})}Z(()=>ne(M,l(L).serviceLabel)),S(C,O)});var $=z(E,2);it($,17,()=>l(a),([C,k])=>C,(C,k)=>{var T=b(()=>ji(l(k),2));let A=()=>l(T)[0],P=()=>l(T)[1];const L=b(()=>{const{serviceLabel:Y,developerURL:R,apiKeyURL:B}=P();return{serviceLabel:Y,developerURL:R,apiKeyURL:B}});var O=Pte(),N=F(O),M=F(N),U=z(N,2),H=F(U);cr(H,()=>u(n()("prefs.media.stock_photos.description",{values:{service:l(L).serviceLabel,homeHref:`href="${l(L).developerURL}"`,apiKeyHref:`href="${l(L).apiKeyURL}"`}})));var G=z(U,2),W=F(G);{let Y=b(()=>n()("prefs.media.stock_photos.field_label",{values:{service:l(L).serviceLabel}}));gp(W,{flex:!0,autocomplete:"off",spellcheck:"false",get"aria-label"(){return l(Y)},onchange:()=>d(A()),get value(){return r().apiKeys[A()]},set value(R){_t(ft,Se(r).apiKeys[A()]=R,Se(r))}})}Z(Y=>ne(M,Y),[()=>n()("prefs.media.stock_photos.title",{values:{service:l(L).serviceLabel}})]),S(C,O)}),S(w,x)};q(_,w=>{r().apiKeys&&w(y)})}S(m,v)},g=m=>{nr(m,{children:(v,_)=>{var y=Nte(),w=F(y);Z(x=>ne(w,x),[()=>n()("prefs.media.libraries_disabled")]),S(v,y)},$$slots:{default:!0}})};q(h,m=>{l(a).length||l(c).length?m(p):m(g,!1)})}S(t,f),ae(),o()}const wp=un([Ct],([t])=>[{key:"appearance",icon:"palette",component:wte},{key:"language",icon:"language",component:Cte},{key:"contents",icon:"library_books",component:kte},{key:"i18n",icon:"translate",component:Tte,enabled:(t?.i18n?.locales?.length??0)>1},{key:"media",icon:"photo_library",component:Ote},{key:"accessibility",icon:"accessibility_new",component:mte},{key:"advanced",icon:"build",component:_te}]);var Ite=j('<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>'),Rte=j("<!> <!>",1);const Dte={hash:"svelte-pwxwga",code:".wrapper.svelte-pwxwga {display:flex;}.wrapper.svelte-pwxwga .sui.tab-list {flex:none;}.wrapper.svelte-pwxwga .sui.tab-panel {flex:auto;border-width:0;}.wrapper.svelte-pwxwga .sui.tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel p {margin-top:0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 {font-size:inherit;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-pwxwga .sui.tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function Mte(t,e){se(e,!0),Ee(t,Dte);const n=()=>V(ue,"$_",r),[r,i]=me();let o=I(e,"open",15,!1),s=I(e,"onClose",3,void 0),a=ie("appearance"),c=ie(""),u=ie(!1);var d=Rte(),f=D(d);{let p=b(()=>n()("settings"));Ki(f,{get title(){return l(p)},size:"large",showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{s()?.()},get open(){return o()},set open(g){o(g)},children:(g,m)=>{var v=Ite(),_=F(v);{let w=b(()=>n()("categories"));U5(_,{orientation:"vertical",get"aria-label"(){return l(w)},children:(x,E)=>{var $=X(),C=D($);it(C,17,()=>oe(wp),({key:k,icon:T,enabled:A=!0})=>k,(k,T)=>{let A=()=>l(T).key,P=()=>l(T).icon,L=h_(()=>st(l(T).enabled,!0));var O=X(),N=D(O);{var M=U=>{{const H=Y=>{Ze(Y,{get name(){return P()}})};let G=b(()=>n()(`prefs.${A()}.title`)),W=b(()=>A()===l(a));H5(U,{get label(){return l(G)},get selected(){return l(W)},get"aria-controls"(){return`prefs-tab-${A()??""}`},onSelect:()=>{K(a,A(),!0)},startIcon:H,$$slots:{startIcon:!0}})}};q(N,U=>{l(L)&&U(M)})}S(k,O)}),S(x,$)},$$slots:{default:!0}})}var y=z(_,2);it(y,17,()=>oe(wp),({key:w,component:x})=>w,(w,x)=>{let E=()=>l(x).key,$=()=>l(x).component;V5(w,{get id(){return`prefs-tab-${E()??""}`},children:(C,k)=>{var T=X(),A=D(T);ur(A,$,(P,L)=>{L(P,{onChange:({message:O})=>{K(c,O,!0),K(u,!0)}})}),S(C,T)},$$slots:{default:!0}})}),S(g,v)},$$slots:{default:!0}})}var h=z(f,2);Yn(h,{get show(){return l(u)},set show(p){K(u,p,!0)},children:(p,g)=>{Mn(p,{status:"success",children:(m,v)=>{var _=Fe();Z(()=>ne(_,l(c))),S(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),ae(),i()}var Fte=j("<!> <!>",1),zte=j("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),jte=j("<!> <!>",1);function sN(t,e){se(e,!0);const n=()=>V($l,"$backendName",u),r=()=>V(ue,"$_",u),i=()=>V(Fn,"$user",u),o=()=>V(ft,"$prefs",u),s=()=>V(Tn,"$backend",u),a=()=>V(vn,"$isSmallScreen",u),c=()=>V(iN,"$canShowMobileSignInDialog",u),[u,d]=me();let f=ie(!1);const h=b(()=>n()==="local"),p=b(()=>n()==="test-repo");var g=jte(),m=D(g);{let _=b(()=>r()("account"));hr(m,{get"aria-label"(){return l(_)},children:(y,w)=>{var x=zte(),E=D(x);{let W=b(()=>l(h)?r()("working_with_local_repo"):l(p)?r()("working_with_test_repo"):r()("signed_in_as_x",{values:{name:i()?.login}})),Y=b(()=>l(h)||l(p));vt(E,{get label(){return l(W)},get disabled(){return l(Y)},onclick:()=>{window.open(i()?.profileURL,"_blank")}})}var $=z(E,2);ri($,{});var C=z($,2);{let W=b(()=>r()("live_site"));vt(C,{get label(){return l(W)},onclick:()=>{RP()}})}var k=z(C,2);{var T=W=>{var Y=Fte(),R=D(Y);{let J=b(()=>r()("git_repository")),Q=b(()=>!s()?.repository?.treeBaseURL);vt(R,{get label(){return l(J)},get disabled(){return l(Q)},onclick:()=>{window.open(s()?.repository?.treeBaseURL)}})}var B=z(R,2);{let J=b(()=>r()("cms_config"));vt(B,{get label(){return l(J)},onclick:()=>{Wt("/config",{transitionType:"forwards"})}})}S(W,Y)};q(k,W=>{o().devModeEnabled&&W(T)})}var A=z(k,2);ri(A,{});var P=z(A,2);{let W=b(()=>r()("settings"));vt(P,{get label(){return l(W)},onclick:()=>{a()?Wt("/settings",{transitionType:"forwards"}):K(f,!0)}})}var L=z(P,2);pte(L,{get menuButton(){return e.menuButton}});var O=z(L,2);{var N=W=>{ate(W,{})};q(O,W=>{o().devModeEnabled&&W(N)})}var M=z(O,2);{var U=W=>{{let Y=b(()=>r()("sign_in_with_mobile"));vt(W,{get label(){return l(Y)},onclick:()=>{Ye(yp,!0)}})}};q(M,W=>{c()&&W(U)})}var H=z(M,2);ri(H,{});var G=z(H,2);{let W=b(()=>r()("sign_out"));vt(G,{get label(){return l(W)},onclick:async()=>{window.requestAnimationFrame(()=>{qH()})}})}S(y,x)},$$slots:{default:!0}})}var v=z(m,2);Mte(v,{onClose:()=>{e.menuButton?.focus()},get open(){return l(f)},set open(_){K(f,_,!0)}}),S(t,g),ae(),d()}var Ute=j('<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>'),Bte=j('<div role="none" class="wrapper svelte-q0ng4j"><!></div>');const qte={hash:"svelte-q0ng4j",code:".wrapper.svelte-q0ng4j {display:contents;}.wrapper.svelte-q0ng4j button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function Vte(t,e){se(e,!0),Ee(t,qte);const n=()=>V($l,"$backendName",o),r=()=>V(Fn,"$user",o),i=()=>V(ue,"$_",o),[o,s]=me();let a=ie(void 0);const c=b(()=>n()==="local"),u=b(()=>!!r()?.avatarURL);var d=Bte(),f=F(d);{const h=y=>{var w=X(),x=D(w);{var E=C=>{Ze(C,{name:"arrow_drop_down",class:"small-arrow"})},$=C=>{var k=X(),T=D(k);{var A=L=>{var O=Ute();Z(()=>Te(O,"src",r()?.avatarURL)),S(L,O)},P=L=>{Ze(L,{name:"account_circle"})};q(T,L=>{l(u)?L(A):L(P,!1)},!0)}S(C,k)};q(x,C=>{l(c)?C(E):C($,!1)})}S(y,w)},p=y=>{sN(y,{get menuButton(){return l(a)}})};let g=b(()=>!l(c)),m=b(()=>l(c)?i()("local_backend.indicator"):void 0),v=b(()=>l(u)?"avatar":""),_=b(()=>i()("show_account_menu"));xt(Ur(f,{variant:"ghost",get iconic(){return l(g)},get label(){return l(m)},get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:h,popup:p,$$slots:{endIcon:!0,popup:!0}}),y=>K(a,y,!0),()=>l(a))}S(t,d),ae(),s()}var Hte=j("<!> <!>",1),Kte=j("<!> <!>",1);function Gte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me(),o=b(()=>ga({visible:!0,type:"entry"}));{const s=u=>{Ze(u,{name:"add"})},a=u=>{{let d=b(()=>n()("create_entry_or_assets"));hr(u,{get"aria-label"(){return l(d)},children:(f,h)=>{var p=Kte(),g=D(p);{var m=_=>{var y=Hte(),w=D(y);it(w,17,()=>l(o),E=>E.name,(E,$)=>{const C=b(()=>{const{name:k,label:T,label_singular:A,create:P=!1,limit:L=1/0}=l($);return{name:k,label:T,labelSingular:A,create:P,limit:L}});{let k=b(()=>l(C).labelSingular||l(C).label||l(C).name),T=b(()=>!l(C).create||Wo(l(C).name).length>=l(C).limit);vt(E,{get label(){return l(k)},get disabled(){return l(T)},onclick:()=>{Wt(`/collections/${l(C).name}/new`,{transitionType:"forwards"})}})}});var x=z(w,2);ri(x,{}),S(_,y)};q(g,_=>{l(o).length&&_(m)})}var v=z(g,2);{let _=b(()=>n()("assets"));vt(v,{get label(){return l(_)},onclick:async()=>{Wt("/assets",{transitionType:"forwards"}),await Nt(100),Ye(Ds,!0)}})}S(f,p)},$$slots:{default:!0}})}};let c=b(()=>n()("create_entry_or_assets"));Ur(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(c)},endIcon:s,popup:a,$$slots:{endIcon:!0,popup:!0}})}ae(),i()}function Wte(t,e){se(e,!0);const n=()=>V(ue,"$_",r),[r,i]=me();{const o=a=>{Ze(a,{name:"notifications"})};let s=b(()=>n()("show_notifications"));et(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:o,$$slots:{startIcon:!0}})}ae(),i()}var Yte=j('<img loading="lazy" alt="" class="logo svelte-15c9hhi"/>');const Jte={hash:"svelte-15c9hhi",code:"img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}"};function Xte(t,e){se(e,!0),Ee(t,Jte);const n=()=>V(Ct,"$cmsConfig",i),r=()=>V(ue,"$_",i),[i,o]=me(),s=b(()=>n()?.logo?.src??n()?.logo_url),a=b(()=>n()?.logo?.show_in_header??!0);var c=X(),u=D(c);{var d=f=>{{let h=b(()=>r()("visit_live_site"));et(f,{variant:"ghost",iconic:!0,get"aria-label"(){return l(h)},onclick:()=>{RP()},children:(p,g)=>{var m=Yte();Z(()=>Te(m,"src",l(s))),S(p,m)},$$slots:{default:!0}})}};q(u,f=>{l(s)&&l(a)&&f(d)})}S(t,c),ae(),o()}var Zte=j('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),Qte=j('<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>');const ene={hash:"svelte-1kz79fh",code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;}.toolbar-wrapper[inert].svelte-1kz79fh {display:none;}
|
|
658
658
|
@media (width < 768px) {.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar {padding:0 4px;}
|
|
659
659
|
}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .sui.search-bar {flex:none;width:640px;max-width:50%;}
|
|
660
660
|
@media (width < 768px) {.toolbar-wrapper.svelte-1kz79fh > .sui.toolbar .sui.search-bar {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;max-width:none;}
|
|
@@ -665,7 +665,7 @@ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},pv=n,p
|
|
|
665
665
|
The chosen QR Code version cannot contain this amount of data.
|
|
666
666
|
Minimum version required to store current data is: `+P+`.
|
|
667
667
|
`);const L=w(C,k,A),O=t.getSymbolSize(C),N=new r(O);return p(N,C),g(N),m(N,C),_(N,k,0),C>=7&&v(N,C),y(N,L),isNaN(T)&&(T=s.getBestMask(N,_.bind(null,N,k))),s.applyMask(T,N),_(N,k,T),{modules:N,version:C,errorCorrectionLevel:k,maskPattern:T,segments:A}}return Xm.create=function(C,k){if(typeof C>"u"||C==="")throw new Error("No input text");let T=e.M,A,P;return typeof k<"u"&&(T=e.from(k.errorCorrectionLevel,e.M),A=u.from(k.version),P=s.from(k.maskPattern),k.toSJISFunc&&t.setToSJISFunction(k.toSJISFunc)),E(C,A,T,P)},Xm}var mv={},vv={},cE;function uN(){return cE||(cE=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:i,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},t.getImageWidth=function(r,i){const o=t.getScale(r,i);return Math.floor((r+i.margin*2)*o)},t.qrToImageData=function(r,i,o){const s=i.modules.size,a=i.modules.data,c=t.getScale(s,o),u=Math.floor((s+o.margin*2)*c),d=o.margin*c,f=[o.color.light,o.color.dark];for(let h=0;h<u;h++)for(let p=0;p<u;p++){let g=(h*u+p)*4,m=o.color.light;if(h>=d&&p>=d&&h<u-d&&p<u-d){const v=Math.floor((h-d)/c),_=Math.floor((p-d)/c);m=f[a[v*s+_]?1:0]}r[g++]=m.r,r[g++]=m.g,r[g++]=m.b,r[g]=m.a}}})(vv)),vv}var uE;function Sne(){return uE||(uE=1,(function(t){const e=uN();function n(i,o,s){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let c=a,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=r()),c=e.getOptions(c);const d=e.getImageWidth(o.modules.size,c),f=u.getContext("2d"),h=f.createImageData(d,d);return e.qrToImageData(h.data,o,c),n(f,u,d),f.putImageData(h,0,0),u},t.renderToDataURL=function(o,s,a){let c=a;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=t.render(o,s,c),d=c.type||"image/png",f=c.rendererOpts||{};return u.toDataURL(d,f.quality)}})(mv)),mv}var bv={},dE;function Ene(){if(dE)return bv;dE=1;const t=uN();function e(i,o){const s=i.a/255,a=o+'="'+i.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(i,o,s){let a=i+o;return typeof s<"u"&&(a+=" "+s),a}function r(i,o,s){let a="",c=0,u=!1,d=0;for(let f=0;f<i.length;f++){const h=Math.floor(f%o),p=Math.floor(f/o);!h&&!u&&(u=!0),i[f]?(d++,f>0&&h>0&&i[f-1]||(a+=u?n("M",h+s,.5+p+s):n("m",c,0),c=0,u=!1),h+1<o&&i[f+1]||(a+=n("h",d),d=0)):c++}return a}return bv.render=function(o,s,a){const c=t.getOptions(s),u=o.modules.size,d=o.modules.data,f=u+c.margin*2,h=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",p="<path "+e(c.color.dark,"stroke")+' d="'+r(d,u,c.margin)+'"/>',g='viewBox="0 0 '+f+" "+f+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+g+' shape-rendering="crispEdges">'+h+p+`</svg>
|
|
668
|
-
`;return typeof a=="function"&&a(null,v),v},bv}var fE;function Tne(){if(fE)return Xl;fE=1;const t=sne(),e=kne(),n=Sne(),r=Ene();function i(o,s,a,c,u){const d=[].slice.call(arguments,1),f=d.length,h=typeof d[f-1]=="function";if(!h&&!t())throw new Error("Callback required as last argument");if(h){if(f<2)throw new Error("Too few arguments provided");f===2?(u=a,a=s,s=c=void 0):f===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=a,a=s,s=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(a=s,s=c=void 0):f===2&&!s.getContext&&(c=a,a=s,s=void 0),new Promise(function(p,g){try{const m=e.create(a,c);p(o(m,s,c))}catch(m){g(m)}})}try{const p=e.create(a,c);u(null,o(p,s,c))}catch(p){u(p)}}return Xl.create=e.create,Xl.toCanvas=i.bind(null,n.render),Xl.toDataURL=i.bind(null,n.renderToDataURL),Xl.toString=i.bind(null,function(o,s,a){return r.render(o,a)}),Xl}var $ne=Tne(),Cne=j('<div> </div> <canvas class="svelte-1eeac91"></canvas>',1);const Ane={hash:"svelte-1eeac91",code:"canvas.svelte-1eeac91 {display:block;margin:32px auto 16px;width:200px !important;height:200px !important;}"};function Pne(t,e){se(e,!0),Ee(t,Ane);const n=()=>V(yp,"$showMobileSignInDialog",s),r=()=>V(
|
|
668
|
+
`;return typeof a=="function"&&a(null,v),v},bv}var fE;function Tne(){if(fE)return Xl;fE=1;const t=sne(),e=kne(),n=Sne(),r=Ene();function i(o,s,a,c,u){const d=[].slice.call(arguments,1),f=d.length,h=typeof d[f-1]=="function";if(!h&&!t())throw new Error("Callback required as last argument");if(h){if(f<2)throw new Error("Too few arguments provided");f===2?(u=a,a=s,s=c=void 0):f===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=a,a=s,s=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(a=s,s=c=void 0):f===2&&!s.getContext&&(c=a,a=s,s=void 0),new Promise(function(p,g){try{const m=e.create(a,c);p(o(m,s,c))}catch(m){g(m)}})}try{const p=e.create(a,c);u(null,o(p,s,c))}catch(p){u(p)}}return Xl.create=e.create,Xl.toCanvas=i.bind(null,n.render),Xl.toDataURL=i.bind(null,n.renderToDataURL),Xl.toString=i.bind(null,function(o,s,a){return r.render(o,a)}),Xl}var $ne=Tne(),Cne=j('<div> </div> <canvas class="svelte-1eeac91"></canvas>',1);const Ane={hash:"svelte-1eeac91",code:"canvas.svelte-1eeac91 {display:block;margin:32px auto 16px;width:200px !important;height:200px !important;}"};function Pne(t,e){se(e,!0),Ee(t,Ane);const n=()=>V(yp,"$showMobileSignInDialog",s),r=()=>V(Fn,"$user",s),i=()=>V(ft,"$prefs",s),o=()=>V(ue,"$_",s),[s,a]=me();let c=ie(void 0);Me(()=>{if(l(c)&&n()){const{origin:u,pathname:d}=window.location,f=btoa(JSON.stringify({token:r()?.token,prefs:i()})),h=`${u}${d}#/signin/${f}`;$ne.toCanvas(l(c),h),i().devModeEnabled&&console.info("Mobile sign-in URL:",h)}});{let u=b(()=>o()("sign_in_with_mobile"));Ki(t,{get title(){return l(u)},size:"small",showOk:!1,showCancel:!1,showClose:!0,style:"--sui-dialog-small-content-max-height:auto",get open(){return y_(),n()},set open(d){Ye(yp,d)},children:(d,f)=>{var h=Cne(),p=D(h),g=F(p),m=z(p,2);xt(m,v=>K(c,v),()=>l(c)),Z(v=>ne(g,v),[()=>o()("sign_in_with_mobile_instruction")]),S(d,h)},$$slots:{default:!0}})}ae(),a()}var Lne=j('<div role="none" class="label"><!></div>'),Nne=j("<!> <!> <!>",1);function One(t,e){se(e,!0);const n=()=>V(qt,"$appLocale",r),[r,i]=me(),o=b(()=>e.asset.path),s=b(()=>e.asset.name),a=b(()=>e.asset.folder),c=b(()=>e.asset.kind);gf(t,{onclick:()=>{Wt(`/assets/${l(o)}`,{transitionType:"forwards"})},children:(u,d)=>{var f=Nne(),h=D(f);Ti(h,{class:"image",children:(m,v)=>{Ho(m,{get kind(){return l(c)},get asset(){return e.asset},variant:"icon",cover:!0})},$$slots:{default:!0}});var p=z(h,2);Ti(p,{class:"collection",children:(m,v)=>{var _=X(),y=D(_);or(y,n,w=>{var x=Fe();Z(E=>ne(x,E),[()=>Eg(l(a))]),S(w,x)}),S(m,_)},$$slots:{default:!0}});var g=z(p,2);Ti(g,{class:"title",children:(m,v)=>{var _=Lne(),y=F(_);Pr(y,{lines:2,children:(w,x)=>{var E=Fe();Z(()=>ne(E,l(s))),S(w,E)},$$slots:{default:!0}}),S(m,_)},$$slots:{default:!0}}),S(u,f)},$$slots:{default:!0}}),ae(),i()}const Ine=({assets:t,terms:e})=>(e=Af(e),!t.length||!e?[]:t.filter(n=>nc({value:n.name,terms:e}))),Rne=un([Bn,vs],([t,e])=>Ine({assets:t,terms:e}));var Dne=j('<span role="none"> </span>'),Mne=j('<h3 role="none" id="search-results-assets"> </h3> <div role="none"><!></div>',1);function Fne(t,e){se(e,!0);const n=()=>V(Rne,"$assetSearchResults",o),r=()=>V(ue,"$_",o),i=()=>V(vs,"$searchTerms",o),[o,s]=me();Me(()=>{const a=n().length;Ye(fi,r()("viewing_asset_search_results",{values:{terms:i(),assets:a>1?r()("many_assets",{values:{count:a}}):a===1?r()("one_asset"):r()("no_assets")}}))}),zo(t,{"aria-labelledby":"search-results-assets",children:(a,c)=>{var u=Mne(),d=D(u),f=F(d),h=z(d,2),p=F(h);{var g=v=>{{let _=b(()=>r()("assets"));$f(v,{viewType:"list",get"aria-label"(){return l(_)},get"aria-rowcount"(){return n().length},children:(y,w)=>{var x=X(),E=D(x);or(E,i,$=>{Cl($,{get items(){return n()},itemKey:"path",renderItem:(k,T=qe)=>{var A=X(),P=D(A);kn(P,Nt,null,L=>{One(L,{get asset(){return T()}})}),S(k,A)},$$slots:{renderItem:!0}})}),S(y,x)},$$slots:{default:!0}})}},m=v=>{var _=X(),y=D(_);{var w=x=>{nr(x,{children:(E,$)=>{var C=Dne(),k=F(C);Z(T=>ne(k,T),[()=>r()("no_files_found")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{i()&&x(w)},!0)}S(v,_)};q(p,v=>{n().length?v(g):v(m,!1)})}Z(v=>ne(f,v),[()=>r()("assets")]),S(a,u)},$$slots:{default:!0}}),ae(),s()}var zne=j('<div role="none" class="label"><!></div>'),jne=j("<!> <!> <!>",1);function Une(t,e){se(e,!0);const n=()=>V(qt,"$appLocale",r),[r,i]=me(),o=(d,f)=>{let h=()=>f?.().collection,p=()=>f?.().collectionFile;const g=b(()=>{const{defaultLocale:w}=(p()??h())._i18n??bo;return{defaultLocale:w}}),m=b(()=>{const{content:w}=l(s)[l(g).defaultLocale]??Object.values(l(s))[0]??{};return{content:w}});var v=X(),_=D(v);{var y=w=>{gf(w,{onclick:()=>{Wt(`/collections/${h().name}/entries/${p()?.name||l(a)}`,{transitionType:"forwards"})},children:(x,E)=>{var $=jne(),C=D($);Ti(C,{class:"image",children:(A,P)=>{var L=X(),O=D(L);{var N=M=>{var U=X(),H=D(U);kn(H,()=>XL(h(),e.entry),null,(G,W)=>{var Y=X(),R=D(Y);{var B=J=>{$g(J,{get src(){return l(W)},variant:"icon",cover:!0})};q(R,J=>{l(W)&&J(B)})}S(G,Y)}),S(M,U)};q(O,M=>{h()._type==="entry"&&M(N)})}S(A,L)},$$slots:{default:!0}});var k=z(C,2);Ti(k,{class:"collection",children:(A,P)=>{var L=X(),O=D(L);or(O,n,N=>{var M=Fe();Z(U=>ne(M,U),[()=>ws(h())]),S(N,M)}),S(A,L)},$$slots:{default:!0}});var T=z(k,2);Ti(T,{class:"title",children:(A,P)=>{var L=zne(),O=F(L);Pr(O,{lines:2,children:(N,M)=>{var U=X(),H=D(U);{var G=Y=>{var R=Fe();Z(B=>ne(R,B),[()=>df(p())]),S(Y,R)},W=Y=>{var R=X(),B=D(R);or(B,n,J=>{var Q=X(),ee=D(Q);cr(ee,()=>tu(h(),e.entry,{useTemplate:!0,allowMarkdown:!0})),S(J,Q)}),S(Y,R)};q(H,Y=>{p()?Y(G):Y(W,!1)})}S(N,U)},$$slots:{default:!0}}),S(A,L)},$$slots:{default:!0}}),S(x,$)},$$slots:{default:!0}})};q(_,w=>{l(m).content&&w(y)})}S(d,v)},s=b(()=>e.entry.locales),a=b(()=>e.entry.subPath);var c=X(),u=D(c);it(u,17,()=>Ps(e.entry),d=>d.name,(d,f)=>{var h=X(),p=D(h);kn(p,Nt,null,g=>{var m=X(),v=D(m);it(v,17,()=>ha(l(f),e.entry),_=>_.name,(_,y)=>{var w=X(),x=D(w);kn(x,Nt,null,E=>{o(E,()=>({collection:l(f),collectionFile:l(y)}))}),S(_,w)},_=>{o(_,()=>({collection:l(f)}))}),S(g,m)}),S(d,h)}),S(t,c),ae(),i()}const Bne=({entry:t,terms:e})=>{let n=0;const r=Ps(t);if(r.length){r.forEach(s=>{nc({value:s.label||s.name,terms:e})&&(n+=10),n+=ha(s,t).filter(a=>nc({value:a.label||a.name,terms:e})).length});const[i]=r,o=tu(i,t,{useTemplate:!0,allowMarkdown:!0});nc({value:o,terms:e})&&(n+=10)}return Object.values(t.locales).forEach(({content:i})=>{n+=Object.values(i).filter(o=>typeof o=="string"&&!!o&&nc({value:o,terms:e})||typeof o=="number"&&nc({value:String(o),terms:e})).length}),n},qne=({entries:t,terms:e})=>(e=Af(e),!t.length||!e?[]:t.map(n=>({entry:n,points:Bne({entry:n,terms:e})})).filter(({points:n})=>n>0).sort((n,r)=>r.points-n.points).map(({entry:n})=>n)),Vne=un([Ai,vs,qt],([t,e])=>qne({entries:t,terms:e}));var Hne=j('<span role="none"> </span>'),Kne=j('<h3 role="none" id="search-results-entries"> </h3> <div role="none"><!></div>',1);function Gne(t,e){se(e,!0);const n=()=>V(Vne,"$entrySearchResults",o),r=()=>V(ue,"$_",o),i=()=>V(vs,"$searchTerms",o),[o,s]=me();Me(()=>{const a=n().length;Ye(fi,r()("viewing_entry_search_results",{values:{terms:i(),entries:a>1?r()("many_entries",{values:{count:a}}):a===1?r()("one_entry"):r()("no_entries")}}))}),zo(t,{"aria-labelledby":"search-results-entries",children:(a,c)=>{var u=Kne(),d=D(u),f=F(d),h=z(d,2),p=F(h);{var g=v=>{{let _=b(()=>r()("entries"));$f(v,{viewType:"list",get"aria-label"(){return l(_)},get"aria-rowcount"(){return n().length},children:(y,w)=>{var x=X(),E=D(x);or(E,i,$=>{Cl($,{get items(){return n()},itemKey:"id",renderItem:(k,T=qe)=>{var A=X(),P=D(A);kn(P,Nt,null,L=>{Une(L,{get entry(){return T()}})}),S(k,A)},$$slots:{renderItem:!0}})}),S(y,x)},$$slots:{default:!0}})}},m=v=>{var _=X(),y=D(_);{var w=x=>{nr(x,{children:(E,$)=>{var C=Hne(),k=F(C);Z(T=>ne(k,T),[()=>r()("no_entries_found")]),S(E,C)},$$slots:{default:!0}})};q(y,x=>{i()&&x(w)},!0)}S(v,_)};q(p,v=>{n().length?v(g):v(m,!1)})}Z(v=>ne(f,v),[()=>r()("entries")]),S(a,u)},$$slots:{default:!0}}),ae(),s()}var Wne=j('<header role="none" class="svelte-1p7vfqa"><h2 role="none" class="svelte-1p7vfqa"> </h2></header>'),Yne=j('<div role="none" class="wrapper svelte-1p7vfqa"><!> <div role="none" class="results svelte-1p7vfqa"><!> <!></div></div>');const Jne={hash:"svelte-1p7vfqa",code:`.wrapper.svelte-1p7vfqa {display:flex;flex-direction:column;overflow:hidden;width:100%;background-color:var(--sui-primary-background-color);}header.svelte-1p7vfqa {flex:none;display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}header.svelte-1p7vfqa h2:where(.svelte-1p7vfqa) {font-size:var(--sui-font-size-x-large);}.results.svelte-1p7vfqa {flex:auto;display:flex;gap:16px;overflow:hidden;height:100%;}.results.svelte-1p7vfqa > .sui.group {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%;}.results.svelte-1p7vfqa h3 {flex:none;margin:16px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);}.results.svelte-1p7vfqa h3 + div {overflow:auto;flex:auto;}
|
|
669
669
|
@media (width < 768px) {.results.svelte-1p7vfqa h3 {display:none;}
|
|
670
670
|
}`};function Xne(t,e){se(e,!0),Ee(t,Jne);const n=()=>V(vn,"$isSmallScreen",o),r=()=>V(ue,"$_",o),i=()=>V(Ga,"$searchMode",o),[o,s]=me();var a=Yne(),c=F(a);{var u=m=>{var v=Wne(),_=F(v),y=F(_);Z(w=>ne(y,w),[()=>r()("search_results")]),S(m,v)};q(c,m=>{n()||m(u)})}var d=z(c,2),f=F(d);{var h=m=>{Gne(m,{})};q(f,m=>{i()==="entries"&&m(h)})}var p=z(f,2);{var g=m=>{Fne(m,{})};q(p,m=>{i()==="assets"&&m(g)})}S(t,a),ae(),s()}var Zne=j('<!> <div role="search" class="svelte-u038t"><!></div>',1);const Qne={hash:"svelte-u038t",code:"[role=search].svelte-u038t {display:contents;}[role=search].svelte-u038t .sui.search-bar {flex:auto;}"};function ere(t,e){se(e,!0),Ee(t,Qne);const n=()=>V(vs,"$searchTerms",s),r=()=>V(Ga,"$searchMode",s),i=()=>V(ue,"$_",s),o=()=>V(vn,"$isSmallScreen",s),[s,a]=me(),c=/^\/search\/(?<terms>.+)$/,u=()=>{const{path:d}=Vo(),{terms:f}=d.match(c)?.groups??{};f&&f!==n()&&Ye(vs,f),Ye(Ga,r()??"entries")};Ut(()=>{u(),document.querySelector(".sui.search-bar input")?.focus()}),Xr("hashchange",Xa,()=>{u()});{const d=h=>{Cf(h,{primaryToolbar:m=>{var v=X(),_=D(v);{var y=w=>{Ni(w,{variant:"primary",children:(x,E)=>{var $=Zne(),C=D($);{let A=b(()=>i()(r()==="assets"?"back_to_asset_folder_list":"back_to_collection_list"));bl(C,{get"aria-label"(){return l(A)},onclick:()=>{Ye(vs,""),Wt(r()==="assets"?"/assets":"/collections",{transitionType:"backwards"})}})}var k=z(C,2),T=F(k);Cg(T,{}),S(x,$)},$$slots:{default:!0}})};q(_,w=>{o()&&w(y)})}S(m,v)},mainContent:m=>{Xne(m,{})},$$slots:{primaryToolbar:!0,mainContent:!0}})};let f=b(()=>i()("search_results_for_x",{values:{terms:n()}}));Rl(t,{get"aria-label"(){return l(f)},main:d,$$slots:{main:!0}})}ae(),a()}var tre=j('<!> <h2 role="none"> </h2>',1),nre=j('<!> <h2 role="none"> </h2>',1),rre=j("<!> <!>",1),ire=j('<div role="none" class="inner svelte-116bna3"><!></div>'),ore=j('<div role="none" class="wrapper svelte-116bna3"><!></div>'),sre=j("<!> <!>",1);const are={hash:"svelte-116bna3",code:".wrapper.svelte-116bna3 {overflow-y:auto;height:100%;--sui-menu-border-width: 0;--sui-menu-border-radius: 0;--sui-menu-padding: 8px 0;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) {padding:16px;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) p {margin-top:0;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) h4 {font-size:inherit;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) h4 ~ div {margin:8px 0 0;}.wrapper.svelte-116bna3 .inner:where(.svelte-116bna3) h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function lre(t,e){se(e,!0),Ee(t,are);const n=()=>V(ue,"$_",r),[r,i]=me(),o=/^\/settings(?:\/(?<panelKey>.+))?$/;let s=ie(void 0),a=ie(""),c=ie(!1);const u=()=>{const{path:p}=Vo(),g=p.match(o);if(!g?.groups)return;const{panelKey:m}=g.groups;K(s,m?oe(wp).find(v=>v.key===m):void 0,!0)};Ut(()=>{u()});var d=sre();Xr("hashchange",Xa,p=>{Lw(p,u,o)});var f=D(d);{const p=m=>{Cf(m,{primaryToolbar:y=>{Ni(y,{variant:"primary",children:(w,x)=>{var E=rre(),$=D(E);{var C=A=>{var P=tre(),L=D(P);bl(L,{onclick:()=>oa("/settings")});var O=z(L,2),N=F(O);Z(M=>ne(N,M),[()=>n()(`prefs.${l(s).key}.title`)]),S(A,P)},k=A=>{var P=nre(),L=D(P);bl(L,{onclick:()=>oa("/menu")});var O=z(L,2),N=F(O);Z(M=>ne(N,M),[()=>n()("settings")]),S(A,P)};q($,A=>{l(s)?A(C):A(k,!1)})}var T=z($,2);ii(T,{flex:!0}),S(w,E)},$$slots:{default:!0}})},mainContent:y=>{var w=ore(),x=F(w);{var E=C=>{const k=b(()=>l(s).component);var T=ire(),A=F(T);ur(A,()=>l(k),(P,L)=>{L(P,{onChange:({message:O})=>{K(a,O,!0),K(c,!0)}})}),S(C,T)},$=C=>{{let k=b(()=>n()("settings"));hr(C,{get"aria-label"(){return l(k)},children:(T,A)=>{var P=X(),L=D(P);it(L,17,()=>oe(wp),({key:O,icon:N})=>O,(O,N)=>{let M=()=>l(N).key,U=()=>l(N).icon;{const H=W=>{Ze(W,{get name(){return U()}})};let G=b(()=>n()(`prefs.${M()}.title`));vt(O,{get label(){return l(G)},onclick:()=>Wt(`/settings/${M()}`,{transitionType:"forwards"}),startIcon:H,$$slots:{startIcon:!0}})}}),S(T,P)},$$slots:{default:!0}})}};q(x,C=>{l(s)?C(E):C($,!1)})}S(y,w)},$$slots:{primaryToolbar:!0,mainContent:!0}})};let g=b(()=>n()("settings"));Rl(f,{get"aria-label"(){return l(g)},main:p,$$slots:{main:!0}})}var h=z(f,2);Yn(h,{get show(){return l(c)},set show(p){K(c,p,!0)},children:(p,g)=>{Mn(p,{status:"success",children:(m,v)=>{var _=Fe();Z(()=>ne(_,l(a))),S(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),S(t,d),ae(),i()}var cre=j('<header role="none" class="svelte-ljqw9n"><h3 role="none" id="draft-column-title" class="svelte-ljqw9n"> </h3></header>'),ure=j('<header role="none" class="svelte-ljqw9n"><h3 role="none" id="review-column-title" class="svelte-ljqw9n"> </h3></header>'),dre=j('<header role="none" class="svelte-ljqw9n"><h3 role="none" id="ready-column-title" class="svelte-ljqw9n"> </h3></header>'),fre=j('<div role="none" class="columns svelte-ljqw9n"><!> <!> <!></div>');const hre={hash:"svelte-ljqw9n",code:`.columns.svelte-ljqw9n {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}
|
|
671
671
|
@media (width < 768px) {.columns.svelte-ljqw9n {flex-direction:column;gap:0;}
|
|
@@ -774,7 +774,7 @@ Minimum version required to store current data is: `+P+`.
|
|
|
774
774
|
animation: 100ms ease-in both svelte-7y4msj-slide-out-to-left-rtl;}html:active-view-transition-type(backwards):dir(rtl)::view-transition-new(page-root) {
|
|
775
775
|
animation: 100ms ease-in both svelte-7y4msj-slide-in-from-right-rtl;}html:active-view-transition-type(unknown)::view-transition-old(page-root) {
|
|
776
776
|
animation: none;}html:active-view-transition-type(unknown)::view-transition-new(page-root) {
|
|
777
|
-
animation: none;}body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-7y4msj {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-7y4msj {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-7y4msj {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}`};function Are(t,e){se(e,!0),Ee(t,Cre);const n=()=>V(Ct,"$cmsConfig",c),r=()=>V(fh,"$isLoading",c),i=()=>V(Tn,"$backend",c),o=()=>V(
|
|
777
|
+
animation: none;}body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-7y4msj {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-7y4msj {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-7y4msj {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}`};function Are(t,e){se(e,!0),Ee(t,Cre);const n=()=>V(Ct,"$cmsConfig",c),r=()=>V(fh,"$isLoading",c),i=()=>V(Tn,"$backend",c),o=()=>V(Fn,"$user",c),s=()=>V(eu,"$dataLoaded",c),a=()=>V(fi,"$announcedPageStatus",c),[c,u]=me();Ut(()=>{kre()}),Ut(()=>{dB(e.config)}),Ut(()=>{FH()}),Ut(()=>{const d=document.querySelector("#nc-root");d&&window.getComputedStyle(d).position==="static"&&window.requestAnimationFrame(()=>{const{top:f,height:h}=d.getBoundingClientRect();h?d.style.position="relative":(d.style.position="fixed",d.style.inset=`${f}px 0 0 0`)})}),dT("7y4msj",d=>{var f=Ere(),h=z(D(f),4);{var p=m=>{const v=b(()=>n().logo?.src??n().logo_url);var _=Sre();Z((y,w)=>{Te(_,"href",y),Te(_,"type",w)},[()=>l(v)||`data:image/svg+xml;base64,${btoa(IP)}`,()=>l(v)?Cs.getType(l(v))??void 0:"image/svg+xml"]),S(m,_)};q(h,m=>{n()&&m(p)})}var g=z(h,2);q(g,m=>{}),S(d,f)}),Xr("mousedown",g_.body,d=>{if(d.target?.matches("a")){const f=d.target,{origin:h,pathname:p}=f;(h!==window.location.origin||p!==window.location.pathname)&&(f.target="_blank")}}),AH(t,{children:(d,f)=>{var h=$re(),p=D(h);{var g=_=>{var y=Tre(),w=F(y);vK(w,{});var x=z(w,2);{var E=A=>{pK(A,{})};q(x,A=>{i()&&A(E)})}var $=z(x,2),C=F($);dK(C,{});var k=z(C,2);{var T=A=>{bre(A,{})};q(k,A=>{o()&&s()&&A(T)})}S(_,y)};q(p,_=>{r()||_(g)})}var m=z(p,2),v=F(m);Z(()=>ne(v,a())),S(d,h)},$$slots:{default:!0}}),ae(),u()}const Pre=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerLocale","registerMediaLibrary","registerRemarkPlugin","registerWidgetValueSerializer","removeEventListener","resolveWidget"],Lre="https://github.com/sveltia/sveltia-cms#compatibility";let hE=!1;const Qw=async({config:t}={})=>{hE||(hE=!0,document.readyState==="loading"&&!document.querySelector("#nc-root")&&await new Promise(e=>{window.addEventListener("DOMContentLoaded",()=>e(void 0),{once:!0})}),Pp(Are,{target:document.querySelector("#nc-root")??document.body,props:{config:t}}))},Nre=(t,e,{fromFile:n,toFile:r})=>{ng.set(t,{extension:e,parser:n,formatter:r})},Ore=t=>{zh.set(t.id,t),console.warn("Preview for custom editor components are not yet supported in Sveltia CMS.")},Ire=t=>{console.warn("Event hooks are not yet supported in Sveltia CMS.")},Rre=(t,{raw:e=!1}={})=>{if(typeof t!="string")throw new TypeError("The `style` option for `CMS.registerPreviewStyle()` must be a string");if(typeof e!="boolean")throw new TypeError("The `raw` option for `CMS.registerPreviewStyle()` must be a boolean");const n=e?URL.createObjectURL(new Blob([t],{type:"text/css"})):t;Lv.add(n)},Dre=(t,e)=>{console.warn("Custom preview templates are not yet supported in Sveltia CMS.")},Mre=(t,e,n,r)=>{console.warn("Custom widgets are not yet supported in Sveltia CMS.")},Fre=new Proxy({init:Qw,registerCustomFormat:Nre,registerEditorComponent:Ore,registerEventListener:Ire,registerPreviewStyle:Rre,registerPreviewTemplate:Dre,registerWidget:Mre},{get:(t,e)=>{if(e in t)return t[e];let n="";if(Pre.includes(e)&&(n="CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it."),n)return console.warn(`${n} See %s for compatibility information.`,e,Lre),()=>{}}});window.CMS=Fre;window.initCMS=Qw;window.createClass=kN;window.createElement=gE.createElement;window.h=gE.createElement;!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&Qw();export{Fre as default,Qw as init};
|
|
778
778
|
/**
|
|
779
779
|
* @license React
|
|
780
780
|
* react.production.js
|