@sveltia/cms 0.60.0 → 0.60.2

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.
@@ -249,8 +249,8 @@ ${e}</tr>
249
249
  `}tablecell(e){const n=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+n+`</${r}>
250
250
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ks(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:n,tokens:r}){const i=this.parser.parseInline(r),s=ES(e);if(s===null)return i;e=s;let o='<a href="'+e+'"';return n&&(o+=' title="'+ks(n)+'"'),o+=">"+i+"</a>",o}image({href:e,title:n,text:r}){const i=ES(e);if(i===null)return ks(r);e=i;let s=`<img src="${e}" alt="${r}"`;return n&&(s+=` title="${ks(n)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ks(e.text)}}class ob{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Ai{options;renderer;textRenderer;constructor(e){this.options=e||Pa,this.options.renderer=this.options.renderer||new Mh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ob}static parse(e,n){return new Ai(n).parse(e)}static parseInline(e,n){return new Ai(n).parseInline(e)}parse(e,n=!0){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const a=s,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=c||"";continue}}const o=s;switch(o.type){case"space":{r+=this.renderer.space(o);continue}case"hr":{r+=this.renderer.hr(o);continue}case"heading":{r+=this.renderer.heading(o);continue}case"code":{r+=this.renderer.code(o);continue}case"table":{r+=this.renderer.table(o);continue}case"blockquote":{r+=this.renderer.blockquote(o);continue}case"list":{r+=this.renderer.list(o);continue}case"html":{r+=this.renderer.html(o);continue}case"paragraph":{r+=this.renderer.paragraph(o);continue}case"text":{let a=o,c=this.renderer.text(a);for(;i+1<e.length&&e[i+1].type==="text";)a=e[++i],c+=`
251
251
  `+this.renderer.text(a);n?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}const o=s;switch(o.type){case"escape":{r+=n.text(o);break}case"html":{r+=n.html(o);break}case"link":{r+=n.link(o);break}case"image":{r+=n.image(o);break}case"strong":{r+=n.strong(o);break}case"em":{r+=n.em(o);break}case"codespan":{r+=n.codespan(o);break}case"br":{r+=n.br(o);break}case"del":{r+=n.del(o);break}case"text":{r+=n.text(o);break}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}}class Fh{options;block;constructor(e){this.options=e||Pa}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Ci.lex:Ci.lexInline}provideParser(){return this.block?Ai.parse:Ai.parseInline}}class ZF{defaults=Zv();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ai;Renderer=Mh;TextRenderer=ob;Lexer=Ci;Tokenizer=Dh;Hooks=Fh;constructor(...e){this.use(...e)}walkTokens(e,n){let r=[];for(const i of e)switch(r=r.concat(n.call(this,i)),i.type){case"table":{const s=i;for(const o of s.header)r=r.concat(this.walkTokens(o.tokens,n));for(const o of s.rows)for(const a of o)r=r.concat(this.walkTokens(a.tokens,n));break}case"list":{const s=i;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{const a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let c=s.renderer.apply(this,a);return c===!1&&(c=o.apply(this,a)),c}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){const s=this.defaults.renderer||new Mh(this.defaults);for(const o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,c=r.renderer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f||""}}i.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Dh(this.defaults);for(const o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,c=r.tokenizer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new Fh;for(const o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,c=r.hooks[a],u=s[a];Fh.passThroughHooks.has(o)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(c.call(s,d)).then(h=>u.call(s,h));const f=c.call(s,d);return u.call(s,f)}:s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let c=[];return c.push(o.call(this,a)),s&&(c=c.concat(s.call(this,a))),c}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Ci.lex(e,n??this.defaults)}parser(e,n){return Ai.parse(e,n??this.defaults)}parseMarkdown(e){return(r,i)=>{const s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const c=o.hooks?o.hooks.provideLexer():e?Ci.lex:Ci.lexInline,u=o.hooks?o.hooks.provideParser():e?Ai.parse:Ai.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(d=>c(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let d=c(r,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return a(d)}}}onError(e,n){return r=>{if(r.message+=`
252
- Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+ks(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const Oa=new ZF;function Ot(t,e){return Oa.parse(t,e)}Ot.options=Ot.setOptions=function(t){return Oa.setOptions(t),Ot.defaults=Oa.defaults,fS(Ot.defaults),Ot},Ot.getDefaults=Zv,Ot.defaults=Pa,Ot.use=function(...t){return Oa.use(...t),Ot.defaults=Oa.defaults,fS(Ot.defaults),Ot},Ot.walkTokens=function(t,e){return Oa.walkTokens(t,e)},Ot.parseInline=Oa.parseInline,Ot.Parser=Ai,Ot.parser=Ai.parse,Ot.Renderer=Mh,Ot.TextRenderer=ob,Ot.Lexer=Ci,Ot.lexer=Ci.lex,Ot.Tokenizer=Dh,Ot.Hooks=Fh,Ot.parse=Ot,Ot.options,Ot.setOptions,Ot.use,Ot.walkTokens;const XF=Ot.parseInline;Ai.parse,Ci.lex;class Fo{#t;#n="";#e="";#o={};#i=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:s=[]}={}){this.#t=void 0,this.#n=e,this.#e=n,this.#o={keyPath:r,autoIncrement:i},this.#i=s}async#a(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,s=this.#e,o=i.objectStoreNames.contains(s)?i.transaction(s,"readwrite").objectStore(s):i.createObjectStore(s,this.#o);this.#i.forEach(({name:a,keyPath:c,options:u})=>{o.indexNames.contains(a)||o.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#l(){let e=!1,n=await this.#a();const{version:r,objectStoreNames:i}=n,s=this.#e;if(i.contains(s)){const o=n.transaction(s).objectStore(s);e=this.#i.some(({name:a})=>!o.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#a(r+1)),n.onversionchange=()=>{n.close(),this.#t=void 0},n}async#r(e){this.#t??=await this.#l();const n=this.#t,r=this.#e,i=n.transaction(r,"readwrite"),s=e(i.objectStore(r));return s?new Promise(o=>{s.onsuccess=()=>{o(s.result)}}):new Promise(o=>{i.oncomplete=()=>{o(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#s({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:s=!1}){return new Promise(o=>{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)?s?(u.push(f),d.continue()):o(f):d.continue()}else o(s?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#s({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 Qr{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 AS=st(!1),PS=async({backendName:t,authURL:e})=>{const{availHeight:i,availWidth:s}=window.screen,o=i/2-800/2,a=s/2-600/2,c=window.open(e,"auth",`width=600,height=800,top=${o},left=${a}`);return new Promise((u,d)=>{const f=t==="github"?setInterval(()=>{c?.closed&&(clearInterval(f),d(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,h=({origin:p,data:g})=>{if(p!==new URL(e).origin||typeof g!="string")return;const m=t;if(g===`authorizing:${m}`){c?.postMessage(g,p);return}const{result:v}=g.match(`^authorization:${m}:(success|error):(?<result>.+)`)?.groups??{};let _;try{_=v?JSON.parse(v):{error:"No data"}}catch{_={error:"Malformed data"}}typeof _.token=="string"?u(_.token):d(new Error("Authentication failed",{cause:new Error(_.errorCode?ne(le)(`sign_in_error.${_.errorCode}`,{default:_.error}):_.error)})),window.removeEventListener("message",h),clearInterval(f),c?.close()};window.addEventListener("message",h)})},OS=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const i=new URLSearchParams({provider:t,site_id:e,scope:r});return PS({backendName:t,authURL:`${n}?${i.toString()}`})},QF=async()=>{const t=`${Rg()}${Rg()}`,e=btoa(await oa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Wn().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},ez=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:s,codeChallenge:o}=await QF(),{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:o,code_challenge_method:"S256"});return await Qr.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:s,realAuthURL:`${n}?${d.toString()}`}),await Qr.set("sveltia-cms.user",{backendName:t}),PS({backendName:t,authURL:u})},zh=({provider:t="unknown",token:e,error:n,errorCode:r})=>{const i=n?"error":"success",s=n?{provider:t,error:n,errorCode:r}:{provider:t,token:e};window.addEventListener("message",({data:o,origin:a})=>{o===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${i}:${JSON.stringify(s)}`,a)}),window.opener?.postMessage(`authorizing:${t}`,"*")},tz=async({backendName:t,clientId:e,authURL:n,code:r,state:i})=>{const{origin:s,pathname:o}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await Qr.get("sveltia-cms.auth")??{},u=t,d=`${s}${o}`;if(await Qr.delete("sveltia-cms.auth"),!a||!c||i!==a)return zh({provider:u,error:ne(le)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({client_id:e,code:r,grant_type:"authorization_code",redirect_uri:d,code_verifier:c})})}catch{}if(!f)return zh({provider:u,error:ne(le)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,error:p}=await f.json())}catch{return zh({provider:u,error:ne(le)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return zh({provider:u,token:h,error:p})},nz=async({backendName:t,clientId:e,authURL:n})=>{AS.set(!0);const{search:r}=window.location,{code:i,state:s}=Object.fromEntries(new URLSearchParams(r));if(i&&s)await tz({backendName:t,clientId:e,authURL:n,code:i,state:s});else{const{realAuthURL:o}=await Qr.get("sveltia-cms.auth")??{};o&&(window.location.href=o)}},ab=Symbol.for("yaml.alias"),lb=Symbol.for("yaml.document"),zo=Symbol.for("yaml.map"),$S=Symbol.for("yaml.pair"),Ss=Symbol.for("yaml.scalar"),rc=Symbol.for("yaml.seq"),Pi=Symbol.for("yaml.node.type"),$a=t=>!!t&&typeof t=="object"&&t[Pi]===ab,La=t=>!!t&&typeof t=="object"&&t[Pi]===lb,ic=t=>!!t&&typeof t=="object"&&t[Pi]===zo,gn=t=>!!t&&typeof t=="object"&&t[Pi]===$S,en=t=>!!t&&typeof t=="object"&&t[Pi]===Ss,sc=t=>!!t&&typeof t=="object"&&t[Pi]===rc;function Tn(t){if(t&&typeof t=="object")switch(t[Pi]){case zo:case rc:return!0}return!1}function Cn(t){if(t&&typeof t=="object")switch(t[Pi]){case ab:case zo:case Ss:case rc:return!0}return!1}const rz=t=>(en(t)||Tn(t))&&!!t.anchor,ei=Symbol("break visit"),LS=Symbol("skip children"),Es=Symbol("remove node");function jo(t,e){const n=NS(e);La(t)?oc(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):oc(null,t,n,Object.freeze([]))}jo.BREAK=ei,jo.SKIP=LS,jo.REMOVE=Es;function oc(t,e,n,r){const i=IS(t,e,n,r);if(Cn(i)||gn(i))return RS(t,r,i),oc(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=oc(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===ei)return ei;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=oc("key",e.key,n,r);if(s===ei)return ei;s===Es&&(e.key=null);const o=oc("value",e.value,n,r);if(o===ei)return ei;o===Es&&(e.value=null)}}return i}async function jh(t,e){const n=NS(e);La(t)?await ac(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):await ac(null,t,n,Object.freeze([]))}jh.BREAK=ei,jh.SKIP=LS,jh.REMOVE=Es;async function ac(t,e,n,r){const i=await IS(t,e,n,r);if(Cn(i)||gn(i))return RS(t,r,i),ac(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await ac(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===ei)return ei;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=await ac("key",e.key,n,r);if(s===ei)return ei;s===Es&&(e.key=null);const o=await ac("value",e.value,n,r);if(o===ei)return ei;o===Es&&(e.value=null)}}return i}function NS(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function IS(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(ic(e))return n.Map?.(t,e,r);if(sc(e))return n.Seq?.(t,e,r);if(gn(e))return n.Pair?.(t,e,r);if(en(e))return n.Scalar?.(t,e,r);if($a(e))return n.Alias?.(t,e,r)}function RS(t,e,n){const r=e[e.length-1];if(Tn(r))r.items[t]=n;else if(gn(r))t==="key"?r.key=n:r.value=n;else if(La(r))r.contents=n;else{const i=$a(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const iz={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},sz=t=>t.replace(/[!,[\]{}]/g,e=>iz[e]);class Vr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Vr.defaultYaml,e),this.tags=Object.assign({},Vr.defaultTags,n)}clone(){const e=new Vr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Vr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Vr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Vr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Vr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Vr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+sz(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&Cn(e.contents)){const s={};jo(e.contents,(o,a)=>{Cn(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
253
- `)}}Vr.defaultYaml={explicit:!1,version:"1.2"},Vr.defaultTags={"!!":"tag:yaml.org,2002:"};function DS(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function MS(t){const e=new Set;return jo(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function FS(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function oz(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=MS(t));const o=FS(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(en(o.node)||Tn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function lc(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=lc(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=lc(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=lc(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=lc(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Oi(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Oi(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!rz(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class cb{constructor(e){Object.defineProperty(this,Pi,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!La(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Oi(this,"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof s=="function"?lc(s,{"":a},"",a):a}}class Uh extends cb{constructor(e){super(ab),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return jo(e,{Node:(r,i)=>{if(i===this)return jo.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=r.get(o);if(a||(Oi(o,null,n),a=r.get(o)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Bh(i,o,r)),a.count*a.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(DS(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Bh(t,e,n){if($a(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Tn(e)){let r=0;for(const i of e.items){const s=Bh(t,i,n);s>r&&(r=s)}return r}else if(gn(e)){const r=Bh(t,e.key,n),i=Bh(t,e.value,n);return Math.max(r,i)}return 1}const zS=t=>!t||typeof t!="function"&&typeof t!="object";class _t extends cb{constructor(e){super(Ss),this.value=e}toJSON(e,n){return n?.keep?this.value:Oi(this.value,e,n)}toString(){return String(this.value)}}_t.BLOCK_FOLDED="BLOCK_FOLDED",_t.BLOCK_LITERAL="BLOCK_LITERAL",_t.PLAIN="PLAIN",_t.QUOTE_DOUBLE="QUOTE_DOUBLE",_t.QUOTE_SINGLE="QUOTE_SINGLE";const az="tag:yaml.org,2002:";function lz(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>r.identify?.(t)&&!r.format)}function ed(t,e,n){if(La(t)&&(t=t.contents),Cn(t))return t;if(gn(t)){const f=n.schema[zo].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let c;if(r&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor||(c.anchor=i(t)),new Uh(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=az+e.slice(2));let u=lz(t,e,o.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new _t(t);return c&&(c.node=f),f}u=t instanceof Map?o[zo]:Symbol.iterator in Object(t)?o[rc]:o[zo]}s&&(s(u),delete n.onTagObj);const d=u?.createNode?u.createNode(n.schema,t,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,t,n):new _t(t);return e?d.tag=e:u.default||(d.tag=u.tag),c&&(c.node=d),d}function qh(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return ed(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const td=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class jS extends cb{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Cn(r)||gn(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(td(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Tn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,qh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Tn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&en(s)?s.value:s:Tn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!gn(n))return!1;const r=n.value;return r==null||e&&en(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Tn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Tn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,qh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const cz=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Xs(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Na=(t,e,n)=>t.endsWith(`
252
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+ks(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const Oa=new ZF;function Ot(t,e){return Oa.parse(t,e)}Ot.options=Ot.setOptions=function(t){return Oa.setOptions(t),Ot.defaults=Oa.defaults,fS(Ot.defaults),Ot},Ot.getDefaults=Zv,Ot.defaults=Pa,Ot.use=function(...t){return Oa.use(...t),Ot.defaults=Oa.defaults,fS(Ot.defaults),Ot},Ot.walkTokens=function(t,e){return Oa.walkTokens(t,e)},Ot.parseInline=Oa.parseInline,Ot.Parser=Ai,Ot.parser=Ai.parse,Ot.Renderer=Mh,Ot.TextRenderer=ob,Ot.Lexer=Ci,Ot.lexer=Ci.lex,Ot.Tokenizer=Dh,Ot.Hooks=Fh,Ot.parse=Ot,Ot.options,Ot.setOptions,Ot.use,Ot.walkTokens;const XF=Ot.parseInline;Ai.parse,Ci.lex;class Fo{#t;#n="";#e="";#o={};#i=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:s=[]}={}){this.#t=void 0,this.#n=e,this.#e=n,this.#o={keyPath:r,autoIncrement:i},this.#i=s}async#a(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,s=this.#e,o=i.objectStoreNames.contains(s)?i.transaction(s,"readwrite").objectStore(s):i.createObjectStore(s,this.#o);this.#i.forEach(({name:a,keyPath:c,options:u})=>{o.indexNames.contains(a)||o.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#l(){let e=!1,n=await this.#a();const{version:r,objectStoreNames:i}=n,s=this.#e;if(i.contains(s)){const o=n.transaction(s).objectStore(s);e=this.#i.some(({name:a})=>!o.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#a(r+1)),n.onversionchange=()=>{n.close(),this.#t=void 0},n}async#r(e){this.#t??=await this.#l();const n=this.#t,r=this.#e,i=n.transaction(r,"readwrite"),s=e(i.objectStore(r));return s?new Promise(o=>{s.onsuccess=()=>{o(s.result)}}):new Promise(o=>{i.oncomplete=()=>{o(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#s({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:s=!1}){return new Promise(o=>{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)?s?(u.push(f),d.continue()):o(f):d.continue()}else o(s?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#s({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 Qr{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 AS=st(!1),PS=async({backendName:t,authURL:e})=>{const{availHeight:i,availWidth:s}=window.screen,o=i/2-800/2,a=s/2-600/2,c=window.open(e,"auth",`width=600,height=800,top=${o},left=${a}`);return new Promise((u,d)=>{const f=t==="github"?setInterval(()=>{c?.closed&&(clearInterval(f),d(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,h=({origin:p,data:g})=>{if(p!==new URL(e).origin||typeof g!="string")return;const m=t;if(g===`authorizing:${m}`){c?.postMessage(g,p);return}const{result:v}=g.match(`^authorization:${m}:(success|error):(?<result>.+)`)?.groups??{};let _;try{_=v?JSON.parse(v):{error:"No data"}}catch{_={error:"Malformed data"}}typeof _.token=="string"?u(_.token):d(new Error("Authentication failed",{cause:new Error(_.errorCode?ne(le)(`sign_in_error.${_.errorCode}`,{default:_.error}):_.error)})),window.removeEventListener("message",h),clearInterval(f),c?.close()};window.addEventListener("message",h)})},OS=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const i=new URLSearchParams({provider:t,site_id:e,scope:r});return PS({backendName:t,authURL:`${n}?${i.toString()}`})},QF=async()=>{const t=`${Rg()}${Rg()}`,e=btoa(await oa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Wn().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},e3=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:s,codeChallenge:o}=await QF(),{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:o,code_challenge_method:"S256"});return await Qr.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:s,realAuthURL:`${n}?${d.toString()}`}),await Qr.set("sveltia-cms.user",{backendName:t}),PS({backendName:t,authURL:u})},zh=({provider:t="unknown",token:e,error:n,errorCode:r})=>{const i=n?"error":"success",s=n?{provider:t,error:n,errorCode:r}:{provider:t,token:e};window.addEventListener("message",({data:o,origin:a})=>{o===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${i}:${JSON.stringify(s)}`,a)}),window.opener?.postMessage(`authorizing:${t}`,"*")},t3=async({backendName:t,clientId:e,authURL:n,code:r,state:i})=>{const{origin:s,pathname:o}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await Qr.get("sveltia-cms.auth")??{},u=t,d=`${s}${o}`;if(await Qr.delete("sveltia-cms.auth"),!a||!c||i!==a)return zh({provider:u,error:ne(le)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({client_id:e,code:r,grant_type:"authorization_code",redirect_uri:d,code_verifier:c})})}catch{}if(!f)return zh({provider:u,error:ne(le)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,error:p}=await f.json())}catch{return zh({provider:u,error:ne(le)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return zh({provider:u,token:h,error:p})},n3=async({backendName:t,clientId:e,authURL:n})=>{AS.set(!0);const{search:r}=window.location,{code:i,state:s}=Object.fromEntries(new URLSearchParams(r));if(i&&s)await t3({backendName:t,clientId:e,authURL:n,code:i,state:s});else{const{realAuthURL:o}=await Qr.get("sveltia-cms.auth")??{};o&&(window.location.href=o)}},ab=Symbol.for("yaml.alias"),lb=Symbol.for("yaml.document"),zo=Symbol.for("yaml.map"),$S=Symbol.for("yaml.pair"),Ss=Symbol.for("yaml.scalar"),rc=Symbol.for("yaml.seq"),Pi=Symbol.for("yaml.node.type"),$a=t=>!!t&&typeof t=="object"&&t[Pi]===ab,La=t=>!!t&&typeof t=="object"&&t[Pi]===lb,ic=t=>!!t&&typeof t=="object"&&t[Pi]===zo,gn=t=>!!t&&typeof t=="object"&&t[Pi]===$S,en=t=>!!t&&typeof t=="object"&&t[Pi]===Ss,sc=t=>!!t&&typeof t=="object"&&t[Pi]===rc;function Tn(t){if(t&&typeof t=="object")switch(t[Pi]){case zo:case rc:return!0}return!1}function Cn(t){if(t&&typeof t=="object")switch(t[Pi]){case ab:case zo:case Ss:case rc:return!0}return!1}const r3=t=>(en(t)||Tn(t))&&!!t.anchor,ei=Symbol("break visit"),LS=Symbol("skip children"),Es=Symbol("remove node");function jo(t,e){const n=NS(e);La(t)?oc(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):oc(null,t,n,Object.freeze([]))}jo.BREAK=ei,jo.SKIP=LS,jo.REMOVE=Es;function oc(t,e,n,r){const i=IS(t,e,n,r);if(Cn(i)||gn(i))return RS(t,r,i),oc(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=oc(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===ei)return ei;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=oc("key",e.key,n,r);if(s===ei)return ei;s===Es&&(e.key=null);const o=oc("value",e.value,n,r);if(o===ei)return ei;o===Es&&(e.value=null)}}return i}async function jh(t,e){const n=NS(e);La(t)?await ac(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):await ac(null,t,n,Object.freeze([]))}jh.BREAK=ei,jh.SKIP=LS,jh.REMOVE=Es;async function ac(t,e,n,r){const i=await IS(t,e,n,r);if(Cn(i)||gn(i))return RS(t,r,i),ac(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await ac(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===ei)return ei;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(gn(e)){r=Object.freeze(r.concat(e));const s=await ac("key",e.key,n,r);if(s===ei)return ei;s===Es&&(e.key=null);const o=await ac("value",e.value,n,r);if(o===ei)return ei;o===Es&&(e.value=null)}}return i}function NS(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function IS(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(ic(e))return n.Map?.(t,e,r);if(sc(e))return n.Seq?.(t,e,r);if(gn(e))return n.Pair?.(t,e,r);if(en(e))return n.Scalar?.(t,e,r);if($a(e))return n.Alias?.(t,e,r)}function RS(t,e,n){const r=e[e.length-1];if(Tn(r))r.items[t]=n;else if(gn(r))t==="key"?r.key=n:r.value=n;else if(La(r))r.contents=n;else{const i=$a(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const i3={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},s3=t=>t.replace(/[!,[\]{}]/g,e=>i3[e]);class Vr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Vr.defaultYaml,e),this.tags=Object.assign({},Vr.defaultTags,n)}clone(){const e=new Vr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Vr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Vr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Vr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Vr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Vr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+s3(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&Cn(e.contents)){const s={};jo(e.contents,(o,a)=>{Cn(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
253
+ `)}}Vr.defaultYaml={explicit:!1,version:"1.2"},Vr.defaultTags={"!!":"tag:yaml.org,2002:"};function DS(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function MS(t){const e=new Set;return jo(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function FS(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function o3(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=MS(t));const o=FS(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(en(o.node)||Tn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function lc(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=lc(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=lc(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=lc(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=lc(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Oi(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Oi(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!r3(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class cb{constructor(e){Object.defineProperty(this,Pi,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!La(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Oi(this,"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof s=="function"?lc(s,{"":a},"",a):a}}class Uh extends cb{constructor(e){super(ab),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return jo(e,{Node:(r,i)=>{if(i===this)return jo.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=r.get(o);if(a||(Oi(o,null,n),a=r.get(o)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Bh(i,o,r)),a.count*a.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(DS(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Bh(t,e,n){if($a(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Tn(e)){let r=0;for(const i of e.items){const s=Bh(t,i,n);s>r&&(r=s)}return r}else if(gn(e)){const r=Bh(t,e.key,n),i=Bh(t,e.value,n);return Math.max(r,i)}return 1}const zS=t=>!t||typeof t!="function"&&typeof t!="object";class _t extends cb{constructor(e){super(Ss),this.value=e}toJSON(e,n){return n?.keep?this.value:Oi(this.value,e,n)}toString(){return String(this.value)}}_t.BLOCK_FOLDED="BLOCK_FOLDED",_t.BLOCK_LITERAL="BLOCK_LITERAL",_t.PLAIN="PLAIN",_t.QUOTE_DOUBLE="QUOTE_DOUBLE",_t.QUOTE_SINGLE="QUOTE_SINGLE";const a3="tag:yaml.org,2002:";function l3(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>r.identify?.(t)&&!r.format)}function ed(t,e,n){if(La(t)&&(t=t.contents),Cn(t))return t;if(gn(t)){const f=n.schema[zo].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let c;if(r&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor||(c.anchor=i(t)),new Uh(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=a3+e.slice(2));let u=l3(t,e,o.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new _t(t);return c&&(c.node=f),f}u=t instanceof Map?o[zo]:Symbol.iterator in Object(t)?o[rc]:o[zo]}s&&(s(u),delete n.onTagObj);const d=u?.createNode?u.createNode(n.schema,t,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,t,n):new _t(t);return e?d.tag=e:u.default||(d.tag=u.tag),c&&(c.node=d),d}function qh(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return ed(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const td=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class jS extends cb{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Cn(r)||gn(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(td(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Tn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,qh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Tn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&en(s)?s.value:s:Tn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!gn(n))return!1;const r=n.value;return r==null||e&&en(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Tn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Tn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,qh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const c3=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Xs(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Na=(t,e,n)=>t.endsWith(`
254
254
  `)?Xs(n,e):n.includes(`
255
255
  `)?`
256
256
  `+Xs(n,e):(t.endsWith(" ")?"":" ")+n,US="flow",ub="block",Hh="quoted";function Vh(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);const c=Math.max(1+s,1+i-e.length);if(t.length<=c)return t;const u=[],d={};let f=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?u.push(0):f=i-r);let h,p,g=!1,m=-1,v=-1,_=-1;n===ub&&(m=BS(t,m,e.length),m!==-1&&(f=m+c));for(let y;y=t[m+=1];){if(n===Hh&&y==="\\"){switch(v=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}_=m}if(y===`
@@ -259,7 +259,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An err
259
259
  `&&x!==" "&&(h=m)}if(m>=f)if(h)u.push(h),f=h+c,h=void 0;else if(n===Hh){for(;p===" "||p===" ";)p=y,y=t[m+=1],g=!0;const x=m>_+1?m-2:v-1;if(d[x])return t;u.push(x),d[x]=!0,f=x+c,h=void 0}else g=!0}p=y}if(g&&a&&a(),u.length===0)return t;o&&o();let b=t.slice(0,u[0]);for(let y=0;y<u.length;++y){const x=u[y],k=u[y+1]||t.length;x===0?b=`
260
260
  ${e}${t.slice(0,k)}`:(n===Hh&&d[x]&&(b+=`${t[x]}\\`),b+=`
261
261
  ${e}${t.slice(x+1,k)}`)}return b}function BS(t,e,n){let r=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
262
- `);r=e,i=e+1,s=t[i]}return r}const Wh=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Gh=t=>/^(%|---|\.\.\.)/m.test(t);function uz(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
262
+ `);r=e,i=e+1,s=t[i]}return r}const Wh=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Gh=t=>/^(%|---|\.\.\.)/m.test(t);function u3(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
263
263
  `){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function nd(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Gh(t)?" ":"");let o="",a=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(o+=n.slice(a,c)+"\\ ",c+=1,a=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{o+=n.slice(a,c);const d=n.substr(c+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=n.substr(c,6)}c+=5,a=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<i)c+=1;else{for(o+=n.slice(a,c)+`
264
264
 
265
265
  `;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)o+=`
@@ -268,7 +268,7 @@ ${e}${t.slice(x+1,k)}`)}return b}function BS(t,e,n){let r=e,i=e+1,s=t[i];for(;s=
268
268
  ${n}`)+"'";return e.implicitKey?r:Vh(r,n,US,Wh(e,!1))}function cc(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=nd;else{const i=t.includes('"'),s=t.includes("'");i&&!s?r=db:s&&!i?r=nd:r=n?db:nd}return r(t,e)}let fb;try{fb=new RegExp(`(^|(?<!
269
269
  ))
270
270
  +(?!
271
- |$)`,"g")}catch{fb=/\n+(?!\n|$)/g}function Kh({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return cc(n,r);const u=r.indent||(r.forceBlockIndent||Gh(n)?" ":""),d=o==="literal"?!0:o==="folded"||e===_t.BLOCK_FOLDED?!1:e===_t.BLOCK_LITERAL?!0:!uz(n,c,u.length);if(!n)return d?`|
271
+ |$)`,"g")}catch{fb=/\n+(?!\n|$)/g}function Kh({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return cc(n,r);const u=r.indent||(r.forceBlockIndent||Gh(n)?" ":""),d=o==="literal"?!0:o==="folded"||e===_t.BLOCK_FOLDED?!1:e===_t.BLOCK_LITERAL?!0:!u3(n,c,u.length);if(!n)return d?`|
272
272
  `:`>
273
273
  `;let f,h;for(h=n.length;h>0;--h){const k=n[h-1];if(k!==`
274
274
  `&&k!==" "&&k!==" ")break}let p=n.substring(h);const g=p.indexOf(`
@@ -277,12 +277,12 @@ ${n}`)+"'";return e.implicitKey?r:Vh(r,n,US,Wh(e,!1))}function cc(t,e){const{sin
277
277
  `)_=v;else break}let b=n.substring(0,_<v?_+1:v);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${u}`));let x=(m?u?"2":"1":"")+f;if(t&&(x+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const k=n.replace(/\n+/g,`
278
278
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let S=!1;const C=Wh(r,!0);o!=="folded"&&e!==_t.BLOCK_FOLDED&&(C.onOverflow=()=>{S=!0});const E=Vh(`${b}${k}${p}`,u,ub,C);if(!S)return`>${x}
279
279
  ${u}${E}`}return n=n.replace(/\n+/g,`$&${u}`),`|${x}
280
- ${u}${b}${n}${p}`}function dz(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:d}=e;if(a&&s.includes(`
280
+ ${u}${b}${n}${p}`}function d3(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:d}=e;if(a&&s.includes(`
281
281
  `)||d&&/[[\]{},]/.test(s))return cc(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||d||!s.includes(`
282
282
  `)?cc(s,e):Kh(t,e,n,r);if(!a&&!d&&i!==_t.PLAIN&&s.includes(`
283
283
  `))return Kh(t,e,n,r);if(Gh(s)){if(c==="")return e.forceBlockIndent=!0,Kh(t,e,n,r);if(a&&c===u)return cc(s,e)}const f=s.replace(/\n+/g,`$&
284
- ${c}`);if(o){const h=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=e.doc.schema;if(g.some(h)||p?.some(h))return cc(s,e)}return a?f:Vh(f,c,US,Wh(e,!1))}function rd(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==_t.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=_t.QUOTE_DOUBLE);const c=d=>{switch(d){case _t.BLOCK_FOLDED:case _t.BLOCK_LITERAL:return i||s?cc(o.value,e):Kh(o,e,n,r);case _t.QUOTE_DOUBLE:return nd(o.value,e);case _t.QUOTE_SINGLE:return db(o.value,e);case _t.PLAIN:return dz(o,e,n,r);default:return null}};let u=c(a);if(u===null){const{defaultKeyType:d,defaultStringType:f}=e.options,h=i&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function qS(t,e){const n=Object.assign({blockQuote:!0,commentString:cz,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function fz(t,e){if(e.tag){const i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(en(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function hz(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(en(t)||Tn(t))&&t.anchor;s&&DS(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(r.directives.tagString(o)),i.join(" ")}function uc(t,e,n,r){if(gn(t))return t.toString(e,n,r);if($a(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=Cn(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i||(i=fz(e.doc.schema.tags,s));const o=hz(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):en(s)?rd(s,e,n,r):s.toString(e,n,r);return o?en(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
285
- ${e.indent}${a}`:a}function pz({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=Cn(t)&&t.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Tn(t)||!Cn(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!f&&(!t||h&&e==null&&!n.inFlow||Tn(t)||(en(t)?t.type===_t.BLOCK_FOLDED||t.type===_t.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:a+c});let g=!1,m=!1,v=uc(t,n,()=>g=!0,()=>m=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||e==null)return g&&r&&r(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||e==null&&p)return v=`? ${v}`,h&&!g?v+=Na(v,n.indent,u(h)):m&&i&&i(),v;g&&(h=null),p?(h&&(v+=Na(v,n.indent,u(h))),v=`? ${v}
284
+ ${c}`);if(o){const h=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=e.doc.schema;if(g.some(h)||p?.some(h))return cc(s,e)}return a?f:Vh(f,c,US,Wh(e,!1))}function rd(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==_t.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=_t.QUOTE_DOUBLE);const c=d=>{switch(d){case _t.BLOCK_FOLDED:case _t.BLOCK_LITERAL:return i||s?cc(o.value,e):Kh(o,e,n,r);case _t.QUOTE_DOUBLE:return nd(o.value,e);case _t.QUOTE_SINGLE:return db(o.value,e);case _t.PLAIN:return d3(o,e,n,r);default:return null}};let u=c(a);if(u===null){const{defaultKeyType:d,defaultStringType:f}=e.options,h=i&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function qS(t,e){const n=Object.assign({blockQuote:!0,commentString:c3,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function f3(t,e){if(e.tag){const i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(en(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function h3(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(en(t)||Tn(t))&&t.anchor;s&&DS(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(r.directives.tagString(o)),i.join(" ")}function uc(t,e,n,r){if(gn(t))return t.toString(e,n,r);if($a(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=Cn(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i||(i=f3(e.doc.schema.tags,s));const o=h3(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):en(s)?rd(s,e,n,r):s.toString(e,n,r);return o?en(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
285
+ ${e.indent}${a}`:a}function p3({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=Cn(t)&&t.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Tn(t)||!Cn(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!f&&(!t||h&&e==null&&!n.inFlow||Tn(t)||(en(t)?t.type===_t.BLOCK_FOLDED||t.type===_t.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:a+c});let g=!1,m=!1,v=uc(t,n,()=>g=!0,()=>m=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||e==null)return g&&r&&r(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||e==null&&p)return v=`? ${v}`,h&&!g?v+=Na(v,n.indent,u(h)):m&&i&&i(),v;g&&(h=null),p?(h&&(v+=Na(v,n.indent,u(h))),v=`? ${v}
286
286
  ${a}:`):(v=`${v}:`,h&&(v+=Na(v,n.indent,u(h))));let _,b,y;Cn(e)?(_=!!e.spaceBefore,b=e.commentBefore,y=e.comment):(_=!1,b=null,y=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!p&&!h&&en(e)&&(n.indentAtStart=v.length+1),m=!1,!d&&c.length>=2&&!n.inFlow&&!p&&sc(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let x=!1;const k=uc(e,n,()=>x=!0,()=>m=!0);let S=" ";if(h||_||b){if(S=_?`
287
287
  `:"",b){const C=u(b);S+=`
288
288
  ${Xs(C,n.indent)}`}k===""&&!n.inFlow?S===`
@@ -292,32 +292,32 @@ ${Xs(C,n.indent)}`}k===""&&!n.inFlow?S===`
292
292
  ${n.indent}`}else if(!p&&Tn(e)){const C=k[0],E=k.indexOf(`
293
293
  `),A=E!==-1,O=n.inFlow??e.flow??e.items.length===0;if(A||!O){let L=!1;if(A&&(C==="&"||C==="!")){let I=k.indexOf(" ");C==="&"&&I!==-1&&I<E&&k[I+1]==="!"&&(I=k.indexOf(" ",I+1)),(I===-1||E<I)&&(L=!0)}L||(S=`
294
294
  ${n.indent}`)}}else(k===""||k[0]===`
295
- `)&&(S="");return v+=S+k,n.inFlow?x&&r&&r():y&&!x?v+=Na(v,n.indent,u(y)):m&&i&&i(),v}function HS(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const Yh="<<",Qs={identify:t=>t===Yh||typeof t=="symbol"&&t.description===Yh,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _t(Symbol(Yh)),{addToJSMap:VS}),stringify:()=>Yh},gz=(t,e)=>(Qs.identify(e)||en(e)&&(!e.type||e.type===_t.PLAIN)&&Qs.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===Qs.tag&&n.default);function VS(t,e,n){if(n=t&&$a(n)?n.resolve(t.doc):n,sc(n))for(const r of n.items)hb(t,e,r);else if(Array.isArray(n))for(const r of n)hb(t,e,r);else hb(t,e,n)}function hb(t,e,n){const r=t&&$a(n)?n.resolve(t.doc):n;if(!ic(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function WS(t,e,{key:n,value:r}){if(Cn(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(gz(t,n))VS(t,e,r);else{const i=Oi(n,"",t);if(e instanceof Map)e.set(i,Oi(r,i,t));else if(e instanceof Set)e.add(i);else{const s=mz(n,i,t),o=Oi(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function mz(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(Cn(t)&&n?.doc){const r=qS(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),HS(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function pb(t,e,n){const r=ed(t,void 0,n),i=ed(e,void 0,n);return new Pr(r,i)}class Pr{constructor(e,n=null){Object.defineProperty(this,Pi,{value:$S}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return Cn(n)&&(n=n.clone(e)),Cn(r)&&(r=r.clone(e)),new Pr(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return WS(n,r,this)}toString(e,n,r){return e?.doc?pz(this,e,n,r):JSON.stringify(this)}}function GS(t,e,n){return(e.inFlow??t.flow?bz:vz)(t,e,n)}function vz({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;g<e.length;++g){const m=e[g];let v=null;if(Cn(m))!f&&m.spaceBefore&&h.push(""),Jh(n,h,m.commentBefore,f),m.comment&&(v=m.comment);else if(gn(m)){const b=Cn(m.key)?m.key:null;b&&(!f&&b.spaceBefore&&h.push(""),Jh(n,h,b.commentBefore,f))}f=!1;let _=uc(m,d,()=>v=null,()=>f=!0);v&&(_+=Na(_,s,u(v))),f&&v&&(f=!1),h.push(r+_)}let p;if(h.length===0)p=i.start+i.end;else{p=h[0];for(let g=1;g<h.length;++g){const m=h[g];p+=m?`
295
+ `)&&(S="");return v+=S+k,n.inFlow?x&&r&&r():y&&!x?v+=Na(v,n.indent,u(y)):m&&i&&i(),v}function HS(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const Yh="<<",Qs={identify:t=>t===Yh||typeof t=="symbol"&&t.description===Yh,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _t(Symbol(Yh)),{addToJSMap:VS}),stringify:()=>Yh},g3=(t,e)=>(Qs.identify(e)||en(e)&&(!e.type||e.type===_t.PLAIN)&&Qs.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===Qs.tag&&n.default);function VS(t,e,n){if(n=t&&$a(n)?n.resolve(t.doc):n,sc(n))for(const r of n.items)hb(t,e,r);else if(Array.isArray(n))for(const r of n)hb(t,e,r);else hb(t,e,n)}function hb(t,e,n){const r=t&&$a(n)?n.resolve(t.doc):n;if(!ic(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function WS(t,e,{key:n,value:r}){if(Cn(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(g3(t,n))VS(t,e,r);else{const i=Oi(n,"",t);if(e instanceof Map)e.set(i,Oi(r,i,t));else if(e instanceof Set)e.add(i);else{const s=m3(n,i,t),o=Oi(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function m3(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(Cn(t)&&n?.doc){const r=qS(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),HS(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function pb(t,e,n){const r=ed(t,void 0,n),i=ed(e,void 0,n);return new Pr(r,i)}class Pr{constructor(e,n=null){Object.defineProperty(this,Pi,{value:$S}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return Cn(n)&&(n=n.clone(e)),Cn(r)&&(r=r.clone(e)),new Pr(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return WS(n,r,this)}toString(e,n,r){return e?.doc?p3(this,e,n,r):JSON.stringify(this)}}function GS(t,e,n){return(e.inFlow??t.flow?b3:v3)(t,e,n)}function v3({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;g<e.length;++g){const m=e[g];let v=null;if(Cn(m))!f&&m.spaceBefore&&h.push(""),Jh(n,h,m.commentBefore,f),m.comment&&(v=m.comment);else if(gn(m)){const b=Cn(m.key)?m.key:null;b&&(!f&&b.spaceBefore&&h.push(""),Jh(n,h,b.commentBefore,f))}f=!1;let _=uc(m,d,()=>v=null,()=>f=!0);v&&(_+=Na(_,s,u(v))),f&&v&&(f=!1),h.push(r+_)}let p;if(h.length===0)p=i.start+i.end;else{p=h[0];for(let g=1;g<h.length;++g){const m=h[g];p+=m?`
296
296
  ${c}${m}`:`
297
297
  `}}return t?(p+=`
298
- `+Xs(u(t),c),a&&a()):f&&o&&o(),p}function bz({items:t},e,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const c=Object.assign({},e,{indent:r,inFlow:!0,type:null});let u=!1,d=0;const f=[];for(let g=0;g<t.length;++g){const m=t[g];let v=null;if(Cn(m))m.spaceBefore&&f.push(""),Jh(e,f,m.commentBefore,!1),m.comment&&(v=m.comment);else if(gn(m)){const b=Cn(m.key)?m.key:null;b&&(b.spaceBefore&&f.push(""),Jh(e,f,b.commentBefore,!1),b.comment&&(u=!0));const y=Cn(m.value)?m.value:null;y?(y.comment&&(v=y.comment),y.commentBefore&&(u=!0)):m.value==null&&b?.comment&&(v=b.comment)}v&&(u=!0);let _=uc(m,c,()=>v=null);g<t.length-1&&(_+=","),v&&(_+=Na(_,r,a(v))),!u&&(f.length>d||_.includes(`
298
+ `+Xs(u(t),c),a&&a()):f&&o&&o(),p}function b3({items:t},e,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const c=Object.assign({},e,{indent:r,inFlow:!0,type:null});let u=!1,d=0;const f=[];for(let g=0;g<t.length;++g){const m=t[g];let v=null;if(Cn(m))m.spaceBefore&&f.push(""),Jh(e,f,m.commentBefore,!1),m.comment&&(v=m.comment);else if(gn(m)){const b=Cn(m.key)?m.key:null;b&&(b.spaceBefore&&f.push(""),Jh(e,f,b.commentBefore,!1),b.comment&&(u=!0));const y=Cn(m.value)?m.value:null;y?(y.comment&&(v=y.comment),y.commentBefore&&(u=!0)):m.value==null&&b?.comment&&(v=b.comment)}v&&(u=!0);let _=uc(m,c,()=>v=null);g<t.length-1&&(_+=","),v&&(_+=Na(_,r,a(v))),!u&&(f.length>d||_.includes(`
299
299
  `))&&(u=!0),f.push(_),d=f.length}const{start:h,end:p}=n;if(f.length===0)return h+p;if(!u){const g=f.reduce((m,v)=>m+v.length+2,2);u=e.options.lineWidth>0&&g>e.options.lineWidth}if(u){let g=h;for(const m of f)g+=m?`
300
300
  ${s}${i}${m}`:`
301
301
  `;return`${g}
302
- ${i}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function Jh({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Xs(e(r),t);n.push(s.trimStart())}}function Ia(t,e){const n=en(e)?e.value:e;for(const r of t)if(gn(r)&&(r.key===e||r.key===n||en(r.key)&&r.key.value===n))return r}class ci extends jS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(zo,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&o.items.push(pb(c,u,r))};if(n instanceof Map)for(const[c,u]of n)a(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))a(c,n[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;gn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pr(e,e?.value):r=new Pr(e.key,e.value);const i=Ia(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);en(i.value)&&zS(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const n=Ia(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=Ia(this.items,e)?.value;return(!n&&en(i)?i.value:i)??void 0}has(e){return!!Ia(this.items,e)}set(e,n){this.add(new Pr(e,n),!0)}toJSON(e,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)WS(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!gn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),GS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const dc={collection:"map",default:!0,nodeClass:ci,tag:"tag:yaml.org,2002:map",resolve(t,e){return ic(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ci.from(t,e,n)};class Uo extends jS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(rc,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Zh(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=Zh(e);if(typeof r!="number")return;const i=this.items[r];return!n&&en(i)?i.value:i}has(e){const n=Zh(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=Zh(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];en(i)&&zS(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Oi(s,String(i++),n));return r}toString(e,n,r){return e?GS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const c=n instanceof Set?a:String(o++);a=i.call(n,c,a)}s.items.push(ed(a,void 0,r))}}return s}}function Zh(t){let e=en(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const fc={collection:"seq",default:!0,nodeClass:Uo,tag:"tag:yaml.org,2002:seq",resolve(t,e){return sc(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Uo.from(t,e,n)},Xh={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),rd(t,e,n,r)}},Qh={identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _t(null),stringify:({source:t},e)=>typeof t=="string"&&Qh.test.test(t)?t:e.options.nullStr},gb={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _t(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&gb.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Ji({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const KS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ji},YS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Ji(t)}},JS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new _t(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Ji},ep=t=>typeof t=="bigint"||Number.isInteger(t),mb=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function ZS(t,e,n){const{value:r}=t;return ep(r)&&r>=0?n+r.toString(e):Ji(t)}const XS={identify:t=>ep(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>mb(t,2,8,n),stringify:t=>ZS(t,8,"0o")},QS={identify:ep,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>mb(t,0,10,n),stringify:Ji},eE={identify:t=>ep(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>mb(t,2,16,n),stringify:t=>ZS(t,16,"0x")},_z=[dc,fc,Xh,Qh,gb,XS,QS,eE,KS,YS,JS];function tE(t){return typeof t=="bigint"||Number.isInteger(t)}const tp=({value:t})=>JSON.stringify(t),yz=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:tp},{identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:tp},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:tp},{identify:tE,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>tE(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:tp}],wz={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},xz=[dc,fc].concat(yz,wz),vb={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){const o=n;let a;if(typeof btoa=="function"){let c="";for(let u=0;u<o.length;++u)c+=String.fromCharCode(o[u]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=_t.BLOCK_LITERAL),e!==_t.QUOTE_DOUBLE){const c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/c),d=new Array(u);for(let f=0,h=0;f<u;++f,h+=c)d[f]=a.substr(h,c);a=d.join(e===_t.BLOCK_LITERAL?`
302
+ ${i}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function Jh({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Xs(e(r),t);n.push(s.trimStart())}}function Ia(t,e){const n=en(e)?e.value:e;for(const r of t)if(gn(r)&&(r.key===e||r.key===n||en(r.key)&&r.key.value===n))return r}class ci extends jS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(zo,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&o.items.push(pb(c,u,r))};if(n instanceof Map)for(const[c,u]of n)a(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))a(c,n[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;gn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pr(e,e?.value):r=new Pr(e.key,e.value);const i=Ia(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);en(i.value)&&zS(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const n=Ia(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=Ia(this.items,e)?.value;return(!n&&en(i)?i.value:i)??void 0}has(e){return!!Ia(this.items,e)}set(e,n){this.add(new Pr(e,n),!0)}toJSON(e,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)WS(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!gn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),GS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const dc={collection:"map",default:!0,nodeClass:ci,tag:"tag:yaml.org,2002:map",resolve(t,e){return ic(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ci.from(t,e,n)};class Uo extends jS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(rc,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Zh(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=Zh(e);if(typeof r!="number")return;const i=this.items[r];return!n&&en(i)?i.value:i}has(e){const n=Zh(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=Zh(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];en(i)&&zS(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Oi(s,String(i++),n));return r}toString(e,n,r){return e?GS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const c=n instanceof Set?a:String(o++);a=i.call(n,c,a)}s.items.push(ed(a,void 0,r))}}return s}}function Zh(t){let e=en(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const fc={collection:"seq",default:!0,nodeClass:Uo,tag:"tag:yaml.org,2002:seq",resolve(t,e){return sc(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Uo.from(t,e,n)},Xh={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),rd(t,e,n,r)}},Qh={identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _t(null),stringify:({source:t},e)=>typeof t=="string"&&Qh.test.test(t)?t:e.options.nullStr},gb={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _t(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&gb.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Ji({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const KS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ji},YS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Ji(t)}},JS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new _t(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Ji},ep=t=>typeof t=="bigint"||Number.isInteger(t),mb=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function ZS(t,e,n){const{value:r}=t;return ep(r)&&r>=0?n+r.toString(e):Ji(t)}const XS={identify:t=>ep(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>mb(t,2,8,n),stringify:t=>ZS(t,8,"0o")},QS={identify:ep,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>mb(t,0,10,n),stringify:Ji},eE={identify:t=>ep(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>mb(t,2,16,n),stringify:t=>ZS(t,16,"0x")},_3=[dc,fc,Xh,Qh,gb,XS,QS,eE,KS,YS,JS];function tE(t){return typeof t=="bigint"||Number.isInteger(t)}const tp=({value:t})=>JSON.stringify(t),y3=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:tp},{identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:tp},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:tp},{identify:tE,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>tE(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:tp}],w3={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},x3=[dc,fc].concat(y3,w3),vb={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){const o=n;let a;if(typeof btoa=="function"){let c="";for(let u=0;u<o.length;++u)c+=String.fromCharCode(o[u]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=_t.BLOCK_LITERAL),e!==_t.QUOTE_DOUBLE){const c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/c),d=new Array(u);for(let f=0,h=0;f<u;++f,h+=c)d[f]=a.substr(h,c);a=d.join(e===_t.BLOCK_LITERAL?`
303
303
  `:" ")}return rd({comment:t,type:e,value:a},r,i,s)}};function nE(t,e){if(sc(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!gn(r)){if(ic(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new Pr(new _t(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
304
304
  ${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
305
- ${s.comment}`:r.comment}r=i}t.items[n]=gn(r)?r:new Pr(r)}}else e("Expected a sequence for this tag");return t}function rE(t,e,n){const{replacer:r}=n,i=new Uo(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(pb(a,c,n))}return i}const bb={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nE,createNode:rE};class hc extends Uo{constructor(){super(),this.add=ci.prototype.add.bind(this),this.delete=ci.prototype.delete.bind(this),this.get=ci.prototype.get.bind(this),this.has=ci.prototype.has.bind(this),this.set=ci.prototype.set.bind(this),this.tag=hc.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(gn(i)?(s=Oi(i.key,"",n),o=Oi(i.value,s,n)):s=Oi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=rE(e,n,r),s=new this;return s.items=i.items,s}}hc.tag="tag:yaml.org,2002:omap";const _b={collection:"seq",identify:t=>t instanceof Map,nodeClass:hc,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=nE(t,e),r=[];for(const{key:i}of n.items)en(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new hc,n)},createNode:(t,e,n)=>hc.from(t,e,n)};function iE({value:t,source:e},n){return e&&(t?sE:oE).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const sE={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new _t(!0),stringify:iE},oE={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new _t(!1),stringify:iE},kz={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ji},Sz={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Ji(t)}},Ez={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new _t(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Ji},id=t=>typeof t=="bigint"||Number.isInteger(t);function np(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function yb(t,e,n){const{value:r}=t;if(id(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Ji(t)}const Tz={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>np(t,2,2,n),stringify:t=>yb(t,2,"0b")},Cz={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>np(t,1,8,n),stringify:t=>yb(t,8,"0")},Az={identify:id,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>np(t,0,10,n),stringify:Ji},Pz={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>np(t,2,16,n),stringify:t=>yb(t,16,"0x")};class pc extends ci{constructor(e){super(e),this.tag=pc.tag}add(e){let n;gn(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Pr(e.key,null):n=new Pr(e,null),Ia(this.items,n.key)||this.items.push(n)}get(e,n){const r=Ia(this.items,e);return!n&&gn(r)?en(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ia(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Pr(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(pb(o,null,r));return s}}pc.tag="tag:yaml.org,2002:set";const wb={collection:"map",identify:t=>t instanceof Set,nodeClass:pc,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>pc.from(t,e,n),resolve(t,e){if(ic(t)){if(t.hasAllNullValues(!0))return Object.assign(new pc,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function xb(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function aE(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Ji(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const lE={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>xb(t,n),stringify:aE},cE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>xb(t,!1),stringify:aE},rp={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(rp.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,c);const d=e[8];if(d&&d!=="Z"){let f=xb(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>t.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},uE=[dc,fc,Xh,Qh,sE,oE,Tz,Cz,Az,Pz,kz,Sz,Ez,vb,Qs,_b,bb,wb,lE,cE,rp],dE=new Map([["core",_z],["failsafe",[dc,fc,Xh]],["json",xz],["yaml11",uE],["yaml-1.1",uE]]),fE={binary:vb,bool:gb,float:JS,floatExp:YS,floatNaN:KS,floatTime:cE,int:QS,intHex:eE,intOct:XS,intTime:lE,map:dc,merge:Qs,null:Qh,omap:_b,pairs:bb,seq:fc,set:wb,timestamp:rp},Oz={"tag:yaml.org,2002:binary":vb,"tag:yaml.org,2002:merge":Qs,"tag:yaml.org,2002:omap":_b,"tag:yaml.org,2002:pairs":bb,"tag:yaml.org,2002:set":wb,"tag:yaml.org,2002:timestamp":rp};function kb(t,e,n){const r=dE.get(e);if(r&&!t)return n&&!r.includes(Qs)?r.concat(Qs):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(dE.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(Qs)),i.reduce((s,o)=>{const a=typeof o=="string"?fE[o]:o;if(!a){const c=JSON.stringify(o),u=Object.keys(fE).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(a)||s.push(a),s},[])}const $z=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class ip{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?kb(e,"compat"):e?kb(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Oz:{},this.tags=kb(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,zo,{value:dc}),Object.defineProperty(this,Ss,{value:Xh}),Object.defineProperty(this,rc,{value:fc}),this.sortMapEntries=typeof o=="function"?o:o===!0?$z:null}clone(){const e=Object.create(ip.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Lz(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(n.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=qS(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const c=s(t.commentBefore);n.unshift(Xs(c,""))}let o=!1,a=null;if(t.contents){if(Cn(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const d=s(t.contents.commentBefore);n.push(Xs(d,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=uc(t.contents,i,()=>a=null,c);a&&(u+=Na(u,"",s(a))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(uc(t.contents,i));if(t.directives?.docEnd)if(t.comment){const c=s(t.comment);c.includes(`
305
+ ${s.comment}`:r.comment}r=i}t.items[n]=gn(r)?r:new Pr(r)}}else e("Expected a sequence for this tag");return t}function rE(t,e,n){const{replacer:r}=n,i=new Uo(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(pb(a,c,n))}return i}const bb={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nE,createNode:rE};class hc extends Uo{constructor(){super(),this.add=ci.prototype.add.bind(this),this.delete=ci.prototype.delete.bind(this),this.get=ci.prototype.get.bind(this),this.has=ci.prototype.has.bind(this),this.set=ci.prototype.set.bind(this),this.tag=hc.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(gn(i)?(s=Oi(i.key,"",n),o=Oi(i.value,s,n)):s=Oi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=rE(e,n,r),s=new this;return s.items=i.items,s}}hc.tag="tag:yaml.org,2002:omap";const _b={collection:"seq",identify:t=>t instanceof Map,nodeClass:hc,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=nE(t,e),r=[];for(const{key:i}of n.items)en(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new hc,n)},createNode:(t,e,n)=>hc.from(t,e,n)};function iE({value:t,source:e},n){return e&&(t?sE:oE).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const sE={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new _t(!0),stringify:iE},oE={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new _t(!1),stringify:iE},k3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ji},S3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Ji(t)}},E3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new _t(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Ji},id=t=>typeof t=="bigint"||Number.isInteger(t);function np(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function yb(t,e,n){const{value:r}=t;if(id(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Ji(t)}const T3={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>np(t,2,2,n),stringify:t=>yb(t,2,"0b")},C3={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>np(t,1,8,n),stringify:t=>yb(t,8,"0")},A3={identify:id,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>np(t,0,10,n),stringify:Ji},P3={identify:id,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>np(t,2,16,n),stringify:t=>yb(t,16,"0x")};class pc extends ci{constructor(e){super(e),this.tag=pc.tag}add(e){let n;gn(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Pr(e.key,null):n=new Pr(e,null),Ia(this.items,n.key)||this.items.push(n)}get(e,n){const r=Ia(this.items,e);return!n&&gn(r)?en(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ia(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Pr(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(pb(o,null,r));return s}}pc.tag="tag:yaml.org,2002:set";const wb={collection:"map",identify:t=>t instanceof Set,nodeClass:pc,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>pc.from(t,e,n),resolve(t,e){if(ic(t)){if(t.hasAllNullValues(!0))return Object.assign(new pc,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function xb(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function aE(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Ji(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const lE={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>xb(t,n),stringify:aE},cE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>xb(t,!1),stringify:aE},rp={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(rp.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,c);const d=e[8];if(d&&d!=="Z"){let f=xb(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>t.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},uE=[dc,fc,Xh,Qh,sE,oE,T3,C3,A3,P3,k3,S3,E3,vb,Qs,_b,bb,wb,lE,cE,rp],dE=new Map([["core",_3],["failsafe",[dc,fc,Xh]],["json",x3],["yaml11",uE],["yaml-1.1",uE]]),fE={binary:vb,bool:gb,float:JS,floatExp:YS,floatNaN:KS,floatTime:cE,int:QS,intHex:eE,intOct:XS,intTime:lE,map:dc,merge:Qs,null:Qh,omap:_b,pairs:bb,seq:fc,set:wb,timestamp:rp},O3={"tag:yaml.org,2002:binary":vb,"tag:yaml.org,2002:merge":Qs,"tag:yaml.org,2002:omap":_b,"tag:yaml.org,2002:pairs":bb,"tag:yaml.org,2002:set":wb,"tag:yaml.org,2002:timestamp":rp};function kb(t,e,n){const r=dE.get(e);if(r&&!t)return n&&!r.includes(Qs)?r.concat(Qs):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(dE.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(Qs)),i.reduce((s,o)=>{const a=typeof o=="string"?fE[o]:o;if(!a){const c=JSON.stringify(o),u=Object.keys(fE).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(a)||s.push(a),s},[])}const $3=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class ip{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?kb(e,"compat"):e?kb(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?O3:{},this.tags=kb(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,zo,{value:dc}),Object.defineProperty(this,Ss,{value:Xh}),Object.defineProperty(this,rc,{value:fc}),this.sortMapEntries=typeof o=="function"?o:o===!0?$3:null}clone(){const e=Object.create(ip.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function L3(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(n.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=qS(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const c=s(t.commentBefore);n.unshift(Xs(c,""))}let o=!1,a=null;if(t.contents){if(Cn(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const d=s(t.contents.commentBefore);n.push(Xs(d,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=uc(t.contents,i,()=>a=null,c);a&&(u+=Na(u,"",s(a))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(uc(t.contents,i));if(t.directives?.docEnd)if(t.comment){const c=s(t.comment);c.includes(`
306
306
  `)?(n.push("..."),n.push(Xs(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(Xs(s(c),"")))}return n.join(`
307
307
  `)+`
308
- `}class gc{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Pi,{value:lb});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Vr({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(gc.prototype,{[Pi]:{value:lb}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Cn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){mc(this.contents)&&this.contents.add(e)}addIn(e,n){mc(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=MS(this);e.anchor=!n||r.has(n)?FS(n||"a",r):n}return new Uh(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const v=b=>typeof b=="number"||b instanceof String||b instanceof Number,_=n.filter(v).map(String);_.length>0&&(n=n.concat(_)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:u,tag:d}=r??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=oz(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:p},m=ed(e,d,g);return a&&Tn(m)&&(m.flow=!0),h(),m}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new Pr(i,s)}delete(e){return mc(this.contents)?this.contents.delete(e):!1}deleteIn(e){return td(e)?this.contents==null?!1:(this.contents=null,!0):mc(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Tn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return td(e)?!n&&en(this.contents)?this.contents.value:this.contents:Tn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Tn(this.contents)?this.contents.has(e):!1}hasIn(e){return td(e)?this.contents!==void 0:Tn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=qh(this.schema,[e],n):mc(this.contents)&&this.contents.set(e,n)}setIn(e,n){td(e)?this.contents=n:this.contents==null?this.contents=qh(this.schema,Array.from(e),n):mc(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Vr({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Vr({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new ip(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Oi(this.contents,n??"",a);if(typeof s=="function")for(const{count:u,res:d}of a.anchors.values())s(d,u);return typeof o=="function"?lc(o,{"":c},"",c):c}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Lz(this,e)}}function mc(t){if(Tn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Sb extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class Ra extends Sb{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class hE extends Sb{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const sp=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
308
+ `}class gc{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Pi,{value:lb});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Vr({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(gc.prototype,{[Pi]:{value:lb}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Cn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){mc(this.contents)&&this.contents.add(e)}addIn(e,n){mc(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=MS(this);e.anchor=!n||r.has(n)?FS(n||"a",r):n}return new Uh(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const v=b=>typeof b=="number"||b instanceof String||b instanceof Number,_=n.filter(v).map(String);_.length>0&&(n=n.concat(_)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:u,tag:d}=r??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=o3(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:p},m=ed(e,d,g);return a&&Tn(m)&&(m.flow=!0),h(),m}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new Pr(i,s)}delete(e){return mc(this.contents)?this.contents.delete(e):!1}deleteIn(e){return td(e)?this.contents==null?!1:(this.contents=null,!0):mc(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Tn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return td(e)?!n&&en(this.contents)?this.contents.value:this.contents:Tn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Tn(this.contents)?this.contents.has(e):!1}hasIn(e){return td(e)?this.contents!==void 0:Tn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=qh(this.schema,[e],n):mc(this.contents)&&this.contents.set(e,n)}setIn(e,n){td(e)?this.contents=n:this.contents==null?this.contents=qh(this.schema,Array.from(e),n):mc(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Vr({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Vr({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new ip(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Oi(this.contents,n??"",a);if(typeof s=="function")for(const{count:u,res:d}of a.anchors.values())s(d,u);return typeof o=="function"?lc(o,{"":c},"",c):c}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return L3(this,e)}}function mc(t){if(Tn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Sb extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class Ra extends Sb{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class hE extends Sb{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const sp=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
309
309
  `),o=a+o}if(/[^ ]/.test(o)){let a=1;const c=n.linePos[1];c&&c.line===r&&c.col>i&&(a=Math.max(1,Math.min(c.col-i,80-s)));const u=" ".repeat(s)+"^".repeat(a);n.message+=`:
310
310
 
311
311
  ${o}
312
312
  ${u}
313
313
  `}};function vc(t,{flow:e,indicator:n,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let c=!1,u=a,d=a,f="",h="",p=!1,g=!1,m=null,v=null,_=null,b=null,y=null,x=null,k=null;for(const E of t)switch(g&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&s(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(u&&E.type!=="comment"&&E.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),E.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&E.source.includes(" ")&&(m=E),d=!0;break;case"comment":{d||s(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const A=E.source.substring(1)||" ";f?f+=h+A:f=A,h="",u=!1;break}case"newline":u?f?f+=E.source:(!x||n!=="seq-item-ind")&&(c=!0):h+=E.source,u=!0,p=!0,(v||_)&&(b=E),d=!0;break;case"anchor":v&&s(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&s(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=E,k===null&&(k=E.offset),u=!1,d=!1,g=!0;break;case"tag":{_&&s(E,"MULTIPLE_TAGS","A node can have at most one tag"),_=E,k===null&&(k=E.offset),u=!1,d=!1,g=!0;break}case n:(v||_)&&s(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),x&&s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),x=E,u=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(e){y&&s(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),y=E,u=!1,d=!1;break}default:s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),u=!1,d=!1}const S=t[t.length-1],C=S?S.offset+S.source.length:i;return g&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:y,found:x,spaceBefore:c,comment:f,hasNewline:p,anchor:v,tag:_,newlineAfterProp:b,end:C,start:k??C}}function sd(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
314
- `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(sd(e.key)||sd(e.value))return!0}return!1;default:return!0}}function Eb(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&sd(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function pE(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||en(s)&&en(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const gE="All mapping items must start at the same column";function Nz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??ci,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,u=null;for(const d of r.items){const{start:f,key:h,sep:p,value:g}=d,m=vc(f,{indicator:"explicit-key-ind",next:h??p?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),v=!m.found;if(v){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(c,"BAD_INDENT",gE)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(a.comment?a.comment+=`
314
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(sd(e.key)||sd(e.value))return!0}return!1;default:return!0}}function Eb(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&sd(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function pE(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||en(s)&&en(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const gE="All mapping items must start at the same column";function N3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??ci,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,u=null;for(const d of r.items){const{start:f,key:h,sep:p,value:g}=d,m=vc(f,{indicator:"explicit-key-ind",next:h??p?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),v=!m.found;if(v){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(c,"BAD_INDENT",gE)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(a.comment?a.comment+=`
315
315
  `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||sd(h))&&i(h??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==r.indent&&i(c,"BAD_INDENT",gE);n.atKey=!0;const _=m.end,b=h?t(n,h,m,i):e(n,_,f,null,m,i);n.schema.compat&&Eb(r.indent,h,i),n.atKey=!1,pE(n,a.items,b)&&i(_,"DUPLICATE_KEY","Map keys must be unique");const y=vc(p??[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=y.end,y.found){v&&(g?.type==="block-map"&&!y.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<y.found.offset-1024&&i(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const x=g?t(n,g,y,i):e(n,c,p,null,y,i);n.schema.compat&&Eb(r.indent,g,i),c=x.range[2];const k=new Pr(b,x);n.options.keepSourceTokens&&(k.srcToken=d),a.items.push(k)}else{v&&i(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(b.comment?b.comment+=`
316
- `+y.comment:b.comment=y.comment);const x=new Pr(b);n.options.keepSourceTokens&&(x.srcToken=d),a.items.push(x)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,c,u??c],a}function Iz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??Uo,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,u=null;for(const{start:d,value:f}of r.items){const h=vc(d,{indicator:"seq-item-ind",next:f,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||f)f&&f.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(a.comment=h.comment);continue}const p=f?t(n,f,h,i):e(n,h.end,d,null,h,i);n.schema.compat&&Eb(r.indent,f,i),c=p.range[2],a.items.push(p)}return a.range=[r.offset,c,u??c],a}function od(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:c,type:u}=a;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=c.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=c),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}const Tb="Block collections are not allowed within flow collections",Cb=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Rz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?ci:Uo),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v<r.items.length;++v){const _=r.items[v],{start:b,key:y,sep:x,value:k}=_,S=vc(b,{flow:a,indicator:"explicit-key-ind",next:y??x?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!x&&!k){v===0&&S.comma?i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):v<r.items.length-1&&i(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(u.comment?u.comment+=`
316
+ `+y.comment:b.comment=y.comment);const x=new Pr(b);n.options.keepSourceTokens&&(x.srcToken=d),a.items.push(x)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,c,u??c],a}function I3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??Uo,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,u=null;for(const{start:d,value:f}of r.items){const h=vc(d,{indicator:"seq-item-ind",next:f,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||f)f&&f.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(a.comment=h.comment);continue}const p=f?t(n,f,h,i):e(n,h.end,d,null,h,i);n.schema.compat&&Eb(r.indent,f,i),c=p.range[2],a.items.push(p)}return a.range=[r.offset,c,u??c],a}function od(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:c,type:u}=a;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=c.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=c),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}const Tb="Block collections are not allowed within flow collections",Cb=t=>t&&(t.type==="block-map"||t.type==="block-seq");function R3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?ci:Uo),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v<r.items.length;++v){const _=r.items[v],{start:b,key:y,sep:x,value:k}=_,S=vc(b,{flow:a,indicator:"explicit-key-ind",next:y??x?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!x&&!k){v===0&&S.comma?i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):v<r.items.length-1&&i(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(u.comment?u.comment+=`
317
317
  `+S.comment:u.comment=S.comment),f=S.end;continue}!o&&n.options.strict&&sd(y)&&i(y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)S.comma&&i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(S.comma||i(S.start,"MISSING_CHAR",`Missing , between ${a} items`),S.comment){let C="";e:for(const E of b)switch(E.type){case"comma":case"space":break;case"comment":C=E.source.substring(1);break e;default:break e}if(C){let E=u.items[u.items.length-1];gn(E)&&(E=E.value??E.key),E.comment?E.comment+=`
318
318
  `+C:E.comment=C,S.comment=S.comment.substring(C.length+1)}}if(!o&&!x&&!S.found){const C=k?t(n,k,S,i):e(n,S.end,x,null,S,i);u.items.push(C),f=C.range[2],Cb(k)&&i(C.range,"BLOCK_IN_FLOW",Tb)}else{n.atKey=!0;const C=S.end,E=y?t(n,y,S,i):e(n,C,b,null,S,i);Cb(y)&&i(E.range,"BLOCK_IN_FLOW",Tb),n.atKey=!1;const A=vc(x??[],{flow:a,indicator:"map-value-ind",next:k,offset:E.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(A.found){if(!o&&!S.found&&n.options.strict){if(x)for(const I of x){if(I===A.found)break;if(I.type==="newline"){i(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<A.found.offset-1024&&i(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&k.source[0]===":"?i(k,"MISSING_CHAR",`Missing space after : in ${a}`):i(A.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const O=k?t(n,k,A,i):A.found?e(n,A.end,x,null,A,i):null;O?Cb(k)&&i(O.range,"BLOCK_IN_FLOW",Tb):A.comment&&(E.comment?E.comment+=`
319
319
  `+A.comment:E.comment=A.comment);const L=new Pr(E,O);if(n.options.keepSourceTokens&&(L.srcToken=_),o){const I=u;pE(n,I.items,E)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(L)}else{const I=new ci(n.schema);I.flow=!0,I.items.push(L);const N=(O??E).range;I.range=[E.range[0],N[1],N[2]],u.items.push(I)}f=O?O.range[2]:A.end}}const h=o?"}":"]",[p,...g]=r.end;let m=f;if(p&&p.source===h)m=p.offset+p.source.length;else{const v=a[0].toUpperCase()+a.substring(1),_=d?`${v} must end with a ${h}`:`${v} in block collection must be sufficiently indented and end with a ${h}`;i(f,d?"MISSING_CHAR":"BAD_INDENT",_),p&&p.source.length!==1&&g.unshift(p)}if(g.length>0){const v=od(g,m,n.options.strict,i);v.comment&&(u.comment?u.comment+=`
320
- `+v.comment:u.comment=v.comment),u.range=[r.offset,m,v.offset]}else u.range=[r.offset,m,m];return u}function Ab(t,e,n,r,i,s){const o=n.type==="block-map"?Nz(t,e,n,r,s):n.type==="block-seq"?Iz(t,e,n,r,s):Rz(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Dz(t,e,n,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=r,g=h&&s?h.offset>s.offset?h:s:h??s;g&&(!p||p.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===ci.tagName&&a==="map"||o===Uo.tagName&&a==="seq")return Ab(t,e,n,i,o);let c=e.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!c){const h=e.schema.knownTags[o];if(h&&h.collection===a)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?.collection?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${a} collection, but expects ${h.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ab(t,e,n,i,o)}const u=Ab(t,e,n,i,o,c),d=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,f=Cn(d)?d:new _t(d);return f.range=u.range,f.tag=o,c?.format&&(f.format=c.format),f}function mE(t,e,n){const r=e.offset,i=Mz(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?_t.BLOCK_FOLDED:_t.BLOCK_LITERAL,o=e.source?Fz(e.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const v=o[m][1];if(v===""||v==="\r")a=m;else break}if(a===0){const m=i.chomp==="+"&&o.length>0?`
320
+ `+v.comment:u.comment=v.comment),u.range=[r.offset,m,v.offset]}else u.range=[r.offset,m,m];return u}function Ab(t,e,n,r,i,s){const o=n.type==="block-map"?N3(t,e,n,r,s):n.type==="block-seq"?I3(t,e,n,r,s):R3(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function D3(t,e,n,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=r,g=h&&s?h.offset>s.offset?h:s:h??s;g&&(!p||p.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===ci.tagName&&a==="map"||o===Uo.tagName&&a==="seq")return Ab(t,e,n,i,o);let c=e.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!c){const h=e.schema.knownTags[o];if(h&&h.collection===a)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?.collection?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${a} collection, but expects ${h.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ab(t,e,n,i,o)}const u=Ab(t,e,n,i,o,c),d=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,f=Cn(d)?d:new _t(d);return f.range=u.range,f.tag=o,c?.format&&(f.format=c.format),f}function mE(t,e,n){const r=e.offset,i=M3(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?_t.BLOCK_FOLDED:_t.BLOCK_LITERAL,o=e.source?F3(e.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const v=o[m][1];if(v===""||v==="\r")a=m;else break}if(a===0){const m=i.chomp==="+"&&o.length>0?`
321
321
  `.repeat(Math.max(1,o.length-1)):"";let v=r+i.length;return e.source&&(v+=e.source.length),{value:m,type:s,comment:i.comment,range:[r,v,v]}}let c=e.indent+i.indent,u=e.offset+i.length,d=0;for(let m=0;m<a;++m){const[v,_]=o[m];if(_===""||_==="\r")i.indent===0&&v.length>c&&(c=v.length);else{v.length<c&&n(u+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=v.length),d=m,c===0&&!t.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=v.length+_.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>c&&(a=m+1);let f="",h="",p=!1;for(let m=0;m<d;++m)f+=o[m][0].slice(c)+`
322
322
  `;for(let m=d;m<a;++m){let[v,_]=o[m];u+=v.length+_.length+1;const b=_[_.length-1]==="\r";if(b&&(_=_.slice(0,-1)),_&&v.length<c){const x=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(u-_.length-(b?2:1),"BAD_INDENT",x),v=""}s===_t.BLOCK_LITERAL?(f+=h+v.slice(c)+_,h=`
323
323
  `):v.length>c||_[0]===" "?(h===" "?h=`
@@ -332,41 +332,41 @@ ${u}
332
332
  `+o[m][0].slice(c);f[f.length-1]!==`
333
333
  `&&(f+=`
334
334
  `);break;default:f+=`
335
- `}const g=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,g,g]}}function Mz({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",c=-1;for(let h=1;h<i.length;++h){const p=i[h];if(!a&&(p==="-"||p==="+"))a=p;else{const g=Number(p);!o&&g?o=g:c===-1&&(c=t+h)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,d="",f=i.length;for(let h=1;h<e.length;++h){const p=e[h];switch(p.type){case"space":u=!0;case"newline":f+=p.source.length;break;case"comment":n&&!u&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{const g=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",g);const m=p.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:d,length:f}}function Fz(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function vE(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,c;const u=(h,p,g)=>n(r+h,p,g);switch(i){case"scalar":a=_t.PLAIN,c=zz(s,u);break;case"single-quoted-scalar":a=_t.QUOTE_SINGLE,c=jz(s,u);break;case"double-quoted-scalar":a=_t.QUOTE_DOUBLE,c=Uz(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const d=r+s.length,f=od(o,d,e,n);return{value:c,type:a,comment:f.comment,range:[r,d,f.offset]}}function zz(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),bE(t)}function jz(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),bE(t.slice(1,-1)).replace(/''/g,"'")}function bE(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
335
+ `}const g=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,g,g]}}function M3({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",c=-1;for(let h=1;h<i.length;++h){const p=i[h];if(!a&&(p==="-"||p==="+"))a=p;else{const g=Number(p);!o&&g?o=g:c===-1&&(c=t+h)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,d="",f=i.length;for(let h=1;h<e.length;++h){const p=e[h];switch(p.type){case"space":u=!0;case"newline":f+=p.source.length;break;case"comment":n&&!u&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{const g=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",g);const m=p.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:d,length:f}}function F3(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function vE(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,c;const u=(h,p,g)=>n(r+h,p,g);switch(i){case"scalar":a=_t.PLAIN,c=z3(s,u);break;case"single-quoted-scalar":a=_t.QUOTE_SINGLE,c=j3(s,u);break;case"double-quoted-scalar":a=_t.QUOTE_DOUBLE,c=U3(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const d=r+s.length,f=od(o,d,e,n);return{value:c,type:a,comment:f.comment,range:[r,d,f.offset]}}function z3(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),bE(t)}function j3(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),bE(t.slice(1,-1)).replace(/''/g,"'")}function bE(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
336
336
  `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
337
337
  `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let i=r[1],s=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?s===`
338
338
  `?i+=s:s=`
339
- `:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+(r?.[1]??"")}function Uz(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
339
+ `:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+(r?.[1]??"")}function U3(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
340
340
  `))if(i===`
341
- `){const{fold:s,offset:o}=Bz(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=qz[s];if(o)n+=o;else if(s===`
341
+ `){const{fold:s,offset:o}=B3(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=q3[s];if(o)n+=o;else if(s===`
342
342
  `)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
343
- `)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=Hz(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
343
+ `)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=H3(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
344
344
  `&&!(o==="\r"&&t[r+2]===`
345
- `)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function Bz(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
345
+ `)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function B3(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
346
346
  `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
347
347
  `);)r===`
348
348
  `&&(n+=`
349
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const qz={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
350
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Hz(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function _E(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?mE(t,e,r):vE(e,t.options.strict,r),c=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;t.options.stringKeys&&t.atKey?u=t.schema[Ss]:c?u=Vz(t.schema,i,c,n,r):e.type==="scalar"?u=Wz(t,i,e,r):u=t.schema[Ss];let d;try{const f=u.resolve(i,h=>r(n??e,"TAG_RESOLVE_FAILED",h),t.options);d=en(f)?f:new _t(f)}catch(f){const h=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",h),d=new _t(i)}return d.range=a,d.source=i,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),o&&(d.comment=o),d}function Vz(t,e,n,r,i){if(n==="!")return t[Ss];const s=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Ss])}function Wz({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[Ss];if(n.compat){const a=n.compat.find(c=>c.default&&c.test?.test(r))??n[Ss];if(o.tag!==a.tag){const c=e.tagString(o.tag),u=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function Gz(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}const Kz={composeNode:yE,composeEmptyNode:Pb};function yE(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=n;let u,d=!0;switch(e.type){case"alias":u=Yz(t,e,r),(a||c)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=_E(t,e,c,r),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=Dz(Kz,t,e,n,r),a&&(u.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=Pb(t,e.offset,void 0,null,n,r),d=!1}}return a&&u.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!en(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),t.options.keepSourceTokens&&d&&(u.srcToken=e),u}function Pb(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:c},u){const d={type:"scalar",offset:Gz(e,n,r),indent:-1,source:""},f=_E(t,d,a,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function Yz({options:t},{offset:e,source:n,end:r},i){const s=new Uh(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=od(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function Jz(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),c=new gc(void 0,a),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=vc(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?yE(u,i,d,o):Pb(u,d.end,r,null,d,o);const f=c.contents.range[2],h=od(s,f,!1,o);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function ad(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function wE(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
349
+ `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const q3={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
350
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function H3(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function _E(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?mE(t,e,r):vE(e,t.options.strict,r),c=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;t.options.stringKeys&&t.atKey?u=t.schema[Ss]:c?u=V3(t.schema,i,c,n,r):e.type==="scalar"?u=W3(t,i,e,r):u=t.schema[Ss];let d;try{const f=u.resolve(i,h=>r(n??e,"TAG_RESOLVE_FAILED",h),t.options);d=en(f)?f:new _t(f)}catch(f){const h=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",h),d=new _t(i)}return d.range=a,d.source=i,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),o&&(d.comment=o),d}function V3(t,e,n,r,i){if(n==="!")return t[Ss];const s=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Ss])}function W3({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[Ss];if(n.compat){const a=n.compat.find(c=>c.default&&c.test?.test(r))??n[Ss];if(o.tag!==a.tag){const c=e.tagString(o.tag),u=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function G3(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}const K3={composeNode:yE,composeEmptyNode:Pb};function yE(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=n;let u,d=!0;switch(e.type){case"alias":u=Y3(t,e,r),(a||c)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=_E(t,e,c,r),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=D3(K3,t,e,n,r),a&&(u.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=Pb(t,e.offset,void 0,null,n,r),d=!1}}return a&&u.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!en(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),t.options.keepSourceTokens&&d&&(u.srcToken=e),u}function Pb(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:c},u){const d={type:"scalar",offset:G3(e,n,r),indent:-1,source:""},f=_E(t,d,a,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function Y3({options:t},{offset:e,source:n,end:r},i){const s=new Uh(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=od(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function J3(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),c=new gc(void 0,a),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=vc(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?yE(u,i,d,o):Pb(u,d.end,r,null,d,o);const f=c.contents.range[2],h=od(s,f,!1,o);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function ad(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function wE(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
351
351
 
352
352
  `:`
353
353
  `)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Ob{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const o=ad(n);s?this.warnings.push(new hE(o,r,i)):this.errors.push(new Ra(o,r,i))},this.directives=new Vr({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:i}=wE(this.prelude);if(r){const s=e.contents;if(n)e.comment=e.comment?`${e.comment}
354
354
  ${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(Tn(s)&&!s.flow&&s.items.length>0){let o=s.items[0];gn(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
355
355
  ${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}
356
- ${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:wE(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=ad(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=Jz(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ra(ad(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Ra(ad(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=od(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
357
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ra(ad(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new gc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function Zz(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new Ra([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vE(t,e,r);case"block-scalar":return mE({options:{strict:e}},t,r)}}return null}function Xz(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=rd({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:r,source:`
356
+ ${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:wE(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=ad(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=J3(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ra(ad(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Ra(ad(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=od(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
357
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ra(ad(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new gc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function Z3(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new Ra([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vE(t,e,r);case"block-scalar":return mE({options:{strict:e}},t,r)}}return null}function X3(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=rd({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:r,source:`
358
358
  `}];switch(a[0]){case"|":case">":{const u=a.indexOf(`
359
359
  `),d=a.substring(0,u),f=a.substring(u+1)+`
360
360
  `,h=[{type:"block-scalar-header",offset:s,indent:r,source:d}];return xE(h,c)||h.push({type:"newline",offset:-1,indent:r,source:`
361
- `}),{type:"block-scalar",offset:s,indent:r,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:c};default:return{type:"scalar",offset:s,indent:r,source:a,end:c}}}function Qz(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const c=rd({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":e3(t,c);break;case'"':$b(t,c,"double-quoted-scalar");break;case"'":$b(t,c,"single-quoted-scalar");break;default:$b(t,c,"scalar")}}function e3(t,e){const n=e.indexOf(`
361
+ `}),{type:"block-scalar",offset:s,indent:r,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:c};default:return{type:"scalar",offset:s,indent:r,source:a,end:c}}}function Q3(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const c=rd({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":ez(t,c);break;case'"':$b(t,c,"double-quoted-scalar");break;case"'":$b(t,c,"single-quoted-scalar");break;default:$b(t,c,"scalar")}}function ez(t,e){const n=e.indexOf(`
362
362
  `),r=e.substring(0,n),i=e.substring(n+1)+`
363
363
  `;if(t.type==="block-scalar"){const s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=i}else{const{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];xE(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
364
364
  `});for(const c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function xE(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function $b(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(const s of r)s.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
365
- `};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const t3=t=>"type"in t?op(t):ap(t);function op(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=op(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=ap(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=ap(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=ap(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function ap({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=op(e)),n)for(const s of n)i+=s.source;return r&&(i+=op(r)),i}const Lb=Symbol("break visit"),n3=Symbol("skip children"),kE=Symbol("remove item");function Da(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),SE(Object.freeze([]),t,e)}Da.BREAK=Lb,Da.SKIP=n3,Da.REMOVE=kE,Da.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n},Da.parentCollection=(t,e)=>{const n=Da.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function SE(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=SE(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===Lb)return Lb;a===kE&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const lp="\uFEFF",cp="",up="",ld="",r3=t=>!!t&&"items"in t,i3=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function s3(t){switch(t){case lp:return"<BOM>";case cp:return"<DOC>";case up:return"<FLOW_END>";case ld:return"<SCALAR>";default:return JSON.stringify(t)}}function EE(t){switch(t){case lp:return"byte-order-mark";case cp:return"doc-mode";case up:return"flow-error-end";case ld:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
365
+ `};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const tz=t=>"type"in t?op(t):ap(t);function op(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=op(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=ap(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=ap(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=ap(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function ap({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=op(e)),n)for(const s of n)i+=s.source;return r&&(i+=op(r)),i}const Lb=Symbol("break visit"),nz=Symbol("skip children"),kE=Symbol("remove item");function Da(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),SE(Object.freeze([]),t,e)}Da.BREAK=Lb,Da.SKIP=nz,Da.REMOVE=kE,Da.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n},Da.parentCollection=(t,e)=>{const n=Da.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function SE(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=SE(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===Lb)return Lb;a===kE&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const lp="\uFEFF",cp="",up="",ld="",rz=t=>!!t&&"items"in t,iz=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function sz(t){switch(t){case lp:return"<BOM>";case cp:return"<DOC>";case up:return"<FLOW_END>";case ld:return"<SCALAR>";default:return JSON.stringify(t)}}function EE(t){switch(t){case lp:return"byte-order-mark";case cp:return"doc-mode";case up:return"flow-error-end";case ld:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
366
366
  `:case`\r
367
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const o3=Object.freeze(Object.defineProperty({__proto__:null,BOM:lp,DOCUMENT:cp,FLOW_END:up,SCALAR:ld,createScalarToken:Xz,isCollection:r3,isScalar:i3,prettyToken:s3,resolveAsScalar:Zz,setScalarValue:Qz,stringify:t3,tokenType:EE,visit:Da},Symbol.toStringTag,{value:"Module"}));function Zi(t){switch(t){case void 0:case" ":case`
368
- `:case"\r":case" ":return!0;default:return!1}}const TE=new Set("0123456789ABCDEFabcdef"),a3=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),dp=new Set(",[]{}"),l3=new Set(` ,[]{}
369
- \r `),Nb=t=>!t||l3.has(t);class CE{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
367
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const oz=Object.freeze(Object.defineProperty({__proto__:null,BOM:lp,DOCUMENT:cp,FLOW_END:up,SCALAR:ld,createScalarToken:X3,isCollection:rz,isScalar:iz,prettyToken:sz,resolveAsScalar:Z3,setScalarValue:Q3,stringify:tz,tokenType:EE,visit:Da},Symbol.toStringTag,{value:"Module"}));function Zi(t){switch(t){case void 0:case" ":case`
368
+ `:case"\r":case" ":return!0;default:return!1}}const TE=new Set("0123456789ABCDEFabcdef"),az=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),dp=new Set(",[]{}"),lz=new Set(` ,[]{}
369
+ \r `),Nb=t=>!t||lz.has(t);class CE{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
370
370
  `?!0:n==="\r"?this.buffer[e+1]===`
371
371
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const i=this.buffer[r+e+1];if(i===`
372
372
  `||!i&&!this.atEnd)return e+r+1}return n===`
@@ -381,16 +381,16 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
381
381
  `&&s>=this.pos&&s+1+n>a)e=s;else break}while(!0);return yield ld,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(Zi(s)||e&&dp.has(s))break;n=r}else if(Zi(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
382
382
  `?(r+=1,i=`
383
383
  `,s=this.buffer[r+1]):n=r),s==="#"||e&&dp.has(s))break;if(i===`
384
- `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&dp.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ld,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Nb))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(Zi(n)||e&&dp.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!Zi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(a3.has(n))n=this.buffer[++e];else if(n==="%"&&TE.has(this.buffer[e+1])&&TE.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
384
+ `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&dp.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ld,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Nb))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(Zi(n)||e&&dp.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!Zi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(az.has(n))n=this.buffer[++e];else if(n==="%"&&TE.has(this.buffer[e+1])&&TE.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
385
385
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
386
386
  `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class AE{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<e?n=s+1:r=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function Ma(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function PE(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function OE(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fp(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function bc(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function $E(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Ma(e.start,"explicit-key-ind")&&!Ma(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,OE(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Ib{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new CE,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=EE(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&$E(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&PE(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{PE(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=fp(this.peek(2)),r=bc(n);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
387
387
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
388
388
  `,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 s=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const c=n.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),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?(s.push(this.sourceToken),e.items.push({start:s,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(Ma(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(OE(n.key)&&!Ma(n.sep,"newline")){const o=bc(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:o,key:a,sep:c}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Ma(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=bc(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ma(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 o=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){r&&o.type!=="block-seq"&&e.items.push({start:s}),this.stack.push(o);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||Ma(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=fp(r),s=bc(i);$E(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};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(`
389
389
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
390
- `,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=fp(e),r=bc(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=fp(e),r=bc(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 LE(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new AE||null,prettyErrors:e}}function c3(t,e={}){const{lineCounter:n,prettyErrors:r}=LE(e),i=new Ib(n?.addNewLine),s=new Ob(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach(sp(t,n)),a.warnings.forEach(sp(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function NE(t,e={}){const{lineCounter:n,prettyErrors:r}=LE(e),i=new Ib(n?.addNewLine),s=new Ob(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ra(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(sp(t,n)),o.warnings.forEach(sp(t,n))),o}function u3(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=NE(t,n);if(!i)return null;if(i.warnings.forEach(s=>HS(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function d3(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 La(t)&&!r?t.toString(n):new gc(t,r,n).toString(n)}const cd=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uh,CST:o3,Composer:Ob,Document:gc,Lexer:CE,LineCounter:AE,Pair:Pr,Parser:Ib,Scalar:_t,Schema:ip,YAMLError:Sb,YAMLMap:ci,YAMLParseError:Ra,YAMLSeq:Uo,YAMLWarning:hE,isAlias:$a,isCollection:Tn,isDocument:La,isMap:ic,isNode:Cn,isPair:gn,isScalar:en,isSeq:sc,parse:u3,parseAllDocuments:c3,parseDocument:NE,stringify:d3,visit:jo,visitAsync:jh},Symbol.toStringTag,{value:"Module"}));var Rb,IE;function f3(){return IE||(IE=1,Rb=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,s;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(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),Rb}var h3=f3();const Mn=gf(h3),Db="sveltia-cms.prefs",Mb=st(),Tt=st({},t=>{Mb.set(void 0),(async()=>{try{const e=await Qr.get(Db)??{};e.apiKeys??={},e.closeOnSave??=!0,e.underlineLinks??=!0,t(e)}catch{Mb.set({type:"permission_denied"})}})()});Tt.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{Mn(t,await Qr.get(Db))||await Qr.set(Db,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,devModeEnabled:i=!1}=t;e&&ne(ux).includes(e)&&Ln.set(e);const s=!n||n==="auto",o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?o:n,autoTheming:s,underlineLinks:r,env:i?"dev":"prod"})});const $i={i18nEnabled:!1,saveAllLocales:!0,allLocales:["_default"],initialLocales:["_default"],defaultLocale:"_default",structure:"single_file",canonicalSlug:{key:"translationKey",value:"{{slug}}"}},hp=(t,e)=>{const n=ne(yt);let r;Jn(n.i18n)&&(r=n.i18n,t.i18n?(Jn(t.i18n)&&Object.assign(r,t.i18n),e&&(e.i18n?Jn(e.i18n)&&Object.assign(r,e.i18n):r=void 0)):r=void 0);const{structure:i="single_file",locales:s=[],default_locale:o=void 0,initial_locales:a=void 0,save_all_locales:c=!0,canonical_slug:{key:u="translationKey",value:d="{{slug}}"}={}}=r??{},f=!!s.length,h=f?s:["_default"],p=f?c===!0&&a===void 0:!0,g=f?o&&h.includes(o)?o:h[0]:"_default",m=a==="all"?h:a==="default"?[g]:h.filter(_=>_===g||(Array.isArray(a)?a.includes(_):!0)),v=e?e.file.includes("{{locale}}")?"multiple_files":"single_file":i;return{i18nEnabled:f,saveAllLocales:p,allLocales:h,defaultLocale:g,initialLocales:m,structure:v,canonicalSlug:{key:u,value:d}}},pp=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},Ts=t=>{const e=pp(t);if(!e)return t;const n=new Intl.DisplayNames(ne(Ln),{type:"language"});try{return n.of(e)??t}catch(r){return console.error(r),t}},_c=(t,e={})=>new Intl.ListFormat(pp(t),{style:"narrow",type:"conjunction",...e});function RE(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function DE(t){return t}function Fa(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||DE,s={};function o(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=RE(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 o(f,v,u+1);s[v]=f})}return o(t),s}function za(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||DE,s={};if(RE(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,Fa(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=s;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]=za(t[d],e)}),s}const ud=({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 ME;function He(){return ME.apply(null,arguments)}function p3(t){ME=t}function Xi(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function ja(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function jt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Fb(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(jt(t,e))return!1;return!0}function ti(t){return t===void 0}function eo(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function dd(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function FE(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function Bo(t,e){for(var n in e)jt(e,n)&&(t[n]=e[n]);return jt(e,"toString")&&(t.toString=e.toString),jt(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Cs(t,e,n,r){return dT(t,e,n,r,!0).utc()}function g3(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function kt(t){return t._pf==null&&(t._pf=g3()),t._pf}var zb;Array.prototype.some?zb=Array.prototype.some:zb=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function jb(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=kt(t),n=zb.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function gp(t){var e=Cs(NaN);return t!=null?Bo(kt(e),t):kt(e).userInvalidated=!0,e}var zE=He.momentProperties=[],Ub=!1;function Bb(t,e){var n,r,i,s=zE.length;if(ti(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),ti(e._i)||(t._i=e._i),ti(e._f)||(t._f=e._f),ti(e._l)||(t._l=e._l),ti(e._strict)||(t._strict=e._strict),ti(e._tzm)||(t._tzm=e._tzm),ti(e._isUTC)||(t._isUTC=e._isUTC),ti(e._offset)||(t._offset=e._offset),ti(e._pf)||(t._pf=kt(e)),ti(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=zE[n],i=e[r],ti(i)||(t[r]=i);return t}function fd(t){Bb(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ub===!1&&(Ub=!0,He.updateOffset(this),Ub=!1)}function Qi(t){return t instanceof fd||t!=null&&t._isAMomentObject!=null}function jE(t){He.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Li(t,e){var n=!0;return Bo(function(){if(He.deprecationHandler!=null&&He.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
390
+ `,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=fp(e),r=bc(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=fp(e),r=bc(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 LE(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new AE||null,prettyErrors:e}}function cz(t,e={}){const{lineCounter:n,prettyErrors:r}=LE(e),i=new Ib(n?.addNewLine),s=new Ob(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach(sp(t,n)),a.warnings.forEach(sp(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function NE(t,e={}){const{lineCounter:n,prettyErrors:r}=LE(e),i=new Ib(n?.addNewLine),s=new Ob(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ra(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(sp(t,n)),o.warnings.forEach(sp(t,n))),o}function uz(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=NE(t,n);if(!i)return null;if(i.warnings.forEach(s=>HS(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function dz(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 La(t)&&!r?t.toString(n):new gc(t,r,n).toString(n)}const cd=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uh,CST:oz,Composer:Ob,Document:gc,Lexer:CE,LineCounter:AE,Pair:Pr,Parser:Ib,Scalar:_t,Schema:ip,YAMLError:Sb,YAMLMap:ci,YAMLParseError:Ra,YAMLSeq:Uo,YAMLWarning:hE,isAlias:$a,isCollection:Tn,isDocument:La,isMap:ic,isNode:Cn,isPair:gn,isScalar:en,isSeq:sc,parse:uz,parseAllDocuments:cz,parseDocument:NE,stringify:dz,visit:jo,visitAsync:jh},Symbol.toStringTag,{value:"Module"}));var Rb,IE;function fz(){return IE||(IE=1,Rb=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,s;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(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),Rb}var hz=fz();const Mn=gf(hz),Db="sveltia-cms.prefs",Mb=st(),Tt=st({},t=>{Mb.set(void 0),(async()=>{try{const e=await Qr.get(Db)??{};e.apiKeys??={},e.closeOnSave??=!0,e.underlineLinks??=!0,t(e)}catch{Mb.set({type:"permission_denied"})}})()});Tt.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{Mn(t,await Qr.get(Db))||await Qr.set(Db,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,devModeEnabled:i=!1}=t;e&&ne(ux).includes(e)&&Ln.set(e);const s=!n||n==="auto",o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?o:n,autoTheming:s,underlineLinks:r,env:i?"dev":"prod"})});const $i={i18nEnabled:!1,saveAllLocales:!0,allLocales:["_default"],initialLocales:["_default"],defaultLocale:"_default",structure:"single_file",canonicalSlug:{key:"translationKey",value:"{{slug}}"}},hp=(t,e)=>{const n=ne(yt);let r;Jn(n.i18n)&&(r=n.i18n,t.i18n?(Jn(t.i18n)&&Object.assign(r,t.i18n),e&&(e.i18n?Jn(e.i18n)&&Object.assign(r,e.i18n):r=void 0)):r=void 0);const{structure:i="single_file",locales:s=[],default_locale:o=void 0,initial_locales:a=void 0,save_all_locales:c=!0,canonical_slug:{key:u="translationKey",value:d="{{slug}}"}={}}=r??{},f=!!s.length,h=f?s:["_default"],p=f?c===!0&&a===void 0:!0,g=f?o&&h.includes(o)?o:h[0]:"_default",m=a==="all"?h:a==="default"?[g]:h.filter(_=>_===g||(Array.isArray(a)?a.includes(_):!0)),v=e?e.file.includes("{{locale}}")?"multiple_files":"single_file":i;return{i18nEnabled:f,saveAllLocales:p,allLocales:h,defaultLocale:g,initialLocales:m,structure:v,canonicalSlug:{key:u,value:d}}},pp=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},Ts=t=>{const e=pp(t);if(!e)return t;const n=new Intl.DisplayNames(ne(Ln),{type:"language"});try{return n.of(e)??t}catch(r){return console.error(r),t}},_c=(t,e={})=>new Intl.ListFormat(pp(t),{style:"narrow",type:"conjunction",...e});function RE(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function DE(t){return t}function Fa(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||DE,s={};function o(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=RE(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 o(f,v,u+1);s[v]=f})}return o(t),s}function za(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||DE,s={};if(RE(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,Fa(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=s;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]=za(t[d],e)}),s}const ud=({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 ME;function He(){return ME.apply(null,arguments)}function pz(t){ME=t}function Xi(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function ja(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function jt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Fb(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(jt(t,e))return!1;return!0}function ti(t){return t===void 0}function eo(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function dd(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function FE(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function Bo(t,e){for(var n in e)jt(e,n)&&(t[n]=e[n]);return jt(e,"toString")&&(t.toString=e.toString),jt(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Cs(t,e,n,r){return dT(t,e,n,r,!0).utc()}function gz(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function kt(t){return t._pf==null&&(t._pf=gz()),t._pf}var zb;Array.prototype.some?zb=Array.prototype.some:zb=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function jb(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=kt(t),n=zb.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function gp(t){var e=Cs(NaN);return t!=null?Bo(kt(e),t):kt(e).userInvalidated=!0,e}var zE=He.momentProperties=[],Ub=!1;function Bb(t,e){var n,r,i,s=zE.length;if(ti(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),ti(e._i)||(t._i=e._i),ti(e._f)||(t._f=e._f),ti(e._l)||(t._l=e._l),ti(e._strict)||(t._strict=e._strict),ti(e._tzm)||(t._tzm=e._tzm),ti(e._isUTC)||(t._isUTC=e._isUTC),ti(e._offset)||(t._offset=e._offset),ti(e._pf)||(t._pf=kt(e)),ti(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=zE[n],i=e[r],ti(i)||(t[r]=i);return t}function fd(t){Bb(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ub===!1&&(Ub=!0,He.updateOffset(this),Ub=!1)}function Qi(t){return t instanceof fd||t!=null&&t._isAMomentObject!=null}function jE(t){He.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Li(t,e){var n=!0;return Bo(function(){if(He.deprecationHandler!=null&&He.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
391
391
  [`+s+"] ";for(o in arguments[0])jt(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}jE(t+`
392
392
  Arguments: `+Array.prototype.slice.call(r).join("")+`
393
- `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var UE={};function BE(t,e){He.deprecationHandler!=null&&He.deprecationHandler(t,e),UE[t]||(jE(e),UE[t]=!0)}He.suppressDeprecationWarnings=!1,He.deprecationHandler=null;function As(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function m3(t){var e,n;for(n in t)jt(t,n)&&(e=t[n],As(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function qb(t,e){var n=Bo({},t),r;for(r in e)jt(e,r)&&(ja(t[r])&&ja(e[r])?(n[r]={},Bo(n[r],t[r]),Bo(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)jt(t,r)&&!jt(e,r)&&ja(t[r])&&(n[r]=Bo({},n[r]));return n}function Hb(t){t!=null&&this.set(t)}var Vb;Object.keys?Vb=Object.keys:Vb=function(t){var e,n=[];for(e in t)jt(t,e)&&n.push(e);return n};var v3={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function b3(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return As(r)?r.call(e,n):r}function Ps(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Wb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mp=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gb={},yc={};function gt(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(yc[t]=i),e&&(yc[e[0]]=function(){return Ps(i.apply(this,arguments),e[1],e[2])}),n&&(yc[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function _3(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y3(t){var e=t.match(Wb),n,r;for(n=0,r=e.length;n<r;n++)yc[e[n]]?e[n]=yc[e[n]]:e[n]=_3(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=As(e[o])?e[o].call(i,t):e[o];return s}}function vp(t,e){return t.isValid()?(e=qE(e,t.localeData()),Gb[e]=Gb[e]||y3(e),Gb[e](t)):t.localeData().invalidDate()}function qE(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(mp.lastIndex=0;n>=0&&mp.test(t);)t=t.replace(mp,r),mp.lastIndex=0,n-=1;return t}var w3={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"};function x3(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Wb).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var k3="Invalid date";function S3(){return this._invalidDate}var E3="%d",T3=/\d{1,2}/;function C3(t){return this._ordinal.replace("%d",t)}var A3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function P3(t,e,n,r){var i=this._relativeTime[n];return As(i)?i(t,e,n,r):i.replace(/%d/i,t)}function O3(t,e){var n=this._relativeTime[t>0?"future":"past"];return As(n)?n(e):n.replace(/%s/i,e)}var HE={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ni(t){return typeof t=="string"?HE[t]||HE[t.toLowerCase()]:void 0}function Kb(t){var e={},n,r;for(r in t)jt(t,r)&&(n=Ni(r),n&&(e[n]=t[r]));return e}var $3={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function L3(t){var e=[],n;for(n in t)jt(t,n)&&e.push({unit:n,priority:$3[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var VE=/\d/,ui=/\d\d/,WE=/\d{3}/,Yb=/\d{4}/,bp=/[+-]?\d{6}/,un=/\d\d?/,GE=/\d\d\d\d?/,KE=/\d\d\d\d\d\d?/,_p=/\d{1,3}/,Jb=/\d{1,4}/,yp=/[+-]?\d{1,6}/,wc=/\d+/,wp=/[+-]?\d+/,N3=/Z|[+-]\d\d:?\d\d/gi,xp=/Z|[+-]\d\d(?::?\d\d)?/gi,I3=/[+-]?\d+(\.\d{1,3})?/,hd=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,xc=/^[1-9]\d?/,Zb=/^([1-9]\d|\d)/,kp;kp={};function tt(t,e,n){kp[t]=As(e)?e:function(r,i){return r&&n?n:e}}function R3(t,e){return jt(kp,t)?kp[t](e._strict,e._locale):new RegExp(D3(t))}function D3(t){return to(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function to(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ii(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Nt(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Ii(e)),n}var Xb={};function Jt(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),eo(e)&&(r=function(s,o){o[e]=Nt(s)}),i=t.length,n=0;n<i;n++)Xb[t[n]]=r}function pd(t,e){Jt(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function M3(t,e,n){e!=null&&jt(Xb,t)&&Xb[t](e,n._a,n,t)}function Sp(t){return t%4===0&&t%100!==0||t%400===0}var Or=0,no=1,Os=2,Zn=3,es=4,ro=5,Ua=6,F3=7,z3=8;gt("Y",0,0,function(){var t=this.year();return t<=9999?Ps(t,4):"+"+t}),gt(0,["YY",2],0,function(){return this.year()%100}),gt(0,["YYYY",4],0,"year"),gt(0,["YYYYY",5],0,"year"),gt(0,["YYYYYY",6,!0],0,"year"),tt("Y",wp),tt("YY",un,ui),tt("YYYY",Jb,Yb),tt("YYYYY",yp,bp),tt("YYYYYY",yp,bp),Jt(["YYYYY","YYYYYY"],Or),Jt("YYYY",function(t,e){e[Or]=t.length===2?He.parseTwoDigitYear(t):Nt(t)}),Jt("YY",function(t,e){e[Or]=He.parseTwoDigitYear(t)}),Jt("Y",function(t,e){e[Or]=parseInt(t,10)});function gd(t){return Sp(t)?366:365}He.parseTwoDigitYear=function(t){return Nt(t)+(Nt(t)>68?1900:2e3)};var YE=kc("FullYear",!0);function j3(){return Sp(this.year())}function kc(t,e){return function(n){return n!=null?(JE(this,t,n),He.updateOffset(this,e),this):md(this,t)}}function md(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function JE(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!Sp(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function U3(t){return t=Ni(t),As(this[t])?this[t]():this}function B3(t,e){if(typeof t=="object"){t=Kb(t);var n=L3(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Ni(t),As(this[t]))return this[t](e);return this}function q3(t,e){return(t%e+e)%e}var Fn;Array.prototype.indexOf?Fn=Array.prototype.indexOf:Fn=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function Qb(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=q3(e,12);return t+=(e-n)/12,n===1?Sp(t)?29:28:31-n%7%2}gt("M",["MM",2],"Mo",function(){return this.month()+1}),gt("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),gt("MMMM",0,0,function(t){return this.localeData().months(this,t)}),tt("M",un,xc),tt("MM",un,ui),tt("MMM",function(t,e){return e.monthsShortRegex(t)}),tt("MMMM",function(t,e){return e.monthsRegex(t)}),Jt(["M","MM"],function(t,e){e[no]=Nt(t)-1}),Jt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[no]=i:kt(n).invalidMonth=t});var H3="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ZE="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),XE=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,V3=hd,W3=hd;function G3(t,e){return t?Xi(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||XE).test(e)?"format":"standalone"][t.month()]:Xi(this._months)?this._months:this._months.standalone}function K3(t,e){return t?Xi(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[XE.test(e)?"format":"standalone"][t.month()]:Xi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Y3(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Cs([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Fn.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:(i=Fn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Fn.call(this._longMonthsParse,o),i!==-1?i:(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:null))}function J3(t,e,n){var r,i,s;if(this._monthsParseExact)return Y3.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Cs([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function QE(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=Nt(e);else if(e=t.localeData().monthsParse(e),!eo(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,Qb(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function eT(t){return t!=null?(QE(this,t),He.updateOffset(this,!0),this):md(this,"Month")}function Z3(){return Qb(this.year(),this.month())}function X3(t){return this._monthsParseExact?(jt(this,"_monthsRegex")||tT.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(jt(this,"_monthsShortRegex")||(this._monthsShortRegex=V3),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Q3(t){return this._monthsParseExact?(jt(this,"_monthsRegex")||tT.call(this),t?this._monthsStrictRegex:this._monthsRegex):(jt(this,"_monthsRegex")||(this._monthsRegex=W3),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tT(){function t(c,u){return u.length-c.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=Cs([2e3,i]),o=to(this.monthsShort(s,"")),a=to(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ej(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function vd(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Ep(t,e,n){var r=7+e-n,i=(7+vd(t,0,r).getUTCDay()-e)%7;return-i+r-1}function nT(t,e,n,r,i){var s=(7+n-r)%7,o=Ep(t,r,i),a=1+7*(e-1)+s+o,c,u;return a<=0?(c=t-1,u=gd(c)+a):a>gd(t)?(c=t+1,u=a-gd(t)):(c=t,u=a),{year:c,dayOfYear:u}}function bd(t,e,n){var r=Ep(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+io(o,e,n)):i>io(t.year(),e,n)?(s=i-io(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function io(t,e,n){var r=Ep(t,e,n),i=Ep(t+1,e,n);return(gd(t)-r+i)/7}gt("w",["ww",2],"wo","week"),gt("W",["WW",2],"Wo","isoWeek"),tt("w",un,xc),tt("ww",un,ui),tt("W",un,xc),tt("WW",un,ui),pd(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=Nt(t)});function tj(t){return bd(t,this._week.dow,this._week.doy).week}var nj={dow:0,doy:6};function rj(){return this._week.dow}function ij(){return this._week.doy}function sj(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function oj(t){var e=bd(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}gt("d",0,"do","day"),gt("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),gt("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),gt("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),gt("e",0,0,"weekday"),gt("E",0,0,"isoWeekday"),tt("d",un),tt("e",un),tt("E",un),tt("dd",function(t,e){return e.weekdaysMinRegex(t)}),tt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),tt("dddd",function(t,e){return e.weekdaysRegex(t)}),pd(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:kt(n).invalidWeekday=t}),pd(["d","e","E"],function(t,e,n,r){e[r]=Nt(t)});function aj(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function lj(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function e_(t,e){return t.slice(e,7).concat(t.slice(0,e))}var cj="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rT="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),uj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dj=hd,fj=hd,hj=hd;function pj(t,e){var n=Xi(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?e_(n,this._week.dow):t?n[t.day()]:n}function gj(t){return t===!0?e_(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function mj(t){return t===!0?e_(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function vj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Cs([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Fn.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Fn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Fn.call(this._weekdaysParse,o),i!==-1||(i=Fn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Fn.call(this._shortWeekdaysParse,o),i!==-1||(i=Fn.call(this._weekdaysParse,o),i!==-1)?i:(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Fn.call(this._minWeekdaysParse,o),i!==-1||(i=Fn.call(this._weekdaysParse,o),i!==-1)?i:(i=Fn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function bj(t,e,n){var r,i,s;if(this._weekdaysParseExact)return vj.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Cs([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function _j(t){if(!this.isValid())return t!=null?this:NaN;var e=md(this,"Day");return t!=null?(t=aj(t,this.localeData()),this.add(t-e,"d")):e}function yj(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function wj(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=lj(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function xj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(jt(this,"_weekdaysRegex")||(this._weekdaysRegex=dj),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function kj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(jt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fj),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Sj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(jt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hj),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function t_(){function t(d,f){return f.length-d.length}var e=[],n=[],r=[],i=[],s,o,a,c,u;for(s=0;s<7;s++)o=Cs([2e3,1]).day(s),a=to(this.weekdaysMin(o,"")),c=to(this.weekdaysShort(o,"")),u=to(this.weekdays(o,"")),e.push(a),n.push(c),r.push(u),i.push(a),i.push(c),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function n_(){return this.hours()%12||12}function Ej(){return this.hours()||24}gt("H",["HH",2],0,"hour"),gt("h",["hh",2],0,n_),gt("k",["kk",2],0,Ej),gt("hmm",0,0,function(){return""+n_.apply(this)+Ps(this.minutes(),2)}),gt("hmmss",0,0,function(){return""+n_.apply(this)+Ps(this.minutes(),2)+Ps(this.seconds(),2)}),gt("Hmm",0,0,function(){return""+this.hours()+Ps(this.minutes(),2)}),gt("Hmmss",0,0,function(){return""+this.hours()+Ps(this.minutes(),2)+Ps(this.seconds(),2)});function iT(t,e){gt(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}iT("a",!0),iT("A",!1);function sT(t,e){return e._meridiemParse}tt("a",sT),tt("A",sT),tt("H",un,Zb),tt("h",un,xc),tt("k",un,xc),tt("HH",un,ui),tt("hh",un,ui),tt("kk",un,ui),tt("hmm",GE),tt("hmmss",KE),tt("Hmm",GE),tt("Hmmss",KE),Jt(["H","HH"],Zn),Jt(["k","kk"],function(t,e,n){var r=Nt(t);e[Zn]=r===24?0:r}),Jt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Jt(["h","hh"],function(t,e,n){e[Zn]=Nt(t),kt(n).bigHour=!0}),Jt("hmm",function(t,e,n){var r=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r)),kt(n).bigHour=!0}),Jt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r,2)),e[ro]=Nt(t.substr(i)),kt(n).bigHour=!0}),Jt("Hmm",function(t,e,n){var r=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r))}),Jt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r,2)),e[ro]=Nt(t.substr(i))});function Tj(t){return(t+"").toLowerCase().charAt(0)==="p"}var Cj=/[ap]\.?m?\.?/i,Aj=kc("Hours",!0);function Pj(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var oT={calendar:v3,longDateFormat:w3,invalidDate:k3,ordinal:E3,dayOfMonthOrdinalParse:T3,relativeTime:A3,months:H3,monthsShort:ZE,week:nj,weekdays:cj,weekdaysMin:uj,weekdaysShort:rT,meridiemParse:Cj},mn={},_d={},yd;function Oj(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function aT(t){return t&&t.toLowerCase().replace("_","-")}function $j(t){for(var e=0,n,r,i,s;e<t.length;){for(s=aT(t[e]).split("-"),n=s.length,r=aT(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=Tp(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Oj(s,r)>=n-1)break;n--}e++}return yd}function Lj(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Tp(t){var e=null,n;if(mn[t]===void 0&&typeof module<"u"&&module&&module.exports&&Lj(t))try{e=yd._abbr,n=require,n("./locale/"+t),qo(e)}catch{mn[t]=null}return mn[t]}function qo(t,e){var n;return t&&(ti(e)?n=so(t):n=r_(t,e),n?yd=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),yd._abbr}function r_(t,e){if(e!==null){var n,r=oT;if(e.abbr=t,mn[t]!=null)BE("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=mn[t]._config;else if(e.parentLocale!=null)if(mn[e.parentLocale]!=null)r=mn[e.parentLocale]._config;else if(n=Tp(e.parentLocale),n!=null)r=n._config;else return _d[e.parentLocale]||(_d[e.parentLocale]=[]),_d[e.parentLocale].push({name:t,config:e}),null;return mn[t]=new Hb(qb(r,e)),_d[t]&&_d[t].forEach(function(i){r_(i.name,i.config)}),qo(t),mn[t]}else return delete mn[t],null}function Nj(t,e){if(e!=null){var n,r,i=oT;mn[t]!=null&&mn[t].parentLocale!=null?mn[t].set(qb(mn[t]._config,e)):(r=Tp(t),r!=null&&(i=r._config),e=qb(i,e),r==null&&(e.abbr=t),n=new Hb(e),n.parentLocale=mn[t],mn[t]=n),qo(t)}else mn[t]!=null&&(mn[t].parentLocale!=null?(mn[t]=mn[t].parentLocale,t===qo()&&qo(t)):mn[t]!=null&&delete mn[t]);return mn[t]}function so(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return yd;if(!Xi(t)){if(e=Tp(t),e)return e;t=[t]}return $j(t)}function Ij(){return Vb(mn)}function i_(t){var e,n=t._a;return n&&kt(t).overflow===-2&&(e=n[no]<0||n[no]>11?no:n[Os]<1||n[Os]>Qb(n[Or],n[no])?Os:n[Zn]<0||n[Zn]>24||n[Zn]===24&&(n[es]!==0||n[ro]!==0||n[Ua]!==0)?Zn:n[es]<0||n[es]>59?es:n[ro]<0||n[ro]>59?ro:n[Ua]<0||n[Ua]>999?Ua:-1,kt(t)._overflowDayOfYear&&(e<Or||e>Os)&&(e=Os),kt(t)._overflowWeeks&&e===-1&&(e=F3),kt(t)._overflowWeekday&&e===-1&&(e=z3),kt(t).overflow=e),t}var Rj=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dj=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mj=/Z|[+-]\d\d(?::?\d\d)?/,Cp=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],s_=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fj=/^\/?Date\((-?\d+)/i,zj=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,jj={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lT(t){var e,n,r=t._i,i=Rj.exec(r)||Dj.exec(r),s,o,a,c,u=Cp.length,d=s_.length;if(i){for(kt(t).iso=!0,e=0,n=u;e<n;e++)if(Cp[e][1].exec(i[1])){o=Cp[e][0],s=Cp[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=d;e<n;e++)if(s_[e][1].exec(i[3])){a=(i[2]||" ")+s_[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(Mj.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(c||""),a_(t)}else t._isValid=!1}function Uj(t,e,n,r,i,s){var o=[Bj(t),ZE.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function Bj(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function qj(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Hj(t,e,n){if(t){var r=rT.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return kt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Vj(t,e,n){if(t)return jj[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function cT(t){var e=zj.exec(qj(t._i)),n;if(e){if(n=Uj(e[4],e[3],e[2],e[5],e[6],e[7]),!Hj(e[1],n,t))return;t._a=n,t._tzm=Vj(e[8],e[9],e[10]),t._d=vd.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),kt(t).rfc2822=!0}else t._isValid=!1}function Wj(t){var e=Fj.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(lT(t),t._isValid===!1)delete t._isValid;else return;if(cT(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:He.createFromInputFallback(t)}He.createFromInputFallback=Li("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Sc(t,e,n){return t??e??n}function Gj(t){var e=new Date(He.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function o_(t){var e,n,r=[],i,s,o;if(!t._d){for(i=Gj(t),t._w&&t._a[Os]==null&&t._a[no]==null&&Kj(t),t._dayOfYear!=null&&(o=Sc(t._a[Or],i[Or]),(t._dayOfYear>gd(o)||t._dayOfYear===0)&&(kt(t)._overflowDayOfYear=!0),n=vd(o,0,t._dayOfYear),t._a[no]=n.getUTCMonth(),t._a[Os]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Zn]===24&&t._a[es]===0&&t._a[ro]===0&&t._a[Ua]===0&&(t._nextDay=!0,t._a[Zn]=0),t._d=(t._useUTC?vd:ej).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Zn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(kt(t).weekdayMismatch=!0)}}function Kj(t){var e,n,r,i,s,o,a,c,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=Sc(e.GG,t._a[Or],bd(dn(),1,4).year),r=Sc(e.W,1),i=Sc(e.E,1),(i<1||i>7)&&(c=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=bd(dn(),s,o),n=Sc(e.gg,t._a[Or],u.year),r=Sc(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(c=!0)):i=s),r<1||r>io(n,s,o)?kt(t)._overflowWeeks=!0:c!=null?kt(t)._overflowWeekday=!0:(a=nT(n,r,i,s,o),t._a[Or]=a.year,t._dayOfYear=a.dayOfYear)}He.ISO_8601=function(){},He.RFC_2822=function(){};function a_(t){if(t._f===He.ISO_8601){lT(t);return}if(t._f===He.RFC_2822){cT(t);return}t._a=[],kt(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,c=0,u,d;for(i=qE(t._f,t._locale).match(Wb)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(e.match(R3(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&kt(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),c+=r.length),yc[s]?(r?kt(t).empty=!1:kt(t).unusedTokens.push(s),M3(s,r,t)):t._strict&&!r&&kt(t).unusedTokens.push(s);kt(t).charsLeftOver=a-c,e.length>0&&kt(t).unusedInput.push(e),t._a[Zn]<=12&&kt(t).bigHour===!0&&t._a[Zn]>0&&(kt(t).bigHour=void 0),kt(t).parsedDateParts=t._a.slice(0),kt(t).meridiem=t._meridiem,t._a[Zn]=Yj(t._locale,t._a[Zn],t._meridiem),u=kt(t).era,u!==null&&(t._a[Or]=t._locale.erasConvertYear(u,t._a[Or])),o_(t),i_(t)}function Yj(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function Jj(t){var e,n,r,i,s,o,a=!1,c=t._f.length;if(c===0){kt(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)s=0,o=!1,e=Bb({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],a_(e),jb(e)&&(o=!0),s+=kt(e).charsLeftOver,s+=kt(e).unusedTokens.length*10,kt(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));Bo(t,n||e)}function Zj(t){if(!t._d){var e=Kb(t._i),n=e.day===void 0?e.date:e.day;t._a=FE([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),o_(t)}}function Xj(t){var e=new fd(i_(uT(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function uT(t){var e=t._i,n=t._f;return t._locale=t._locale||so(t._l),e===null||n===void 0&&e===""?gp({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),Qi(e)?new fd(i_(e)):(dd(e)?t._d=e:Xi(n)?Jj(t):n?a_(t):Qj(t),jb(t)||(t._d=null),t))}function Qj(t){var e=t._i;ti(e)?t._d=new Date(He.now()):dd(e)?t._d=new Date(e.valueOf()):typeof e=="string"?Wj(t):Xi(e)?(t._a=FE(e.slice(0),function(n){return parseInt(n,10)}),o_(t)):ja(e)?Zj(t):eo(e)?t._d=new Date(e):He.createFromInputFallback(t)}function dT(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ja(t)&&Fb(t)||Xi(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,Xj(s)}function dn(t,e,n,r){return dT(t,e,n,r,!1)}var e4=Li("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=dn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:gp()}),t4=Li("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=dn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:gp()});function fT(t,e){var n,r;if(e.length===1&&Xi(e[0])&&(e=e[0]),!e.length)return dn();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function n4(){var t=[].slice.call(arguments,0);return fT("isBefore",t)}function r4(){var t=[].slice.call(arguments,0);return fT("isAfter",t)}var i4=function(){return Date.now?Date.now():+new Date},wd=["year","quarter","month","week","day","hour","minute","second","millisecond"];function s4(t){var e,n=!1,r,i=wd.length;for(e in t)if(jt(t,e)&&!(Fn.call(wd,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[wd[r]]){if(n)return!1;parseFloat(t[wd[r]])!==Nt(t[wd[r]])&&(n=!0)}return!0}function o4(){return this._isValid}function a4(){return ts(NaN)}function Ap(t){var e=Kb(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,c=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=s4(e),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=so(),this._bubble()}function Pp(t){return t instanceof Ap}function l_(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function l4(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)Nt(t[o])!==Nt(e[o])&&s++;return s+i}function hT(t,e){gt(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ps(~~(n/60),2)+e+Ps(~~n%60,2)})}hT("Z",":"),hT("ZZ",""),tt("Z",xp),tt("ZZ",xp),Jt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=c_(xp,t)});var c4=/([\+\-]|\d\d)/gi;function c_(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(c4)||["-",0,0],s=+(i[1]*60)+Nt(i[2]),s===0?0:i[0]==="+"?s:-s)}function u_(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Qi(t)||dd(t)?t.valueOf():dn(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),He.updateOffset(n,!1),n):dn(t).local()}function d_(t){return-Math.round(t._d.getTimezoneOffset())}He.updateOffset=function(){};function u4(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=c_(xp,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=d_(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?vT(this,ts(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,He.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:d_(this)}function d4(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function f4(t){return this.utcOffset(0,t)}function h4(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(d_(this),"m")),this}function p4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=c_(N3,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function g4(t){return this.isValid()?(t=t?dn(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function m4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function v4(){if(!ti(this._isDSTShifted))return this._isDSTShifted;var t={},e;return Bb(t,this),t=uT(t),t._a?(e=t._isUTC?Cs(t._a):dn(t._a),this._isDSTShifted=this.isValid()&&l4(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function b4(){return this.isValid()?!this._isUTC:!1}function _4(){return this.isValid()?this._isUTC:!1}function pT(){return this.isValid()?this._isUTC&&this._offset===0:!1}var y4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,w4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ts(t,e){var n=t,r=null,i,s,o;return Pp(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:eo(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=y4.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:Nt(r[Os])*i,h:Nt(r[Zn])*i,m:Nt(r[es])*i,s:Nt(r[ro])*i,ms:Nt(l_(r[Ua]*1e3))*i}):(r=w4.exec(t))?(i=r[1]==="-"?-1:1,n={y:Ba(r[2],i),M:Ba(r[3],i),w:Ba(r[4],i),d:Ba(r[5],i),h:Ba(r[6],i),m:Ba(r[7],i),s:Ba(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=x4(dn(n.from),dn(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Ap(n),Pp(t)&&jt(t,"_locale")&&(s._locale=t._locale),Pp(t)&&jt(t,"_isValid")&&(s._isValid=t._isValid),s}ts.fn=Ap.prototype,ts.invalid=a4;function Ba(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function gT(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function x4(t,e){var n;return t.isValid()&&e.isValid()?(e=u_(e,t),t.isBefore(e)?n=gT(t,e):(n=gT(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function mT(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(BE(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=ts(n,r),vT(this,i,t),this}}function vT(t,e,n,r){var i=e._milliseconds,s=l_(e._days),o=l_(e._months);t.isValid()&&(r=r??!0,o&&QE(t,md(t,"Month")+o*n),s&&JE(t,"Date",md(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&He.updateOffset(t,s||o))}var k4=mT(1,"add"),S4=mT(-1,"subtract");function bT(t){return typeof t=="string"||t instanceof String}function E4(t){return Qi(t)||dd(t)||bT(t)||eo(t)||C4(t)||T4(t)||t===null||t===void 0}function T4(t){var e=ja(t)&&!Fb(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||jt(t,s);return e&&n}function C4(t){var e=Xi(t),n=!1;return e&&(n=t.filter(function(r){return!eo(r)&&bT(t)}).length===0),e&&n}function A4(t){var e=ja(t)&&!Fb(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||jt(t,s);return e&&n}function P4(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function O4(t,e){arguments.length===1&&(arguments[0]?E4(arguments[0])?(t=arguments[0],e=void 0):A4(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||dn(),r=u_(n,this).startOf("day"),i=He.calendarFormat(this,r)||"sameElse",s=e&&(As(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,dn(n)))}function $4(){return new fd(this)}function L4(t,e){var n=Qi(t)?t:dn(t);return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function N4(t,e){var n=Qi(t)?t:dn(t);return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function I4(t,e,n,r){var i=Qi(t)?t:dn(t),s=Qi(e)?e:dn(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function R4(t,e){var n=Qi(t)?t:dn(t),r;return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function D4(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function M4(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function F4(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=u_(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Ni(e),e){case"year":s=Op(this,r)/12;break;case"month":s=Op(this,r);break;case"quarter":s=Op(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Ii(s)}function Op(t,e){if(t.date()<e.date())return-Op(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}He.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",He.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function z4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function j4(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?vp(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):As(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",vp(n,"Z")):vp(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function U4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function B4(t){t||(t=this.isUtc()?He.defaultFormatUtc:He.defaultFormat);var e=vp(this,t);return this.localeData().postformat(e)}function q4(t,e){return this.isValid()&&(Qi(t)&&t.isValid()||dn(t).isValid())?ts({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function H4(t){return this.from(dn(),t)}function V4(t,e){return this.isValid()&&(Qi(t)&&t.isValid()||dn(t).isValid())?ts({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function W4(t){return this.to(dn(),t)}function _T(t){var e;return t===void 0?this._locale._abbr:(e=so(t),e!=null&&(this._locale=e),this)}var yT=Li("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function wT(){return this._locale}var $p=1e3,Ec=60*$p,Lp=60*Ec,xT=(365*400+97)*24*Lp;function Tc(t,e){return(t%e+e)%e}function kT(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-xT:new Date(t,e,n).valueOf()}function ST(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-xT:Date.UTC(t,e,n)}function G4(t){var e,n;if(t=Ni(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ST:kT,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Tc(e+(this._isUTC?0:this.utcOffset()*Ec),Lp);break;case"minute":e=this._d.valueOf(),e-=Tc(e,Ec);break;case"second":e=this._d.valueOf(),e-=Tc(e,$p);break}return this._d.setTime(e),He.updateOffset(this,!0),this}function K4(t){var e,n;if(t=Ni(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ST:kT,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Lp-Tc(e+(this._isUTC?0:this.utcOffset()*Ec),Lp)-1;break;case"minute":e=this._d.valueOf(),e+=Ec-Tc(e,Ec)-1;break;case"second":e=this._d.valueOf(),e+=$p-Tc(e,$p)-1;break}return this._d.setTime(e),He.updateOffset(this,!0),this}function Y4(){return this._d.valueOf()-(this._offset||0)*6e4}function J4(){return Math.floor(this.valueOf()/1e3)}function Z4(){return new Date(this.valueOf())}function X4(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Q4(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function eU(){return this.isValid()?this.toISOString():null}function tU(){return jb(this)}function nU(){return Bo({},kt(this))}function rU(){return kt(this).overflow}function iU(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}gt("N",0,0,"eraAbbr"),gt("NN",0,0,"eraAbbr"),gt("NNN",0,0,"eraAbbr"),gt("NNNN",0,0,"eraName"),gt("NNNNN",0,0,"eraNarrow"),gt("y",["y",1],"yo","eraYear"),gt("y",["yy",2],0,"eraYear"),gt("y",["yyy",3],0,"eraYear"),gt("y",["yyyy",4],0,"eraYear"),tt("N",f_),tt("NN",f_),tt("NNN",f_),tt("NNNN",gU),tt("NNNNN",mU),Jt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?kt(n).era=i:kt(n).invalidEra=t}),tt("y",wc),tt("yy",wc),tt("yyy",wc),tt("yyyy",wc),tt("yo",vU),Jt(["y","yy","yyy","yyyy"],Or),Jt(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Or]=n._locale.eraYearOrdinalParse(t,i):e[Or]=parseInt(t,10)});function sU(t,e){var n,r,i,s=this._eras||so("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=He(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=He(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function oU(t,e,n){var r,i,s=this.eras(),o,a,c;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(c===t)return s[r];break}else if([o,a,c].indexOf(t)>=0)return s[r]}function aU(t,e){var n=t.since<=t.until?1:-1;return e===void 0?He(t.since).year():He(t.since).year()+(e-t.offset)*n}function lU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function cU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function uU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function dU(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-He(i[t].since).year())*n+i[t].offset;return this.year()}function fU(t){return jt(this,"_erasNameRegex")||h_.call(this),t?this._erasNameRegex:this._erasRegex}function hU(t){return jt(this,"_erasAbbrRegex")||h_.call(this),t?this._erasAbbrRegex:this._erasRegex}function pU(t){return jt(this,"_erasNarrowRegex")||h_.call(this),t?this._erasNarrowRegex:this._erasRegex}function f_(t,e){return e.erasAbbrRegex(t)}function gU(t,e){return e.erasNameRegex(t)}function mU(t,e){return e.erasNarrowRegex(t)}function vU(t,e){return e._eraYearOrdinalRegex||wc}function h_(){var t=[],e=[],n=[],r=[],i,s,o,a,c,u=this.eras();for(i=0,s=u.length;i<s;++i)o=to(u[i].name),a=to(u[i].abbr),c=to(u[i].narrow),e.push(o),t.push(a),n.push(c),r.push(o),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}gt(0,["gg",2],0,function(){return this.weekYear()%100}),gt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Np(t,e){gt(0,[t,t.length],0,e)}Np("gggg","weekYear"),Np("ggggg","weekYear"),Np("GGGG","isoWeekYear"),Np("GGGGG","isoWeekYear"),tt("G",wp),tt("g",wp),tt("GG",un,ui),tt("gg",un,ui),tt("GGGG",Jb,Yb),tt("gggg",Jb,Yb),tt("GGGGG",yp,bp),tt("ggggg",yp,bp),pd(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=Nt(t)}),pd(["gg","GG"],function(t,e,n,r){e[r]=He.parseTwoDigitYear(t)});function bU(t){return ET.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function _U(t){return ET.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function yU(){return io(this.year(),1,4)}function wU(){return io(this.isoWeekYear(),1,4)}function xU(){var t=this.localeData()._week;return io(this.year(),t.dow,t.doy)}function kU(){var t=this.localeData()._week;return io(this.weekYear(),t.dow,t.doy)}function ET(t,e,n,r,i){var s;return t==null?bd(this,r,i).year:(s=io(t,r,i),e>s&&(e=s),SU.call(this,t,e,n,r,i))}function SU(t,e,n,r,i){var s=nT(t,e,n,r,i),o=vd(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}gt("Q",0,"Qo","quarter"),tt("Q",VE),Jt("Q",function(t,e){e[no]=(Nt(t)-1)*3});function EU(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}gt("D",["DD",2],"Do","date"),tt("D",un,xc),tt("DD",un,ui),tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Jt(["D","DD"],Os),Jt("Do",function(t,e){e[Os]=Nt(t.match(un)[0])});var TT=kc("Date",!0);gt("DDD",["DDDD",3],"DDDo","dayOfYear"),tt("DDD",_p),tt("DDDD",WE),Jt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=Nt(t)});function TU(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}gt("m",["mm",2],0,"minute"),tt("m",un,Zb),tt("mm",un,ui),Jt(["m","mm"],es);var CU=kc("Minutes",!1);gt("s",["ss",2],0,"second"),tt("s",un,Zb),tt("ss",un,ui),Jt(["s","ss"],ro);var AU=kc("Seconds",!1);gt("S",0,0,function(){return~~(this.millisecond()/100)}),gt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),gt(0,["SSS",3],0,"millisecond"),gt(0,["SSSS",4],0,function(){return this.millisecond()*10}),gt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),gt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),gt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),gt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),gt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),tt("S",_p,VE),tt("SS",_p,ui),tt("SSS",_p,WE);var Ho,CT;for(Ho="SSSS";Ho.length<=9;Ho+="S")tt(Ho,wc);function PU(t,e){e[Ua]=Nt(("0."+t)*1e3)}for(Ho="S";Ho.length<=9;Ho+="S")Jt(Ho,PU);CT=kc("Milliseconds",!1),gt("z",0,0,"zoneAbbr"),gt("zz",0,0,"zoneName");function OU(){return this._isUTC?"UTC":""}function $U(){return this._isUTC?"Coordinated Universal Time":""}var Ne=fd.prototype;Ne.add=k4,Ne.calendar=O4,Ne.clone=$4,Ne.diff=F4,Ne.endOf=K4,Ne.format=B4,Ne.from=q4,Ne.fromNow=H4,Ne.to=V4,Ne.toNow=W4,Ne.get=U3,Ne.invalidAt=rU,Ne.isAfter=L4,Ne.isBefore=N4,Ne.isBetween=I4,Ne.isSame=R4,Ne.isSameOrAfter=D4,Ne.isSameOrBefore=M4,Ne.isValid=tU,Ne.lang=yT,Ne.locale=_T,Ne.localeData=wT,Ne.max=t4,Ne.min=e4,Ne.parsingFlags=nU,Ne.set=B3,Ne.startOf=G4,Ne.subtract=S4,Ne.toArray=X4,Ne.toObject=Q4,Ne.toDate=Z4,Ne.toISOString=j4,Ne.inspect=U4,typeof Symbol<"u"&&Symbol.for!=null&&(Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ne.toJSON=eU,Ne.toString=z4,Ne.unix=J4,Ne.valueOf=Y4,Ne.creationData=iU,Ne.eraName=lU,Ne.eraNarrow=cU,Ne.eraAbbr=uU,Ne.eraYear=dU,Ne.year=YE,Ne.isLeapYear=j3,Ne.weekYear=bU,Ne.isoWeekYear=_U,Ne.quarter=Ne.quarters=EU,Ne.month=eT,Ne.daysInMonth=Z3,Ne.week=Ne.weeks=sj,Ne.isoWeek=Ne.isoWeeks=oj,Ne.weeksInYear=xU,Ne.weeksInWeekYear=kU,Ne.isoWeeksInYear=yU,Ne.isoWeeksInISOWeekYear=wU,Ne.date=TT,Ne.day=Ne.days=_j,Ne.weekday=yj,Ne.isoWeekday=wj,Ne.dayOfYear=TU,Ne.hour=Ne.hours=Aj,Ne.minute=Ne.minutes=CU,Ne.second=Ne.seconds=AU,Ne.millisecond=Ne.milliseconds=CT,Ne.utcOffset=u4,Ne.utc=f4,Ne.local=h4,Ne.parseZone=p4,Ne.hasAlignedHourOffset=g4,Ne.isDST=m4,Ne.isLocal=b4,Ne.isUtcOffset=_4,Ne.isUtc=pT,Ne.isUTC=pT,Ne.zoneAbbr=OU,Ne.zoneName=$U,Ne.dates=Li("dates accessor is deprecated. Use date instead.",TT),Ne.months=Li("months accessor is deprecated. Use month instead",eT),Ne.years=Li("years accessor is deprecated. Use year instead",YE),Ne.zone=Li("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",d4),Ne.isDSTShifted=Li("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",v4);function LU(t){return dn(t*1e3)}function NU(){return dn.apply(null,arguments).parseZone()}function AT(t){return t}var Ut=Hb.prototype;Ut.calendar=b3,Ut.longDateFormat=x3,Ut.invalidDate=S3,Ut.ordinal=C3,Ut.preparse=AT,Ut.postformat=AT,Ut.relativeTime=P3,Ut.pastFuture=O3,Ut.set=m3,Ut.eras=sU,Ut.erasParse=oU,Ut.erasConvertYear=aU,Ut.erasAbbrRegex=hU,Ut.erasNameRegex=fU,Ut.erasNarrowRegex=pU,Ut.months=G3,Ut.monthsShort=K3,Ut.monthsParse=J3,Ut.monthsRegex=Q3,Ut.monthsShortRegex=X3,Ut.week=tj,Ut.firstDayOfYear=ij,Ut.firstDayOfWeek=rj,Ut.weekdays=pj,Ut.weekdaysMin=mj,Ut.weekdaysShort=gj,Ut.weekdaysParse=bj,Ut.weekdaysRegex=xj,Ut.weekdaysShortRegex=kj,Ut.weekdaysMinRegex=Sj,Ut.isPM=Tj,Ut.meridiem=Pj;function Ip(t,e,n,r){var i=so(),s=Cs().set(r,e);return i[n](s,t)}function PT(t,e,n){if(eo(t)&&(e=t,t=void 0),t=t||"",e!=null)return Ip(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ip(t,r,n,"month");return i}function p_(t,e,n,r){typeof t=="boolean"?(eo(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,eo(e)&&(n=e,e=void 0),e=e||"");var i=so(),s=t?i._week.dow:0,o,a=[];if(n!=null)return Ip(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Ip(e,(o+s)%7,r,"day");return a}function IU(t,e){return PT(t,e,"months")}function RU(t,e){return PT(t,e,"monthsShort")}function DU(t,e,n){return p_(t,e,n,"weekdays")}function MU(t,e,n){return p_(t,e,n,"weekdaysShort")}function FU(t,e,n){return p_(t,e,n,"weekdaysMin")}qo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=Nt(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),He.lang=Li("moment.lang is deprecated. Use moment.locale instead.",qo),He.langData=Li("moment.langData is deprecated. Use moment.localeData instead.",so);var oo=Math.abs;function zU(){var t=this._data;return this._milliseconds=oo(this._milliseconds),this._days=oo(this._days),this._months=oo(this._months),t.milliseconds=oo(t.milliseconds),t.seconds=oo(t.seconds),t.minutes=oo(t.minutes),t.hours=oo(t.hours),t.months=oo(t.months),t.years=oo(t.years),this}function OT(t,e,n,r){var i=ts(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function jU(t,e){return OT(this,t,e,1)}function UU(t,e){return OT(this,t,e,-1)}function $T(t){return t<0?Math.floor(t):Math.ceil(t)}function BU(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=$T(g_(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Ii(t/1e3),r.seconds=i%60,s=Ii(i/60),r.minutes=s%60,o=Ii(s/60),r.hours=o%24,e+=Ii(o/24),c=Ii(LT(e)),n+=c,e-=$T(g_(c)),a=Ii(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function LT(t){return t*4800/146097}function g_(t){return t*146097/4800}function qU(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Ni(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+LT(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(g_(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function ao(t){return function(){return this.as(t)}}var NT=ao("ms"),HU=ao("s"),VU=ao("m"),WU=ao("h"),GU=ao("d"),KU=ao("w"),YU=ao("M"),JU=ao("Q"),ZU=ao("y"),XU=NT;function QU(){return ts(this)}function eB(t){return t=Ni(t),this.isValid()?this[t+"s"]():NaN}function qa(t){return function(){return this.isValid()?this._data[t]:NaN}}var tB=qa("milliseconds"),nB=qa("seconds"),rB=qa("minutes"),iB=qa("hours"),sB=qa("days"),oB=qa("months"),aB=qa("years");function lB(){return Ii(this.days()/7)}var lo=Math.round,Cc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cB(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function uB(t,e,n,r){var i=ts(t).abs(),s=lo(i.as("s")),o=lo(i.as("m")),a=lo(i.as("h")),c=lo(i.as("d")),u=lo(i.as("M")),d=lo(i.as("w")),f=lo(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,cB.apply(null,h)}function dB(t){return t===void 0?lo:typeof t=="function"?(lo=t,!0):!1}function fB(t,e){return Cc[t]===void 0?!1:e===void 0?Cc[t]:(Cc[t]=e,t==="s"&&(Cc.ss=e-1),!0)}function hB(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Cc,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},Cc,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=uB(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var m_=Math.abs;function Ac(t){return(t>0)-(t<0)||+t}function Rp(){if(!this.isValid())return this.localeData().invalidDate();var t=m_(this._milliseconds)/1e3,e=m_(this._days),n=m_(this._months),r,i,s,o,a=this.asSeconds(),c,u,d,f;return a?(r=Ii(t/60),i=Ii(r/60),t%=60,r%=60,s=Ii(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Ac(this._months)!==Ac(a)?"-":"",d=Ac(this._days)!==Ac(a)?"-":"",f=Ac(this._milliseconds)!==Ac(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+o+"S":"")):"P0D"}var Mt=Ap.prototype;Mt.isValid=o4,Mt.abs=zU,Mt.add=jU,Mt.subtract=UU,Mt.as=qU,Mt.asMilliseconds=NT,Mt.asSeconds=HU,Mt.asMinutes=VU,Mt.asHours=WU,Mt.asDays=GU,Mt.asWeeks=KU,Mt.asMonths=YU,Mt.asQuarters=JU,Mt.asYears=ZU,Mt.valueOf=XU,Mt._bubble=BU,Mt.clone=QU,Mt.get=eB,Mt.milliseconds=tB,Mt.seconds=nB,Mt.minutes=rB,Mt.hours=iB,Mt.days=sB,Mt.weeks=lB,Mt.months=oB,Mt.years=aB,Mt.humanize=hB,Mt.toISOString=Rp,Mt.toString=Rp,Mt.toJSON=Rp,Mt.locale=_T,Mt.localeData=wT,Mt.toIsoString=Li("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rp),Mt.lang=yT,gt("X",0,0,"unix"),gt("x",0,0,"valueOf"),tt("x",wp),tt("X",I3),Jt("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),Jt("x",function(t,e,n){n._d=new Date(Nt(t))});He.version="2.30.1",p3(dn),He.fn=Ne,He.min=n4,He.max=r4,He.now=i4,He.utc=Cs,He.unix=LU,He.months=IU,He.isDate=dd,He.locale=qo,He.invalid=gp,He.duration=ts,He.isMoment=Qi,He.weekdays=DU,He.parseZone=NU,He.localeData=so,He.isDuration=Pp,He.monthsShort=RU,He.weekdaysMin=FU,He.defineLocale=r_,He.updateLocale=Nj,He.locales=Ij,He.weekdaysShort=MU,He.normalizeUnits=Ni,He.relativeTimeRounding=dB,He.relativeTimeThreshold=fB,He.calendarFormat=P4,He.prototype=Ne,He.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function pB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const gB=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","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"],["إ","i"],["ئ","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"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","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"],["𝓀","h"],["𝓁","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"],["𝕆","N"],["𝕊","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)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(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"]],mB=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(pB(n),"g"),r);return t};function vB(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...gB,...e.customReplacements]);return t=t.normalize(),t=mB(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const Ha=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e,dateFormat:n,timeFormat:r,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Pc=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Ha(e);if(t)try{return r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):n?(i?He.utc:He)(t,n).toDate():new Date(t)}catch(s){console.error(s);return}},IT=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Ha(t),{year:i,month:s,day:o,hour:a,minute:c}=ud({timeZone:r?"UTC":void 0}),u=`${i}-${s}-${o}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},RT=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:s,utc:o}=Ha(n),a=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t){if(s)return`${t}${a}`;try{return r?(o?He.utc:He)(t).format(r):i?t:o?`${t}:00.000Z`:`${t}${a}`}catch(c){console.error(c);return}}},bB=t=>{const{default:e}=t;return typeof e!="string"?"":e==="{{now}}"?RT(IT(t),"",t):e},_B=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Ha(e);if(!t)return"";const s=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/^(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(s)return s;try{const{year:o,month:a,day:c,hour:u,minute:d}=ud({date:t?Pc(t,e):new Date,timeZone:i?"UTC":void 0}),f=`${o}-${a}-${c}`,h=`${u}:${d}`;return n?f:r?h:`${f}T${h}`}catch(o){return console.error(o),""}},yB=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,wB=/^default\('?(?<defaultValue>.+?)'?\)$/,xB=/^ternary\('?(?<truthyValue>.*?)'?,\s*'?(?<falsyValue>.*?)'?\)$/,kB=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,SB=({fieldConfig:t,value:e,transformation:n})=>{const r=String(e);if(n==="upper")return r.toUpperCase();if(n==="lower")return r.toLowerCase();const i=n.match(yB);if(i?.groups){const{format:c,timeZone:u}=i.groups,{dateOnly:d,utc:f}=Ha(t??{}),p=(u==="utc"||f||d&&!!r.match(/^\d{4}-[01]\d-[0-3]\d$/)||d&&!!r.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?He.utc:He)(r);return p.isValid()?p.format(c):""}const s=n.match(wB);if(s?.groups){const{defaultValue:c}=s.groups;return e?r:c}const o=n.match(xB);if(o?.groups){const{truthyValue:c,falsyValue:u}=o.groups;return e?c:u}const a=n.match(kB);if(a?.groups){const{max:c,ellipsis:u="…"}=a.groups;return Tw(r,Number(c),{ellipsis:u})}return r},v_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=SB({fieldConfig:t,value:e,transformation:r})}),e),b_=t=>/{{.+?}}/.test(t)?t:`{{${t}}}`,DT=new Map,__=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=DT.get(r);if(i)return i;const s=e.value_field??e.valueField,o=e.display_fields??e.displayFields??[s],a=e.search_fields??e.searchFields??o,c=b_(s),u=o.map(b_).join(" "),d=a.map(b_).join(" "),f=e.filters??[],h=n.map(p=>{const{content:g}=p.locales[t]??p.locales._default??{};return{refEntry:p,hasContent:!!g,content:g??{}}}).filter(({hasContent:p,content:g})=>p&&f.every(({field:m,values:v})=>v.includes(g[m]))).map(({refEntry:p,content:g})=>{const m=Object.fromEntries(tc([...[...u.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...c.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...d.matchAll(/{{(.+?)}}/g)].map(x=>x[1])].map(x=>x.includes(".")?x.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):x)).map(x=>{if(x.endsWith(".*")){const E=new RegExp(`^${cn(x).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),A=za(Object.fromEntries(Object.entries(g).filter(([O])=>E.test(O))));return[x,A[Object.keys(A)[0]]??""]}if(x==="slug")return[x,p.slug];const k=vn({collectionName:e.collection,keyPath:x}),S=x.replace(/^fields\./,"");if(k?.widget==="relation")return[x,y_({fieldConfig:k,valueMap:g,keyPath:S,locale:t})??""];let C=g[S];if(C===void 0){const{defaultLocale:E}=Ri(e.collection)?._i18n??{};E&&(C=p.locales[E].content[S])}return[x,C??""]})),v=Math.max(...Object.values(m).map(x=>Array.isArray(x)?x.length:1));let _=new Array(v).fill(u),b=new Array(v).fill(c),y=new Array(v).fill(d);return Object.entries(m).forEach(([x,k])=>{Array.isArray(k)?k.forEach((S,C)=>{Object.entries(S).forEach(([E,A])=>{_.forEach((O,L)=>{(C===0&&L===0||C%L===0)&&(_[C]=_[C].replaceAll(`{{${x}.${E}}}`,A),b[C]=b[C].replaceAll(`{{${x}.${E}}}`,A),y[C]=y[C].replaceAll(`{{${x}.${E}}}`,A))})})}):(_=_.map(S=>S.replaceAll(`{{${x}}}`,k)),b=b.map(S=>S.replaceAll(`{{${x}}}`,k)),y=y.map(S=>S.replaceAll(`{{${x}}}`,k)))}),_.map((x,k)=>({label:x,value:b[k],searchValue:y[k]}))}).flat(1).sort((p,g)=>oi(p.label,g.label));return DT.set(r,h),h},y_=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:s}=t,o=ns(s),a=__(r,t,o),c=u=>a.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${cn(n)}\\.\\d+$`)).map(([,d])=>d).map(c):c(e[n])},w_=new Map,EB=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=w_.get(r);if(i)return i;const{multiple:s,options:o}=t,a=rS(o),c=f=>o.find(h=>h.value===f)?.label||f;if(s){const f=Object.entries(e).filter(([p])=>p.match(`^${cn(n)}\\.\\d+$`)).map(([,p])=>p),h=a?f.map(c):f;return w_.set(r,h),h}const u=e[n],d=a?c(u):u;return w_.set(r,d),d},x_=new Map,vn=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:r})=>{const i=JSON.stringify({collectionName:t,fileName:e,valueMap:n,keyPath:r}),s=x_.get(i);if(s)return s;const o=Ri(t),a=e?o?._fileMap[e]:void 0;if(!o||e&&!a){x_.set(i,void 0);return}const{fields:c=[]}=a??o,u=r.split(".");let d;return u.forEach((f,h)=>{if(h===0)d=c.find(({name:p})=>p===f);else if(d){const p=/^\d+$/.test(f),g=u.slice(0,h),{field:m,fields:v,types:_,typeKey:b="type"}=d;if(m){const y=p?u[h+1]:void 0;d=!y||m.name===y?m:void 0}else v&&!p?d=v.find(({name:y})=>y===f):_&&p?d=_.find(({name:y})=>y===n[[...g,f,b].join(".")]):_&&f!==b&&(d=_.find(({name:y})=>y===n[[...g,b].join(".")])?.fields?.find(({name:y})=>y===f))}}),x_.set(i,d),d},xd=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,Dp=({collectionName:t,fileName:e,valueMap:n,keyPath:r,locale:i,transformations:s})=>{const o=vn({collectionName:t,fileName:e,valueMap:n,keyPath:r});let a=n[r];if(o?.widget==="relation"&&(a=y_({fieldConfig:o,valueMap:n,keyPath:r,locale:i})),o?.widget==="select"&&(a=EB({fieldConfig:o,valueMap:n,keyPath:r})),o?.widget==="list"){const{fields:c,types:u}=o;c||u||(a=_c(i).format(Object.entries(n).filter(([d,f])=>d.match(`^${cn(r)}\\.\\d+$`)&&typeof f=="string"&&!!f).map(([,d])=>d)))}return Array.isArray(a)&&(a=_c(i).format(a)),s?.length&&(a=v_({fieldConfig:o,value:a,transformations:s})),a?String(a):""},Oc=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:s,locales:o,commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=t;if(r==="slug")return s;if(r==="commit_author")return a||c||u;if(r==="commit_date")return d;const{content:f}=o[e]??{};if(f!==void 0){if(i){const h=vn({collectionName:n,keyPath:r});if(h?.widget==="relation")return y_({fieldConfig:h,valueMap:f,keyPath:r,locale:e})}return f[r]}},TB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],MT={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function FT(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function CB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function AB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function zT(t){return AB(t)||FT(t)}const jT=document.createElement("i");function UT(t){const e="&"+t+";";jT.innerHTML=e;const n=jT.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const PB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function OB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,a="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,h=g(),p;for(s--;++s<=t.length;)if(p===10&&(f=(u?u[o]:0)||1),p=t.charCodeAt(s),p===38){const _=t.charCodeAt(s+1);if(_===9||_===10||_===12||_===32||_===38||_===60||Number.isNaN(_)||r&&_===r){a+=String.fromCharCode(p),f++;continue}const b=s+1;let y=b,x=b,k;if(_===35){x=++y;const N=t.charCodeAt(x);N===88||N===120?(k="hexadecimal",x=++y):k="decimal"}else k="named";let S="",C="",E="";const A=k==="named"?zT:k==="decimal"?FT:CB;for(x--;++x<=t.length;){const N=t.charCodeAt(x);if(!A(N))break;E+=String.fromCharCode(N),k==="named"&&TB.includes(E)&&(S=E,C=UT(E))}let O=t.charCodeAt(x)===59;if(O){x++;const N=k==="named"?UT(E):!1;N&&(S=E,C=N)}let L=1+x-b,I="";if(!(!O&&n.nonTerminated===!1))if(!E)k!=="named"&&m(4,L);else if(k==="named"){if(O&&!C)m(5,1);else if(S!==E&&(x=y+S.length,L=1+x-y,O=!1),!O){const N=S?1:3;if(n.attribute){const j=t.charCodeAt(x);j===61?(m(N,L),C=""):zT(j)?C="":m(N,L)}else m(N,L)}I=C}else{O||m(2,L);let N=Number.parseInt(E,k==="hexadecimal"?16:10);if($B(N))m(7,L),I="�";else if(N in MT)m(6,L),I=MT[N];else{let j="";LB(N)&&m(6,L),N>65535&&(N-=65536,j+=String.fromCharCode(N>>>10|55296),N=56320|N&1023),I=j+String.fromCharCode(N)}}if(I){v(),h=g(),s=x-1,f+=x-b+1,i.push(I);const N=g();N.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,I,{start:h,end:N},t.slice(b-1,x)),h=N}else E=t.slice(b-1,x),a+=E,f+=E.length,s=x-1}else p===10&&(d++,o++,f=0),Number.isNaN(p)?v():(a+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:s+((c?c.offset:0)||0)}}function m(_,b){let y;n.warning&&(y=g(),y.column+=b,y.offset+=b,n.warning.call(n.warningContext||void 0,PB[_],y,_))}function v(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:g()}),a="")}}function $B(t){return t>=55296&&t<=57343||t>1114111}function LB(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const BT=(t,{allowMarkdown:e=!1}={})=>(t=XF(t),t=dS.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=OB(t),t.trim()),qT=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},Vo=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{const{name:s,identifier_field:o="title",summary:a,_i18n:{defaultLocale:c}}=t,u=t._type==="entry"?t._file.basePath:void 0,{locales:d,slug:f,commitDate:h,commitAuthor:p}=e,{content:g={},path:m=""}=d[n??c]??Object.values(d)[0]??{};if(!r||!a)return BT(qT(g,{identifierField:o})||f.replaceAll("-"," "),{allowMarkdown:i});const v=b=>{if(b==="slug")return f;if(b==="dirname")return Rn(m.replace(/[^/]+$/,"").replace(u??"",""));if(b==="filename")return m.split("/").pop().split(".").shift();if(b==="extension")return m.split("/").pop().split(".").pop();if(b==="commit_date")return h??"";if(b==="commit_author")return p?.name||p?.login||p?.email},_=b=>{const[y,...x]=b.split(/\s*\|\s*/),k=g,S=y.replace(/^fields\./,"");let C=v(y);if(C===void 0&&(C=Dp({collectionName:s,valueMap:k,keyPath:S,locale:c})),C===void 0)return"";if(C instanceof Date&&!x.length){const{year:E,month:A,day:O}=ud({date:C});return`${E}-${A}-${O}`}return x.length&&(C=v_({fieldConfig:vn({collectionName:s,valueMap:k,keyPath:S}),value:C,transformations:x})),String(C)};return BT(a.replace(/{{(.+?)}}/g,(b,y)=>_(y)),{allowMarkdown:i})},Mp=()=>(globalThis.matchMedia("(pointer: fine)")?.matches??!1)&&"ondrop"in globalThis,k_=t=>{const e=new Intl.NumberFormat(ne(Ln),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,s=i*1e3;return t<n?ne(le)("file_size_units.b",{values:{size:e.format(t)}}):t<r?ne(le)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?ne(le)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<s?ne(le)("file_size_units.gb",{values:{size:e.format(t/i)}}):ne(le)("file_size_units.tb",{values:{size:e.format(t/s)}})},S_=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=$n(t),i=new RegExp(`^${cn(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),s=e.sort((a,c)=>oi(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!s)return t;const o=Number(s.match(i)?.groups?.num??0)+1;return`${n}-${o}${r?`.${r}`:""}`},Fp=t=>t.filter(Boolean).join("/"),E_=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const s=e.findLastIndex((o,a)=>!!o&&a<i);s>-1&&(e[s]=null)}}else n=!0}),Fp(e)},NB=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:r="-"}={}}=ne(yt)??{};let i=t;return n&&(i=vB(i).normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?i=i.replaceAll(/[^\w-~]/g," "):i=i.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),i.toLocaleLowerCase().trim().replaceAll(/\s+/g,r)},$s=(t,{type:e,collection:n,content:r,currentSlug:i,entryFilePath:s,locale:o,dateTimeParts:a=ud({timeZone:"UTC"})})=>{const{name:c,identifier_field:u="title",slug_length:d=void 0}=n,f=n._type==="entry"?n._file.basePath:void 0,h=m=>{if(["year","month","day","hour","minute","second"].includes(m))return a[m];if(m==="slug"&&i)return i;if(m==="uuid")return Wn();if(m==="uuid_short")return Wn("short");if(m==="uuid_shorter")return Wn("shorter");if(e==="preview_path"&&m==="locale")return o;if(e==="preview_path"||e==="media_folder"){if(!s)return"";if(m==="dirname")return s.replace(f??"","").match(/(.+?)(?:\/[^/]+)?$/)?.[1]??"";if(m==="filename")return s.split("/").pop().split(".").shift();if(m==="extension")return s.split("/").pop().split(".").pop()}let v;return m.startsWith("fields.")?v=r[m.replace(/^fields\./,"")]:m==="slug"?v=qT(r,{identifierField:u}):v=r[m],v},p=m=>{const[v,..._]=m.split(/\s*\|\s*/);let b=h(v);return b===void 0?Wn("short"):(_.length&&(b=v_({fieldConfig:vn({collectionName:c,valueMap:r,keyPath:v}),value:b,transformations:_})),b!==void 0&&(b=NB(String(b))),b?String(b):Wn("short"))};let g=t.replace(/{{(.+?)}}/g,(m,v)=>p(v)).trim();return typeof d=="number"&&(g=Tw(g,d,{ellipsis:""}).replace(/-$/,"")),i?g:S_(g,ns(c).map(m=>o?m.locales[o]?.slug??m.slug:m.slug))},co=t=>QT(Object.values(t.locales)[0].path).map(({collectionName:e})=>Ri(e)).filter(e=>!!e),HT=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:s}=ne(yt)??{},{slug:o,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f}=r??n;if(!i||!s||!a||!c||!u)return;let h;if(/{{(?:year|month|day|hour|minute|second)}}/g.test(u)){const p=d?f?.find(({widget:_,name:b})=>_==="datetime"&&b===d):f?.find(({widget:_})=>_==="datetime"),g=p?c[p.name]:void 0;if(!p||!g)return;const{format:m,picker_utc:v=!1}=p;h=ud({date:(v?He.utc:He)(g,m).toDate(),timeZone:v?"UTC":void 0})}try{const p=$s(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:o,entryFilePath:a,dateTimeParts:h});return`${s.replace(/\/$/,"")}/${p.replace(/^\//,"")}`}catch{return}},IB=(t,e)=>`${ne(Nn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Wo=(t,e)=>{const n=t.files?t._fileMap:void 0;return n?Object.values(n).filter(({_file:r,_i18n:i})=>r.fullPath===e.locales[i.defaultLocale]?.path):[]},T_=(t,e)=>ne(ri).find(n=>co(n).some(r=>r.name===t&&Wo(r,n).some(i=>i.name===e))),RB=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,$c=st([]),ns=t=>{const e=Ri(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:r}}=e,i=n?.field,s=typeof n?.pattern=="string"?new RegExp(n.pattern):void 0,o=n?.value===void 0?[]:Array.isArray(n.value)?n.value:[n.value];return ne(ri).filter(a=>{if(!co(a).some(({name:u})=>u===t))return!1;if(!i)return!0;const c=Oc({entry:a,locale:r,collectionName:t,key:i})??null;return s?s.test(c):o.includes(c)})},C_=async(t,{entries:e=ne(ri),newURL:n=""}={})=>{const r=ne(yt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,s=await Promise.all(e.map(async o=>{const{locales:a}=o,c=co(o);return(await Promise.all(Object.values(a).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(c.map(async m=>{const v=async b=>{const y=vn({collectionName:m.name,fileName:b?.name,valueMap:d,keyPath:h});if(!y)return!1;const{widget:x="string"}=y;if(["image","file"].includes(x)){const k=await Lc(p,o)===i;return k&&n&&(d[h]=n),k}if(x==="markdown"){const k=[...p.matchAll(RB)];if(k.length)return(await Promise.all(k.map(async([,S])=>{const C=await Lc(S,o)===i;return C&&n&&(d[h]=d[h].replace(S,n)),C}))).some(Boolean)}return!1},_=Wo(m,o);return _.length?(await Promise.all(_.map(v))).includes(!0):v()}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((o,a)=>s[a])},VT="https://unpkg.com/pdfjs-dist/build";let zp;const DB=(t,e)=>{const n=e==="image",r=n?new Image:document.createElement(e);return new Promise(i=>{const s=()=>{i({dimensions:e==="audio"?void 0:{width:n?r.naturalWidth:r.videoWidth,height:n?r.naturalHeight:r.videoHeight},duration:n?void 0:r.duration})};r.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),r.src=t})},MB=t=>new Date(t*1e3).toISOString().substr(11,8),WT=(t,e,n,r)=>{let i=1;return r?e>n?(i=r/e,t.width=r,t.height=n*i):(i=r/n,t.width=e*i,t.height=r):(t.width=e,t.height=n),i},GT=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{let i,s=0,o=0;try{i=await createImageBitmap(t),{width:s,height:o}=i}catch{const u=URL.createObjectURL(t);i=await new Promise(d=>{if(t.type.startsWith("video/")){const f=document.createElement("video");f.addEventListener("canplay",async()=>{f.pause(),{videoWidth:s,videoHeight:o}=f,d(f)},{once:!0}),f.muted=!0,f.autoplay=!0,f.playsInline=!0,f.src=u,f.style.opacity="0",document.body.appendChild(f)}else{const f=new Image;f.addEventListener("load",()=>{({naturalWidth:s,naturalHeight:o}=f),d(f)},{once:!0}),f.src=u}}),URL.revokeObjectURL(u)}const a=new OffscreenCanvas(512,512),c=a.getContext("2d");return WT(a,s,o,r),c.drawImage(i,0,0,a.width,a.height),i instanceof HTMLVideoElement&&document.body.removeChild(i),a.convertToBlob({type:`image/${e}`,quality:n})},FB=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{if(!zp)try{zp=await Tx(()=>import(`${VT}/pdf.min.mjs`),void 0),zp.GlobalWorkerOptions.workerSrc=`${VT}/pdf.worker.min.mjs`}catch{throw new Error("Failed to load PDF.js library")}const i=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),o=s.getContext("2d");try{const c=await(await zp.getDocument({url:i,isEvalSupported:!1,disableAutoFetch:!0}).promise).getPage(1),u=c.getViewport({scale:1}),{width:d,height:f}=u,h=WT(s,d,f,r);await c.render({canvasContext:o,viewport:h===1?u:c.getViewport({scale:h})}).promise,URL.revokeObjectURL(i)}catch{throw new Error("Failed to render PDF")}return s.convertToBlob({type:`image/${e}`,quality:n})},zB=t=>{if(!Dg(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)},jB=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const s=new URLSearchParams(i);let o=`${e}/embed/${s.get("v")}`;return s.get("list")&&(s.delete("v"),s.set("listType","playlist"),o+=`?${s.toString()}`),o}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`},KT=["image","video","audio"],UB=[...KT,"document","other"],A_={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},tn=st([]),di=st([]),P_=Qn([di],([t],e)=>{e(t.find(({collectionName:n})=>!n))}),ni=st(),kd=st([]),uo=st(),Go=st(!1),Ko=st(),Ls=st({folder:void 0,files:[]}),O_=st(),jp=st(),Up=t=>KT.includes(t),YT=t=>{const e=Mo.getType(t.path);return Up(t.kind)||e==="application/pdf"||!!e&&Qc(e)},JT=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else e=Mo.getType(t)??"";else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(Up(n)&&!r.startsWith("x-"))return n},BB=t=>{const e=Mo.getType(t.path);return!!e&&Qc(e)},$_=t=>Object.entries(A_).find(([,e])=>e.test(t))?.[0]??"other",Va=async t=>{const{file:e,blobURL:n,name:r}=t;if(n)return fetch(n).then(s=>s.blob());let i;if(e)i=e;else{const s=await ne(Nn)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");i=new Blob([s],{type:Mo.getType(r)??s.type})}return t.blobURL=URL.createObjectURL(i),i},L_=async t=>(t.blobURL||await Va(t),t.blobURL);let Bp;const ZT=async t=>{const e=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||e))return;if(Bp===void 0){const{databaseName:r}=ne(Nn)?.repository??{};Bp=r?new Fo(r,"asset-thumbnails"):null}let n=await Bp?.get(t.sha);if(!n){const r=await Va(t),i={format:"webp",quality:.85,dimension:512};n=e?await FB(r,i):await GT(r,i),await Bp?.set(t.sha,n)}return URL.createObjectURL(n)},XT=(t,{matchSubFolders:e=!1}={})=>{const{filename:n}=$n(t);return n.startsWith("+")?[]:ne(di).filter(({internalPath:r,entryRelative:i})=>i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test($n(t).dirname??"")).sort((r,i)=>i.internalPath.localeCompare(r.internalPath??"")??0)},N_=t=>XT(t.path,{matchSubFolders:!0}).map(({collectionName:e})=>e?Ri(e):void 0).filter(e=>!!e),I_=(t,{entry:e,collection:n}={})=>{const r=decodeURI(t);if(!/^[/@]/.test(r)){if(!e)return;const{locales:p}=e,g=({_i18n:v})=>{const{defaultLocale:_}=v,b=_ in p?_:Object.keys(p)[0],{path:y,content:x}=p[b];if(!y||!x)return;const{entryFolder:k}=y.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},S=E_(`${k}/${r}`);return ne(tn).find(C=>C.path===S)};return co(e).map(v=>{const _=Wo(v,e);return _.length?_.map(g):g(v)}).flat(1).filter(Boolean)[0]??ne(tn).find(v=>v.path===r)}const i=ne(tn).find(p=>p.path===Rn(r));if(i)return i;const{dirname:s="",basename:o}=$n(r);let{collectionName:a,internalPath:c,publicPath:u}=s?ne(di).findLast(p=>s.match(`^${p.publicPath.replace(/{{.+?}}/g,".+?")}\\b`))??{}:ne(di)[0];if(c===void 0)return;if(!a){const p=r.replace(new RegExp(`^${cn(u||s)}`),c),g=ne(tn).find(m=>m.path===p);if(g)return g}if(e&&!n&&([n]=co(e)),e&&n&&/{{.+?}}/.test(c)){const{content:p,path:g}=e.locales[n._i18n.defaultLocale];c=$s(c,{type:"media_folder",collection:n,content:Fa(p),currentSlug:e.slug,entryFilePath:g})}const d=n?._assetFolder?.publicPath,f=d?Rn(s.replace(new RegExp(`^${cn(d)}`),"")):"",h=Fp([c,f,o]);return ne(tn).find(p=>p.path===h)},qp=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const i=ne(di),{publicPath:s,entryRelative:o}=i.find(({collectionName:d})=>N_(t).some(f=>f.name===d))??i.find(({collectionName:d})=>!d)??{};if(o)return e&&r&&$n(t.path).dirname===$n(Object.values(r.locales)[0].path).dirname?t.name:void 0;const a=t.path.replace(t.folder,s==="/"?"":s??""),c=encodeURI(a);return!c.startsWith("/")&&!n?void 0:e?c:`${ne(yt)?._baseURL}${c}`},Lc=async(t,e,{thumbnail:n=!1}={})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const r=I_(t,{entry:e});if(r)return(n?await ZT(r):await L_(r))??qp(r)},Hp={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},Vp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=ne(Nn)?.repository??{},i=await L_(t),s=qp(t),o=i??s;let a,c;return["image","video","audio"].includes(e)&&i&&({dimensions:a,duration:c}=await DB(i,e)),{publicURL:s,repoBlobURL:r?`${r}/${n}`:void 0,dimensions:a,duration:c,usedEntries:o?await C_(o):[]}},qB=t=>ne(tn).filter(e=>e.folder===t),R_=t=>ne(tn).filter(e=>$n(e.path).dirname===t);ni.subscribe(()=>{uo.set(void 0)});const qn=st(),D_=new Map,HB=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},Ri=t=>{const e=D_.get(t);if(e)return e;const n=ne(yt)?.collections.find(d=>d.name===t),r=typeof n?.folder=="string",i=!r&&Array.isArray(n?.files);if(!r&&!i){D_.set(t,void 0);return}const{folder:s,files:o}=n;r?n.folder=Rn(s):o.forEach(d=>{d.file=Rn(d.file)});const a=hp(n),c={...n,_i18n:a,_assetFolder:ne(di).find(({collectionName:d})=>d===t)},u=r?{...c,_type:"entry",_file:Lw({rawCollection:n,_i18n:a}),_thumbnailFieldNames:HB(n)}:{...c,_type:"file",_fileMap:o?.length?Object.fromEntries(o.map(d=>{const f=hp(n,d),h=Lw({rawCollection:n,file:d,_i18n:f});return[d.name,{...d,_file:h,_i18n:f}]})):{}};return D_.set(t,u),u},Nc=st(!1),Wa=st(),M_=st([]),ri=st([]),F_=st([]),QT=t=>ne(M_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Ri(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),VB={DEV:!1},{DEV:WB}=VB,GB=void 0,yt=st(),z_=st(),j_=st(),eC=async({ignoreError:t=!1}={})=>{const{href:e=window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml",type:n="application/yaml"}=document.querySelector('link[rel="cms-config-url"]')??{};let r;try{r=await fetch(e)}catch(o){throw new Error(ne(le)("config.error.fetch_failed"),{cause:o})}const{ok:i,status:s}=r;if(!i){if(t)return{};throw new Error(ne(le)("config.error.fetch_failed"),{cause:new Error(ne(le)("config.error.fetch_failed_not_ok",{values:{status:s}}))})}try{return n==="application/json"?r.json():cd.parse(await r.text(),{merge:!0})}catch(o){throw new Error(ne(le)("config.error.parse_failed"),{cause:o})}},KB=t=>{if(!Jn(t))throw new Error(ne(le)("config.error.parse_failed"),{cause:new Error(ne(le)("config.error.parse_failed_invalid_object"))});if(!t.collections?.length)throw new Error(ne(le)("config.error.no_collection"));if(!t.backend?.name)throw new Error(ne(le)("config.error.no_backend"));if(!(t.backend.name in Jp))throw new Error(ne(le)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(ne(le)("config.error.no_repository"));if(t.backend.auth_type==="implicit")throw new Error(ne(le)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(ne(le)("config.error.oauth_no_app_id"));if(typeof t.media_folder!="string")throw new Error(ne(le)("config.error.no_media_folder"))},YB=async(t={})=>{yt.set(void 0),j_.set(void 0);try{if(!window.isSecureContext)throw new Error(ne(le)("config.error.no_secure_context"));if(t&&!Jn(t))throw new Error(ne(le)("config.error.parse_failed"));let e;t?.load_config_file===!1?e=t:Object.entries(t).length?e=Dw(await eC({ignoreError:!0}),t):e=await eC(),KB(e);const n=e;n._siteURL=n.site_url?.trim()||(WB?GB:window.location.origin),n._baseURL=Dg(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),yt.set(n),z_.set(await oa(cd.stringify(n)))}catch(e){j_.set({message:e.name==="Error"?e.message:ne(le)("config.error.unexpected")}),console.error(e,e.cause)}};yt.subscribe(t=>{if(ne(Tt).devModeEnabled&&console.info("siteConfig",t),!t)return;const{media_folder:e,public_folder:n,collections:r}=t,i=[...r.filter(({folder:d,hide:f,divider:h})=>typeof d=="string"&&!f&&!h).map(d=>{const{name:f,folder:h}=d,p=Rn(h),{i18nEnabled:g,structure:m,allLocales:v}=hp(d),_=g&&m==="multiple_folders_i18n_root";return{collectionName:f,folderPath:p,folderPathMap:Object.fromEntries(v.map(b=>[b,_?`${b}/${p}`:p]))}}).sort((d,f)=>oi(d.folderPath??"",f.folderPath??"")),...r.filter(({files:d,hide:f,divider:h})=>Array.isArray(d)&&!f&&!h).map(d=>{const{name:f,files:h}=d;return(h??[]).map(p=>{const g=Rn(p.file);return{collectionName:f,fileName:p.name,filePathMap:g.includes("{{locale}}")?Object.fromEntries(hp(d,p).allLocales.map(m=>[m,g.replace("{{locale}}",m)])):{_default:g}}})}).flat(1).sort((d,f)=>oi(Object.values(d.filePathMap)[0],Object.values(f.filePathMap)[0]))],s=Rn(e).replace(/^\.$/,""),o=n?`/${Rn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1},c=r.filter(({hide:d,divider:f,media_folder:h,path:p})=>(!d||!!h||!!p)&&!f).map(d=>{const{name:f,folder:h,path:p,public_folder:g}=d;let{media_folder:m}=d;if(m===void 0){if(p===void 0)return null;m=""}m=m.replace("{{media_folder}}",s);const v=!(m.startsWith("/")||m.startsWith(s));let _=Rn((g??m).replace("{{public_folder}}",o).trim());return _=_===""||_.match(/^[.@]/)?_:`/${_}`,{collectionName:f,internalPath:Rn(v?h??"":m),publicPath:_,entryRelative:v}}).filter(Boolean).sort((d,f)=>oi(d.internalPath,f.internalPath)),u=[a,...c];M_.set(i),di.set(u),ne(Tt).devModeEnabled&&(console.info("allEntryFolders",i),console.info("allAssetFolders",u))});const fi=st();fi.subscribe(t=>{(async()=>{try{t?await Qr.set("sveltia-cms.user",t):t===null&&await Qr.delete("sveltia-cms.user")}catch{}})()});const JB={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},tC=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},automatic_deployments:s}}=ne(yt),{login:o="",name:a=""}=ne(fi),[c=""]=t.map(p=>p.slug).filter(Boolean),[u,...d]=t.map(({path:p})=>p),f=n?.label_singular||n?.label||n?.name||"";let h=i[e]||JB[e]||"";return["create","update","delete"].includes(e)&&(h=h.replaceAll("{{slug}}",c).replaceAll("{{collection}}",f).replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),["uploadMedia","deleteMedia"].includes(e)&&(h=h.replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a),d.length&&(h+=` +${d.length}`)),["openAuthoring"].includes(e)&&(h=h.replaceAll("{{message}}",e).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),!["delete","deleteMedia"].includes(e)&&(r===void 0?s===!1:r===!0)&&(h=`[skip ci] ${h}`),h},nC=t=>t.map(e=>{const{file:n,path:r,sha:i,size:s,text:o=void 0,meta:a={},folder:{internalPath:c}}=e;return{file:n,blobURL:void 0,path:r,name:$n(r).basename,sha:i,size:s,kind:$_(r),text:o,folder:c,...a}}),rC=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,ZB=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s,hasSingleSubField:o,index:a})=>{if(!s){if(o)return r[`${n}.${a}`];const c=new RegExp(`^${cn(n)}\\.${a}[\\b\\.]`),u=Object.fromEntries(Object.entries(r).filter(([d])=>c.test(d)).map(([d,f])=>[d.replace(c,""),f]));return u.title||u.name||Object.values(u).find(d=>typeof d=="string"&&!!d)||""}return s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/),h=`${n}.${a}.${d.replace(/^fields\./,"")}`;return o&&!vn({collectionName:t,fileName:e,valueMap:r,keyPath:h})?"":Dp({collectionName:t,fileName:e,valueMap:r,keyPath:o?`${n}.${a}`:h,locale:i,transformations:f})})};function XB(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function QB(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=r[o-1];a&&(i+=o.toString().padEnd(s," "),i+=": ",i+=a,i+=`
393
+ `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var UE={};function BE(t,e){He.deprecationHandler!=null&&He.deprecationHandler(t,e),UE[t]||(jE(e),UE[t]=!0)}He.suppressDeprecationWarnings=!1,He.deprecationHandler=null;function As(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function mz(t){var e,n;for(n in t)jt(t,n)&&(e=t[n],As(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function qb(t,e){var n=Bo({},t),r;for(r in e)jt(e,r)&&(ja(t[r])&&ja(e[r])?(n[r]={},Bo(n[r],t[r]),Bo(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)jt(t,r)&&!jt(e,r)&&ja(t[r])&&(n[r]=Bo({},n[r]));return n}function Hb(t){t!=null&&this.set(t)}var Vb;Object.keys?Vb=Object.keys:Vb=function(t){var e,n=[];for(e in t)jt(t,e)&&n.push(e);return n};var vz={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function bz(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return As(r)?r.call(e,n):r}function Ps(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Wb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mp=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gb={},yc={};function gt(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(yc[t]=i),e&&(yc[e[0]]=function(){return Ps(i.apply(this,arguments),e[1],e[2])}),n&&(yc[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function _z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function yz(t){var e=t.match(Wb),n,r;for(n=0,r=e.length;n<r;n++)yc[e[n]]?e[n]=yc[e[n]]:e[n]=_z(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=As(e[o])?e[o].call(i,t):e[o];return s}}function vp(t,e){return t.isValid()?(e=qE(e,t.localeData()),Gb[e]=Gb[e]||yz(e),Gb[e](t)):t.localeData().invalidDate()}function qE(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(mp.lastIndex=0;n>=0&&mp.test(t);)t=t.replace(mp,r),mp.lastIndex=0,n-=1;return t}var wz={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"};function xz(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Wb).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var kz="Invalid date";function Sz(){return this._invalidDate}var Ez="%d",Tz=/\d{1,2}/;function Cz(t){return this._ordinal.replace("%d",t)}var Az={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Pz(t,e,n,r){var i=this._relativeTime[n];return As(i)?i(t,e,n,r):i.replace(/%d/i,t)}function Oz(t,e){var n=this._relativeTime[t>0?"future":"past"];return As(n)?n(e):n.replace(/%s/i,e)}var HE={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ni(t){return typeof t=="string"?HE[t]||HE[t.toLowerCase()]:void 0}function Kb(t){var e={},n,r;for(r in t)jt(t,r)&&(n=Ni(r),n&&(e[n]=t[r]));return e}var $z={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Lz(t){var e=[],n;for(n in t)jt(t,n)&&e.push({unit:n,priority:$z[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var VE=/\d/,ui=/\d\d/,WE=/\d{3}/,Yb=/\d{4}/,bp=/[+-]?\d{6}/,un=/\d\d?/,GE=/\d\d\d\d?/,KE=/\d\d\d\d\d\d?/,_p=/\d{1,3}/,Jb=/\d{1,4}/,yp=/[+-]?\d{1,6}/,wc=/\d+/,wp=/[+-]?\d+/,Nz=/Z|[+-]\d\d:?\d\d/gi,xp=/Z|[+-]\d\d(?::?\d\d)?/gi,Iz=/[+-]?\d+(\.\d{1,3})?/,hd=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,xc=/^[1-9]\d?/,Zb=/^([1-9]\d|\d)/,kp;kp={};function tt(t,e,n){kp[t]=As(e)?e:function(r,i){return r&&n?n:e}}function Rz(t,e){return jt(kp,t)?kp[t](e._strict,e._locale):new RegExp(Dz(t))}function Dz(t){return to(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function to(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ii(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Nt(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Ii(e)),n}var Xb={};function Jt(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),eo(e)&&(r=function(s,o){o[e]=Nt(s)}),i=t.length,n=0;n<i;n++)Xb[t[n]]=r}function pd(t,e){Jt(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function Mz(t,e,n){e!=null&&jt(Xb,t)&&Xb[t](e,n._a,n,t)}function Sp(t){return t%4===0&&t%100!==0||t%400===0}var Or=0,no=1,Os=2,Zn=3,es=4,ro=5,Ua=6,Fz=7,zz=8;gt("Y",0,0,function(){var t=this.year();return t<=9999?Ps(t,4):"+"+t}),gt(0,["YY",2],0,function(){return this.year()%100}),gt(0,["YYYY",4],0,"year"),gt(0,["YYYYY",5],0,"year"),gt(0,["YYYYYY",6,!0],0,"year"),tt("Y",wp),tt("YY",un,ui),tt("YYYY",Jb,Yb),tt("YYYYY",yp,bp),tt("YYYYYY",yp,bp),Jt(["YYYYY","YYYYYY"],Or),Jt("YYYY",function(t,e){e[Or]=t.length===2?He.parseTwoDigitYear(t):Nt(t)}),Jt("YY",function(t,e){e[Or]=He.parseTwoDigitYear(t)}),Jt("Y",function(t,e){e[Or]=parseInt(t,10)});function gd(t){return Sp(t)?366:365}He.parseTwoDigitYear=function(t){return Nt(t)+(Nt(t)>68?1900:2e3)};var YE=kc("FullYear",!0);function jz(){return Sp(this.year())}function kc(t,e){return function(n){return n!=null?(JE(this,t,n),He.updateOffset(this,e),this):md(this,t)}}function md(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function JE(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!Sp(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function Uz(t){return t=Ni(t),As(this[t])?this[t]():this}function Bz(t,e){if(typeof t=="object"){t=Kb(t);var n=Lz(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Ni(t),As(this[t]))return this[t](e);return this}function qz(t,e){return(t%e+e)%e}var Fn;Array.prototype.indexOf?Fn=Array.prototype.indexOf:Fn=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function Qb(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=qz(e,12);return t+=(e-n)/12,n===1?Sp(t)?29:28:31-n%7%2}gt("M",["MM",2],"Mo",function(){return this.month()+1}),gt("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),gt("MMMM",0,0,function(t){return this.localeData().months(this,t)}),tt("M",un,xc),tt("MM",un,ui),tt("MMM",function(t,e){return e.monthsShortRegex(t)}),tt("MMMM",function(t,e){return e.monthsRegex(t)}),Jt(["M","MM"],function(t,e){e[no]=Nt(t)-1}),Jt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[no]=i:kt(n).invalidMonth=t});var Hz="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ZE="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),XE=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Vz=hd,Wz=hd;function Gz(t,e){return t?Xi(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||XE).test(e)?"format":"standalone"][t.month()]:Xi(this._months)?this._months:this._months.standalone}function Kz(t,e){return t?Xi(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[XE.test(e)?"format":"standalone"][t.month()]:Xi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Yz(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Cs([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Fn.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:(i=Fn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Fn.call(this._longMonthsParse,o),i!==-1?i:(i=Fn.call(this._shortMonthsParse,o),i!==-1?i:null))}function Jz(t,e,n){var r,i,s;if(this._monthsParseExact)return Yz.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Cs([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function QE(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=Nt(e);else if(e=t.localeData().monthsParse(e),!eo(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,Qb(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function eT(t){return t!=null?(QE(this,t),He.updateOffset(this,!0),this):md(this,"Month")}function Zz(){return Qb(this.year(),this.month())}function Xz(t){return this._monthsParseExact?(jt(this,"_monthsRegex")||tT.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(jt(this,"_monthsShortRegex")||(this._monthsShortRegex=Vz),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Qz(t){return this._monthsParseExact?(jt(this,"_monthsRegex")||tT.call(this),t?this._monthsStrictRegex:this._monthsRegex):(jt(this,"_monthsRegex")||(this._monthsRegex=Wz),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tT(){function t(c,u){return u.length-c.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=Cs([2e3,i]),o=to(this.monthsShort(s,"")),a=to(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ej(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function vd(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Ep(t,e,n){var r=7+e-n,i=(7+vd(t,0,r).getUTCDay()-e)%7;return-i+r-1}function nT(t,e,n,r,i){var s=(7+n-r)%7,o=Ep(t,r,i),a=1+7*(e-1)+s+o,c,u;return a<=0?(c=t-1,u=gd(c)+a):a>gd(t)?(c=t+1,u=a-gd(t)):(c=t,u=a),{year:c,dayOfYear:u}}function bd(t,e,n){var r=Ep(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+io(o,e,n)):i>io(t.year(),e,n)?(s=i-io(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function io(t,e,n){var r=Ep(t,e,n),i=Ep(t+1,e,n);return(gd(t)-r+i)/7}gt("w",["ww",2],"wo","week"),gt("W",["WW",2],"Wo","isoWeek"),tt("w",un,xc),tt("ww",un,ui),tt("W",un,xc),tt("WW",un,ui),pd(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=Nt(t)});function tj(t){return bd(t,this._week.dow,this._week.doy).week}var nj={dow:0,doy:6};function rj(){return this._week.dow}function ij(){return this._week.doy}function sj(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function oj(t){var e=bd(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}gt("d",0,"do","day"),gt("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),gt("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),gt("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),gt("e",0,0,"weekday"),gt("E",0,0,"isoWeekday"),tt("d",un),tt("e",un),tt("E",un),tt("dd",function(t,e){return e.weekdaysMinRegex(t)}),tt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),tt("dddd",function(t,e){return e.weekdaysRegex(t)}),pd(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:kt(n).invalidWeekday=t}),pd(["d","e","E"],function(t,e,n,r){e[r]=Nt(t)});function aj(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function lj(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function e_(t,e){return t.slice(e,7).concat(t.slice(0,e))}var cj="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rT="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),uj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dj=hd,fj=hd,hj=hd;function pj(t,e){var n=Xi(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?e_(n,this._week.dow):t?n[t.day()]:n}function gj(t){return t===!0?e_(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function mj(t){return t===!0?e_(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function vj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Cs([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Fn.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Fn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Fn.call(this._weekdaysParse,o),i!==-1||(i=Fn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Fn.call(this._shortWeekdaysParse,o),i!==-1||(i=Fn.call(this._weekdaysParse,o),i!==-1)?i:(i=Fn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Fn.call(this._minWeekdaysParse,o),i!==-1||(i=Fn.call(this._weekdaysParse,o),i!==-1)?i:(i=Fn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function bj(t,e,n){var r,i,s;if(this._weekdaysParseExact)return vj.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Cs([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function _j(t){if(!this.isValid())return t!=null?this:NaN;var e=md(this,"Day");return t!=null?(t=aj(t,this.localeData()),this.add(t-e,"d")):e}function yj(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function wj(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=lj(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function xj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(jt(this,"_weekdaysRegex")||(this._weekdaysRegex=dj),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function kj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(jt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fj),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Sj(t){return this._weekdaysParseExact?(jt(this,"_weekdaysRegex")||t_.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(jt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hj),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function t_(){function t(d,f){return f.length-d.length}var e=[],n=[],r=[],i=[],s,o,a,c,u;for(s=0;s<7;s++)o=Cs([2e3,1]).day(s),a=to(this.weekdaysMin(o,"")),c=to(this.weekdaysShort(o,"")),u=to(this.weekdays(o,"")),e.push(a),n.push(c),r.push(u),i.push(a),i.push(c),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function n_(){return this.hours()%12||12}function Ej(){return this.hours()||24}gt("H",["HH",2],0,"hour"),gt("h",["hh",2],0,n_),gt("k",["kk",2],0,Ej),gt("hmm",0,0,function(){return""+n_.apply(this)+Ps(this.minutes(),2)}),gt("hmmss",0,0,function(){return""+n_.apply(this)+Ps(this.minutes(),2)+Ps(this.seconds(),2)}),gt("Hmm",0,0,function(){return""+this.hours()+Ps(this.minutes(),2)}),gt("Hmmss",0,0,function(){return""+this.hours()+Ps(this.minutes(),2)+Ps(this.seconds(),2)});function iT(t,e){gt(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}iT("a",!0),iT("A",!1);function sT(t,e){return e._meridiemParse}tt("a",sT),tt("A",sT),tt("H",un,Zb),tt("h",un,xc),tt("k",un,xc),tt("HH",un,ui),tt("hh",un,ui),tt("kk",un,ui),tt("hmm",GE),tt("hmmss",KE),tt("Hmm",GE),tt("Hmmss",KE),Jt(["H","HH"],Zn),Jt(["k","kk"],function(t,e,n){var r=Nt(t);e[Zn]=r===24?0:r}),Jt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Jt(["h","hh"],function(t,e,n){e[Zn]=Nt(t),kt(n).bigHour=!0}),Jt("hmm",function(t,e,n){var r=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r)),kt(n).bigHour=!0}),Jt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r,2)),e[ro]=Nt(t.substr(i)),kt(n).bigHour=!0}),Jt("Hmm",function(t,e,n){var r=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r))}),Jt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=Nt(t.substr(0,r)),e[es]=Nt(t.substr(r,2)),e[ro]=Nt(t.substr(i))});function Tj(t){return(t+"").toLowerCase().charAt(0)==="p"}var Cj=/[ap]\.?m?\.?/i,Aj=kc("Hours",!0);function Pj(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var oT={calendar:vz,longDateFormat:wz,invalidDate:kz,ordinal:Ez,dayOfMonthOrdinalParse:Tz,relativeTime:Az,months:Hz,monthsShort:ZE,week:nj,weekdays:cj,weekdaysMin:uj,weekdaysShort:rT,meridiemParse:Cj},mn={},_d={},yd;function Oj(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function aT(t){return t&&t.toLowerCase().replace("_","-")}function $j(t){for(var e=0,n,r,i,s;e<t.length;){for(s=aT(t[e]).split("-"),n=s.length,r=aT(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=Tp(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&Oj(s,r)>=n-1)break;n--}e++}return yd}function Lj(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Tp(t){var e=null,n;if(mn[t]===void 0&&typeof module<"u"&&module&&module.exports&&Lj(t))try{e=yd._abbr,n=require,n("./locale/"+t),qo(e)}catch{mn[t]=null}return mn[t]}function qo(t,e){var n;return t&&(ti(e)?n=so(t):n=r_(t,e),n?yd=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),yd._abbr}function r_(t,e){if(e!==null){var n,r=oT;if(e.abbr=t,mn[t]!=null)BE("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=mn[t]._config;else if(e.parentLocale!=null)if(mn[e.parentLocale]!=null)r=mn[e.parentLocale]._config;else if(n=Tp(e.parentLocale),n!=null)r=n._config;else return _d[e.parentLocale]||(_d[e.parentLocale]=[]),_d[e.parentLocale].push({name:t,config:e}),null;return mn[t]=new Hb(qb(r,e)),_d[t]&&_d[t].forEach(function(i){r_(i.name,i.config)}),qo(t),mn[t]}else return delete mn[t],null}function Nj(t,e){if(e!=null){var n,r,i=oT;mn[t]!=null&&mn[t].parentLocale!=null?mn[t].set(qb(mn[t]._config,e)):(r=Tp(t),r!=null&&(i=r._config),e=qb(i,e),r==null&&(e.abbr=t),n=new Hb(e),n.parentLocale=mn[t],mn[t]=n),qo(t)}else mn[t]!=null&&(mn[t].parentLocale!=null?(mn[t]=mn[t].parentLocale,t===qo()&&qo(t)):mn[t]!=null&&delete mn[t]);return mn[t]}function so(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return yd;if(!Xi(t)){if(e=Tp(t),e)return e;t=[t]}return $j(t)}function Ij(){return Vb(mn)}function i_(t){var e,n=t._a;return n&&kt(t).overflow===-2&&(e=n[no]<0||n[no]>11?no:n[Os]<1||n[Os]>Qb(n[Or],n[no])?Os:n[Zn]<0||n[Zn]>24||n[Zn]===24&&(n[es]!==0||n[ro]!==0||n[Ua]!==0)?Zn:n[es]<0||n[es]>59?es:n[ro]<0||n[ro]>59?ro:n[Ua]<0||n[Ua]>999?Ua:-1,kt(t)._overflowDayOfYear&&(e<Or||e>Os)&&(e=Os),kt(t)._overflowWeeks&&e===-1&&(e=Fz),kt(t)._overflowWeekday&&e===-1&&(e=zz),kt(t).overflow=e),t}var Rj=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dj=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mj=/Z|[+-]\d\d(?::?\d\d)?/,Cp=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],s_=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fj=/^\/?Date\((-?\d+)/i,zj=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,jj={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function lT(t){var e,n,r=t._i,i=Rj.exec(r)||Dj.exec(r),s,o,a,c,u=Cp.length,d=s_.length;if(i){for(kt(t).iso=!0,e=0,n=u;e<n;e++)if(Cp[e][1].exec(i[1])){o=Cp[e][0],s=Cp[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=d;e<n;e++)if(s_[e][1].exec(i[3])){a=(i[2]||" ")+s_[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(Mj.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(c||""),a_(t)}else t._isValid=!1}function Uj(t,e,n,r,i,s){var o=[Bj(t),ZE.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function Bj(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function qj(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Hj(t,e,n){if(t){var r=rT.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return kt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Vj(t,e,n){if(t)return jj[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function cT(t){var e=zj.exec(qj(t._i)),n;if(e){if(n=Uj(e[4],e[3],e[2],e[5],e[6],e[7]),!Hj(e[1],n,t))return;t._a=n,t._tzm=Vj(e[8],e[9],e[10]),t._d=vd.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),kt(t).rfc2822=!0}else t._isValid=!1}function Wj(t){var e=Fj.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(lT(t),t._isValid===!1)delete t._isValid;else return;if(cT(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:He.createFromInputFallback(t)}He.createFromInputFallback=Li("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Sc(t,e,n){return t??e??n}function Gj(t){var e=new Date(He.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function o_(t){var e,n,r=[],i,s,o;if(!t._d){for(i=Gj(t),t._w&&t._a[Os]==null&&t._a[no]==null&&Kj(t),t._dayOfYear!=null&&(o=Sc(t._a[Or],i[Or]),(t._dayOfYear>gd(o)||t._dayOfYear===0)&&(kt(t)._overflowDayOfYear=!0),n=vd(o,0,t._dayOfYear),t._a[no]=n.getUTCMonth(),t._a[Os]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Zn]===24&&t._a[es]===0&&t._a[ro]===0&&t._a[Ua]===0&&(t._nextDay=!0,t._a[Zn]=0),t._d=(t._useUTC?vd:ej).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Zn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(kt(t).weekdayMismatch=!0)}}function Kj(t){var e,n,r,i,s,o,a,c,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=Sc(e.GG,t._a[Or],bd(dn(),1,4).year),r=Sc(e.W,1),i=Sc(e.E,1),(i<1||i>7)&&(c=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=bd(dn(),s,o),n=Sc(e.gg,t._a[Or],u.year),r=Sc(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(c=!0)):i=s),r<1||r>io(n,s,o)?kt(t)._overflowWeeks=!0:c!=null?kt(t)._overflowWeekday=!0:(a=nT(n,r,i,s,o),t._a[Or]=a.year,t._dayOfYear=a.dayOfYear)}He.ISO_8601=function(){},He.RFC_2822=function(){};function a_(t){if(t._f===He.ISO_8601){lT(t);return}if(t._f===He.RFC_2822){cT(t);return}t._a=[],kt(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,c=0,u,d;for(i=qE(t._f,t._locale).match(Wb)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(e.match(Rz(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&kt(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),c+=r.length),yc[s]?(r?kt(t).empty=!1:kt(t).unusedTokens.push(s),Mz(s,r,t)):t._strict&&!r&&kt(t).unusedTokens.push(s);kt(t).charsLeftOver=a-c,e.length>0&&kt(t).unusedInput.push(e),t._a[Zn]<=12&&kt(t).bigHour===!0&&t._a[Zn]>0&&(kt(t).bigHour=void 0),kt(t).parsedDateParts=t._a.slice(0),kt(t).meridiem=t._meridiem,t._a[Zn]=Yj(t._locale,t._a[Zn],t._meridiem),u=kt(t).era,u!==null&&(t._a[Or]=t._locale.erasConvertYear(u,t._a[Or])),o_(t),i_(t)}function Yj(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function Jj(t){var e,n,r,i,s,o,a=!1,c=t._f.length;if(c===0){kt(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)s=0,o=!1,e=Bb({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],a_(e),jb(e)&&(o=!0),s+=kt(e).charsLeftOver,s+=kt(e).unusedTokens.length*10,kt(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));Bo(t,n||e)}function Zj(t){if(!t._d){var e=Kb(t._i),n=e.day===void 0?e.date:e.day;t._a=FE([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),o_(t)}}function Xj(t){var e=new fd(i_(uT(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function uT(t){var e=t._i,n=t._f;return t._locale=t._locale||so(t._l),e===null||n===void 0&&e===""?gp({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),Qi(e)?new fd(i_(e)):(dd(e)?t._d=e:Xi(n)?Jj(t):n?a_(t):Qj(t),jb(t)||(t._d=null),t))}function Qj(t){var e=t._i;ti(e)?t._d=new Date(He.now()):dd(e)?t._d=new Date(e.valueOf()):typeof e=="string"?Wj(t):Xi(e)?(t._a=FE(e.slice(0),function(n){return parseInt(n,10)}),o_(t)):ja(e)?Zj(t):eo(e)?t._d=new Date(e):He.createFromInputFallback(t)}function dT(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ja(t)&&Fb(t)||Xi(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,Xj(s)}function dn(t,e,n,r){return dT(t,e,n,r,!1)}var e4=Li("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=dn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:gp()}),t4=Li("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=dn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:gp()});function fT(t,e){var n,r;if(e.length===1&&Xi(e[0])&&(e=e[0]),!e.length)return dn();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function n4(){var t=[].slice.call(arguments,0);return fT("isBefore",t)}function r4(){var t=[].slice.call(arguments,0);return fT("isAfter",t)}var i4=function(){return Date.now?Date.now():+new Date},wd=["year","quarter","month","week","day","hour","minute","second","millisecond"];function s4(t){var e,n=!1,r,i=wd.length;for(e in t)if(jt(t,e)&&!(Fn.call(wd,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[wd[r]]){if(n)return!1;parseFloat(t[wd[r]])!==Nt(t[wd[r]])&&(n=!0)}return!0}function o4(){return this._isValid}function a4(){return ts(NaN)}function Ap(t){var e=Kb(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,c=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=s4(e),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=so(),this._bubble()}function Pp(t){return t instanceof Ap}function l_(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function l4(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)Nt(t[o])!==Nt(e[o])&&s++;return s+i}function hT(t,e){gt(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ps(~~(n/60),2)+e+Ps(~~n%60,2)})}hT("Z",":"),hT("ZZ",""),tt("Z",xp),tt("ZZ",xp),Jt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=c_(xp,t)});var c4=/([\+\-]|\d\d)/gi;function c_(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(c4)||["-",0,0],s=+(i[1]*60)+Nt(i[2]),s===0?0:i[0]==="+"?s:-s)}function u_(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Qi(t)||dd(t)?t.valueOf():dn(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),He.updateOffset(n,!1),n):dn(t).local()}function d_(t){return-Math.round(t._d.getTimezoneOffset())}He.updateOffset=function(){};function u4(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=c_(xp,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=d_(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?vT(this,ts(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,He.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:d_(this)}function d4(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function f4(t){return this.utcOffset(0,t)}function h4(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(d_(this),"m")),this}function p4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=c_(Nz,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function g4(t){return this.isValid()?(t=t?dn(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function m4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function v4(){if(!ti(this._isDSTShifted))return this._isDSTShifted;var t={},e;return Bb(t,this),t=uT(t),t._a?(e=t._isUTC?Cs(t._a):dn(t._a),this._isDSTShifted=this.isValid()&&l4(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function b4(){return this.isValid()?!this._isUTC:!1}function _4(){return this.isValid()?this._isUTC:!1}function pT(){return this.isValid()?this._isUTC&&this._offset===0:!1}var y4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,w4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ts(t,e){var n=t,r=null,i,s,o;return Pp(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:eo(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=y4.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:Nt(r[Os])*i,h:Nt(r[Zn])*i,m:Nt(r[es])*i,s:Nt(r[ro])*i,ms:Nt(l_(r[Ua]*1e3))*i}):(r=w4.exec(t))?(i=r[1]==="-"?-1:1,n={y:Ba(r[2],i),M:Ba(r[3],i),w:Ba(r[4],i),d:Ba(r[5],i),h:Ba(r[6],i),m:Ba(r[7],i),s:Ba(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=x4(dn(n.from),dn(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Ap(n),Pp(t)&&jt(t,"_locale")&&(s._locale=t._locale),Pp(t)&&jt(t,"_isValid")&&(s._isValid=t._isValid),s}ts.fn=Ap.prototype,ts.invalid=a4;function Ba(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function gT(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function x4(t,e){var n;return t.isValid()&&e.isValid()?(e=u_(e,t),t.isBefore(e)?n=gT(t,e):(n=gT(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function mT(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(BE(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=ts(n,r),vT(this,i,t),this}}function vT(t,e,n,r){var i=e._milliseconds,s=l_(e._days),o=l_(e._months);t.isValid()&&(r=r??!0,o&&QE(t,md(t,"Month")+o*n),s&&JE(t,"Date",md(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&He.updateOffset(t,s||o))}var k4=mT(1,"add"),S4=mT(-1,"subtract");function bT(t){return typeof t=="string"||t instanceof String}function E4(t){return Qi(t)||dd(t)||bT(t)||eo(t)||C4(t)||T4(t)||t===null||t===void 0}function T4(t){var e=ja(t)&&!Fb(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||jt(t,s);return e&&n}function C4(t){var e=Xi(t),n=!1;return e&&(n=t.filter(function(r){return!eo(r)&&bT(t)}).length===0),e&&n}function A4(t){var e=ja(t)&&!Fb(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||jt(t,s);return e&&n}function P4(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function O4(t,e){arguments.length===1&&(arguments[0]?E4(arguments[0])?(t=arguments[0],e=void 0):A4(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||dn(),r=u_(n,this).startOf("day"),i=He.calendarFormat(this,r)||"sameElse",s=e&&(As(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,dn(n)))}function $4(){return new fd(this)}function L4(t,e){var n=Qi(t)?t:dn(t);return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function N4(t,e){var n=Qi(t)?t:dn(t);return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function I4(t,e,n,r){var i=Qi(t)?t:dn(t),s=Qi(e)?e:dn(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function R4(t,e){var n=Qi(t)?t:dn(t),r;return this.isValid()&&n.isValid()?(e=Ni(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function D4(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function M4(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function F4(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=u_(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Ni(e),e){case"year":s=Op(this,r)/12;break;case"month":s=Op(this,r);break;case"quarter":s=Op(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Ii(s)}function Op(t,e){if(t.date()<e.date())return-Op(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}He.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",He.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function z4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function j4(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?vp(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):As(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",vp(n,"Z")):vp(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function U4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function B4(t){t||(t=this.isUtc()?He.defaultFormatUtc:He.defaultFormat);var e=vp(this,t);return this.localeData().postformat(e)}function q4(t,e){return this.isValid()&&(Qi(t)&&t.isValid()||dn(t).isValid())?ts({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function H4(t){return this.from(dn(),t)}function V4(t,e){return this.isValid()&&(Qi(t)&&t.isValid()||dn(t).isValid())?ts({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function W4(t){return this.to(dn(),t)}function _T(t){var e;return t===void 0?this._locale._abbr:(e=so(t),e!=null&&(this._locale=e),this)}var yT=Li("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function wT(){return this._locale}var $p=1e3,Ec=60*$p,Lp=60*Ec,xT=(365*400+97)*24*Lp;function Tc(t,e){return(t%e+e)%e}function kT(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-xT:new Date(t,e,n).valueOf()}function ST(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-xT:Date.UTC(t,e,n)}function G4(t){var e,n;if(t=Ni(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ST:kT,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Tc(e+(this._isUTC?0:this.utcOffset()*Ec),Lp);break;case"minute":e=this._d.valueOf(),e-=Tc(e,Ec);break;case"second":e=this._d.valueOf(),e-=Tc(e,$p);break}return this._d.setTime(e),He.updateOffset(this,!0),this}function K4(t){var e,n;if(t=Ni(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ST:kT,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Lp-Tc(e+(this._isUTC?0:this.utcOffset()*Ec),Lp)-1;break;case"minute":e=this._d.valueOf(),e+=Ec-Tc(e,Ec)-1;break;case"second":e=this._d.valueOf(),e+=$p-Tc(e,$p)-1;break}return this._d.setTime(e),He.updateOffset(this,!0),this}function Y4(){return this._d.valueOf()-(this._offset||0)*6e4}function J4(){return Math.floor(this.valueOf()/1e3)}function Z4(){return new Date(this.valueOf())}function X4(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Q4(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function eU(){return this.isValid()?this.toISOString():null}function tU(){return jb(this)}function nU(){return Bo({},kt(this))}function rU(){return kt(this).overflow}function iU(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}gt("N",0,0,"eraAbbr"),gt("NN",0,0,"eraAbbr"),gt("NNN",0,0,"eraAbbr"),gt("NNNN",0,0,"eraName"),gt("NNNNN",0,0,"eraNarrow"),gt("y",["y",1],"yo","eraYear"),gt("y",["yy",2],0,"eraYear"),gt("y",["yyy",3],0,"eraYear"),gt("y",["yyyy",4],0,"eraYear"),tt("N",f_),tt("NN",f_),tt("NNN",f_),tt("NNNN",gU),tt("NNNNN",mU),Jt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?kt(n).era=i:kt(n).invalidEra=t}),tt("y",wc),tt("yy",wc),tt("yyy",wc),tt("yyyy",wc),tt("yo",vU),Jt(["y","yy","yyy","yyyy"],Or),Jt(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Or]=n._locale.eraYearOrdinalParse(t,i):e[Or]=parseInt(t,10)});function sU(t,e){var n,r,i,s=this._eras||so("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=He(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=He(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function oU(t,e,n){var r,i,s=this.eras(),o,a,c;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(c===t)return s[r];break}else if([o,a,c].indexOf(t)>=0)return s[r]}function aU(t,e){var n=t.since<=t.until?1:-1;return e===void 0?He(t.since).year():He(t.since).year()+(e-t.offset)*n}function lU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function cU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function uU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function dU(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-He(i[t].since).year())*n+i[t].offset;return this.year()}function fU(t){return jt(this,"_erasNameRegex")||h_.call(this),t?this._erasNameRegex:this._erasRegex}function hU(t){return jt(this,"_erasAbbrRegex")||h_.call(this),t?this._erasAbbrRegex:this._erasRegex}function pU(t){return jt(this,"_erasNarrowRegex")||h_.call(this),t?this._erasNarrowRegex:this._erasRegex}function f_(t,e){return e.erasAbbrRegex(t)}function gU(t,e){return e.erasNameRegex(t)}function mU(t,e){return e.erasNarrowRegex(t)}function vU(t,e){return e._eraYearOrdinalRegex||wc}function h_(){var t=[],e=[],n=[],r=[],i,s,o,a,c,u=this.eras();for(i=0,s=u.length;i<s;++i)o=to(u[i].name),a=to(u[i].abbr),c=to(u[i].narrow),e.push(o),t.push(a),n.push(c),r.push(o),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}gt(0,["gg",2],0,function(){return this.weekYear()%100}),gt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Np(t,e){gt(0,[t,t.length],0,e)}Np("gggg","weekYear"),Np("ggggg","weekYear"),Np("GGGG","isoWeekYear"),Np("GGGGG","isoWeekYear"),tt("G",wp),tt("g",wp),tt("GG",un,ui),tt("gg",un,ui),tt("GGGG",Jb,Yb),tt("gggg",Jb,Yb),tt("GGGGG",yp,bp),tt("ggggg",yp,bp),pd(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=Nt(t)}),pd(["gg","GG"],function(t,e,n,r){e[r]=He.parseTwoDigitYear(t)});function bU(t){return ET.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function _U(t){return ET.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function yU(){return io(this.year(),1,4)}function wU(){return io(this.isoWeekYear(),1,4)}function xU(){var t=this.localeData()._week;return io(this.year(),t.dow,t.doy)}function kU(){var t=this.localeData()._week;return io(this.weekYear(),t.dow,t.doy)}function ET(t,e,n,r,i){var s;return t==null?bd(this,r,i).year:(s=io(t,r,i),e>s&&(e=s),SU.call(this,t,e,n,r,i))}function SU(t,e,n,r,i){var s=nT(t,e,n,r,i),o=vd(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}gt("Q",0,"Qo","quarter"),tt("Q",VE),Jt("Q",function(t,e){e[no]=(Nt(t)-1)*3});function EU(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}gt("D",["DD",2],"Do","date"),tt("D",un,xc),tt("DD",un,ui),tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Jt(["D","DD"],Os),Jt("Do",function(t,e){e[Os]=Nt(t.match(un)[0])});var TT=kc("Date",!0);gt("DDD",["DDDD",3],"DDDo","dayOfYear"),tt("DDD",_p),tt("DDDD",WE),Jt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=Nt(t)});function TU(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}gt("m",["mm",2],0,"minute"),tt("m",un,Zb),tt("mm",un,ui),Jt(["m","mm"],es);var CU=kc("Minutes",!1);gt("s",["ss",2],0,"second"),tt("s",un,Zb),tt("ss",un,ui),Jt(["s","ss"],ro);var AU=kc("Seconds",!1);gt("S",0,0,function(){return~~(this.millisecond()/100)}),gt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),gt(0,["SSS",3],0,"millisecond"),gt(0,["SSSS",4],0,function(){return this.millisecond()*10}),gt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),gt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),gt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),gt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),gt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),tt("S",_p,VE),tt("SS",_p,ui),tt("SSS",_p,WE);var Ho,CT;for(Ho="SSSS";Ho.length<=9;Ho+="S")tt(Ho,wc);function PU(t,e){e[Ua]=Nt(("0."+t)*1e3)}for(Ho="S";Ho.length<=9;Ho+="S")Jt(Ho,PU);CT=kc("Milliseconds",!1),gt("z",0,0,"zoneAbbr"),gt("zz",0,0,"zoneName");function OU(){return this._isUTC?"UTC":""}function $U(){return this._isUTC?"Coordinated Universal Time":""}var Ne=fd.prototype;Ne.add=k4,Ne.calendar=O4,Ne.clone=$4,Ne.diff=F4,Ne.endOf=K4,Ne.format=B4,Ne.from=q4,Ne.fromNow=H4,Ne.to=V4,Ne.toNow=W4,Ne.get=Uz,Ne.invalidAt=rU,Ne.isAfter=L4,Ne.isBefore=N4,Ne.isBetween=I4,Ne.isSame=R4,Ne.isSameOrAfter=D4,Ne.isSameOrBefore=M4,Ne.isValid=tU,Ne.lang=yT,Ne.locale=_T,Ne.localeData=wT,Ne.max=t4,Ne.min=e4,Ne.parsingFlags=nU,Ne.set=Bz,Ne.startOf=G4,Ne.subtract=S4,Ne.toArray=X4,Ne.toObject=Q4,Ne.toDate=Z4,Ne.toISOString=j4,Ne.inspect=U4,typeof Symbol<"u"&&Symbol.for!=null&&(Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ne.toJSON=eU,Ne.toString=z4,Ne.unix=J4,Ne.valueOf=Y4,Ne.creationData=iU,Ne.eraName=lU,Ne.eraNarrow=cU,Ne.eraAbbr=uU,Ne.eraYear=dU,Ne.year=YE,Ne.isLeapYear=jz,Ne.weekYear=bU,Ne.isoWeekYear=_U,Ne.quarter=Ne.quarters=EU,Ne.month=eT,Ne.daysInMonth=Zz,Ne.week=Ne.weeks=sj,Ne.isoWeek=Ne.isoWeeks=oj,Ne.weeksInYear=xU,Ne.weeksInWeekYear=kU,Ne.isoWeeksInYear=yU,Ne.isoWeeksInISOWeekYear=wU,Ne.date=TT,Ne.day=Ne.days=_j,Ne.weekday=yj,Ne.isoWeekday=wj,Ne.dayOfYear=TU,Ne.hour=Ne.hours=Aj,Ne.minute=Ne.minutes=CU,Ne.second=Ne.seconds=AU,Ne.millisecond=Ne.milliseconds=CT,Ne.utcOffset=u4,Ne.utc=f4,Ne.local=h4,Ne.parseZone=p4,Ne.hasAlignedHourOffset=g4,Ne.isDST=m4,Ne.isLocal=b4,Ne.isUtcOffset=_4,Ne.isUtc=pT,Ne.isUTC=pT,Ne.zoneAbbr=OU,Ne.zoneName=$U,Ne.dates=Li("dates accessor is deprecated. Use date instead.",TT),Ne.months=Li("months accessor is deprecated. Use month instead",eT),Ne.years=Li("years accessor is deprecated. Use year instead",YE),Ne.zone=Li("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",d4),Ne.isDSTShifted=Li("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",v4);function LU(t){return dn(t*1e3)}function NU(){return dn.apply(null,arguments).parseZone()}function AT(t){return t}var Ut=Hb.prototype;Ut.calendar=bz,Ut.longDateFormat=xz,Ut.invalidDate=Sz,Ut.ordinal=Cz,Ut.preparse=AT,Ut.postformat=AT,Ut.relativeTime=Pz,Ut.pastFuture=Oz,Ut.set=mz,Ut.eras=sU,Ut.erasParse=oU,Ut.erasConvertYear=aU,Ut.erasAbbrRegex=hU,Ut.erasNameRegex=fU,Ut.erasNarrowRegex=pU,Ut.months=Gz,Ut.monthsShort=Kz,Ut.monthsParse=Jz,Ut.monthsRegex=Qz,Ut.monthsShortRegex=Xz,Ut.week=tj,Ut.firstDayOfYear=ij,Ut.firstDayOfWeek=rj,Ut.weekdays=pj,Ut.weekdaysMin=mj,Ut.weekdaysShort=gj,Ut.weekdaysParse=bj,Ut.weekdaysRegex=xj,Ut.weekdaysShortRegex=kj,Ut.weekdaysMinRegex=Sj,Ut.isPM=Tj,Ut.meridiem=Pj;function Ip(t,e,n,r){var i=so(),s=Cs().set(r,e);return i[n](s,t)}function PT(t,e,n){if(eo(t)&&(e=t,t=void 0),t=t||"",e!=null)return Ip(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ip(t,r,n,"month");return i}function p_(t,e,n,r){typeof t=="boolean"?(eo(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,eo(e)&&(n=e,e=void 0),e=e||"");var i=so(),s=t?i._week.dow:0,o,a=[];if(n!=null)return Ip(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Ip(e,(o+s)%7,r,"day");return a}function IU(t,e){return PT(t,e,"months")}function RU(t,e){return PT(t,e,"monthsShort")}function DU(t,e,n){return p_(t,e,n,"weekdays")}function MU(t,e,n){return p_(t,e,n,"weekdaysShort")}function FU(t,e,n){return p_(t,e,n,"weekdaysMin")}qo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=Nt(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),He.lang=Li("moment.lang is deprecated. Use moment.locale instead.",qo),He.langData=Li("moment.langData is deprecated. Use moment.localeData instead.",so);var oo=Math.abs;function zU(){var t=this._data;return this._milliseconds=oo(this._milliseconds),this._days=oo(this._days),this._months=oo(this._months),t.milliseconds=oo(t.milliseconds),t.seconds=oo(t.seconds),t.minutes=oo(t.minutes),t.hours=oo(t.hours),t.months=oo(t.months),t.years=oo(t.years),this}function OT(t,e,n,r){var i=ts(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function jU(t,e){return OT(this,t,e,1)}function UU(t,e){return OT(this,t,e,-1)}function $T(t){return t<0?Math.floor(t):Math.ceil(t)}function BU(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=$T(g_(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Ii(t/1e3),r.seconds=i%60,s=Ii(i/60),r.minutes=s%60,o=Ii(s/60),r.hours=o%24,e+=Ii(o/24),c=Ii(LT(e)),n+=c,e-=$T(g_(c)),a=Ii(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function LT(t){return t*4800/146097}function g_(t){return t*146097/4800}function qU(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Ni(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+LT(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(g_(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function ao(t){return function(){return this.as(t)}}var NT=ao("ms"),HU=ao("s"),VU=ao("m"),WU=ao("h"),GU=ao("d"),KU=ao("w"),YU=ao("M"),JU=ao("Q"),ZU=ao("y"),XU=NT;function QU(){return ts(this)}function eB(t){return t=Ni(t),this.isValid()?this[t+"s"]():NaN}function qa(t){return function(){return this.isValid()?this._data[t]:NaN}}var tB=qa("milliseconds"),nB=qa("seconds"),rB=qa("minutes"),iB=qa("hours"),sB=qa("days"),oB=qa("months"),aB=qa("years");function lB(){return Ii(this.days()/7)}var lo=Math.round,Cc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cB(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function uB(t,e,n,r){var i=ts(t).abs(),s=lo(i.as("s")),o=lo(i.as("m")),a=lo(i.as("h")),c=lo(i.as("d")),u=lo(i.as("M")),d=lo(i.as("w")),f=lo(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,cB.apply(null,h)}function dB(t){return t===void 0?lo:typeof t=="function"?(lo=t,!0):!1}function fB(t,e){return Cc[t]===void 0?!1:e===void 0?Cc[t]:(Cc[t]=e,t==="s"&&(Cc.ss=e-1),!0)}function hB(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Cc,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},Cc,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=uB(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var m_=Math.abs;function Ac(t){return(t>0)-(t<0)||+t}function Rp(){if(!this.isValid())return this.localeData().invalidDate();var t=m_(this._milliseconds)/1e3,e=m_(this._days),n=m_(this._months),r,i,s,o,a=this.asSeconds(),c,u,d,f;return a?(r=Ii(t/60),i=Ii(r/60),t%=60,r%=60,s=Ii(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Ac(this._months)!==Ac(a)?"-":"",d=Ac(this._days)!==Ac(a)?"-":"",f=Ac(this._milliseconds)!==Ac(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+o+"S":"")):"P0D"}var Mt=Ap.prototype;Mt.isValid=o4,Mt.abs=zU,Mt.add=jU,Mt.subtract=UU,Mt.as=qU,Mt.asMilliseconds=NT,Mt.asSeconds=HU,Mt.asMinutes=VU,Mt.asHours=WU,Mt.asDays=GU,Mt.asWeeks=KU,Mt.asMonths=YU,Mt.asQuarters=JU,Mt.asYears=ZU,Mt.valueOf=XU,Mt._bubble=BU,Mt.clone=QU,Mt.get=eB,Mt.milliseconds=tB,Mt.seconds=nB,Mt.minutes=rB,Mt.hours=iB,Mt.days=sB,Mt.weeks=lB,Mt.months=oB,Mt.years=aB,Mt.humanize=hB,Mt.toISOString=Rp,Mt.toString=Rp,Mt.toJSON=Rp,Mt.locale=_T,Mt.localeData=wT,Mt.toIsoString=Li("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rp),Mt.lang=yT,gt("X",0,0,"unix"),gt("x",0,0,"valueOf"),tt("x",wp),tt("X",Iz),Jt("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),Jt("x",function(t,e,n){n._d=new Date(Nt(t))});He.version="2.30.1",pz(dn),He.fn=Ne,He.min=n4,He.max=r4,He.now=i4,He.utc=Cs,He.unix=LU,He.months=IU,He.isDate=dd,He.locale=qo,He.invalid=gp,He.duration=ts,He.isMoment=Qi,He.weekdays=DU,He.parseZone=NU,He.localeData=so,He.isDuration=Pp,He.monthsShort=RU,He.weekdaysMin=FU,He.defineLocale=r_,He.updateLocale=Nj,He.locales=Ij,He.weekdaysShort=MU,He.normalizeUnits=Ni,He.relativeTimeRounding=dB,He.relativeTimeThreshold=fB,He.calendarFormat=P4,He.prototype=Ne,He.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function pB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const gB=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","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"],["إ","i"],["ئ","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"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","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"],["𝓀","h"],["𝓁","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"],["𝕆","N"],["𝕊","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)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(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"]],mB=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(pB(n),"g"),r);return t};function vB(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...gB,...e.customReplacements]);return t=t.normalize(),t=mB(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const Ha=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e,dateFormat:n,timeFormat:r,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Pc=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Ha(e);if(t)try{return r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):n?(i?He.utc:He)(t,n).toDate():new Date(t)}catch(s){console.error(s);return}},IT=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Ha(t),{year:i,month:s,day:o,hour:a,minute:c}=ud({timeZone:r?"UTC":void 0}),u=`${i}-${s}-${o}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},RT=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:s,utc:o}=Ha(n),a=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t){if(s)return`${t}${a}`;try{return r?(o?He.utc:He)(t).format(r):i?t:o?`${t}:00.000Z`:`${t}${a}`}catch(c){console.error(c);return}}},bB=t=>{const{default:e}=t;return typeof e!="string"?"":e==="{{now}}"?RT(IT(t),"",t):e},_B=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Ha(e);if(!t)return"";const s=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/^(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(s)return s;try{const{year:o,month:a,day:c,hour:u,minute:d}=ud({date:t?Pc(t,e):new Date,timeZone:i?"UTC":void 0}),f=`${o}-${a}-${c}`,h=`${u}:${d}`;return n?f:r?h:`${f}T${h}`}catch(o){return console.error(o),""}},yB=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,wB=/^default\('?(?<defaultValue>.+?)'?\)$/,xB=/^ternary\('?(?<truthyValue>.*?)'?,\s*'?(?<falsyValue>.*?)'?\)$/,kB=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,SB=({fieldConfig:t,value:e,transformation:n})=>{const r=String(e);if(n==="upper")return r.toUpperCase();if(n==="lower")return r.toLowerCase();const i=n.match(yB);if(i?.groups){const{format:c,timeZone:u}=i.groups,{dateOnly:d,utc:f}=Ha(t??{}),p=(u==="utc"||f||d&&!!r.match(/^\d{4}-[01]\d-[0-3]\d$/)||d&&!!r.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?He.utc:He)(r);return p.isValid()?p.format(c):""}const s=n.match(wB);if(s?.groups){const{defaultValue:c}=s.groups;return e?r:c}const o=n.match(xB);if(o?.groups){const{truthyValue:c,falsyValue:u}=o.groups;return e?c:u}const a=n.match(kB);if(a?.groups){const{max:c,ellipsis:u="…"}=a.groups;return Tw(r,Number(c),{ellipsis:u})}return r},v_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=SB({fieldConfig:t,value:e,transformation:r})}),e),b_=t=>/{{.+?}}/.test(t)?t:`{{${t}}}`,DT=new Map,__=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=DT.get(r);if(i)return i;const s=e.value_field??e.valueField,o=e.display_fields??e.displayFields??[s],a=e.search_fields??e.searchFields??o,c=b_(s),u=o.map(b_).join(" "),d=a.map(b_).join(" "),f=e.filters??[],h=n.map(p=>{const{content:g}=p.locales[t]??p.locales._default??{};return{refEntry:p,hasContent:!!g,content:g??{}}}).filter(({hasContent:p,content:g})=>p&&f.every(({field:m,values:v})=>v.includes(g[m]))).map(({refEntry:p,content:g})=>{const m=Object.fromEntries(tc([...[...u.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...c.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...d.matchAll(/{{(.+?)}}/g)].map(x=>x[1])].map(x=>x.includes(".")?x.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):x)).map(x=>{if(x.endsWith(".*")){const E=new RegExp(`^${cn(x).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),A=za(Object.fromEntries(Object.entries(g).filter(([O])=>E.test(O))));return[x,A[Object.keys(A)[0]]??""]}if(x==="slug")return[x,p.slug];const k=vn({collectionName:e.collection,keyPath:x}),S=x.replace(/^fields\./,"");if(k?.widget==="relation")return[x,y_({fieldConfig:k,valueMap:g,keyPath:S,locale:t})??""];let C=g[S];if(C===void 0){const{defaultLocale:E}=Ri(e.collection)?._i18n??{};E&&(C=p.locales[E].content[S])}return[x,C??""]})),v=Math.max(...Object.values(m).map(x=>Array.isArray(x)?x.length:1));let _=new Array(v).fill(u),b=new Array(v).fill(c),y=new Array(v).fill(d);return Object.entries(m).forEach(([x,k])=>{Array.isArray(k)?k.forEach((S,C)=>{Object.entries(S).forEach(([E,A])=>{_.forEach((O,L)=>{(C===0&&L===0||C%L===0)&&(_[C]=_[C].replaceAll(`{{${x}.${E}}}`,A),b[C]=b[C].replaceAll(`{{${x}.${E}}}`,A),y[C]=y[C].replaceAll(`{{${x}.${E}}}`,A))})})}):(_=_.map(S=>S.replaceAll(`{{${x}}}`,k)),b=b.map(S=>S.replaceAll(`{{${x}}}`,k)),y=y.map(S=>S.replaceAll(`{{${x}}}`,k)))}),_.map((x,k)=>({label:x,value:b[k],searchValue:y[k]}))}).flat(1).sort((p,g)=>oi(p.label,g.label));return DT.set(r,h),h},y_=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:s}=t,o=ns(s),a=__(r,t,o),c=u=>a.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${cn(n)}\\.\\d+$`)).map(([,d])=>d).map(c):c(e[n])},w_=new Map,EB=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=w_.get(r);if(i)return i;const{multiple:s,options:o}=t,a=rS(o),c=f=>o.find(h=>h.value===f)?.label||f;if(s){const f=Object.entries(e).filter(([p])=>p.match(`^${cn(n)}\\.\\d+$`)).map(([,p])=>p),h=a?f.map(c):f;return w_.set(r,h),h}const u=e[n],d=a?c(u):u;return w_.set(r,d),d},x_=new Map,vn=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:r})=>{const i=JSON.stringify({collectionName:t,fileName:e,valueMap:n,keyPath:r}),s=x_.get(i);if(s)return s;const o=Ri(t),a=e?o?._fileMap[e]:void 0;if(!o||e&&!a){x_.set(i,void 0);return}const{fields:c=[]}=a??o,u=r.split(".");let d;return u.forEach((f,h)=>{if(h===0)d=c.find(({name:p})=>p===f);else if(d){const p=/^\d+$/.test(f),g=u.slice(0,h),{field:m,fields:v,types:_,typeKey:b="type"}=d;if(m){const y=p?u[h+1]:void 0;d=!y||m.name===y?m:void 0}else v&&!p?d=v.find(({name:y})=>y===f):_&&p?d=_.find(({name:y})=>y===n[[...g,f,b].join(".")]):_&&f!==b&&(d=_.find(({name:y})=>y===n[[...g,b].join(".")])?.fields?.find(({name:y})=>y===f))}}),x_.set(i,d),d},xd=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,Dp=({collectionName:t,fileName:e,valueMap:n,keyPath:r,locale:i,transformations:s})=>{const o=vn({collectionName:t,fileName:e,valueMap:n,keyPath:r});let a=n[r];if(o?.widget==="relation"&&(a=y_({fieldConfig:o,valueMap:n,keyPath:r,locale:i})),o?.widget==="select"&&(a=EB({fieldConfig:o,valueMap:n,keyPath:r})),o?.widget==="list"){const{fields:c,types:u}=o;c||u||(a=_c(i).format(Object.entries(n).filter(([d,f])=>d.match(`^${cn(r)}\\.\\d+$`)&&typeof f=="string"&&!!f).map(([,d])=>d)))}return Array.isArray(a)&&(a=_c(i).format(a)),s?.length&&(a=v_({fieldConfig:o,value:a,transformations:s})),a?String(a):""},Oc=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:s,locales:o,commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=t;if(r==="slug")return s;if(r==="commit_author")return a||c||u;if(r==="commit_date")return d;const{content:f}=o[e]??{};if(f!==void 0){if(i){const h=vn({collectionName:n,keyPath:r});if(h?.widget==="relation")return y_({fieldConfig:h,valueMap:f,keyPath:r,locale:e})}return f[r]}},TB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],MT={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function FT(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function CB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function AB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function zT(t){return AB(t)||FT(t)}const jT=document.createElement("i");function UT(t){const e="&"+t+";";jT.innerHTML=e;const n=jT.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const PB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function OB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,a="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,h=g(),p;for(s--;++s<=t.length;)if(p===10&&(f=(u?u[o]:0)||1),p=t.charCodeAt(s),p===38){const _=t.charCodeAt(s+1);if(_===9||_===10||_===12||_===32||_===38||_===60||Number.isNaN(_)||r&&_===r){a+=String.fromCharCode(p),f++;continue}const b=s+1;let y=b,x=b,k;if(_===35){x=++y;const N=t.charCodeAt(x);N===88||N===120?(k="hexadecimal",x=++y):k="decimal"}else k="named";let S="",C="",E="";const A=k==="named"?zT:k==="decimal"?FT:CB;for(x--;++x<=t.length;){const N=t.charCodeAt(x);if(!A(N))break;E+=String.fromCharCode(N),k==="named"&&TB.includes(E)&&(S=E,C=UT(E))}let O=t.charCodeAt(x)===59;if(O){x++;const N=k==="named"?UT(E):!1;N&&(S=E,C=N)}let L=1+x-b,I="";if(!(!O&&n.nonTerminated===!1))if(!E)k!=="named"&&m(4,L);else if(k==="named"){if(O&&!C)m(5,1);else if(S!==E&&(x=y+S.length,L=1+x-y,O=!1),!O){const N=S?1:3;if(n.attribute){const j=t.charCodeAt(x);j===61?(m(N,L),C=""):zT(j)?C="":m(N,L)}else m(N,L)}I=C}else{O||m(2,L);let N=Number.parseInt(E,k==="hexadecimal"?16:10);if($B(N))m(7,L),I="�";else if(N in MT)m(6,L),I=MT[N];else{let j="";LB(N)&&m(6,L),N>65535&&(N-=65536,j+=String.fromCharCode(N>>>10|55296),N=56320|N&1023),I=j+String.fromCharCode(N)}}if(I){v(),h=g(),s=x-1,f+=x-b+1,i.push(I);const N=g();N.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,I,{start:h,end:N},t.slice(b-1,x)),h=N}else E=t.slice(b-1,x),a+=E,f+=E.length,s=x-1}else p===10&&(d++,o++,f=0),Number.isNaN(p)?v():(a+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:s+((c?c.offset:0)||0)}}function m(_,b){let y;n.warning&&(y=g(),y.column+=b,y.offset+=b,n.warning.call(n.warningContext||void 0,PB[_],y,_))}function v(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:g()}),a="")}}function $B(t){return t>=55296&&t<=57343||t>1114111}function LB(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const BT=(t,{allowMarkdown:e=!1}={})=>(t=XF(t),t=dS.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=OB(t),t.trim()),qT=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},Vo=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{const{name:s,identifier_field:o="title",summary:a,_i18n:{defaultLocale:c}}=t,u=t._type==="entry"?t._file.basePath:void 0,{locales:d,slug:f,commitDate:h,commitAuthor:p}=e,{content:g={},path:m=""}=d[n??c]??Object.values(d)[0]??{};if(!r||!a)return BT(qT(g,{identifierField:o})||f.replaceAll("-"," "),{allowMarkdown:i});const v=b=>{if(b==="slug")return f;if(b==="dirname")return Rn(m.replace(/[^/]+$/,"").replace(u??"",""));if(b==="filename")return m.split("/").pop().split(".").shift();if(b==="extension")return m.split("/").pop().split(".").pop();if(b==="commit_date")return h??"";if(b==="commit_author")return p?.name||p?.login||p?.email},_=b=>{const[y,...x]=b.split(/\s*\|\s*/),k=g,S=y.replace(/^fields\./,"");let C=v(y);if(C===void 0&&(C=Dp({collectionName:s,valueMap:k,keyPath:S,locale:c})),C===void 0)return"";if(C instanceof Date&&!x.length){const{year:E,month:A,day:O}=ud({date:C});return`${E}-${A}-${O}`}return x.length&&(C=v_({fieldConfig:vn({collectionName:s,valueMap:k,keyPath:S}),value:C,transformations:x})),String(C)};return BT(a.replace(/{{(.+?)}}/g,(b,y)=>_(y)),{allowMarkdown:i})},Mp=()=>(globalThis.matchMedia("(pointer: fine)")?.matches??!1)&&"ondrop"in globalThis,k_=t=>{const e=new Intl.NumberFormat(ne(Ln),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,s=i*1e3;return t<n?ne(le)("file_size_units.b",{values:{size:e.format(t)}}):t<r?ne(le)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?ne(le)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<s?ne(le)("file_size_units.gb",{values:{size:e.format(t/i)}}):ne(le)("file_size_units.tb",{values:{size:e.format(t/s)}})},S_=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=$n(t),i=new RegExp(`^${cn(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),s=e.sort((a,c)=>oi(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!s)return t;const o=Number(s.match(i)?.groups?.num??0)+1;return`${n}-${o}${r?`.${r}`:""}`},Fp=t=>t.filter(Boolean).join("/"),E_=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const s=e.findLastIndex((o,a)=>!!o&&a<i);s>-1&&(e[s]=null)}}else n=!0}),Fp(e)},NB=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:r="-"}={}}=ne(yt)??{};let i=t;return n&&(i=vB(i).normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?i=i.replaceAll(/[^\w-~]/g," "):i=i.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),i.toLocaleLowerCase().trim().replaceAll(/\s+/g,r)},$s=(t,{type:e,collection:n,content:r,currentSlug:i,entryFilePath:s,locale:o,dateTimeParts:a=ud({timeZone:"UTC"})})=>{const{name:c,identifier_field:u="title",slug_length:d=void 0}=n,f=n._type==="entry"?n._file.basePath:void 0,h=m=>{if(["year","month","day","hour","minute","second"].includes(m))return a[m];if(m==="slug"&&i)return i;if(m==="uuid")return Wn();if(m==="uuid_short")return Wn("short");if(m==="uuid_shorter")return Wn("shorter");if(e==="preview_path"&&m==="locale")return o;if(e==="preview_path"||e==="media_folder"){if(!s)return"";if(m==="dirname")return s.replace(f??"","").match(/(.+?)(?:\/[^/]+)?$/)?.[1]??"";if(m==="filename")return s.split("/").pop().split(".").shift();if(m==="extension")return s.split("/").pop().split(".").pop()}let v;return m.startsWith("fields.")?v=r[m.replace(/^fields\./,"")]:m==="slug"?v=qT(r,{identifierField:u}):v=r[m],v},p=m=>{const[v,..._]=m.split(/\s*\|\s*/);let b=h(v);return b===void 0?Wn("short"):(_.length&&(b=v_({fieldConfig:vn({collectionName:c,valueMap:r,keyPath:v}),value:b,transformations:_})),b!==void 0&&(b=NB(String(b))),b?String(b):Wn("short"))};let g=t.replace(/{{(.+?)}}/g,(m,v)=>p(v)).trim();return typeof d=="number"&&(g=Tw(g,d,{ellipsis:""}).replace(/-$/,"")),i?g:S_(g,ns(c).map(m=>o?m.locales[o]?.slug:m.slug).filter(Boolean))},co=t=>QT(Object.values(t.locales)[0].path).map(({collectionName:e})=>Ri(e)).filter(e=>!!e),HT=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:s}=ne(yt)??{},{slug:o,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f}=r??n;if(!i||!s||!a||!c||!u)return;let h;if(/{{(?:year|month|day|hour|minute|second)}}/g.test(u)){const p=d?f?.find(({widget:_,name:b})=>_==="datetime"&&b===d):f?.find(({widget:_})=>_==="datetime"),g=p?c[p.name]:void 0;if(!p||!g)return;const{format:m,picker_utc:v=!1}=p;h=ud({date:(v?He.utc:He)(g,m).toDate(),timeZone:v?"UTC":void 0})}try{const p=$s(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:o,entryFilePath:a,dateTimeParts:h});return`${s.replace(/\/$/,"")}/${p.replace(/^\//,"")}`}catch{return}},IB=(t,e)=>`${ne(Nn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Wo=(t,e)=>{const n=t.files?t._fileMap:void 0;return n?Object.values(n).filter(({_file:r,_i18n:i})=>r.fullPath===e.locales[i.defaultLocale]?.path):[]},T_=(t,e)=>ne(ri).find(n=>co(n).some(r=>r.name===t&&Wo(r,n).some(i=>i.name===e))),RB=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,$c=st([]),ns=t=>{const e=Ri(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:r}}=e,i=n?.field,s=typeof n?.pattern=="string"?new RegExp(n.pattern):void 0,o=n?.value===void 0?[]:Array.isArray(n.value)?n.value:[n.value];return ne(ri).filter(a=>{if(!co(a).some(({name:u})=>u===t))return!1;if(!i)return!0;const c=Oc({entry:a,locale:r,collectionName:t,key:i})??null;return s?s.test(c):o.includes(c)})},C_=async(t,{entries:e=ne(ri),newURL:n=""}={})=>{const r=ne(yt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,s=await Promise.all(e.map(async o=>{const{locales:a}=o,c=co(o);return(await Promise.all(Object.values(a).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(c.map(async m=>{const v=async b=>{const y=vn({collectionName:m.name,fileName:b?.name,valueMap:d,keyPath:h});if(!y)return!1;const{widget:x="string"}=y;if(["image","file"].includes(x)){const k=await Lc(p,o)===i;return k&&n&&(d[h]=n),k}if(x==="markdown"){const k=[...p.matchAll(RB)];if(k.length)return(await Promise.all(k.map(async([,S])=>{const C=await Lc(S,o)===i;return C&&n&&(d[h]=d[h].replace(S,n)),C}))).some(Boolean)}return!1},_=Wo(m,o);return _.length?(await Promise.all(_.map(v))).includes(!0):v()}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((o,a)=>s[a])},VT="https://unpkg.com/pdfjs-dist/build";let zp;const DB=(t,e)=>{const n=e==="image",r=n?new Image:document.createElement(e);return new Promise(i=>{const s=()=>{i({dimensions:e==="audio"?void 0:{width:n?r.naturalWidth:r.videoWidth,height:n?r.naturalHeight:r.videoHeight},duration:n?void 0:r.duration})};r.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),r.src=t})},MB=t=>new Date(t*1e3).toISOString().substr(11,8),WT=(t,e,n,r)=>{let i=1;return r?e>n?(i=r/e,t.width=r,t.height=n*i):(i=r/n,t.width=e*i,t.height=r):(t.width=e,t.height=n),i},GT=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{let i,s=0,o=0;try{i=await createImageBitmap(t),{width:s,height:o}=i}catch{const u=URL.createObjectURL(t);i=await new Promise(d=>{if(t.type.startsWith("video/")){const f=document.createElement("video");f.addEventListener("canplay",async()=>{f.pause(),{videoWidth:s,videoHeight:o}=f,d(f)},{once:!0}),f.muted=!0,f.autoplay=!0,f.playsInline=!0,f.src=u,f.style.opacity="0",document.body.appendChild(f)}else{const f=new Image;f.addEventListener("load",()=>{({naturalWidth:s,naturalHeight:o}=f),d(f)},{once:!0}),f.src=u}}),URL.revokeObjectURL(u)}const a=new OffscreenCanvas(512,512),c=a.getContext("2d");return WT(a,s,o,r),c.drawImage(i,0,0,a.width,a.height),i instanceof HTMLVideoElement&&document.body.removeChild(i),a.convertToBlob({type:`image/${e}`,quality:n})},FB=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{if(!zp)try{zp=await Tx(()=>import(`${VT}/pdf.min.mjs`),void 0),zp.GlobalWorkerOptions.workerSrc=`${VT}/pdf.worker.min.mjs`}catch{throw new Error("Failed to load PDF.js library")}const i=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),o=s.getContext("2d");try{const c=await(await zp.getDocument({url:i,isEvalSupported:!1,disableAutoFetch:!0}).promise).getPage(1),u=c.getViewport({scale:1}),{width:d,height:f}=u,h=WT(s,d,f,r);await c.render({canvasContext:o,viewport:h===1?u:c.getViewport({scale:h})}).promise,URL.revokeObjectURL(i)}catch{throw new Error("Failed to render PDF")}return s.convertToBlob({type:`image/${e}`,quality:n})},zB=t=>{if(!Dg(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)},jB=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const s=new URLSearchParams(i);let o=`${e}/embed/${s.get("v")}`;return s.get("list")&&(s.delete("v"),s.set("listType","playlist"),o+=`?${s.toString()}`),o}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`},KT=["image","video","audio"],UB=[...KT,"document","other"],A_={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},tn=st([]),di=st([]),P_=Qn([di],([t],e)=>{e(t.find(({collectionName:n})=>!n))}),ni=st(),kd=st([]),uo=st(),Go=st(!1),Ko=st(),Ls=st({folder:void 0,files:[]}),O_=st(),jp=st(),Up=t=>KT.includes(t),YT=t=>{const e=Mo.getType(t.path);return Up(t.kind)||e==="application/pdf"||!!e&&Qc(e)},JT=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else e=Mo.getType(t)??"";else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(Up(n)&&!r.startsWith("x-"))return n},BB=t=>{const e=Mo.getType(t.path);return!!e&&Qc(e)},$_=t=>Object.entries(A_).find(([,e])=>e.test(t))?.[0]??"other",Va=async t=>{const{file:e,blobURL:n,name:r}=t;if(n)return fetch(n).then(s=>s.blob());let i;if(e)i=e;else{const s=await ne(Nn)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");i=new Blob([s],{type:Mo.getType(r)??s.type})}return t.blobURL=URL.createObjectURL(i),i},L_=async t=>(t.blobURL||await Va(t),t.blobURL);let Bp;const ZT=async t=>{const e=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||e))return;if(Bp===void 0){const{databaseName:r}=ne(Nn)?.repository??{};Bp=r?new Fo(r,"asset-thumbnails"):null}let n=await Bp?.get(t.sha);if(!n){const r=await Va(t),i={format:"webp",quality:.85,dimension:512};n=e?await FB(r,i):await GT(r,i),await Bp?.set(t.sha,n)}return URL.createObjectURL(n)},XT=(t,{matchSubFolders:e=!1}={})=>{const{filename:n}=$n(t);return n.startsWith("+")?[]:ne(di).filter(({internalPath:r,entryRelative:i})=>i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test($n(t).dirname??"")).sort((r,i)=>i.internalPath.localeCompare(r.internalPath??"")??0)},N_=t=>XT(t.path,{matchSubFolders:!0}).map(({collectionName:e})=>e?Ri(e):void 0).filter(e=>!!e),I_=(t,{entry:e,collection:n}={})=>{const r=decodeURI(t);if(!/^[/@]/.test(r)){if(!e)return;const{locales:p}=e,g=({_i18n:v})=>{const{defaultLocale:_}=v,b=_ in p?_:Object.keys(p)[0],{path:y,content:x}=p[b];if(!y||!x)return;const{entryFolder:k}=y.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},S=E_(`${k}/${r}`);return ne(tn).find(C=>C.path===S)};return co(e).map(v=>{const _=Wo(v,e);return _.length?_.map(g):g(v)}).flat(1).filter(Boolean)[0]??ne(tn).find(v=>v.path===r)}const i=ne(tn).find(p=>p.path===Rn(r));if(i)return i;const{dirname:s="",basename:o}=$n(r);let{collectionName:a,internalPath:c,publicPath:u}=s?ne(di).findLast(p=>s.match(`^${p.publicPath.replace(/{{.+?}}/g,".+?")}\\b`))??{}:ne(di)[0];if(c===void 0)return;if(!a){const p=r.replace(new RegExp(`^${cn(u||s)}`),c),g=ne(tn).find(m=>m.path===p);if(g)return g}if(e&&!n&&([n]=co(e)),e&&n&&/{{.+?}}/.test(c)){const{content:p,path:g}=e.locales[n._i18n.defaultLocale];c=$s(c,{type:"media_folder",collection:n,content:Fa(p),currentSlug:e.slug,entryFilePath:g})}const d=n?._assetFolder?.publicPath,f=d?Rn(s.replace(new RegExp(`^${cn(d)}`),"")):"",h=Fp([c,f,o]);return ne(tn).find(p=>p.path===h)},qp=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const i=ne(di),{publicPath:s,entryRelative:o}=i.find(({collectionName:d})=>N_(t).some(f=>f.name===d))??i.find(({collectionName:d})=>!d)??{};if(o)return e&&r&&$n(t.path).dirname===$n(Object.values(r.locales)[0].path).dirname?t.name:void 0;const a=t.path.replace(t.folder,s==="/"?"":s??""),c=encodeURI(a);return!c.startsWith("/")&&!n?void 0:e?c:`${ne(yt)?._baseURL}${c}`},Lc=async(t,e,{thumbnail:n=!1}={})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const r=I_(t,{entry:e});if(r)return(n?await ZT(r):await L_(r))??qp(r)},Hp={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},Vp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=ne(Nn)?.repository??{},i=await L_(t),s=qp(t),o=i??s;let a,c;return["image","video","audio"].includes(e)&&i&&({dimensions:a,duration:c}=await DB(i,e)),{publicURL:s,repoBlobURL:r?`${r}/${n}`:void 0,dimensions:a,duration:c,usedEntries:o?await C_(o):[]}},qB=t=>ne(tn).filter(e=>e.folder===t),R_=t=>ne(tn).filter(e=>$n(e.path).dirname===t);ni.subscribe(()=>{uo.set(void 0)});const qn=st(),D_=new Map,HB=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},Ri=t=>{const e=D_.get(t);if(e)return e;const n=ne(yt)?.collections.find(d=>d.name===t),r=typeof n?.folder=="string",i=!r&&Array.isArray(n?.files);if(!r&&!i){D_.set(t,void 0);return}const{folder:s,files:o}=n;r?n.folder=Rn(s):o.forEach(d=>{d.file=Rn(d.file)});const a=hp(n),c={...n,_i18n:a,_assetFolder:ne(di).find(({collectionName:d})=>d===t)},u=r?{...c,_type:"entry",_file:Lw({rawCollection:n,_i18n:a}),_thumbnailFieldNames:HB(n)}:{...c,_type:"file",_fileMap:o?.length?Object.fromEntries(o.map(d=>{const f=hp(n,d),h=Lw({rawCollection:n,file:d,_i18n:f});return[d.name,{...d,_file:h,_i18n:f}]})):{}};return D_.set(t,u),u},Nc=st(!1),Wa=st(),M_=st([]),ri=st([]),F_=st([]),QT=t=>ne(M_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Ri(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),VB={DEV:!1},{DEV:WB}=VB,GB=void 0,yt=st(),z_=st(),j_=st(),eC=async({ignoreError:t=!1}={})=>{const{href:e=window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml",type:n="application/yaml"}=document.querySelector('link[rel="cms-config-url"]')??{};let r;try{r=await fetch(e)}catch(o){throw new Error(ne(le)("config.error.fetch_failed"),{cause:o})}const{ok:i,status:s}=r;if(!i){if(t)return{};throw new Error(ne(le)("config.error.fetch_failed"),{cause:new Error(ne(le)("config.error.fetch_failed_not_ok",{values:{status:s}}))})}try{return n==="application/json"?r.json():cd.parse(await r.text(),{merge:!0})}catch(o){throw new Error(ne(le)("config.error.parse_failed"),{cause:o})}},KB=t=>{if(!Jn(t))throw new Error(ne(le)("config.error.parse_failed"),{cause:new Error(ne(le)("config.error.parse_failed_invalid_object"))});if(!t.collections?.length)throw new Error(ne(le)("config.error.no_collection"));if(!t.backend?.name)throw new Error(ne(le)("config.error.no_backend"));if(!(t.backend.name in Jp))throw new Error(ne(le)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(ne(le)("config.error.no_repository"));if(t.backend.auth_type==="implicit")throw new Error(ne(le)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(ne(le)("config.error.oauth_no_app_id"));if(typeof t.media_folder!="string")throw new Error(ne(le)("config.error.no_media_folder"))},YB=async(t={})=>{yt.set(void 0),j_.set(void 0);try{if(!window.isSecureContext)throw new Error(ne(le)("config.error.no_secure_context"));if(t&&!Jn(t))throw new Error(ne(le)("config.error.parse_failed"));let e;t?.load_config_file===!1?e=t:Object.entries(t).length?e=Dw(await eC({ignoreError:!0}),t):e=await eC(),KB(e);const n=e;n._siteURL=n.site_url?.trim()||(WB?GB:window.location.origin),n._baseURL=Dg(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),yt.set(n),z_.set(await oa(cd.stringify(n)))}catch(e){j_.set({message:e.name==="Error"?e.message:ne(le)("config.error.unexpected")}),console.error(e,e.cause)}};yt.subscribe(t=>{if(ne(Tt).devModeEnabled&&console.info("siteConfig",t),!t)return;const{media_folder:e,public_folder:n,collections:r}=t,i=[...r.filter(({folder:d,hide:f,divider:h})=>typeof d=="string"&&!f&&!h).map(d=>{const{name:f,folder:h}=d,p=Rn(h),{i18nEnabled:g,structure:m,allLocales:v}=hp(d),_=g&&m==="multiple_folders_i18n_root";return{collectionName:f,folderPath:p,folderPathMap:Object.fromEntries(v.map(b=>[b,_?`${b}/${p}`:p]))}}).sort((d,f)=>oi(d.folderPath??"",f.folderPath??"")),...r.filter(({files:d,hide:f,divider:h})=>Array.isArray(d)&&!f&&!h).map(d=>{const{name:f,files:h}=d;return(h??[]).map(p=>{const g=Rn(p.file);return{collectionName:f,fileName:p.name,filePathMap:g.includes("{{locale}}")?Object.fromEntries(hp(d,p).allLocales.map(m=>[m,g.replace("{{locale}}",m)])):{_default:g}}})}).flat(1).sort((d,f)=>oi(Object.values(d.filePathMap)[0],Object.values(f.filePathMap)[0]))],s=Rn(e).replace(/^\.$/,""),o=n?`/${Rn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1},c=r.filter(({hide:d,divider:f,media_folder:h,path:p})=>(!d||!!h||!!p)&&!f).map(d=>{const{name:f,folder:h,path:p,public_folder:g}=d;let{media_folder:m}=d;if(m===void 0){if(p===void 0)return null;m=""}m=m.replace("{{media_folder}}",s);const v=!(m.startsWith("/")||m.startsWith(s));let _=Rn((g??m).replace("{{public_folder}}",o).trim());return _=_===""||_.match(/^[.@]/)?_:`/${_}`,{collectionName:f,internalPath:Rn(v?h??"":m),publicPath:_,entryRelative:v}}).filter(Boolean).sort((d,f)=>oi(d.internalPath,f.internalPath)),u=[a,...c];M_.set(i),di.set(u),ne(Tt).devModeEnabled&&(console.info("allEntryFolders",i),console.info("allAssetFolders",u))});const fi=st();fi.subscribe(t=>{(async()=>{try{t?await Qr.set("sveltia-cms.user",t):t===null&&await Qr.delete("sveltia-cms.user")}catch{}})()});const JB={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},tC=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},automatic_deployments:s}}=ne(yt),{login:o="",name:a=""}=ne(fi),[c=""]=t.map(p=>p.slug).filter(Boolean),[u,...d]=t.map(({path:p})=>p),f=n?.label_singular||n?.label||n?.name||"";let h=i[e]||JB[e]||"";return["create","update","delete"].includes(e)&&(h=h.replaceAll("{{slug}}",c).replaceAll("{{collection}}",f).replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),["uploadMedia","deleteMedia"].includes(e)&&(h=h.replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a),d.length&&(h+=` +${d.length}`)),["openAuthoring"].includes(e)&&(h=h.replaceAll("{{message}}",e).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),!["delete","deleteMedia"].includes(e)&&(r===void 0?s===!1:r===!0)&&(h=`[skip ci] ${h}`),h},nC=t=>t.map(e=>{const{file:n,path:r,sha:i,size:s,text:o=void 0,meta:a={},folder:{internalPath:c}}=e;return{file:n,blobURL:void 0,path:r,name:$n(r).basename,sha:i,size:s,kind:$_(r),text:o,folder:c,...a}}),rC=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,ZB=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s,hasSingleSubField:o,index:a})=>{if(!s){if(o)return r[`${n}.${a}`];const c=new RegExp(`^${cn(n)}\\.${a}[\\b\\.]`),u=Object.fromEntries(Object.entries(r).filter(([d])=>c.test(d)).map(([d,f])=>[d.replace(c,""),f]));return u.title||u.name||Object.values(u).find(d=>typeof d=="string"&&!!d)||""}return s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/),h=`${n}.${a}.${d.replace(/^fields\./,"")}`;return o&&!vn({collectionName:t,fileName:e,valueMap:r,keyPath:h})?"":Dp({collectionName:t,fileName:e,valueMap:r,keyPath:o?`${n}.${a}`:h,locale:i,transformations:f})})};function XB(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function QB(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=r[o-1];a&&(i+=o.toString().padEnd(s," "),i+=": ",i+=a,i+=`
394
394
  `,o===e&&(i+=" ".repeat(s+n+2),i+=`^
395
395
  `))}return i}class $t extends Error{line;column;codeblock;constructor(e,n){const[r,i]=XB(n.toml,n.ptr),s=QB(n.toml,r,i);super(`Invalid TOML document: ${e}
396
396
 
@@ -401,27 +401,27 @@ ${s}`,n),this.line=r,this.column=i,this.codeblock=s}}function Wp(t,e=0,n=t.lengt
401
401
  `||i==="\r"&&t[e+1]===`
402
402
  `);)e++;return r||i!=="#"?e:fo(t,U_(t,e),n)}function iC(t,e,n,r,i=!1){if(!r)return e=Wp(t,e),e<0?t.length:e;for(let s=e;s<t.length;s++){let o=t[s];if(o==="#")s=Wp(t,s);else{if(o===n)return s+1;if(o===r)return s;if(i&&(o===`
403
403
  `||o==="\r"&&t[s+1]===`
404
- `))return s}}throw new $t("cannot find end of structure",{toml:t,ptr:e})}function sC(t,e){let n=t[e],r=n===t[e+1]&&t[e+1]===t[e+2]?t.slice(e,e+3):n;e+=r.length-1;do e=t.indexOf(r,++e);while(e>-1&&n!=="'"&&t[e-1]==="\\"&&t[e-2]!=="\\");return e>-1&&(e+=r.length,r.length>1&&(t[e]===n&&e++,t[e]===n&&e++)),e}let e8=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class Ga extends Date{#t=!1;#n=!1;#e=null;constructor(e){let n=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(e8);s?(s[1]||(n=!1,e=`0000-01-01T${e}`),r=!!s[2],s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,n="Z"){let r=new Ga(e);return r.#e=n,r}static wrapAsLocalDateTime(e){let n=new Ga(e);return n.#e=null,n}static wrapAsLocalDate(e){let n=new Ga(e);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(e){let n=new Ga(e);return n.#t=!1,n.#e=null,n}}let t8=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,n8=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,r8=/^[+-]?0[0-9_]/,i8=/^[0-9a-f]{4,8}$/i,oC={b:"\b",t:" ",n:`
404
+ `))return s}}throw new $t("cannot find end of structure",{toml:t,ptr:e})}function sC(t,e){let n=t[e],r=n===t[e+1]&&t[e+1]===t[e+2]?t.slice(e,e+3):n;e+=r.length-1;do e=t.indexOf(r,++e);while(e>-1&&n!=="'"&&t[e-1]==="\\"&&t[e-2]!=="\\");return e>-1&&(e+=r.length,r.length>1&&(t[e]===n&&e++,t[e]===n&&e++)),e}let eq=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class Ga extends Date{#t=!1;#n=!1;#e=null;constructor(e){let n=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(eq);s?(s[1]||(n=!1,e=`0000-01-01T${e}`),r=!!s[2],s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,n="Z"){let r=new Ga(e);return r.#e=n,r}static wrapAsLocalDateTime(e){let n=new Ga(e);return n.#e=null,n}static wrapAsLocalDate(e){let n=new Ga(e);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(e){let n=new Ga(e);return n.#t=!1,n.#e=null,n}}let tq=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,nq=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,rq=/^[+-]?0[0-9_]/,iq=/^[0-9a-f]{4,8}$/i,oC={b:"\b",t:" ",n:`
405
405
  `,f:"\f",r:"\r",'"':'"',"\\":"\\"};function aC(t,e=0,n=t.length){let r=t[e]==="'",i=t[e++]===t[e]&&t[e]===t[e+1];i&&(n-=2,t[e+=2]==="\r"&&e++,t[e]===`
406
406
  `&&e++);let s=0,o,a="",c=e;for(;e<n-1;){let u=t[e++];if(u===`
407
407
  `||u==="\r"&&t[e]===`
408
- `){if(!i)throw new $t("newlines are not allowed in strings",{toml:t,ptr:e-1})}else if(u<" "&&u!==" "||u==="")throw new $t("control characters are not allowed in strings",{toml:t,ptr:e-1});if(o){if(o=!1,u==="u"||u==="U"){let d=t.slice(e,e+=u==="u"?4:8);if(!i8.test(d))throw new $t("invalid unicode escape",{toml:t,ptr:s});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new $t("invalid unicode escape",{toml:t,ptr:s})}}else if(i&&(u===`
408
+ `){if(!i)throw new $t("newlines are not allowed in strings",{toml:t,ptr:e-1})}else if(u<" "&&u!==" "||u==="")throw new $t("control characters are not allowed in strings",{toml:t,ptr:e-1});if(o){if(o=!1,u==="u"||u==="U"){let d=t.slice(e,e+=u==="u"?4:8);if(!iq.test(d))throw new $t("invalid unicode escape",{toml:t,ptr:s});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new $t("invalid unicode escape",{toml:t,ptr:s})}}else if(i&&(u===`
409
409
  `||u===" "||u===" "||u==="\r")){if(e=fo(t,e-1,!0),t[e]!==`
410
- `&&t[e]!=="\r")throw new $t("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:s});e=fo(t,e)}else if(u in oC)a+=oC[u];else throw new $t("unrecognized escape sequence",{toml:t,ptr:s});c=e}else!r&&u==="\\"&&(s=e-1,o=!0,a+=t.slice(c,s))}return a+t.slice(c,n-1)}function s8(t,e,n){if(t==="true")return!0;if(t==="false")return!1;if(t==="-inf")return-1/0;if(t==="inf"||t==="+inf")return 1/0;if(t==="nan"||t==="+nan"||t==="-nan")return NaN;if(t==="-0")return 0;let r;if((r=t8.test(t))||n8.test(t)){if(r8.test(t))throw new $t("leading zeroes are not allowed",{toml:e,ptr:n});let s=+t.replace(/_/g,"");if(isNaN(s))throw new $t("invalid number",{toml:e,ptr:n});if(r&&!Number.isSafeInteger(s))throw new $t("integer value cannot be represented losslessly",{toml:e,ptr:n});return s}let i=new Ga(t);if(!i.isValid())throw new $t("invalid value",{toml:e,ptr:n});return i}function o8(t,e,n,r){let i=t.slice(e,n),s=i.indexOf("#");s>-1&&(U_(t,s),i=i.slice(0,s));let o=i.trimEnd();if(!r){let a=i.indexOf(`
411
- `,o.length);if(a>-1)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:e+a})}return[o,s]}function B_(t,e,n,r){if(r===0)throw new $t("document contains excessively nested structures. aborting.",{toml:t,ptr:e});let i=t[e];if(i==="["||i==="{"){let[a,c]=i==="["?c8(t,e,r):l8(t,e,r),u=iC(t,c,",",n);if(n==="}"){let d=Wp(t,c,u);if(d>-1)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:d})}return[a,u]}let s;if(i==='"'||i==="'"){s=sC(t,e);let a=aC(t,e,s);if(n){if(s=fo(t,s,n!=="]"),t[s]&&t[s]!==","&&t[s]!==n&&t[s]!==`
412
- `&&t[s]!=="\r")throw new $t("unexpected character encountered",{toml:t,ptr:s});s+=+(t[s]===",")}return[a,s]}s=iC(t,e,",",n);let o=o8(t,e,s-+(t[s-1]===","),n==="]");if(!o[0])throw new $t("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&o[1]>-1&&(s=fo(t,e+o[1]),s+=+(t[s]===",")),[s8(o[0],t,e),s]}let a8=/^[a-zA-Z0-9-_]+[ \t]*$/;function q_(t,e,n="="){let r=e-1,i=[],s=t.indexOf(n,e);if(s<0)throw new $t("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let o=t[e=++r];if(o!==" "&&o!==" ")if(o==='"'||o==="'"){if(o===t[e+1]&&o===t[e+2])throw new $t("multiline strings are not allowed in keys",{toml:t,ptr:e});let a=sC(t,e);if(a<0)throw new $t("unfinished string encountered",{toml:t,ptr:e});r=t.indexOf(".",a);let c=t.slice(a,r<0||r>s?s:r),u=Wp(c);if(u>-1)throw new $t("newlines are not allowed in keys",{toml:t,ptr:e+r+u});if(c.trimStart())throw new $t("found extra tokens after the string part",{toml:t,ptr:a});if(s<a&&(s=t.indexOf(n,a),s<0))throw new $t("incomplete key-value: cannot find end of key",{toml:t,ptr:e});i.push(aC(t,e,a))}else{r=t.indexOf(".",e);let a=t.slice(e,r<0||r>s?s:r);if(!a8.test(a))throw new $t("only letter, numbers, dashes and underscores are allowed in keys",{toml:t,ptr:e});i.push(a.trimEnd())}}while(r+1&&r<s);return[i,fo(t,s+1,!0,!0)]}function l8(t,e,n){let r={},i=new Set,s,o=0;for(e++;(s=t[e++])!=="}"&&s;){if(s===`
413
- `)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:e-1});if(s==="#")throw new $t("inline tables cannot contain comments",{toml:t,ptr:e-1});if(s===",")throw new $t("expected key-value, found comma",{toml:t,ptr:e-1});if(s!==" "&&s!==" "){let a,c=r,u=!1,[d,f]=q_(t,e-1);for(let g=0;g<d.length;g++){if(g&&(c=u?c[a]:c[a]={}),a=d[g],(u=Object.hasOwn(c,a))&&(typeof c[a]!="object"||i.has(c[a])))throw new $t("trying to redefine an already defined value",{toml:t,ptr:e});!u&&a==="__proto__"&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(u)throw new $t("trying to redefine an already defined value",{toml:t,ptr:e});let[h,p]=B_(t,f,"}",n-1);i.add(h),c[a]=h,e=p,o=t[e-1]===","?e-1:0}}if(o)throw new $t("trailing commas are not allowed in inline tables",{toml:t,ptr:o});if(!s)throw new $t("unfinished table encountered",{toml:t,ptr:e});return[r,e]}function c8(t,e,n){let r=[],i;for(e++;(i=t[e++])!=="]"&&i;){if(i===",")throw new $t("expected value, found comma",{toml:t,ptr:e-1});if(i==="#")e=U_(t,e);else if(i!==" "&&i!==" "&&i!==`
414
- `&&i!=="\r"){let s=B_(t,e-1,"]",n-1);r.push(s[0]),e=s[1]}}if(!i)throw new $t("unfinished array encountered",{toml:t,ptr:e});return[r,e]}function lC(t,e,n,r){let i=e,s=n,o,a=!1,c;for(let u=0;u<t.length;u++){if(u){if(i=a?i[o]:i[o]={},s=(c=s[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let d=i.length-1;i=i[d],s=s[d].c}}if(o=t[u],(a=Object.hasOwn(i,o))&&s[o]?.t===0&&s[o]?.d)return null;a||(o==="__proto__"&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})),s[o]={t:u<t.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=s[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=a?i[o]:i[o]={};else if(r===0&&a)return null;return[o,i,c.c]}function u8(t,e){let n=e?.maxDepth??1e3,r={},i={},s=r,o=i;for(let a=fo(t,0);a<t.length;){if(t[a]==="["){let c=t[++a]==="[",u=q_(t,a+=+c,"]");if(c){if(t[u[1]-1]!=="]")throw new $t("expected end of table declaration",{toml:t,ptr:u[1]-1});u[1]++}let d=lC(u[0],r,i,c?2:1);if(!d)throw new $t("trying to redefine an already defined table or value",{toml:t,ptr:a});o=d[2],s=d[1],a=u[1]}else{let c=q_(t,a),u=lC(c[0],s,o,0);if(!u)throw new $t("trying to redefine an already defined table or value",{toml:t,ptr:a});let d=B_(t,c[1],void 0,n);u[1][u[0]]=d[0],a=d[1]}if(a=fo(t,a,!0),t[a]&&t[a]!==`
415
- `&&t[a]!=="\r")throw new $t("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:a});a=fo(t,a)}return r}let cC=/^[a-z0-9-_]+$/i;function Sd(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(t instanceof Date)return"date"}return e}function d8(t){for(let e=0;e<t.length;e++)if(Sd(t[e])!=="object")return!1;return t.length!=0}function H_(t){return JSON.stringify(t).replace(/\x7f/g,"\\u007f")}function V_(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(e==="number")return isNaN(t)?"nan":t===1/0?"inf":t===-1/0?"-inf":t.toString();if(e==="bigint"||e==="boolean")return t.toString();if(e==="string")return H_(t);if(e==="date"){if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString()}if(e==="object")return f8(t,n);if(e==="array")return h8(t,n)}function f8(t,e){let n=Object.keys(t);if(n.length===0)return"{}";let r="{ ";for(let i=0;i<n.length;i++){let s=n[i];i&&(r+=", "),r+=cC.test(s)?s:H_(s),r+=" = ",r+=V_(t[s],Sd(t[s]),e-1)}return r+" }"}function h8(t,e){if(t.length===0)return"[]";let n="[ ";for(let r=0;r<t.length;r++){if(r&&(n+=", "),t[r]===null||t[r]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=V_(t[r],Sd(t[r]),e-1)}return n+" ]"}function p8(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="";for(let i=0;i<t.length;i++)r+=`[[${e}]]
410
+ `&&t[e]!=="\r")throw new $t("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:s});e=fo(t,e)}else if(u in oC)a+=oC[u];else throw new $t("unrecognized escape sequence",{toml:t,ptr:s});c=e}else!r&&u==="\\"&&(s=e-1,o=!0,a+=t.slice(c,s))}return a+t.slice(c,n-1)}function sq(t,e,n){if(t==="true")return!0;if(t==="false")return!1;if(t==="-inf")return-1/0;if(t==="inf"||t==="+inf")return 1/0;if(t==="nan"||t==="+nan"||t==="-nan")return NaN;if(t==="-0")return 0;let r;if((r=tq.test(t))||nq.test(t)){if(rq.test(t))throw new $t("leading zeroes are not allowed",{toml:e,ptr:n});let s=+t.replace(/_/g,"");if(isNaN(s))throw new $t("invalid number",{toml:e,ptr:n});if(r&&!Number.isSafeInteger(s))throw new $t("integer value cannot be represented losslessly",{toml:e,ptr:n});return s}let i=new Ga(t);if(!i.isValid())throw new $t("invalid value",{toml:e,ptr:n});return i}function oq(t,e,n,r){let i=t.slice(e,n),s=i.indexOf("#");s>-1&&(U_(t,s),i=i.slice(0,s));let o=i.trimEnd();if(!r){let a=i.indexOf(`
411
+ `,o.length);if(a>-1)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:e+a})}return[o,s]}function B_(t,e,n,r){if(r===0)throw new $t("document contains excessively nested structures. aborting.",{toml:t,ptr:e});let i=t[e];if(i==="["||i==="{"){let[a,c]=i==="["?cq(t,e,r):lq(t,e,r),u=iC(t,c,",",n);if(n==="}"){let d=Wp(t,c,u);if(d>-1)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:d})}return[a,u]}let s;if(i==='"'||i==="'"){s=sC(t,e);let a=aC(t,e,s);if(n){if(s=fo(t,s,n!=="]"),t[s]&&t[s]!==","&&t[s]!==n&&t[s]!==`
412
+ `&&t[s]!=="\r")throw new $t("unexpected character encountered",{toml:t,ptr:s});s+=+(t[s]===",")}return[a,s]}s=iC(t,e,",",n);let o=oq(t,e,s-+(t[s-1]===","),n==="]");if(!o[0])throw new $t("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&o[1]>-1&&(s=fo(t,e+o[1]),s+=+(t[s]===",")),[sq(o[0],t,e),s]}let aq=/^[a-zA-Z0-9-_]+[ \t]*$/;function q_(t,e,n="="){let r=e-1,i=[],s=t.indexOf(n,e);if(s<0)throw new $t("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let o=t[e=++r];if(o!==" "&&o!==" ")if(o==='"'||o==="'"){if(o===t[e+1]&&o===t[e+2])throw new $t("multiline strings are not allowed in keys",{toml:t,ptr:e});let a=sC(t,e);if(a<0)throw new $t("unfinished string encountered",{toml:t,ptr:e});r=t.indexOf(".",a);let c=t.slice(a,r<0||r>s?s:r),u=Wp(c);if(u>-1)throw new $t("newlines are not allowed in keys",{toml:t,ptr:e+r+u});if(c.trimStart())throw new $t("found extra tokens after the string part",{toml:t,ptr:a});if(s<a&&(s=t.indexOf(n,a),s<0))throw new $t("incomplete key-value: cannot find end of key",{toml:t,ptr:e});i.push(aC(t,e,a))}else{r=t.indexOf(".",e);let a=t.slice(e,r<0||r>s?s:r);if(!aq.test(a))throw new $t("only letter, numbers, dashes and underscores are allowed in keys",{toml:t,ptr:e});i.push(a.trimEnd())}}while(r+1&&r<s);return[i,fo(t,s+1,!0,!0)]}function lq(t,e,n){let r={},i=new Set,s,o=0;for(e++;(s=t[e++])!=="}"&&s;){if(s===`
413
+ `)throw new $t("newlines are not allowed in inline tables",{toml:t,ptr:e-1});if(s==="#")throw new $t("inline tables cannot contain comments",{toml:t,ptr:e-1});if(s===",")throw new $t("expected key-value, found comma",{toml:t,ptr:e-1});if(s!==" "&&s!==" "){let a,c=r,u=!1,[d,f]=q_(t,e-1);for(let g=0;g<d.length;g++){if(g&&(c=u?c[a]:c[a]={}),a=d[g],(u=Object.hasOwn(c,a))&&(typeof c[a]!="object"||i.has(c[a])))throw new $t("trying to redefine an already defined value",{toml:t,ptr:e});!u&&a==="__proto__"&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(u)throw new $t("trying to redefine an already defined value",{toml:t,ptr:e});let[h,p]=B_(t,f,"}",n-1);i.add(h),c[a]=h,e=p,o=t[e-1]===","?e-1:0}}if(o)throw new $t("trailing commas are not allowed in inline tables",{toml:t,ptr:o});if(!s)throw new $t("unfinished table encountered",{toml:t,ptr:e});return[r,e]}function cq(t,e,n){let r=[],i;for(e++;(i=t[e++])!=="]"&&i;){if(i===",")throw new $t("expected value, found comma",{toml:t,ptr:e-1});if(i==="#")e=U_(t,e);else if(i!==" "&&i!==" "&&i!==`
414
+ `&&i!=="\r"){let s=B_(t,e-1,"]",n-1);r.push(s[0]),e=s[1]}}if(!i)throw new $t("unfinished array encountered",{toml:t,ptr:e});return[r,e]}function lC(t,e,n,r){let i=e,s=n,o,a=!1,c;for(let u=0;u<t.length;u++){if(u){if(i=a?i[o]:i[o]={},s=(c=s[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let d=i.length-1;i=i[d],s=s[d].c}}if(o=t[u],(a=Object.hasOwn(i,o))&&s[o]?.t===0&&s[o]?.d)return null;a||(o==="__proto__"&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})),s[o]={t:u<t.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=s[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=a?i[o]:i[o]={};else if(r===0&&a)return null;return[o,i,c.c]}function uq(t,e){let n=e?.maxDepth??1e3,r={},i={},s=r,o=i;for(let a=fo(t,0);a<t.length;){if(t[a]==="["){let c=t[++a]==="[",u=q_(t,a+=+c,"]");if(c){if(t[u[1]-1]!=="]")throw new $t("expected end of table declaration",{toml:t,ptr:u[1]-1});u[1]++}let d=lC(u[0],r,i,c?2:1);if(!d)throw new $t("trying to redefine an already defined table or value",{toml:t,ptr:a});o=d[2],s=d[1],a=u[1]}else{let c=q_(t,a),u=lC(c[0],s,o,0);if(!u)throw new $t("trying to redefine an already defined table or value",{toml:t,ptr:a});let d=B_(t,c[1],void 0,n);u[1][u[0]]=d[0],a=d[1]}if(a=fo(t,a,!0),t[a]&&t[a]!==`
415
+ `&&t[a]!=="\r")throw new $t("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:a});a=fo(t,a)}return r}let cC=/^[a-z0-9-_]+$/i;function Sd(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(t instanceof Date)return"date"}return e}function dq(t){for(let e=0;e<t.length;e++)if(Sd(t[e])!=="object")return!1;return t.length!=0}function H_(t){return JSON.stringify(t).replace(/\x7f/g,"\\u007f")}function V_(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(e==="number")return isNaN(t)?"nan":t===1/0?"inf":t===-1/0?"-inf":t.toString();if(e==="bigint"||e==="boolean")return t.toString();if(e==="string")return H_(t);if(e==="date"){if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString()}if(e==="object")return fq(t,n);if(e==="array")return hq(t,n)}function fq(t,e){let n=Object.keys(t);if(n.length===0)return"{}";let r="{ ";for(let i=0;i<n.length;i++){let s=n[i];i&&(r+=", "),r+=cC.test(s)?s:H_(s),r+=" = ",r+=V_(t[s],Sd(t[s]),e-1)}return r+" }"}function hq(t,e){if(t.length===0)return"[]";let n="[ ";for(let r=0;r<t.length;r++){if(r&&(n+=", "),t[r]===null||t[r]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=V_(t[r],Sd(t[r]),e-1)}return n+" ]"}function pq(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="";for(let i=0;i<t.length;i++)r+=`[[${e}]]
416
416
  `,r+=W_(t[i],e,n),r+=`
417
417
 
418
- `;return r}function W_(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="",i="",s=Object.keys(t);for(let o=0;o<s.length;o++){let a=s[o];if(t[a]!==null&&t[a]!==void 0){let c=Sd(t[a]);if(c==="symbol"||c==="function")throw new TypeError(`cannot serialize values of type '${c}'`);let u=cC.test(a)?a:H_(a);if(c==="array"&&d8(t[a]))i+=p8(t[a],e?`${e}.${u}`:u,n-1);else if(c==="object"){let d=e?`${e}.${u}`:u;i+=`[${d}]
418
+ `;return r}function W_(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="",i="",s=Object.keys(t);for(let o=0;o<s.length;o++){let a=s[o];if(t[a]!==null&&t[a]!==void 0){let c=Sd(t[a]);if(c==="symbol"||c==="function")throw new TypeError(`cannot serialize values of type '${c}'`);let u=cC.test(a)?a:H_(a);if(c==="array"&&dq(t[a]))i+=pq(t[a],e?`${e}.${u}`:u,n-1);else if(c==="object"){let d=e?`${e}.${u}`:u;i+=`[${d}]
419
419
  `,i+=W_(t[a],d,n-1),i+=`
420
420
 
421
421
  `}else r+=u,r+=" = ",r+=V_(t[a],c,n),r+=`
422
422
  `}}return`${r}
423
- ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify can only be called with an object");let n=e?.maxDepth??1e3;return W_(t,"",n)}const uC=t=>JSON.parse(t),dC=t=>ec(u8(t)),fC=t=>cd.parse(t),m8=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",v8=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=Ri(n),s=r?i?._fileMap[r]:void 0;if(!i)throw new Error("Collection not found");if(r&&!s)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
424
- `);const{_file:{format:o,fmDelimiters:a}}=s??i,c=o==="frontmatter"?m8(t):o,u=pf[c]?.parser;if(u)return u(t);try{if(/^ya?ml$/.test(c))return fC(t);if(c==="toml")return dC(t);if(c==="json")return uC(t);if(/^(?:yaml|toml|json)-frontmatter$/.test(c)){const[d,f]=(o==="frontmatter"?Ow({format:c,delimiter:a}):a)??["---","---"],h=cn(d),p=cn(f),g=new RegExp(`^${h}\\n(?:(?<head>.*?)\\n)?${p}$(?:\\n(?<body>.+))?`,"ms"),{head:m,body:v}=t.match(g)?.groups??{};if(!m&&!v){if(t)return{body:t};throw new Error("No front matter block found")}if(c==="yaml-frontmatter")return{...fC(m),body:v};if(c==="toml-frontmatter")return{...dC(m),body:v};if(c==="json-frontmatter")return{...uC(m),body:v}}}catch(d){throw new Error(`${e} could not be parsed due to ${d.name}: ${d.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${c}`)},G_=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){const[,n]=t.match(new RegExp(`^${cn(e).replace("\\{\\{slug\\}\\}","(.+)")}$`))??[];if(n)return n}return t},b8=async({file:t,entries:e,errors:n})=>{let r;try{r=await v8(t)}catch(I){console.error(I),n.push(I)}if(!r)return;const{path:i,sha:s,meta:o={},folder:{collectionName:a,fileName:c,filePathMap:u}}=t,d=Ri(a),f=c?d?._fileMap[c]:void 0;if(!d||c&&!f)return;const{fields:h=[],_file:{fullPathRegEx:p,subPath:g,extension:m},_i18n:{i18nEnabled:v,allLocales:_,defaultLocale:b,structure:y,canonicalSlug:{key:x}}}=f??d,k=v&&y==="single_file",S=v&&y==="multiple_files",C=v&&y==="multiple_folders",E=v&&y==="multiple_folders_i18n_root";if(rC(h)){const I=h[0].name;if(k){if(!Jn(r)||!Object.values(r).every(Array.isArray))return;r=Object.fromEntries(Object.entries(r).map(([N,j])=>[N,{[I]:j}]))}else{if(!Array.isArray(r))return;r={[I]:r}}}if(!Jn(r)||/^_index(?:\..+)?\.md$/.test($n(i).basename)&&!(g?.split("/").pop()==="_index"&&m==="md")&&!c)return;let A,O;if(c?S||C||E?[O,A]=Object.entries(u??{}).find(([,I])=>I===i)??[]:A=i:{subPath:A,locale:O}=i.match(p)?.groups??{},!A)return;const L={id:"",sha:s,slug:"",subPath:A,locales:{},...o};if(!v){const I=c||G_({subPath:A,subPathTemplate:g});L.slug=I,L.locales._default={slug:I,path:i,sha:s,content:Fa(r)}}if(k){const I=c||G_({subPath:A,subPathTemplate:g});L.slug=I,L.locales=Object.fromEntries(_.filter(N=>N in r).map(N=>[N,{slug:I,path:i,sha:s,content:Fa(r[N])}]))}if(S||C||E){if(!O)return;const I=x&&typeof r[x]=="string"?r[x]:void 0,N=c||G_({subPath:A,subPathTemplate:g}),j={slug:N,path:i,sha:s,content:Fa(r)},H=`${a}/${I??N}`,B=e.find(W=>W.id===H);if(B){B.locales[O]=j,O===b&&(B.sha=s,B.slug=N,B.subPath=A);return}L.id=H,L.locales[O]=j,O===b&&(L.slug=N,L.sha=s)}e.push(L)},hC=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>b8({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Wn(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},_8={service:"",label:"",owner:"",repo:"",branch:""},K_=t=>{const e=[],n=[];t.forEach(i=>{const{path:s}=i,[o]=QT(s),[a]=XT(s,{matchSubFolders:!0});o&&e.push({...i,type:"entry",folder:o}),a&&!e.find(c=>c.path===s)&&n.push({...i,type:"asset",folder:a})});const r=[...e,...n];return{entryFiles:e,assetFiles:n,allFiles:r,count:r.length}},pC=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:s,branch:o}=t,a=new Fo(s,"meta"),c=new Fo(s,"file-cache"),u=await a.get("last_commit_hash"),d=await c.entries();let f=o,h;f||(f=await e(),t.branch=f);const{hash:p,message:g}=await n();if(u&&u===p&&d.length?h=K_(d.map(([A,O])=>({path:A,...O}))):(h=K_(await r(p)),a.set("last_commit_hash",p)),Zp.set(!g.startsWith("[skip ci]")),!h.count){ri.set([]),tn.set([]),Nc.set(!0);return}const{entryFiles:m,assetFiles:v,allFiles:_}=h,b=Object.fromEntries(d);_.forEach(({sha:A,path:O},L)=>{b[O]?.sha===A&&Object.assign(_[L],b[O])});const y=_.filter(({meta:A})=>!A),x=y.length?await i(y):{},{entries:k,errors:S}=await hC(m.map(A=>{const{text:O,meta:L}=x[A.path]??{};return{...A,text:A.text??O,meta:A.meta??L}}));ri.set(k),F_.set(S),tn.set(nC(v.map(A=>{const{meta:O,text:L,size:I}=x[A.path]??{};return{...A,name:A.path.split("/").pop(),meta:A.meta??O,size:A.size??I,text:A.text??L}}))),Nc.set(!0);const C=_.map(({path:A})=>A),E=Object.keys(b).filter(A=>!C.includes(A));y.length&&await c.saveEntries(Object.entries(x)),E.length&&c.deleteEntries(E)},Gp=async(t,e={},{responseType:n="json"}={})=>{let r;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Jn(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{r=await fetch(t,e)}catch(c){throw new Error("Failed to send the request",{cause:c})}if(n==="raw")return r;let i;try{if(n==="blob")return r.blob();if(n==="text")return r.text();i=await r.json()}catch(c){throw new Error("Failed to parse the response",{cause:c})}const{ok:s,status:o}=r;if(s&&!(t.endsWith("/graphql")&&Jn(i)&&i.errors))return i;if(!Jn(i))throw new Error("Server responded with an error",{cause:{status:o}});let a="";throw typeof i.error=="string"&&(a=i.error),typeof i.message=="string"&&(a=i.message),Array.isArray(i.errors)&&(typeof i.errors[0]=="string"&&(a=i.errors.join(", ")),Jn(i.errors[0])&&typeof i.errors[0].message=="string"&&(a=i.errors.map(c=>c.message).join(", "))),new Error("Server responded with an error",{cause:{status:o,message:a}})},Ed="github",gC="GitHub",y8="https://www.githubstatus.com/",w8="https://www.githubstatus.com/api/v2/status.json",rs=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/blob/${r}`:""}}),x8=async()=>{try{const{status:{indicator:t}}=await Gp(w8);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},Ic=async(t,e={},{token:n=ne(fi).token,responseType:r="json"}={})=>{let{api_root:i}=ne(yt).backend;return i?(i=`${new URL(i).origin}/api`,t!=="/graphql"&&(i=`${i}/v3`)):i="https://api.github.com",e.headers=new Headers(e.headers),e.headers.set("Authorization",`token ${n}`),Gp(`${i}${t}`,e,{responseType:r})},Kp=async(t,e={})=>{const{data:n}=await Ic("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},mC=()=>{const{repo:t,branch:e,api_root:n}=ne(yt).backend,[r,i]=t.split("/"),s=n?new URL(n).origin:"https://github.com";return Object.assign(rs,{service:Ed,label:gC,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${Ed}:${r}/${i}`})},k8=()=>{mC()},S8=async({token:t,auto:e=!1})=>{if(e&&!t)return;const{hostname:n}=window.location,{site_domain:r=n,base_url:i="https://api.netlify.com",auth_endpoint:s="auth"}=ne(yt).backend,o=t||await OS({backendName:Ed,siteDomain:r,authURL:`${Rn(i)}/${Rn(s)}`,scope:"repo,user"}),{id:a,name:c,login:u,email:d,avatar_url:f,html_url:h}=await Ic("/user",{},{token:o});return{backendName:Ed,token:o,id:a,name:c,login:u,email:d,avatarURL:f,profileURL:h}},E8=async()=>{},T8=async()=>{const{owner:t,repo:e}=rs,n=ne(fi)?.login,{ok:r}=await Ic(`/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(ne(le)("repository_no_access",{values:{repo:e}}))})},C8=async()=>{const{owner:t,repo:e}=rs,n=await Kp(`
423
+ ${i}`.trim()}function gq(t,e){if(Sd(t)!=="object")throw new TypeError("stringify can only be called with an object");let n=e?.maxDepth??1e3;return W_(t,"",n)}const uC=t=>JSON.parse(t),dC=t=>ec(uq(t)),fC=t=>cd.parse(t),mq=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",vq=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=Ri(n),s=r?i?._fileMap[r]:void 0;if(!i)throw new Error("Collection not found");if(r&&!s)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
424
+ `);const{_file:{format:o,fmDelimiters:a}}=s??i,c=o==="frontmatter"?mq(t):o,u=pf[c]?.parser;if(u)return u(t);try{if(/^ya?ml$/.test(c))return fC(t);if(c==="toml")return dC(t);if(c==="json")return uC(t);if(/^(?:yaml|toml|json)-frontmatter$/.test(c)){const[d,f]=(o==="frontmatter"?Ow({format:c,delimiter:a}):a)??["---","---"],h=cn(d),p=cn(f),g=new RegExp(`^${h}\\n(?:(?<head>.*?)\\n)?${p}$(?:\\n(?<body>.+))?`,"ms"),{head:m,body:v}=t.match(g)?.groups??{};if(!m&&!v){if(t)return{body:t};throw new Error("No front matter block found")}if(c==="yaml-frontmatter")return{...fC(m),body:v};if(c==="toml-frontmatter")return{...dC(m),body:v};if(c==="json-frontmatter")return{...uC(m),body:v}}}catch(d){throw new Error(`${e} could not be parsed due to ${d.name}: ${d.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${c}`)},G_=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){const[,n]=t.match(new RegExp(`^${cn(e).replace("\\{\\{slug\\}\\}","(.+)")}$`))??[];if(n)return n}return t},bq=async({file:t,entries:e,errors:n})=>{let r;try{r=await vq(t)}catch(I){console.error(I),n.push(I)}if(!r)return;const{path:i,sha:s,meta:o={},folder:{collectionName:a,fileName:c,filePathMap:u}}=t,d=Ri(a),f=c?d?._fileMap[c]:void 0;if(!d||c&&!f)return;const{fields:h=[],_file:{fullPathRegEx:p,subPath:g,extension:m},_i18n:{i18nEnabled:v,allLocales:_,defaultLocale:b,structure:y,canonicalSlug:{key:x}}}=f??d,k=v&&y==="single_file",S=v&&y==="multiple_files",C=v&&y==="multiple_folders",E=v&&y==="multiple_folders_i18n_root";if(rC(h)){const I=h[0].name;if(k){if(!Jn(r)||!Object.values(r).every(Array.isArray))return;r=Object.fromEntries(Object.entries(r).map(([N,j])=>[N,{[I]:j}]))}else{if(!Array.isArray(r))return;r={[I]:r}}}if(!Jn(r)||/^_index(?:\..+)?\.md$/.test($n(i).basename)&&!(g?.split("/").pop()==="_index"&&m==="md")&&!c)return;let A,O;if(c?S||C||E?[O,A]=Object.entries(u??{}).find(([,I])=>I===i)??[]:A=i:{subPath:A,locale:O}=i.match(p)?.groups??{},!A)return;const L={id:"",sha:s,slug:"",subPath:A,locales:{},...o};if(!v){const I=c||G_({subPath:A,subPathTemplate:g});L.slug=I,L.locales._default={slug:I,path:i,sha:s,content:Fa(r)}}if(k){const I=c||G_({subPath:A,subPathTemplate:g});L.slug=I,L.locales=Object.fromEntries(_.filter(N=>N in r).map(N=>[N,{slug:I,path:i,sha:s,content:Fa(r[N])}]))}if(S||C||E){if(!O)return;const I=x&&typeof r[x]=="string"?r[x]:void 0,N=c||G_({subPath:A,subPathTemplate:g}),j={slug:N,path:i,sha:s,content:Fa(r)},H=`${a}/${I??N}`,B=e.find(W=>W.id===H);if(B){B.locales[O]=j,O===b&&(B.sha=s,B.slug=N,B.subPath=A);return}L.id=H,L.locales[O]=j,O===b&&(L.slug=N,L.sha=s)}e.push(L)},hC=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>bq({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Wn(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},_q={service:"",label:"",owner:"",repo:"",branch:""},K_=t=>{const e=[],n=[];t.forEach(i=>{const{path:s}=i,[o]=QT(s),[a]=XT(s,{matchSubFolders:!0});o&&e.push({...i,type:"entry",folder:o}),a&&!e.find(c=>c.path===s)&&n.push({...i,type:"asset",folder:a})});const r=[...e,...n];return{entryFiles:e,assetFiles:n,allFiles:r,count:r.length}},pC=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:s,branch:o}=t,a=new Fo(s,"meta"),c=new Fo(s,"file-cache"),u=await a.get("last_commit_hash"),d=await c.entries();let f=o,h;f||(f=await e(),t.branch=f);const{hash:p,message:g}=await n();if(u&&u===p&&d.length?h=K_(d.map(([A,O])=>({path:A,...O}))):(h=K_(await r(p)),a.set("last_commit_hash",p)),Zp.set(!g.startsWith("[skip ci]")),!h.count){ri.set([]),tn.set([]),Nc.set(!0);return}const{entryFiles:m,assetFiles:v,allFiles:_}=h,b=Object.fromEntries(d);_.forEach(({sha:A,path:O},L)=>{b[O]?.sha===A&&Object.assign(_[L],b[O])});const y=_.filter(({meta:A})=>!A),x=y.length?await i(y):{},{entries:k,errors:S}=await hC(m.map(A=>{const{text:O,meta:L}=x[A.path]??{};return{...A,text:A.text??O,meta:A.meta??L}}));ri.set(k),F_.set(S),tn.set(nC(v.map(A=>{const{meta:O,text:L,size:I}=x[A.path]??{};return{...A,name:A.path.split("/").pop(),meta:A.meta??O,size:A.size??I,text:A.text??L}}))),Nc.set(!0);const C=_.map(({path:A})=>A),E=Object.keys(b).filter(A=>!C.includes(A));y.length&&await c.saveEntries(Object.entries(x)),E.length&&c.deleteEntries(E)},Gp=async(t,e={},{responseType:n="json"}={})=>{let r;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Jn(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{r=await fetch(t,e)}catch(c){throw new Error("Failed to send the request",{cause:c})}if(n==="raw")return r;let i;try{if(n==="blob")return r.blob();if(n==="text")return r.text();i=await r.json()}catch(c){throw new Error("Failed to parse the response",{cause:c})}const{ok:s,status:o}=r;if(s&&!(t.endsWith("/graphql")&&Jn(i)&&i.errors))return i;if(!Jn(i))throw new Error("Server responded with an error",{cause:{status:o}});let a="";throw typeof i.error=="string"&&(a=i.error),typeof i.message=="string"&&(a=i.message),Array.isArray(i.errors)&&(typeof i.errors[0]=="string"&&(a=i.errors.join(", ")),Jn(i.errors[0])&&typeof i.errors[0].message=="string"&&(a=i.errors.map(c=>c.message).join(", "))),new Error("Server responded with an error",{cause:{status:o,message:a}})},Ed="github",gC="GitHub",yq="https://www.githubstatus.com/",wq="https://www.githubstatus.com/api/v2/status.json",rs=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/blob/${r}`:""}}),xq=async()=>{try{const{status:{indicator:t}}=await Gp(wq);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},Ic=async(t,e={},{token:n=ne(fi).token,responseType:r="json"}={})=>{let{api_root:i}=ne(yt).backend;return i?(i=`${new URL(i).origin}/api`,t!=="/graphql"&&(i=`${i}/v3`)):i="https://api.github.com",e.headers=new Headers(e.headers),e.headers.set("Authorization",`token ${n}`),Gp(`${i}${t}`,e,{responseType:r})},Kp=async(t,e={})=>{const{data:n}=await Ic("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},mC=()=>{const{repo:t,branch:e,api_root:n}=ne(yt).backend,[r,i]=t.split("/"),s=n?new URL(n).origin:"https://github.com";return Object.assign(rs,{service:Ed,label:gC,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${Ed}:${r}/${i}`})},kq=()=>{mC()},Sq=async({token:t,auto:e=!1})=>{if(e&&!t)return;const{hostname:n}=window.location,{site_domain:r=n,base_url:i="https://api.netlify.com",auth_endpoint:s="auth"}=ne(yt).backend,o=t||await OS({backendName:Ed,siteDomain:r,authURL:`${Rn(i)}/${Rn(s)}`,scope:"repo,user"}),{id:a,name:c,login:u,email:d,avatar_url:f,html_url:h}=await Ic("/user",{},{token:o});return{backendName:Ed,token:o,id:a,name:c,login:u,email:d,avatarURL:f,profileURL:h}},Eq=async()=>{},Tq=async()=>{const{owner:t,repo:e}=rs,n=ne(fi)?.login,{ok:r}=await Ic(`/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(ne(le)("repository_no_access",{values:{repo:e}}))})},Cq=async()=>{const{owner:t,repo:e}=rs,n=await Kp(`
425
425
  query {
426
426
  repository(owner: "${t}", name: "${e}") {
427
427
  defaultBranchRef {
@@ -446,7 +446,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
446
446
  }
447
447
  }
448
448
  }
449
- `);if(!r.repository)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});if(!r.repository.ref)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{oid:i,message:s}=r.repository.ref.target.history.nodes[0];return{hash:i,message:s}},A8=async t=>{const{owner:e,repo:n,branch:r}=rs;return(await Ic(`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`)).tree.filter(({type:s})=>s==="blob").map(({path:s,sha:o,size:a})=>({path:s,sha:o,size:a}))},P8=async t=>{const{owner:e,repo:n,branch:r}=rs,i=structuredClone(t),s=[],o=250,a={},c=(d,f)=>{const h=d.map(({type:p,path:g,sha:m},v)=>{const _=[],b=f+v;return p==="entry"&&_.push(`
449
+ `);if(!r.repository)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});if(!r.repository.ref)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{oid:i,message:s}=r.repository.ref.target.history.nodes[0];return{hash:i,message:s}},Aq=async t=>{const{owner:e,repo:n,branch:r}=rs;return(await Ic(`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`)).tree.filter(({type:s})=>s==="blob").map(({path:s,sha:o,size:a})=>({path:s,sha:o,size:a}))},Pq=async t=>{const{owner:e,repo:n,branch:r}=rs,i=structuredClone(t),s=[],o=250,a={},c=(d,f)=>{const h=d.map(({type:p,path:g,sha:m},v)=>{const _=[],b=f+v;return p==="entry"&&_.push(`
450
450
  content_${b}: object(oid: "${m}") {
451
451
  ... on Blob { text }
452
452
  }
@@ -476,7 +476,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
476
476
  ${h}
477
477
  }
478
478
  }
479
- `};Wa.set(0);const u=window.setInterval(()=>{Wa.update((d=0)=>d+1)},i.length/10);for(let d=0;d<i.length;d+=o)s.push(i.slice(d,d+o));return await Promise.all(s.map(async(d,f)=>{await hn(f*500);const h=await Kp(c(d,f*o));Object.assign(a,h.repository)})),window.clearInterval(u),Wa.set(void 0),Object.fromEntries(t.map(({path:d,sha:f,size:h},p)=>{const{author:{name:g,email:m,user:v},committedDate:_}=a[`commit_${p}`].target.history.nodes[0],b={sha:f,size:h,text:a[`content_${p}`]?.text,meta:{commitAuthor:{name:g,email:m,id:v?.id,login:v?.login},commitDate:new Date(_)}};return[d,b]}))},O8={name:Ed,label:gC,repository:rs,statusDashboardURL:y8,checkStatus:x8,getRepositoryInfo:mC,init:k8,signIn:S8,signOut:E8,fetchFiles:async()=>{await T8(),await pC({repository:rs,fetchDefaultBranchName:C8,fetchLastCommit:vC,fetchFileList:A8,fetchFileContents:P8})},fetchBlob:async t=>{const{owner:e,repo:n}=rs,{sha:r,path:i}=t,s=await Ic(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"}},{responseType:"raw"});return s.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await s.text()],{type:Mo.getType(i)??"text/plain"}):s.blob()},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=rs,s=await Promise.all(t.filter(({action:c})=>["create","update","move"].includes(c)).map(async({path:c,data:u,base64:d})=>({path:c,contents:d??await Aw(u??"")}))),o=t.filter(({action:c})=>["move","delete"].includes(c)).map(({previousPath:c,path:u})=>({path:c??u}));return(await Kp(`
479
+ `};Wa.set(0);const u=window.setInterval(()=>{Wa.update((d=0)=>d+1)},i.length/10);for(let d=0;d<i.length;d+=o)s.push(i.slice(d,d+o));return await Promise.all(s.map(async(d,f)=>{await hn(f*500);const h=await Kp(c(d,f*o));Object.assign(a,h.repository)})),window.clearInterval(u),Wa.set(void 0),Object.fromEntries(t.map(({path:d,sha:f,size:h},p)=>{const{author:{name:g,email:m,user:v},committedDate:_}=a[`commit_${p}`].target.history.nodes[0],b={sha:f,size:h,text:a[`content_${p}`]?.text,meta:{commitAuthor:{name:g,email:m,id:v?.id,login:v?.login},commitDate:new Date(_)}};return[d,b]}))},Oq={name:Ed,label:gC,repository:rs,statusDashboardURL:yq,checkStatus:xq,getRepositoryInfo:mC,init:kq,signIn:Sq,signOut:Eq,fetchFiles:async()=>{await Tq(),await pC({repository:rs,fetchDefaultBranchName:Cq,fetchLastCommit:vC,fetchFileList:Aq,fetchFileContents:Pq})},fetchBlob:async t=>{const{owner:e,repo:n}=rs,{sha:r,path:i}=t,s=await Ic(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"}},{responseType:"raw"});return s.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await s.text()],{type:Mo.getType(i)??"text/plain"}):s.blob()},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=rs,s=await Promise.all(t.filter(({action:c})=>["create","update","move"].includes(c)).map(async({path:c,data:u,base64:d})=>({path:c,contents:d??await Aw(u??"")}))),o=t.filter(({action:c})=>["move","delete"].includes(c)).map(({previousPath:c,path:u})=>({path:c??u}));return(await Kp(`
480
480
  mutation ($input: CreateCommitOnBranchInput!) {
481
481
  createCommitOnBranch(input: $input) {
482
482
  commit {
@@ -484,7 +484,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
484
484
  }
485
485
  }
486
486
  }
487
- `,{input:{branch:{repositoryNameWithOwner:`${n}/${r}`,branchName:i},expectedHeadOid:(await vC()).hash,fileChanges:{additions:s,deletions:o},message:{headline:tC(t,e)}}})).createCommitOnBranch.commit.url},triggerDeployment:async()=>{const{owner:t,repo:e}=rs;return Ic(`/repos/${t}/${e}/dispatches`,{method:"POST",body:{event_type:"sveltia-cms-publish"}},{responseType:"raw"})}},Ka="gitlab",bC="GitLab",$8="https://status.gitlab.com/",L8="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Ns=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/-/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/-/blob/${r}`:""}}),N8=async()=>{try{const{result:{status_overall:{status_code:t}}}=await Gp(L8);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},Td=async(t,e={},{token:n=ne(fi)?.token,responseType:r="json"}={})=>{let{api_root:i}=ne(yt).backend;return i?i=`${new URL(i).origin}/api`:i="https://gitlab.com/api",t!=="/graphql"&&(i=`${i}/v4`),e.headers=new Headers(e.headers),e.headers.set("Authorization",`Bearer ${n}`),Gp(`${i}${t}`,e,{responseType:r})},Cd=async(t,e={})=>{const{data:n}=await Td("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},_C=()=>{const{repo:t,branch:e,api_root:n}=ne(yt).backend,{owner:r,repo:i}=t.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},s=n?new URL(n).origin:"https://gitlab.com";return Object.assign(Ns,{service:Ka,label:bC,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${Ka}:${r}/${i}`})},I8=()=>{_C()},R8=async({token:t,auto:e=!1})=>{const{origin:n,hostname:r}=window.location,{site_domain:i=r,base_url:s="https://gitlab.com",auth_endpoint:o="oauth/authorize",auth_type:a,app_id:c=""}=ne(yt).backend,u=`${Rn(s)}/${Rn(o)}`,d="api";let f="";if(t)f=t;else if(a==="pkce"){if(window.opener?.origin===n&&window.name==="auth"){await nz({backendName:Ka,clientId:c,authURL:u.replace("/authorize","/token")});return}if(e)return;f=await ez({backendName:Ka,clientId:c,authURL:u,scope:d})}else{if(e)return;f=await OS({backendName:Ka,siteDomain:i,authURL:u,scope:d})}const{id:h,name:p,username:g,email:m,avatar_url:v,web_url:_}=await Td("/user",{},{token:f});return{backendName:Ka,token:f,id:h,name:p,login:g,email:m,avatarURL:v,profileURL:_}},D8=async()=>{},M8=async()=>{const{owner:t,repo:e}=Ns,n=ne(fi)?.id,{ok:r}=await Td(`/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(ne(le)("repository_no_access",{values:{repo:e}}))})},F8=async()=>{const{owner:t,repo:e}=Ns,n=await Cd(`
487
+ `,{input:{branch:{repositoryNameWithOwner:`${n}/${r}`,branchName:i},expectedHeadOid:(await vC()).hash,fileChanges:{additions:s,deletions:o},message:{headline:tC(t,e)}}})).createCommitOnBranch.commit.url},triggerDeployment:async()=>{const{owner:t,repo:e}=rs;return Ic(`/repos/${t}/${e}/dispatches`,{method:"POST",body:{event_type:"sveltia-cms-publish"}},{responseType:"raw"})}},Ka="gitlab",bC="GitLab",$q="https://status.gitlab.com/",Lq="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Ns=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/-/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/-/blob/${r}`:""}}),Nq=async()=>{try{const{result:{status_overall:{status_code:t}}}=await Gp(Lq);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},Td=async(t,e={},{token:n=ne(fi)?.token,responseType:r="json"}={})=>{let{api_root:i}=ne(yt).backend;return i?i=`${new URL(i).origin}/api`:i="https://gitlab.com/api",t!=="/graphql"&&(i=`${i}/v4`),e.headers=new Headers(e.headers),e.headers.set("Authorization",`Bearer ${n}`),Gp(`${i}${t}`,e,{responseType:r})},Cd=async(t,e={})=>{const{data:n}=await Td("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},_C=()=>{const{repo:t,branch:e,api_root:n}=ne(yt).backend,{owner:r,repo:i}=t.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},s=n?new URL(n).origin:"https://gitlab.com";return Object.assign(Ns,{service:Ka,label:bC,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${Ka}:${r}/${i}`})},Iq=()=>{_C()},Rq=async({token:t,auto:e=!1})=>{const{origin:n,hostname:r}=window.location,{site_domain:i=r,base_url:s="https://gitlab.com",auth_endpoint:o="oauth/authorize",auth_type:a,app_id:c=""}=ne(yt).backend,u=`${Rn(s)}/${Rn(o)}`,d="api";let f="";if(t)f=t;else if(a==="pkce"){if(window.opener?.origin===n&&window.name==="auth"){await n3({backendName:Ka,clientId:c,authURL:u.replace("/authorize","/token")});return}if(e)return;f=await e3({backendName:Ka,clientId:c,authURL:u,scope:d})}else{if(e)return;f=await OS({backendName:Ka,siteDomain:i,authURL:u,scope:d})}const{id:h,name:p,username:g,email:m,avatar_url:v,web_url:_}=await Td("/user",{},{token:f});return{backendName:Ka,token:f,id:h,name:p,login:g,email:m,avatarURL:v,profileURL:_}},Dq=async()=>{},Mq=async()=>{const{owner:t,repo:e}=Ns,n=ne(fi)?.id,{ok:r}=await Td(`/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(ne(le)("repository_no_access",{values:{repo:e}}))})},Fq=async()=>{const{owner:t,repo:e}=Ns,n=await Cd(`
488
488
  query {
489
489
  project(fullPath: "${t}/${e}") {
490
490
  repository {
@@ -492,7 +492,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
492
492
  }
493
493
  }
494
494
  }
495
- `);if(!n.project)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{rootRef:r}=n.project.repository;if(!r)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_empty",{values:{repo:e}}))});return r},z8=async()=>{const{owner:t,repo:e,branch:n}=Ns,r=await Cd(`
495
+ `);if(!n.project)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{rootRef:r}=n.project.repository;if(!r)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_empty",{values:{repo:e}}))});return r},zq=async()=>{const{owner:t,repo:e,branch:n}=Ns,r=await Cd(`
496
496
  query {
497
497
  project(fullPath: "${t}/${e}") {
498
498
  repository {
@@ -505,7 +505,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
505
505
  }
506
506
  }
507
507
  }
508
- `);if(!r.project)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{lastCommit:i}=r.project.repository.tree??{};if(!i)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{sha:s,message:o}=i;return{hash:s,message:o}},j8=async()=>{const{owner:t,repo:e,branch:n}=Ns,r=[];let i="";for(;;){const s=await Cd(`
508
+ `);if(!r.project)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{lastCommit:i}=r.project.repository.tree??{};if(!i)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{sha:s,message:o}=i;return{hash:s,message:o}},jq=async()=>{const{owner:t,repo:e,branch:n}=Ns,r=[];let i="";for(;;){const s=await Cd(`
509
509
  query {
510
510
  project(fullPath: "${t}/${e}") {
511
511
  repository {
@@ -525,7 +525,7 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
525
525
  }
526
526
  }
527
527
  }
528
- `),{nodes:o,pageInfo:{endCursor:a,hasNextPage:c}}=s.project.repository.tree.blobs;if(r.push(...o),i=a,!c)break}return r.filter(({type:s})=>s==="blob").map(({path:s,sha:o})=>({path:s,sha:o}))},U8=async t=>{const{owner:e,repo:n,branch:r}=Ns,i=t.map(({path:c})=>c),s=[];let o=[...i];for(Wa.set(0);;){const c=await Cd(`
528
+ `),{nodes:o,pageInfo:{endCursor:a,hasNextPage:c}}=s.project.repository.tree.blobs;if(r.push(...o),i=a,!c)break}return r.filter(({type:s})=>s==="blob").map(({path:s,sha:o})=>({path:s,sha:o}))},Uq=async t=>{const{owner:e,repo:n,branch:r}=Ns,i=t.map(({path:c})=>c),s=[];let o=[...i];for(Wa.set(0);;){const c=await Cd(`
529
529
  query ($paths: [String!]!) {
530
530
  project(fullPath: "${e}/${n}") {
531
531
  repository {
@@ -558,10 +558,10 @@ ${i}`.trim()}function g8(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
558
558
  }
559
559
  }
560
560
  }
561
- `);if(a.push(...Object.values(c.project.repository).map(({lastCommit:u})=>u)),!o.length)break}return Object.fromEntries(t.map(({path:c,sha:u},d)=>{const{size:f,rawTextBlob:h}=s[d],p=a[d],g={sha:u,size:Number(f),text:h,meta:{}};if(p){const{author:m,authorName:v,authorEmail:_,committedDate:b}=p,{id:y,username:x}=m??{},k=y?.match(/\d+/);g.meta={commitAuthor:{name:v,email:_,id:k?Number(k[0]):void 0,login:x},committedDate:new Date(b)}}return[c,g]}))},B8={name:Ka,label:bC,repository:Ns,statusDashboardURL:$8,checkStatus:N8,getRepositoryInfo:_C,init:I8,signIn:R8,signOut:D8,fetchFiles:async()=>{await M8(),await pC({repository:Ns,fetchDefaultBranchName:F8,fetchLastCommit:z8,fetchFileList:j8,fetchFileContents:U8})},fetchBlob:async t=>{const{owner:e,repo:n,branch:r=""}=Ns,{path:i}=t;return Td(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=Ns;return(await Td(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:tC(t,e),actions:await Promise.all(t.map(async({action:o,path:a,previousPath:c,data:u="",base64:d})=>({action:o,content:d??(typeof u!="string"?await Aw(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url}},yC="local",q8="Local Repository";let Y_;const H8=new Proxy({},{get:(t,e)=>(Y_??_8)[e]}),J_=st(null),Z_="root_dir_handle";let Yp;const V8=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Yp?.get(Z_)??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 Yp?.set(Z_,n))),n},W8=async()=>{await Yp?.delete(Z_)},G8=()=>{const{name:t}=ne(yt).backend;Y_=Jp[t]?.getRepositoryInfo?.();const{databaseName:e}=Y_??{};Yp=e?new Fo(e,"file-system-handles"):null},K8=async({auto:t=!1})=>{const e=await V8({showPicker:!t});if(e)J_.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:yC}},Y8=async()=>{W8()},Ad=async t=>{let e=ne(J_);if(!t)return e;const n=Rn(t).split("/"),r=!0;for(const i of n)e=await(i.includes(".")?e.getFileHandle(i,{create:r}):e.getDirectoryHandle(i,{create:r}));return e},J8=async()=>{const t=ne(J_),e=[],n=tc([...ne(M_).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...ne(di).map(({internalPath:o})=>o)].map(o=>Rn(o??""))),r=o=>new RegExp(`^${cn(o)}\\b`),i=n.map(r),s=async o=>{for await(const[a,c]of o.entries()){if(a.startsWith("."))continue;const u=(await t?.resolve(c))?.join("/")??"",d=i.some(f=>f.test(u));if(c.kind==="file"){if(!d)continue;try{let f=await c.getFile();f=new File([f],f.name,{type:f.type,lastModified:f.lastModified}),e.push({file:f,path:u})}catch(f){console.error(f)}}if(c.kind==="directory"){const f=r(u);if(!d&&!n.some(h=>f.test(h)))continue;await s(c)}}};return await s(t),Promise.all(e.map(async({file:o,path:a})=>({file:o,path:a.normalize(),size:o.size,sha:await(async()=>{try{return await oa(o)}catch(c){console.error(c)}return""})()})))},Jp={github:O8,gitlab:B8,local:{name:yC,label:q8,repository:H8,init:G8,signIn:K8,signOut:Y8,fetchFiles:async()=>{const{entryFiles:t,assetFiles:e}=K_(await J8());await Promise.all(t.map(async i=>{try{i.text=await DP(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await hC(t);ri.set(n),F_.set(r),tn.set(nC(e)),Nc.set(!0)},commitChanges:async t=>Promise.all(t.map(async({action:e,path:n,previousPath:r,data:i})=>{try{let s;if(e==="move"&&r){const{dirname:o,basename:a}=$n(n);s=await Ad(r),o&&o!==$n(r).dirname?await s.move(await Ad(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await Ad(n);const o=await s.createWritable();try{await o.write(i)}catch{}finally{await o.close()}return s.getFile()}if(e==="delete"){const{dirname:o="",basename:a}=$n(Rn(n));let c=await Ad(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const h of c.keys())d.push(h);if(d.length>1||!u.length)break;const f=u.pop();c=await Ad(u.join("/")),c.removeEntry(f)}}}catch(s){console.error(s)}return null}))}},Is=st(),Nn=Qn([Is],([t],e,n)=>{n(r=>{const i=t?Jp[t]:void 0;return i&&i!==r&&i.init(),i})}),Zp=st(!0),Pd=st({message:"",canRetry:!1}),Ya=st(!0),X_=t=>{let e=t.cause?.message||ne(le)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=ne(le)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=ne(le)(ne(Is)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),Pd.set({message:e,canRetry:n}),console.error(t.message,t.cause)},Z8=async()=>{const t=await Qr.get("sveltia-cms.user")||await Qr.get("decap-cms-user")||await Qr.get("netlify-cms-user");let e=Jn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??ne(yt)?.backend?.name;Is.set(n);const r=ne(Nn);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if(Ya.set(!e),!(!e||!r)){fi.set(e);try{await r.fetchFiles(),Pd.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?Ya.set(!0):X_(i)}}},wC=async t=>{Is.set(t);const e=ne(Nn);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){Ya.set(!0),X_(r);return}if(Ya.set(!n),!!n){fi.set(n);try{await e.fetchFiles(),Pd.set({message:"",canRetry:!1})}catch(r){X_(r)}}},X8=async()=>{await ne(Nn)?.signOut(),await Qr.delete("sveltia-cms.user"),Is.set(void 0),fi.set(void 0),Ya.set(!0),Nc.set(!1)};var Q8=F('<div role="alert" class="message"> </div>'),eq=F('<div role="alert"> </div>'),tq=F('<div role="alert"><!></div>'),nq=F('<div role="none"><!></div>'),rq=F("<!> <!>",1),iq=F("<!> <!>",1),sq=F('<div role="alert"> </div>'),oq=F('<div role="none" class="buttons svelte-8a6wia"><!> <!></div>');const aq={hash:"svelte-8a6wia",code:".buttons.svelte-8a6wia {display:flex;flex-direction:column;align-items:center;gap:16px;}.buttons.svelte-8a6wia button {width:240px;}"};function lq(t,e){se(e,!0),Ee(t,aq);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Ya,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(Pd,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const f=w(()=>i()?.backend?.name),h=w(()=>l(f)?Jp[l(f)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);ln(()=>{const{hostname:x}=window.location;$(c,ie(x==="127.0.0.1"||x==="localhost"||x.endsWith(".localhost"))),$(u,"showDirectoryPicker"in window),$(d,ie(navigator.userAgentData?.brands.some(({brand:k})=>k==="Brave")??!1)),Z8()});var g=oq(),m=R(g);{var v=x=>{var k=Q8(),S=R(k);q(C=>Z(S,C),[()=>o()("signing_in")]),T(x,k)},_=x=>{var k=V(),S=M(k);{var C=A=>{var O=eq(),L=R(O);q(I=>Z(L,I),[()=>o()("config.error.unsupported_backend",{values:{name:l(f)}})]),T(A,O)},E=A=>{var O=iq(),L=M(O);const I=w(()=>o()("sign_in_with_x",{values:{service:l(h).label}}));Je(L,{variant:"primary",get label(){return l(I)},onclick:async()=>{await wC(l(f))}});var N=D(L,2);{var j=H=>{var B=rq(),W=M(B);const G=w(()=>o()("work_with_local_repo")),K=w(()=>!l(u));Je(W,{variant:"primary",get label(){return l(G)},get disabled(){return l(K)},onclick:async()=>{await wC("local")}});var ee=D(W,2);{var J=te=>{var ce=tq(),he=R(ce);{var re=fe=>{var be=V(),ue=M(be);pr(ue,()=>li.sanitize(o()("local_backend.disabled").replace("<a>",'<a href="https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave" target="_blank">'),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]})),T(fe,be)},X=fe=>{var be=Be();q(ue=>Z(be,ue),[()=>o()("local_backend.unsupported_browser")]),T(fe,be)};U(he,fe=>{l(d)?fe(re):fe(X,!1)})}T(te,ce)},Y=te=>{var ce=V(),he=M(ce);{var re=X=>{var fe=nq(),be=R(fe);{var ue=_e=>{var Ae=Be();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(_e,Ae)},Te=_e=>{var Ae=Be();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description_no_repo")]),T(_e,Ae)};U(be,_e=>{l(p)?_e(ue):_e(Te,!1)})}T(X,fe)};U(he,X=>{a().message||X(re)},!0)}T(te,ce)};U(ee,te=>{l(u)?te(Y,!1):te(J)})}T(H,B)};U(N,H=>{l(c)&&H(j)})}T(A,O)};U(S,A=>{l(h)?A(E,!1):A(C)},!0)}T(x,k)};U(m,x=>{s()?x(_,!1):x(v)})}var b=D(m,2);{var y=x=>{var k=sq(),S=R(k);q(()=>Z(S,a().message)),T(x,k)};U(b,x=>{a().message&&a().canRetry&&x(y)})}T(t,g),oe(),r()}const nt=st(),is=st(!0),xC=Qn([nt],([t])=>{if(!t)return!1;const{originalLocales:e,currentLocales:n,originalSlugs:r,currentSlugs:i,originalValues:s,currentValues:o}=t;return!Mn(e,n)||!Mn(r,i)||!Mn(s,o)});nt.subscribe(t=>{ne(Tt).devModeEnabled&&console.info("entryDraft",t)});const Ja=st(!1),Q_=st(!1),Od=st({show:!1,multiple:!1}),ey=st({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),Za=st(null),Yo=st(null),Di=st(),Rc=st(),ho=t=>{nt.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},kC=({collectionName:t,fileName:e,valueMap:n,keyPath:r})=>{const i=new Set;return r.split(".").forEach((s,o,a)=>{const c=a.slice(0,o+1).join("."),u=vn({collectionName:t,fileName:e,valueMap:n,keyPath:c}),d=/\.\d+$/.test(c);if(u?.widget==="object")d&&i.add(c),i.add(`${c}#`);else if(u?.widget==="list")i.add(d?c:`${c}#`);else if(o>0){const f=a.slice(0,o).join("."),h=vn({collectionName:t,fileName:e,valueMap:n,keyPath:f});h?.widget==="object"&&h.fields&&i.add(`${f}.${h.name}#`),h?.widget==="list"&&h.field&&i.add(c)}}),[...i]},cq=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(ne(nt)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||kC({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),ho(r)},uq=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)??{}};Di.set(i),Rc.set(i.selectAssetsView),Di.subscribe(s=>{(async()=>{try{Mn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),Rc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=ne(Di)?.selectAssetsView??{};Mn(s,o)||Di.update(a=>({...a,selectAssetsView:s}))})};Nn.subscribe(t=>{t&&!ne(Di)&&uq(t)});const SC=Qn([Ja,Go],([t,e])=>t||e),ty=st(""),Rs=st(""),$d=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},zn=(t,{state:e={},replaceState:n=!1,notifyChange:r=!0}={})=>{const i=window.location.hash,s=`#${t}`,o=[{...e,from:i},"",s];n?window.history.replaceState(...o):window.history.pushState(...o),r&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:s}))},Dc=(t,e={})=>{window.history.state?.from?window.history.back():zn(t,e)},EC=()=>{const{display_url:t,_siteURL:e}=ne(yt);window.open(t||e||"/","_blank")};var dq=F('<img alt="" class="logo svelte-4zxkou">'),fq=F('<div role="alert" class="message"> </div>'),hq=F('<div role="alert" class="message"> </div>'),pq=F('<div role="alert" class="message"> </div>'),gq=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),mq=F('<div role="alert" class="message"> </div>'),vq=F('<div role="alert" class="message"> </div> <!>',1),bq=F('<div role="none" class="container svelte-4zxkou"><div role="none" class="inner svelte-4zxkou"><!> <h1 class="svelte-4zxkou">Sveltia CMS</h1> <!></div></div>');const _q={hash:"svelte-4zxkou",code:".container.svelte-4zxkou {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-4zxkou {filter:opacity(0);}.container.svelte-4zxkou .inner:where(.svelte-4zxkou) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) {max-width:160px;height:auto;}.container.svelte-4zxkou h1:where(.svelte-4zxkou) {font-size:48px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) ~ h1:where(.svelte-4zxkou) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-4zxkou .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-4zxkou .error:where(.svelte-4zxkou) {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;text-align:center;}"};function yq(t,e){se(e,!0),Ee(t,_q);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(fi,"$user",n),o=()=>z(Nc,"$dataLoaded",n),a=()=>z(yt,"$siteConfig",n),c=()=>z(j_,"$siteConfigError",n),u=()=>z(Mb,"$prefsError",n),d=()=>z(Tt,"$prefs",n),f=()=>z(Pd,"$signInError",n),h=()=>z(AS,"$inAuthPopup",n),p=()=>z(Ya,"$unauthenticated",n),g=()=>z(Wa,"$dataLoadedProgress",n);Ue(()=>{ot(Rs,i()("welcome_to_sveltia_cms"))});var m=bq(),v=R(m),_=R(v);{var b=S=>{var C=dq();const E=w(()=>a()?.logo_url);q(A=>ke(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(aS)}`]),T(S,C)};U(_,S=>{(a()||c())&&S(b)})}var y=D(_,4);{var x=S=>{var C=fq(),E=R(C);q(A=>Z(E,`${c().message??""}
562
- ${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=L=>{var I=hq(),N=R(I);q(j=>Z(N,j),[()=>i()(`prefs.error.${u().type}`)]),T(L,I)},O=L=>{var I=V(),N=M(I);{var j=B=>{var W=pq(),G=R(W);q(K=>Z(G,K),[()=>i()("loading_site_config")]),T(B,W)},H=B=>{var W=V(),G=M(W);{var K=J=>{var Y=gq(),te=R(Y),ce=R(te),he=D(te,2),re=R(he);pr(re,()=>li.sanitize(Ot.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(X=>Z(ce,X),[()=>i()("loading_site_data_error")]),T(J,Y)},ee=J=>{var Y=V(),te=M(Y);{var ce=re=>{var X=mq(),fe=R(X);q(be=>Z(fe,be),[()=>i()("authorizing")]),T(re,X)},he=re=>{var X=V(),fe=M(X);{var be=Te=>{lq(Te,{})},ue=Te=>{var _e=V(),Ae=M(_e);{var Ce=$e=>{var Ve=vq(),We=M(Ve),pt=R(We),Ke=D(We,2);{var ge=ye=>{YL(ye,{get now(){return g()}})};U(Ke,ye=>{g()!==void 0&&ye(ge)})}q(ye=>Z(pt,ye),[()=>i()("loading_site_data")]),T($e,Ve)};U(Ae,$e=>{o()||$e(Ce)},!0)}T(Te,_e)};U(fe,Te=>{!s()||p()?Te(be):Te(ue,!1)},!0)}T(re,X)};U(te,re=>{h()?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{f().message&&!f().canRetry?J(K):J(ee,!1)},!0)}T(B,W)};U(N,B=>{!a()||!d()?B(j):B(H,!1)},!0)}T(L,I)};U(E,L=>{u()?L(A):L(O,!1)},!0)}T(S,C)};U(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var wq=F(" <!>",1),xq=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function kq(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Nn,"$backend",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&$(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),$(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};ln(()=>($(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),v=M(m);{var _=b=>{var y=xq(),x=M(y);const k=w(()=>l(d)==="major"?"error":"warning");ff(x,()=>({"--sui-infobar-message-justify-content":"center"})),tm(x.lastChild,{get status(){return l(k)},children:(S,C)=>{var E=wq(),A=M(E),O=D(A);const L=w(()=>o()("details"));Je(O,{variant:"link",get label(){return l(L)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(I=>Z(A,`${I??""} `),[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(S,E)},$$slots:{default:!0}}),T(b,y)};U(v,b=>{["minor","major"].includes(l(d))&&b(_)})}T(t,m),oe(),r()}const ny="0.60.0";var Sq=F(" <!>",1),Eq=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function Tq(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!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!==ny&&(c=window.setTimeout(()=>{$(u,!0)},o))}catch{}};ln(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=V(),h=M(f);{var p=g=>{var m=Eq(),v=M(m);ff(v,()=>({"--sui-infobar-message-justify-content":"center"})),tm(v.lastChild,{children:(_,b)=>{var y=Sq(),x=M(y),k=D(x);const S=w(()=>i()("update_now"));Je(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.location.reload()}}),q(C=>Z(x,`${C??""} `),[()=>i()("update_available")]),T(_,y)},$$slots:{default:!0}}),T(g,m)};U(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var Cq=F('<div role="none" class="empty svelte-17yv21"><!></div>');const Aq={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function $r(t,e){Ee(t,Aq);let n=P(e,"children",3,void 0);var r=Cq(),i=R(r);Re(i,()=>n()??Me),T(t,r)}var Pq=F("<img>"),Oq=F("<video></video>",2),$q=F("<audio></audio>"),Lq=F('<video playsinline="" class="svelte-1va4mre"></video>',2),Nq=F('<img alt="" class="svelte-1va4mre">'),Iq=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),Rq=F('<div role="none"><!> <!></div>');const Dq={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {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-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ds(t,e){se(e,!0),Ee(t,Dq);let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",15,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"dissolve",3,!0),d=P(e,"alt",3,""),f=P(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const v=w(()=>!!r()&&!!s()),_=w(()=>l(v)||e.kind==="image"||r()?.name.endsWith(".pdf"));let b=!1;const y=async()=>{if(!(!r()||!l(p)||b)){b=!0,$(g,!1),n()==="lazy"&&await su(l(p));try{i(l(v)?await ZT(r()):await L_(r()))}catch{$(g,!0)}b=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise(L=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{L(void 0)},{once:!0})}),u()&&await su(l(p)),$(m,!0),r()&&l(v)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Ue(()=>{l(p),r(),y()}),Ue(()=>{l(p),i(),x()});var k=Rq(),S=R(k);{var C=L=>{et(L,{name:"draft"})},E=L=>{var I=V(),N=M(I);{var j=B=>{var W=Pq();let G;Pt(W,K=>$(p,K),()=>l(p)),q(()=>G=xt(W,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var K=J=>{var Y=Oq();let te;Pt(Y,ce=>$(p,ce),()=>l(p)),q(()=>te=xt(Y,te,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(J,Y)},ee=J=>{var Y=V(),te=M(Y);{var ce=re=>{var X=V(),fe=M(X);{var be=Te=>{var _e=$q();let Ae;Pt(_e,Ce=>$(p,Ce),()=>l(p)),q(()=>Ae=xt(_e,Ae,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(Te,_e)},ue=Te=>{et(Te,{name:"audio_file"})};U(fe,Te=>{f()?Te(be):Te(ue,!1)})}T(re,X)},he=re=>{et(re,{name:"draft"})};U(te,re=>{e.kind==="audio"?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{e.kind==="video"?J(K):J(ee,!1)},!0)}T(B,W)};U(N,B=>{l(_)?B(j):B(H,!1)},!0)}T(L,I)};U(S,L=>{l(g)?L(C):L(E,!1)})}var A=D(S,2);{var O=L=>{var I=Iq(),N=D(R(I),2);{var j=B=>{var W=Lq();q(()=>ke(W,"src",i())),T(B,W)},H=B=>{var W=Nq();q(()=>{ke(W,"loading",n()),ke(W,"src",i())}),T(B,W)};U(N,B=>{e.kind==="video"?B(j):B(H,!1)})}T(L,I)};U(A,L=>{o()&&L(O)})}q(()=>{Mr(k,`preview ${s()??""} svelte-1va4mre`),ht(k,"cover",a()),ht(k,"checkerboard",c()),ht(k,"dissolve",u()),ht(k,"loaded",l(m))}),T(t,k),oe()}const Mq=/^(?:\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)?$/,ry={year:"numeric",month:"short",day:"numeric"},iy={hour:"numeric",minute:"numeric",hour12:!0},TC=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=zq(),o=R(s);Je(o,{role:"link",variant:"link",onclick:()=>zn(n()),children:(a,c)=>{var u=Fq(),d=R(u);q(()=>Z(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var Fq=F('<span role="none"> </span>'),zq=F("<p><!></p>"),jq=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),Uq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),Bq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),qq=F('<a target="_blank"> </a>'),Hq=F("<a> </a>"),Vq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),Wq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),Gq=F("<p> </p>"),Kq=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const Yq={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {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-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function CC(t,e){se(e,!0),Ee(t,Yq);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Ln,"$appLocale",n);let o=P(e,"showPreview",3,!1),a=ae(ie({...Hp}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),v=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),b=w(()=>$n(l(c))),y=w(()=>it(l(b).extension,"")),x=w(()=>Up(l(d))||l(c).endsWith(".pdf")),k=async()=>{$(a,ie(e.asset?await Vp(e.asset):{...Hp}))};Ue(()=>{e.asset,k()});var S=Kq(),C=R(S);{var E=ve=>{var Pe=jq(),qe=R(Pe);const Xe=w(()=>l(d)==="image"),ct=w(()=>["audio","video"].includes(l(d)));Ds(qe,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Xe)},get controls(){return l(ct)}}),T(ve,Pe)};U(C,ve=>{o()&&l(x)&&ve(E)})}var A=D(C,2),O=R(A),L=R(O),I=D(O,2),N=R(I),j=D(A,2),H=R(j),B=R(H),W=D(H,2),G=R(W),K=D(j,2);{var ee=ve=>{var Pe=Uq(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q(rt=>{Z(Xe,rt),Z(Ye,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(ve,Pe)};U(K,ve=>{l(x)&&ve(ee)})}var J=D(K,2);{var Y=ve=>{var Pe=Bq(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q((rt,ft)=>{Z(Xe,rt),Z(Ye,ft)},[()=>i()("duration"),()=>l(v)?MB(l(v)):"–"]),T(ve,Pe)};U(J,ve=>{["audio","video"].includes(l(d))&&ve(Y)})}var te=D(J,2),ce=R(te),he=R(ce),re=D(ce,2),X=R(re);{var fe=ve=>{var Pe=qq(),qe=R(Pe);q(()=>{ke(Pe,"href",l(p)),Z(qe,l(p))}),T(ve,Pe)},be=ve=>{var Pe=Be("–");T(ve,Pe)};U(X,ve=>{l(p)?ve(fe):ve(be,!1)})}var ue=D(te,2),Te=R(ue),_e=R(Te),Ae=D(Te,2),Ce=R(Ae);{var $e=ve=>{var Pe=Hq(),qe=R(Pe);q(()=>{ke(Pe,"href",l(g)),Z(qe,`/${l(c)??""}`)}),T(ve,Pe)},Ve=ve=>{var Pe=Be();q(()=>Z(Pe,`/${l(c)??""}`)),T(ve,Pe)};U(Ce,ve=>{l(g)?ve($e):ve(Ve,!1)})}var We=D(ue,2);{var pt=ve=>{var Pe=Vq(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q(rt=>{Z(Xe,rt),Z(Ye,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(ve,Pe)};U(We,ve=>{l(f)&&ve(pt)})}var Ke=D(We,2);{var ge=ve=>{var Pe=Wq(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q((rt,ft)=>{Z(Xe,rt),Z(Ye,ft)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...ry,...iy})]),T(ve,Pe)};U(Ke,ve=>{l(h)&&ve(ge)})}var ye=D(Ke,2),we=R(ye),Se=R(we),Ie=D(we,2);dt(Ie,17,()=>l(_),ve=>ve.sha,(ve,Pe)=>{var qe=V(),Xe=M(qe);dt(Xe,17,()=>co(l(Pe)),ct=>ct.name,(ct,Ye)=>{var rt=V();const ft=w(()=>l(Ye).label||l(Ye).name);var ut=M(rt);dt(ut,17,()=>Wo(l(Ye),l(Pe)),bt=>bt.name,(bt,At)=>{TC(bt,()=>({link:`/collections/${l(Ye).name}/entries/${l(At).name}`,collectionLabel:l(ft),entryLabel:l(At).label||l(At).name}))},bt=>{var At=Ge(()=>({link:`/collections/${l(Ye).name}/entries/${l(Pe).subPath}`,collectionLabel:l(ft),entryLabel:Vo(l(Ye),l(Pe),{useTemplate:!0})}));TC(bt,()=>l(At))}),T(ct,rt)}),T(ve,qe)},ve=>{var Pe=Gq(),qe=R(Pe);q(Xe=>Z(qe,Xe),[()=>i()("sort_keys.none")]),T(ve,Pe)}),q((ve,Pe,qe,Xe,ct,Ye,rt)=>{Z(L,ve),Z(N,Pe),Z(B,qe),Z(G,Xe),Z(he,ct),Z(_e,Ye),Z(Se,rt)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Mo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?k_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var Jq=F("<!> <!> <!>",1),Zq=F("<!> <!>",1);function AC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await Va(s()[0]);return f=S,Qc(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
561
+ `);if(a.push(...Object.values(c.project.repository).map(({lastCommit:u})=>u)),!o.length)break}return Object.fromEntries(t.map(({path:c,sha:u},d)=>{const{size:f,rawTextBlob:h}=s[d],p=a[d],g={sha:u,size:Number(f),text:h,meta:{}};if(p){const{author:m,authorName:v,authorEmail:_,committedDate:b}=p,{id:y,username:x}=m??{},k=y?.match(/\d+/);g.meta={commitAuthor:{name:v,email:_,id:k?Number(k[0]):void 0,login:x},committedDate:new Date(b)}}return[c,g]}))},Bq={name:Ka,label:bC,repository:Ns,statusDashboardURL:$q,checkStatus:Nq,getRepositoryInfo:_C,init:Iq,signIn:Rq,signOut:Dq,fetchFiles:async()=>{await Mq(),await pC({repository:Ns,fetchDefaultBranchName:Fq,fetchLastCommit:zq,fetchFileList:jq,fetchFileContents:Uq})},fetchBlob:async t=>{const{owner:e,repo:n,branch:r=""}=Ns,{path:i}=t;return Td(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=Ns;return(await Td(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:tC(t,e),actions:await Promise.all(t.map(async({action:o,path:a,previousPath:c,data:u="",base64:d})=>({action:o,content:d??(typeof u!="string"?await Aw(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url}},yC="local",qq="Local Repository";let Y_;const Hq=new Proxy({},{get:(t,e)=>(Y_??_q)[e]}),J_=st(null),Z_="root_dir_handle";let Yp;const Vq=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Yp?.get(Z_)??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 Yp?.set(Z_,n))),n},Wq=async()=>{await Yp?.delete(Z_)},Gq=()=>{const{name:t}=ne(yt).backend;Y_=Jp[t]?.getRepositoryInfo?.();const{databaseName:e}=Y_??{};Yp=e?new Fo(e,"file-system-handles"):null},Kq=async({auto:t=!1})=>{const e=await Vq({showPicker:!t});if(e)J_.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:yC}},Yq=async()=>{Wq()},Ad=async t=>{let e=ne(J_);if(!t)return e;const n=Rn(t).split("/"),r=!0;for(const i of n)e=await(i.includes(".")?e.getFileHandle(i,{create:r}):e.getDirectoryHandle(i,{create:r}));return e},Jq=async()=>{const t=ne(J_),e=[],n=tc([...ne(M_).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...ne(di).map(({internalPath:o})=>o)].map(o=>Rn(o??""))),r=o=>new RegExp(`^${cn(o)}\\b`),i=n.map(r),s=async o=>{for await(const[a,c]of o.entries()){if(a.startsWith("."))continue;const u=(await t?.resolve(c))?.join("/")??"",d=i.some(f=>f.test(u));if(c.kind==="file"){if(!d)continue;try{let f=await c.getFile();f=new File([f],f.name,{type:f.type,lastModified:f.lastModified}),e.push({file:f,path:u})}catch(f){console.error(f)}}if(c.kind==="directory"){const f=r(u);if(!d&&!n.some(h=>f.test(h)))continue;await s(c)}}};return await s(t),Promise.all(e.map(async({file:o,path:a})=>({file:o,path:a.normalize(),size:o.size,sha:await(async()=>{try{return await oa(o)}catch(c){console.error(c)}return""})()})))},Jp={github:Oq,gitlab:Bq,local:{name:yC,label:qq,repository:Hq,init:Gq,signIn:Kq,signOut:Yq,fetchFiles:async()=>{const{entryFiles:t,assetFiles:e}=K_(await Jq());await Promise.all(t.map(async i=>{try{i.text=await DP(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await hC(t);ri.set(n),F_.set(r),tn.set(nC(e)),Nc.set(!0)},commitChanges:async t=>Promise.all(t.map(async({action:e,path:n,previousPath:r,data:i})=>{try{let s;if(e==="move"&&r){const{dirname:o,basename:a}=$n(n);s=await Ad(r),o&&o!==$n(r).dirname?await s.move(await Ad(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await Ad(n);const o=await s.createWritable();try{await o.write(i)}catch{}finally{await o.close()}return s.getFile()}if(e==="delete"){const{dirname:o="",basename:a}=$n(Rn(n));let c=await Ad(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const h of c.keys())d.push(h);if(d.length>1||!u.length)break;const f=u.pop();c=await Ad(u.join("/")),c.removeEntry(f)}}}catch(s){console.error(s)}return null}))}},Is=st(),Nn=Qn([Is],([t],e,n)=>{n(r=>{const i=t?Jp[t]:void 0;return i&&i!==r&&i.init(),i})}),Zp=st(!0),Pd=st({message:"",canRetry:!1}),Ya=st(!0),X_=t=>{let e=t.cause?.message||ne(le)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=ne(le)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=ne(le)(ne(Is)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),Pd.set({message:e,canRetry:n}),console.error(t.message,t.cause)},Zq=async()=>{const t=await Qr.get("sveltia-cms.user")||await Qr.get("decap-cms-user")||await Qr.get("netlify-cms-user");let e=Jn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??ne(yt)?.backend?.name;Is.set(n);const r=ne(Nn);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if(Ya.set(!e),!(!e||!r)){fi.set(e);try{await r.fetchFiles(),Pd.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?Ya.set(!0):X_(i)}}},wC=async t=>{Is.set(t);const e=ne(Nn);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){Ya.set(!0),X_(r);return}if(Ya.set(!n),!!n){fi.set(n);try{await e.fetchFiles(),Pd.set({message:"",canRetry:!1})}catch(r){X_(r)}}},Xq=async()=>{await ne(Nn)?.signOut(),await Qr.delete("sveltia-cms.user"),Is.set(void 0),fi.set(void 0),Ya.set(!0),Nc.set(!1)};var Qq=F('<div role="alert" class="message"> </div>'),e5=F('<div role="alert"> </div>'),t5=F('<div role="alert"><!></div>'),n5=F('<div role="none"><!></div>'),r5=F("<!> <!>",1),i5=F("<!> <!>",1),s5=F('<div role="alert"> </div>'),o5=F('<div role="none" class="buttons svelte-8a6wia"><!> <!></div>');const a5={hash:"svelte-8a6wia",code:".buttons.svelte-8a6wia {display:flex;flex-direction:column;align-items:center;gap:16px;}.buttons.svelte-8a6wia button {width:240px;}"};function l5(t,e){se(e,!0),Ee(t,a5);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Ya,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(Pd,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const f=w(()=>i()?.backend?.name),h=w(()=>l(f)?Jp[l(f)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);ln(()=>{const{hostname:x}=window.location;$(c,ie(x==="127.0.0.1"||x==="localhost"||x.endsWith(".localhost"))),$(u,"showDirectoryPicker"in window),$(d,ie(navigator.userAgentData?.brands.some(({brand:k})=>k==="Brave")??!1)),Zq()});var g=o5(),m=R(g);{var v=x=>{var k=Qq(),S=R(k);q(C=>Z(S,C),[()=>o()("signing_in")]),T(x,k)},_=x=>{var k=V(),S=M(k);{var C=A=>{var O=e5(),L=R(O);q(I=>Z(L,I),[()=>o()("config.error.unsupported_backend",{values:{name:l(f)}})]),T(A,O)},E=A=>{var O=i5(),L=M(O);const I=w(()=>o()("sign_in_with_x",{values:{service:l(h).label}}));Je(L,{variant:"primary",get label(){return l(I)},onclick:async()=>{await wC(l(f))}});var N=D(L,2);{var j=H=>{var B=r5(),W=M(B);const G=w(()=>o()("work_with_local_repo")),K=w(()=>!l(u));Je(W,{variant:"primary",get label(){return l(G)},get disabled(){return l(K)},onclick:async()=>{await wC("local")}});var ee=D(W,2);{var J=te=>{var ce=t5(),he=R(ce);{var re=fe=>{var be=V(),ue=M(be);pr(ue,()=>li.sanitize(o()("local_backend.disabled").replace("<a>",'<a href="https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave" target="_blank">'),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]})),T(fe,be)},X=fe=>{var be=Be();q(ue=>Z(be,ue),[()=>o()("local_backend.unsupported_browser")]),T(fe,be)};U(he,fe=>{l(d)?fe(re):fe(X,!1)})}T(te,ce)},Y=te=>{var ce=V(),he=M(ce);{var re=X=>{var fe=n5(),be=R(fe);{var ue=_e=>{var Ae=Be();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(_e,Ae)},Te=_e=>{var Ae=Be();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description_no_repo")]),T(_e,Ae)};U(be,_e=>{l(p)?_e(ue):_e(Te,!1)})}T(X,fe)};U(he,X=>{a().message||X(re)},!0)}T(te,ce)};U(ee,te=>{l(u)?te(Y,!1):te(J)})}T(H,B)};U(N,H=>{l(c)&&H(j)})}T(A,O)};U(S,A=>{l(h)?A(E,!1):A(C)},!0)}T(x,k)};U(m,x=>{s()?x(_,!1):x(v)})}var b=D(m,2);{var y=x=>{var k=s5(),S=R(k);q(()=>Z(S,a().message)),T(x,k)};U(b,x=>{a().message&&a().canRetry&&x(y)})}T(t,g),oe(),r()}const nt=st(),is=st(!0),xC=Qn([nt],([t])=>{if(!t)return!1;const{originalLocales:e,currentLocales:n,originalSlugs:r,currentSlugs:i,originalValues:s,currentValues:o}=t;return!Mn(e,n)||!Mn(r,i)||!Mn(s,o)});nt.subscribe(t=>{ne(Tt).devModeEnabled&&console.info("entryDraft",t)});const Ja=st(!1),Q_=st(!1),Od=st({show:!1,multiple:!1}),ey=st({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),Za=st(null),Yo=st(null),Di=st(),Rc=st(),ho=t=>{nt.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},kC=({collectionName:t,fileName:e,valueMap:n,keyPath:r})=>{const i=new Set;return r.split(".").forEach((s,o,a)=>{const c=a.slice(0,o+1).join("."),u=vn({collectionName:t,fileName:e,valueMap:n,keyPath:c}),d=/\.\d+$/.test(c);if(u?.widget==="object")d&&i.add(c),i.add(`${c}#`);else if(u?.widget==="list")i.add(d?c:`${c}#`);else if(o>0){const f=a.slice(0,o).join("."),h=vn({collectionName:t,fileName:e,valueMap:n,keyPath:f});h?.widget==="object"&&h.fields&&i.add(`${f}.${h.name}#`),h?.widget==="list"&&h.field&&i.add(c)}}),[...i]},c5=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(ne(nt)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||kC({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),ho(r)},u5=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)??{}};Di.set(i),Rc.set(i.selectAssetsView),Di.subscribe(s=>{(async()=>{try{Mn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),Rc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=ne(Di)?.selectAssetsView??{};Mn(s,o)||Di.update(a=>({...a,selectAssetsView:s}))})};Nn.subscribe(t=>{t&&!ne(Di)&&u5(t)});const SC=Qn([Ja,Go],([t,e])=>t||e),ty=st(""),Rs=st(""),$d=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},zn=(t,{state:e={},replaceState:n=!1,notifyChange:r=!0}={})=>{const i=window.location.hash,s=`#${t}`,o=[{...e,from:i},"",s];n?window.history.replaceState(...o):window.history.pushState(...o),r&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:s}))},Dc=(t,e={})=>{window.history.state?.from?window.history.back():zn(t,e)},EC=()=>{const{display_url:t,_siteURL:e}=ne(yt);window.open(t||e||"/","_blank")};var d5=F('<img alt="" class="logo svelte-4zxkou">'),f5=F('<div role="alert" class="message"> </div>'),h5=F('<div role="alert" class="message"> </div>'),p5=F('<div role="alert" class="message"> </div>'),g5=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),m5=F('<div role="alert" class="message"> </div>'),v5=F('<div role="alert" class="message"> </div> <!>',1),b5=F('<div role="none" class="container svelte-4zxkou"><div role="none" class="inner svelte-4zxkou"><!> <h1 class="svelte-4zxkou">Sveltia CMS</h1> <!></div></div>');const _5={hash:"svelte-4zxkou",code:".container.svelte-4zxkou {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-4zxkou {filter:opacity(0);}.container.svelte-4zxkou .inner:where(.svelte-4zxkou) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) {max-width:160px;height:auto;}.container.svelte-4zxkou h1:where(.svelte-4zxkou) {font-size:48px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) ~ h1:where(.svelte-4zxkou) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-4zxkou .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-4zxkou .error:where(.svelte-4zxkou) {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;text-align:center;}"};function y5(t,e){se(e,!0),Ee(t,_5);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(fi,"$user",n),o=()=>z(Nc,"$dataLoaded",n),a=()=>z(yt,"$siteConfig",n),c=()=>z(j_,"$siteConfigError",n),u=()=>z(Mb,"$prefsError",n),d=()=>z(Tt,"$prefs",n),f=()=>z(Pd,"$signInError",n),h=()=>z(AS,"$inAuthPopup",n),p=()=>z(Ya,"$unauthenticated",n),g=()=>z(Wa,"$dataLoadedProgress",n);Ue(()=>{ot(Rs,i()("welcome_to_sveltia_cms"))});var m=b5(),v=R(m),_=R(v);{var b=S=>{var C=d5();const E=w(()=>a()?.logo_url);q(A=>ke(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(aS)}`]),T(S,C)};U(_,S=>{(a()||c())&&S(b)})}var y=D(_,4);{var x=S=>{var C=f5(),E=R(C);q(A=>Z(E,`${c().message??""}
562
+ ${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=L=>{var I=h5(),N=R(I);q(j=>Z(N,j),[()=>i()(`prefs.error.${u().type}`)]),T(L,I)},O=L=>{var I=V(),N=M(I);{var j=B=>{var W=p5(),G=R(W);q(K=>Z(G,K),[()=>i()("loading_site_config")]),T(B,W)},H=B=>{var W=V(),G=M(W);{var K=J=>{var Y=g5(),te=R(Y),ce=R(te),he=D(te,2),re=R(he);pr(re,()=>li.sanitize(Ot.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(X=>Z(ce,X),[()=>i()("loading_site_data_error")]),T(J,Y)},ee=J=>{var Y=V(),te=M(Y);{var ce=re=>{var X=m5(),fe=R(X);q(be=>Z(fe,be),[()=>i()("authorizing")]),T(re,X)},he=re=>{var X=V(),fe=M(X);{var be=Te=>{l5(Te,{})},ue=Te=>{var _e=V(),Ae=M(_e);{var Ce=$e=>{var Ve=v5(),We=M(Ve),pt=R(We),Ke=D(We,2);{var ge=ye=>{YL(ye,{get now(){return g()}})};U(Ke,ye=>{g()!==void 0&&ye(ge)})}q(ye=>Z(pt,ye),[()=>i()("loading_site_data")]),T($e,Ve)};U(Ae,$e=>{o()||$e(Ce)},!0)}T(Te,_e)};U(fe,Te=>{!s()||p()?Te(be):Te(ue,!1)},!0)}T(re,X)};U(te,re=>{h()?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{f().message&&!f().canRetry?J(K):J(ee,!1)},!0)}T(B,W)};U(N,B=>{!a()||!d()?B(j):B(H,!1)},!0)}T(L,I)};U(E,L=>{u()?L(A):L(O,!1)},!0)}T(S,C)};U(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var w5=F(" <!>",1),x5=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function k5(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Nn,"$backend",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&$(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),$(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};ln(()=>($(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),v=M(m);{var _=b=>{var y=x5(),x=M(y);const k=w(()=>l(d)==="major"?"error":"warning");ff(x,()=>({"--sui-infobar-message-justify-content":"center"})),tm(x.lastChild,{get status(){return l(k)},children:(S,C)=>{var E=w5(),A=M(E),O=D(A);const L=w(()=>o()("details"));Je(O,{variant:"link",get label(){return l(L)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(I=>Z(A,`${I??""} `),[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(S,E)},$$slots:{default:!0}}),T(b,y)};U(v,b=>{["minor","major"].includes(l(d))&&b(_)})}T(t,m),oe(),r()}const ny="0.60.2";var S5=F(" <!>",1),E5=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function T5(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!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!==ny&&(c=window.setTimeout(()=>{$(u,!0)},o))}catch{}};ln(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=V(),h=M(f);{var p=g=>{var m=E5(),v=M(m);ff(v,()=>({"--sui-infobar-message-justify-content":"center"})),tm(v.lastChild,{children:(_,b)=>{var y=S5(),x=M(y),k=D(x);const S=w(()=>i()("update_now"));Je(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.location.reload()}}),q(C=>Z(x,`${C??""} `),[()=>i()("update_available")]),T(_,y)},$$slots:{default:!0}}),T(g,m)};U(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var C5=F('<div role="none" class="empty svelte-17yv21"><!></div>');const A5={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function $r(t,e){Ee(t,A5);let n=P(e,"children",3,void 0);var r=C5(),i=R(r);Re(i,()=>n()??Me),T(t,r)}var P5=F("<img>"),O5=F("<video></video>",2),$5=F("<audio></audio>"),L5=F('<video playsinline="" class="svelte-1va4mre"></video>',2),N5=F('<img alt="" class="svelte-1va4mre">'),I5=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),R5=F('<div role="none"><!> <!></div>');const D5={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {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-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ds(t,e){se(e,!0),Ee(t,D5);let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",15,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"dissolve",3,!0),d=P(e,"alt",3,""),f=P(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const v=w(()=>!!r()&&!!s()),_=w(()=>l(v)||e.kind==="image"||r()?.name.endsWith(".pdf"));let b=!1;const y=async()=>{if(!(!r()||!l(p)||b)){b=!0,$(g,!1),n()==="lazy"&&await su(l(p));try{i(l(v)?await ZT(r()):await L_(r()))}catch{$(g,!0)}b=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise(L=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{L(void 0)},{once:!0})}),u()&&await su(l(p)),$(m,!0),r()&&l(v)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Ue(()=>{l(p),r(),y()}),Ue(()=>{l(p),i(),x()});var k=R5(),S=R(k);{var C=L=>{et(L,{name:"draft"})},E=L=>{var I=V(),N=M(I);{var j=B=>{var W=P5();let G;Pt(W,K=>$(p,K),()=>l(p)),q(()=>G=xt(W,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var K=J=>{var Y=O5();let te;Pt(Y,ce=>$(p,ce),()=>l(p)),q(()=>te=xt(Y,te,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(J,Y)},ee=J=>{var Y=V(),te=M(Y);{var ce=re=>{var X=V(),fe=M(X);{var be=Te=>{var _e=$5();let Ae;Pt(_e,Ce=>$(p,Ce),()=>l(p)),q(()=>Ae=xt(_e,Ae,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(Te,_e)},ue=Te=>{et(Te,{name:"audio_file"})};U(fe,Te=>{f()?Te(be):Te(ue,!1)})}T(re,X)},he=re=>{et(re,{name:"draft"})};U(te,re=>{e.kind==="audio"?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{e.kind==="video"?J(K):J(ee,!1)},!0)}T(B,W)};U(N,B=>{l(_)?B(j):B(H,!1)},!0)}T(L,I)};U(S,L=>{l(g)?L(C):L(E,!1)})}var A=D(S,2);{var O=L=>{var I=I5(),N=D(R(I),2);{var j=B=>{var W=L5();q(()=>ke(W,"src",i())),T(B,W)},H=B=>{var W=N5();q(()=>{ke(W,"loading",n()),ke(W,"src",i())}),T(B,W)};U(N,B=>{e.kind==="video"?B(j):B(H,!1)})}T(L,I)};U(A,L=>{o()&&L(O)})}q(()=>{Mr(k,`preview ${s()??""} svelte-1va4mre`),ht(k,"cover",a()),ht(k,"checkerboard",c()),ht(k,"dissolve",u()),ht(k,"loaded",l(m))}),T(t,k),oe()}const M5=/^(?:\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)?$/,ry={year:"numeric",month:"short",day:"numeric"},iy={hour:"numeric",minute:"numeric",hour12:!0},TC=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=z5(),o=R(s);Je(o,{role:"link",variant:"link",onclick:()=>zn(n()),children:(a,c)=>{var u=F5(),d=R(u);q(()=>Z(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var F5=F('<span role="none"> </span>'),z5=F("<p><!></p>"),j5=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),U5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),B5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),q5=F('<a target="_blank"> </a>'),H5=F("<a> </a>"),V5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),W5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),G5=F("<p> </p>"),K5=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const Y5={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {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-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function CC(t,e){se(e,!0),Ee(t,Y5);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Ln,"$appLocale",n);let o=P(e,"showPreview",3,!1),a=ae(ie({...Hp}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),v=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),b=w(()=>$n(l(c))),y=w(()=>it(l(b).extension,"")),x=w(()=>Up(l(d))||l(c).endsWith(".pdf")),k=async()=>{$(a,ie(e.asset?await Vp(e.asset):{...Hp}))};Ue(()=>{e.asset,k()});var S=K5(),C=R(S);{var E=ve=>{var Pe=j5(),qe=R(Pe);const Xe=w(()=>l(d)==="image"),ct=w(()=>["audio","video"].includes(l(d)));Ds(qe,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Xe)},get controls(){return l(ct)}}),T(ve,Pe)};U(C,ve=>{o()&&l(x)&&ve(E)})}var A=D(C,2),O=R(A),L=R(O),I=D(O,2),N=R(I),j=D(A,2),H=R(j),B=R(H),W=D(H,2),G=R(W),K=D(j,2);{var ee=ve=>{var Pe=U5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q(rt=>{Z(Xe,rt),Z(Ye,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(ve,Pe)};U(K,ve=>{l(x)&&ve(ee)})}var J=D(K,2);{var Y=ve=>{var Pe=B5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q((rt,ft)=>{Z(Xe,rt),Z(Ye,ft)},[()=>i()("duration"),()=>l(v)?MB(l(v)):"–"]),T(ve,Pe)};U(J,ve=>{["audio","video"].includes(l(d))&&ve(Y)})}var te=D(J,2),ce=R(te),he=R(ce),re=D(ce,2),X=R(re);{var fe=ve=>{var Pe=q5(),qe=R(Pe);q(()=>{ke(Pe,"href",l(p)),Z(qe,l(p))}),T(ve,Pe)},be=ve=>{var Pe=Be("–");T(ve,Pe)};U(X,ve=>{l(p)?ve(fe):ve(be,!1)})}var ue=D(te,2),Te=R(ue),_e=R(Te),Ae=D(Te,2),Ce=R(Ae);{var $e=ve=>{var Pe=H5(),qe=R(Pe);q(()=>{ke(Pe,"href",l(g)),Z(qe,`/${l(c)??""}`)}),T(ve,Pe)},Ve=ve=>{var Pe=Be();q(()=>Z(Pe,`/${l(c)??""}`)),T(ve,Pe)};U(Ce,ve=>{l(g)?ve($e):ve(Ve,!1)})}var We=D(ue,2);{var pt=ve=>{var Pe=V5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q(rt=>{Z(Xe,rt),Z(Ye,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(ve,Pe)};U(We,ve=>{l(f)&&ve(pt)})}var Ke=D(We,2);{var ge=ve=>{var Pe=W5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ye=R(ct);q((rt,ft)=>{Z(Xe,rt),Z(Ye,ft)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...ry,...iy})]),T(ve,Pe)};U(Ke,ve=>{l(h)&&ve(ge)})}var ye=D(Ke,2),we=R(ye),Se=R(we),Ie=D(we,2);dt(Ie,17,()=>l(_),ve=>ve.sha,(ve,Pe)=>{var qe=V(),Xe=M(qe);dt(Xe,17,()=>co(l(Pe)),ct=>ct.name,(ct,Ye)=>{var rt=V();const ft=w(()=>l(Ye).label||l(Ye).name);var ut=M(rt);dt(ut,17,()=>Wo(l(Ye),l(Pe)),bt=>bt.name,(bt,At)=>{TC(bt,()=>({link:`/collections/${l(Ye).name}/entries/${l(At).name}`,collectionLabel:l(ft),entryLabel:l(At).label||l(At).name}))},bt=>{var At=Ge(()=>({link:`/collections/${l(Ye).name}/entries/${l(Pe).subPath}`,collectionLabel:l(ft),entryLabel:Vo(l(Ye),l(Pe),{useTemplate:!0})}));TC(bt,()=>l(At))}),T(ct,rt)}),T(ve,qe)},ve=>{var Pe=G5(),qe=R(Pe);q(Xe=>Z(qe,Xe),[()=>i()("sort_keys.none")]),T(ve,Pe)}),q((ve,Pe,qe,Xe,ct,Ye,rt)=>{Z(L,ve),Z(N,Pe),Z(B,qe),Z(G,Xe),Z(he,ct),Z(_e,Ye),Z(Se,rt)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Mo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?k_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var J5=F("<!> <!> <!>",1),Z5=F("<!> <!>",1);function AC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await Va(s()[0]);return f=S,Qc(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
563
563
  `))},g=async()=>{await navigator.clipboard.writeText(s().map(({path:S})=>`/${S}`).join(`
564
- `))},m=async()=>{let S=f;if(Qc(S.type)){await navigator.clipboard.writeText(await S.text());return}if(!S.type.startsWith("image/"))throw new Error("Unsupported type");S.type!=="image/png"&&(S=await GT(S)),await navigator.clipboard.write([new ClipboardItem({"image/png":S})])},v=async(S,C,E)=>{try{await S(),c.status="success",c.text=l(u)?C:E}catch{c.status="error",c.text=i()("clipboard_error")}finally{c.show=!0}};Ue(()=>{(async()=>($(o,ie(await Promise.all(s().map(Vp)))),$(a,ie(await h()))))()});var _=Zq(),b=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));Er(b,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));mr(C,{get"aria-label"(){return l(E)},children:(A,O)=>{var L=Jq(),I=M(L);const N=w(()=>l(u)?i()("public_url"):i()("public_urls")),j=w(()=>!l(d).length);Lt(I,{get label(){return l(N)},get disabled(){return l(j)},onclick:()=>{v(p,i()("asset_url_copied"),i()("asset_urls_copied"))}});var H=D(I,2);const B=w(()=>l(u)?i()("file_path"):i()("file_paths"));Lt(H,{get label(){return l(B)},onclick:()=>{v(g,i()("asset_path_copied"),i()("asset_paths_copied"))}});var W=D(H,2);const G=w(()=>i()("file_data")),K=w(()=>!l(a));Lt(W,{get label(){return l(G)},get disabled(){return l(K)},onclick:()=>{v(m,i()("asset_data_copied"),i()("asset_data_copied"))}}),T(A,L)},$$slots:{default:!0}})},$$slots:{popup:!0}});var k=D(b,2);Gn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{Bn(S,{get status(){return c.status},children:(E,A)=>{var O=Be();q(()=>Z(O,c.text)),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,_),oe(),r()}const Xa={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},Ld=st({...Xa}),PC=async(t,e=[])=>{const n=ne(ri),r=t.map(i=>{const{locales:s,slug:o}=n.find(a=>a.id===i)??{};if(s)return Object.values(s).map(({path:a})=>({action:"delete",slug:o,path:a}))}).flat(1).filter((i,s,o)=>i&&o.findIndex(a=>a?.path===i.path)===s);e.length&&r.push(...e.map(i=>({action:"delete",path:i}))),await ne(Nn)?.commitChanges(r,{commitType:"delete",collection:ne(qn)}),ri.set(n.filter(i=>!t.includes(i.id))),Ld.set({...Xa,deleted:!0,count:t.length}),e.length&&tn.update(i=>i.filter(s=>!e.includes(s.path)))},Xq=({fieldConfig:t,keyPath:e})=>{const n={},{default:r,output_code_only:i=!1,keys:s={code:"code",lang:"lang"}}=t;if(i)n[e]=typeof r=="string"?r:"";else{const o=Jn(r)?r:void 0,a=o?o[s.code]:r,c=o?o[s.lang]:"";n[e]={},n[`${e}.${s.code}`]=typeof a=="string"?a:"",n[`${e}.${s.lang}`]=typeof c=="string"?c:""}return n},OC=(t,e)=>{const{default:n}=t;return typeof n!="string"?n:n.replaceAll(/{{(.+?)}}/g,(r,i)=>i==="locale"?e:i==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):i==="uuid"?Wn():i==="uuid_short"?Wn("short"):i==="uuid_shorter"?Wn("shorter"):"")},Qq=t=>{const{default:e,required:n=!0}=t;return e&&Jn(e)?e:n?{"":""}:{}},sy=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(ne(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),e5=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(s=>s[0]===n)!==r)return"duplicate"}),t5=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;is.set(!1),t.update(o=>(o&&Object.entries(o.currentValues).forEach(([a,c])=>{(a===n||s==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),o)),is.set(!0)},$C=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?Rg():Wn();return e?`${e}${r}`:r},n5=({fieldConfig:t,keyPath:e,newContent:n,value:r})=>{const{widget:i="string"}=t,s=()=>{n[e]=[],r.split(/,\s*/).forEach((o,a)=>{n[`${e}.${a}`]=o})};if(i==="boolean"){n[e]=r==="true";return}if(i==="list"){const{field:o,fields:a,types:c}=t;if(!(!!o||!!a||!!c)){s();return}}if(i==="markdown"){n[e]=LP(r);return}if(i==="number"){const{value_type:o="int"}=t;if(o==="int"||o==="float"){const a=o==="int"?Number.parseInt(r,10):Number.parseFloat(r);Number.isNaN(a)||(n[e]=a)}else n[e]=r;return}if(i==="relation"||i==="select"){const{multiple:o=!1}=t;if(o){s();return}}n[e]=r},Xp=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){n5({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=xd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:f}=s;if(!d){r[o]=[];return}if(f){c.forEach((h,p)=>{Object.entries(h).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((h,p)=>{r[[o,p].join(".")]=h});return}if(a==="object"){const{fields:f,types:h}=s;!u||Array.isArray(h)?r[o]=null:f?.forEach(p=>{i({keyPath:[o,p.name].join("."),fieldConfig:p})});return}if(a==="boolean"){r[o]=typeof c=="boolean"?c:!1;return}if(a==="code"){Object.assign(r,Xq({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:f=!1}=s;if(f){d?c.forEach((h,p)=>{r[[o,p].join(".")]=h}):r[o]=[];return}}if(a==="datetime"){r[o]=bB(s);return}if(a==="hidden"){r[o]=OC(s,e);return}if(a==="keyvalue"){Object.entries(Qq(s)).forEach(([f,h])=>{r[`${o}.${f}`]=String(h)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},oy=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Ri(t),o=e?s?._fileMap[e]:void 0;if(!s||e&&!o)return;const{defaultLocale:a,canonicalSlug:{key:c}}=(o??s)._i18n;return new Proxy(r,{set:(u,d,f)=>{if(u[d]!==f&&(u[d]=f),[c].includes(d))return!0;const h=typeof i=="function"?i():u,p=vn({collectionName:t,fileName:e,valueMap:h,keyPath:d});if(!p)return!0;const g=ne(nt)?.validities?.[n]?.[d];return g&&typeof f=="string"&&xd({fieldConfig:p,locale:n})&&(g.valueMissing=!f),ne(is)&&p.i18n==="duplicate"&&n===a&&Object.entries(ne(nt).currentValues).forEach(([m,v])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(v).some(b=>b.startsWith(`${_}.`))&&!vn({collectionName:t,fileName:e,valueMap:h,keyPath:_}))return}m!==n&&v[d]!==f&&(v[d]=f)}),!0}})},Nd=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i})=>{const s=t.name,o=e?.name,{id:a,slug:c,locales:u}=n,d=a===void 0,{fields:f=[],_i18n:h}=e??t,{allLocales:p,initialLocales:g,defaultLocale:m,canonicalSlug:{key:v="translationKey"}}=h,_=d?g:p.filter(k=>!!u?.[k]?.content),b=Object.fromEntries(p.map(k=>[k,_.includes(k)])),y=d?{}:v in(u?.[m]?.content??{})?Object.fromEntries(p.map(k=>[k,u?.[k].slug])):{_:u?.[m].slug},x=Object.fromEntries(_.map(k=>d?[k,Xp(f,k,r)]:[k,structuredClone(u?.[k].content)]));nt.set({isNew:d&&!o,collectionName:s,collection:t,fileName:o,collectionFile:e,originalEntry:d?void 0:n,originalLocales:b,currentLocales:structuredClone(b),originalSlugs:y,currentSlugs:structuredClone(y),originalValues:x,currentValues:Object.fromEntries(_.map(k=>[k,oy({draft:{collectionName:s,fileName:o},locale:k,target:structuredClone(x[k])})])),files:{},validities:Object.fromEntries(p.map(k=>[k,{}])),expanderStates:i??{_:{}}}),s5({collectionName:s,fileName:o,slug:c})},r5=()=>{const t=ne(nt),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:s,validities:o}=t,{defaultLocale:a}=(i??r)._i18n,{canonicalSlug:{key:c}}=(i??r)._i18n;Object.entries(s).forEach(([u,d])=>{delete d[c],Object.keys(d).forEach(f=>{const h=vn({collectionName:e,fileName:n,valueMap:d,keyPath:f});h?.widget==="uuid"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=$C(h)),h?.widget==="hidden"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=OC(h,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),nt.set({...t,isNew:!0,originalEntry:void 0}),Q_.set(!0)};let LC=0,Qa;const NC={saved:!1,restored:!1,deleted:!1},Qp=st({show:!1}),Jo=st({...NC}),eg=async(t,e="")=>{await Qa?.delete([t,e])},ay=async(t,e="")=>{const n=await Qa?.get([t,e]);return n?n.siteConfigVersion===ne(z_)?n:(await eg(t,e),null):null},i5=async t=>{const{collectionName:e,originalEntry:n,currentLocales:r={},currentSlugs:i={},currentValues:s={},files:o}=t,a=n?.slug||"";if(ne(xC)){const c={timestamp:new Date,siteConfigVersion:ne(z_),collectionName:e,slug:a,currentLocales:r,currentSlugs:ec(i),currentValues:ec(s),files:o};await Qa?.put(c)}else await ay(e,a)&&await eg(e,a)},s5=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await ay(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentSlugs:o,currentValues:a,files:c}=r,u=await new Promise(d=>{Qp.set({show:!0,timestamp:i,resolve:d})});u!==void 0&&(u?(is.set(!1),nt.update(d=>(d&&(d.currentLocales=s,d.currentSlugs=o,Object.entries(a).forEach(([f,h])=>{Object.entries(h).forEach(([p,g])=>{typeof g=="string"&&[...g.matchAll(Cw("g"))].forEach(([m])=>{const v=c[m];if(v instanceof File){const _=URL.createObjectURL(v);h[p]=g.replaceAll(m,_),d.files[_]=v}})}),d.currentValues[f]?Object.assign(d.currentValues[f],h):d.currentValues[f]=oy({draft:{collectionName:t,fileName:e},locale:f,target:structuredClone(h)}),d.originalValues[f]||(d.originalValues[f]={})})),d)),is.set(!0)):await eg(t,n),Jo.set({restored:u,deleted:!u,saved:!1}))},o5=async()=>{const t=ne(nt);if(!t||ne(Jo).saved)return;const{collectionName:e,originalEntry:n}=t;await ay(e,n?.slug)&&Jo.set({restored:!1,deleted:!1,saved:!0})},a5=()=>{Jo.set({...NC})};Nn.subscribe(t=>{if(t&&!Qa){const{databaseName:e}=t.repository??{};if(e){Qa=new Fo(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}Qa=null}),nt.subscribe(t=>{globalThis.clearTimeout(LC),t&&Qa&&(LC=globalThis.setTimeout(()=>{i5(t)},500))});const IC=(t,e)=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),s=Number.isInteger(r)&&(n??0)<=r,o=e?[...e.trim()].length:0,a=i&&o<n,c=s&&o>r;return{count:o,hasMin:i,hasMax:s,tooShort:a,tooLong:c,invalid:a||c}},l5=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,c5=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=ne(nt),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const f=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}s[u]={};const h=(p,g)=>{const m=vn({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:b}=m,y=xd({fieldConfig:m,locale:u});if(u!==a&&(!o||_===!1||_==="none"||_==="duplicate"))return;if(!["select","relation"].includes(v)&&/\.\d+$/.test(p)){const H=p.replace(/\.\d+$/,"");if(H in s[u]||h(H,void 0),v==="list"){const{field:B,fields:W,types:G}=m;if(!B&&!W&&!G)return}}const{multiple:x=!1}=m,{min:k,max:S}=m;let C=!1,E=!1,A=!1,O=!1,L=!1,I=!1,N=!1;if(v==="list"){if(p in s[u])return;const H=new RegExp(`^${cn(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:f.filter(([W])=>H.test(W)).map(([,W])=>W).filter(W=>W!==void 0)??[];y&&!B.length?C=!0:typeof k=="number"&&B.length<k?O=!0:typeof S=="number"&&B.length>S&&(L=!0)}if(v==="object"&&y&&!g&&(C=!0),v==="keyvalue"){const H=p.match(/(.+?)(?:\.[^.]*)?$/)?.[1],B=vn({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=sy({entryDraft:nt,keyPath:H,locale:u});y&&!G.length?C=!0:typeof k=="number"&&G.length<k?O=!0:typeof S=="number"&&G.length>S&&(L=!0)}if(!["object","list","hidden","compute","keyvalue"].includes(v)){if(v==="code"){const{output_code_only:H=!1,keys:B={code:"code",lang:"lang"}}=m,W=p.match(`(.+)\\.(?:${B.code}|${B.lang})$`)?.[1]??"";if(W&&(p=W),p in s[u])return;H||(g=d[`${p}.${B.code}`])}if(typeof g=="string"&&(g=g.trim()),y&&(g==null||g===""||x&&!g.length)&&(C=!0),Array.isArray(b)&&typeof b[0]=="string"){const{pattern:H,flags:B}=b[0].match(l5)?.groups??{},W=new RegExp(H,B);H&&!W.test(String(g))&&(I=!0)}if(["string","text"].includes(v)&&({tooShort:E,tooLong:A}=IC(m,g)),v==="string"&&g){const{type:H="text"}=m;if(H!=="text"){const B=document.createElement("input");B.type=H,B.value=g,{typeMismatch:N}=B.validity}H==="email"&&!N&&!g.split("@")[1]?.includes(".")&&(N=!0)}if(v==="number"){const{value_type:H="int"}=m;typeof k=="number"&&g!==null&&Number(g)<k?O=!0:typeof S=="number"&&g!==null&&Number(g)>S&&(L=!0),(H==="int"||H==="float")&&y&&g===null&&(N=!0)}}const j=new Proxy({valueMissing:C,tooShort:E,tooLong:A,rangeUnderflow:O,rangeOverflow:L,patternMismatch:I,typeMismatch:N},{get:(H,B)=>B==="valid"?!Object.values(H).some(Boolean):H[B]});s[u][p]=j,j.valid||(c=!1)};f.forEach(([p,g])=>{h(p,g)})}),nt.update(u=>({...u,validities:s})),c},RC=(t,e=ne(yt)?.output?.json??{})=>{const{indent_style:n="space",indent_size:r=n==="tab"?1:2}=e;return JSON.stringify(t,null,n==="tab"?" ".repeat(r):r).trim()},DC=t=>g8(t).trim(),MC=(t,e=ne(yt)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return cd.stringify(t,null,{indent:r,lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s||i==="double"?"QUOTE_DOUBLE":i==="single"?"QUOTE_SINGLE":"PLAIN",singleQuote:!(s||i==="double")}).trim()},FC=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=pf[n]?.formatter;if(s)return`${(await s(t)).trim()}
564
+ `))},m=async()=>{let S=f;if(Qc(S.type)){await navigator.clipboard.writeText(await S.text());return}if(!S.type.startsWith("image/"))throw new Error("Unsupported type");S.type!=="image/png"&&(S=await GT(S)),await navigator.clipboard.write([new ClipboardItem({"image/png":S})])},v=async(S,C,E)=>{try{await S(),c.status="success",c.text=l(u)?C:E}catch{c.status="error",c.text=i()("clipboard_error")}finally{c.show=!0}};Ue(()=>{(async()=>($(o,ie(await Promise.all(s().map(Vp)))),$(a,ie(await h()))))()});var _=Z5(),b=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));Er(b,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));mr(C,{get"aria-label"(){return l(E)},children:(A,O)=>{var L=J5(),I=M(L);const N=w(()=>l(u)?i()("public_url"):i()("public_urls")),j=w(()=>!l(d).length);Lt(I,{get label(){return l(N)},get disabled(){return l(j)},onclick:()=>{v(p,i()("asset_url_copied"),i()("asset_urls_copied"))}});var H=D(I,2);const B=w(()=>l(u)?i()("file_path"):i()("file_paths"));Lt(H,{get label(){return l(B)},onclick:()=>{v(g,i()("asset_path_copied"),i()("asset_paths_copied"))}});var W=D(H,2);const G=w(()=>i()("file_data")),K=w(()=>!l(a));Lt(W,{get label(){return l(G)},get disabled(){return l(K)},onclick:()=>{v(m,i()("asset_data_copied"),i()("asset_data_copied"))}}),T(A,L)},$$slots:{default:!0}})},$$slots:{popup:!0}});var k=D(b,2);Gn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{Bn(S,{get status(){return c.status},children:(E,A)=>{var O=Be();q(()=>Z(O,c.text)),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,_),oe(),r()}const Xa={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},Ld=st({...Xa}),PC=async(t,e=[])=>{const n=ne(ri),r=t.map(i=>{const{locales:s,slug:o}=n.find(a=>a.id===i)??{};if(s)return Object.values(s).map(({path:a})=>({action:"delete",slug:o,path:a}))}).flat(1).filter((i,s,o)=>i&&o.findIndex(a=>a?.path===i.path)===s);e.length&&r.push(...e.map(i=>({action:"delete",path:i}))),await ne(Nn)?.commitChanges(r,{commitType:"delete",collection:ne(qn)}),ri.set(n.filter(i=>!t.includes(i.id))),Ld.set({...Xa,deleted:!0,count:t.length}),e.length&&tn.update(i=>i.filter(s=>!e.includes(s.path)))},X5=({fieldConfig:t,keyPath:e})=>{const n={},{default:r,output_code_only:i=!1,keys:s={code:"code",lang:"lang"}}=t;if(i)n[e]=typeof r=="string"?r:"";else{const o=Jn(r)?r:void 0,a=o?o[s.code]:r,c=o?o[s.lang]:"";n[e]={},n[`${e}.${s.code}`]=typeof a=="string"?a:"",n[`${e}.${s.lang}`]=typeof c=="string"?c:""}return n},OC=(t,e)=>{const{default:n}=t;return typeof n!="string"?n:n.replaceAll(/{{(.+?)}}/g,(r,i)=>i==="locale"?e:i==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):i==="uuid"?Wn():i==="uuid_short"?Wn("short"):i==="uuid_shorter"?Wn("shorter"):"")},Q5=t=>{const{default:e,required:n=!0}=t;return e&&Jn(e)?e:n?{"":""}:{}},sy=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(ne(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),e8=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(s=>s[0]===n)!==r)return"duplicate"}),t8=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;is.set(!1),t.update(o=>(o&&Object.entries(o.currentValues).forEach(([a,c])=>{(a===n||s==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),o)),is.set(!0)},$C=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?Rg():Wn();return e?`${e}${r}`:r},n8=({fieldConfig:t,keyPath:e,newContent:n,value:r})=>{const{widget:i="string"}=t,s=()=>{n[e]=[],r.split(/,\s*/).forEach((o,a)=>{n[`${e}.${a}`]=o})};if(i==="boolean"){n[e]=r==="true";return}if(i==="list"){const{field:o,fields:a,types:c}=t;if(!(!!o||!!a||!!c)){s();return}}if(i==="markdown"){n[e]=LP(r);return}if(i==="number"){const{value_type:o="int"}=t;if(o==="int"||o==="float"){const a=o==="int"?Number.parseInt(r,10):Number.parseFloat(r);Number.isNaN(a)||(n[e]=a)}else n[e]=r;return}if(i==="relation"||i==="select"){const{multiple:o=!1}=t;if(o){s();return}}n[e]=r},Xp=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){n8({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=xd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:f}=s;if(!d){r[o]=[];return}if(f){c.forEach((h,p)=>{Object.entries(h).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((h,p)=>{r[[o,p].join(".")]=h});return}if(a==="object"){const{fields:f,types:h}=s;!u||Array.isArray(h)?r[o]=null:f?.forEach(p=>{i({keyPath:[o,p.name].join("."),fieldConfig:p})});return}if(a==="boolean"){r[o]=typeof c=="boolean"?c:!1;return}if(a==="code"){Object.assign(r,X5({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:f=!1}=s;if(f){d?c.forEach((h,p)=>{r[[o,p].join(".")]=h}):r[o]=[];return}}if(a==="datetime"){r[o]=bB(s);return}if(a==="hidden"){r[o]=OC(s,e);return}if(a==="keyvalue"){Object.entries(Q5(s)).forEach(([f,h])=>{r[`${o}.${f}`]=String(h)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},oy=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Ri(t),o=e?s?._fileMap[e]:void 0;if(!s||e&&!o)return;const{defaultLocale:a,canonicalSlug:{key:c}}=(o??s)._i18n;return new Proxy(r,{set:(u,d,f)=>{if(u[d]!==f&&(u[d]=f),[c].includes(d))return!0;const h=typeof i=="function"?i():u,p=vn({collectionName:t,fileName:e,valueMap:h,keyPath:d});if(!p)return!0;const g=ne(nt)?.validities?.[n]?.[d];return g&&typeof f=="string"&&xd({fieldConfig:p,locale:n})&&(g.valueMissing=!f),ne(is)&&p.i18n==="duplicate"&&n===a&&Object.entries(ne(nt).currentValues).forEach(([m,v])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(v).some(b=>b.startsWith(`${_}.`))&&!vn({collectionName:t,fileName:e,valueMap:h,keyPath:_}))return}m!==n&&v[d]!==f&&(v[d]=f)}),!0}})},Nd=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i})=>{const s=t.name,o=e?.name,{id:a,slug:c,locales:u}=n,d=a===void 0,{fields:f=[],_i18n:h}=e??t,{allLocales:p,initialLocales:g,defaultLocale:m,canonicalSlug:{key:v="translationKey"}}=h,_=d?g:p.filter(k=>!!u?.[k]?.content),b=Object.fromEntries(p.map(k=>[k,_.includes(k)])),y=d?{}:v in(u?.[m]?.content??{})?Object.fromEntries(p.map(k=>[k,u?.[k]?.slug])):{_:u?.[m].slug},x=Object.fromEntries(_.map(k=>d?[k,Xp(f,k,r)]:[k,structuredClone(u?.[k]?.content)]));nt.set({isNew:d&&!o,collectionName:s,collection:t,fileName:o,collectionFile:e,originalEntry:d?void 0:n,originalLocales:b,currentLocales:structuredClone(b),originalSlugs:y,currentSlugs:structuredClone(y),originalValues:x,currentValues:Object.fromEntries(_.map(k=>[k,oy({draft:{collectionName:s,fileName:o},locale:k,target:structuredClone(x[k])})])),files:{},validities:Object.fromEntries(p.map(k=>[k,{}])),expanderStates:i??{_:{}}}),s8({collectionName:s,fileName:o,slug:c})},r8=()=>{const t=ne(nt),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:s,validities:o}=t,{defaultLocale:a}=(i??r)._i18n,{canonicalSlug:{key:c}}=(i??r)._i18n;Object.entries(s).forEach(([u,d])=>{delete d[c],Object.keys(d).forEach(f=>{const h=vn({collectionName:e,fileName:n,valueMap:d,keyPath:f});h?.widget==="uuid"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=$C(h)),h?.widget==="hidden"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=OC(h,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),nt.set({...t,isNew:!0,originalEntry:void 0}),Q_.set(!0)};let LC=0,Qa;const NC={saved:!1,restored:!1,deleted:!1},Qp=st({show:!1}),Jo=st({...NC}),eg=async(t,e="")=>{await Qa?.delete([t,e])},ay=async(t,e="")=>{const n=await Qa?.get([t,e]);return n?n.siteConfigVersion===ne(z_)?n:(await eg(t,e),null):null},i8=async t=>{const{collectionName:e,originalEntry:n,currentLocales:r={},currentSlugs:i={},currentValues:s={},files:o}=t,a=n?.slug||"";if(ne(xC)){const c={timestamp:new Date,siteConfigVersion:ne(z_),collectionName:e,slug:a,currentLocales:r,currentSlugs:ec(i),currentValues:ec(s),files:o};await Qa?.put(c)}else await ay(e,a)&&await eg(e,a)},s8=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await ay(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentSlugs:o,currentValues:a,files:c}=r,u=await new Promise(d=>{Qp.set({show:!0,timestamp:i,resolve:d})});u!==void 0&&(u?(is.set(!1),nt.update(d=>(d&&(d.currentLocales=s,d.currentSlugs=o,Object.entries(a).forEach(([f,h])=>{Object.entries(h).forEach(([p,g])=>{typeof g=="string"&&[...g.matchAll(Cw("g"))].forEach(([m])=>{const v=c[m];if(v instanceof File){const _=URL.createObjectURL(v);h[p]=g.replaceAll(m,_),d.files[_]=v}})}),d.currentValues[f]?Object.assign(d.currentValues[f],h):d.currentValues[f]=oy({draft:{collectionName:t,fileName:e},locale:f,target:structuredClone(h)}),d.originalValues[f]||(d.originalValues[f]={})})),d)),is.set(!0)):await eg(t,n),Jo.set({restored:u,deleted:!u,saved:!1}))},o8=async()=>{const t=ne(nt);if(!t||ne(Jo).saved)return;const{collectionName:e,originalEntry:n}=t;await ay(e,n?.slug)&&Jo.set({restored:!1,deleted:!1,saved:!0})},a8=()=>{Jo.set({...NC})};Nn.subscribe(t=>{if(t&&!Qa){const{databaseName:e}=t.repository??{};if(e){Qa=new Fo(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}Qa=null}),nt.subscribe(t=>{globalThis.clearTimeout(LC),t&&Qa&&(LC=globalThis.setTimeout(()=>{i8(t)},500))});const IC=(t,e)=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),s=Number.isInteger(r)&&(n??0)<=r,o=e?[...e.trim()].length:0,a=i&&o<n,c=s&&o>r;return{count:o,hasMin:i,hasMax:s,tooShort:a,tooLong:c,invalid:a||c}},l8=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,c8=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=ne(nt),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const f=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}s[u]={};const h=(p,g)=>{const m=vn({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:b}=m,y=xd({fieldConfig:m,locale:u});if(u!==a&&(!o||_===!1||_==="none"||_==="duplicate"))return;if(!["select","relation"].includes(v)&&/\.\d+$/.test(p)){const H=p.replace(/\.\d+$/,"");if(H in s[u]||h(H,void 0),v==="list"){const{field:B,fields:W,types:G}=m;if(!B&&!W&&!G)return}}const{multiple:x=!1}=m,{min:k,max:S}=m;let C=!1,E=!1,A=!1,O=!1,L=!1,I=!1,N=!1;if(v==="list"){if(p in s[u])return;const H=new RegExp(`^${cn(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:f.filter(([W])=>H.test(W)).map(([,W])=>W).filter(W=>W!==void 0)??[];y&&!B.length?C=!0:typeof k=="number"&&B.length<k?O=!0:typeof S=="number"&&B.length>S&&(L=!0)}if(v==="object"&&y&&!g&&(C=!0),v==="keyvalue"){const H=p.match(/(.+?)(?:\.[^.]*)?$/)?.[1],B=vn({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=sy({entryDraft:nt,keyPath:H,locale:u});y&&!G.length?C=!0:typeof k=="number"&&G.length<k?O=!0:typeof S=="number"&&G.length>S&&(L=!0)}if(!["object","list","hidden","compute","keyvalue"].includes(v)){if(v==="code"){const{output_code_only:H=!1,keys:B={code:"code",lang:"lang"}}=m,W=p.match(`(.+)\\.(?:${B.code}|${B.lang})$`)?.[1]??"";if(W&&(p=W),p in s[u])return;H||(g=d[`${p}.${B.code}`])}if(typeof g=="string"&&(g=g.trim()),y&&(g==null||g===""||x&&!g.length)&&(C=!0),Array.isArray(b)&&typeof b[0]=="string"){const{pattern:H,flags:B}=b[0].match(l8)?.groups??{},W=new RegExp(H,B);H&&!W.test(String(g))&&(I=!0)}if(["string","text"].includes(v)&&({tooShort:E,tooLong:A}=IC(m,g)),v==="string"&&g){const{type:H="text"}=m;if(H!=="text"){const B=document.createElement("input");B.type=H,B.value=g,{typeMismatch:N}=B.validity}H==="email"&&!N&&!g.split("@")[1]?.includes(".")&&(N=!0)}if(v==="number"){const{value_type:H="int"}=m;typeof k=="number"&&g!==null&&Number(g)<k?O=!0:typeof S=="number"&&g!==null&&Number(g)>S&&(L=!0),(H==="int"||H==="float")&&y&&g===null&&(N=!0)}}const j=new Proxy({valueMissing:C,tooShort:E,tooLong:A,rangeUnderflow:O,rangeOverflow:L,patternMismatch:I,typeMismatch:N},{get:(H,B)=>B==="valid"?!Object.values(H).some(Boolean):H[B]});s[u][p]=j,j.valid||(c=!1)};f.forEach(([p,g])=>{h(p,g)})}),nt.update(u=>({...u,validities:s})),c},RC=(t,e=ne(yt)?.output?.json??{})=>{const{indent_style:n="space",indent_size:r=n==="tab"?1:2}=e;return JSON.stringify(t,null,n==="tab"?" ".repeat(r):r).trim()},DC=t=>gq(t).trim(),MC=(t,e=ne(yt)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return cd.stringify(t,null,{indent:r,lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s||i==="double"?"QUOTE_DOUBLE":i==="single"?"QUOTE_SINGLE":"PLAIN",singleQuote:!(s||i==="double")}).trim()},FC=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=pf[n]?.formatter;if(s)return`${(await s(t)).trim()}
565
565
  `;try{if(/^ya?ml$/.test(n))return`${MC(t,void 0,{quote:i})}
566
566
  `;if(n==="toml")return`${DC(t)}
567
567
  `;if(n==="json")return`${RC(t)}
@@ -578,41 +578,31 @@ ${c}
578
578
  ${RC(t)}
579
579
  ${a}
580
580
  ${c}
581
- `}catch(u){console.error(u)}}return""},u5=t=>{const{collection:e}=t,{_i18n:{structure:n},_assetFolder:r}=e,i=e._type==="entry"?e._file.subPath:void 0,s=i?.match(/(?<path>.+?)(?:\/[^/]+)?$/)?.groups?.path??"",o=["multiple_folders","multiple_folders_i18n_root"].includes(n),{entryRelative:a,internalPath:c,publicPath:u}=r??ne(di)[0];return a?{internalBaseAssetFolder:c,internalAssetFolder:E_($s(Fp([c,o||i?.includes("/")?s:void 0]),t)),publicAssetFolder:!o&&/^\.?$/.test(u)?u:E_($s(o?Fp([...Array((i?.match(/\//g)??[]).length+1).fill(".."),u,s]):u,t))}:{internalBaseAssetFolder:c,internalAssetFolder:$s(c,t),publicAssetFolder:$s(u,t)}},zC=({draft:t,locale:e,slug:n})=>{const{collection:r,collectionFile:i,originalEntry:s,currentValues:o}=t;if(i)return i.file.replace("{{locale}}",e);if(s?.locales[e].slug===n)return s.locales[e].path;const a=r,{_file:{basePath:c,subPath:u,extension:d},_i18n:{defaultLocale:f,structure:h}}=a,p=u?$s(u,{collection:a,locale:e,content:o[f],currentSlug:n}):n,g={multiple_folders:`${c}/${e}/${p}.${d}`,multiple_folders_i18n_root:`${e}/${c}/${p}.${d}`,multiple_files:`${c}/${p}.${e}.${d}`,single_file:`${c}/${p}.${d}`};return g[h]??g.single_file},tg=({field:t,keyPath:e,keyPathList:n})=>{const{widget:r}=t,i=r==="list";if(n.push(e),i||r==="object"){const{fields:s,types:o,typeKey:a="type"}=t;if(s)s.forEach(c=>{tg({field:c,keyPath:i?`${e}.*.${c.name}`:`${e}.${c.name}`,keyPathList:n})});else if(o)n.push(i?`${e}.*.${a}`:`${e}.${a}`),o.forEach(c=>{c.fields?.forEach(u=>{tg({field:u,keyPath:i?`${e}.*.${u.name}`:`${e}.${u.name}`,keyPathList:n})})});else if(i){const{field:c}=t;c?tg({field:c,keyPath:`${e}.*`,keyPathList:n}):n.push(`${e}.*`)}}if(r==="select"||r==="relation"){const{multiple:s=!1}=t;n.push(s?`${e}.*`:e)}},d5=t=>{const e=[];return t.forEach(n=>{tg({field:n,keyPath:n.name,keyPathList:e})}),e},Id=({key:t,field:e,locale:n,unsortedMap:r,sortedMap:i,isTomlOutput:s,omitEmptyOptionalFields:o})=>{let a=r[t];if(s&&typeof a=="string"&&Mq.test(a)&&e?.widget==="datetime")try{a=new Ga(a)}catch{}o&&e&&!xd({fieldConfig:e,locale:n})&&!Object.keys(r).some(c=>c.startsWith(`${t}.`))&&(!a||Array.isArray(a)&&!a.length||Jn(a)&&!Object.keys(a).length)||(i[t]=a),delete r[t]},f5=({collectionName:t,fileName:e,fields:n,locale:r,valueMap:i,canonicalSlugKey:s,isTomlOutput:o=!1})=>{const a=ec(i),c={},{omit_empty_optional_fields:u=!1}=ne(yt)?.output??{},d={locale:r,unsortedMap:a,sortedMap:c,isTomlOutput:o,omitEmptyOptionalFields:u};return s&&s in a&&Id({key:s,...d}),d5(n).forEach(f=>{const h=vn({collectionName:t,fileName:e,valueMap:i,keyPath:f});if(f in a)Id({key:f,field:h,...d});else if(h?.widget==="keyvalue")c[f]={},Object.entries(a).filter(([p])=>p.startsWith(`${f}.`)).forEach(([p])=>{Id({key:p,field:h,...d})});else{const p=new RegExp(`^${cn(f.replaceAll("*","\\d+")).replaceAll("\\\\d\\+","\\d+")}$`);Object.keys(a).filter(g=>p.test(g)).sort(([g,m])=>oi(g,m)).forEach(g=>{Id({key:g,field:h,...d})})}}),Object.keys(a).sort(([f,h])=>oi(f,h)).forEach(f=>{Id({key:f,...d})}),za(c)},ly=({draft:t,locale:e,valueMap:n})=>{const{collection:r,collectionFile:i}=t,{fields:s=[],_file:o,_i18n:{canonicalSlug:{key:a}}}=i??r,c=f5({collectionName:r.name,fileName:i?.name,fields:s,locale:e,valueMap:n,canonicalSlugKey:a,isTomlOutput:["toml","toml-frontmatter"].includes(o.format)});return rC(s)?c[s[0].name]??[]:c},h5=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionFile:r,currentLocales:i,currentSlugs:s,currentValues:o}=t,{identifier_field:a="title",slug:c=`{{${a}}}`}=n,{_i18n:{defaultLocale:u,structure:d}}=r??n,f=[...c.matchAll(/{{(?:fields\.)?(.+?)( \| localize)?}}/g)].filter(([,,p])=>!!p).map(([,p])=>p);if(d==="single_file"||!f.length)return;const h=n;return Object.fromEntries(Object.entries(i).filter(([,p])=>p).map(([p])=>[p,p===u?e:s?.[p]??s?._??$s(c,{collection:h,locale:p,content:{...o[u],...Object.fromEntries(f.map(g=>[g,o[p][g]]))}})]))},p5=({draft:t,defaultLocaleSlug:e,localizedSlugs:n,fillSlugOptions:r})=>{if(!n)return;const{collection:i,collectionFile:s}=t,{_i18n:{canonicalSlug:{value:o}}}=s??i;return o==="{{slug}}"?e:$s(o,{...r,currentSlug:e})},jC=({draft:t})=>{const{collection:e,collectionFile:n,currentValues:r}=t,{_i18n:{defaultLocale:i}}=n??e;return{collection:e,content:r[i]}},UC=({draft:t})=>{const{collection:e,collectionFile:n,fileName:r,currentSlugs:i}=t,{identifier_field:s="title",slug:o=`{{${s}}}`}=e,{_i18n:{defaultLocale:a}}=n??e,c=jC({draft:t}),u=r??i?.[a]??i?._??$s(o,c),d=h5({draft:t,defaultLocaleSlug:u}),f=p5({draft:t,defaultLocaleSlug:u,localizedSlugs:d,fillSlugOptions:c});return{defaultLocaleSlug:u,localizedSlugs:d,canonicalSlug:f}},g5=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionName:r,collectionFile:i}=t,s=jC({draft:t}),{_i18n:{defaultLocale:o}}=i??n,a=u5({...s,type:"media_folder",currentSlug:e,entryFilePath:zC({draft:t,locale:o,slug:e})}),{internalBaseAssetFolder:c,internalAssetFolder:u}=a,d=R_(u).map(g=>g.name.normalize()),{email:f,name:h}=ne(fi);return{assetFolderPaths:a,assetNamesInSameFolder:d,savingAssetProps:{text:void 0,collectionName:r,folder:c,commitAuthor:f?{name:h,email:f}:void 0,commitDate:new Date}}},m5=async({blobURL:t,keyPath:e,content:n,changes:r,files:i,savingAssets:s,savingAssetProps:o,assetNamesInSameFolder:a,assetFolderPaths:{internalAssetFolder:c,publicAssetFolder:u}})=>{const d=i[t];if(!d)return;const f=await oa(d),h=s.find(m=>m.sha===f);let p="";if(h)p=h.name;else{p=S_(d.name.normalize(),a);const m=c?`${c}/${p}`:p;a.push(p),r.push({action:"create",path:m,data:d}),s.push({...o,blobURL:URL.createObjectURL(d),name:p,path:m,sha:f,size:d.size,kind:$_(p)})}const g=encodeURI(u?`${u==="/"?"":u}/${p}`:p);n[e]=n[e].replaceAll(t,g)},v5=async({draft:t,slugs:{defaultLocaleSlug:e,canonicalSlug:n,localizedSlugs:r}})=>{const{collection:i,currentLocales:s,collectionFile:o,currentValues:a,files:c}=t,{_i18n:{canonicalSlug:{key:u}}}=o??i,d=[],f=[],h={files:c,changes:d,savingAssets:f,...g5({draft:t,defaultLocaleSlug:e})};return{localizedEntryMap:Object.fromEntries(await Promise.all(Object.entries(a).map(async([g,m])=>{const _=r?.[g]??e,b=zC({draft:t,locale:g,slug:_});return s[g]?(m[u]=n,await Promise.all(Object.entries(m).map(async([y,x])=>{if(x===void 0){delete m[y];return}typeof x=="string"&&(m[y]=x.trim(),await Promise.all([...x.matchAll(Cw("g"))].map(([k])=>m5({blobURL:k,keyPath:y,content:m,...h}))))})),[g,{slug:_,path:b,sha:"",content:ec(m)}]):[g,{path:b}]}))),changes:d,savingAssets:f}},BC=async({draft:t,slugs:e})=>{const{collection:n,isNew:r,originalLocales:i,currentLocales:s,originalSlugs:o,originalEntry:a,collectionFile:c}=t,{defaultLocaleSlug:u}=e,{_file:d,_i18n:{i18nEnabled:f,allLocales:h,defaultLocale:p,structure:g}}=c??n,{localizedEntryMap:m,changes:v,savingAssets:_}=await v5({draft:t,slugs:e}),b={id:a?.id??Wn(),sha:"",slug:u,subPath:d.fullPathRegEx?m[p].path.match(d.fullPathRegEx)?.groups?.subPath??u:u,locales:Object.fromEntries(Object.entries(m).filter(([,{content:y}])=>!!y))};if(!f||g==="single_file"){const y=b.locales[p],{slug:x,path:k,content:S}=y,C=!r&&(o?.[p]??o?._)!==x,E=await FC({content:f?Object.fromEntries(Object.entries(b.locales).map(([A,O])=>[A,ly({draft:t,locale:A,valueMap:O.content})])):ly({draft:t,locale:"_default",valueMap:S}),_file:d});v.push({action:r?"create":C?"move":"update",slug:x,path:k,previousPath:C?a?.locales[p].path:void 0,data:E}),y.sha=await oa(new Blob([E],{type:"text/plain"}))}else await Promise.all(h.map(async y=>{const x=b.locales[y],{slug:k,path:S,content:C}=x??{};if(s[y]){const E=!r&&i[y]&&(o?.[y]??o?._)!==k,A=await FC({content:ly({draft:t,locale:y,valueMap:C}),_file:d});v.push({action:r||!i[y]?"create":E?"move":"update",slug:k,path:S,previousPath:E?a?.locales[y].path:void 0,data:A}),x.sha=await oa(new Blob([A],{type:"text/plain"}))}else i[y]&&v.push({action:"delete",slug:k,path:S});return!0}));return b.sha=b.locales[p].sha,{savingEntry:b,savingAssets:_,changes:v}},b5=async({skipCI:t=void 0}={})=>{const e=ne(nt),{collection:n,isNew:r,collectionName:i,fileName:s,currentValues:o}=e;if(!c5())throw cq({collectionName:i,fileName:s,currentValues:o}),new Error("validation_failed");const a=UC({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await BC({draft:e,slugs:a});try{await ne(Nn).commitChanges(d,{commitType:r?"create":"update",collection:n,skipCI:t})}catch(v){throw console.error(v.cause??v),new Error("saving_failed",{cause:v.cause??v})}const h=f.map(v=>v.path);ri.update(v=>[...v.filter(_=>_.id!==u.id),u]),tn.update(v=>[...v.filter(_=>!h.includes(_.path)),...f]);const p=ne(Is)==="local",g=ne(yt)?.backend.automatic_deployments,m=!p&&(t===void 0?g===!0:t===!1);return Ld.set({...Xa,saved:!0,published:m,count:1}),Zp.set(m),eg(i,r?"":c),u},Zo=st({...Xa}),qC=async(t,e)=>{const{files:n,folder:r,originalAsset:i}=t,s=r?R_(r).map(h=>h.name.normalize()):[],o=n.map(h=>{const p=i?.name??S_(h.name.normalize(),s);return s.includes(p)||s.push(p),{action:i?"update":"create",name:p,path:[r,p].join("/"),file:h}});await ne(Nn)?.commitChanges(o.map(({action:h,path:p,file:g})=>({action:h,path:p,data:g})),e);const a=await Promise.all(o.map(async({name:h,path:p,file:g})=>({blobURL:URL.createObjectURL(g),name:h,path:p,sha:await oa(g),size:g.size,kind:$_(h),text:void 0,folder:r})));tn.update(h=>[...h.filter(p=>!a.some(g=>g.path===p.path)),...a]);const c=ne(uo),u=ne(Ko);c&&uo.set(ne(tn).find(h=>h.path===c.path)),u&&Ko.set(ne(tn).find(h=>h.path===u.path));const d=ne(Is)==="local",f=ne(yt)?.backend.automatic_deployments;Zo.set({...Xa,saved:!0,published:!d&&f===!0,count:n.length})},_5=async(t,e)=>{const n=ne(di),r=[],i=[],s=[];await Promise.all(e.map(async({asset:f,path:h})=>{const p=h,g=$n(p).basename;s.push({...f,path:p,name:g}),r.push({action:"move",path:p,previousPath:f.path,data:new File([f.file??await Va(f)],g)});const m=f.blobURL??qp(f),v=m?await C_(m):[];if(!m||!v.length)return;const{publicPath:_}=n.find(({collectionName:y})=>N_(f).some(x=>x.name===y))??n.find(({collectionName:y})=>!y)??{},b=await C_(m,{entries:structuredClone(v),newURL:p.replace(f.folder,_??"")});await Promise.all(b.map(async y=>{const{locales:x}=y,k=Object.fromEntries(Object.entries(x).map(([A])=>[A,!0])),S=Object.fromEntries(Object.entries(x).map(([A,{slug:O}])=>[A,O])),C=Object.fromEntries(Object.entries(x).map(([A,{content:O}])=>[A,O])),E={isNew:!1,originalEntry:y,originalLocales:k,currentLocales:k,originalSlugs:S,currentSlugs:S,originalValues:C,currentValues:C,files:{},validities:{},expanderStates:{}};await Promise.all(co(y).map(async A=>{const O=async I=>{const N={...E,collection:A,collectionName:A.name,collectionFile:I,fileName:I?.name},{savingEntry:j,changes:H}=await BC({draft:N,slugs:UC({draft:N})});i.push(j),r.push(...H)},L=Wo(A,y);L.length?await Promise.all(L.map(O)):await O()}))}))}));const o=await ne(Nn)?.commitChanges(r,{commitType:"uploadMedia"});Array.isArray(o)&&s.forEach((f,h)=>{o[h]instanceof File&&(f.blobURL=URL.createObjectURL(o[h]))});const a=e.map(f=>f.asset.path),c=i.map(f=>f.id);tn.update(f=>[...f.filter(h=>!a.includes(h.path)),...s]),ri.update(f=>[...f.filter(h=>!c.includes(h.id)),...i]);const u=e.find(f=>f.asset.path===ne(uo)?.path),d=e.find(f=>f.asset.path===ne(Ko)?.path);u&&uo.set(ne(tn).find(f=>f.path===u.path)),d&&Ko.set(ne(tn).find(f=>f.path===d.path)),Zo.set({...Xa,moved:t==="move",renamed:t==="rename",count:e.length})},y5=async t=>{await ne(Nn)?.commitChanges(t.map(({path:e})=>({action:"delete",path:e})),{commitType:"deleteMedia"}),tn.update(e=>e.filter(n=>!t.includes(n))),Zo.set({...Xa,deleted:!0,count:t.length})};var w5=F("<!> <!>",1);function HC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"buttonDescription",3,""),a=P(e,"dialogDescription",3,""),c=P(e,"onDelete",3,void 0),u=ae(!1);var d=w5(),f=M(d);const h=w(()=>!s().length),p=w(()=>i()("delete"));Je(f,{variant:"ghost",get disabled(){return l(h)},get label(){return l(p)},get"aria-label"(){return o()},onclick:()=>{$(u,!0)}});var g=D(f,2);const m=w(()=>s().length===1?i()("delete_asset"):i()("delete_assets")),v=w(()=>i()("delete"));kl(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{y5(s()),c()?.()},get open(){return l(u)},set open(_){$(u,ie(_))},children:(_,b)=>{var y=Be();q(()=>Z(y,a())),T(_,y)},$$slots:{default:!0}}),T(t,d),oe(),r()}var x5=F("<!> <!>",1);function VC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(!1);const a=async()=>{for(const p of s())FP(await Va(p),p.name),await hn(300);$(o,!0)};var c=x5(),u=M(c);const d=w(()=>!s().length),f=w(()=>i()("download"));Je(u,{variant:"ghost",get disabled(){return l(d)},get label(){return l(f)},onclick:()=>{a()}});var h=D(u,2);Gn(h,{get show(){return l(o)},set show(p){$(o,ie(p))},children:(p,g)=>{Bn(p,{status:"success",children:(m,v)=>{var _=Be();q(b=>Z(_,b),[()=>s().length===1?i()("asset_downloaded"):i()("assets_downloaded")]),T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,c),oe(),r()}const el=st(!1),k5=Qn([Ls],([t],e)=>{e(!!t.files.length)}),ng=t=>t==="*"?ne(le)("all_assets"):t?ne(yt)?.collections.find(({name:e})=>e===t)?.label??"":ne(le)("uncategorized"),cy=t=>{const{media_folder:e}=ne(yt);if(!t)return ng("*");if(t===e)return ng(void 0);const n=ne(di).find(({internalPath:r})=>r===t);return n?ng(n.collectionName):""},S5=(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,s=o=>{const{commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=o;return e==="commit_author"?a||c||u:e==="commit_date"?d:e==="name"?o.name.split(".")[0]:o[e]??""};return r.sort((o,a)=>{const c=s(o),u=s(a);return i===String?oi(c,u):i===Date?Number(c)-Number(u):c-u}),n==="descending"&&r.reverse(),r},E5=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>n==="other"?!Object.values(A_).some(s=>s.test(i)):A_[n].test(i));const r=typeof n=="string"?new RegExp(n):void 0;return t.filter(i=>{const s=i[e];return r?r.test(String(s??"")):s===n})},T5=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=typeof n=="string"?new RegExp(n):void 0,i={},s=ne(le)("other");return t.forEach(o=>{const a=o[e];let c;r?[c=s]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(o)}),Object.fromEntries(Object.entries(i).sort(([o],[a])=>oi(o,a)))},C5={type:"grid",showInfo:!0,sort:{key:"name",order:"ascending"}},ss=st({type:"grid",showInfo:!0}),Mc=st(),A5=Qn([tn,Ln],([t],e)=>{const n=["name"];t.every(r=>!!r.commitAuthor)&&n.push("commit_author"),t.every(r=>!!r.commitDate)&&n.push("commit_date"),e(n.map(r=>({key:r,label:ne(le)(`sort_keys.${r}`)})))}),tl=Qn([tn,ni],([t,e],n)=>{n(t&&e?t.filter(({folder:r})=>e.internalPath===r):t?[...t]:[])}),uy=Qn([tl,ss],([t,e],n)=>{let r=[...t];r=S5(r,e.sort),r=E5(r,e.filter);const i=T5(r,e.group);Mn(ne(uy),i)||n(i)}),P5=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new Fo(e,"ui-settings"):null,r="assets-view";Mc.set(await n?.get(r)??{}),Mc.subscribe(i=>{(async()=>{try{Mn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),ni.subscribe(i=>{const s=ne(Mc)?.[i?.internalPath||"*"]??structuredClone(C5);Mn(s,ne(ss))||ss.set(s)}),ss.subscribe(i=>{const s=ne(ni)?.internalPath||"*",o=ne(Mc)?.[s]??{};Mn(i,o)||Mc.update(a=>({...a,[s]:i}))})};Nn.subscribe(t=>{t&&!ne(Mc)&&P5(t)}),tl.subscribe(t=>{kd.set([]),ne(Tt).devModeEnabled&&console.info("listedAssets",t)});var O5=F("<!> <!> <!> <!> <!> <!>",1);function WC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n),o=()=>z(Nn,"$backend",n);let a=ae(ie({...Hp}));const c=w(()=>l(a).publicURL),u=w(()=>l(a).repoBlobURL),d=async()=>{$(a,ie(e.asset?await Vp(e.asset):{...Hp}))};Ue(()=>{e.asset,d()});const f=w(()=>i()("show_edit_options"));Er(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},popup:p=>{const g=w(()=>i()("edit_options"));mr(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=O5(),b=M(_);const y=w(()=>i()("edit")),x=w(()=>i()("edit_asset")),k=w(()=>!e.asset||!BB(e.asset));Lt(b,{variant:"ghost",get label(){return l(y)},get"aria-label"(){return l(x)},get disabled(){return l(k)},onclick:()=>{ot(O_,e.asset)}});var S=D(b,2);const C=w(()=>i()("rename")),E=w(()=>i()("rename_asset")),A=w(()=>!e.asset);Lt(S,{variant:"ghost",get label(){return l(C)},get"aria-label"(){return l(E)},get disabled(){return l(A)},onclick:()=>{ot(jp,e.asset)}});var O=D(S,2);const L=w(()=>i()("replace")),I=w(()=>i()("replace_asset")),N=w(()=>!e.asset);Lt(O,{variant:"ghost",get label(){return l(L)},get"aria-label"(){return l(I)},get disabled(){return l(N)},onclick:()=>{ot(Ls,{folder:void 0,files:[],originalAsset:e.asset}),ot(el,!0)}});var j=D(O,2);Tr(j,{});var H=D(j,2);const B=w(()=>i()("view_on_live_site")),W=w(()=>!l(c));Lt(H,{get label(){return l(B)},get disabled(){return l(W)},onclick:()=>{window.open(l(c))}});var G=D(H,2);{var K=ee=>{const J=w(()=>!o()?.repository||!l(u)),Y=w(()=>i()("view_on_x",{values:{service:o()?.repository?.label},default:i()("view_in_repository")}));Lt(ee,{get disabled(){return l(J)},get label(){return l(Y)},onclick:()=>{window.open(`${l(u)}?plain=1`)}})};U(G,ee=>{s().devModeEnabled&&ee(K)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var $5=F('<!> <h2 role="none"><strong role="none"> </strong></h2> <!> <!> <!> <!> <!>',1);function L5(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ko,"$overlaidAsset",n),s=()=>z(le,"$_",n),o=()=>z(ni,"$selectedAssetFolder",n),a=w(()=>i()?[i()]:[]),c=w(()=>s()("primary"));Zs(t,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=$5(),h=M(f);const p=w(()=>s()("cancel_editing"));Je(h,{variant:"ghost",iconic:!0,get"aria-label"(){return l(p)},keyShortcuts:"Escape",onclick:()=>{Dc(o()?`/assets/${o().internalPath}`:"/assets")},startIcon:A=>{et(A,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var g=D(h,2),m=R(g),v=R(m),_=D(g,2);Yr(_,{flex:!0});var b=D(_,2);AC(b,{get assets(){return l(a)}});var y=D(b,2);VC(y,{get assets(){return l(a)}});var x=D(y,2);const k=w(()=>s()("delete_asset")),S=w(()=>s()("confirm_deleting_this_asset"));HC(x,{get assets(){return l(a)},get buttonDescription(){return l(k)},get dialogDescription(){return l(S)},onDelete:()=>{Dc(o()?`/assets/${o().internalPath}`:"/assets")}});var C=D(x,2);WC(C,{get asset(){return i()}}),q(()=>Z(v,i()?.name)),T(u,f)},$$slots:{default:!0}}),oe(),r()}var N5=F('<iframe class="svelte-1lmpz2c"></iframe>'),I5=F('<div role="figure" class="markdown svelte-1lmpz2c"><!></div>'),R5=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),D5=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),M5=F('<span role="alert"> </span>'),F5=F('<!> <div role="none" class="row svelte-1lmpz2c"><div role="none" class="preview svelte-1lmpz2c"><!></div> <!></div>',1),z5=F('<div role="none" class="wrapper svelte-1lmpz2c"><!></div>');const j5={hash:"svelte-1lmpz2c",code:`.wrapper.svelte-1lmpz2c {display:contents;}.wrapper[hidden].svelte-1lmpz2c {display:none;}.wrapper.svelte-1lmpz2c > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1lmpz2c > .sui.group {filter:opacity(0);}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) {flex:auto;display:flex;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) {flex:auto;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) iframe:where(.svelte-1lmpz2c),
581
+ `}catch(u){console.error(u)}}return""},u8=t=>{const{collection:e}=t,{_i18n:{structure:n},_assetFolder:r}=e,i=e._type==="entry"?e._file.subPath:void 0,s=i?.match(/(?<path>.+?)(?:\/[^/]+)?$/)?.groups?.path??"",o=["multiple_folders","multiple_folders_i18n_root"].includes(n),{entryRelative:a,internalPath:c,publicPath:u}=r??ne(di)[0];return a?{internalBaseAssetFolder:c,internalAssetFolder:E_($s(Fp([c,o||i?.includes("/")?s:void 0]),t)),publicAssetFolder:!o&&/^\.?$/.test(u)?u:E_($s(o?Fp([...Array((i?.match(/\//g)??[]).length+1).fill(".."),u,s]):u,t))}:{internalBaseAssetFolder:c,internalAssetFolder:$s(c,t),publicAssetFolder:$s(u,t)}},zC=({draft:t,locale:e,slug:n})=>{const{collection:r,collectionFile:i,originalEntry:s,currentValues:o}=t;if(i)return i.file.replace("{{locale}}",e);if(s?.locales[e]?.slug===n)return s.locales[e].path;const a=r,{_file:{basePath:c,subPath:u,extension:d},_i18n:{defaultLocale:f,structure:h}}=a,p=u?$s(u,{collection:a,locale:e,content:o[f],currentSlug:n}):n,g={multiple_folders:`${c}/${e}/${p}.${d}`,multiple_folders_i18n_root:`${e}/${c}/${p}.${d}`,multiple_files:`${c}/${p}.${e}.${d}`,single_file:`${c}/${p}.${d}`};return g[h]??g.single_file},tg=({field:t,keyPath:e,keyPathList:n})=>{const{widget:r}=t,i=r==="list";if(n.push(e),i||r==="object"){const{fields:s,types:o,typeKey:a="type"}=t;if(s)s.forEach(c=>{tg({field:c,keyPath:i?`${e}.*.${c.name}`:`${e}.${c.name}`,keyPathList:n})});else if(o)n.push(i?`${e}.*.${a}`:`${e}.${a}`),o.forEach(c=>{c.fields?.forEach(u=>{tg({field:u,keyPath:i?`${e}.*.${u.name}`:`${e}.${u.name}`,keyPathList:n})})});else if(i){const{field:c}=t;c?tg({field:c,keyPath:`${e}.*`,keyPathList:n}):n.push(`${e}.*`)}}if(r==="select"||r==="relation"){const{multiple:s=!1}=t;n.push(s?`${e}.*`:e)}},d8=t=>{const e=[];return t.forEach(n=>{tg({field:n,keyPath:n.name,keyPathList:e})}),e},Id=({key:t,field:e,locale:n,unsortedMap:r,sortedMap:i,isTomlOutput:s,omitEmptyOptionalFields:o})=>{let a=r[t];if(s&&typeof a=="string"&&M5.test(a)&&e?.widget==="datetime")try{a=new Ga(a)}catch{}o&&e&&!xd({fieldConfig:e,locale:n})&&!Object.keys(r).some(c=>c.startsWith(`${t}.`))&&(!a||Array.isArray(a)&&!a.length||Jn(a)&&!Object.keys(a).length)||(i[t]=a),delete r[t]},f8=({collectionName:t,fileName:e,fields:n,locale:r,valueMap:i,canonicalSlugKey:s,isTomlOutput:o=!1})=>{const a=ec(i),c={},{omit_empty_optional_fields:u=!1}=ne(yt)?.output??{},d={locale:r,unsortedMap:a,sortedMap:c,isTomlOutput:o,omitEmptyOptionalFields:u};return s&&s in a&&Id({key:s,...d}),d8(n).forEach(f=>{const h=vn({collectionName:t,fileName:e,valueMap:i,keyPath:f});if(f in a)Id({key:f,field:h,...d});else if(h?.widget==="keyvalue")c[f]={},Object.entries(a).filter(([p])=>p.startsWith(`${f}.`)).forEach(([p])=>{Id({key:p,field:h,...d})});else{const p=new RegExp(`^${cn(f.replaceAll("*","\\d+")).replaceAll("\\\\d\\+","\\d+")}$`);Object.keys(a).filter(g=>p.test(g)).sort(([g,m])=>oi(g,m)).forEach(g=>{Id({key:g,field:h,...d})})}}),Object.keys(a).sort(([f,h])=>oi(f,h)).forEach(f=>{Id({key:f,...d})}),za(c)},ly=({draft:t,locale:e,valueMap:n})=>{const{collection:r,collectionFile:i}=t,{fields:s=[],_file:o,_i18n:{canonicalSlug:{key:a}}}=i??r,c=f8({collectionName:r.name,fileName:i?.name,fields:s,locale:e,valueMap:n,canonicalSlugKey:a,isTomlOutput:["toml","toml-frontmatter"].includes(o.format)});return rC(s)?c[s[0].name]??[]:c},h8=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionFile:r,currentLocales:i,currentSlugs:s,currentValues:o}=t,{identifier_field:a="title",slug:c=`{{${a}}}`}=n,{_i18n:{defaultLocale:u,structure:d}}=r??n,f=[...c.matchAll(/{{(?:fields\.)?(.+?)( \| localize)?}}/g)].filter(([,,p])=>!!p).map(([,p])=>p);if(d==="single_file"||!f.length)return;const h=n;return Object.fromEntries(Object.entries(i).map(([p])=>{const g=p===u?e:s?.[p]??s?._??$s(c,{collection:h,locale:p,content:{...o[u],...Object.fromEntries(f.map(m=>[m,o[p]?.[m]]))}});return[p,g]}))},p8=({draft:t,defaultLocaleSlug:e,localizedSlugs:n,fillSlugOptions:r})=>{if(!n)return;const{collection:i,collectionFile:s}=t,{_i18n:{canonicalSlug:{value:o}}}=s??i;return o==="{{slug}}"?e:$s(o,{...r,currentSlug:e})},jC=({draft:t})=>{const{collection:e,collectionFile:n,currentValues:r}=t,{_i18n:{defaultLocale:i}}=n??e;return{collection:e,content:r[i]}},UC=({draft:t})=>{const{collection:e,collectionFile:n,fileName:r,currentSlugs:i}=t,{identifier_field:s="title",slug:o=`{{${s}}}`}=e,{_i18n:{defaultLocale:a}}=n??e,c=jC({draft:t}),u=r??i?.[a]??i?._??$s(o,c),d=h8({draft:t,defaultLocaleSlug:u}),f=p8({draft:t,defaultLocaleSlug:u,localizedSlugs:d,fillSlugOptions:c});return{defaultLocaleSlug:u,localizedSlugs:d,canonicalSlug:f}},g8=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionName:r,collectionFile:i}=t,s=jC({draft:t}),{_i18n:{defaultLocale:o}}=i??n,a=u8({...s,type:"media_folder",currentSlug:e,entryFilePath:zC({draft:t,locale:o,slug:e})}),{internalBaseAssetFolder:c,internalAssetFolder:u}=a,d=R_(u).map(g=>g.name.normalize()),{email:f,name:h}=ne(fi);return{assetFolderPaths:a,assetNamesInSameFolder:d,savingAssetProps:{text:void 0,collectionName:r,folder:c,commitAuthor:f?{name:h,email:f}:void 0,commitDate:new Date}}},m8=async({blobURL:t,keyPath:e,content:n,changes:r,files:i,savingAssets:s,savingAssetProps:o,assetNamesInSameFolder:a,assetFolderPaths:{internalAssetFolder:c,publicAssetFolder:u}})=>{const d=i[t];if(!d)return;const f=await oa(d),h=s.find(m=>m.sha===f);let p="";if(h)p=h.name;else{p=S_(d.name.normalize(),a);const m=c?`${c}/${p}`:p;a.push(p),r.push({action:"create",path:m,data:d}),s.push({...o,blobURL:URL.createObjectURL(d),name:p,path:m,sha:f,size:d.size,kind:$_(p)})}const g=encodeURI(u?`${u==="/"?"":u}/${p}`:p);n[e]=n[e].replaceAll(t,g)},v8=async({draft:t,slugs:{defaultLocaleSlug:e,canonicalSlug:n,localizedSlugs:r}})=>{const{collection:i,currentLocales:s,collectionFile:o,currentValues:a,files:c}=t,{_i18n:{canonicalSlug:{key:u}}}=o??i,d=[],f=[],h={files:c,changes:d,savingAssets:f,...g8({draft:t,defaultLocaleSlug:e})};return{localizedEntryMap:Object.fromEntries(await Promise.all(Object.entries(a).map(async([g,m])=>{const _=r?.[g]??e,b=zC({draft:t,locale:g,slug:_});return s[g]?(m[u]=n,await Promise.all(Object.entries(m).map(async([y,x])=>{if(x===void 0){delete m[y];return}typeof x=="string"&&(m[y]=x.trim(),await Promise.all([...x.matchAll(Cw("g"))].map(([k])=>m8({blobURL:k,keyPath:y,content:m,...h}))))})),[g,{slug:_,path:b,sha:"",content:ec(m)}]):[g,{path:b}]}))),changes:d,savingAssets:f}},BC=async({draft:t,slugs:e})=>{const{collection:n,isNew:r,originalLocales:i,currentLocales:s,originalSlugs:o,originalEntry:a,collectionFile:c}=t,{defaultLocaleSlug:u}=e,{_file:d,_i18n:{i18nEnabled:f,allLocales:h,defaultLocale:p,structure:g}}=c??n,{localizedEntryMap:m,changes:v,savingAssets:_}=await v8({draft:t,slugs:e}),b={id:a?.id??Wn(),sha:"",slug:u,subPath:d.fullPathRegEx?m[p].path.match(d.fullPathRegEx)?.groups?.subPath??u:u,locales:Object.fromEntries(Object.entries(m))};if(!f||g==="single_file"){const y=b.locales[p],{slug:x,path:k,content:S}=y,C=!r&&(o?.[p]??o?._)!==x,E=await FC({content:f?Object.fromEntries(Object.entries(b.locales).map(([A,O])=>[A,ly({draft:t,locale:A,valueMap:O.content})])):ly({draft:t,locale:"_default",valueMap:S}),_file:d});v.push({action:r?"create":C?"move":"update",slug:x,path:k,previousPath:C?a?.locales[p].path:void 0,data:E}),y.sha=await oa(new Blob([E],{type:"text/plain"}))}else await Promise.all(h.map(async y=>{const x=b.locales[y],{slug:k,path:S,content:C}=x??{};if(s[y]){const E=!r&&i[y]&&(o?.[y]??o?._)!==k,A=await FC({content:ly({draft:t,locale:y,valueMap:C}),_file:d});v.push({action:r||!i[y]?"create":E?"move":"update",slug:k,path:S,previousPath:E?a?.locales[y]?.path:void 0,data:A}),x.sha=await oa(new Blob([A],{type:"text/plain"}))}else!r&&i[y]&&v.push({action:"delete",slug:k,path:S});return!0}));return b.sha=b.locales[p].sha,{savingEntry:b,savingAssets:_,changes:v}},b8=async({skipCI:t=void 0}={})=>{const e=ne(nt),{collection:n,isNew:r,collectionName:i,fileName:s,currentValues:o}=e;if(!c8())throw c5({collectionName:i,fileName:s,currentValues:o}),new Error("validation_failed");const a=UC({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await BC({draft:e,slugs:a});try{await ne(Nn).commitChanges(d,{commitType:r?"create":"update",collection:n,skipCI:t})}catch(v){throw console.error(v.cause??v),new Error("saving_failed",{cause:v.cause??v})}const h=f.map(v=>v.path);ri.update(v=>[...v.filter(_=>_.id!==u.id),u]),tn.update(v=>[...v.filter(_=>!h.includes(_.path)),...f]);const p=ne(Is)==="local",g=ne(yt)?.backend.automatic_deployments,m=!p&&(t===void 0?g===!0:t===!1);return Ld.set({...Xa,saved:!0,published:m,count:1}),Zp.set(m),eg(i,r?"":c),u},Zo=st({...Xa}),qC=async(t,e)=>{const{files:n,folder:r,originalAsset:i}=t,s=r?R_(r).map(h=>h.name.normalize()):[],o=n.map(h=>{const p=i?.name??S_(h.name.normalize(),s);return s.includes(p)||s.push(p),{action:i?"update":"create",name:p,path:[r,p].join("/"),file:h}});await ne(Nn)?.commitChanges(o.map(({action:h,path:p,file:g})=>({action:h,path:p,data:g})),e);const a=await Promise.all(o.map(async({name:h,path:p,file:g})=>({blobURL:URL.createObjectURL(g),name:h,path:p,sha:await oa(g),size:g.size,kind:$_(h),text:void 0,folder:r})));tn.update(h=>[...h.filter(p=>!a.some(g=>g.path===p.path)),...a]);const c=ne(uo),u=ne(Ko);c&&uo.set(ne(tn).find(h=>h.path===c.path)),u&&Ko.set(ne(tn).find(h=>h.path===u.path));const d=ne(Is)==="local",f=ne(yt)?.backend.automatic_deployments;Zo.set({...Xa,saved:!0,published:!d&&f===!0,count:n.length})},_8=async(t,e)=>{const n=ne(di),r=[],i=[],s=[];await Promise.all(e.map(async({asset:f,path:h})=>{const p=h,g=$n(p).basename;s.push({...f,path:p,name:g}),r.push({action:"move",path:p,previousPath:f.path,data:new File([f.file??await Va(f)],g)});const m=f.blobURL??qp(f),v=m?await C_(m):[];if(!m||!v.length)return;const{publicPath:_}=n.find(({collectionName:y})=>N_(f).some(x=>x.name===y))??n.find(({collectionName:y})=>!y)??{},b=await C_(m,{entries:structuredClone(v),newURL:p.replace(f.folder,_??"")});await Promise.all(b.map(async y=>{const{locales:x}=y,k=Object.fromEntries(Object.entries(x).map(([A])=>[A,!0])),S=Object.fromEntries(Object.entries(x).map(([A,{slug:O}])=>[A,O])),C=Object.fromEntries(Object.entries(x).map(([A,{content:O}])=>[A,O])),E={isNew:!1,originalEntry:y,originalLocales:k,currentLocales:k,originalSlugs:S,currentSlugs:S,originalValues:C,currentValues:C,files:{},validities:{},expanderStates:{}};await Promise.all(co(y).map(async A=>{const O=async I=>{const N={...E,collection:A,collectionName:A.name,collectionFile:I,fileName:I?.name},{savingEntry:j,changes:H}=await BC({draft:N,slugs:UC({draft:N})});i.push(j),r.push(...H)},L=Wo(A,y);L.length?await Promise.all(L.map(O)):await O()}))}))}));const o=await ne(Nn)?.commitChanges(r,{commitType:"uploadMedia"});Array.isArray(o)&&s.forEach((f,h)=>{o[h]instanceof File&&(f.blobURL=URL.createObjectURL(o[h]))});const a=e.map(f=>f.asset.path),c=i.map(f=>f.id);tn.update(f=>[...f.filter(h=>!a.includes(h.path)),...s]),ri.update(f=>[...f.filter(h=>!c.includes(h.id)),...i]);const u=e.find(f=>f.asset.path===ne(uo)?.path),d=e.find(f=>f.asset.path===ne(Ko)?.path);u&&uo.set(ne(tn).find(f=>f.path===u.path)),d&&Ko.set(ne(tn).find(f=>f.path===d.path)),Zo.set({...Xa,moved:t==="move",renamed:t==="rename",count:e.length})},y8=async t=>{await ne(Nn)?.commitChanges(t.map(({path:e})=>({action:"delete",path:e})),{commitType:"deleteMedia"}),tn.update(e=>e.filter(n=>!t.includes(n))),Zo.set({...Xa,deleted:!0,count:t.length})};var w8=F("<!> <!>",1);function HC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"buttonDescription",3,""),a=P(e,"dialogDescription",3,""),c=P(e,"onDelete",3,void 0),u=ae(!1);var d=w8(),f=M(d);const h=w(()=>!s().length),p=w(()=>i()("delete"));Je(f,{variant:"ghost",get disabled(){return l(h)},get label(){return l(p)},get"aria-label"(){return o()},onclick:()=>{$(u,!0)}});var g=D(f,2);const m=w(()=>s().length===1?i()("delete_asset"):i()("delete_assets")),v=w(()=>i()("delete"));kl(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{y8(s()),c()?.()},get open(){return l(u)},set open(_){$(u,ie(_))},children:(_,b)=>{var y=Be();q(()=>Z(y,a())),T(_,y)},$$slots:{default:!0}}),T(t,d),oe(),r()}var x8=F("<!> <!>",1);function VC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(!1);const a=async()=>{for(const p of s())FP(await Va(p),p.name),await hn(300);$(o,!0)};var c=x8(),u=M(c);const d=w(()=>!s().length),f=w(()=>i()("download"));Je(u,{variant:"ghost",get disabled(){return l(d)},get label(){return l(f)},onclick:()=>{a()}});var h=D(u,2);Gn(h,{get show(){return l(o)},set show(p){$(o,ie(p))},children:(p,g)=>{Bn(p,{status:"success",children:(m,v)=>{var _=Be();q(b=>Z(_,b),[()=>s().length===1?i()("asset_downloaded"):i()("assets_downloaded")]),T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,c),oe(),r()}const el=st(!1),k8=Qn([Ls],([t],e)=>{e(!!t.files.length)}),ng=t=>t==="*"?ne(le)("all_assets"):t?ne(yt)?.collections.find(({name:e})=>e===t)?.label??"":ne(le)("uncategorized"),cy=t=>{const{media_folder:e}=ne(yt);if(!t)return ng("*");if(t===e)return ng(void 0);const n=ne(di).find(({internalPath:r})=>r===t);return n?ng(n.collectionName):""},S8=(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,s=o=>{const{commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=o;return e==="commit_author"?a||c||u:e==="commit_date"?d:e==="name"?o.name.split(".")[0]:o[e]??""};return r.sort((o,a)=>{const c=s(o),u=s(a);return i===String?oi(c,u):i===Date?Number(c)-Number(u):c-u}),n==="descending"&&r.reverse(),r},E8=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>n==="other"?!Object.values(A_).some(s=>s.test(i)):A_[n].test(i));const r=typeof n=="string"?new RegExp(n):void 0;return t.filter(i=>{const s=i[e];return r?r.test(String(s??"")):s===n})},T8=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=typeof n=="string"?new RegExp(n):void 0,i={},s=ne(le)("other");return t.forEach(o=>{const a=o[e];let c;r?[c=s]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(o)}),Object.fromEntries(Object.entries(i).sort(([o],[a])=>oi(o,a)))},C8={type:"grid",showInfo:!0,sort:{key:"name",order:"ascending"}},ss=st({type:"grid",showInfo:!0}),Mc=st(),A8=Qn([tn,Ln],([t],e)=>{const n=["name"];t.every(r=>!!r.commitAuthor)&&n.push("commit_author"),t.every(r=>!!r.commitDate)&&n.push("commit_date"),e(n.map(r=>({key:r,label:ne(le)(`sort_keys.${r}`)})))}),tl=Qn([tn,ni],([t,e],n)=>{n(t&&e?t.filter(({folder:r})=>e.internalPath===r):t?[...t]:[])}),uy=Qn([tl,ss],([t,e],n)=>{let r=[...t];r=S8(r,e.sort),r=E8(r,e.filter);const i=T8(r,e.group);Mn(ne(uy),i)||n(i)}),P8=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new Fo(e,"ui-settings"):null,r="assets-view";Mc.set(await n?.get(r)??{}),Mc.subscribe(i=>{(async()=>{try{Mn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),ni.subscribe(i=>{const s=ne(Mc)?.[i?.internalPath||"*"]??structuredClone(C8);Mn(s,ne(ss))||ss.set(s)}),ss.subscribe(i=>{const s=ne(ni)?.internalPath||"*",o=ne(Mc)?.[s]??{};Mn(i,o)||Mc.update(a=>({...a,[s]:i}))})};Nn.subscribe(t=>{t&&!ne(Mc)&&P8(t)}),tl.subscribe(t=>{kd.set([]),ne(Tt).devModeEnabled&&console.info("listedAssets",t)});var O8=F("<!> <!> <!> <!> <!> <!>",1);function WC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n),o=()=>z(Nn,"$backend",n);let a=ae(ie({...Hp}));const c=w(()=>l(a).publicURL),u=w(()=>l(a).repoBlobURL),d=async()=>{$(a,ie(e.asset?await Vp(e.asset):{...Hp}))};Ue(()=>{e.asset,d()});const f=w(()=>i()("show_edit_options"));Er(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},popup:p=>{const g=w(()=>i()("edit_options"));mr(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=O8(),b=M(_);const y=w(()=>i()("edit")),x=w(()=>i()("edit_asset")),k=w(()=>!e.asset||!BB(e.asset));Lt(b,{variant:"ghost",get label(){return l(y)},get"aria-label"(){return l(x)},get disabled(){return l(k)},onclick:()=>{ot(O_,e.asset)}});var S=D(b,2);const C=w(()=>i()("rename")),E=w(()=>i()("rename_asset")),A=w(()=>!e.asset);Lt(S,{variant:"ghost",get label(){return l(C)},get"aria-label"(){return l(E)},get disabled(){return l(A)},onclick:()=>{ot(jp,e.asset)}});var O=D(S,2);const L=w(()=>i()("replace")),I=w(()=>i()("replace_asset")),N=w(()=>!e.asset);Lt(O,{variant:"ghost",get label(){return l(L)},get"aria-label"(){return l(I)},get disabled(){return l(N)},onclick:()=>{ot(Ls,{folder:void 0,files:[],originalAsset:e.asset}),ot(el,!0)}});var j=D(O,2);Tr(j,{});var H=D(j,2);const B=w(()=>i()("view_on_live_site")),W=w(()=>!l(c));Lt(H,{get label(){return l(B)},get disabled(){return l(W)},onclick:()=>{window.open(l(c))}});var G=D(H,2);{var K=ee=>{const J=w(()=>!o()?.repository||!l(u)),Y=w(()=>i()("view_on_x",{values:{service:o()?.repository?.label},default:i()("view_in_repository")}));Lt(ee,{get disabled(){return l(J)},get label(){return l(Y)},onclick:()=>{window.open(`${l(u)}?plain=1`)}})};U(G,ee=>{s().devModeEnabled&&ee(K)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var $8=F('<!> <h2 role="none"><strong role="none"> </strong></h2> <!> <!> <!> <!> <!>',1);function L8(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ko,"$overlaidAsset",n),s=()=>z(le,"$_",n),o=()=>z(ni,"$selectedAssetFolder",n),a=w(()=>i()?[i()]:[]),c=w(()=>s()("primary"));Zs(t,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=$8(),h=M(f);const p=w(()=>s()("cancel_editing"));Je(h,{variant:"ghost",iconic:!0,get"aria-label"(){return l(p)},keyShortcuts:"Escape",onclick:()=>{Dc(o()?`/assets/${o().internalPath}`:"/assets")},startIcon:A=>{et(A,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var g=D(h,2),m=R(g),v=R(m),_=D(g,2);Yr(_,{flex:!0});var b=D(_,2);AC(b,{get assets(){return l(a)}});var y=D(b,2);VC(y,{get assets(){return l(a)}});var x=D(y,2);const k=w(()=>s()("delete_asset")),S=w(()=>s()("confirm_deleting_this_asset"));HC(x,{get assets(){return l(a)},get buttonDescription(){return l(k)},get dialogDescription(){return l(S)},onDelete:()=>{Dc(o()?`/assets/${o().internalPath}`:"/assets")}});var C=D(x,2);WC(C,{get asset(){return i()}}),q(()=>Z(v,i()?.name)),T(u,f)},$$slots:{default:!0}}),oe(),r()}var N8=F('<iframe class="svelte-1lmpz2c"></iframe>'),I8=F('<div role="figure" class="markdown svelte-1lmpz2c"><!></div>'),R8=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),D8=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),M8=F('<span role="alert"> </span>'),F8=F('<!> <div role="none" class="row svelte-1lmpz2c"><div role="none" class="preview svelte-1lmpz2c"><!></div> <!></div>',1),z8=F('<div role="none" class="wrapper svelte-1lmpz2c"><!></div>');const j8={hash:"svelte-1lmpz2c",code:`.wrapper.svelte-1lmpz2c {display:contents;}.wrapper[hidden].svelte-1lmpz2c {display:none;}.wrapper.svelte-1lmpz2c > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1lmpz2c > .sui.group {filter:opacity(0);}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) {flex:auto;display:flex;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) {flex:auto;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) iframe:where(.svelte-1lmpz2c),
582
582
  .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c),
583
583
  .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {display:block;width:100%;height:100%;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c),
584
- .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {margin:0;padding:16px;overflow:auto;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c) {white-space:pre-wrap;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .detail {background-color:var(--sui-primary-background-color);}`};function U5(t,e){se(e,!0),Ee(t,j5);const[n,r]=me(),i=()=>z(Ko,"$overlaidAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n);let a=ae(void 0),c,u=ae(!1),d=ae(!0),f=ae(void 0);const h=w(()=>i()?.kind),p=w(()=>i()?.blobURL),g=w(()=>i()?.name),m=async()=>{await pl(),c&&(c.tabIndex=0,c.focus())};Ue(()=>{i()&&(async()=>$(f,ie(await Va(i()))))()}),Ue(()=>{l(a)&&!c&&(c=l(a).querySelector('[role="group"]'),c.addEventListener("transitionend",()=>{s()||($(u,!1),$(d,!0))}))}),Ue(()=>{l(a)&&(s()?($(u,!1),$(d,!1),m()):$(u,!0))});var v=z5(),_=R(v);const b=w(()=>o()("asset_editor"));_r(_,{get"aria-label"(){return l(b)},children:(y,x)=>{var k=V(),S=M(k);ms(S,()=>i()?.sha,C=>{var E=F5(),A=M(E);L5(A,{});var O=D(A,2),L=R(O),I=R(L);{var N=W=>{const G=w(()=>["image","video"].includes(l(h))),K=w(()=>l(h)==="image"),ee=w(()=>l(h)==="image"?l(g):void 0),J=w(()=>["audio","video"].includes(l(h)));Ds(W,{get kind(){return l(h)},get asset(){return i()},get blurBackground(){return l(G)},get checkerboard(){return l(K)},get alt(){return l(ee)},get controls(){return l(J)}})},j=W=>{var G=V(),K=M(G);{var ee=Y=>{var te=N5();q(()=>{ke(te,"src",l(p)),ke(te,"title",l(g))}),T(Y,te)},J=Y=>{var te=V(),ce=M(te);{var he=X=>{var fe=V(),be=M(fe);hr(be,()=>i()?.text??l(f).text(),null,(ue,Te)=>{var _e=V(),Ae=M(_e);{var Ce=Ve=>{var We=V(),pt=M(We);hr(pt,()=>Ot.parse(l(Te),{breaks:!0,async:!0}),null,(Ke,ge)=>{var ye=I5(),we=R(ye);pr(we,()=>li.sanitize(l(ge))),T(Ke,ye)},Ke=>{var ge=R5(),ye=R(ge);q(()=>Z(ye,l(Te))),T(Ke,ge)}),T(Ve,We)},$e=Ve=>{var We=D5(),pt=R(We);q(()=>Z(pt,l(Te))),T(Ve,We)};U(Ae,Ve=>{l(g)?.endsWith(".md")?Ve(Ce):Ve($e,!1)})}T(ue,_e)}),T(X,fe)},re=X=>{$r(X,{children:(fe,be)=>{var ue=M5(),Te=R(ue);q(_e=>Z(Te,_e),[()=>o()("preview_unavailable")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(f)?.type&&Qc(l(f).type)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(f)?.type==="application/pdf"?Y(ee):Y(J,!1)},!0)}T(W,G)};U(I,W=>{l(h)&&Up(l(h))?W(N):W(j,!1)})}var H=D(L,2);{var B=W=>{CC(W,{get asset(){return i()}})};U(H,W=>{i()&&W(B)})}T(C,E)}),T(y,k)},$$slots:{default:!0}}),Pt(v,y=>$(a,y),()=>l(a)),q(()=>{v.hidden=l(d),v.inert=!s(),ht(v,"hiding",l(u))}),T(t,v),oe(),r()}var B5=F('<div role="none" class="wrapper svelte-1wzrlmj"><!></div>');const q5={hash:"svelte-1wzrlmj",code:".wrapper.svelte-1wzrlmj {display:contents;}.wrapper.svelte-1wzrlmj textarea {min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical;}.wrapper.wrap.svelte-1wzrlmj textarea {text-wrap:wrap;}"};function H5(t,e){se(e,!0),Ee(t,q5);const[n,r]=me(),i=()=>z(O_,"$editingAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=w(i);let c=ae(!1),u=ae(void 0),d=ae(void 0),f=ae(void 0),h=ae(!1);const p=async()=>{$(u,ie(await Va(l(a)))),$(d,ie(await l(u).text())),$(f,ie(l(d))),$(c,!0)},g=()=>{ot(O_,void 0),$(u,void 0),$(d,void 0),$(f,void 0)},m=async()=>{l(a)&&l(u)&&typeof l(f)=="string"&&await qC({folder:l(a).folder,files:[new File([l(f)],l(a).name,{type:l(u).type})],originalAsset:l(a)},{commitType:"uploadMedia"})};Ue(()=>{l(a)&&l(u)===void 0&&p()}),Ue(()=>{s()||$(c,!1)});const v=w(()=>o()("edit_x",{values:{name:l(a)?.name}})),_=w(()=>o()("save")),b=w(()=>l(f)===l(d));Ui(t,{size:"x-large",get title(){return l(v)},get okLabel(){return l(_)},get okDisabled(){return l(b)},onOk:()=>{m()},onClose:()=>{g()},get open(){return l(c)},set open(x){$(c,ie(x))},footerExtra:x=>{const k=w(()=>o()("wrap_long_lines"));fu(x,{get label(){return l(k)},get checked(){return l(h)},set checked(S){$(h,ie(S))}})},children:(x,k)=>{var S=B5(),C=R(S);$h(C,{flex:!0,get value(){return l(f)},set value(E){$(f,ie(E))}}),q(()=>ht(S,"wrap",l(h))),T(x,S)},$$slots:{footerExtra:!0,default:!0}}),oe(),r()}var V5=F('<span role="none"> </span>'),W5=F('<p class="svelte-via8re"> </p> <div role="none" class="svelte-via8re"><!> <!></div> <div class="error svelte-via8re"><!></div>',1);const G5={hash:"svelte-via8re",code:"p.svelte-via8re {margin:0 0 8px;}div.svelte-via8re {display:flex;align-items:center;gap:4px;}.error.svelte-via8re {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function K5(t,e){se(e,!0),Ee(t,G5);const[n,r]=me(),i=()=>z(jp,"$renamingAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=Wn("short");let c=ae(!1),u=ae(ie({filename:""})),d=ae(""),f=ae(ie([])),h=ae(ie([]));const p=w(i),g=w(()=>l(u).dirname),m=w(()=>l(u).filename),v=w(()=>l(u).extension),_=w(()=>{if(!l(d).trim())return"empty";if(l(d).includes("/"))return"character";if(l(f).includes(`${l(d)}${l(v)?`.${l(v)}`:""}`))return"duplicate"}),b=w(()=>!!l(_)),y=async()=>{l(p)&&($(u,ie($n(l(p).path))),$(d,ie(l(m))),$(f,ie(R_(l(g)).map(C=>C.name).filter(C=>C!==l(p).name))),await(async C=>$(h,ie(C.usedEntries)))(await Vp(l(p))),$(c,!0))};Ue(()=>{l(p)&&y()}),Ue(()=>{s()||($(c,!1),ot(jp,void 0))});const x=w(()=>o()("rename_x",{values:{name:l(p)?.name}})),k=w(()=>o()("rename")),S=w(()=>l(d)===l(m)||l(b));Ui(t,{get title(){return l(x)},get okLabel(){return l(k)},get okDisabled(){return l(S)},onOk:()=>{l(p)&&_5("rename",[{asset:l(p),path:`${l(g)}/${l(d)}${l(v)?`.${l(v)}`:""}`}])},onClose:()=>{ot(jp,void 0)},get open(){return l(c)},set open(C){$(c,ie(C))},children:(C,E)=>{var A=W5(),O=M(A),L=R(O),I=D(O,2),N=R(I);yn(N,{flex:!0,get invalid(){return l(b)},"aria-errormessage":`${a??""}-error`,get value(){return l(d)},set value(K){$(d,ie(K))}});var j=D(N,2);{var H=K=>{var ee=V5(),J=R(ee);q(()=>Z(J,`.${l(v)??""}`)),T(K,ee)};U(j,K=>{l(v)&&K(H)})}var B=D(I,2);ke(B,"id",`${a??""}-error`);var W=R(B);{var G=K=>{var ee=Be();q(J=>Z(ee,J),[()=>o()(`enter_new_name_for_asset_error.${l(_)}`)]),T(K,ee)};U(W,K=>{l(b)&&K(G)})}q(K=>Z(L,K),[()=>o()(l(h).length===0?"enter_new_name_for_asset":l(h).length===1?"enter_new_name_for_asset_with_one_entry":"enter_new_name_for_asset_with_many_entries",{values:{count:l(h).length}})]),T(C,A)},$$slots:{default:!0}}),oe(),r()}var Y5=F('<span role="none"> </span>'),J5=F("<!> <!> <!>",1);function Z5(t,e){se(e,!0);const[n,r]=me(),i=()=>z(tl,"$listedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(kd,"$selectedAssets",n),a=w(()=>e.asset.name),c=w(()=>e.asset.kind),u=f=>{kd.update(h=>{const p=h.indexOf(e.asset);return f&&p===-1&&h.push(e.asset),!f&&p>-1&&h.splice(p,1),h})},d=w(()=>i().indexOf(e.asset));lu(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onfocus:()=>{ot(uo,e.asset)},ondblclick:()=>{s()&&YT(s())&&zn(`/assets/${s().path}`)},children:(f,h)=>{var p=J5(),g=M(p);ai(g,{class:"checkbox",children:(_,b)=>{const y=w(()=>o().includes(e.asset));au(_,{role:"none",tabindex:"-1",get checked(){return l(y)},onChange:({detail:{checked:x}})=>{u(x)}})},$$slots:{default:!0}});var m=D(g,2);ai(m,{class:"image",children:(_,b)=>{const y=w(()=>e.viewType==="list"?"icon":"tile"),x=w(()=>l(c)==="image");Ds(_,{get kind(){return l(c)},get asset(){return e.asset},get variant(){return l(y)},get checkerboard(){return l(x)}})},$$slots:{default:!0}});var v=D(m,2);ai(v,{class:"title",children:(_,b)=>{var y=Y5(),x=R(y);q(()=>Z(x,l(a))),T(_,y)},$$slots:{default:!0}}),T(f,p)},$$slots:{default:!0}}),oe(),r()}function dy(t,e){let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",3,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"alt",3,""),d=at(e,["$$slots","$$events","$$legacy","loading","asset","src","variant","blurBackground","cover","checkerboard","alt"]);Ds(t,Qt({kind:"image",get loading(){return n()},get asset(){return r()},get src(){return i()},get variant(){return s()},get blurBackground(){return o()},get cover(){return a()},get checkerboard(){return c()},get alt(){return u()}},()=>d))}var X5=F('<span role="none" class="image svelte-1aay9a6"><!></span>'),Q5=F('<div role="none" class="file svelte-1aay9a6"><!> <div role="none" class="meta svelte-1aay9a6"><div role="none" class="name"> </div> <div role="none" class="size svelte-1aay9a6"> </div></div> <!></div>'),eH=F('<div role="none" class="files svelte-1aay9a6"></div>');const tH={hash:"svelte-1aay9a6",code:".files.svelte-1aay9a6 {display:flex;flex-direction:column;gap:16px;padding:16px 0 0;}.file.svelte-1aay9a6 {display:flex;align-items:center;gap:16px;}.file.svelte-1aay9a6 .image:where(.svelte-1aay9a6) {display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color);}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) {flex:auto;display:flex;flex-direction:column;gap:4px;text-align:left;}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) .size:where(.svelte-1aay9a6) {font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color);}"};function GC(t,e){se(e,!0),Ee(t,tH);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(le,"$_",n);let o=P(e,"files",31,()=>ie([]));var a=eH();dt(a,21,o,Xn,(c,u,d)=>{var f=Q5();const h=w(()=>{const{name:A,type:O,size:L}=l(u);return{name:A,type:O,size:L}}),p=w(()=>{const{extension:A=""}=$n(l(h).name);return{extension:A}});var g=R(f);{var m=A=>{const O=w(()=>URL.createObjectURL(l(u)));dy(A,{get src(){return l(O)},variant:"icon",checkerboard:!0})},v=A=>{var O=X5(),L=R(O);et(L,{name:"draft"}),T(A,O)};U(g,A=>{l(h).type.startsWith("image/")?A(m):A(v,!1)})}var _=D(g,2),b=R(_),y=R(b),x=D(b,2),k=R(x),S=D(_,2);const C=w(()=>s()("remove")),E=w(()=>o().length===1);Je(S,{variant:"ghost",iconic:!0,get"aria-label"(){return l(C)},get hidden(){return l(E)},onclick:A=>{A.stopPropagation(),o().splice(d,1),o([...o()])},children:(A,O)=>{et(A,{name:"close"})},$$slots:{default:!0}}),q((A,O,L)=>{Z(y,A),Z(k,`${O??""}
584
+ .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {margin:0;padding:16px;overflow:auto;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c) {white-space:pre-wrap;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .detail {background-color:var(--sui-primary-background-color);}`};function U8(t,e){se(e,!0),Ee(t,j8);const[n,r]=me(),i=()=>z(Ko,"$overlaidAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n);let a=ae(void 0),c,u=ae(!1),d=ae(!0),f=ae(void 0);const h=w(()=>i()?.kind),p=w(()=>i()?.blobURL),g=w(()=>i()?.name),m=async()=>{await pl(),c&&(c.tabIndex=0,c.focus())};Ue(()=>{i()&&(async()=>$(f,ie(await Va(i()))))()}),Ue(()=>{l(a)&&!c&&(c=l(a).querySelector('[role="group"]'),c.addEventListener("transitionend",()=>{s()||($(u,!1),$(d,!0))}))}),Ue(()=>{l(a)&&(s()?($(u,!1),$(d,!1),m()):$(u,!0))});var v=z8(),_=R(v);const b=w(()=>o()("asset_editor"));_r(_,{get"aria-label"(){return l(b)},children:(y,x)=>{var k=V(),S=M(k);ms(S,()=>i()?.sha,C=>{var E=F8(),A=M(E);L8(A,{});var O=D(A,2),L=R(O),I=R(L);{var N=W=>{const G=w(()=>["image","video"].includes(l(h))),K=w(()=>l(h)==="image"),ee=w(()=>l(h)==="image"?l(g):void 0),J=w(()=>["audio","video"].includes(l(h)));Ds(W,{get kind(){return l(h)},get asset(){return i()},get blurBackground(){return l(G)},get checkerboard(){return l(K)},get alt(){return l(ee)},get controls(){return l(J)}})},j=W=>{var G=V(),K=M(G);{var ee=Y=>{var te=N8();q(()=>{ke(te,"src",l(p)),ke(te,"title",l(g))}),T(Y,te)},J=Y=>{var te=V(),ce=M(te);{var he=X=>{var fe=V(),be=M(fe);hr(be,()=>i()?.text??l(f).text(),null,(ue,Te)=>{var _e=V(),Ae=M(_e);{var Ce=Ve=>{var We=V(),pt=M(We);hr(pt,()=>Ot.parse(l(Te),{breaks:!0,async:!0}),null,(Ke,ge)=>{var ye=I8(),we=R(ye);pr(we,()=>li.sanitize(l(ge))),T(Ke,ye)},Ke=>{var ge=R8(),ye=R(ge);q(()=>Z(ye,l(Te))),T(Ke,ge)}),T(Ve,We)},$e=Ve=>{var We=D8(),pt=R(We);q(()=>Z(pt,l(Te))),T(Ve,We)};U(Ae,Ve=>{l(g)?.endsWith(".md")?Ve(Ce):Ve($e,!1)})}T(ue,_e)}),T(X,fe)},re=X=>{$r(X,{children:(fe,be)=>{var ue=M8(),Te=R(ue);q(_e=>Z(Te,_e),[()=>o()("preview_unavailable")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(f)?.type&&Qc(l(f).type)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(f)?.type==="application/pdf"?Y(ee):Y(J,!1)},!0)}T(W,G)};U(I,W=>{l(h)&&Up(l(h))?W(N):W(j,!1)})}var H=D(L,2);{var B=W=>{CC(W,{get asset(){return i()}})};U(H,W=>{i()&&W(B)})}T(C,E)}),T(y,k)},$$slots:{default:!0}}),Pt(v,y=>$(a,y),()=>l(a)),q(()=>{v.hidden=l(d),v.inert=!s(),ht(v,"hiding",l(u))}),T(t,v),oe(),r()}var B8=F('<div role="none" class="wrapper svelte-1wzrlmj"><!></div>');const q8={hash:"svelte-1wzrlmj",code:".wrapper.svelte-1wzrlmj {display:contents;}.wrapper.svelte-1wzrlmj textarea {min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical;}.wrapper.wrap.svelte-1wzrlmj textarea {text-wrap:wrap;}"};function H8(t,e){se(e,!0),Ee(t,q8);const[n,r]=me(),i=()=>z(O_,"$editingAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=w(i);let c=ae(!1),u=ae(void 0),d=ae(void 0),f=ae(void 0),h=ae(!1);const p=async()=>{$(u,ie(await Va(l(a)))),$(d,ie(await l(u).text())),$(f,ie(l(d))),$(c,!0)},g=()=>{ot(O_,void 0),$(u,void 0),$(d,void 0),$(f,void 0)},m=async()=>{l(a)&&l(u)&&typeof l(f)=="string"&&await qC({folder:l(a).folder,files:[new File([l(f)],l(a).name,{type:l(u).type})],originalAsset:l(a)},{commitType:"uploadMedia"})};Ue(()=>{l(a)&&l(u)===void 0&&p()}),Ue(()=>{s()||$(c,!1)});const v=w(()=>o()("edit_x",{values:{name:l(a)?.name}})),_=w(()=>o()("save")),b=w(()=>l(f)===l(d));Ui(t,{size:"x-large",get title(){return l(v)},get okLabel(){return l(_)},get okDisabled(){return l(b)},onOk:()=>{m()},onClose:()=>{g()},get open(){return l(c)},set open(x){$(c,ie(x))},footerExtra:x=>{const k=w(()=>o()("wrap_long_lines"));fu(x,{get label(){return l(k)},get checked(){return l(h)},set checked(S){$(h,ie(S))}})},children:(x,k)=>{var S=B8(),C=R(S);$h(C,{flex:!0,get value(){return l(f)},set value(E){$(f,ie(E))}}),q(()=>ht(S,"wrap",l(h))),T(x,S)},$$slots:{footerExtra:!0,default:!0}}),oe(),r()}var V8=F('<span role="none"> </span>'),W8=F('<p class="svelte-via8re"> </p> <div role="none" class="svelte-via8re"><!> <!></div> <div class="error svelte-via8re"><!></div>',1);const G8={hash:"svelte-via8re",code:"p.svelte-via8re {margin:0 0 8px;}div.svelte-via8re {display:flex;align-items:center;gap:4px;}.error.svelte-via8re {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function K8(t,e){se(e,!0),Ee(t,G8);const[n,r]=me(),i=()=>z(jp,"$renamingAsset",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=Wn("short");let c=ae(!1),u=ae(ie({filename:""})),d=ae(""),f=ae(ie([])),h=ae(ie([]));const p=w(i),g=w(()=>l(u).dirname),m=w(()=>l(u).filename),v=w(()=>l(u).extension),_=w(()=>{if(!l(d).trim())return"empty";if(l(d).includes("/"))return"character";if(l(f).includes(`${l(d)}${l(v)?`.${l(v)}`:""}`))return"duplicate"}),b=w(()=>!!l(_)),y=async()=>{l(p)&&($(u,ie($n(l(p).path))),$(d,ie(l(m))),$(f,ie(R_(l(g)).map(C=>C.name).filter(C=>C!==l(p).name))),await(async C=>$(h,ie(C.usedEntries)))(await Vp(l(p))),$(c,!0))};Ue(()=>{l(p)&&y()}),Ue(()=>{s()||($(c,!1),ot(jp,void 0))});const x=w(()=>o()("rename_x",{values:{name:l(p)?.name}})),k=w(()=>o()("rename")),S=w(()=>l(d)===l(m)||l(b));Ui(t,{get title(){return l(x)},get okLabel(){return l(k)},get okDisabled(){return l(S)},onOk:()=>{l(p)&&_8("rename",[{asset:l(p),path:`${l(g)}/${l(d)}${l(v)?`.${l(v)}`:""}`}])},onClose:()=>{ot(jp,void 0)},get open(){return l(c)},set open(C){$(c,ie(C))},children:(C,E)=>{var A=W8(),O=M(A),L=R(O),I=D(O,2),N=R(I);yn(N,{flex:!0,get invalid(){return l(b)},"aria-errormessage":`${a??""}-error`,get value(){return l(d)},set value(K){$(d,ie(K))}});var j=D(N,2);{var H=K=>{var ee=V8(),J=R(ee);q(()=>Z(J,`.${l(v)??""}`)),T(K,ee)};U(j,K=>{l(v)&&K(H)})}var B=D(I,2);ke(B,"id",`${a??""}-error`);var W=R(B);{var G=K=>{var ee=Be();q(J=>Z(ee,J),[()=>o()(`enter_new_name_for_asset_error.${l(_)}`)]),T(K,ee)};U(W,K=>{l(b)&&K(G)})}q(K=>Z(L,K),[()=>o()(l(h).length===0?"enter_new_name_for_asset":l(h).length===1?"enter_new_name_for_asset_with_one_entry":"enter_new_name_for_asset_with_many_entries",{values:{count:l(h).length}})]),T(C,A)},$$slots:{default:!0}}),oe(),r()}var Y8=F('<span role="none"> </span>'),J8=F("<!> <!> <!>",1);function Z8(t,e){se(e,!0);const[n,r]=me(),i=()=>z(tl,"$listedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(kd,"$selectedAssets",n),a=w(()=>e.asset.name),c=w(()=>e.asset.kind),u=f=>{kd.update(h=>{const p=h.indexOf(e.asset);return f&&p===-1&&h.push(e.asset),!f&&p>-1&&h.splice(p,1),h})},d=w(()=>i().indexOf(e.asset));lu(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onfocus:()=>{ot(uo,e.asset)},ondblclick:()=>{s()&&YT(s())&&zn(`/assets/${s().path}`)},children:(f,h)=>{var p=J8(),g=M(p);ai(g,{class:"checkbox",children:(_,b)=>{const y=w(()=>o().includes(e.asset));au(_,{role:"none",tabindex:"-1",get checked(){return l(y)},onChange:({detail:{checked:x}})=>{u(x)}})},$$slots:{default:!0}});var m=D(g,2);ai(m,{class:"image",children:(_,b)=>{const y=w(()=>e.viewType==="list"?"icon":"tile"),x=w(()=>l(c)==="image");Ds(_,{get kind(){return l(c)},get asset(){return e.asset},get variant(){return l(y)},get checkerboard(){return l(x)}})},$$slots:{default:!0}});var v=D(m,2);ai(v,{class:"title",children:(_,b)=>{var y=Y8(),x=R(y);q(()=>Z(x,l(a))),T(_,y)},$$slots:{default:!0}}),T(f,p)},$$slots:{default:!0}}),oe(),r()}function dy(t,e){let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",3,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"alt",3,""),d=at(e,["$$slots","$$events","$$legacy","loading","asset","src","variant","blurBackground","cover","checkerboard","alt"]);Ds(t,Qt({kind:"image",get loading(){return n()},get asset(){return r()},get src(){return i()},get variant(){return s()},get blurBackground(){return o()},get cover(){return a()},get checkerboard(){return c()},get alt(){return u()}},()=>d))}var X8=F('<span role="none" class="image svelte-1aay9a6"><!></span>'),Q8=F('<div role="none" class="file svelte-1aay9a6"><!> <div role="none" class="meta svelte-1aay9a6"><div role="none" class="name"> </div> <div role="none" class="size svelte-1aay9a6"> </div></div> <!></div>'),eH=F('<div role="none" class="files svelte-1aay9a6"></div>');const tH={hash:"svelte-1aay9a6",code:".files.svelte-1aay9a6 {display:flex;flex-direction:column;gap:16px;padding:16px 0 0;}.file.svelte-1aay9a6 {display:flex;align-items:center;gap:16px;}.file.svelte-1aay9a6 .image:where(.svelte-1aay9a6) {display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color);}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) {flex:auto;display:flex;flex-direction:column;gap:4px;text-align:left;}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) .size:where(.svelte-1aay9a6) {font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color);}"};function GC(t,e){se(e,!0),Ee(t,tH);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(le,"$_",n);let o=P(e,"files",31,()=>ie([]));var a=eH();dt(a,21,o,Xn,(c,u,d)=>{var f=Q8();const h=w(()=>{const{name:A,type:O,size:L}=l(u);return{name:A,type:O,size:L}}),p=w(()=>{const{extension:A=""}=$n(l(h).name);return{extension:A}});var g=R(f);{var m=A=>{const O=w(()=>URL.createObjectURL(l(u)));dy(A,{get src(){return l(O)},variant:"icon",checkerboard:!0})},v=A=>{var O=X8(),L=R(O);et(L,{name:"draft"}),T(A,O)};U(g,A=>{l(h).type.startsWith("image/")?A(m):A(v,!1)})}var _=D(g,2),b=R(_),y=R(b),x=D(b,2),k=R(x),S=D(_,2);const C=w(()=>s()("remove")),E=w(()=>o().length===1);Je(S,{variant:"ghost",iconic:!0,get"aria-label"(){return l(C)},get hidden(){return l(E)},onclick:A=>{A.stopPropagation(),o().splice(d,1),o([...o()])},children:(A,O)=>{et(A,{name:"close"})},$$slots:{default:!0}}),q((A,O,L)=>{Z(y,A),Z(k,`${O??""}
585
585
  ·
586
- ${L??""}`)},[()=>l(h).name.normalize(),()=>i()?k_(l(h).size):"",()=>s()(`file_type_labels.${l(p).extension}`,{default:l(p).extension.toUpperCase()})]),T(c,f)}),T(t,a),oe(),r()}var nH=({target:t},e)=>{const n=[...t.files];e()?.({files:n,file:n[0]})},rH=F('<input type="file" hidden>');function KC(t,e){se(e,!0);let n=P(e,"accept",3,void 0),r=P(e,"multiple",3,!1),i=P(e,"onSelect",3,void 0),s=ae(void 0);const o=()=>{l(s)?.click()};var a=rH();return a.__change=[nH,i],Pt(a,c=>$(s,c),()=>l(s)),q(()=>{ke(a,"accept",n()),a.multiple=r()}),_i("cancel",a,c=>{c.stopPropagation()}),T(t,a),oe({open:o})}sa(["change"]);var iH=F('<div role="alert"> </div>'),sH=F('<div role="none"> </div> <div role="none"><!></div> <!>',1),oH=F('<div role="none" class="content svelte-osk4b"><!> <!></div>'),aH=F('<div role="none" class="drop-indicator svelte-osk4b"><div role="none" class="svelte-osk4b"><!> <span role="none"> </span></div></div>'),lH=F('<div role="none" class="drop-target svelte-osk4b"><!> <!></div> <!>',1);const cH={hash:"svelte-osk4b",code:".drop-target.svelte-osk4b {display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto;}.drop-target.svelte-osk4b > .group {overflow-y:auto;padding:16px;width:100%;height:100%;}.drop-target.svelte-osk4b > :where(.svelte-osk4b) {pointer-events:none;}.drop-target.svelte-osk4b button {pointer-events:auto;}.drop-indicator.svelte-osk4b {position:absolute;inset:0;z-index:10;border-radius:var(--sui-control-large-border-radius);background-color:hsl(var(--sui-background-color-4-hsl)/80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none;}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) {position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border:4px dashed var(--sui-primary-accent-color);border-radius:var(--sui-control-large-border-radius);font-size:var(--sui-font-size-x-large);}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.content.svelte-osk4b {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center;}"};function Rd(t,e){se(e,!0),Ee(t,cH);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"accept",3,void 0),o=P(e,"disabled",3,!1),a=P(e,"multiple",3,!1),c=P(e,"showUploadButton",3,!1),u=P(e,"showFilePreview",3,!1),d=P(e,"onSelect",3,void 0),f=P(e,"children",3,void 0),h=ae(!1),p=ae(!1),g=ae(void 0),m=ae(ie([]));const v=()=>{l(g)?.open()},_=()=>{$(m,ie([])),d()?.({files:l(m)})},b=I=>{$(m,ie(a()?I:I.slice(0,1))),d()?.({files:l(m)})};var y=lH(),x=M(y),k=R(x);{var S=I=>{var N=oH(),j=R(N);{var H=G=>{var K=sH(),ee=M(K),J=R(ee),Y=D(ee,2),te=R(Y);const ce=w(()=>i()(a()?"choose_files":"choose_file"));Je(te,{variant:"primary",get label(){return l(ce)},get disabled(){return o()},onclick:()=>{v()},startIcon:fe=>{et(fe,{name:"cloud_upload"})},$$slots:{startIcon:!0}});var he=D(Y,2);{var re=X=>{var fe=iH(),be=R(fe);q(ue=>Z(be,ue),[()=>i()("drop_files_type_mismatch",{values:{type:s()}})]),T(X,fe)};U(he,X=>{l(p)&&X(re)})}q(X=>Z(J,X),[()=>i()(a()?"drop_or_browse_files":"drop_or_browse_file")]),T(G,K)};U(j,G=>{c()&&G(H)})}var B=D(j,2);{var W=G=>{GC(G,{get files(){return l(m)},set files(K){$(m,ie(K))}})};U(B,G=>{u()&&l(m).length&&G(W)})}T(I,N)},C=I=>{var N=V(),j=M(N);Re(j,()=>f()??Me),T(I,N)};U(k,I=>{c()||u()&&l(m).length?I(S):I(C,!1)})}var E=D(k,2);{var A=I=>{var N=aH(),j=R(N),H=R(j);et(H,{name:"download"});var B=D(H,2),W=R(B);q(G=>Z(W,G),[()=>i()(a()?"drop_files_here":"drop_file_here")]),T(I,N)};U(E,I=>{l(h)&&I(A)})}var O=D(x,2);Pt(KC(O,{get accept(){return s()},get multiple(){return a()},onSelect:({files:I})=>{b(I)}}),I=>$(g,ie(I)),()=>l(g)),_i("dragover",x,I=>{I.preventDefault(),!(o()||!I.dataTransfer)&&(I.dataTransfer.dropEffect="copy",$(h,!0),$(p,!1))}),_i("dragleave",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),_i("dragend",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),_i("drop",x,async I=>{if(I.preventDefault(),o()||!I.dataTransfer)return;$(h,!1);const N=await RP(I.dataTransfer,{accept:s()});N.length?b(N):$(p,!0)}),T(t,y);var L=oe({openFilePicker:v,reset:_});return r(),L}var uH=F('<div role="none" class="spinner svelte-v6s0f"></div>'),dH=F("<!> <!>",1);const fH={hash:"svelte-v6s0f",code:".spinner.svelte-v6s0f {height:1px;}"};function nl(t,e){se(e,!0),Ee(t,fH);let n=P(e,"itemChunkSize",3,25),r=ae(ie(n())),i=ae(void 0);const s=w(()=>e.items.length>l(r)),o=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(l(s)?$(r,l(r)+n()):o.disconnect())});Ue(()=>{l(i)&&o.observe(l(i))});var a=dH(),c=M(a);dt(c,17,()=>e.items.slice(0,l(r)),f=>f[e.itemKey],(f,h)=>{var p=V(),g=M(p);Re(g,()=>e.renderItem,()=>l(h)),T(f,p)});var u=D(c,2);{var d=f=>{var h=uH();Pt(h,p=>$(i,p),()=>l(i)),T(f,h)};U(u,f=>{l(s)&&f(d)})}T(t,a),oe()}var hH=F('<div role="none" class="list-container svelte-1smo9s9"><!></div>');const pH={hash:"svelte-1smo9s9",code:".list-container.svelte-1smo9s9 {flex:auto;position:relative;height:100%;overflow:hidden;}.list-container.svelte-1smo9s9 > .group {height:100%;overflow-y:auto;overscroll-behavior-y:contain;}.list-container.svelte-1smo9s9 > .group :is(.grid-view, .list-view) {display:block;padding:0 16px 16px;height:100%;overflow-y:auto;}"};function fy(t,e){Ee(t,pH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=hH(),s=R(i);_r(s,Qt(()=>r,{children:(o,a)=>{var c=V(),u=M(c);Re(u,()=>n()??Me),T(o,c)},$$slots:{default:!0}})),T(t,i)}var gH=F('<div role="none"><!></div>');const mH={hash:"svelte-180m7hm",code:'.grid-view.svelte-180m7hm .row-group-caption {display:block;margin:8px;grid-column:1/-1;}.grid-view.svelte-180m7hm .row-group-caption th {display:block;}.grid-view.svelte-180m7hm .grid-body {display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0;}.grid-view.svelte-180m7hm [role="row"] {display:block;position:relative;overflow:hidden;height:auto;text-align:left;}.grid-view.svelte-180m7hm [role="row"] .grid-cell {display:block;}.grid-view.svelte-180m7hm [role="row"] .grid-cell.image:empty {aspect-ratio:1/1;}.grid-view.svelte-180m7hm [role="row"] .checkbox {position:absolute;inset:4px auto auto 4px;z-index:2;}.grid-view.svelte-180m7hm [role="row"] .title span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:12px;height:40px;line-height:1.5;word-break:break-all;}.grid-view.svelte-180m7hm [role="row"][tabindex] {border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-secondary-background-color);cursor:pointer;transition:background-color 200ms;}.grid-view.svelte-180m7hm [role="row"][tabindex]:hover, .grid-view.svelte-180m7hm [role="row"][tabindex]:focus, .grid-view.svelte-180m7hm [role="row"][tabindex]:active {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm {--icon-size: 36px;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption + .grid-row .grid-cell {border-top-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption ~ .grid-row:last-child .grid-cell {border-bottom-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] [role="row"] {transition-property:background-color, outline-color;transition-duration:200ms;}.list-view.svelte-180m7hm [role="grid"] [role="row"][tabindex] {cursor:pointer;}.list-view.svelte-180m7hm [role="grid"] [role="row"]:hover {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm [role="grid"] [role="rowheader"] {border-width:0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] {overflow:hidden;padding:0 16px 0 0;height:40px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap;text-overflow:ellipsis;vertical-align:middle;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"]:first-child {padding-left:16px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] .label {overflow:hidden;text-overflow:ellipsis;}.list-view.svelte-180m7hm [role="grid"] .grid-cell.image:empty::before {display:block;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);content:"";}.list-view.svelte-180m7hm [role="grid"] [role="row"] [role="gridcell"] {border-width:1px 0 0;border-color:var(--sui-secondary-border-color);}.list-view.svelte-180m7hm [role="grid"] [role="row"]:last-child [role="gridcell"] {border-width:1px 0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].checkbox {padding-left:8px;width:44px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].title {width:100%; /* flex: auto */color:var(--sui-primary-foreground-color);}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].image {width:48px;}'};function Dd(t,e){se(e,!0),Ee(t,mH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","viewType","children"]);var i=gH(),s=R(i);hr(s,()=>hn(0),null,o=>{NL(o,Qt({multiple:!0,clickToSelect:!1},()=>r,{children:(a,c)=>{var u=V(),d=M(u);Re(d,()=>n()??Me),T(a,u)},$$slots:{default:!0}}))}),q(()=>Mr(i,`${e.viewType??""}-view svelte-180m7hm`)),T(t,i),oe()}var vH=F('<span role="none"> </span>');function bH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ss,"$currentView",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(le,"$_",n),a=()=>z(P_,"$globalAssetFolder",n),c=()=>z(uy,"$assetGroups",n),u=()=>z(tl,"$listedAssets",n),d=w(()=>i().type),f=w(()=>!!s()?.entryRelative),h=w(()=>o()("asset_list"));fy(t,{get"aria-label"(){return l(h)},children:(p,g)=>{Rd(p,{get disabled(){return l(f)},multiple:!0,onSelect:({files:m})=>{ot(Ls,{folder:s()?.internalPath||a()?.internalPath,files:m})},children:(m,v)=>{var _=V(),b=M(_);{var y=k=>{const S=w(()=>o()("assets"));Dd(k,{id:"asset-list",get viewType(){return l(d)},get"aria-label"(){return l(S)},get"aria-rowcount"(){return u().length},children:(C,E)=>{var A=V(),O=M(A);dt(O,1,()=>Object.entries(c()),([L,I])=>L,(L,I)=>{let N=()=>l(I)[0],j=()=>l(I)[1];const H=w(()=>N()!=="*"?N():void 0);Sx(L,{get label(){return l(H)},children:(B,W)=>{nl(B,{get items(){return j()},itemKey:"path",renderItem:(K,ee=Me)=>{var J=V(),Y=M(J);ms(Y,()=>ee().sha,te=>{Z5(te,{get asset(){return ee()},get viewType(){return l(d)}})}),T(K,J)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(C,A)},$$slots:{default:!0}})},x=k=>{$r(k,{children:(S,C)=>{var E=vH(),A=R(E);q(O=>Z(A,O),[()=>o()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};U(b,k=>{Object.values(c()).flat(1).length?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var _H=F('<span class="count"> </span>'),yH=F('<div role="none" class="primary-sidebar"><!></div>');function wH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(di,"$allAssetFolders",n),o=()=>z(le,"$_",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(tn,"$allAssets",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>[{collectionName:"*",internalPath:void 0,publicPath:void 0,entryRelative:!1},...s()]);var f=yH(),h=R(f);const p=w(()=>o()("asset_folders"));cu(h,{get"aria-label"(){return l(p)},"aria-controls":"assets-container",children:(g,m)=>{var v=V(),_=M(v);dt(_,17,()=>l(d),({collectionName:b,internalPath:y,entryRelative:x})=>b,(b,y)=>{let x=()=>l(y).collectionName,k=()=>l(y).internalPath,S=()=>l(y).entryRelative;const C=w(()=>x()?Ri(x()):void 0),E=w(S),A=w(()=>k()===void 0&&!a()||k()===a()?.internalPath),O=w(()=>i()?ng(x()):"");gr(b,{get selected(){return l(A)},get label(){return l(O)},onSelect:()=>{zn(k()?`/assets/${k()}`:"/assets")},ondragover:N=>{N.preventDefault(),!l(E)&&(k()===void 0||l(A)?N.dataTransfer.dropEffect="none":(N.dataTransfer.dropEffect="move",N.target.classList.add("dragover")))},ondragleave:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondragend:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondrop:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},startIcon:N=>{const j=w(()=>l(C)?.icon||"folder");et(N,{get name(){return l(j)}})},endIcon:N=>{var j=V(),H=M(j);ms(H,c,B=>{var W=V(),G=M(W);hr(G,()=>hn(0),null,K=>{var ee=_H();const J=w(()=>(k()?qB(k()):c()).length);var Y=R(ee);q((te,ce)=>{ke(ee,"aria-label",`(${te??""})`),Z(Y,ce)},[()=>o()(l(J)>1?"many_assets":l(J)===1?"one_asset":"no_assets",{values:{count:l(J)}}),()=>l(u).format(l(J))]),T(K,ee)}),T(B,W)}),T(N,j)},$$slots:{startIcon:!0,endIcon:!0}})}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function xH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>!e.asset||!YT(e.asset)),o=w(()=>i()("preview")),a=w(()=>i()("show_preview"));Je(t,{variant:"ghost",get disabled(){return l(s)},get label(){return l(o)},get"aria-label"(){return l(a)},onclick:()=>{zn(`/assets/${e.asset?.path}`)}}),oe(),r()}function kH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(le,"$_",n),o=w(()=>!!i()?.entryRelative),a=w(()=>s()("upload")),c=w(()=>s()("upload_assets"));Je(t,{variant:"primary",get label(){return l(a)},get disabled(){return l(o)},get"aria-label"(){return l(c)},onclick:()=>{ot(el,!0)},startIcon:d=>{et(d,{name:"cloud_upload"})},$$slots:{startIcon:!0}}),oe(),r()}var SH=F('<span role="none"> </span>'),EH=F('<h2 role="none"> <!></h2> <!> <!> <!> <!> <!> <!> <!>',1);function TH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(kd,"$selectedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(le,"$_",n),a=()=>z(Ln,"$appLocale",n),c=()=>z(ni,"$selectedAssetFolder",n),u=()=>z(tl,"$listedAssets",n),d=w(()=>i().length?i():s()?[s()]:[]),f=w(()=>o()("folder"));Zs(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=EH(),m=M(g),v=R(m),_=D(v);{var b=N=>{var j=SH(),H=R(j);q(()=>Z(H,`/${c().internalPath??""}`)),T(N,j)};U(_,N=>{c()&&N(b)})}var y=D(m,2);Yr(y,{flex:!0});var x=D(y,2);xH(x,{get asset(){return s()}});var k=D(x,2);const S=w(()=>s()?[s()]:[]);AC(k,{get assets(){return l(S)}});var C=D(k,2);VC(C,{get assets(){return l(d)}});var E=D(C,2);const A=w(()=>o()(l(d).length===1?"delete_selected_asset":"delete_selected_assets")),O=w(()=>o()(l(d).length===1?"confirm_deleting_selected_asset":l(d).length===u().length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:l(d).length}}));HC(E,{get assets(){return l(d)},get buttonDescription(){return l(A)},get dialogDescription(){return l(O)}});var L=D(E,2);WC(L,{get asset(){return s()}});var I=D(L,2);kH(I,{}),q(N=>Z(v,`${N??""} `),[()=>a()?cy(c()?.internalPath):""]),T(h,g)},$$slots:{default:!0}}),oe(),r()}var CH=F('<span role="none"> </span>');function AH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ss,"$currentView",n),s=()=>z(le,"$_",n),o=()=>z(uo,"$focusedAsset",n),a=w(()=>!i().showInfo),c=w(()=>s()("asset_info"));_r(t,{id:"asset-info",class:"secondary-sidebar",get hidden(){return l(a)},get"aria-label"(){return l(c)},children:(u,d)=>{var f=V(),h=M(f);{var p=m=>{CC(m,{get asset(){return o()},showPreview:!0})},g=m=>{$r(m,{children:(v,_)=>{var b=CH(),y=R(b);q(x=>Z(y,x),[()=>s()("select_asset_show_info")]),T(v,b)},$$slots:{default:!0}})};U(h,m=>{o()?m(p):m(g,!1)})}T(u,f)},$$slots:{default:!0}}),oe(),r()}var PH=F("<!> <!>",1);function YC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"multiple",3,!1),u=P(e,"noneLabel",3,""),d=P(e,"filters",19,()=>[]);const f=w(()=>o()||i()("filter"));Er(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:p=>{const g=w(()=>i()("filtering_options"));mr(p,{get"aria-label"(){return l(g)},get"aria-controls"(){return e["aria-controls"]},children:(m,v)=>{var _=V(),b=M(_);{var y=k=>{var S=V(),C=M(S);dt(C,17,d,Xn,(E,A)=>{let O=()=>l(A).label,L=()=>l(A).field,I=()=>l(A).pattern;const N=w(()=>(s().filters||[]).findIndex(H=>H.field===L()&&H.pattern===I())),j=w(()=>l(N)>-1);Pf(E,{get label(){return O()},get checked(){return l(j)},onChange:()=>{e.currentView.update(H=>{const B=H.filters?[...H.filters]:[];return l(N)>-1?B.splice(l(N),1):B.push({field:L(),pattern:I()}),{...H,filters:B}})}})}),T(k,S)},x=k=>{var S=PH(),C=M(S);const E=w(()=>u()||i()("sort_keys.none")),A=w(()=>!s().filter);uu(C,{get label(){return l(E)},get checked(){return l(A)},onSelect:()=>{e.currentView.update(L=>({...L,filter:void 0}))}});var O=D(C,2);dt(O,17,d,Xn,(L,I)=>{let N=()=>l(I).label,j=()=>l(I).field,H=()=>l(I).pattern;const B=w(()=>s().filter?.field===j()&&s().filter.pattern===H());uu(L,{get label(){return N()},get checked(){return l(B)},onSelect:()=>{e.currentView.update(W=>({...W,filter:{field:j(),pattern:H()}}))}})}),T(k,S)};U(b,k=>{c()?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var OH=F('<span role="none" class="svelte-1154dkn"> </span>'),$H=F('<div role="none" class="wrapper svelte-1154dkn"><!> <!></div>');const LH={hash:"svelte-1154dkn",code:".wrapper.svelte-1154dkn {display:flex;align-items:center;gap:4px;margin-inline:20px;}span.svelte-1154dkn {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function JC(t,e){se(e,!0),Ee(t,LH);const[n,r]=me(),i=()=>z(e.selectedItems,"$selectedItems",n),s=()=>z(le,"$_",n),o=w(()=>e.allItems.length),a=w(()=>i().length),c=w(()=>!!l(a)),u=w(()=>l(c)&&l(a)===l(o));var d=$H(),f=R(d);const h=w(()=>!l(o)),p=w(()=>s()("select_all")),g=w(()=>l(c)&&!l(u)?"mixed":l(c));au(f,{get disabled(){return l(h)},get"aria-label"(){return l(p)},get checked(){return l(g)},onChange:()=>{e.selectedItems.set(l(u)?[]:[...e.allItems])}});var m=D(f,2);{var v=_=>{var b=OH(),y=R(b);q(x=>Z(y,x),[()=>s()("x_of_x_selected",{values:{total:l(o),selected:l(a)}})]),T(_,b)};U(m,_=>{l(c)&&_(v)})}T(t,d),oe(),r()}function ZC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"fields",19,()=>[]),u=P(e,"collectionName",3,void 0);const d=["ascending","descending"],f=["date","commit_date"],h=w(()=>o()||i()("sort"));Er(t,{variant:"ghost",get label(){return l(h)},get disabled(){return a()},popupPosition:"bottom-right",popup:g=>{const m=w(()=>i()("sorting_options"));mr(g,{get"aria-label"(){return l(m)},get"aria-controls"(){return e["aria-controls"]},children:(v,_)=>{var b=V(),y=M(b);dt(y,17,c,({key:x,label:k})=>x,(x,k)=>{let S=()=>l(k).key,C=()=>l(k).label;var E=V(),A=M(E);dt(A,16,()=>d,O=>O,(O,L)=>{const I=w(()=>i()(f.includes(S())||u()&&vn({collectionName:u(),keyPath:S()})?.widget==="datetime"?`${L}_date`:L,{values:{label:C()}})),N=w(()=>s().sort?.key===S()&&s().sort.order===L);uu(O,{get label(){return l(I)},get checked(){return l(N)},onSelect:()=>{e.currentView.update(j=>({...j,sort:{key:S(),order:L}}))}})}),T(x,E)}),T(v,b)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var NH=F("<!> <!>",1),IH=F('<div role="none" class="wrapper svelte-1adg8sx"><!></div>');const RH={hash:"svelte-1adg8sx",code:".wrapper.svelte-1adg8sx {display:contents;}.wrapper.svelte-1adg8sx button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function hy(t,e){se(e,!0),Ee(t,RH);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"disabled",3,!1),a=at(e,["$$slots","$$events","$$legacy","disabled","currentView"]);var c=IH(),u=R(c);const d=w(()=>i()("switch_view"));Cf(u,Qt({get disabled(){return o()},get"aria-label"(){return l(d)}},()=>a,{children:(f,h)=>{var p=NH(),g=M(p);const m=w(()=>s().type!=="grid"),v=w(()=>i()("list_view"));ou(g,{get disabled(){return o()},get selected(){return l(m)},variant:"ghost",iconic:!0,get"aria-label"(){return l(v)},onSelect:()=>{e.currentView.update(k=>({...k,type:"list"}))},startIcon:k=>{et(k,{name:"format_list_bulleted"})},$$slots:{startIcon:!0}});var _=D(g,2);const b=w(()=>s().type==="grid"),y=w(()=>i()("grid_view"));ou(_,{get disabled(){return o()},get selected(){return l(b)},variant:"ghost",iconic:!0,get"aria-label"(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,type:"grid"}))},startIcon:k=>{et(k,{name:"grid_view"})},$$slots:{startIcon:!0}}),T(f,p)},$$slots:{default:!0}})),T(t,c),oe(),r()}var DH=F("<!> <!> <!> <!> <!> <!> <!>",1);function MH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(tl,"$listedAssets",n),s=()=>z(le,"$_",n),o=()=>z(uy,"$assetGroups",n),a=()=>z(A5,"$sortFields",n),c=()=>z(ss,"$currentView",n),u=w(()=>!!i().length),d=w(()=>i().length>1),f=w(()=>s()("asset_list"));Zs(t,{variant:"secondary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=DH(),m=M(g);const v=w(()=>Object.values(o()).flat(1));JC(m,{get allItems(){return l(v)},selectedItems:kd});var _=D(m,2);Yr(_,{flex:!0});var b=D(_,2);const y=w(()=>!l(d));ZC(b,{get disabled(){return l(y)},currentView:ss,get fields(){return a()},"aria-controls":"asset-list"});var x=D(b,2);const k=w(()=>s()("type")),S=w(()=>!l(d)),C=w(()=>s()("all")),E=w(()=>UB.map(W=>({label:s()(W),field:"fileType",pattern:W})));YC(x,{get label(){return l(k)},get disabled(){return l(S)},currentView:ss,get noneLabel(){return l(C)},get filters(){return l(E)},"aria-controls":"asset-list"});var A=D(x,2);const O=w(()=>!l(u));hy(A,{get disabled(){return l(O)},currentView:ss,"aria-controls":"asset-list"});var L=D(A,2);Tr(L,{orientation:"vertical"});var I=D(L,2);const N=w(()=>!l(u)),j=w(()=>!!c().showInfo),H=w(()=>!!c().showInfo),B=w(()=>s()(c().showInfo?"hide_info":"show_info"));Je(I,{variant:"ghost",iconic:!0,get disabled(){return l(N)},get pressed(){return l(j)},"aria-controls":"asset-info",get"aria-expanded"(){return l(H)},get"aria-label"(){return l(B)},onclick:()=>{ss.update(G=>({...G,showInfo:!c().showInfo}))},startIcon:G=>{et(G,{name:"info"})},$$slots:{startIcon:!0}}),T(h,g)},$$slots:{default:!0}}),oe(),r()}var FH=F('<!> <div role="none" class="main-inner svelte-1fpggxh"><div role="none" class="main-inner-main svelte-1fpggxh"><!> <!></div> <!></div>',1);const zH={hash:"svelte-1fpggxh",code:'.main-inner.svelte-1fpggxh {flex:auto;display:flex;overflow:hidden;}.main-inner.svelte-1fpggxh .main-inner-main:where(.svelte-1fpggxh) {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.main-inner.svelte-1fpggxh .secondary-sidebar {flex:none;overflow:auto;box-sizing:content-box;border-top-left-radius:16px;width:320px;background-color:var(--sui-secondary-background-color);}.main-inner.svelte-1fpggxh .secondary-sidebar [role="listbox"] {padding:12px;}'};function XC(t,e){Ee(t,zH);let n=P(e,"primaryToolbar",3,void 0),r=P(e,"secondaryToolbar",3,void 0),i=P(e,"mainContent",3,void 0),s=P(e,"secondarySidebar",3,void 0);var o=FH(),a=M(o);Re(a,()=>n()??Me);var c=D(a,2),u=R(c),d=R(u);Re(d,()=>r()??Me);var f=D(d,2);Re(f,()=>i()??Me);var h=D(u,2);Re(h,()=>s()??Me),T(t,o)}var jH=F("<!> <!>",1),UH=F('<div role="none" id="page-container" class="outer svelte-6friv7"><!></div>');const BH={hash:"svelte-6friv7",code:'.outer.svelte-6friv7 {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.outer[inert].svelte-6friv7 {display:none;}.outer.svelte-6friv7 > [role="toolbar"] {flex:none;}.outer.svelte-6friv7 > [role="toolbar"] [role="search"] {flex:auto;width:auto;max-width:480px;}.outer.svelte-6friv7 .browser {flex:auto;display:flex;overflow:hidden;}.outer.svelte-6friv7 .primary-sidebar {display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;}.outer.svelte-6friv7 .primary-sidebar [role="radiogroup"] {width:100%;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] {margin:8px;border-width:0;background-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button {display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:left;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button span {flex:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .label {flex:auto;overflow:hidden;text-overflow:ellipsis;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon {transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon.check {display:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .count {padding:2px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:first-child) {margin-top:4px;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:focus) {border-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] .count {color:var(--sui-highlighted-foreground-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"].dragover {color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important;}.outer.svelte-6friv7 .primary-sidebar .sui.divider {margin:8px 0;}.outer.svelte-6friv7 .main {flex:auto;display:flex;flex-direction:column;overflow:hidden;border-top-left-radius:16px;background-color:var(--sui-primary-background-color);}.outer.svelte-6friv7 .main .primary.global[role="toolbar"] {justify-content:center;}'};function Md(t,e){Ee(t,BH);const[n,r]=me(),i=()=>z(SC,"$hasOverlay",n);let s=P(e,"class",3,""),o=P(e,"primarySidebar",3,void 0),a=P(e,"main",3,void 0),c=at(e,["$$slots","$$events","$$legacy","class","primarySidebar","main"]);var u=UH(),d=R(u);_r(d,Qt({get class(){return`browser ${s()??""}`}},()=>c,{children:(f,h)=>{var p=jH(),g=M(p);Re(g,()=>o()??Me);var m=D(g,2);Re(m,()=>a()??Me),T(f,p)},$$slots:{default:!0}})),q(()=>u.inert=i()),T(t,u),r()}var qH=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function HH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(di,"$allAssetFolders",n),o=()=>z(tl,"$listedAssets",n),a=()=>z(le,"$_",n),c=()=>z(Ko,"$overlaidAsset",n),u=()=>z(tn,"$allAssets",n),d=()=>z(Zo,"$assetUpdatesToast",n),f=/^\/assets(?:\/(?<folderPath>[/\-\w]+))?(?:\/(?<fileName>[^/]+\.[A-Za-z0-9]+))?$/,h=w(()=>cy(i()?.internalPath)),p=async()=>{const{path:E}=$d(),A=E.match(f);if(!A?.groups)return;const{folderPath:O,fileName:L}=A.groups;if(!O)ot(ni,void 0);else if(i()?.internalPath!==O){const I=s().find(({internalPath:N})=>O===N);I&&ot(ni,I)}if(!L){const I=o().length;await hn(100),ot(Rs,a()(I>1?"viewing_x_asset_folder_many_assets":I===1?"viewing_x_asset_folder_one_asset":"viewing_x_asset_folder_no_assets",{values:{folder:l(h),count:I}}));return}ot(Ko,L?u().find(I=>I.path===`${O}/${L}`):void 0),ot(Rs,c()?a()("viewing_x_asset_details",{values:{name:c().name}}):a()("file_not_found")),ot(Go,!0)};ln(()=>{p()});var g=qH();_i("hashchange",al,()=>{p()});var m=M(g);const v=w(()=>a()("asset_library"));Md(m,{class:"media",get"aria-label"(){return l(v)},primarySidebar:O=>{wH(O,{})},main:O=>{const L=w(()=>a()("x_asset_folder",{values:{folder:l(h)}}));_r(O,{id:"assets-container",class:"main",get"aria-label"(){return l(L)},children:(I,N)=>{XC(I,{primaryToolbar:G=>{TH(G,{})},secondaryToolbar:G=>{var K=V(),ee=M(K);{var J=Y=>{MH(Y,{})};U(ee,Y=>{o().length&&Y(J)})}T(G,K)},mainContent:G=>{bH(G,{})},secondarySidebar:G=>{AH(G,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var _=D(m,2);U5(_,{});var b=D(_,2);H5(b,{});var y=D(b,2);K5(y,{});var x=D(y,2);Gn(x,{get show(){return d().saved},set show(E){Ct(Zo,xe(d).saved=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().published?d().count===1?"asset_saved_and_published":"assets_saved_and_published":d().count===1?"asset_saved":"assets_saved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var k=D(x,2);Gn(k,{get show(){return d().moved},set show(E){Ct(Zo,xe(d).moved=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_moved":"assets_moved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Gn(S,{get show(){return d().renamed},set show(E){Ct(Zo,xe(d).renamed=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_renamed":"assets_renamed",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Gn(C,{get show(){return d().deleted},set show(E){Ct(Zo,xe(d).deleted=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_deleted":"assets_deleted",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,g),oe(),r()}var VH=F('<div role="none"><!></div> <!>',1);function WH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ls,"$uploadingAssets",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(k5,"$showUploadAssetsConfirmDialog",n),a=()=>z(le,"$_",n),c=w(()=>i().files),u=w(()=>i().folder),d=w(()=>i().originalAsset);let f=ae(ie([]));Ue(()=>{$(f,ie([...l(c)]))}),Ue(()=>{s()||ot(Ls,{folder:void 0,files:[]})});const h=w(()=>a()(l(d)?"replace_asset":"upload_assets")),p=w(()=>a()(l(d)?"replace":"upload"));kl(t,{get open(){return o()},get title(){return l(h)},get okLabel(){return l(p)},onOk:async()=>{await qC(i(),{commitType:"uploadMedia"}),ot(Ls,{folder:void 0,files:[]})},onCancel:()=>{ot(Ls,{folder:void 0,files:[]})},children:(g,m)=>{var v=VH(),_=M(v),b=R(_);{var y=S=>{var C=Be();q(E=>Z(C,E),[()=>a()("confirm_replacing_file",{values:{name:l(d).name}})]),T(S,C)},x=S=>{var C=Be();q(E=>Z(C,E),[()=>a()(l(f).length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:l(f).length,folder:`/${l(u)}`}})]),T(S,C)};U(b,S=>{l(d)?S(y):S(x,!1)})}var k=D(_,2);GC(k,{get files(){return l(f)},set files(S){$(f,ie(S))}}),T(g,v)},$$slots:{default:!0}}),oe(),r()}function GH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ls,"$uploadingAssets",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(P_,"$globalAssetFolder",n),a=()=>z(el,"$showUploadAssetsDialog",n),c=()=>z(Go,"$showAssetOverlay",n),u=()=>z(le,"$_",n);let d=ae(void 0);const f=w(()=>i().originalAsset),h=w(()=>!l(f)),p=w(()=>l(f)?Mo.getType(l(f).name)??void 0:void 0),g=y=>{y.length&&(ot(Ls,{folder:l(f)?l(f).folder:s()?.internalPath||o()?.internalPath,files:y,originalAsset:l(f)}),ot(el,!1))};Ue(()=>{!Mp()&&a()&&l(d)?.open()}),Ue(()=>{c()||ot(el,!1)});var m=V(),v=M(m);{var _=y=>{const x=w(()=>l(f)?u()("replace_x",{values:{name:l(f).name}}):u()("upload_assets"));Ui(y,{get title(){return l(x)},showOk:!1,get open(){return Ew(),a()},set open(k){ot(el,k)},children:(k,S)=>{Rd(k,{showUploadButton:!0,get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:C})=>{g(C)}})},$$slots:{default:!0}})},b=y=>{Pt(KC(y,{get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:x})=>{g(x)}}),x=>$(d,ie(x)),()=>l(d))};U(v,y=>{Mp()?y(_):y(b,!1)})}T(t,m),oe(),r()}var KH=F('<div role="blockquote" class="svelte-soravq"><pre class="svelte-soravq"> </pre></div>');const YH={hash:"svelte-soravq",code:"div.svelte-soravq {flex:auto;overflow:auto;}pre.svelte-soravq {margin:0;padding:16px;}"};function JH(t,e){se(e,!0),Ee(t,YH);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(yt,"$siteConfig",n),o=w(()=>i()("site_configuration_editor"));Md(t,{class:"content",get"aria-label"(){return l(o)},main:c=>{var u=KH(),d=R(u),f=R(d);q((h,p)=>{ke(u,"aria-label",h),Z(f,p)},[()=>i()("site_config"),()=>cd.stringify(s())]),T(c,u)},$$slots:{main:!0}}),oe(),r()}var ZH=F("<!> <!> <!> <!>",1);function XH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Qp,"$restoreDialogState",n),s=()=>z(Ln,"$appLocale",n),o=()=>z(Ja,"$showContentOverlay",n),a=()=>z(le,"$_",n),c=()=>z(Jo,"$backupToastState",n),u=w(()=>new Date),d=w(()=>i().resolve),f=w(()=>i().timestamp),h=w(()=>l(u).getUTCFullYear()===l(f)?.getUTCFullYear()),p=w(()=>l(h)&&l(u).getUTCMonth()===l(f)?.getUTCMonth()),g=w(()=>l(p)&&l(u).getUTCDate()===l(f)?.getUTCDate()),m=w(()=>l(f)?.toLocaleString(s()??void 0,{year:l(h)?void 0:"numeric",month:l(g)?void 0:"short",day:l(g)?void 0:"numeric",hour:"numeric",minute:"numeric"}));Ue(()=>{!o()&&i().show&&(Ct(Qp,xe(i).show=!1,xe(i)),l(d)?.())});var v=ZH(),_=M(v);const b=w(()=>a()("restore_backup_title")),y=w(()=>a()("restore")),x=w(()=>a()("discard"));kl(_,{get title(){return l(b)},get okLabel(){return l(y)},get cancelLabel(){return l(x)},onOk:()=>{l(d)?.(!0)},onCancel:()=>{l(d)?.(!1)},get open(){return i().show},set open(E){Ct(Qp,xe(i).show=E,xe(i))},children:(E,A)=>{var O=Be();q(L=>Z(O,L),[()=>a()("restore_backup_description",{values:{datetime:l(m)}})]),T(E,O)},$$slots:{default:!0}});var k=D(_,2);Gn(k,{get show(){return c().saved},set show(E){Ct(Jo,xe(c).saved=E,xe(c))},children:(E,A)=>{Bn(E,{status:"info",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_saved")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Gn(S,{get show(){return c().restored},set show(E){Ct(Jo,xe(c).restored=E,xe(c))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_restored")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Gn(C,{get show(){return c().deleted},set show(E){Ct(Jo,xe(c).deleted=E,xe(c))},children:(E,A)=>{Bn(E,{status:"info",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_deleted")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,v),oe(),r()}const QH="deepl",e6="DeepL",t6="https://www.deepl.com/pro-api",n6="https://www.deepl.com/account/summary",r6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,i6=["AR","BG","CS","DA","DE","EL","EN","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","RO","RU","SK","SL","SV","TR","UK","ZH"],QC=["AR","BG","CS","DA","DE","EL","EN","EN-GB","EN-US","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","PT-BR","PT-PT","RO","RU","SK","SL","SV","TR","UK","ZH","ZH-HANS","ZH-HANT"],eA=t=>{const[e]=t.toUpperCase().split("-");if(i6.includes(e))return e},tA=t=>{let e=t.toUpperCase();if(QC.includes(e))return e;if(["ZH-CN","ZH-SG"].includes(e))return"ZH-HANS";if(["ZH-HK","ZH-MO","ZH-TW"].includes(e))return"ZH-HANT";if([e]=e.split("-"),QC.includes(e))return e},nA={serviceId:QH,serviceLabel:e6,developerURL:t6,apiKeyURL:n6,apiKeyPattern:r6,getSourceLanguage:eA,getTargetLanguage:tA,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=eA(e),s=tA(n);if(!i)throw new Error("Source locale is not supported.");if(!s)throw new Error("Target locale is not supported.");const o=new URLSearchParams([...t.map(d=>["text",d]),["source_lang",i],["target_lang",s],["tag_handling","html"],["split_sentences","1"],["auth_key",r]]),c=`https://${r.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${o.toString()}`,{translations:u}=await fetch(c).then(d=>d.json());return u.map(d=>d.text)}},s6={deepl:nA},rg=st(nA),rA=(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]})},iA=(t,e)=>{const n=new RegExp(`^${cn(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,s])=>[i.replace(n,"_"),s]).sort();return[za(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},sA=(t,e,n)=>{const r=ne(nt),{collection:i,collectionFile:s}=r,{defaultLocale:o}=(s??i)._i18n,[a,c]=iA(r.currentValues[t],e),[u,d]=t===o?iA(r.expanderStates._,e):[[],[]];n({valueList:a,expanderStateList:u}),is.set(!1),nt.update(f=>(rA(f.currentValues[t],{...Fa({[e]:a}),...c}),t===o&&rA(f.expanderStates._,{...Fa({[e]:u}),...d}),f)),is.set(!0)},oA=t=>{const e=ne(nt),{collectionName:n,fileName:r,collection:i,collectionFile:s}=e,{defaultLocale:o}=(s??i)._i18n,a=e.currentValues[o],c=tc([...Object.keys(t),...Object.keys(a)]),u={};return c.forEach(d=>{const f=vn({collectionName:n,fileName:r,keyPath:d})?.i18n==="duplicate";u[d]=(f?a[d]:void 0)??t[d]}),u},aA=t=>{nt.update(e=>{const{currentLocales:n,currentValues:r,validities:i}=e,s=!n[t];if(s&&!r[t]){const{collection:o,collectionName:a,collectionFile:c,fileName:u,originalValues:d}=e,{fields:f=[]}=c??o,h=Xp(f,t);return{...e,currentLocales:{...n,[t]:s},originalValues:{...d,[t]:h},currentValues:{...r,[t]:oy({draft:{collectionName:a,fileName:u},locale:t,target:oA(h)})}}}return{...e,currentLocales:{...n,[t]:s},validities:{...i,[t]:{}}}})},lA=async(t,e,{keyPath:n="",translate:r=!1}={})=>{const{collectionName:i,fileName:s,currentValues:o}=ne(nt),a=o[t],c=Object.fromEntries(Object.entries(a).filter(([p,g])=>{const m=o[e][p],v=vn({collectionName:i,fileName:s,valueMap:a,keyPath:p});return!(n&&!p.startsWith(n)||typeof g!="string"||!g||!["markdown","text","string","list"].includes(v?.widget??"string")||v?.widget==="list"&&(v.field??v.fields)||!r&&g===m||!n&&r&&m)})),u=Object.keys(c).length,d=u===1?"one":"many",f=r?"translation":"copy",h=(p,g)=>{ey.set({id:Date.now(),show:!0,status:p,message:g,count:u,sourceLocale:t})};if(!u){h("info",`${f}.none`);return}if(r){const p=ne(rg),g=ne(Tt).apiKeys?.[p.serviceId]||await new Promise(m=>{Od.set({show:!0,multiple:u>1,resolve:m})});if(!g)return;h("info","translation.started");try{const m=await p.translate(Object.values(c),{apiKey:g,sourceLocale:t,targetLocale:e});Object.keys(c).forEach((v,_)=>{o[e][v]=m[_]}),h("success",`translation.complete.${d}`)}catch(m){h("error","translation.error"),console.error(m)}}else Object.entries(c).forEach(([p,g])=>{o[e][p]=g}),h("success",`copy.complete.${d}`);nt.update(p=>({...p,currentValues:o}))},py=(t="",e="")=>{const{collection:n,collectionFile:r,fileName:i,currentValues:s,originalValues:o}=ne(nt),{allLocales:a,defaultLocale:c}=(r??n)._i18n,u=t?[t]:a,d=(f,h,p=!1)=>{Object.entries(h).forEach(([g,m])=>{if(!e||g.startsWith(e)){const v=vn({collectionName:n.name,fileName:i,valueMap:h,keyPath:g});(f===c||[!0,"translate"].includes(v?.i18n??!1))&&(p?delete s[f][g]:s[f][g]=m)}})};u.forEach(f=>{d(f,s[f],!0),d(f,o[f],!1)}),nt.update(f=>({...f,currentValues:s}))};function o6(t,e){let n=P(e,"currentValue",15,!1),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1);fu(t,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(o){n(o)}})}var a6=F("<p> </p>");function l6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",3,!1);var o=V(),a=M(o);{var c=u=>{var d=a6(),f=R(d);q(h=>Z(f,h),[()=>i()(`boolean.${s()}`)]),T(u,d)};U(a,u=>{typeof s()=="boolean"&&u(c)})}T(t,o),oe(),r()}function c6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae("");const f=w(()=>it(e.fieldConfig.default_language,"")),h=w(()=>it(e.fieldConfig.allow_language_selection,!0)),p=w(()=>it(e.fieldConfig.output_code_only,!1)),g=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),m=w(()=>Gr(i()?.currentValues[e.locale])??{}),v=w(()=>`${e.keyPath}.${l(g).code}`),_=w(()=>`${e.keyPath}.${l(g).lang}`),b=()=>{if(l(p))typeof s()!="string"?$(u,""):l(u)!==s()&&$(u,ie(s()));else{const x=l(m)[l(v)],k=l(m)[l(_)]||l(f);typeof x!="string"?$(u,""):l(u)!==x&&$(u,ie(x)),typeof k!="string"?$(d,""):l(d)!==k&&$(d,ie(k))}},y=()=>{l(p)?s()!==l(u)&&s(l(u)):i()&&(s({}),l(m)[l(v)]!==l(u)&&Ct(nt,xe(i).currentValues[e.locale][l(v)]=l(u),xe(i)),l(m)[l(_)]!==l(d)&&Ct(nt,xe(i).currentValues[e.locale][l(_)]=l(d),xe(i)))};Ue(()=>{l(m),xe(()=>{b()})}),Ue(()=>{l(u),l(d),xe(()=>{y()})}),RM(t,{get showLanguageSwitcher(){return l(h)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(u)},set code(x){$(u,ie(x))},get lang(){return l(d)},set lang(x){$(d,ie(x))}}),oe(),r()}var u6=F("<pre> </pre>");function d6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>it(e.fieldConfig.default_language,"")),o=w(()=>it(e.fieldConfig.output_code_only,!1)),a=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=w(()=>Gr(i()?.currentValues[e.locale])??{}),u=w(()=>`${e.keyPath}.${l(a).code}`),d=w(()=>`${e.keyPath}.${l(a).lang}`),f=w(()=>l(o)?e.currentValue:l(c)[l(u)]),h=w(()=>l(o)?l(s):l(c)[l(d)]);var p=V(),g=M(p);{var m=v=>{var _=u6(),b=R(_);q(()=>{Mr(_,yw(l(h)?`language-${l(h)}`:void 0)),Z(b,l(f))}),T(v,_)};U(g,v=>{l(f)&&v(m)})}T(t,p),oe(),r()}var f6=F(" <!>",1),h6=F('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),p6=F('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"> <!> <!></div>');const g6={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function m6(t,e){se(e,!0),Ee(t,g6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15,""),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae(255);const f=w(()=>it(e.fieldConfig.allowInput,!1)),h=w(()=>it(e.fieldConfig.enableAlpha,!1)),p=er("color"),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:E,a:A="ff"}=s().match(m)?.groups??{};if(E&&l(u)!==E&&$(u,ie(E)),E&&l(h)){const O=Number.parseInt(`0x${A}`,16);l(d)!==O&&$(d,ie(O))}},_=()=>{let E=g.test(l(u))?l(u):"";E&&l(h)&&(E+=l(d).toString(16).padStart(2,"0")),s()!==E&&s(E)};Ue(()=>{s(),xe(()=>{v()})}),Ue(()=>{l(u),l(d),xe(()=>{_()})});var b=p6(),y=R(b);ke(y,"id",`${p??""}-picker`);var x=D(y,2);{var k=E=>{var A=h6(),O=R(A);{var L=j=>{yn(j,{id:`${p??""}-input`,get invalid(){return c()},get readonly(){return a()},get required(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(H){$(u,ie(H))}})};U(O,j=>{l(f)&&j(L)})}var I=D(O,2);{var N=j=>{var H=f6(),B=M(H),W=D(B);const G=w(()=>!l(u)),K=w(()=>i()("opacity"));SN(W,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(K)},get value(){return l(d)},set value(ee){$(d,ie(ee))}}),q(ee=>Z(B,`${ee??""} `),[()=>i()("opacity")]),T(j,H)};U(I,j=>{l(h)&&j(N)})}T(E,A)};U(x,E=>{(l(f)||l(h))&&E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!l(u)),L=w(()=>`${p}-picker ${l(f)?`${p}-input`:""}`);Je(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},get"aria-controls"(){return l(L)},onclick:()=>{$(u,""),$(d,255)}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{y.readOnly=a(),ke(y,"aria-invalid",c()),ke(y,"aria-readonly",a()),ke(y,"aria-required",o()),ke(y,"aria-labelledby",`${e.fieldId??""}-label`),ke(y,"aria-errormessage",`${e.fieldId??""}-error`)}),hf(y,()=>l(u),E=>$(u,E)),T(t,b),oe(),r()}var v6=F('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const b6={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function _6(t,e){se(e,!0),Ee(t,b6);const n=w(()=>it(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})?$/,s=w(()=>{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 o=V(),a=M(o);{var c=u=>{var d=v6(),f=R(d),h=R(f),p=D(h,2),g=R(p),m=D(p,2),v=R(m);q(()=>{Kr(h,"background-color",e.currentValue),Z(g,e.currentValue),Z(v,l(s))}),T(u,d)};U(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,o),oe()}function y6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>it(e.fieldConfig.value,"")),d=w(()=>i()?.collectionName??""),f=w(()=>i()?.fileName),h=w(()=>Gr(i()?.currentValues[e.locale])??{}),p=w(()=>_c(e.locale)),g=()=>{const[_]=e.keyPath.split(".").splice(-2,1);return _?.match(/^\d+$/)?Number(_):void 0},m=()=>{if(!Object.keys(l(h)).includes(e.keyPath))return;const _=l(u)==="{{index}}"?g()??"":l(u).replaceAll(/{{(.+?)}}/g,(b,y)=>{if(y==="index")return String(g()??"");if(!y.startsWith("fields."))return"";const x=Dp({collectionName:l(d),fileName:l(f),valueMap:l(h),keyPath:y.replace(/^fields\./,""),locale:e.locale});return Array.isArray(x)?l(p).format(x):String(x)});s()!==_&&s(_)};Ue(()=>{l(h),xe(()=>{m()})});const v=w(()=>String(s()));yn(t,{get value(){return l(v)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}}),oe(),r()}var w6=F('<p dir="auto"> </p>');function x6(t,e){var n=w6(),r=R(n);q(()=>{ke(n,"lang",e.locale),Z(r,e.currentValue),n.dir=n.dir}),T(t,n)}var k6=F('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),S6=F('<div role="none" class="svelte-13u8gbo"><input> <!> <!> <!></div>');const E6={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function T6(t,e){se(e,!0),Ee(t,E6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae("");const d=w(()=>Ha(e.fieldConfig)),f=w(()=>l(d).dateOnly),h=w(()=>l(d).timeOnly),p=w(()=>l(d).utc),g=()=>{const E=_B(s(),e.fieldConfig);E!==void 0&&E!==l(u)&&$(u,ie(E))},m=()=>{const E=RT(l(u),s(),e.fieldConfig);E!==void 0&&E!==s()&&Number(Pc(E,e.fieldConfig))!==Number(Pc(s(),e.fieldConfig))&&s(E)};Ue(()=>{s(),xe(()=>{g()})}),Ue(()=>{l(u),xe(()=>{m()})});var v=S6(),_=R(v),b=D(_,2);{var y=E=>{var A=k6();T(E,A)};U(b,E=>{l(p)&&E(y)})}var x=D(b,2);{var k=E=>{const A=w(()=>i()(l(f)?"today":"now"));Je(E,{variant:"tertiary",get label(){return l(A)},onclick:()=>{const O=IT(e.fieldConfig);$(u,ie(l(p)?O.replace(/:00\.000Z$/,""):O))}})};U(x,E=>{a()||E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!s());Je(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},onclick:()=>{s("")}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{ke(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),ke(_,"aria-readonly",a()),ke(_,"aria-required",o()),ke(_,"aria-invalid",c()),ke(_,"aria-labelledby",`${e.fieldId??""}-label`),ke(_,"aria-errormessage",`${e.fieldId??""}-error`)}),hf(_,()=>l(u),E=>$(u,E)),T(t,v),oe(),r()}var C6=F("<time><!></time>"),A6=F('<p dir="auto"><!> <!></p>');function P6(t,e){se(e,!0);const n=w(()=>Ha(e.fieldConfig)),r=w(()=>l(n).dateOnly),i=w(()=>l(n).timeOnly),s=w(()=>l(n).utc),o=w(()=>Pc(e.currentValue,e.fieldConfig)),a=w(()=>pp(e.locale)),c=/^\d{4}-[01]\d-[0-3]\d$/,u=/T00:00(?::00)?(?:\.000)?Z$/;var d=V(),f=M(d);{var h=p=>{var g=A6(),m=R(g);{var v=x=>{var k=Be();q(S=>Z(k,S),[()=>l(o).toLocaleTimeString(l(a),iy)]),T(x,k)},_=x=>{var k=C6(),S=R(k);{var C=A=>{var O=Be();q(L=>Z(O,L),[()=>l(o).toLocaleDateString(l(a),{...ry,timeZone:l(s)||l(r)&&e.currentValue?.match(c)||l(r)&&e.currentValue?.match(u)?"UTC":void 0})]),T(A,O)},E=A=>{var O=Be();q(L=>Z(O,L),[()=>l(o).toLocaleString(l(a),{...ry,...iy,timeZone:l(s)?"UTC":void 0,timeZoneName:l(s)?void 0:"short"})]),T(A,O)};U(S,A=>{l(r)?A(C):A(E,!1)})}q(A=>ke(k,"datetime",A),[()=>l(o).toJSON()]),T(x,k)};U(m,x=>{l(i)?x(v):x(_,!1)})}var b=D(m,2);{var y=x=>{var k=Be("UTC");T(x,k)};U(b,x=>{l(s)&&x(y)})}q(()=>{ke(g,"lang",e.locale),g.dir=g.dir}),T(p,g)};U(f,p=>{l(o)&&p(h)})}T(t,d),oe()}x2();var O6=F('<div role="none" class="wrapper svelte-j0kdh9"><!></div>');const $6={hash:"svelte-j0kdh9",code:'.wrapper.svelte-j0kdh9 {display:contents;}.wrapper.svelte-j0kdh9 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-j0kdh9 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-j0kdh9 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-j0kdh9 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-j0kdh9 .listbox .option button[aria-selected="true"] .icon {display:none;}.wrapper.svelte-j0kdh9 .listbox .name {display:-webkit-box;min-height:calc(var(--sui-font-size-default) * 2);-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-j0kdh9 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-j0kdh9 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .name {flex:none;padding:4px 8px 12px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-j0kdh9 .listbox.grid button[aria-selected="true"] .preview {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-j0kdh9:not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-j0kdh9 .listbox.list .option button {gap:16px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .name {flex:auto;}.wrapper.svelte-j0kdh9 .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 cA(t,e){se(e,!0),Ee(t,$6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"viewType",3,"grid"),o=P(e,"gridId",3,void 0),a=P(e,"showTitle",3,!1),c=P(e,"onChange",3,void 0),u=P(e,"children",3,void 0);var d=O6(),f=R(d);const h=w(()=>i()("assets_dialog.available_images"));cu(f,{get id(){return o()},get class(){return s()},get"aria-label"(){return l(h)},onChange:p=>{c()?.(p.detail)},children:(p,g)=>{var m=V(),v=M(m);Re(v,()=>u()??Me),T(p,m)},$$slots:{default:!0}}),q(()=>ht(d,"show-title",a())),T(t,d),oe(),r()}var L6=F('<span role="alert"> </span>'),N6=F('<span role="alert"> </span>'),I6=F('<span role="alert"> </span>'),R6=F('<!> <span role="none" class="name"> </span>',1),D6=F('<div role="none" class="input-outer svelte-t9mjci"><!></div>'),M6=F('<div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div>',1),F6=F('<p role="alert" class="svelte-t9mjci"><!> <!></p> <!> <!>',1),z6=F('<span role="alert"> </span>');const j6={hash:"svelte-t9mjci",code:"p.svelte-t9mjci {margin:0 0 8px;}.input-outer.svelte-t9mjci {width:400px;text-align:center;}"};function uA(t,e){se(e,!0),Ee(t,j6);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n),o=()=>z(Rc,"$selectAssetsView",n);let a=P(e,"kind",3,"image"),c=P(e,"searchTerms",3,""),u=P(e,"gridId",3,void 0),d=P(e,"onSelect",3,void 0);const f=w(()=>it(e.serviceProps.serviceType,"stock_photos")),h=w(()=>it(e.serviceProps.serviceId,"")),p=w(()=>it(e.serviceProps.serviceLabel,"")),g=w(()=>it(e.serviceProps.hotlinking,!1)),m=w(()=>it(e.serviceProps.authType,"api_key")),v=w(()=>it(e.serviceProps.developerURL,"")),_=w(()=>it(e.serviceProps.apiKeyURL,"")),b=w(()=>e.serviceProps.apiKeyPattern),y=w(()=>e.serviceProps.init),x=w(()=>e.serviceProps.signIn),k=w(()=>e.serviceProps.search),S=ie({userName:"",password:""});let C=ae(!0),E=ae(!1),A=ae(""),O=ae(""),L=ae(""),I=ae("initial"),N=ae(null),j=ae(void 0),H=0;const B=async(Y="")=>{$(N,null);try{$(N,ie(await l(k)(Y,{kind:a(),apiKey:l(A),userName:l(O),password:l(L)})))}catch(te){$(j,"search_fetch_failed"),console.error(te)}},W=async Y=>{const{downloadURL:te,fileName:ce,credit:he}=Y;if(l(g)){d()?.({url:te,credit:he});return}try{const re=await fetch(te),{ok:X,status:fe}=re;if(!X)throw new Error(`The response returned with HTTP status ${fe}.`);const be=await re.blob(),ue=new File([be],ce,{type:be.type});d()?.({file:ue,credit:he})}catch(re){$(j,"image_fetch_failed"),console.error(re)}};ln(()=>{(async()=>(typeof l(y)=="function"&&($(C,!1),$(C,ie(await l(y)()))),l(C)&&($(A,ie(i().apiKeys?.[l(h)]??"")),(Y=>($(O,ie(Y[0])),$(L,ie(Y[1]))))((i().logins?.[l(h)]??"").split(" ")),$(E,ie(!!l(A)||!!l(L))),$(N,null),l(E)&&B())))()}),Ue(()=>{c(),window.clearTimeout(H),H=window.setTimeout(()=>{l(E)&&B(c())},1e3)});var G=V(),K=M(G);{var ee=Y=>{var te=V(),ce=M(te);{var he=X=>{$r(X,{children:(fe,be)=>{var ue=L6(),Te=R(ue);q(_e=>Z(Te,_e),[()=>s()(`assets_dialog.error.${l(j)}`)]),T(fe,ue)},$$slots:{default:!0}})},re=X=>{var fe=V(),be=M(fe);{var ue=_e=>{$r(_e,{children:(Ae,Ce)=>{var $e=N6(),Ve=R($e);q(We=>Z(Ve,We),[()=>s()("searching")]),T(Ae,$e)},$$slots:{default:!0}})},Te=_e=>{var Ae=V(),Ce=M(Ae);{var $e=We=>{$r(We,{children:(pt,Ke)=>{var ge=I6(),ye=R(ge);q(we=>Z(ye,we),[()=>s()("no_files_found")]),T(pt,ge)},$$slots:{default:!0}})},Ve=We=>{const pt=w(()=>o()?.type);cA(We,{get gridId(){return u()},get viewType(){return l(pt)},onChange:({value:Ke})=>{const ge=l(N)?.find(({id:ye})=>ye===Ke);ge&&W(ge)},children:(Ke,ge)=>{nl(Ke,{get items(){return l(N)},itemKey:"id",renderItem:(we,Se=Me)=>{const Ie=w(()=>{const{id:ve,previewURL:Pe,description:qe,kind:Xe}=Se();return{id:ve,previewURL:Pe,description:qe,_kind:Xe}});gr(we,{label:"",get value(){return l(Ie).id},children:(ve,Pe)=>{var qe=R6(),Xe=M(qe);Ds(Xe,{get kind(){return l(Ie)._kind},get src(){return l(Ie).previewURL},variant:"tile",crossorigin:"anonymous"});var ct=D(Xe,2),Ye=R(ct);q(()=>Z(Ye,l(Ie).description)),T(ve,qe)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})};U(Ce,We=>{l(N).length?We(Ve,!1):We($e)},!0)}T(_e,Ae)};U(be,_e=>{l(N)?_e(Te,!1):_e(ue)},!0)}T(X,fe)};U(ce,X=>{l(j)?X(he):X(re,!1)})}T(Y,te)},J=Y=>{var te=V(),ce=M(te);{var he=X=>{$r(X,{children:(fe,be)=>{var ue=F6(),Te=M(ue),_e=R(Te);{var Ae=ge=>{var ye=V(),we=M(ye);pr(we,()=>li.sanitize(s()("prefs.media.stock_photos.description",{values:{service:l(p),homeHref:`href="${l(v)}"`,apiKeyHref:`href="${l(_)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(ge,ye)};U(_e,ge=>{l(f)==="stock_photos"&&ge(Ae)})}var Ce=D(_e,2);{var $e=ge=>{var ye=V(),we=M(ye);pr(we,()=>li.sanitize(s()(`cloud_storage.auth.${l(I)}`,{values:{service:l(p)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(ge,ye)};U(Ce,ge=>{l(f)==="cloud_storage"&&ge($e)})}var Ve=D(Te,2);{var We=ge=>{var ye=D6(),we=R(ye);const Se=w(()=>s()("prefs.media.stock_photos.field_label",{values:{service:l(p)}}));yn(we,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Se)},oninput:Ie=>{const ve=Ie.target.value.trim();l(b)?.test(ve)&&($(A,ie(ve)),$(E,!0),Ct(Tt,xe(i).apiKeys??={},xe(i)),Ct(Tt,xe(i).apiKeys[l(h)]=l(A),xe(i)),B())}}),T(ge,ye)};U(Ve,ge=>{l(m)==="api_key"&&ge(We)})}var pt=D(Ve,2);{var Ke=ge=>{var ye=M6(),we=M(ye),Se=R(we);const Ie=w(()=>s()("user_name")),ve=w(()=>l(I)==="requested");yn(Se,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ie)},get disabled(){return l(ve)},get value(){return S.userName},set value(bt){S.userName=bt}});var Pe=D(we,2),qe=R(Pe);const Xe=w(()=>s()("password")),ct=w(()=>l(I)==="requested");aF(qe,{get"aria-label"(){return l(Xe)},get disabled(){return l(ct)},get value(){return S.password},set value(bt){S.password=bt}});var Ye=D(Pe,2),rt=R(Ye);const ft=w(()=>s()("sign_in")),ut=w(()=>!S.userName||!S.password||l(I)==="requested");Je(rt,{variant:"secondary",get label(){return l(ft)},get disabled(){return l(ut)},onclick:async()=>{$(I,"requested"),S.userName=S.userName.trim(),S.password=S.password.trim(),await l(x)?.(S.userName,S.password)?($(I,"success"),$(O,ie(S.userName)),$(L,ie(S.password)),$(E,!0),Ct(Tt,xe(i).logins??={},xe(i)),Ct(Tt,xe(i).logins[l(h)]=[l(O),l(L)].join(" "),xe(i)),B()):$(I,"error")}}),T(ge,ye)};U(pt,ge=>{l(m)==="password"&&ge(Ke)})}T(fe,ue)},$$slots:{default:!0}})},re=X=>{$r(X,{children:(fe,be)=>{var ue=z6(),Te=R(ue);q(_e=>Z(Te,_e),[()=>s()("cloud_storage.invalid")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(C)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(E)?Y(ee):Y(J,!1)})}T(t,G),oe(),r()}const Fc=st(""),Fd=t=>t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),dA=Qn([ri,tn,Fc],([t,e,n],r)=>{const i=n?Fd(n):"",s=c=>Fd(c).includes(i),o=!t.length||!i?[]:t.map(c=>{let u=0;return co(c).forEach(d=>{s(d.label||d.name)&&(u+=10),s(Vo(d,c,{useTemplate:!0,allowMarkdown:!0}))&&(u+=10),u+=Wo(d,c).filter(f=>s(f.label||f.name)).length,Object.values(c.locales).forEach(({content:f})=>{u+=Object.values(f).filter(h=>typeof h=="string"&&!!h&&s(h)).length})}),{entry:c,points:u}}).filter(({points:c})=>c>0).sort((c,u)=>u.points-c.points).map(c=>c.entry),a=!e.length||!i?[]:e.filter(c=>Fd(c.name).includes(i));r({entries:o,assets:a})}),fA=(t,e=Me)=>{var n=V(),r=M(n);pr(r,()=>li.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var U6=F('<strong class="svelte-7q7g7u"><!></strong>'),B6=F("<!>/",1),q6=F('<!> <span role="none" class="name svelte-7q7g7u"></span>',1),H6=F('<div role="none" class="grid-wrapper svelte-7q7g7u"><!></div>'),V6=F('<span role="none"> </span>');const W6={hash:"svelte-7q7g7u",code:'.grid-wrapper.svelte-7q7g7u {overflow-y:auto;height:100%;}.grid-wrapper.svelte-7q7g7u [role="listbox"] {background-color:transparent;}.name.svelte-7q7g7u {color:var(--sui-tertiary-foreground-color);}.name.svelte-7q7g7u strong:where(.svelte-7q7g7u) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}'};function hA(t,e){se(e,!0),Ee(t,W6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"viewType",3,"grid"),a=P(e,"searchTerms",3,""),c=P(e,"basePath",3,void 0),u=P(e,"gridId",3,void 0),d=P(e,"checkerboard",3,!1),f=P(e,"onSelect",3,void 0);const h=w(()=>a()?s().filter(({name:_})=>Fd(_).includes(a())):s());var p=V(),g=M(p);{var m=_=>{var b=H6(),y=R(b);cA(y,{get gridId(){return u()},get viewType(){return o()},showTitle:!0,onChange:({value:x})=>{f()?.({asset:s().find(({path:k})=>k===x)})},children:(x,k)=>{nl(x,{get items(){return l(h)},itemKey:"path",renderItem:(C,E=Me)=>{const A=w(()=>{const{kind:I,name:N,path:j}=E();return{kind:I,name:N,path:j}}),O=w(()=>c()?Rn(l(A).path.replace(c(),"")):l(A).name),L=w(()=>l(O).split("/"));gr(C,{label:"",get value(){return l(A).path},children:(I,N)=>{var j=q6(),H=M(j);Ds(H,{get kind(){return l(A).kind},get asset(){return E()},variant:"tile",get checkerboard(){return d()}});var B=D(H,2);dt(B,21,()=>l(L),Xn,(W,G,K)=>{var ee=V(),J=M(ee);{var Y=ce=>{var he=U6(),re=R(he);fA(re,()=>l(G)),T(ce,he)},te=ce=>{var he=B6(),re=M(he);fA(re,()=>l(G)),T(ce,he)};U(J,ce=>{K===l(L).length-1?ce(Y):ce(te,!1)})}T(W,ee)}),T(I,j)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(_,b)},v=_=>{$r(_,{children:(b,y)=>{var x=V6(),k=R(x);q(S=>Z(k,S),[()=>i()("no_files_found")]),T(b,x)},$$slots:{default:!0}})};U(g,_=>{l(h).length?_(m):_(v,!1)})}T(t,p),oe(),r()}function gy(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Rc,"$selectAssetsView",n);let s=P(e,"assets",19,()=>[]),o=P(e,"selectedAsset",15,null),a=P(e,"showUploader",3,!1),c=P(e,"searchTerms",3,""),u=P(e,"basePath",3,void 0),d=ae(void 0);Ue(()=>{o()||xe(()=>{l(d)?.reset()})});const f=w(()=>e.kind==="image"?"image/*":void 0);Pt(Rd(t,{get accept(){return l(f)},get showUploadButton(){return a()},showFilePreview:!0,onSelect:({files:h})=>{o(h.length?{file:h[0]}:null)},children:(h,p)=>{var g=V(),m=M(g);{var v=_=>{const b=w(()=>s().sort((x,k)=>x.name.localeCompare(k.name))),y=w(()=>i()?.type);hA(_,{get assets(){return l(b)},get viewType(){return l(y)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,onSelect:({asset:x})=>{o({asset:x})}})};U(m,_=>{a()||_(v)})}T(h,g)},$$slots:{default:!0}}),h=>$(d,ie(h)),()=>l(d)),oe(),r()}const G6=["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"],pA="https://api.pexels.com/v1",K6={serviceType:"stock_photos",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}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=ne(Ln).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:G6.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${pA}/search?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await hn(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${pA}/curated?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=(await o.json()).photos}return i.map(({id:s,url:o,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(s),description:o.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${s}.jpg`,kind:"image",credit:`<a href="${o}">Photo by ${d} on Pexels</a>`}))}},Y6=["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"],J6="https://pixabay.com/api",Z6={serviceType:"stock_photos",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}$/,search:async(t,{apiKey:e})=>{const[n]=ne(Ln).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:Y6.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${J6}/?${r.toString()}`);return i.ok?(await i.json()).hits.map(({id:o,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(o),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()}},X6=["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"],gA="https://api.unsplash.com",mA="utm_source=sveltia-cms&utm_medium=referral",Q6={serviceType:"stock_photos",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,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=ne(Ln).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:X6.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${gA}/search/photos?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===s)break;await hn(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${gA}/photos?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=await o.json()}return i.map(({id:s,description:o,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(s),description:[o,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${s}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${mA}">${f}</a> on <a href="https://unsplash.com/?${mA}">Unsplash</a>`}))}},ig={},zd={pexels:K6,pixabay:Z6,unsplash:Q6};var e9=F("<!> <!>",1),t9=F("<a> </a>"),n9=F("<!> <!> <!>",1),r9=F("<!> <!>",1),i9=F("<!> <!> <!> <!>",1),s9=F('<div role="none"> </div> <!>',1),o9=F('<div role="none" class="wrapper svelte-v3cscd"><!> <div role="none" class="content-pane svelte-v3cscd"><!> <!> <!> <!></div></div>');const a9={hash:"svelte-v3cscd",code:".wrapper.svelte-v3cscd {display:flex;gap:16px;height:60vh;}.wrapper.svelte-v3cscd .listbox {flex:none;background-color:transparent;}.wrapper.svelte-v3cscd .content-pane:where(.svelte-v3cscd) {overflow:auto;flex:auto;}"};function l9(t,e){se(e,!0),Ee(t,a9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(Tt,"$prefs",n),a=()=>z(Ja,"$showContentOverlay",n),c=()=>z(Rc,"$selectAssetsView",n),u=()=>z(tn,"$allAssets",n),d=()=>z(P_,"$globalAssetFolder",n);let f=P(e,"open",15,!1),h=P(e,"canEnterURL",3,!0),p=P(e,"onSelect",3,void 0),g=ae(""),m=ae(null),v=ae(""),_=ae(""),b=ae("uncategorized-assets");const y=w(()=>e.kind==="image"?i()("assets_dialog.title.image"):i()("assets_dialog.title.file")),x=w(()=>Fd(l(_))),k=w(()=>s()?._assetFolder?.internalPath??""),S=w(()=>s()?._assetFolder?.entryRelative??!1),C=w(()=>!!l(k)&&!l(S)),E=w(()=>!!e.entry&&l(S)),A=w(()=>l(b)==="upload"),O=w(()=>e.entry?$n(Object.values(e.entry.locales)[0].path).dirname:void 0),L=w(()=>l(b).endsWith("-assets")),I=w(()=>Object.keys(zd).includes(l(b))&&o()?.apiKeys?.[l(b)]||Object.keys(ig).includes(l(b))&&o()?.logins?.[l(b)]);ln(()=>{$(g,`library-${Wn("short")}`)}),Ue(()=>{$(b,ie(l(E)?"entry-assets":l(C)?"collection-assets":"uncategorized-assets"))}),Ue(()=>{f()&&$(v,"")}),Ue(()=>{a()||f(!1)});const N=w(()=>i()("insert")),j=w(()=>!l(m));Ui(t,{get title(){return l(y)},size:"x-large",get okLabel(){return l(N)},get okDisabled(){return l(j)},onOk:()=>{p()?.({asset:l(m)})},get open(){return f()},set open(W){f(W)},headerExtra:W=>{var G=V(),K=M(G);{var ee=J=>{var Y=e9(),te=M(Y);{var ce=fe=>{const be=w(()=>Rc);hy(fe,{get currentView(){return l(be)},"aria-controls":"select-assets-grid"})};U(te,fe=>{c()&&fe(ce)})}var he=D(te,2);const re=w(()=>!!l(m)?.file),X=w(()=>i()(`assets_dialog.search_for_${e.kind??"file"}`));nm(he,{get disabled(){return l(re)},get"aria-label"(){return l(X)},get value(){return l(_)},set value(fe){$(_,ie(fe))}}),T(J,Y)};U(K,J=>{(l(L)||l(I))&&J(ee)})}T(W,G)},footerExtra:W=>{var G=V(),K=M(G);{var ee=J=>{var Y=V();const te=w(()=>{const{showServiceLink:re,serviceLabel:X,serviceURL:fe}=zd[l(b)]??{};return{showServiceLink:re,serviceLabel:X,serviceURL:fe}});var ce=M(Y);{var he=re=>{var X=t9(),fe=R(X);q(be=>{ke(X,"href",l(te).serviceURL),Z(fe,be)},[()=>i()("prefs.media.stock_photos.credit",{values:{service:l(te).serviceLabel}})]),T(re,X)};U(ce,re=>{l(te).showServiceLink&&re(he)})}T(J,Y)};U(K,J=>{l(I)&&J(ee)})}T(W,G)},children:(W,G)=>{var K=o9(),ee=R(K);const J=w(()=>i()("assets_dialog.locations"));cu(ee,{class:"tabs",get"aria-label"(){return l(J)},get"aria-controls"(){return`${l(g)??""}-content-pane`},onChange:ue=>{$(b,ie(ue.detail.name)),$(m,null)},children:(ue,Te)=>{var _e=i9(),Ae=M(_e);const Ce=w(()=>i()("assets_dialog.location.repository"));Af(Ae,{get label(){return l(Ce)},children:(ye,we)=>{var Se=n9(),Ie=M(Se);{var ve=rt=>{const ft=w(()=>i()("entry_assets")),ut=w(()=>l(b)==="entry-assets");gr(rt,{name:"entry-assets",get label(){return l(ft)},get selected(){return l(ut)}})};U(Ie,rt=>{l(E)&&rt(ve)})}var Pe=D(Ie,2);{var qe=rt=>{const ft=w(()=>i()("collection_assets")),ut=w(()=>l(b)==="collection-assets");gr(rt,{name:"collection-assets",get label(){return l(ft)},get selected(){return l(ut)}})};U(Pe,rt=>{l(C)&&rt(qe)})}var Xe=D(Pe,2);const ct=w(()=>i()("uncategorized")),Ye=w(()=>l(b)==="uncategorized-assets");gr(Xe,{name:"uncategorized-assets",get label(){return l(ct)},get selected(){return l(Ye)}}),T(ye,Se)},$$slots:{default:!0}});var $e=D(Ae,2);const Ve=w(()=>i()("assets_dialog.location.local"));Af($e,{get label(){return l(Ve)},children:(ye,we)=>{const Se=w(()=>i()("upload"));gr(ye,{name:"upload",get label(){return l(Se)},get selected(){return l(A)}})},$$slots:{default:!0}});var We=D($e,2);{var pt=ye=>{const we=w(()=>i()("assets_dialog.location.external_locations"));Af(ye,{get label(){return l(we)},children:(Se,Ie)=>{var ve=r9(),Pe=M(ve);{var qe=ct=>{const Ye=w(()=>i()("assets_dialog.enter_url"));gr(ct,{name:"enter-url",get label(){return l(Ye)}})};U(Pe,ct=>{h()&&ct(qe)})}var Xe=D(Pe,2);dt(Xe,17,()=>Object.values(ig),({serviceId:ct,serviceLabel:Ye})=>ct,(ct,Ye)=>{let rt=()=>l(Ye).serviceId,ft=()=>l(Ye).serviceLabel;gr(ct,{get name(){return rt()},get label(){return ft()}})}),T(Se,ve)},$$slots:{default:!0}})};U(We,ye=>{(h()||Object.keys(ig).length)&&ye(pt)})}var Ke=D(We,2);const ge=w(()=>i()("assets_dialog.location.stock_photos"));Af(Ke,{get label(){return l(ge)},children:(ye,we)=>{var Se=V(),Ie=M(Se);dt(Ie,17,()=>Object.values(zd),({serviceId:ve,serviceLabel:Pe})=>ve,(ve,Pe)=>{let qe=()=>l(Pe).serviceId,Xe=()=>l(Pe).serviceLabel;gr(ve,{get name(){return qe()},get label(){return Xe()}})}),T(ye,Se)},$$slots:{default:!0}}),T(ue,_e)},$$slots:{default:!0}});var Y=D(ee,2),te=R(Y);{var ce=ue=>{const Te=w(()=>u().filter(_e=>(!e.kind||e.kind===_e.kind)&&$n(_e.path).dirname===l(O)));gy(ue,{get kind(){return e.kind},get assets(){return l(Te)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get selectedAsset(){return l(m)},set selectedAsset(_e){$(m,ie(_e))}})},he=ue=>{var Te=V(),_e=M(Te);{var Ae=$e=>{const Ve=w(()=>u().filter(We=>(!e.kind||e.kind===We.kind)&&We.folder===l(k)));gy($e,{get kind(){return e.kind},get assets(){return l(Ve)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(k)},get selectedAsset(){return l(m)},set selectedAsset(We){$(m,ie(We))}})},Ce=$e=>{var Ve=V(),We=M(Ve);{var pt=Ke=>{const ge=w(()=>u().filter(we=>(!e.kind||e.kind===we.kind)&&we.folder===d()?.internalPath)),ye=w(()=>d()?.internalPath);gy(Ke,{get kind(){return e.kind},get assets(){return l(ge)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(ye)},get selectedAsset(){return l(m)},set selectedAsset(we){$(m,ie(we))}})};U(We,Ke=>{(l(b)==="uncategorized-assets"||l(A))&&Ke(pt)},!0)}T($e,Ve)};U(_e,$e=>{l(C)&&(l(b)==="collection-assets"||l(A))?$e(Ae):$e(Ce,!1)},!0)}T(ue,Te)};U(te,ue=>{l(E)&&(l(b)==="entry-assets"||l(A))?ue(ce):ue(he,!1)})}var re=D(te,2);{var X=ue=>{$r(ue,{children:(Te,_e)=>{var Ae=s9(),Ce=M(Ae),$e=R(Ce),Ve=D(Ce,2);yn(Ve,{flex:!0,oninput:()=>{$(m,ie(l(v).trim()?{url:l(v).trim()}:null))},get value(){return l(v)},set value(We){$(v,ie(We))}}),q(We=>Z($e,We),[()=>e.kind==="image"?i()("assets_dialog.enter_image_url"):i()("assets_dialog.enter_file_url")]),T(Te,Ae)},$$slots:{default:!0}})};U(re,ue=>{h()&&l(b)==="enter-url"&&ue(X)})}var fe=D(re,2);dt(fe,17,()=>Object.entries(ig),([ue,Te])=>ue,(ue,Te)=>{let _e=()=>l(Te)[0],Ae=()=>l(Te)[1];var Ce=V(),$e=M(Ce);{var Ve=We=>{uA(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:pt=>{$(m,ie(pt))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)});var be=D(fe,2);dt(be,17,()=>Object.entries(zd),([ue,Te])=>ue,(ue,Te)=>{let _e=()=>l(Te)[0],Ae=()=>l(Te)[1];var Ce=V(),$e=M(Ce);{var Ve=We=>{uA(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:pt=>{$(m,ie(pt))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)}),q(()=>ke(Y,"id",`${l(g)??""}-content-pane`)),T(W,K)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}}),oe(),r()}var c9=F('<span role="none" class="preview no-thumbnail"><!></span>'),u9=F('<div role="textbox" tabindex="0" class="filename svelte-7plsvm"><!></div>'),d9=F('<div role="none" class="filled svelte-7plsvm"><!> <div role="none" class="svelte-7plsvm"><!> <div role="none"><!> <!></div></div></div>'),f9=F('<!> <div role="none"><!></div>',1),h9=F('<div class="empty svelte-7plsvm"><!></div>'),p9=F('<div role="none"> </div> <div role="none"><!></div>',1),g9=F("<!> <!> <!> <!>",1);const m9={hash:"svelte-7plsvm",code:".filled.svelte-7plsvm {display:flex !important;align-items:center;gap:16px;margin:var(--sui-focus-ring-width);}.filled.svelte-7plsvm .preview {flex:none;width:160px !important;height:160px !important;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);}.filled.svelte-7plsvm .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-7plsvm .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) {flex:auto;overflow:hidden;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm):empty {margin:0;padding:0;}.empty.svelte-7plsvm button {flex-direction:column;justify-content:center;height:160px;}.empty.svelte-7plsvm button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-7plsvm button:disabled {pointer-events:none !important;}.empty.svelte-7plsvm button:disabled * {opacity:0.5;}.empty.invalid.svelte-7plsvm button {border-color:var(--sui-error-border-color);}"};function vA(t,e){se(e,!1),Ee(t,m9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de();P(e,"locale",8),P(e,"keyPath",8);let h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8),g=P(e,"currentValue",12),m=P(e,"readonly",8,!1),v=P(e,"required",8,!0),_=P(e,"invalid",8,!1),b=P(e,"inEditorComponent",8,!1),y=de(),x=de(),k,S=de(),C=de(),E,A=de(!1),O=de(!1),L=de(!1),I=de(""),N=de();const j=()=>{g(""),$(y,void 0),$(x,void 0),k=void 0,E=void 0,l(N)?.reset()},H=async X=>{j(),$(y,X.asset),$(x,X.file),k=X.url,E=X.credit,l(y)&&g(qp(l(y),{pathOnly:!0,allowSpecial:!0,entry:l(f)})),l(x)&&(l(u)&&l(c)!==void 0&&Number.isInteger(l(c))&&l(x).size>l(c)?$(O,!0):(g(URL.createObjectURL(l(x))),Ct(nt,xe(i).files[g()]=l(x),xe(i)))),k&&g(k),E&&($(I,li.sanitize(E,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),$(L,!0))},B=async()=>{g()?.startsWith("blob:")&&i()&&$(x,i().files[g()]),g()?g().startsWith("blob:")?($(y,void 0),$(S,g()?await JT(g()):void 0),$(C,g()&&l(S)?await Lc(g(),l(f),{thumbnail:!0}):void 0)):l(u)&&/^https?:/.test(g())?($(y,void 0),$(S,"image"),$(C,g())):($(y,I_(g(),{entry:l(f),collection:l(d)})),$(S,void 0),$(C,void 0)):($(y,void 0),$(x,void 0),$(S,void 0),$(C,void 0))};Fe(()=>(l(o),l(a),l(c),vt(p())),()=>{(X=>($(o,X.widget),$(a,it(X.choose_url,!0)),$(c,it(it(it(X.media_library,()=>({}),!0).config,()=>({}),!0).max_file_size,void 0))))(p())}),Fe(()=>l(o),()=>{$(u,l(o)==="image")}),Fe(()=>i(),()=>{$(d,i()?.collection)}),Fe(()=>i(),()=>{$(f,i()?.originalEntry)}),Fe(()=>vt(g()),()=>{g(),B()}),Rr(),Sr();var W=g9(),G=M(W);const K=Ge(()=>l(u)?"image/*":void 0);Pt(Rd(G,{get disabled(){return m()},get accept(){return l(K)},onSelect:({files:X})=>{X.length&&H({file:X[0]})},children:(X,fe)=>{var be=V(),ue=M(be);{var Te=Ae=>{var Ce=d9(),$e=R(Ce);{var Ve=qe=>{Ds(qe,{get kind(){return l(S)},get src(){return l(C)},variant:"tile",checkerboard:!0})},We=qe=>{var Xe=V(),ct=M(Xe);{var Ye=ft=>{Ds(ft,{get kind(){return l(y).kind},get asset(){return l(y)},variant:"tile",checkerboard:!0})},rt=ft=>{var ut=c9(),bt=R(ut);et(bt,{name:"draft"}),T(ft,ut)};U(ct,ft=>{l(y)?ft(Ye):ft(rt,!1)},!0)}T(qe,Xe)};U($e,qe=>{l(S)&&l(C)?qe(Ve):qe(We,!1)})}var pt=D($e,2),Ke=R(pt);{var ge=qe=>{var Xe=u9(),ct=R(Xe);{var Ye=ft=>{var ut=Be();q(bt=>Z(ut,bt),[()=>decodeURI(l(x).name.normalize())],Ge),T(ft,ut)},rt=ft=>{var ut=V(),bt=M(ut);{var At=an=>{var jn=Be();q(sr=>Z(jn,sr),[()=>decodeURI(g())],Ge),T(an,jn)};U(bt,an=>{g().startsWith("blob:")||an(At)},!0)}T(ft,ut)};U(ct,ft=>{l(x)?ft(Ye):ft(rt,!1)})}q(()=>{ke(Xe,"id",`${h()??""}-value`),ke(Xe,"aria-readonly",m()),ke(Xe,"aria-invalid",_()),ke(Xe,"aria-required",v()),ke(Xe,"aria-labelledby",`${h()??""}-label`),ke(Xe,"aria-errormessage",`${h()??""}-error`)}),T(qe,Xe)};U(Ke,qe=>{typeof g()=="string"&&qe(ge)})}var ye=D(Ke,2),we=R(ye);const Se=Ge(()=>s()("replace")),Ie=Ge(()=>s()(`replace_${l(o)}`));Je(we,{get disabled(){return m()},variant:"tertiary",get label(){return l(Se)},get"aria-label"(){return l(Ie)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{$(A,!0)}});var ve=D(we,2);{var Pe=qe=>{const Xe=Ge(()=>s()("remove")),ct=Ge(()=>s()(`remove_${l(o)}`));Je(qe,{get disabled(){return m()},variant:"tertiary",get label(){return l(Xe)},get"aria-label"(){return l(ct)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{j()}})};U(ve,qe=>{b()||qe(Pe)})}T(Ae,Ce)},_e=Ae=>{var Ce=h9(),$e=R(Ce);Je($e,{flex:!0,role:"button",variant:"tertiary",get disabled(){return m()},tabindex:"0",onclick:()=>{m()||$(A,!0)},children:(Ve,We)=>{var pt=f9(),Ke=M(pt);et(Ke,{name:"cloud_upload"});var ge=D(Ke,2),ye=R(ge);{var we=Ie=>{var ve=Be();q(Pe=>Z(ve,Pe),[()=>s()(Mp()?"drop_or_browse_image_file":"browse_file")],Ge),T(Ie,ve)},Se=Ie=>{var ve=Be();q(Pe=>Z(ve,Pe),[()=>s()(Mp()?"drop_or_browse_file":"browse_file")],Ge),T(Ie,ve)};U(ye,Ie=>{l(u)?Ie(we):Ie(Se,!1)})}T(Ve,pt)},$$slots:{default:!0}}),q(()=>ht(Ce,"invalid",_())),T(Ae,Ce)};U(ue,Ae=>{g()?Ae(Te):Ae(_e,!1)})}T(X,be)},$$slots:{default:!0},$$legacy:!0}),X=>$(N,X),()=>l(N));var ee=D(G,2);const J=Ge(()=>l(u)?"image":void 0);l9(ee,{get kind(){return l(J)},get canEnterURL(){return l(a)},get entry(){return l(f)},onSelect:({asset:X})=>{H(X)},get open(){return l(A)},set open(X){$(A,X)},$$legacy:!0});var Y=D(ee,2);const te=Ge(()=>s()("assets_dialog.large_file.title"));kx(Y,{get title(){return l(te)},get open(){return l(O)},set open(X){$(O,X)},children:(X,fe)=>{var be=Be();q(ue=>Z(be,ue),[()=>s()("assets_dialog.large_file.description",{values:{size:k_(l(c))}})],Ge),T(X,be)},$$slots:{default:!0},$$legacy:!0});var ce=D(Y,2);const he=Ge(()=>s()("assets_dialog.photo_credit.title")),re=Ge(()=>s()("copy"));kl(ce,{get title(){return l(he)},get okLabel(){return l(re)},onOk:()=>{navigator.clipboard.writeText(l(I))},get open(){return l(L)},set open(X){$(L,X)},children:(X,fe)=>{var be=p9(),ue=M(be),Te=R(ue),_e=D(ue,2),Ae=R(_e);$h(Ae,{flex:!0,readonly:!0,get value(){return l(I)},onclick:Ce=>{Ce.target.focus(),Ce.target.select()}}),q(Ce=>Z(Te,Ce),[()=>s()("assets_dialog.photo_credit.description")],Ge),T(X,be)},$$slots:{default:!0},$$legacy:!0}),T(t,W),oe(),r()}var v9=F("<p><!></p>"),b9=F("<p> </p>");function bA(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);P(e,"locale",8),P(e,"keyPath",8),P(e,"fieldConfig",8);let s=P(e,"currentValue",8),o=de(),a=de();const c=async()=>{$(o,s()?await JT(s()):void 0),$(a,s()&&l(o)?await Lc(s(),i()?.originalEntry):void 0)};Fe(()=>vt(s()),()=>{s(),c()}),Rr(),Sr();var u=V(),d=M(u);{var f=p=>{var g=v9(),m=R(g);const v=Ge(()=>["audio","video"].includes(l(o)));Ds(m,{get kind(){return l(o)},get src(){return l(a)},get controls(){return l(v)}}),T(p,g)},h=p=>{var g=V(),m=M(g);{var v=_=>{var b=b9(),y=R(b);q(()=>Z(y,s())),T(_,b)};U(m,_=>{typeof s()=="string"&&s().trim()&&!s().startsWith("blob:")&&_(v)},!0)}T(p,g)};U(d,p=>{l(o)&&l(a)?p(f):p(h,!1)})}T(t,u),oe(),r()}var _9=F('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const y9={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function _A(t,e){Ee(t,y9);var n=_9(),r=R(n),i=R(r);et(i,{name:"error"});var s=D(i,2);Re(s,()=>e.children),q(()=>ke(n,"id",e.id)),T(t,n)}var w9=F('<th scope="col" class="action svelte-5r6rgh"></th>'),x9=F('<td class="action svelte-5r6rgh"><!></td>'),k9=F('<tr><td class="key svelte-5r6rgh"><!></td><td class="value svelte-5r6rgh"><!></td><!></tr>'),S9=F('<table class="svelte-5r6rgh"><thead><tr><th scope="col" class="key svelte-5r6rgh"> </th><th scope="col" class="value svelte-5r6rgh"> </th><!></tr></thead><tbody></tbody></table>'),E9=F("<!> <!>",1),T9=F("<!> <!> <div><!></div>",1);const C9={hash:"svelte-5r6rgh",code:`table.svelte-5r6rgh {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-5r6rgh,
587
- td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {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:left;}th.key.svelte-5r6rgh, th.value.svelte-5r6rgh {width:50%;}td.svelte-5r6rgh {padding:0;vertical-align:middle;}`};function A9(t,e){se(e,!1),Ee(t,C9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(nt,"$entryDraft",n),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8),f=P(e,"keyPath",8),h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8);P(e,"currentValue",8);let g=P(e,"readonly",8,!1);P(e,"required",8,!0),P(e,"invalid",8,!1);let m=de([]);const v=de([]);let _=de([]),b=de([]);const y=()=>{if(!s())return;const W=sy({entryDraft:nt,keyPath:f(),locale:d()});Mn(l(m),W)||($(m,W),$(_,W.map(()=>!1))),!l(m).length&&s().currentValues[d()][f()]!==null&&Ct(nt,xe(s).currentValues[d()][f()]=null,xe(s))},x=()=>{s()&&(Object.entries(s().currentValues).forEach(([B,W])=>{(B===d()||l(o)==="duplicate")&&delete W[f()]}),$(m,[...l(m),["",""]]),$(_,[...l(_),!1]),window.requestAnimationFrame(()=>{l(v)[l(m).length-1].querySelector("input").focus()}))},k=B=>{l(m).splice(B,1),$(m,[...l(m)]),l(_).splice(B,1),$(_,[...l(_)])},S=()=>{if($(b,e5({pairs:l(m),edited:l(_)})),!s()||l(b).some(Boolean)||l(m).some(([W])=>!W.trim()))return;t5({entryDraft:nt,fieldConfig:p(),keyPath:f(),locale:d(),pairs:l(m)})};Fe(()=>(l(o),l(a),i(),l(c),l(u),vt(p())),()=>{(B=>($(o,it(B.i18n,!1)),$(a,it(B.key_label,()=>i()("key_value.key"),!0)),$(c,it(B.value_label,()=>i()("key_value.value"),!0)),$(u,it(B.max,1/0))))(p())}),Fe(()=>(s(),vt(d())),()=>{s()?.currentValues[d()],y()}),Fe(()=>l(m),()=>{l(m),S()}),Rr(),Sr();var C=T9(),E=M(C);{var A=B=>{var W=S9(),G=R(W),K=R(G),ee=R(K),J=R(ee),Y=D(ee),te=R(Y),ce=D(Y);{var he=X=>{var fe=w9();q(be=>ke(fe,"aria-label",be),[()=>i()("key_value.action")],Ge),T(X,fe)};U(ce,X=>{g()||X(he)})}var re=D(G);dt(re,5,()=>l(m),Xn,(X,fe,be)=>{var ue=k9(),Te=R(ue),_e=R(Te);const Ae=Ge(()=>!!l(b)[be]),Ce=Ge(()=>l(b)[be]?`${h()}-kv-error`:void 0);yn(_e,{get readonly(){return g()},flex:!0,get invalid(){return l(Ae)},get"aria-label"(){return l(a)},get"aria-errormessage"(){return l(Ce)},oninput:()=>{Uy(_,l(_)[be]=!0)},onkeydown:Ke=>{Ke.key==="Enter"&&!Ke.isComposing&&l(v)[be].querySelector("td.value input").focus()},get value(){return l(fe)[0]},set value(Ke){l(fe)[0]=Ke,fw(()=>l(m))},$$legacy:!0});var $e=D(Te),Ve=R($e);yn(Ve,{get readonly(){return g()},flex:!0,get"aria-label"(){return l(c)},onkeydown:Ke=>{Ke.key==="Enter"&&!Ke.isComposing&&(be<l(m).length-1?l(v)[be+1].querySelector("input").focus():l(m).length<l(u)&&x())},get value(){return l(fe)[1]},set value(Ke){l(fe)[1]=Ke,fw(()=>l(m))},$$legacy:!0});var We=D($e);{var pt=Ke=>{var ge=x9(),ye=R(ge);const we=Ge(()=>i()("remove"));Je(ye,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(we)},onclick:()=>{k(be)},startIcon:Ie=>{et(Ie,{name:"close"})},$$slots:{startIcon:!0}}),T(Ke,ge)};U(We,Ke=>{g()||Ke(pt)})}Pt(ue,(Ke,ge)=>Uy(v,l(v)[ge]=Ke),Ke=>l(v)?.[Ke],()=>[be]),T(X,ue)}),q(()=>{Z(J,l(a)),Z(te,l(c))}),T(B,W)};U(E,B=>{l(m).length&&B(A)})}var O=D(E,2);{var L=B=>{_A(B,{get id(){return`${h()??""}-kv-error`},children:(W,G)=>{var K=E9(),ee=M(K);{var J=ce=>{var he=Be();q(re=>Z(he,re),[()=>i()("key_value.empty_key")],Ge),T(ce,he)};U(ee,ce=>{l(b).includes("empty")&&ce(J)})}var Y=D(ee,2);{var te=ce=>{var he=Be();q(re=>Z(he,re),[()=>i()("key_value.duplicate_key")],Ge),T(ce,he)};U(Y,ce=>{l(b).includes("duplicate")&&ce(te)})}T(W,K)}})};U(O,B=>{l(b).some(Boolean)&&B(L)})}var I=D(O,2),N=R(I);const j=Ge(()=>i()("add")),H=Ge(()=>g()||l(m).length>=l(u));Je(N,{get label(){return l(j)},variant:"tertiary",get disabled(){return l(H)},onclick:()=>{x()}}),T(t,C),oe(),r()}var P9=F('<tr><td class="svelte-1ni5ht9"> </td><td class="svelte-1ni5ht9"> </td></tr>'),O9=F('<table class="svelte-1ni5ht9"><thead><tr><th scope="col" class="svelte-1ni5ht9"> </th><th scope="col" class="svelte-1ni5ht9"> </th></tr></thead><tbody></tbody></table>');const $9={hash:"svelte-1ni5ht9",code:'@charset "UTF-8";table.svelte-1ni5ht9 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-1ni5ht9 {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:left;}td.svelte-1ni5ht9:empty::after {content:" ";}'};function L9(t,e){se(e,!1),Ee(t,$9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(nt,"$entryDraft",n),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldConfig",8);P(e,"currentValue",8);let f=de([]);const h=()=>{const _=sy({entryDraft:nt,keyPath:u(),locale:c()});Mn(l(f),_)||$(f,_)};Fe(()=>(l(o),i(),l(a),vt(d())),()=>{(v=>($(o,it(v.key_label,()=>i()("key_value.key"),!0)),$(a,it(v.value_label,()=>i()("key_value.value"),!0))))(d())}),Fe(()=>(s(),vt(c())),()=>{s()&&(s().currentValues[c()],h())}),Rr(),Sr();var p=V(),g=M(p);{var m=v=>{var _=O9(),b=R(_),y=R(b),x=R(y),k=R(x),S=D(x),C=R(S),E=D(b);dt(E,5,()=>l(f),Xn,(A,O)=>{let L=()=>l(O)[0],I=()=>l(O)[1];var N=P9(),j=R(N),H=R(j),B=D(j),W=R(B);q(()=>{Z(H,L()),Z(W,I())}),T(A,N)}),q(()=>{Z(k,l(o)),Z(C,l(a))}),T(v,_)};U(g,v=>{l(f).length&&v(m)})}T(t,p),oe(),r()}function my(t,e){se(e,!1);const[n,r]=me(),i=()=>z(le,"$_",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"disabled",8,!1),m=P(e,"fieldConfig",8),v=P(e,"items",24,()=>[]),_=P(e,"addItem",8,S=>{});Fe(()=>(l(s),l(o),l(a),l(c),vt(m())),()=>{(S=>($(s,S.widget),$(o,S.name),$(a,S.label),$(c,S.types)))(m())}),Fe(()=>(l(s),vt(m())),()=>{$(u,l(s)==="list"?m():void 0)}),Fe(()=>l(u),()=>{$(d,l(u)?.label_singular??"")}),Fe(()=>l(u),()=>{$(f,l(u)?.max??void 0)}),Fe(()=>(i(),l(d),l(a),l(o)),()=>{$(h,i()("add_x",{values:{name:l(d)||l(a)||l(o)}}))}),Fe(()=>(vt(g()),l(f),vt(v())),()=>{$(p,g()||typeof l(f)=="number"&&v().length===l(f))}),Rr(),Sr();var b=V(),y=M(b);{var x=S=>{Er(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},endIcon:A=>{et(A,{name:"add"})},popup:A=>{const O=Ge(()=>i()("select_list_type"));mr(A,{get"aria-label"(){return l(O)},children:(L,I)=>{var N=V(),j=M(N);dt(j,1,()=>l(c),({name:H,label:B})=>H,(H,B)=>{let W=()=>l(B).name,G=()=>l(B).label;const K=Ge(()=>G()||W());Lt(H,{get label(){return l(K)},onclick:()=>_()(W())})}),T(L,N)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})},k=S=>{Je(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},onclick:()=>_()(),startIcon:E=>{et(E,{name:"add"})},$$slots:{startIcon:!0}})};U(y,S=>{Array.isArray(l(c))?S(x):S(k,!1)})}T(t,b),oe(),r()}var N9=F('<span role="none" class="type svelte-drw5o5"> </span>'),I9=F('<div role="none" class="header svelte-drw5o5"><div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div></div>');const R9={hash:"svelte-drw5o5",code:".header.svelte-drw5o5 {display:flex;align-items:center;gap:8px;background-color:var(--sui-secondary-border-color);}.header.svelte-drw5o5 > div:where(.svelte-drw5o5) {display:flex;align-items:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):first-child {justify-content:flex-start;width:40%;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):nth-child(2) {width:20%;justify-content:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):last-child {width:40%;justify-content:flex-end;}.header.svelte-drw5o5 button {padding:0;height:16px;}.header.svelte-drw5o5 .type:where(.svelte-drw5o5) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function yA(t,e){se(e,!1),Ee(t,R9);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"label",8,""),o=P(e,"controlId",8),a=P(e,"expanded",8),c=P(e,"toggleExpanded",8),u=P(e,"removeButtonVisible",8,!1),d=P(e,"removeButtonDisabled",8,!1),f=P(e,"remove",8),h=P(e,"children",8,void 0);Sr();var p=I9(),g=R(p),m=R(g);const v=Ge(()=>!c()),_=Ge(()=>a()?i()("collapse"):i()("expand"));Je(m,{size:"small",get disabled(){return l(v)},get"aria-label"(){return l(_)},get"aria-expanded"(){return a()},get"aria-controls"(){return o()},onclick:()=>{c()?.()},startIcon:E=>{const A=Ge(()=>a()?"expand_more":"chevron_right");et(E,{get name(){return l(A)}})},children:(E,A)=>{var O=V(),L=M(O);{var I=N=>{var j=N9(),H=R(j);q(()=>Z(H,s())),T(N,j)};U(L,N=>{s()&&N(I)})}T(E,O)},$$slots:{startIcon:!0,default:!0}});var b=D(g,2),y=R(b);Re(y,()=>h()??Me);var x=D(b,2),k=R(x);{var S=C=>{const E=Ge(()=>i()("remove_this_item"));Je(C,{size:"small",iconic:!0,get disabled(){return d()},get"aria-label"(){return l(E)},onclick:()=>{f()()},startIcon:O=>{et(O,{name:"close"})},$$slots:{startIcon:!0}})};U(k,C=>{u()&&C(S)})}T(t,p),oe(),r()}var D9=F("<!> <!>",1),M9=F('<div role="none" class="toolbar top svelte-iirqfr"><!></div>'),F9=F("<!> <!> <!>",1),z9=F('<div role="none" class="summary svelte-iirqfr"> </div>'),j9=F('<div role="none" class="item svelte-iirqfr"><!> <div role="none" class="item-body"><!></div></div>'),U9=F('<div role="none" class="toolbar bottom svelte-iirqfr"><!> <!></div>'),B9=F('<div role="none" class="toolbar top svelte-iirqfr"><!> <div role="none" class="summary svelte-iirqfr"> </div> <!> <!></div> <!> <div role="none" class="item-list svelte-iirqfr"></div> <!>',1);const q9={hash:"svelte-iirqfr",code:".toolbar.svelte-iirqfr {display:flex;align-items:center;}.summary.svelte-iirqfr {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.item-list.collapsed.svelte-iirqfr {display:none;}.item.svelte-iirqfr {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-iirqfr .summary:where(.svelte-iirqfr) {padding:8px;}.item.svelte-iirqfr .summary:where(.svelte-iirqfr):empty {display:none;}"};function H9(t,e){se(e,!1),Ee(t,q9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de(),H=de(),B=de(),W=de(),G=de(),K=de(),ee=de();let J=P(e,"locale",8),Y=P(e,"keyPath",8),te=P(e,"fieldId",8);P(e,"fieldLabel",8);let ce=P(e,"fieldConfig",8),he=P(e,"currentValue",8),re=P(e,"readonly",8,!1),X=P(e,"required",8,!0),fe=P(e,"invalid",8,!1),be=de(!1),ue=de(""),Te=de("");ln(()=>{$(be,!0),$(ue,Wn("short")),ho({[l(W)]:!l(h),...Object.fromEntries(l(K).map((ge,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!l(d)]}))})});const _e=()=>{const ge=he().join(", ");!/,\s*$/.test(l(Te))&&l(Te).trim()!==ge&&$(Te,ge)},Ae=()=>{const ge=l(Te).split(/,/g).map(ye=>ye.trim()).filter(ye=>ye!=="");Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||(Object.keys(i()?.currentValues[ye]??{}).forEach(we=>{we.match(`^${cn(Y())}\\.\\d+$`)&&delete i()?.currentValues[ye][we]}),ge.forEach((we,Se)=>{Ct(nt,xe(i).currentValues[ye][`${Y()}.${Se}`]=we,xe(i))}))})},Ce=ge=>{Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||sA(ye,Y(),ge)})},$e=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{const Se=ge?l(_)?.find(({name:Pe})=>Pe===ge)?.fields??[]:l(m)??(l(g)?[l(g)]:[]),Ie=l(v)?0:ye.length,ve=za(Xp(Se,J()));ge&&(ve[l(b)]=ge),ye.splice(Ie,0,l(y)&&l(g)?ve[l(g).name]:ve),we.splice(Ie,0,!0)})},Ve=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{ye.splice(ge,1),we.splice(ge,1)})},We=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[ge],ye[ge-1]]=[ye[ge-1],ye[ge]],[we[ge],we[ge-1]]=[we[ge-1],we[ge]]})},pt=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[ge],ye[ge+1]]=[ye[ge+1],ye[ge]],[we[ge],we[ge+1]]=[we[ge+1],we[ge]]})},Ke=(ge,ye)=>ZB({collectionName:l(A),fileName:l(L),keyPath:Y(),valueMap:l(B),locale:J(),summaryTemplate:ye,hasSingleSubField:l(y),index:ge});Fe(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),l(p),l(g),l(m),l(v),l(_),l(b),vt(ce())),()=>{(ge=>($(o,ge.name),$(a,ge.label),$(c,ge.i18n),$(u,it(ge.allow_add,!0)),$(d,it(ge.collapsed,!1)),$(f,ge.summary),$(h,it(ge.minimize_collapsed,!1)),$(p,ge.label_singular),$(g,ge.field),$(m,ge.fields),$(v,it(ge.add_to_top,!1)),$(_,ge.types),$(b,it(ge.typeKey,"type"))))(ce())}),Fe(()=>l(g),()=>{$(y,!!l(g))}),Fe(()=>l(m),()=>{$(x,Array.isArray(l(m)))}),Fe(()=>l(_),()=>{$(k,Array.isArray(l(_)))}),Fe(()=>(l(y),l(x),l(k)),()=>{$(S,l(y)||l(x)||l(k))}),Fe(()=>vt(Y()),()=>{$(C,new RegExp(`^${cn(Y())}\\.(\\d+)(.*)?`))}),Fe(()=>i(),()=>{$(E,i()?.collection)}),Fe(()=>i(),()=>{$(A,i()?.collectionName??"")}),Fe(()=>i(),()=>{$(O,i()?.collectionFile)}),Fe(()=>i(),()=>{$(L,i()?.fileName)}),Fe(()=>i(),()=>{$(I,i()?.currentValues??{})}),Fe(()=>i(),()=>{$(N,i()?.expanderStates)}),Fe(()=>(l(j),l(O),l(E),$i),()=>{(ge=>$(j,ge.defaultLocale))((l(O)??l(E))?._i18n??$i)}),Fe(()=>(vt(J()),l(j),l(c)),()=>{$(H,J()!==l(j)&&l(c)==="duplicate")}),Fe(()=>(l(I),vt(J())),()=>{$(B,l(I)[J()])}),Fe(()=>vt(Y()),()=>{$(W,`${Y()}#`)}),Fe(()=>(l(N),l(W)),()=>{$(G,l(N)?._[l(W)]??!0)}),Fe(()=>(l(B),l(C),vt(Y()),l(o)),()=>{$(K,za(Object.fromEntries(Object.entries(l(B)).filter(([ge])=>l(C).test(ge)).map(([ge,ye])=>[ge.replace(new RegExp(`^${cn(Y())}`),l(o)),ye])))[l(o)]??[])}),Fe(()=>(l(K),vt(Y()),l(N)),()=>{$(ee,l(K).map((ge,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!0]}))}),Fe(()=>(l(be),l(S),vt(he())),()=>{l(be)&&!l(S)&&(he(),_e())}),Rr(),Sr(),_r(t,{get"aria-labelledby"(){return`list-${l(ue)??""}-summary`},children:(ge,ye)=>{var we=V(),Se=M(we);{var Ie=Pe=>{var qe=B9(),Xe=M(qe),ct=R(Xe);const Ye=Ge(()=>!l(K).length),rt=Ge(()=>l(G)?s()("collapse"):s()("expand"));Je(ct,{iconic:!0,get disabled(){return l(Ye)},get"aria-label"(){return l(rt)},get"aria-expanded"(){return l(G)},get"aria-controls"(){return`list-${l(ue)??""}-item-list`},onclick:()=>{ho({[l(W)]:!l(G)})},startIcon:An=>{const Kt=Ge(()=>l(G)?"expand_more":"chevron_right");et(An,{get name(){return l(Kt)}})},$$slots:{startIcon:!0}});var ft=D(ct,2),ut=R(ft),bt=D(ft,2);Yr(bt,{flex:!0});var At=D(bt,2);{var an=It=>{var An=D9(),Kt=M(An);const wt=Ge(()=>s()("expand_all")),nn=Ge(()=>l(ee).every(([,Zt])=>Zt));Je(Kt,{variant:"tertiary",size:"small",get label(){return l(wt)},get disabled(){return l(nn)},onclick:()=>{ho(Object.fromEntries(l(ee).map(([Zt])=>[Zt,!0])))}});var In=D(Kt,2);const Pn=Ge(()=>s()("collapse_all")),qt=Ge(()=>l(ee).every(([,Zt])=>!Zt));Je(In,{variant:"tertiary",size:"small",get label(){return l(Pn)},get disabled(){return l(qt)},onclick:()=>{ho(Object.fromEntries(l(ee).map(([Zt])=>[Zt,!1])))}}),T(It,An)};U(At,It=>{l(G)&&l(K).length>1&&It(an)})}var jn=D(Xe,2);{var sr=It=>{var An=M9(),Kt=R(An);my(Kt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e}),T(It,An)};U(jn,It=>{l(u)&&(l(v)||!l(K).length)&&It(sr)})}var Lr=D(jn,2);dt(Lr,5,()=>l(K),Xn,(It,An,Kt)=>{var wt=j9();const nn=Ge(()=>`${Y()}.${Kt}`),In=Ge(()=>l(N)?._[l(nn)]??!0),Pn=Ge(()=>l(k)?l(_)?.find(({name:Hn})=>Hn===l(An)[l(b)]):void 0),qt=Ge(()=>l(k)?l(Pn)?.fields??[]:l(m)??(l(g)?[l(g)]:[])),Zt=Ge(()=>l(k)&&l(Pn)?.summary||l(f));var bn=R(wt);const Un=Ge(()=>l(k)?l(Pn)?.label||l(Pn)?.name:""),or=Ge(()=>l(qt).length?()=>ho({[l(nn)]:!l(In)}):void 0);yA(bn,{get label(){return l(Un)},get controlId(){return`list-${l(ue)??""}-item-${Kt??""}-body`},get expanded(){return l(In)},get toggleExpanded(){return l(or)},removeButtonVisible:!0,get removeButtonDisabled(){return l(H)},remove:()=>{Ve(Kt)},children:(Hn,Bt)=>{var gi=F9(),Wt=M(gi);const rn=Ge(()=>l(H)||Kt===0),Qe=Ge(()=>s()("move_up"));Je(Wt,{size:"small",iconic:!0,get disabled(){return l(rn)},get"aria-label"(){return l(Qe)},onclick:()=>{We(Kt)},startIcon:Vn=>{et(Vn,{name:"arrow_upward"})},$$slots:{startIcon:!0}});var St=D(Wt,2);Yr(St,{});var On=D(St,2);const lr=Ge(()=>l(H)||Kt===l(K).length-1),po=Ge(()=>s()("move_down"));Je(On,{iconic:!0,size:"small",get disabled(){return l(lr)},get"aria-label"(){return l(po)},onclick:()=>{pt(Kt)},startIcon:Vn=>{et(Vn,{name:"arrow_downward"})},$$slots:{startIcon:!0}}),T(Hn,gi)},$$slots:{default:!0}});var ar=D(bn,2),pi=R(ar);{var Ms=Hn=>{var Bt=V(),gi=M(Bt);dt(gi,1,()=>l(qt),Wt=>Wt.name,(Wt,rn)=>{var Qe=V(),St=M(Qe);hr(St,()=>hn(0),null,On=>{const lr=Ge(()=>l(y)?`${Y()}.${Kt}`:`${Y()}.${Kt}.${l(rn).name}`);_y(On,{get keyPath(){return l(lr)},get locale(){return J()},get fieldConfig(){return l(rn)}})}),T(Wt,Qe)}),T(Hn,Bt)},yr=Hn=>{var Bt=z9(),gi=R(Bt);q(Wt=>Z(gi,Wt),[()=>Ke(Kt,l(Zt))],Ge),T(Hn,Bt)};U(pi,Hn=>{l(In)?Hn(Ms):Hn(yr,!1)})}q(()=>ke(ar,"id",`list-${l(ue)??""}-item-${Kt??""}-body`)),T(It,wt)});var os=D(Lr,2);{var Mi=It=>{var An=U9(),Kt=R(An);my(Kt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e});var wt=D(Kt,2);Yr(wt,{flex:!0}),T(It,An)};U(os,It=>{l(u)&&!l(v)&&l(K).length&&It(Mi)})}q(()=>{ke(ft,"id",`object-${l(ue)??""}-summary`),Z(ut,`${l(K).length??""}
588
- ${((l(K).length===1?l(p):void 0)||l(a)||l(o))??""}`),ke(Lr,"id",`list-${l(ue)??""}-item-list`),ht(Lr,"collapsed",!l(G))}),T(Pe,qe)},ve=Pe=>{yn(Pe,{flex:!0,get readonly(){return re()},get required(){return X()},get invalid(){return fe()},get"aria-errormessage"(){return`${te()??""}-error`},oninput:()=>{Ae()},get value(){return l(Te)},set value(qe){$(Te,qe)},$$legacy:!0})};U(Se,Pe=>{l(S)?Pe(Ie):Pe(ve,!1)})}T(ge,we)},$$slots:{default:!0}}),oe(),r()}var V9=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},W9=(t,e)=>{t.stopPropagation(),e()},G9=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const K9={hash:"svelte-11ls1m1",code:"section.svelte-11ls1m1 {overflow:hidden;margin:8px 0;padding:8px 0;}section.svelte-11ls1m1 > * {margin-right:auto;margin-left:auto;max-width:768px;}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1):not(:last-child) {margin-bottom:8px;}section.svelte-11ls1m1 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}section.svelte-11ls1m1 img {max-height:800px !important;}"};function vy(t,e){se(e,!0),Ee(t,K9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>it(e.fieldConfig.label,"")),a=w(()=>it(e.fieldConfig.widget,"string")),c=w(()=>it(e.fieldConfig.preview,!0)),u=w(()=>it(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),f=w(()=>l(d)?e.fieldConfig.multiple:void 0),h=w(()=>l(a)==="list"||l(d)&&l(f)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),v=w(()=>i()?.fileName),_=w(()=>Gr(i()?.currentValues[e.locale]??{})),b=w(()=>(l(m)??l(p))?._i18n??$i),y=w(()=>l(b).i18nEnabled),x=w(()=>l(b).defaultLocale),k=w(()=>l(y)&&(l(u)===!0||l(u)==="translate")),S=w(()=>l(y)&&l(u)==="duplicate"),C=w(()=>new RegExp(`^${cn(e.keyPath)}\\.\\d+$`)),E=w(()=>l(h)?Object.entries(l(_)).filter(([N])=>l(C).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{ho(Object.fromEntries(kC({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath}).map(N=>[N,!0]))),window.requestAnimationFrame(()=>{const N=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);N&&(typeof N.scrollIntoViewIfNeeded=="function"?N.scrollIntoViewIfNeeded():N.scrollIntoView(),N.classList.add("highlight"),window.setTimeout(()=>{N.classList.remove("highlight")},1500))})};var O=V(),L=M(O);{var I=N=>{var j=G9();j.__keydown=[V9,A],j.__click=[W9,A];var H=R(j),B=R(H),W=D(H,2);{var G=K=>{var ee=V();const J=w(()=>CA[l(a)]);var Y=M(ee);yi(Y,()=>l(J),(te,ce)=>{ce(te,{get keyPath(){return e.keyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(E)}})}),T(K,ee)};U(W,K=>{l(a)in CA&&K(G)})}q(()=>{ke(j,"data-widget",l(a)),ke(j,"data-key-path",e.keyPath),Z(B,l(o)||l(s))}),T(N,j)};U(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(x)||l(k)||l(S))&&N(I)})}T(t,O),oe(),r()}sa(["keydown","click"]);var Y9=F('<div role="none" class="header svelte-1bztb9y"> </div>'),J9=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const Z9={hash:"svelte-1bztb9y",code:".subsection.svelte-1bztb9y {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1bztb9y .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1bztb9y {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-1bztb9y {padding:8px 16px;}.items.svelte-1bztb9y:empty {display:none;}"};function wA(t,e){se(e,!0),Ee(t,Z9);const r=`${er("section")}-header`;let i=ae(void 0);var s=J9(),o=R(s);{var a=d=>{var f=Y9();ke(f,"id",r);var h=R(f);q(()=>Z(h,e.label)),T(d,f)};U(o,d=>{e.label&&d(a)})}var c=D(o,2),u=R(c);hr(u,()=>su(l(i)),null,d=>{var f=V(),h=M(f);Re(h,()=>e.children??Me),T(d,f)}),Pt(s,d=>$(i,d),()=>l(i)),q(()=>ke(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var X9=F('<p dir="auto"> </p>');function Q9(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"locale",8),m=P(e,"keyPath",8),v=P(e,"fieldConfig",8),_=P(e,"currentValue",8);Fe(()=>(l(s),l(o),l(a),l(c),l(u),vt(v())),()=>{(S=>($(s,S.name),$(o,S.field),$(a,S.fields),$(c,S.types),$(u,it(S.typeKey,"type"))))(v())}),Fe(()=>(l(o),l(a),l(c)),()=>{$(d,!!(l(o)??l(a)??l(c)))}),Fe(()=>vt(m()),()=>{$(f,new RegExp(`^${cn(m())}\\.\\d+`))}),Fe(()=>vt(g()),()=>{$(h,_c(g()))}),Fe(()=>(i(),vt(g()),l(f),vt(m()),l(s)),()=>{$(p,za(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(f).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${cn(m())}`),l(s)),C])))[l(s)]??[])}),Rr(),Sr();var b=V(),y=M(b);{var x=S=>{var C=V(),E=M(C);dt(E,1,()=>l(p),Xn,(A,O,L)=>{const I=Ge(()=>Array.isArray(l(c))?i()?.currentValues[g()][`${m()}.${L}.${l(u)}`]:void 0),N=Ge(()=>l(c)?.find(({name:B})=>B===l(I))),j=Ge(()=>l(N)?l(N).label||l(N).name:void 0),H=Ge(()=>l(I)?l(N)?.fields??[]:l(a)??(l(o)?[l(o)]:[]));wA(A,{get label(){return l(j)},children:(B,W)=>{var G=V(),K=M(G);dt(K,1,()=>l(H),ee=>ee.name,(ee,J)=>{var Y=V(),te=M(Y);hr(te,()=>hn(0),null,ce=>{const he=Ge(()=>l(o)?`${m()}.${L}`:`${m()}.${L}.${l(J).name}`);vy(ce,{get keyPath(){return l(he)},get locale(){return g()},get fieldConfig(){return l(J)}})}),T(ee,Y)}),T(B,G)},$$slots:{default:!0}})}),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=O=>{var L=X9(),I=R(L);q(N=>{ke(L,"lang",g()),Z(I,N),L.dir=L.dir},[()=>l(h).format(_())],Ge),T(O,L)};U(E,O=>{Array.isArray(_())&&_().length&&O(A)},!0)}T(S,C)};U(y,S=>{l(d)?S(x):S(k,!1)})}T(t,b),oe(),r()}var eV=(t,e,n)=>{!t.target.matches("button, input, textarea")&&t.key!=="Tab"&&t.preventDefault(),t.target===l(e)&&t.key==="Backspace"&&n()(new CustomEvent("remove"))},tV=F('<section role="group" class="field svelte-z6qmsu"><header role="none"><h4 role="none" class="svelte-z6qmsu"> </h4></header> <div role="none" class="widget-wrapper"><!></div></section>'),nV=F('<div role="group" class="wrapper svelte-z6qmsu" contenteditable="false" tabindex="0"><header role="none" class="svelte-z6qmsu"><h3 role="none" class="svelte-z6qmsu"> </h3> <!></header> <!></div>');const rV={hash:"svelte-z6qmsu",code:".wrapper.svelte-z6qmsu {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-z6qmsu:focus {outline-color:var(--sui-primary-accent-color-translucent);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) {display:flex;align-items:center;justify-content:space-between;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) h3:where(.svelte-z6qmsu) {padding:0 8px;font-size:var(--sui-font-size-small);font-weight:600;}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) button {padding:0;height:16px;}section.svelte-z6qmsu {margin:0;border-top:1px solid var(--sui-secondary-border-color);padding:16px;}section.svelte-z6qmsu h4:where(.svelte-z6qmsu) {margin-bottom:8px;font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color);}"};function iV(t,e){se(e,!0),Ee(t,rV);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"values",19,()=>({})),o=P(e,"onChange",3,()=>{}),a=ae(void 0),c=ae(""),u=ae("");const d=ie({}),f=["image","string"],h=()=>l(a);ln(()=>{window.requestAnimationFrame(()=>{$(c,ie(l(a)?.closest("[data-locale]")?.dataset.locale)),$(u,ie(l(a)?.closest("[data-key-path]")?.dataset.keyPath))})}),Ue(()=>{s(),xe(()=>{Mn(s(),Gr(d))||Object.assign(d,s())})}),Ue(()=>{const S=Gr(d);xe(()=>{Mn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=nV();p.__keydown=[eV,a,o];var g=R(p),m=R(g),v=R(m),_=D(m,2);const b=w(()=>i()("remove"));Je(_,{size:"small",iconic:!0,get"aria-label"(){return l(b)},onclick:()=>{o()(new CustomEvent("remove"))},startIcon:C=>{et(C,{name:"close"})},$$slots:{startIcon:!0}});var y=D(g,2);{var x=S=>{var C=V(),E=M(C);dt(E,17,()=>e.fields,({name:A,label:O,widget:L})=>A,(A,O)=>{let L=()=>l(O).name,I=()=>l(O).label,N=()=>l(O).widget;var j=V(),H=M(j);{var B=W=>{var G=tV();const K=w(()=>sg[N()]);var ee=R(G),J=R(ee),Y=R(J),te=D(ee,2),ce=R(te);const he=w(()=>er("field")),re=w(()=>I()??L()),X=w(()=>({name:L(),widget:N()}));yi(ce,()=>l(K),(fe,be)=>{be(fe,{get locale(){return l(c)},get keyPath(){return`${l(u)??""}:${L()??""}`},get fieldId(){return l(he)},get fieldLabel(){return l(re)},get fieldConfig(){return l(X)},inEditorComponent:!0,get currentValue(){return d[L()]},set currentValue(ue){d[L()]=ue}})}),q(fe=>{ke(G,"aria-label",fe),ke(G,"data-widget",N()),ke(G,"data-key-path",`${l(u)??""}:${L()??""}`),Z(Y,I())},[()=>i()("x_field",{values:{field:I()}})]),_i("keydown",G,fe=>{fe.stopPropagation()},!0),T(W,G)};U(H,W=>{N()&&f.includes(N())&&W(B)})}T(A,j)}),T(S,C)};U(y,S=>{l(c)&&l(u)&&S(x)})}Pt(p,S=>$(a,S),()=>l(a)),q(()=>{ke(p,"aria-label",e.label),Z(v,e.label)}),T(t,p);var k=oe({getElement:h});return r(),k}sa(["keydown"]);const xA=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),sV=t=>({image:{id:"image",icon:"image",label:ne(le)("editor_components.image"),fields:[{name:"src",label:ne(le)("editor_components.src"),widget:"image"},{name:"alt",label:ne(le)("editor_components.alt"),widget:"string"},{name:"title",label:ne(le)("editor_components.title"),widget:"string"},{name:"link",label:ne(le)("editor_components.link"),widget:"string"}],pattern:/\[?!\[(?<alt>.*?)\]\((?<src>.*?)(?: "(?<title>.*?)")?\)(?:\]\((?<link>.*?)\))?/,toBlock:n=>{const{src:r,alt:i,title:s,link:o}=xA(n);if(!r)return"";const a=`![${i}](${r}${s?` "${s}"`:""})`;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=xA(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],oV=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends q0{__props;constructor(p,g){super(g),this.__props=p}static getType(){return t}isInline(){return!0}static clone(p){return new c(p.__props,p.__key)}static importJSON(p){return u().updateFromJSON(p)}exportJSON(){return{...this.__props,type:t,version:1}}createDOM(){let p,g=null;const m=async({type:_,detail:b})=>{await pl(),g??=Qm(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=b),_==="remove"&&this.remove()})},v=Cg(iV,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return EP(),p=v.getElement(),window.requestAnimationFrame(()=>{p.focus()}),p}exportDOM(){return{element:this.createDOM()}}static importDOM(){const p={[a]:()=>({conversion:g=>({node:u(Object.fromEntries(n.map(({name:m})=>[m,g[m]??""])))}),priority:3})};return t==="image"&&Object.assign(p,{a:g=>{if(g.firstChild?.nodeName.toLowerCase()==="img"){const{href:m}=g,{src:v,alt:_,title:b}=g.firstChild;return{conversion:()=>({node:u({src:v,alt:_,title:b,link:m}),after:()=>[]}),priority:4}}return null}}),p}updateDOM(){return!1}decorate(){return null}}const u=h=>new c(h??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=h=>h instanceof c&&h.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:h=>d(h)?s(h.__props):null,importRegExp:r,regExp:r,replace:(h,p)=>{const g=p,m=i?.(g)??g.groups??{};h.replace(u(m))},type:"text-match"}}},kA=new Map;class aV{constructor(e){const{id:n}=e,r=kA.get(n),i=r??oV(e);r||kA.set(n,i),Object.assign(this,{...e,...i})}}var lV=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const cV={hash:"svelte-1e9a0b3",code:`.wrapper.svelte-1e9a0b3 {display:contents;}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],
586
+ ${L??""}`)},[()=>l(h).name.normalize(),()=>i()?k_(l(h).size):"",()=>s()(`file_type_labels.${l(p).extension}`,{default:l(p).extension.toUpperCase()})]),T(c,f)}),T(t,a),oe(),r()}var nH=({target:t},e)=>{const n=[...t.files];e()?.({files:n,file:n[0]})},rH=F('<input type="file" hidden>');function KC(t,e){se(e,!0);let n=P(e,"accept",3,void 0),r=P(e,"multiple",3,!1),i=P(e,"onSelect",3,void 0),s=ae(void 0);const o=()=>{l(s)?.click()};var a=rH();return a.__change=[nH,i],Pt(a,c=>$(s,c),()=>l(s)),q(()=>{ke(a,"accept",n()),a.multiple=r()}),_i("cancel",a,c=>{c.stopPropagation()}),T(t,a),oe({open:o})}sa(["change"]);var iH=F('<div role="alert"> </div>'),sH=F('<div role="none"> </div> <div role="none"><!></div> <!>',1),oH=F('<div role="none" class="content svelte-osk4b"><!> <!></div>'),aH=F('<div role="none" class="drop-indicator svelte-osk4b"><div role="none" class="svelte-osk4b"><!> <span role="none"> </span></div></div>'),lH=F('<div role="none" class="drop-target svelte-osk4b"><!> <!></div> <!>',1);const cH={hash:"svelte-osk4b",code:".drop-target.svelte-osk4b {display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto;}.drop-target.svelte-osk4b > .group {overflow-y:auto;padding:16px;width:100%;height:100%;}.drop-target.svelte-osk4b > :where(.svelte-osk4b) {pointer-events:none;}.drop-target.svelte-osk4b button {pointer-events:auto;}.drop-indicator.svelte-osk4b {position:absolute;inset:0;z-index:10;border-radius:var(--sui-control-large-border-radius);background-color:hsl(var(--sui-background-color-4-hsl)/80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none;}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) {position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border:4px dashed var(--sui-primary-accent-color);border-radius:var(--sui-control-large-border-radius);font-size:var(--sui-font-size-x-large);}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.content.svelte-osk4b {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center;}"};function Rd(t,e){se(e,!0),Ee(t,cH);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"accept",3,void 0),o=P(e,"disabled",3,!1),a=P(e,"multiple",3,!1),c=P(e,"showUploadButton",3,!1),u=P(e,"showFilePreview",3,!1),d=P(e,"onSelect",3,void 0),f=P(e,"children",3,void 0),h=ae(!1),p=ae(!1),g=ae(void 0),m=ae(ie([]));const v=()=>{l(g)?.open()},_=()=>{$(m,ie([])),d()?.({files:l(m)})},b=I=>{$(m,ie(a()?I:I.slice(0,1))),d()?.({files:l(m)})};var y=lH(),x=M(y),k=R(x);{var S=I=>{var N=oH(),j=R(N);{var H=G=>{var K=sH(),ee=M(K),J=R(ee),Y=D(ee,2),te=R(Y);const ce=w(()=>i()(a()?"choose_files":"choose_file"));Je(te,{variant:"primary",get label(){return l(ce)},get disabled(){return o()},onclick:()=>{v()},startIcon:fe=>{et(fe,{name:"cloud_upload"})},$$slots:{startIcon:!0}});var he=D(Y,2);{var re=X=>{var fe=iH(),be=R(fe);q(ue=>Z(be,ue),[()=>i()("drop_files_type_mismatch",{values:{type:s()}})]),T(X,fe)};U(he,X=>{l(p)&&X(re)})}q(X=>Z(J,X),[()=>i()(a()?"drop_or_browse_files":"drop_or_browse_file")]),T(G,K)};U(j,G=>{c()&&G(H)})}var B=D(j,2);{var W=G=>{GC(G,{get files(){return l(m)},set files(K){$(m,ie(K))}})};U(B,G=>{u()&&l(m).length&&G(W)})}T(I,N)},C=I=>{var N=V(),j=M(N);Re(j,()=>f()??Me),T(I,N)};U(k,I=>{c()||u()&&l(m).length?I(S):I(C,!1)})}var E=D(k,2);{var A=I=>{var N=aH(),j=R(N),H=R(j);et(H,{name:"download"});var B=D(H,2),W=R(B);q(G=>Z(W,G),[()=>i()(a()?"drop_files_here":"drop_file_here")]),T(I,N)};U(E,I=>{l(h)&&I(A)})}var O=D(x,2);Pt(KC(O,{get accept(){return s()},get multiple(){return a()},onSelect:({files:I})=>{b(I)}}),I=>$(g,ie(I)),()=>l(g)),_i("dragover",x,I=>{I.preventDefault(),!(o()||!I.dataTransfer)&&(I.dataTransfer.dropEffect="copy",$(h,!0),$(p,!1))}),_i("dragleave",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),_i("dragend",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),_i("drop",x,async I=>{if(I.preventDefault(),o()||!I.dataTransfer)return;$(h,!1);const N=await RP(I.dataTransfer,{accept:s()});N.length?b(N):$(p,!0)}),T(t,y);var L=oe({openFilePicker:v,reset:_});return r(),L}var uH=F('<div role="none" class="spinner svelte-v6s0f"></div>'),dH=F("<!> <!>",1);const fH={hash:"svelte-v6s0f",code:".spinner.svelte-v6s0f {height:1px;}"};function nl(t,e){se(e,!0),Ee(t,fH);let n=P(e,"itemChunkSize",3,25),r=ae(ie(n())),i=ae(void 0);const s=w(()=>e.items.length>l(r)),o=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(l(s)?$(r,l(r)+n()):o.disconnect())});Ue(()=>{l(i)&&o.observe(l(i))});var a=dH(),c=M(a);dt(c,17,()=>e.items.slice(0,l(r)),f=>f[e.itemKey],(f,h)=>{var p=V(),g=M(p);Re(g,()=>e.renderItem,()=>l(h)),T(f,p)});var u=D(c,2);{var d=f=>{var h=uH();Pt(h,p=>$(i,p),()=>l(i)),T(f,h)};U(u,f=>{l(s)&&f(d)})}T(t,a),oe()}var hH=F('<div role="none" class="list-container svelte-1smo9s9"><!></div>');const pH={hash:"svelte-1smo9s9",code:".list-container.svelte-1smo9s9 {flex:auto;position:relative;height:100%;overflow:hidden;}.list-container.svelte-1smo9s9 > .group {height:100%;overflow-y:auto;overscroll-behavior-y:contain;}.list-container.svelte-1smo9s9 > .group :is(.grid-view, .list-view) {display:block;padding:0 16px 16px;height:100%;overflow-y:auto;}"};function fy(t,e){Ee(t,pH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=hH(),s=R(i);_r(s,Qt(()=>r,{children:(o,a)=>{var c=V(),u=M(c);Re(u,()=>n()??Me),T(o,c)},$$slots:{default:!0}})),T(t,i)}var gH=F('<div role="none"><!></div>');const mH={hash:"svelte-180m7hm",code:'.grid-view.svelte-180m7hm .row-group-caption {display:block;margin:8px;grid-column:1/-1;}.grid-view.svelte-180m7hm .row-group-caption th {display:block;}.grid-view.svelte-180m7hm .grid-body {display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0;}.grid-view.svelte-180m7hm [role="row"] {display:block;position:relative;overflow:hidden;height:auto;text-align:left;}.grid-view.svelte-180m7hm [role="row"] .grid-cell {display:block;}.grid-view.svelte-180m7hm [role="row"] .grid-cell.image:empty {aspect-ratio:1/1;}.grid-view.svelte-180m7hm [role="row"] .checkbox {position:absolute;inset:4px auto auto 4px;z-index:2;}.grid-view.svelte-180m7hm [role="row"] .title span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:12px;height:40px;line-height:1.5;word-break:break-all;}.grid-view.svelte-180m7hm [role="row"][tabindex] {border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-secondary-background-color);cursor:pointer;transition:background-color 200ms;}.grid-view.svelte-180m7hm [role="row"][tabindex]:hover, .grid-view.svelte-180m7hm [role="row"][tabindex]:focus, .grid-view.svelte-180m7hm [role="row"][tabindex]:active {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm {--icon-size: 36px;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption + .grid-row .grid-cell {border-top-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption ~ .grid-row:last-child .grid-cell {border-bottom-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] [role="row"] {transition-property:background-color, outline-color;transition-duration:200ms;}.list-view.svelte-180m7hm [role="grid"] [role="row"][tabindex] {cursor:pointer;}.list-view.svelte-180m7hm [role="grid"] [role="row"]:hover {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm [role="grid"] [role="rowheader"] {border-width:0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] {overflow:hidden;padding:0 16px 0 0;height:40px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap;text-overflow:ellipsis;vertical-align:middle;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"]:first-child {padding-left:16px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] .label {overflow:hidden;text-overflow:ellipsis;}.list-view.svelte-180m7hm [role="grid"] .grid-cell.image:empty::before {display:block;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);content:"";}.list-view.svelte-180m7hm [role="grid"] [role="row"] [role="gridcell"] {border-width:1px 0 0;border-color:var(--sui-secondary-border-color);}.list-view.svelte-180m7hm [role="grid"] [role="row"]:last-child [role="gridcell"] {border-width:1px 0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].checkbox {padding-left:8px;width:44px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].title {width:100%; /* flex: auto */color:var(--sui-primary-foreground-color);}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].image {width:48px;}'};function Dd(t,e){se(e,!0),Ee(t,mH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","viewType","children"]);var i=gH(),s=R(i);hr(s,()=>hn(0),null,o=>{NL(o,Qt({multiple:!0,clickToSelect:!1},()=>r,{children:(a,c)=>{var u=V(),d=M(u);Re(d,()=>n()??Me),T(a,u)},$$slots:{default:!0}}))}),q(()=>Mr(i,`${e.viewType??""}-view svelte-180m7hm`)),T(t,i),oe()}var vH=F('<span role="none"> </span>');function bH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ss,"$currentView",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(le,"$_",n),a=()=>z(P_,"$globalAssetFolder",n),c=()=>z(uy,"$assetGroups",n),u=()=>z(tl,"$listedAssets",n),d=w(()=>i().type),f=w(()=>!!s()?.entryRelative),h=w(()=>o()("asset_list"));fy(t,{get"aria-label"(){return l(h)},children:(p,g)=>{Rd(p,{get disabled(){return l(f)},multiple:!0,onSelect:({files:m})=>{ot(Ls,{folder:s()?.internalPath||a()?.internalPath,files:m})},children:(m,v)=>{var _=V(),b=M(_);{var y=k=>{const S=w(()=>o()("assets"));Dd(k,{id:"asset-list",get viewType(){return l(d)},get"aria-label"(){return l(S)},get"aria-rowcount"(){return u().length},children:(C,E)=>{var A=V(),O=M(A);dt(O,1,()=>Object.entries(c()),([L,I])=>L,(L,I)=>{let N=()=>l(I)[0],j=()=>l(I)[1];const H=w(()=>N()!=="*"?N():void 0);Sx(L,{get label(){return l(H)},children:(B,W)=>{nl(B,{get items(){return j()},itemKey:"path",renderItem:(K,ee=Me)=>{var J=V(),Y=M(J);ms(Y,()=>ee().sha,te=>{Z8(te,{get asset(){return ee()},get viewType(){return l(d)}})}),T(K,J)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(C,A)},$$slots:{default:!0}})},x=k=>{$r(k,{children:(S,C)=>{var E=vH(),A=R(E);q(O=>Z(A,O),[()=>o()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};U(b,k=>{Object.values(c()).flat(1).length?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var _H=F('<span class="count"> </span>'),yH=F('<div role="none" class="primary-sidebar"><!></div>');function wH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(di,"$allAssetFolders",n),o=()=>z(le,"$_",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(tn,"$allAssets",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>[{collectionName:"*",internalPath:void 0,publicPath:void 0,entryRelative:!1},...s()]);var f=yH(),h=R(f);const p=w(()=>o()("asset_folders"));cu(h,{get"aria-label"(){return l(p)},"aria-controls":"assets-container",children:(g,m)=>{var v=V(),_=M(v);dt(_,17,()=>l(d),({collectionName:b,internalPath:y,entryRelative:x})=>b,(b,y)=>{let x=()=>l(y).collectionName,k=()=>l(y).internalPath,S=()=>l(y).entryRelative;const C=w(()=>x()?Ri(x()):void 0),E=w(S),A=w(()=>k()===void 0&&!a()||k()===a()?.internalPath),O=w(()=>i()?ng(x()):"");gr(b,{get selected(){return l(A)},get label(){return l(O)},onSelect:()=>{zn(k()?`/assets/${k()}`:"/assets")},ondragover:N=>{N.preventDefault(),!l(E)&&(k()===void 0||l(A)?N.dataTransfer.dropEffect="none":(N.dataTransfer.dropEffect="move",N.target.classList.add("dragover")))},ondragleave:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondragend:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondrop:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},startIcon:N=>{const j=w(()=>l(C)?.icon||"folder");et(N,{get name(){return l(j)}})},endIcon:N=>{var j=V(),H=M(j);ms(H,c,B=>{var W=V(),G=M(W);hr(G,()=>hn(0),null,K=>{var ee=_H();const J=w(()=>(k()?qB(k()):c()).length);var Y=R(ee);q((te,ce)=>{ke(ee,"aria-label",`(${te??""})`),Z(Y,ce)},[()=>o()(l(J)>1?"many_assets":l(J)===1?"one_asset":"no_assets",{values:{count:l(J)}}),()=>l(u).format(l(J))]),T(K,ee)}),T(B,W)}),T(N,j)},$$slots:{startIcon:!0,endIcon:!0}})}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function xH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>!e.asset||!YT(e.asset)),o=w(()=>i()("preview")),a=w(()=>i()("show_preview"));Je(t,{variant:"ghost",get disabled(){return l(s)},get label(){return l(o)},get"aria-label"(){return l(a)},onclick:()=>{zn(`/assets/${e.asset?.path}`)}}),oe(),r()}function kH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(le,"$_",n),o=w(()=>!!i()?.entryRelative),a=w(()=>s()("upload")),c=w(()=>s()("upload_assets"));Je(t,{variant:"primary",get label(){return l(a)},get disabled(){return l(o)},get"aria-label"(){return l(c)},onclick:()=>{ot(el,!0)},startIcon:d=>{et(d,{name:"cloud_upload"})},$$slots:{startIcon:!0}}),oe(),r()}var SH=F('<span role="none"> </span>'),EH=F('<h2 role="none"> <!></h2> <!> <!> <!> <!> <!> <!> <!>',1);function TH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(kd,"$selectedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(le,"$_",n),a=()=>z(Ln,"$appLocale",n),c=()=>z(ni,"$selectedAssetFolder",n),u=()=>z(tl,"$listedAssets",n),d=w(()=>i().length?i():s()?[s()]:[]),f=w(()=>o()("folder"));Zs(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=EH(),m=M(g),v=R(m),_=D(v);{var b=N=>{var j=SH(),H=R(j);q(()=>Z(H,`/${c().internalPath??""}`)),T(N,j)};U(_,N=>{c()&&N(b)})}var y=D(m,2);Yr(y,{flex:!0});var x=D(y,2);xH(x,{get asset(){return s()}});var k=D(x,2);const S=w(()=>s()?[s()]:[]);AC(k,{get assets(){return l(S)}});var C=D(k,2);VC(C,{get assets(){return l(d)}});var E=D(C,2);const A=w(()=>o()(l(d).length===1?"delete_selected_asset":"delete_selected_assets")),O=w(()=>o()(l(d).length===1?"confirm_deleting_selected_asset":l(d).length===u().length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:l(d).length}}));HC(E,{get assets(){return l(d)},get buttonDescription(){return l(A)},get dialogDescription(){return l(O)}});var L=D(E,2);WC(L,{get asset(){return s()}});var I=D(L,2);kH(I,{}),q(N=>Z(v,`${N??""} `),[()=>a()?cy(c()?.internalPath):""]),T(h,g)},$$slots:{default:!0}}),oe(),r()}var CH=F('<span role="none"> </span>');function AH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ss,"$currentView",n),s=()=>z(le,"$_",n),o=()=>z(uo,"$focusedAsset",n),a=w(()=>!i().showInfo),c=w(()=>s()("asset_info"));_r(t,{id:"asset-info",class:"secondary-sidebar",get hidden(){return l(a)},get"aria-label"(){return l(c)},children:(u,d)=>{var f=V(),h=M(f);{var p=m=>{CC(m,{get asset(){return o()},showPreview:!0})},g=m=>{$r(m,{children:(v,_)=>{var b=CH(),y=R(b);q(x=>Z(y,x),[()=>s()("select_asset_show_info")]),T(v,b)},$$slots:{default:!0}})};U(h,m=>{o()?m(p):m(g,!1)})}T(u,f)},$$slots:{default:!0}}),oe(),r()}var PH=F("<!> <!>",1);function YC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"multiple",3,!1),u=P(e,"noneLabel",3,""),d=P(e,"filters",19,()=>[]);const f=w(()=>o()||i()("filter"));Er(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:p=>{const g=w(()=>i()("filtering_options"));mr(p,{get"aria-label"(){return l(g)},get"aria-controls"(){return e["aria-controls"]},children:(m,v)=>{var _=V(),b=M(_);{var y=k=>{var S=V(),C=M(S);dt(C,17,d,Xn,(E,A)=>{let O=()=>l(A).label,L=()=>l(A).field,I=()=>l(A).pattern;const N=w(()=>(s().filters||[]).findIndex(H=>H.field===L()&&H.pattern===I())),j=w(()=>l(N)>-1);Pf(E,{get label(){return O()},get checked(){return l(j)},onChange:()=>{e.currentView.update(H=>{const B=H.filters?[...H.filters]:[];return l(N)>-1?B.splice(l(N),1):B.push({field:L(),pattern:I()}),{...H,filters:B}})}})}),T(k,S)},x=k=>{var S=PH(),C=M(S);const E=w(()=>u()||i()("sort_keys.none")),A=w(()=>!s().filter);uu(C,{get label(){return l(E)},get checked(){return l(A)},onSelect:()=>{e.currentView.update(L=>({...L,filter:void 0}))}});var O=D(C,2);dt(O,17,d,Xn,(L,I)=>{let N=()=>l(I).label,j=()=>l(I).field,H=()=>l(I).pattern;const B=w(()=>s().filter?.field===j()&&s().filter.pattern===H());uu(L,{get label(){return N()},get checked(){return l(B)},onSelect:()=>{e.currentView.update(W=>({...W,filter:{field:j(),pattern:H()}}))}})}),T(k,S)};U(b,k=>{c()?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var OH=F('<span role="none" class="svelte-1154dkn"> </span>'),$H=F('<div role="none" class="wrapper svelte-1154dkn"><!> <!></div>');const LH={hash:"svelte-1154dkn",code:".wrapper.svelte-1154dkn {display:flex;align-items:center;gap:4px;margin-inline:20px;}span.svelte-1154dkn {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function JC(t,e){se(e,!0),Ee(t,LH);const[n,r]=me(),i=()=>z(e.selectedItems,"$selectedItems",n),s=()=>z(le,"$_",n),o=w(()=>e.allItems.length),a=w(()=>i().length),c=w(()=>!!l(a)),u=w(()=>l(c)&&l(a)===l(o));var d=$H(),f=R(d);const h=w(()=>!l(o)),p=w(()=>s()("select_all")),g=w(()=>l(c)&&!l(u)?"mixed":l(c));au(f,{get disabled(){return l(h)},get"aria-label"(){return l(p)},get checked(){return l(g)},onChange:()=>{e.selectedItems.set(l(u)?[]:[...e.allItems])}});var m=D(f,2);{var v=_=>{var b=OH(),y=R(b);q(x=>Z(y,x),[()=>s()("x_of_x_selected",{values:{total:l(o),selected:l(a)}})]),T(_,b)};U(m,_=>{l(c)&&_(v)})}T(t,d),oe(),r()}function ZC(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"fields",19,()=>[]),u=P(e,"collectionName",3,void 0);const d=["ascending","descending"],f=["date","commit_date"],h=w(()=>o()||i()("sort"));Er(t,{variant:"ghost",get label(){return l(h)},get disabled(){return a()},popupPosition:"bottom-right",popup:g=>{const m=w(()=>i()("sorting_options"));mr(g,{get"aria-label"(){return l(m)},get"aria-controls"(){return e["aria-controls"]},children:(v,_)=>{var b=V(),y=M(b);dt(y,17,c,({key:x,label:k})=>x,(x,k)=>{let S=()=>l(k).key,C=()=>l(k).label;var E=V(),A=M(E);dt(A,16,()=>d,O=>O,(O,L)=>{const I=w(()=>i()(f.includes(S())||u()&&vn({collectionName:u(),keyPath:S()})?.widget==="datetime"?`${L}_date`:L,{values:{label:C()}})),N=w(()=>s().sort?.key===S()&&s().sort.order===L);uu(O,{get label(){return l(I)},get checked(){return l(N)},onSelect:()=>{e.currentView.update(j=>({...j,sort:{key:S(),order:L}}))}})}),T(x,E)}),T(v,b)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var NH=F("<!> <!>",1),IH=F('<div role="none" class="wrapper svelte-1adg8sx"><!></div>');const RH={hash:"svelte-1adg8sx",code:".wrapper.svelte-1adg8sx {display:contents;}.wrapper.svelte-1adg8sx button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function hy(t,e){se(e,!0),Ee(t,RH);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"disabled",3,!1),a=at(e,["$$slots","$$events","$$legacy","disabled","currentView"]);var c=IH(),u=R(c);const d=w(()=>i()("switch_view"));Cf(u,Qt({get disabled(){return o()},get"aria-label"(){return l(d)}},()=>a,{children:(f,h)=>{var p=NH(),g=M(p);const m=w(()=>s().type!=="grid"),v=w(()=>i()("list_view"));ou(g,{get disabled(){return o()},get selected(){return l(m)},variant:"ghost",iconic:!0,get"aria-label"(){return l(v)},onSelect:()=>{e.currentView.update(k=>({...k,type:"list"}))},startIcon:k=>{et(k,{name:"format_list_bulleted"})},$$slots:{startIcon:!0}});var _=D(g,2);const b=w(()=>s().type==="grid"),y=w(()=>i()("grid_view"));ou(_,{get disabled(){return o()},get selected(){return l(b)},variant:"ghost",iconic:!0,get"aria-label"(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,type:"grid"}))},startIcon:k=>{et(k,{name:"grid_view"})},$$slots:{startIcon:!0}}),T(f,p)},$$slots:{default:!0}})),T(t,c),oe(),r()}var DH=F("<!> <!> <!> <!> <!> <!> <!>",1);function MH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(tl,"$listedAssets",n),s=()=>z(le,"$_",n),o=()=>z(uy,"$assetGroups",n),a=()=>z(A8,"$sortFields",n),c=()=>z(ss,"$currentView",n),u=w(()=>!!i().length),d=w(()=>i().length>1),f=w(()=>s()("asset_list"));Zs(t,{variant:"secondary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=DH(),m=M(g);const v=w(()=>Object.values(o()).flat(1));JC(m,{get allItems(){return l(v)},selectedItems:kd});var _=D(m,2);Yr(_,{flex:!0});var b=D(_,2);const y=w(()=>!l(d));ZC(b,{get disabled(){return l(y)},currentView:ss,get fields(){return a()},"aria-controls":"asset-list"});var x=D(b,2);const k=w(()=>s()("type")),S=w(()=>!l(d)),C=w(()=>s()("all")),E=w(()=>UB.map(W=>({label:s()(W),field:"fileType",pattern:W})));YC(x,{get label(){return l(k)},get disabled(){return l(S)},currentView:ss,get noneLabel(){return l(C)},get filters(){return l(E)},"aria-controls":"asset-list"});var A=D(x,2);const O=w(()=>!l(u));hy(A,{get disabled(){return l(O)},currentView:ss,"aria-controls":"asset-list"});var L=D(A,2);Tr(L,{orientation:"vertical"});var I=D(L,2);const N=w(()=>!l(u)),j=w(()=>!!c().showInfo),H=w(()=>!!c().showInfo),B=w(()=>s()(c().showInfo?"hide_info":"show_info"));Je(I,{variant:"ghost",iconic:!0,get disabled(){return l(N)},get pressed(){return l(j)},"aria-controls":"asset-info",get"aria-expanded"(){return l(H)},get"aria-label"(){return l(B)},onclick:()=>{ss.update(G=>({...G,showInfo:!c().showInfo}))},startIcon:G=>{et(G,{name:"info"})},$$slots:{startIcon:!0}}),T(h,g)},$$slots:{default:!0}}),oe(),r()}var FH=F('<!> <div role="none" class="main-inner svelte-1fpggxh"><div role="none" class="main-inner-main svelte-1fpggxh"><!> <!></div> <!></div>',1);const zH={hash:"svelte-1fpggxh",code:'.main-inner.svelte-1fpggxh {flex:auto;display:flex;overflow:hidden;}.main-inner.svelte-1fpggxh .main-inner-main:where(.svelte-1fpggxh) {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.main-inner.svelte-1fpggxh .secondary-sidebar {flex:none;overflow:auto;box-sizing:content-box;border-top-left-radius:16px;width:320px;background-color:var(--sui-secondary-background-color);}.main-inner.svelte-1fpggxh .secondary-sidebar [role="listbox"] {padding:12px;}'};function XC(t,e){Ee(t,zH);let n=P(e,"primaryToolbar",3,void 0),r=P(e,"secondaryToolbar",3,void 0),i=P(e,"mainContent",3,void 0),s=P(e,"secondarySidebar",3,void 0);var o=FH(),a=M(o);Re(a,()=>n()??Me);var c=D(a,2),u=R(c),d=R(u);Re(d,()=>r()??Me);var f=D(d,2);Re(f,()=>i()??Me);var h=D(u,2);Re(h,()=>s()??Me),T(t,o)}var jH=F("<!> <!>",1),UH=F('<div role="none" id="page-container" class="outer svelte-6friv7"><!></div>');const BH={hash:"svelte-6friv7",code:'.outer.svelte-6friv7 {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.outer[inert].svelte-6friv7 {display:none;}.outer.svelte-6friv7 > [role="toolbar"] {flex:none;}.outer.svelte-6friv7 > [role="toolbar"] [role="search"] {flex:auto;width:auto;max-width:480px;}.outer.svelte-6friv7 .browser {flex:auto;display:flex;overflow:hidden;}.outer.svelte-6friv7 .primary-sidebar {display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;}.outer.svelte-6friv7 .primary-sidebar [role="radiogroup"] {width:100%;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] {margin:8px;border-width:0;background-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button {display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:left;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button span {flex:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .label {flex:auto;overflow:hidden;text-overflow:ellipsis;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon {transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon.check {display:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .count {padding:2px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:first-child) {margin-top:4px;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:focus) {border-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] .count {color:var(--sui-highlighted-foreground-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"].dragover {color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important;}.outer.svelte-6friv7 .primary-sidebar .sui.divider {margin:8px 0;}.outer.svelte-6friv7 .main {flex:auto;display:flex;flex-direction:column;overflow:hidden;border-top-left-radius:16px;background-color:var(--sui-primary-background-color);}.outer.svelte-6friv7 .main .primary.global[role="toolbar"] {justify-content:center;}'};function Md(t,e){Ee(t,BH);const[n,r]=me(),i=()=>z(SC,"$hasOverlay",n);let s=P(e,"class",3,""),o=P(e,"primarySidebar",3,void 0),a=P(e,"main",3,void 0),c=at(e,["$$slots","$$events","$$legacy","class","primarySidebar","main"]);var u=UH(),d=R(u);_r(d,Qt({get class(){return`browser ${s()??""}`}},()=>c,{children:(f,h)=>{var p=jH(),g=M(p);Re(g,()=>o()??Me);var m=D(g,2);Re(m,()=>a()??Me),T(f,p)},$$slots:{default:!0}})),q(()=>u.inert=i()),T(t,u),r()}var qH=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function HH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(di,"$allAssetFolders",n),o=()=>z(tl,"$listedAssets",n),a=()=>z(le,"$_",n),c=()=>z(Ko,"$overlaidAsset",n),u=()=>z(tn,"$allAssets",n),d=()=>z(Zo,"$assetUpdatesToast",n),f=/^\/assets(?:\/(?<folderPath>[/\-\w]+))?(?:\/(?<fileName>[^/]+\.[A-Za-z0-9]+))?$/,h=w(()=>cy(i()?.internalPath)),p=async()=>{const{path:E}=$d(),A=E.match(f);if(!A?.groups)return;const{folderPath:O,fileName:L}=A.groups;if(!O)ot(ni,void 0);else if(i()?.internalPath!==O){const I=s().find(({internalPath:N})=>O===N);I&&ot(ni,I)}if(!L){const I=o().length;await hn(100),ot(Rs,a()(I>1?"viewing_x_asset_folder_many_assets":I===1?"viewing_x_asset_folder_one_asset":"viewing_x_asset_folder_no_assets",{values:{folder:l(h),count:I}}));return}ot(Ko,L?u().find(I=>I.path===`${O}/${L}`):void 0),ot(Rs,c()?a()("viewing_x_asset_details",{values:{name:c().name}}):a()("file_not_found")),ot(Go,!0)};ln(()=>{p()});var g=qH();_i("hashchange",al,()=>{p()});var m=M(g);const v=w(()=>a()("asset_library"));Md(m,{class:"media",get"aria-label"(){return l(v)},primarySidebar:O=>{wH(O,{})},main:O=>{const L=w(()=>a()("x_asset_folder",{values:{folder:l(h)}}));_r(O,{id:"assets-container",class:"main",get"aria-label"(){return l(L)},children:(I,N)=>{XC(I,{primaryToolbar:G=>{TH(G,{})},secondaryToolbar:G=>{var K=V(),ee=M(K);{var J=Y=>{MH(Y,{})};U(ee,Y=>{o().length&&Y(J)})}T(G,K)},mainContent:G=>{bH(G,{})},secondarySidebar:G=>{AH(G,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var _=D(m,2);U8(_,{});var b=D(_,2);H8(b,{});var y=D(b,2);K8(y,{});var x=D(y,2);Gn(x,{get show(){return d().saved},set show(E){Ct(Zo,xe(d).saved=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().published?d().count===1?"asset_saved_and_published":"assets_saved_and_published":d().count===1?"asset_saved":"assets_saved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var k=D(x,2);Gn(k,{get show(){return d().moved},set show(E){Ct(Zo,xe(d).moved=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_moved":"assets_moved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Gn(S,{get show(){return d().renamed},set show(E){Ct(Zo,xe(d).renamed=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_renamed":"assets_renamed",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Gn(C,{get show(){return d().deleted},set show(E){Ct(Zo,xe(d).deleted=E,xe(d))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_deleted":"assets_deleted",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,g),oe(),r()}var VH=F('<div role="none"><!></div> <!>',1);function WH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ls,"$uploadingAssets",n),s=()=>z(Go,"$showAssetOverlay",n),o=()=>z(k8,"$showUploadAssetsConfirmDialog",n),a=()=>z(le,"$_",n),c=w(()=>i().files),u=w(()=>i().folder),d=w(()=>i().originalAsset);let f=ae(ie([]));Ue(()=>{$(f,ie([...l(c)]))}),Ue(()=>{s()||ot(Ls,{folder:void 0,files:[]})});const h=w(()=>a()(l(d)?"replace_asset":"upload_assets")),p=w(()=>a()(l(d)?"replace":"upload"));kl(t,{get open(){return o()},get title(){return l(h)},get okLabel(){return l(p)},onOk:async()=>{await qC(i(),{commitType:"uploadMedia"}),ot(Ls,{folder:void 0,files:[]})},onCancel:()=>{ot(Ls,{folder:void 0,files:[]})},children:(g,m)=>{var v=VH(),_=M(v),b=R(_);{var y=S=>{var C=Be();q(E=>Z(C,E),[()=>a()("confirm_replacing_file",{values:{name:l(d).name}})]),T(S,C)},x=S=>{var C=Be();q(E=>Z(C,E),[()=>a()(l(f).length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:l(f).length,folder:`/${l(u)}`}})]),T(S,C)};U(b,S=>{l(d)?S(y):S(x,!1)})}var k=D(_,2);GC(k,{get files(){return l(f)},set files(S){$(f,ie(S))}}),T(g,v)},$$slots:{default:!0}}),oe(),r()}function GH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ls,"$uploadingAssets",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(P_,"$globalAssetFolder",n),a=()=>z(el,"$showUploadAssetsDialog",n),c=()=>z(Go,"$showAssetOverlay",n),u=()=>z(le,"$_",n);let d=ae(void 0);const f=w(()=>i().originalAsset),h=w(()=>!l(f)),p=w(()=>l(f)?Mo.getType(l(f).name)??void 0:void 0),g=y=>{y.length&&(ot(Ls,{folder:l(f)?l(f).folder:s()?.internalPath||o()?.internalPath,files:y,originalAsset:l(f)}),ot(el,!1))};Ue(()=>{!Mp()&&a()&&l(d)?.open()}),Ue(()=>{c()||ot(el,!1)});var m=V(),v=M(m);{var _=y=>{const x=w(()=>l(f)?u()("replace_x",{values:{name:l(f).name}}):u()("upload_assets"));Ui(y,{get title(){return l(x)},showOk:!1,get open(){return Ew(),a()},set open(k){ot(el,k)},children:(k,S)=>{Rd(k,{showUploadButton:!0,get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:C})=>{g(C)}})},$$slots:{default:!0}})},b=y=>{Pt(KC(y,{get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:x})=>{g(x)}}),x=>$(d,ie(x)),()=>l(d))};U(v,y=>{Mp()?y(_):y(b,!1)})}T(t,m),oe(),r()}var KH=F('<div role="blockquote" class="svelte-soravq"><pre class="svelte-soravq"> </pre></div>');const YH={hash:"svelte-soravq",code:"div.svelte-soravq {flex:auto;overflow:auto;}pre.svelte-soravq {margin:0;padding:16px;}"};function JH(t,e){se(e,!0),Ee(t,YH);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(yt,"$siteConfig",n),o=w(()=>i()("site_configuration_editor"));Md(t,{class:"content",get"aria-label"(){return l(o)},main:c=>{var u=KH(),d=R(u),f=R(d);q((h,p)=>{ke(u,"aria-label",h),Z(f,p)},[()=>i()("site_config"),()=>cd.stringify(s())]),T(c,u)},$$slots:{main:!0}}),oe(),r()}var ZH=F("<!> <!> <!> <!>",1);function XH(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Qp,"$restoreDialogState",n),s=()=>z(Ln,"$appLocale",n),o=()=>z(Ja,"$showContentOverlay",n),a=()=>z(le,"$_",n),c=()=>z(Jo,"$backupToastState",n),u=w(()=>new Date),d=w(()=>i().resolve),f=w(()=>i().timestamp),h=w(()=>l(u).getUTCFullYear()===l(f)?.getUTCFullYear()),p=w(()=>l(h)&&l(u).getUTCMonth()===l(f)?.getUTCMonth()),g=w(()=>l(p)&&l(u).getUTCDate()===l(f)?.getUTCDate()),m=w(()=>l(f)?.toLocaleString(s()??void 0,{year:l(h)?void 0:"numeric",month:l(g)?void 0:"short",day:l(g)?void 0:"numeric",hour:"numeric",minute:"numeric"}));Ue(()=>{!o()&&i().show&&(Ct(Qp,xe(i).show=!1,xe(i)),l(d)?.())});var v=ZH(),_=M(v);const b=w(()=>a()("restore_backup_title")),y=w(()=>a()("restore")),x=w(()=>a()("discard"));kl(_,{get title(){return l(b)},get okLabel(){return l(y)},get cancelLabel(){return l(x)},onOk:()=>{l(d)?.(!0)},onCancel:()=>{l(d)?.(!1)},get open(){return i().show},set open(E){Ct(Qp,xe(i).show=E,xe(i))},children:(E,A)=>{var O=Be();q(L=>Z(O,L),[()=>a()("restore_backup_description",{values:{datetime:l(m)}})]),T(E,O)},$$slots:{default:!0}});var k=D(_,2);Gn(k,{get show(){return c().saved},set show(E){Ct(Jo,xe(c).saved=E,xe(c))},children:(E,A)=>{Bn(E,{status:"info",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_saved")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Gn(S,{get show(){return c().restored},set show(E){Ct(Jo,xe(c).restored=E,xe(c))},children:(E,A)=>{Bn(E,{status:"success",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_restored")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Gn(C,{get show(){return c().deleted},set show(E){Ct(Jo,xe(c).deleted=E,xe(c))},children:(E,A)=>{Bn(E,{status:"info",children:(O,L)=>{var I=Be();q(N=>Z(I,N),[()=>a()("draft_backup_deleted")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,v),oe(),r()}const QH="deepl",e6="DeepL",t6="https://www.deepl.com/pro-api",n6="https://www.deepl.com/account/summary",r6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,i6=["AR","BG","CS","DA","DE","EL","EN","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","RO","RU","SK","SL","SV","TR","UK","ZH"],QC=["AR","BG","CS","DA","DE","EL","EN","EN-GB","EN-US","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","PT-BR","PT-PT","RO","RU","SK","SL","SV","TR","UK","ZH","ZH-HANS","ZH-HANT"],eA=t=>{const[e]=t.toUpperCase().split("-");if(i6.includes(e))return e},tA=t=>{let e=t.toUpperCase();if(QC.includes(e))return e;if(["ZH-CN","ZH-SG"].includes(e))return"ZH-HANS";if(["ZH-HK","ZH-MO","ZH-TW"].includes(e))return"ZH-HANT";if([e]=e.split("-"),QC.includes(e))return e},nA={serviceId:QH,serviceLabel:e6,developerURL:t6,apiKeyURL:n6,apiKeyPattern:r6,getSourceLanguage:eA,getTargetLanguage:tA,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=eA(e),s=tA(n);if(!i)throw new Error("Source locale is not supported.");if(!s)throw new Error("Target locale is not supported.");const o=new URLSearchParams([...t.map(d=>["text",d]),["source_lang",i],["target_lang",s],["tag_handling","html"],["split_sentences","1"],["auth_key",r]]),c=`https://${r.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${o.toString()}`,{translations:u}=await fetch(c).then(d=>d.json());return u.map(d=>d.text)}},s6={deepl:nA},rg=st(nA),rA=(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]})},iA=(t,e)=>{const n=new RegExp(`^${cn(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,s])=>[i.replace(n,"_"),s]).sort();return[za(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},sA=(t,e,n)=>{const r=ne(nt),{collection:i,collectionFile:s}=r,{defaultLocale:o}=(s??i)._i18n,[a,c]=iA(r.currentValues[t],e),[u,d]=t===o?iA(r.expanderStates._,e):[[],[]];n({valueList:a,expanderStateList:u}),is.set(!1),nt.update(f=>(rA(f.currentValues[t],{...Fa({[e]:a}),...c}),t===o&&rA(f.expanderStates._,{...Fa({[e]:u}),...d}),f)),is.set(!0)},oA=t=>{const e=ne(nt),{collectionName:n,fileName:r,collection:i,collectionFile:s}=e,{defaultLocale:o}=(s??i)._i18n,a=e.currentValues[o],c=tc([...Object.keys(t),...Object.keys(a)]),u={};return c.forEach(d=>{const f=vn({collectionName:n,fileName:r,keyPath:d})?.i18n==="duplicate";u[d]=(f?a[d]:void 0)??t[d]}),u},aA=t=>{nt.update(e=>{const{currentLocales:n,currentValues:r,validities:i}=e,s=!n[t];if(s&&!r[t]){const{collection:o,collectionName:a,collectionFile:c,fileName:u,originalValues:d}=e,{fields:f=[]}=c??o,h=Xp(f,t);return{...e,currentLocales:{...n,[t]:s},originalValues:{...d,[t]:h},currentValues:{...r,[t]:oy({draft:{collectionName:a,fileName:u},locale:t,target:oA(h)})}}}return{...e,currentLocales:{...n,[t]:s},validities:{...i,[t]:{}}}})},lA=async(t,e,{keyPath:n="",translate:r=!1}={})=>{const{collectionName:i,fileName:s,currentValues:o}=ne(nt),a=o[t],c=Object.fromEntries(Object.entries(a).filter(([p,g])=>{const m=o[e][p],v=vn({collectionName:i,fileName:s,valueMap:a,keyPath:p});return!(n&&!p.startsWith(n)||typeof g!="string"||!g||!["markdown","text","string","list"].includes(v?.widget??"string")||v?.widget==="list"&&(v.field??v.fields)||!r&&g===m||!n&&r&&m)})),u=Object.keys(c).length,d=u===1?"one":"many",f=r?"translation":"copy",h=(p,g)=>{ey.set({id:Date.now(),show:!0,status:p,message:g,count:u,sourceLocale:t})};if(!u){h("info",`${f}.none`);return}if(r){const p=ne(rg),g=ne(Tt).apiKeys?.[p.serviceId]||await new Promise(m=>{Od.set({show:!0,multiple:u>1,resolve:m})});if(!g)return;h("info","translation.started");try{const m=await p.translate(Object.values(c),{apiKey:g,sourceLocale:t,targetLocale:e});Object.keys(c).forEach((v,_)=>{o[e][v]=m[_]}),h("success",`translation.complete.${d}`)}catch(m){h("error","translation.error"),console.error(m)}}else Object.entries(c).forEach(([p,g])=>{o[e][p]=g}),h("success",`copy.complete.${d}`);nt.update(p=>({...p,currentValues:o}))},py=(t="",e="")=>{const{collection:n,collectionFile:r,fileName:i,currentValues:s,originalValues:o}=ne(nt),{allLocales:a,defaultLocale:c}=(r??n)._i18n,u=t?[t]:a,d=(f,h,p=!1)=>{Object.entries(h).forEach(([g,m])=>{if(!e||g.startsWith(e)){const v=vn({collectionName:n.name,fileName:i,valueMap:h,keyPath:g});(f===c||[!0,"translate"].includes(v?.i18n??!1))&&(p?delete s[f][g]:s[f][g]=m)}})};u.forEach(f=>{d(f,s[f],!0),d(f,o[f],!1)}),nt.update(f=>({...f,currentValues:s}))};function o6(t,e){let n=P(e,"currentValue",15,!1),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1);fu(t,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(o){n(o)}})}var a6=F("<p> </p>");function l6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",3,!1);var o=V(),a=M(o);{var c=u=>{var d=a6(),f=R(d);q(h=>Z(f,h),[()=>i()(`boolean.${s()}`)]),T(u,d)};U(a,u=>{typeof s()=="boolean"&&u(c)})}T(t,o),oe(),r()}function c6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae("");const f=w(()=>it(e.fieldConfig.default_language,"")),h=w(()=>it(e.fieldConfig.allow_language_selection,!0)),p=w(()=>it(e.fieldConfig.output_code_only,!1)),g=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),m=w(()=>Gr(i()?.currentValues[e.locale])??{}),v=w(()=>`${e.keyPath}.${l(g).code}`),_=w(()=>`${e.keyPath}.${l(g).lang}`),b=()=>{if(l(p))typeof s()!="string"?$(u,""):l(u)!==s()&&$(u,ie(s()));else{const x=l(m)[l(v)],k=l(m)[l(_)]||l(f);typeof x!="string"?$(u,""):l(u)!==x&&$(u,ie(x)),typeof k!="string"?$(d,""):l(d)!==k&&$(d,ie(k))}},y=()=>{l(p)?s()!==l(u)&&s(l(u)):i()&&(s({}),l(m)[l(v)]!==l(u)&&Ct(nt,xe(i).currentValues[e.locale][l(v)]=l(u),xe(i)),l(m)[l(_)]!==l(d)&&Ct(nt,xe(i).currentValues[e.locale][l(_)]=l(d),xe(i)))};Ue(()=>{l(m),xe(()=>{b()})}),Ue(()=>{l(u),l(d),xe(()=>{y()})}),RM(t,{get showLanguageSwitcher(){return l(h)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(u)},set code(x){$(u,ie(x))},get lang(){return l(d)},set lang(x){$(d,ie(x))}}),oe(),r()}var u6=F("<pre> </pre>");function d6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>it(e.fieldConfig.default_language,"")),o=w(()=>it(e.fieldConfig.output_code_only,!1)),a=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=w(()=>Gr(i()?.currentValues[e.locale])??{}),u=w(()=>`${e.keyPath}.${l(a).code}`),d=w(()=>`${e.keyPath}.${l(a).lang}`),f=w(()=>l(o)?e.currentValue:l(c)[l(u)]),h=w(()=>l(o)?l(s):l(c)[l(d)]);var p=V(),g=M(p);{var m=v=>{var _=u6(),b=R(_);q(()=>{Mr(_,yw(l(h)?`language-${l(h)}`:void 0)),Z(b,l(f))}),T(v,_)};U(g,v=>{l(f)&&v(m)})}T(t,p),oe(),r()}var f6=F(" <!>",1),h6=F('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),p6=F('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"> <!> <!></div>');const g6={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function m6(t,e){se(e,!0),Ee(t,g6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15,""),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae(255);const f=w(()=>it(e.fieldConfig.allowInput,!1)),h=w(()=>it(e.fieldConfig.enableAlpha,!1)),p=er("color"),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:E,a:A="ff"}=s().match(m)?.groups??{};if(E&&l(u)!==E&&$(u,ie(E)),E&&l(h)){const O=Number.parseInt(`0x${A}`,16);l(d)!==O&&$(d,ie(O))}},_=()=>{let E=g.test(l(u))?l(u):"";E&&l(h)&&(E+=l(d).toString(16).padStart(2,"0")),s()!==E&&s(E)};Ue(()=>{s(),xe(()=>{v()})}),Ue(()=>{l(u),l(d),xe(()=>{_()})});var b=p6(),y=R(b);ke(y,"id",`${p??""}-picker`);var x=D(y,2);{var k=E=>{var A=h6(),O=R(A);{var L=j=>{yn(j,{id:`${p??""}-input`,get invalid(){return c()},get readonly(){return a()},get required(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(H){$(u,ie(H))}})};U(O,j=>{l(f)&&j(L)})}var I=D(O,2);{var N=j=>{var H=f6(),B=M(H),W=D(B);const G=w(()=>!l(u)),K=w(()=>i()("opacity"));SN(W,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(K)},get value(){return l(d)},set value(ee){$(d,ie(ee))}}),q(ee=>Z(B,`${ee??""} `),[()=>i()("opacity")]),T(j,H)};U(I,j=>{l(h)&&j(N)})}T(E,A)};U(x,E=>{(l(f)||l(h))&&E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!l(u)),L=w(()=>`${p}-picker ${l(f)?`${p}-input`:""}`);Je(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},get"aria-controls"(){return l(L)},onclick:()=>{$(u,""),$(d,255)}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{y.readOnly=a(),ke(y,"aria-invalid",c()),ke(y,"aria-readonly",a()),ke(y,"aria-required",o()),ke(y,"aria-labelledby",`${e.fieldId??""}-label`),ke(y,"aria-errormessage",`${e.fieldId??""}-error`)}),hf(y,()=>l(u),E=>$(u,E)),T(t,b),oe(),r()}var v6=F('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const b6={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function _6(t,e){se(e,!0),Ee(t,b6);const n=w(()=>it(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})?$/,s=w(()=>{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 o=V(),a=M(o);{var c=u=>{var d=v6(),f=R(d),h=R(f),p=D(h,2),g=R(p),m=D(p,2),v=R(m);q(()=>{Kr(h,"background-color",e.currentValue),Z(g,e.currentValue),Z(v,l(s))}),T(u,d)};U(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,o),oe()}function y6(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>it(e.fieldConfig.value,"")),d=w(()=>i()?.collectionName??""),f=w(()=>i()?.fileName),h=w(()=>Gr(i()?.currentValues[e.locale])??{}),p=w(()=>_c(e.locale)),g=()=>{const[_]=e.keyPath.split(".").splice(-2,1);return _?.match(/^\d+$/)?Number(_):void 0},m=()=>{if(!Object.keys(l(h)).includes(e.keyPath))return;const _=l(u)==="{{index}}"?g()??"":l(u).replaceAll(/{{(.+?)}}/g,(b,y)=>{if(y==="index")return String(g()??"");if(!y.startsWith("fields."))return"";const x=Dp({collectionName:l(d),fileName:l(f),valueMap:l(h),keyPath:y.replace(/^fields\./,""),locale:e.locale});return Array.isArray(x)?l(p).format(x):String(x)});s()!==_&&s(_)};Ue(()=>{l(h),xe(()=>{m()})});const v=w(()=>String(s()));yn(t,{get value(){return l(v)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}}),oe(),r()}var w6=F('<p dir="auto"> </p>');function x6(t,e){var n=w6(),r=R(n);q(()=>{ke(n,"lang",e.locale),Z(r,e.currentValue),n.dir=n.dir}),T(t,n)}var k6=F('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),S6=F('<div role="none" class="svelte-13u8gbo"><input> <!> <!> <!></div>');const E6={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function T6(t,e){se(e,!0),Ee(t,E6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae("");const d=w(()=>Ha(e.fieldConfig)),f=w(()=>l(d).dateOnly),h=w(()=>l(d).timeOnly),p=w(()=>l(d).utc),g=()=>{const E=_B(s(),e.fieldConfig);E!==void 0&&E!==l(u)&&$(u,ie(E))},m=()=>{const E=RT(l(u),s(),e.fieldConfig);E!==void 0&&E!==s()&&Number(Pc(E,e.fieldConfig))!==Number(Pc(s(),e.fieldConfig))&&s(E)};Ue(()=>{s(),xe(()=>{g()})}),Ue(()=>{l(u),xe(()=>{m()})});var v=S6(),_=R(v),b=D(_,2);{var y=E=>{var A=k6();T(E,A)};U(b,E=>{l(p)&&E(y)})}var x=D(b,2);{var k=E=>{const A=w(()=>i()(l(f)?"today":"now"));Je(E,{variant:"tertiary",get label(){return l(A)},onclick:()=>{const O=IT(e.fieldConfig);$(u,ie(l(p)?O.replace(/:00\.000Z$/,""):O))}})};U(x,E=>{a()||E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!s());Je(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},onclick:()=>{s("")}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{ke(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),ke(_,"aria-readonly",a()),ke(_,"aria-required",o()),ke(_,"aria-invalid",c()),ke(_,"aria-labelledby",`${e.fieldId??""}-label`),ke(_,"aria-errormessage",`${e.fieldId??""}-error`)}),hf(_,()=>l(u),E=>$(u,E)),T(t,v),oe(),r()}var C6=F("<time><!></time>"),A6=F('<p dir="auto"><!> <!></p>');function P6(t,e){se(e,!0);const n=w(()=>Ha(e.fieldConfig)),r=w(()=>l(n).dateOnly),i=w(()=>l(n).timeOnly),s=w(()=>l(n).utc),o=w(()=>Pc(e.currentValue,e.fieldConfig)),a=w(()=>pp(e.locale)),c=/^\d{4}-[01]\d-[0-3]\d$/,u=/T00:00(?::00)?(?:\.000)?Z$/;var d=V(),f=M(d);{var h=p=>{var g=A6(),m=R(g);{var v=x=>{var k=Be();q(S=>Z(k,S),[()=>l(o).toLocaleTimeString(l(a),iy)]),T(x,k)},_=x=>{var k=C6(),S=R(k);{var C=A=>{var O=Be();q(L=>Z(O,L),[()=>l(o).toLocaleDateString(l(a),{...ry,timeZone:l(s)||l(r)&&e.currentValue?.match(c)||l(r)&&e.currentValue?.match(u)?"UTC":void 0})]),T(A,O)},E=A=>{var O=Be();q(L=>Z(O,L),[()=>l(o).toLocaleString(l(a),{...ry,...iy,timeZone:l(s)?"UTC":void 0,timeZoneName:l(s)?void 0:"short"})]),T(A,O)};U(S,A=>{l(r)?A(C):A(E,!1)})}q(A=>ke(k,"datetime",A),[()=>l(o).toJSON()]),T(x,k)};U(m,x=>{l(i)?x(v):x(_,!1)})}var b=D(m,2);{var y=x=>{var k=Be("UTC");T(x,k)};U(b,x=>{l(s)&&x(y)})}q(()=>{ke(g,"lang",e.locale),g.dir=g.dir}),T(p,g)};U(f,p=>{l(o)&&p(h)})}T(t,d),oe()}x2();var O6=F('<div role="none" class="wrapper svelte-j0kdh9"><!></div>');const $6={hash:"svelte-j0kdh9",code:'.wrapper.svelte-j0kdh9 {display:contents;}.wrapper.svelte-j0kdh9 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-j0kdh9 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-j0kdh9 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-j0kdh9 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-j0kdh9 .listbox .option button[aria-selected="true"] .icon {display:none;}.wrapper.svelte-j0kdh9 .listbox .name {display:-webkit-box;min-height:calc(var(--sui-font-size-default) * 2);-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-j0kdh9 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-j0kdh9 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .name {flex:none;padding:4px 8px 12px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-j0kdh9 .listbox.grid button[aria-selected="true"] .preview {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-j0kdh9:not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-j0kdh9 .listbox.list .option button {gap:16px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .name {flex:auto;}.wrapper.svelte-j0kdh9 .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 cA(t,e){se(e,!0),Ee(t,$6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"viewType",3,"grid"),o=P(e,"gridId",3,void 0),a=P(e,"showTitle",3,!1),c=P(e,"onChange",3,void 0),u=P(e,"children",3,void 0);var d=O6(),f=R(d);const h=w(()=>i()("assets_dialog.available_images"));cu(f,{get id(){return o()},get class(){return s()},get"aria-label"(){return l(h)},onChange:p=>{c()?.(p.detail)},children:(p,g)=>{var m=V(),v=M(m);Re(v,()=>u()??Me),T(p,m)},$$slots:{default:!0}}),q(()=>ht(d,"show-title",a())),T(t,d),oe(),r()}var L6=F('<span role="alert"> </span>'),N6=F('<span role="alert"> </span>'),I6=F('<span role="alert"> </span>'),R6=F('<!> <span role="none" class="name"> </span>',1),D6=F('<div role="none" class="input-outer svelte-t9mjci"><!></div>'),M6=F('<div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div>',1),F6=F('<p role="alert" class="svelte-t9mjci"><!> <!></p> <!> <!>',1),z6=F('<span role="alert"> </span>');const j6={hash:"svelte-t9mjci",code:"p.svelte-t9mjci {margin:0 0 8px;}.input-outer.svelte-t9mjci {width:400px;text-align:center;}"};function uA(t,e){se(e,!0),Ee(t,j6);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n),o=()=>z(Rc,"$selectAssetsView",n);let a=P(e,"kind",3,"image"),c=P(e,"searchTerms",3,""),u=P(e,"gridId",3,void 0),d=P(e,"onSelect",3,void 0);const f=w(()=>it(e.serviceProps.serviceType,"stock_photos")),h=w(()=>it(e.serviceProps.serviceId,"")),p=w(()=>it(e.serviceProps.serviceLabel,"")),g=w(()=>it(e.serviceProps.hotlinking,!1)),m=w(()=>it(e.serviceProps.authType,"api_key")),v=w(()=>it(e.serviceProps.developerURL,"")),_=w(()=>it(e.serviceProps.apiKeyURL,"")),b=w(()=>e.serviceProps.apiKeyPattern),y=w(()=>e.serviceProps.init),x=w(()=>e.serviceProps.signIn),k=w(()=>e.serviceProps.search),S=ie({userName:"",password:""});let C=ae(!0),E=ae(!1),A=ae(""),O=ae(""),L=ae(""),I=ae("initial"),N=ae(null),j=ae(void 0),H=0;const B=async(Y="")=>{$(N,null);try{$(N,ie(await l(k)(Y,{kind:a(),apiKey:l(A),userName:l(O),password:l(L)})))}catch(te){$(j,"search_fetch_failed"),console.error(te)}},W=async Y=>{const{downloadURL:te,fileName:ce,credit:he}=Y;if(l(g)){d()?.({url:te,credit:he});return}try{const re=await fetch(te),{ok:X,status:fe}=re;if(!X)throw new Error(`The response returned with HTTP status ${fe}.`);const be=await re.blob(),ue=new File([be],ce,{type:be.type});d()?.({file:ue,credit:he})}catch(re){$(j,"image_fetch_failed"),console.error(re)}};ln(()=>{(async()=>(typeof l(y)=="function"&&($(C,!1),$(C,ie(await l(y)()))),l(C)&&($(A,ie(i().apiKeys?.[l(h)]??"")),(Y=>($(O,ie(Y[0])),$(L,ie(Y[1]))))((i().logins?.[l(h)]??"").split(" ")),$(E,ie(!!l(A)||!!l(L))),$(N,null),l(E)&&B())))()}),Ue(()=>{c(),window.clearTimeout(H),H=window.setTimeout(()=>{l(E)&&B(c())},1e3)});var G=V(),K=M(G);{var ee=Y=>{var te=V(),ce=M(te);{var he=X=>{$r(X,{children:(fe,be)=>{var ue=L6(),Te=R(ue);q(_e=>Z(Te,_e),[()=>s()(`assets_dialog.error.${l(j)}`)]),T(fe,ue)},$$slots:{default:!0}})},re=X=>{var fe=V(),be=M(fe);{var ue=_e=>{$r(_e,{children:(Ae,Ce)=>{var $e=N6(),Ve=R($e);q(We=>Z(Ve,We),[()=>s()("searching")]),T(Ae,$e)},$$slots:{default:!0}})},Te=_e=>{var Ae=V(),Ce=M(Ae);{var $e=We=>{$r(We,{children:(pt,Ke)=>{var ge=I6(),ye=R(ge);q(we=>Z(ye,we),[()=>s()("no_files_found")]),T(pt,ge)},$$slots:{default:!0}})},Ve=We=>{const pt=w(()=>o()?.type);cA(We,{get gridId(){return u()},get viewType(){return l(pt)},onChange:({value:Ke})=>{const ge=l(N)?.find(({id:ye})=>ye===Ke);ge&&W(ge)},children:(Ke,ge)=>{nl(Ke,{get items(){return l(N)},itemKey:"id",renderItem:(we,Se=Me)=>{const Ie=w(()=>{const{id:ve,previewURL:Pe,description:qe,kind:Xe}=Se();return{id:ve,previewURL:Pe,description:qe,_kind:Xe}});gr(we,{label:"",get value(){return l(Ie).id},children:(ve,Pe)=>{var qe=R6(),Xe=M(qe);Ds(Xe,{get kind(){return l(Ie)._kind},get src(){return l(Ie).previewURL},variant:"tile",crossorigin:"anonymous"});var ct=D(Xe,2),Ye=R(ct);q(()=>Z(Ye,l(Ie).description)),T(ve,qe)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})};U(Ce,We=>{l(N).length?We(Ve,!1):We($e)},!0)}T(_e,Ae)};U(be,_e=>{l(N)?_e(Te,!1):_e(ue)},!0)}T(X,fe)};U(ce,X=>{l(j)?X(he):X(re,!1)})}T(Y,te)},J=Y=>{var te=V(),ce=M(te);{var he=X=>{$r(X,{children:(fe,be)=>{var ue=F6(),Te=M(ue),_e=R(Te);{var Ae=ge=>{var ye=V(),we=M(ye);pr(we,()=>li.sanitize(s()("prefs.media.stock_photos.description",{values:{service:l(p),homeHref:`href="${l(v)}"`,apiKeyHref:`href="${l(_)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(ge,ye)};U(_e,ge=>{l(f)==="stock_photos"&&ge(Ae)})}var Ce=D(_e,2);{var $e=ge=>{var ye=V(),we=M(ye);pr(we,()=>li.sanitize(s()(`cloud_storage.auth.${l(I)}`,{values:{service:l(p)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(ge,ye)};U(Ce,ge=>{l(f)==="cloud_storage"&&ge($e)})}var Ve=D(Te,2);{var We=ge=>{var ye=D6(),we=R(ye);const Se=w(()=>s()("prefs.media.stock_photos.field_label",{values:{service:l(p)}}));yn(we,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Se)},oninput:Ie=>{const ve=Ie.target.value.trim();l(b)?.test(ve)&&($(A,ie(ve)),$(E,!0),Ct(Tt,xe(i).apiKeys??={},xe(i)),Ct(Tt,xe(i).apiKeys[l(h)]=l(A),xe(i)),B())}}),T(ge,ye)};U(Ve,ge=>{l(m)==="api_key"&&ge(We)})}var pt=D(Ve,2);{var Ke=ge=>{var ye=M6(),we=M(ye),Se=R(we);const Ie=w(()=>s()("user_name")),ve=w(()=>l(I)==="requested");yn(Se,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ie)},get disabled(){return l(ve)},get value(){return S.userName},set value(bt){S.userName=bt}});var Pe=D(we,2),qe=R(Pe);const Xe=w(()=>s()("password")),ct=w(()=>l(I)==="requested");aF(qe,{get"aria-label"(){return l(Xe)},get disabled(){return l(ct)},get value(){return S.password},set value(bt){S.password=bt}});var Ye=D(Pe,2),rt=R(Ye);const ft=w(()=>s()("sign_in")),ut=w(()=>!S.userName||!S.password||l(I)==="requested");Je(rt,{variant:"secondary",get label(){return l(ft)},get disabled(){return l(ut)},onclick:async()=>{$(I,"requested"),S.userName=S.userName.trim(),S.password=S.password.trim(),await l(x)?.(S.userName,S.password)?($(I,"success"),$(O,ie(S.userName)),$(L,ie(S.password)),$(E,!0),Ct(Tt,xe(i).logins??={},xe(i)),Ct(Tt,xe(i).logins[l(h)]=[l(O),l(L)].join(" "),xe(i)),B()):$(I,"error")}}),T(ge,ye)};U(pt,ge=>{l(m)==="password"&&ge(Ke)})}T(fe,ue)},$$slots:{default:!0}})},re=X=>{$r(X,{children:(fe,be)=>{var ue=z6(),Te=R(ue);q(_e=>Z(Te,_e),[()=>s()("cloud_storage.invalid")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(C)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(E)?Y(ee):Y(J,!1)})}T(t,G),oe(),r()}const Fc=st(""),Fd=t=>t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),dA=Qn([ri,tn,Fc],([t,e,n],r)=>{const i=n?Fd(n):"",s=c=>Fd(c).includes(i),o=!t.length||!i?[]:t.map(c=>{let u=0;return co(c).forEach(d=>{s(d.label||d.name)&&(u+=10),s(Vo(d,c,{useTemplate:!0,allowMarkdown:!0}))&&(u+=10),u+=Wo(d,c).filter(f=>s(f.label||f.name)).length,Object.values(c.locales).forEach(({content:f})=>{u+=Object.values(f).filter(h=>typeof h=="string"&&!!h&&s(h)).length})}),{entry:c,points:u}}).filter(({points:c})=>c>0).sort((c,u)=>u.points-c.points).map(c=>c.entry),a=!e.length||!i?[]:e.filter(c=>Fd(c.name).includes(i));r({entries:o,assets:a})}),fA=(t,e=Me)=>{var n=V(),r=M(n);pr(r,()=>li.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var U6=F('<strong class="svelte-7q7g7u"><!></strong>'),B6=F("<!>/",1),q6=F('<!> <span role="none" class="name svelte-7q7g7u"></span>',1),H6=F('<div role="none" class="grid-wrapper svelte-7q7g7u"><!></div>'),V6=F('<span role="none"> </span>');const W6={hash:"svelte-7q7g7u",code:'.grid-wrapper.svelte-7q7g7u {overflow-y:auto;height:100%;}.grid-wrapper.svelte-7q7g7u [role="listbox"] {background-color:transparent;}.name.svelte-7q7g7u {color:var(--sui-tertiary-foreground-color);}.name.svelte-7q7g7u strong:where(.svelte-7q7g7u) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}'};function hA(t,e){se(e,!0),Ee(t,W6);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"viewType",3,"grid"),a=P(e,"searchTerms",3,""),c=P(e,"basePath",3,void 0),u=P(e,"gridId",3,void 0),d=P(e,"checkerboard",3,!1),f=P(e,"onSelect",3,void 0);const h=w(()=>a()?s().filter(({name:_})=>Fd(_).includes(a())):s());var p=V(),g=M(p);{var m=_=>{var b=H6(),y=R(b);cA(y,{get gridId(){return u()},get viewType(){return o()},showTitle:!0,onChange:({value:x})=>{f()?.({asset:s().find(({path:k})=>k===x)})},children:(x,k)=>{nl(x,{get items(){return l(h)},itemKey:"path",renderItem:(C,E=Me)=>{const A=w(()=>{const{kind:I,name:N,path:j}=E();return{kind:I,name:N,path:j}}),O=w(()=>c()?Rn(l(A).path.replace(c(),"")):l(A).name),L=w(()=>l(O).split("/"));gr(C,{label:"",get value(){return l(A).path},children:(I,N)=>{var j=q6(),H=M(j);Ds(H,{get kind(){return l(A).kind},get asset(){return E()},variant:"tile",get checkerboard(){return d()}});var B=D(H,2);dt(B,21,()=>l(L),Xn,(W,G,K)=>{var ee=V(),J=M(ee);{var Y=ce=>{var he=U6(),re=R(he);fA(re,()=>l(G)),T(ce,he)},te=ce=>{var he=B6(),re=M(he);fA(re,()=>l(G)),T(ce,he)};U(J,ce=>{K===l(L).length-1?ce(Y):ce(te,!1)})}T(W,ee)}),T(I,j)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(_,b)},v=_=>{$r(_,{children:(b,y)=>{var x=V6(),k=R(x);q(S=>Z(k,S),[()=>i()("no_files_found")]),T(b,x)},$$slots:{default:!0}})};U(g,_=>{l(h).length?_(m):_(v,!1)})}T(t,p),oe(),r()}function gy(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Rc,"$selectAssetsView",n);let s=P(e,"assets",19,()=>[]),o=P(e,"selectedAsset",15,null),a=P(e,"showUploader",3,!1),c=P(e,"searchTerms",3,""),u=P(e,"basePath",3,void 0),d=ae(void 0);Ue(()=>{o()||xe(()=>{l(d)?.reset()})});const f=w(()=>e.kind==="image"?"image/*":void 0);Pt(Rd(t,{get accept(){return l(f)},get showUploadButton(){return a()},showFilePreview:!0,onSelect:({files:h})=>{o(h.length?{file:h[0]}:null)},children:(h,p)=>{var g=V(),m=M(g);{var v=_=>{const b=w(()=>s().sort((x,k)=>x.name.localeCompare(k.name))),y=w(()=>i()?.type);hA(_,{get assets(){return l(b)},get viewType(){return l(y)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,onSelect:({asset:x})=>{o({asset:x})}})};U(m,_=>{a()||_(v)})}T(h,g)},$$slots:{default:!0}}),h=>$(d,ie(h)),()=>l(d)),oe(),r()}const G6=["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"],pA="https://api.pexels.com/v1",K6={serviceType:"stock_photos",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}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=ne(Ln).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:G6.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${pA}/search?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await hn(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${pA}/curated?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=(await o.json()).photos}return i.map(({id:s,url:o,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(s),description:o.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${s}.jpg`,kind:"image",credit:`<a href="${o}">Photo by ${d} on Pexels</a>`}))}},Y6=["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"],J6="https://pixabay.com/api",Z6={serviceType:"stock_photos",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}$/,search:async(t,{apiKey:e})=>{const[n]=ne(Ln).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:Y6.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${J6}/?${r.toString()}`);return i.ok?(await i.json()).hits.map(({id:o,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(o),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()}},X6=["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"],gA="https://api.unsplash.com",mA="utm_source=sveltia-cms&utm_medium=referral",Q6={serviceType:"stock_photos",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,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=ne(Ln).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:X6.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${gA}/search/photos?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===s)break;await hn(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${gA}/photos?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=await o.json()}return i.map(({id:s,description:o,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(s),description:[o,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${s}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${mA}">${f}</a> on <a href="https://unsplash.com/?${mA}">Unsplash</a>`}))}},ig={},zd={pexels:K6,pixabay:Z6,unsplash:Q6};var e9=F("<!> <!>",1),t9=F("<a> </a>"),n9=F("<!> <!> <!>",1),r9=F("<!> <!>",1),i9=F("<!> <!> <!> <!>",1),s9=F('<div role="none"> </div> <!>',1),o9=F('<div role="none" class="wrapper svelte-v3cscd"><!> <div role="none" class="content-pane svelte-v3cscd"><!> <!> <!> <!></div></div>');const a9={hash:"svelte-v3cscd",code:".wrapper.svelte-v3cscd {display:flex;gap:16px;height:60vh;}.wrapper.svelte-v3cscd .listbox {flex:none;background-color:transparent;}.wrapper.svelte-v3cscd .content-pane:where(.svelte-v3cscd) {overflow:auto;flex:auto;}"};function l9(t,e){se(e,!0),Ee(t,a9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(Tt,"$prefs",n),a=()=>z(Ja,"$showContentOverlay",n),c=()=>z(Rc,"$selectAssetsView",n),u=()=>z(tn,"$allAssets",n),d=()=>z(P_,"$globalAssetFolder",n);let f=P(e,"open",15,!1),h=P(e,"canEnterURL",3,!0),p=P(e,"onSelect",3,void 0),g=ae(""),m=ae(null),v=ae(""),_=ae(""),b=ae("uncategorized-assets");const y=w(()=>e.kind==="image"?i()("assets_dialog.title.image"):i()("assets_dialog.title.file")),x=w(()=>Fd(l(_))),k=w(()=>s()?._assetFolder?.internalPath??""),S=w(()=>s()?._assetFolder?.entryRelative??!1),C=w(()=>!!l(k)&&!l(S)),E=w(()=>!!e.entry&&l(S)),A=w(()=>l(b)==="upload"),O=w(()=>e.entry?$n(Object.values(e.entry.locales)[0].path).dirname:void 0),L=w(()=>l(b).endsWith("-assets")),I=w(()=>Object.keys(zd).includes(l(b))&&o()?.apiKeys?.[l(b)]||Object.keys(ig).includes(l(b))&&o()?.logins?.[l(b)]);ln(()=>{$(g,`library-${Wn("short")}`)}),Ue(()=>{$(b,ie(l(E)?"entry-assets":l(C)?"collection-assets":"uncategorized-assets"))}),Ue(()=>{f()&&$(v,"")}),Ue(()=>{a()||f(!1)});const N=w(()=>i()("insert")),j=w(()=>!l(m));Ui(t,{get title(){return l(y)},size:"x-large",get okLabel(){return l(N)},get okDisabled(){return l(j)},onOk:()=>{p()?.({asset:l(m)})},get open(){return f()},set open(W){f(W)},headerExtra:W=>{var G=V(),K=M(G);{var ee=J=>{var Y=e9(),te=M(Y);{var ce=fe=>{const be=w(()=>Rc);hy(fe,{get currentView(){return l(be)},"aria-controls":"select-assets-grid"})};U(te,fe=>{c()&&fe(ce)})}var he=D(te,2);const re=w(()=>!!l(m)?.file),X=w(()=>i()(`assets_dialog.search_for_${e.kind??"file"}`));nm(he,{get disabled(){return l(re)},get"aria-label"(){return l(X)},get value(){return l(_)},set value(fe){$(_,ie(fe))}}),T(J,Y)};U(K,J=>{(l(L)||l(I))&&J(ee)})}T(W,G)},footerExtra:W=>{var G=V(),K=M(G);{var ee=J=>{var Y=V();const te=w(()=>{const{showServiceLink:re,serviceLabel:X,serviceURL:fe}=zd[l(b)]??{};return{showServiceLink:re,serviceLabel:X,serviceURL:fe}});var ce=M(Y);{var he=re=>{var X=t9(),fe=R(X);q(be=>{ke(X,"href",l(te).serviceURL),Z(fe,be)},[()=>i()("prefs.media.stock_photos.credit",{values:{service:l(te).serviceLabel}})]),T(re,X)};U(ce,re=>{l(te).showServiceLink&&re(he)})}T(J,Y)};U(K,J=>{l(I)&&J(ee)})}T(W,G)},children:(W,G)=>{var K=o9(),ee=R(K);const J=w(()=>i()("assets_dialog.locations"));cu(ee,{class:"tabs",get"aria-label"(){return l(J)},get"aria-controls"(){return`${l(g)??""}-content-pane`},onChange:ue=>{$(b,ie(ue.detail.name)),$(m,null)},children:(ue,Te)=>{var _e=i9(),Ae=M(_e);const Ce=w(()=>i()("assets_dialog.location.repository"));Af(Ae,{get label(){return l(Ce)},children:(ye,we)=>{var Se=n9(),Ie=M(Se);{var ve=rt=>{const ft=w(()=>i()("entry_assets")),ut=w(()=>l(b)==="entry-assets");gr(rt,{name:"entry-assets",get label(){return l(ft)},get selected(){return l(ut)}})};U(Ie,rt=>{l(E)&&rt(ve)})}var Pe=D(Ie,2);{var qe=rt=>{const ft=w(()=>i()("collection_assets")),ut=w(()=>l(b)==="collection-assets");gr(rt,{name:"collection-assets",get label(){return l(ft)},get selected(){return l(ut)}})};U(Pe,rt=>{l(C)&&rt(qe)})}var Xe=D(Pe,2);const ct=w(()=>i()("uncategorized")),Ye=w(()=>l(b)==="uncategorized-assets");gr(Xe,{name:"uncategorized-assets",get label(){return l(ct)},get selected(){return l(Ye)}}),T(ye,Se)},$$slots:{default:!0}});var $e=D(Ae,2);const Ve=w(()=>i()("assets_dialog.location.local"));Af($e,{get label(){return l(Ve)},children:(ye,we)=>{const Se=w(()=>i()("upload"));gr(ye,{name:"upload",get label(){return l(Se)},get selected(){return l(A)}})},$$slots:{default:!0}});var We=D($e,2);{var pt=ye=>{const we=w(()=>i()("assets_dialog.location.external_locations"));Af(ye,{get label(){return l(we)},children:(Se,Ie)=>{var ve=r9(),Pe=M(ve);{var qe=ct=>{const Ye=w(()=>i()("assets_dialog.enter_url"));gr(ct,{name:"enter-url",get label(){return l(Ye)}})};U(Pe,ct=>{h()&&ct(qe)})}var Xe=D(Pe,2);dt(Xe,17,()=>Object.values(ig),({serviceId:ct,serviceLabel:Ye})=>ct,(ct,Ye)=>{let rt=()=>l(Ye).serviceId,ft=()=>l(Ye).serviceLabel;gr(ct,{get name(){return rt()},get label(){return ft()}})}),T(Se,ve)},$$slots:{default:!0}})};U(We,ye=>{(h()||Object.keys(ig).length)&&ye(pt)})}var Ke=D(We,2);const ge=w(()=>i()("assets_dialog.location.stock_photos"));Af(Ke,{get label(){return l(ge)},children:(ye,we)=>{var Se=V(),Ie=M(Se);dt(Ie,17,()=>Object.values(zd),({serviceId:ve,serviceLabel:Pe})=>ve,(ve,Pe)=>{let qe=()=>l(Pe).serviceId,Xe=()=>l(Pe).serviceLabel;gr(ve,{get name(){return qe()},get label(){return Xe()}})}),T(ye,Se)},$$slots:{default:!0}}),T(ue,_e)},$$slots:{default:!0}});var Y=D(ee,2),te=R(Y);{var ce=ue=>{const Te=w(()=>u().filter(_e=>(!e.kind||e.kind===_e.kind)&&$n(_e.path).dirname===l(O)));gy(ue,{get kind(){return e.kind},get assets(){return l(Te)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get selectedAsset(){return l(m)},set selectedAsset(_e){$(m,ie(_e))}})},he=ue=>{var Te=V(),_e=M(Te);{var Ae=$e=>{const Ve=w(()=>u().filter(We=>(!e.kind||e.kind===We.kind)&&We.folder===l(k)));gy($e,{get kind(){return e.kind},get assets(){return l(Ve)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(k)},get selectedAsset(){return l(m)},set selectedAsset(We){$(m,ie(We))}})},Ce=$e=>{var Ve=V(),We=M(Ve);{var pt=Ke=>{const ge=w(()=>u().filter(we=>(!e.kind||e.kind===we.kind)&&we.folder===d()?.internalPath)),ye=w(()=>d()?.internalPath);gy(Ke,{get kind(){return e.kind},get assets(){return l(ge)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(ye)},get selectedAsset(){return l(m)},set selectedAsset(we){$(m,ie(we))}})};U(We,Ke=>{(l(b)==="uncategorized-assets"||l(A))&&Ke(pt)},!0)}T($e,Ve)};U(_e,$e=>{l(C)&&(l(b)==="collection-assets"||l(A))?$e(Ae):$e(Ce,!1)},!0)}T(ue,Te)};U(te,ue=>{l(E)&&(l(b)==="entry-assets"||l(A))?ue(ce):ue(he,!1)})}var re=D(te,2);{var X=ue=>{$r(ue,{children:(Te,_e)=>{var Ae=s9(),Ce=M(Ae),$e=R(Ce),Ve=D(Ce,2);yn(Ve,{flex:!0,oninput:()=>{$(m,ie(l(v).trim()?{url:l(v).trim()}:null))},get value(){return l(v)},set value(We){$(v,ie(We))}}),q(We=>Z($e,We),[()=>e.kind==="image"?i()("assets_dialog.enter_image_url"):i()("assets_dialog.enter_file_url")]),T(Te,Ae)},$$slots:{default:!0}})};U(re,ue=>{h()&&l(b)==="enter-url"&&ue(X)})}var fe=D(re,2);dt(fe,17,()=>Object.entries(ig),([ue,Te])=>ue,(ue,Te)=>{let _e=()=>l(Te)[0],Ae=()=>l(Te)[1];var Ce=V(),$e=M(Ce);{var Ve=We=>{uA(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:pt=>{$(m,ie(pt))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)});var be=D(fe,2);dt(be,17,()=>Object.entries(zd),([ue,Te])=>ue,(ue,Te)=>{let _e=()=>l(Te)[0],Ae=()=>l(Te)[1];var Ce=V(),$e=M(Ce);{var Ve=We=>{uA(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:pt=>{$(m,ie(pt))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)}),q(()=>ke(Y,"id",`${l(g)??""}-content-pane`)),T(W,K)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}}),oe(),r()}var c9=F('<span role="none" class="preview no-thumbnail"><!></span>'),u9=F('<div role="textbox" tabindex="0" class="filename svelte-7plsvm"><!></div>'),d9=F('<div role="none" class="filled svelte-7plsvm"><!> <div role="none" class="svelte-7plsvm"><!> <div role="none"><!> <!></div></div></div>'),f9=F('<!> <div role="none"><!></div>',1),h9=F('<div class="empty svelte-7plsvm"><!></div>'),p9=F('<div role="none"> </div> <div role="none"><!></div>',1),g9=F("<!> <!> <!> <!>",1);const m9={hash:"svelte-7plsvm",code:".filled.svelte-7plsvm {display:flex !important;align-items:center;gap:16px;margin:var(--sui-focus-ring-width);}.filled.svelte-7plsvm .preview {flex:none;width:160px !important;height:160px !important;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);}.filled.svelte-7plsvm .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-7plsvm .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) {flex:auto;overflow:hidden;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm):empty {margin:0;padding:0;}.empty.svelte-7plsvm button {flex-direction:column;justify-content:center;height:160px;}.empty.svelte-7plsvm button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-7plsvm button:disabled {pointer-events:none !important;}.empty.svelte-7plsvm button:disabled * {opacity:0.5;}.empty.invalid.svelte-7plsvm button {border-color:var(--sui-error-border-color);}"};function vA(t,e){se(e,!1),Ee(t,m9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de();P(e,"locale",8),P(e,"keyPath",8);let h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8),g=P(e,"currentValue",12),m=P(e,"readonly",8,!1),v=P(e,"required",8,!0),_=P(e,"invalid",8,!1),b=P(e,"inEditorComponent",8,!1),y=de(),x=de(),k,S=de(),C=de(),E,A=de(!1),O=de(!1),L=de(!1),I=de(""),N=de();const j=()=>{g(""),$(y,void 0),$(x,void 0),k=void 0,E=void 0,l(N)?.reset()},H=async X=>{j(),$(y,X.asset),$(x,X.file),k=X.url,E=X.credit,l(y)&&g(qp(l(y),{pathOnly:!0,allowSpecial:!0,entry:l(f)})),l(x)&&(l(u)&&l(c)!==void 0&&Number.isInteger(l(c))&&l(x).size>l(c)?$(O,!0):(g(URL.createObjectURL(l(x))),Ct(nt,xe(i).files[g()]=l(x),xe(i)))),k&&g(k),E&&($(I,li.sanitize(E,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),$(L,!0))},B=async()=>{g()?.startsWith("blob:")&&i()&&$(x,i().files[g()]),g()?g().startsWith("blob:")?($(y,void 0),$(S,g()?await JT(g()):void 0),$(C,g()&&l(S)?await Lc(g(),l(f),{thumbnail:!0}):void 0)):l(u)&&/^https?:/.test(g())?($(y,void 0),$(S,"image"),$(C,g())):($(y,I_(g(),{entry:l(f),collection:l(d)})),$(S,void 0),$(C,void 0)):($(y,void 0),$(x,void 0),$(S,void 0),$(C,void 0))};Fe(()=>(l(o),l(a),l(c),vt(p())),()=>{(X=>($(o,X.widget),$(a,it(X.choose_url,!0)),$(c,it(it(it(X.media_library,()=>({}),!0).config,()=>({}),!0).max_file_size,void 0))))(p())}),Fe(()=>l(o),()=>{$(u,l(o)==="image")}),Fe(()=>i(),()=>{$(d,i()?.collection)}),Fe(()=>i(),()=>{$(f,i()?.originalEntry)}),Fe(()=>vt(g()),()=>{g(),B()}),Rr(),Sr();var W=g9(),G=M(W);const K=Ge(()=>l(u)?"image/*":void 0);Pt(Rd(G,{get disabled(){return m()},get accept(){return l(K)},onSelect:({files:X})=>{X.length&&H({file:X[0]})},children:(X,fe)=>{var be=V(),ue=M(be);{var Te=Ae=>{var Ce=d9(),$e=R(Ce);{var Ve=qe=>{Ds(qe,{get kind(){return l(S)},get src(){return l(C)},variant:"tile",checkerboard:!0})},We=qe=>{var Xe=V(),ct=M(Xe);{var Ye=ft=>{Ds(ft,{get kind(){return l(y).kind},get asset(){return l(y)},variant:"tile",checkerboard:!0})},rt=ft=>{var ut=c9(),bt=R(ut);et(bt,{name:"draft"}),T(ft,ut)};U(ct,ft=>{l(y)?ft(Ye):ft(rt,!1)},!0)}T(qe,Xe)};U($e,qe=>{l(S)&&l(C)?qe(Ve):qe(We,!1)})}var pt=D($e,2),Ke=R(pt);{var ge=qe=>{var Xe=u9(),ct=R(Xe);{var Ye=ft=>{var ut=Be();q(bt=>Z(ut,bt),[()=>decodeURI(l(x).name.normalize())],Ge),T(ft,ut)},rt=ft=>{var ut=V(),bt=M(ut);{var At=an=>{var jn=Be();q(sr=>Z(jn,sr),[()=>decodeURI(g())],Ge),T(an,jn)};U(bt,an=>{g().startsWith("blob:")||an(At)},!0)}T(ft,ut)};U(ct,ft=>{l(x)?ft(Ye):ft(rt,!1)})}q(()=>{ke(Xe,"id",`${h()??""}-value`),ke(Xe,"aria-readonly",m()),ke(Xe,"aria-invalid",_()),ke(Xe,"aria-required",v()),ke(Xe,"aria-labelledby",`${h()??""}-label`),ke(Xe,"aria-errormessage",`${h()??""}-error`)}),T(qe,Xe)};U(Ke,qe=>{typeof g()=="string"&&qe(ge)})}var ye=D(Ke,2),we=R(ye);const Se=Ge(()=>s()("replace")),Ie=Ge(()=>s()(`replace_${l(o)}`));Je(we,{get disabled(){return m()},variant:"tertiary",get label(){return l(Se)},get"aria-label"(){return l(Ie)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{$(A,!0)}});var ve=D(we,2);{var Pe=qe=>{const Xe=Ge(()=>s()("remove")),ct=Ge(()=>s()(`remove_${l(o)}`));Je(qe,{get disabled(){return m()},variant:"tertiary",get label(){return l(Xe)},get"aria-label"(){return l(ct)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{j()}})};U(ve,qe=>{b()||qe(Pe)})}T(Ae,Ce)},_e=Ae=>{var Ce=h9(),$e=R(Ce);Je($e,{flex:!0,role:"button",variant:"tertiary",get disabled(){return m()},tabindex:"0",onclick:()=>{m()||$(A,!0)},children:(Ve,We)=>{var pt=f9(),Ke=M(pt);et(Ke,{name:"cloud_upload"});var ge=D(Ke,2),ye=R(ge);{var we=Ie=>{var ve=Be();q(Pe=>Z(ve,Pe),[()=>s()(Mp()?"drop_or_browse_image_file":"browse_file")],Ge),T(Ie,ve)},Se=Ie=>{var ve=Be();q(Pe=>Z(ve,Pe),[()=>s()(Mp()?"drop_or_browse_file":"browse_file")],Ge),T(Ie,ve)};U(ye,Ie=>{l(u)?Ie(we):Ie(Se,!1)})}T(Ve,pt)},$$slots:{default:!0}}),q(()=>ht(Ce,"invalid",_())),T(Ae,Ce)};U(ue,Ae=>{g()?Ae(Te):Ae(_e,!1)})}T(X,be)},$$slots:{default:!0},$$legacy:!0}),X=>$(N,X),()=>l(N));var ee=D(G,2);const J=Ge(()=>l(u)?"image":void 0);l9(ee,{get kind(){return l(J)},get canEnterURL(){return l(a)},get entry(){return l(f)},onSelect:({asset:X})=>{H(X)},get open(){return l(A)},set open(X){$(A,X)},$$legacy:!0});var Y=D(ee,2);const te=Ge(()=>s()("assets_dialog.large_file.title"));kx(Y,{get title(){return l(te)},get open(){return l(O)},set open(X){$(O,X)},children:(X,fe)=>{var be=Be();q(ue=>Z(be,ue),[()=>s()("assets_dialog.large_file.description",{values:{size:k_(l(c))}})],Ge),T(X,be)},$$slots:{default:!0},$$legacy:!0});var ce=D(Y,2);const he=Ge(()=>s()("assets_dialog.photo_credit.title")),re=Ge(()=>s()("copy"));kl(ce,{get title(){return l(he)},get okLabel(){return l(re)},onOk:()=>{navigator.clipboard.writeText(l(I))},get open(){return l(L)},set open(X){$(L,X)},children:(X,fe)=>{var be=p9(),ue=M(be),Te=R(ue),_e=D(ue,2),Ae=R(_e);$h(Ae,{flex:!0,readonly:!0,get value(){return l(I)},onclick:Ce=>{Ce.target.focus(),Ce.target.select()}}),q(Ce=>Z(Te,Ce),[()=>s()("assets_dialog.photo_credit.description")],Ge),T(X,be)},$$slots:{default:!0},$$legacy:!0}),T(t,W),oe(),r()}var v9=F("<p><!></p>"),b9=F("<p> </p>");function bA(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);P(e,"locale",8),P(e,"keyPath",8),P(e,"fieldConfig",8);let s=P(e,"currentValue",8),o=de(),a=de();const c=async()=>{$(o,s()?await JT(s()):void 0),$(a,s()&&l(o)?await Lc(s(),i()?.originalEntry):void 0)};Fe(()=>vt(s()),()=>{s(),c()}),Rr(),Sr();var u=V(),d=M(u);{var f=p=>{var g=v9(),m=R(g);const v=Ge(()=>["audio","video"].includes(l(o)));Ds(m,{get kind(){return l(o)},get src(){return l(a)},get controls(){return l(v)}}),T(p,g)},h=p=>{var g=V(),m=M(g);{var v=_=>{var b=b9(),y=R(b);q(()=>Z(y,s())),T(_,b)};U(m,_=>{typeof s()=="string"&&s().trim()&&!s().startsWith("blob:")&&_(v)},!0)}T(p,g)};U(d,p=>{l(o)&&l(a)?p(f):p(h,!1)})}T(t,u),oe(),r()}var _9=F('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const y9={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function _A(t,e){Ee(t,y9);var n=_9(),r=R(n),i=R(r);et(i,{name:"error"});var s=D(i,2);Re(s,()=>e.children),q(()=>ke(n,"id",e.id)),T(t,n)}var w9=F('<th scope="col" class="action svelte-5r6rgh"></th>'),x9=F('<td class="action svelte-5r6rgh"><!></td>'),k9=F('<tr><td class="key svelte-5r6rgh"><!></td><td class="value svelte-5r6rgh"><!></td><!></tr>'),S9=F('<table class="svelte-5r6rgh"><thead><tr><th scope="col" class="key svelte-5r6rgh"> </th><th scope="col" class="value svelte-5r6rgh"> </th><!></tr></thead><tbody></tbody></table>'),E9=F("<!> <!>",1),T9=F("<!> <!> <div><!></div>",1);const C9={hash:"svelte-5r6rgh",code:`table.svelte-5r6rgh {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-5r6rgh,
587
+ td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {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:left;}th.key.svelte-5r6rgh, th.value.svelte-5r6rgh {width:50%;}td.svelte-5r6rgh {padding:0;vertical-align:middle;}`};function A9(t,e){se(e,!1),Ee(t,C9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(nt,"$entryDraft",n),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8),f=P(e,"keyPath",8),h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8);P(e,"currentValue",8);let g=P(e,"readonly",8,!1);P(e,"required",8,!0),P(e,"invalid",8,!1);let m=de([]);const v=de([]);let _=de([]),b=de([]);const y=()=>{if(!s())return;const W=sy({entryDraft:nt,keyPath:f(),locale:d()});Mn(l(m),W)||($(m,W),$(_,W.map(()=>!1))),!l(m).length&&s().currentValues[d()][f()]!==null&&Ct(nt,xe(s).currentValues[d()][f()]=null,xe(s))},x=()=>{s()&&(Object.entries(s().currentValues).forEach(([B,W])=>{(B===d()||l(o)==="duplicate")&&delete W[f()]}),$(m,[...l(m),["",""]]),$(_,[...l(_),!1]),window.requestAnimationFrame(()=>{l(v)[l(m).length-1].querySelector("input").focus()}))},k=B=>{l(m).splice(B,1),$(m,[...l(m)]),l(_).splice(B,1),$(_,[...l(_)])},S=()=>{if($(b,e8({pairs:l(m),edited:l(_)})),!s()||l(b).some(Boolean)||l(m).some(([W])=>!W.trim()))return;t8({entryDraft:nt,fieldConfig:p(),keyPath:f(),locale:d(),pairs:l(m)})};Fe(()=>(l(o),l(a),i(),l(c),l(u),vt(p())),()=>{(B=>($(o,it(B.i18n,!1)),$(a,it(B.key_label,()=>i()("key_value.key"),!0)),$(c,it(B.value_label,()=>i()("key_value.value"),!0)),$(u,it(B.max,1/0))))(p())}),Fe(()=>(s(),vt(d())),()=>{s()?.currentValues[d()],y()}),Fe(()=>l(m),()=>{l(m),S()}),Rr(),Sr();var C=T9(),E=M(C);{var A=B=>{var W=S9(),G=R(W),K=R(G),ee=R(K),J=R(ee),Y=D(ee),te=R(Y),ce=D(Y);{var he=X=>{var fe=w9();q(be=>ke(fe,"aria-label",be),[()=>i()("key_value.action")],Ge),T(X,fe)};U(ce,X=>{g()||X(he)})}var re=D(G);dt(re,5,()=>l(m),Xn,(X,fe,be)=>{var ue=k9(),Te=R(ue),_e=R(Te);const Ae=Ge(()=>!!l(b)[be]),Ce=Ge(()=>l(b)[be]?`${h()}-kv-error`:void 0);yn(_e,{get readonly(){return g()},flex:!0,get invalid(){return l(Ae)},get"aria-label"(){return l(a)},get"aria-errormessage"(){return l(Ce)},oninput:()=>{Uy(_,l(_)[be]=!0)},onkeydown:Ke=>{Ke.key==="Enter"&&!Ke.isComposing&&l(v)[be].querySelector("td.value input").focus()},get value(){return l(fe)[0]},set value(Ke){l(fe)[0]=Ke,fw(()=>l(m))},$$legacy:!0});var $e=D(Te),Ve=R($e);yn(Ve,{get readonly(){return g()},flex:!0,get"aria-label"(){return l(c)},onkeydown:Ke=>{Ke.key==="Enter"&&!Ke.isComposing&&(be<l(m).length-1?l(v)[be+1].querySelector("input").focus():l(m).length<l(u)&&x())},get value(){return l(fe)[1]},set value(Ke){l(fe)[1]=Ke,fw(()=>l(m))},$$legacy:!0});var We=D($e);{var pt=Ke=>{var ge=x9(),ye=R(ge);const we=Ge(()=>i()("remove"));Je(ye,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(we)},onclick:()=>{k(be)},startIcon:Ie=>{et(Ie,{name:"close"})},$$slots:{startIcon:!0}}),T(Ke,ge)};U(We,Ke=>{g()||Ke(pt)})}Pt(ue,(Ke,ge)=>Uy(v,l(v)[ge]=Ke),Ke=>l(v)?.[Ke],()=>[be]),T(X,ue)}),q(()=>{Z(J,l(a)),Z(te,l(c))}),T(B,W)};U(E,B=>{l(m).length&&B(A)})}var O=D(E,2);{var L=B=>{_A(B,{get id(){return`${h()??""}-kv-error`},children:(W,G)=>{var K=E9(),ee=M(K);{var J=ce=>{var he=Be();q(re=>Z(he,re),[()=>i()("key_value.empty_key")],Ge),T(ce,he)};U(ee,ce=>{l(b).includes("empty")&&ce(J)})}var Y=D(ee,2);{var te=ce=>{var he=Be();q(re=>Z(he,re),[()=>i()("key_value.duplicate_key")],Ge),T(ce,he)};U(Y,ce=>{l(b).includes("duplicate")&&ce(te)})}T(W,K)}})};U(O,B=>{l(b).some(Boolean)&&B(L)})}var I=D(O,2),N=R(I);const j=Ge(()=>i()("add")),H=Ge(()=>g()||l(m).length>=l(u));Je(N,{get label(){return l(j)},variant:"tertiary",get disabled(){return l(H)},onclick:()=>{x()}}),T(t,C),oe(),r()}var P9=F('<tr><td class="svelte-1ni5ht9"> </td><td class="svelte-1ni5ht9"> </td></tr>'),O9=F('<table class="svelte-1ni5ht9"><thead><tr><th scope="col" class="svelte-1ni5ht9"> </th><th scope="col" class="svelte-1ni5ht9"> </th></tr></thead><tbody></tbody></table>');const $9={hash:"svelte-1ni5ht9",code:'@charset "UTF-8";table.svelte-1ni5ht9 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-1ni5ht9 {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:left;}td.svelte-1ni5ht9:empty::after {content:" ";}'};function L9(t,e){se(e,!1),Ee(t,$9);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(nt,"$entryDraft",n),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldConfig",8);P(e,"currentValue",8);let f=de([]);const h=()=>{const _=sy({entryDraft:nt,keyPath:u(),locale:c()});Mn(l(f),_)||$(f,_)};Fe(()=>(l(o),i(),l(a),vt(d())),()=>{(v=>($(o,it(v.key_label,()=>i()("key_value.key"),!0)),$(a,it(v.value_label,()=>i()("key_value.value"),!0))))(d())}),Fe(()=>(s(),vt(c())),()=>{s()&&(s().currentValues[c()],h())}),Rr(),Sr();var p=V(),g=M(p);{var m=v=>{var _=O9(),b=R(_),y=R(b),x=R(y),k=R(x),S=D(x),C=R(S),E=D(b);dt(E,5,()=>l(f),Xn,(A,O)=>{let L=()=>l(O)[0],I=()=>l(O)[1];var N=P9(),j=R(N),H=R(j),B=D(j),W=R(B);q(()=>{Z(H,L()),Z(W,I())}),T(A,N)}),q(()=>{Z(k,l(o)),Z(C,l(a))}),T(v,_)};U(g,v=>{l(f).length&&v(m)})}T(t,p),oe(),r()}function my(t,e){se(e,!1);const[n,r]=me(),i=()=>z(le,"$_",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"disabled",8,!1),m=P(e,"fieldConfig",8),v=P(e,"items",24,()=>[]),_=P(e,"addItem",8,S=>{});Fe(()=>(l(s),l(o),l(a),l(c),vt(m())),()=>{(S=>($(s,S.widget),$(o,S.name),$(a,S.label),$(c,S.types)))(m())}),Fe(()=>(l(s),vt(m())),()=>{$(u,l(s)==="list"?m():void 0)}),Fe(()=>l(u),()=>{$(d,l(u)?.label_singular??"")}),Fe(()=>l(u),()=>{$(f,l(u)?.max??void 0)}),Fe(()=>(i(),l(d),l(a),l(o)),()=>{$(h,i()("add_x",{values:{name:l(d)||l(a)||l(o)}}))}),Fe(()=>(vt(g()),l(f),vt(v())),()=>{$(p,g()||typeof l(f)=="number"&&v().length===l(f))}),Rr(),Sr();var b=V(),y=M(b);{var x=S=>{Er(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},endIcon:A=>{et(A,{name:"add"})},popup:A=>{const O=Ge(()=>i()("select_list_type"));mr(A,{get"aria-label"(){return l(O)},children:(L,I)=>{var N=V(),j=M(N);dt(j,1,()=>l(c),({name:H,label:B})=>H,(H,B)=>{let W=()=>l(B).name,G=()=>l(B).label;const K=Ge(()=>G()||W());Lt(H,{get label(){return l(K)},onclick:()=>_()(W())})}),T(L,N)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})},k=S=>{Je(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},onclick:()=>_()(),startIcon:E=>{et(E,{name:"add"})},$$slots:{startIcon:!0}})};U(y,S=>{Array.isArray(l(c))?S(x):S(k,!1)})}T(t,b),oe(),r()}var N9=F('<span role="none" class="type svelte-drw5o5"> </span>'),I9=F('<div role="none" class="header svelte-drw5o5"><div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div></div>');const R9={hash:"svelte-drw5o5",code:".header.svelte-drw5o5 {display:flex;align-items:center;gap:8px;background-color:var(--sui-secondary-border-color);}.header.svelte-drw5o5 > div:where(.svelte-drw5o5) {display:flex;align-items:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):first-child {justify-content:flex-start;width:40%;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):nth-child(2) {width:20%;justify-content:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):last-child {width:40%;justify-content:flex-end;}.header.svelte-drw5o5 button {padding:0;height:16px;}.header.svelte-drw5o5 .type:where(.svelte-drw5o5) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function yA(t,e){se(e,!1),Ee(t,R9);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"label",8,""),o=P(e,"controlId",8),a=P(e,"expanded",8),c=P(e,"toggleExpanded",8),u=P(e,"removeButtonVisible",8,!1),d=P(e,"removeButtonDisabled",8,!1),f=P(e,"remove",8),h=P(e,"children",8,void 0);Sr();var p=I9(),g=R(p),m=R(g);const v=Ge(()=>!c()),_=Ge(()=>a()?i()("collapse"):i()("expand"));Je(m,{size:"small",get disabled(){return l(v)},get"aria-label"(){return l(_)},get"aria-expanded"(){return a()},get"aria-controls"(){return o()},onclick:()=>{c()?.()},startIcon:E=>{const A=Ge(()=>a()?"expand_more":"chevron_right");et(E,{get name(){return l(A)}})},children:(E,A)=>{var O=V(),L=M(O);{var I=N=>{var j=N9(),H=R(j);q(()=>Z(H,s())),T(N,j)};U(L,N=>{s()&&N(I)})}T(E,O)},$$slots:{startIcon:!0,default:!0}});var b=D(g,2),y=R(b);Re(y,()=>h()??Me);var x=D(b,2),k=R(x);{var S=C=>{const E=Ge(()=>i()("remove_this_item"));Je(C,{size:"small",iconic:!0,get disabled(){return d()},get"aria-label"(){return l(E)},onclick:()=>{f()()},startIcon:O=>{et(O,{name:"close"})},$$slots:{startIcon:!0}})};U(k,C=>{u()&&C(S)})}T(t,p),oe(),r()}var D9=F("<!> <!>",1),M9=F('<div role="none" class="toolbar top svelte-iirqfr"><!></div>'),F9=F("<!> <!> <!>",1),z9=F('<div role="none" class="summary svelte-iirqfr"> </div>'),j9=F('<div role="none" class="item svelte-iirqfr"><!> <div role="none" class="item-body"><!></div></div>'),U9=F('<div role="none" class="toolbar bottom svelte-iirqfr"><!> <!></div>'),B9=F('<div role="none" class="toolbar top svelte-iirqfr"><!> <div role="none" class="summary svelte-iirqfr"> </div> <!> <!></div> <!> <div role="none" class="item-list svelte-iirqfr"></div> <!>',1);const q9={hash:"svelte-iirqfr",code:".toolbar.svelte-iirqfr {display:flex;align-items:center;}.summary.svelte-iirqfr {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.item-list.collapsed.svelte-iirqfr {display:none;}.item.svelte-iirqfr {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-iirqfr .summary:where(.svelte-iirqfr) {padding:8px;}.item.svelte-iirqfr .summary:where(.svelte-iirqfr):empty {display:none;}"};function H9(t,e){se(e,!1),Ee(t,q9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de(),H=de(),B=de(),W=de(),G=de(),K=de(),ee=de();let J=P(e,"locale",8),Y=P(e,"keyPath",8),te=P(e,"fieldId",8);P(e,"fieldLabel",8);let ce=P(e,"fieldConfig",8),he=P(e,"currentValue",8),re=P(e,"readonly",8,!1),X=P(e,"required",8,!0),fe=P(e,"invalid",8,!1),be=de(!1),ue=de(""),Te=de("");ln(()=>{$(be,!0),$(ue,Wn("short")),ho({[l(W)]:!l(h),...Object.fromEntries(l(K).map((ge,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!l(d)]}))})});const _e=()=>{const ge=he().join(", ");!/,\s*$/.test(l(Te))&&l(Te).trim()!==ge&&$(Te,ge)},Ae=()=>{const ge=l(Te).split(/,/g).map(ye=>ye.trim()).filter(ye=>ye!=="");Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||(Object.keys(i()?.currentValues[ye]??{}).forEach(we=>{we.match(`^${cn(Y())}\\.\\d+$`)&&delete i()?.currentValues[ye][we]}),ge.forEach((we,Se)=>{Ct(nt,xe(i).currentValues[ye][`${Y()}.${Se}`]=we,xe(i))}))})},Ce=ge=>{Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||sA(ye,Y(),ge)})},$e=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{const Se=ge?l(_)?.find(({name:Pe})=>Pe===ge)?.fields??[]:l(m)??(l(g)?[l(g)]:[]),Ie=l(v)?0:ye.length,ve=za(Xp(Se,J()));ge&&(ve[l(b)]=ge),ye.splice(Ie,0,l(y)&&l(g)?ve[l(g).name]:ve),we.splice(Ie,0,!0)})},Ve=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{ye.splice(ge,1),we.splice(ge,1)})},We=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[ge],ye[ge-1]]=[ye[ge-1],ye[ge]],[we[ge],we[ge-1]]=[we[ge-1],we[ge]]})},pt=ge=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[ge],ye[ge+1]]=[ye[ge+1],ye[ge]],[we[ge],we[ge+1]]=[we[ge+1],we[ge]]})},Ke=(ge,ye)=>ZB({collectionName:l(A),fileName:l(L),keyPath:Y(),valueMap:l(B),locale:J(),summaryTemplate:ye,hasSingleSubField:l(y),index:ge});Fe(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),l(p),l(g),l(m),l(v),l(_),l(b),vt(ce())),()=>{(ge=>($(o,ge.name),$(a,ge.label),$(c,ge.i18n),$(u,it(ge.allow_add,!0)),$(d,it(ge.collapsed,!1)),$(f,ge.summary),$(h,it(ge.minimize_collapsed,!1)),$(p,ge.label_singular),$(g,ge.field),$(m,ge.fields),$(v,it(ge.add_to_top,!1)),$(_,ge.types),$(b,it(ge.typeKey,"type"))))(ce())}),Fe(()=>l(g),()=>{$(y,!!l(g))}),Fe(()=>l(m),()=>{$(x,Array.isArray(l(m)))}),Fe(()=>l(_),()=>{$(k,Array.isArray(l(_)))}),Fe(()=>(l(y),l(x),l(k)),()=>{$(S,l(y)||l(x)||l(k))}),Fe(()=>vt(Y()),()=>{$(C,new RegExp(`^${cn(Y())}\\.(\\d+)(.*)?`))}),Fe(()=>i(),()=>{$(E,i()?.collection)}),Fe(()=>i(),()=>{$(A,i()?.collectionName??"")}),Fe(()=>i(),()=>{$(O,i()?.collectionFile)}),Fe(()=>i(),()=>{$(L,i()?.fileName)}),Fe(()=>i(),()=>{$(I,i()?.currentValues??{})}),Fe(()=>i(),()=>{$(N,i()?.expanderStates)}),Fe(()=>(l(j),l(O),l(E),$i),()=>{(ge=>$(j,ge.defaultLocale))((l(O)??l(E))?._i18n??$i)}),Fe(()=>(vt(J()),l(j),l(c)),()=>{$(H,J()!==l(j)&&l(c)==="duplicate")}),Fe(()=>(l(I),vt(J())),()=>{$(B,l(I)[J()])}),Fe(()=>vt(Y()),()=>{$(W,`${Y()}#`)}),Fe(()=>(l(N),l(W)),()=>{$(G,l(N)?._[l(W)]??!0)}),Fe(()=>(l(B),l(C),vt(Y()),l(o)),()=>{$(K,za(Object.fromEntries(Object.entries(l(B)).filter(([ge])=>l(C).test(ge)).map(([ge,ye])=>[ge.replace(new RegExp(`^${cn(Y())}`),l(o)),ye])))[l(o)]??[])}),Fe(()=>(l(K),vt(Y()),l(N)),()=>{$(ee,l(K).map((ge,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!0]}))}),Fe(()=>(l(be),l(S),vt(he())),()=>{l(be)&&!l(S)&&(he(),_e())}),Rr(),Sr(),_r(t,{get"aria-labelledby"(){return`list-${l(ue)??""}-summary`},children:(ge,ye)=>{var we=V(),Se=M(we);{var Ie=Pe=>{var qe=B9(),Xe=M(qe),ct=R(Xe);const Ye=Ge(()=>!l(K).length),rt=Ge(()=>l(G)?s()("collapse"):s()("expand"));Je(ct,{iconic:!0,get disabled(){return l(Ye)},get"aria-label"(){return l(rt)},get"aria-expanded"(){return l(G)},get"aria-controls"(){return`list-${l(ue)??""}-item-list`},onclick:()=>{ho({[l(W)]:!l(G)})},startIcon:An=>{const Kt=Ge(()=>l(G)?"expand_more":"chevron_right");et(An,{get name(){return l(Kt)}})},$$slots:{startIcon:!0}});var ft=D(ct,2),ut=R(ft),bt=D(ft,2);Yr(bt,{flex:!0});var At=D(bt,2);{var an=It=>{var An=D9(),Kt=M(An);const wt=Ge(()=>s()("expand_all")),nn=Ge(()=>l(ee).every(([,Zt])=>Zt));Je(Kt,{variant:"tertiary",size:"small",get label(){return l(wt)},get disabled(){return l(nn)},onclick:()=>{ho(Object.fromEntries(l(ee).map(([Zt])=>[Zt,!0])))}});var In=D(Kt,2);const Pn=Ge(()=>s()("collapse_all")),qt=Ge(()=>l(ee).every(([,Zt])=>!Zt));Je(In,{variant:"tertiary",size:"small",get label(){return l(Pn)},get disabled(){return l(qt)},onclick:()=>{ho(Object.fromEntries(l(ee).map(([Zt])=>[Zt,!1])))}}),T(It,An)};U(At,It=>{l(G)&&l(K).length>1&&It(an)})}var jn=D(Xe,2);{var sr=It=>{var An=M9(),Kt=R(An);my(Kt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e}),T(It,An)};U(jn,It=>{l(u)&&(l(v)||!l(K).length)&&It(sr)})}var Lr=D(jn,2);dt(Lr,5,()=>l(K),Xn,(It,An,Kt)=>{var wt=j9();const nn=Ge(()=>`${Y()}.${Kt}`),In=Ge(()=>l(N)?._[l(nn)]??!0),Pn=Ge(()=>l(k)?l(_)?.find(({name:Hn})=>Hn===l(An)[l(b)]):void 0),qt=Ge(()=>l(k)?l(Pn)?.fields??[]:l(m)??(l(g)?[l(g)]:[])),Zt=Ge(()=>l(k)&&l(Pn)?.summary||l(f));var bn=R(wt);const Un=Ge(()=>l(k)?l(Pn)?.label||l(Pn)?.name:""),or=Ge(()=>l(qt).length?()=>ho({[l(nn)]:!l(In)}):void 0);yA(bn,{get label(){return l(Un)},get controlId(){return`list-${l(ue)??""}-item-${Kt??""}-body`},get expanded(){return l(In)},get toggleExpanded(){return l(or)},removeButtonVisible:!0,get removeButtonDisabled(){return l(H)},remove:()=>{Ve(Kt)},children:(Hn,Bt)=>{var gi=F9(),Wt=M(gi);const rn=Ge(()=>l(H)||Kt===0),Qe=Ge(()=>s()("move_up"));Je(Wt,{size:"small",iconic:!0,get disabled(){return l(rn)},get"aria-label"(){return l(Qe)},onclick:()=>{We(Kt)},startIcon:Vn=>{et(Vn,{name:"arrow_upward"})},$$slots:{startIcon:!0}});var St=D(Wt,2);Yr(St,{});var On=D(St,2);const lr=Ge(()=>l(H)||Kt===l(K).length-1),po=Ge(()=>s()("move_down"));Je(On,{iconic:!0,size:"small",get disabled(){return l(lr)},get"aria-label"(){return l(po)},onclick:()=>{pt(Kt)},startIcon:Vn=>{et(Vn,{name:"arrow_downward"})},$$slots:{startIcon:!0}}),T(Hn,gi)},$$slots:{default:!0}});var ar=D(bn,2),pi=R(ar);{var Ms=Hn=>{var Bt=V(),gi=M(Bt);dt(gi,1,()=>l(qt),Wt=>Wt.name,(Wt,rn)=>{var Qe=V(),St=M(Qe);hr(St,()=>hn(0),null,On=>{const lr=Ge(()=>l(y)?`${Y()}.${Kt}`:`${Y()}.${Kt}.${l(rn).name}`);_y(On,{get keyPath(){return l(lr)},get locale(){return J()},get fieldConfig(){return l(rn)}})}),T(Wt,Qe)}),T(Hn,Bt)},yr=Hn=>{var Bt=z9(),gi=R(Bt);q(Wt=>Z(gi,Wt),[()=>Ke(Kt,l(Zt))],Ge),T(Hn,Bt)};U(pi,Hn=>{l(In)?Hn(Ms):Hn(yr,!1)})}q(()=>ke(ar,"id",`list-${l(ue)??""}-item-${Kt??""}-body`)),T(It,wt)});var os=D(Lr,2);{var Mi=It=>{var An=U9(),Kt=R(An);my(Kt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e});var wt=D(Kt,2);Yr(wt,{flex:!0}),T(It,An)};U(os,It=>{l(u)&&!l(v)&&l(K).length&&It(Mi)})}q(()=>{ke(ft,"id",`object-${l(ue)??""}-summary`),Z(ut,`${l(K).length??""}
588
+ ${((l(K).length===1?l(p):void 0)||l(a)||l(o))??""}`),ke(Lr,"id",`list-${l(ue)??""}-item-list`),ht(Lr,"collapsed",!l(G))}),T(Pe,qe)},ve=Pe=>{yn(Pe,{flex:!0,get readonly(){return re()},get required(){return X()},get invalid(){return fe()},get"aria-errormessage"(){return`${te()??""}-error`},oninput:()=>{Ae()},get value(){return l(Te)},set value(qe){$(Te,qe)},$$legacy:!0})};U(Se,Pe=>{l(S)?Pe(Ie):Pe(ve,!1)})}T(ge,we)},$$slots:{default:!0}}),oe(),r()}var V9=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},W9=(t,e)=>{t.stopPropagation(),e()},G9=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const K9={hash:"svelte-11ls1m1",code:"section.svelte-11ls1m1 {overflow:hidden;margin:8px 0;padding:8px 0;}section.svelte-11ls1m1 > * {margin-right:auto;margin-left:auto;max-width:768px;}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1):not(:last-child) {margin-bottom:8px;}section.svelte-11ls1m1 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}section.svelte-11ls1m1 img {max-height:800px !important;}"};function vy(t,e){se(e,!0),Ee(t,K9);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>it(e.fieldConfig.label,"")),a=w(()=>it(e.fieldConfig.widget,"string")),c=w(()=>it(e.fieldConfig.preview,!0)),u=w(()=>it(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),f=w(()=>l(d)?e.fieldConfig.multiple:void 0),h=w(()=>l(a)==="list"||l(d)&&l(f)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),v=w(()=>i()?.fileName),_=w(()=>Gr(i()?.currentValues[e.locale]??{})),b=w(()=>(l(m)??l(p))?._i18n??$i),y=w(()=>l(b).i18nEnabled),x=w(()=>l(b).defaultLocale),k=w(()=>l(y)&&(l(u)===!0||l(u)==="translate")),S=w(()=>l(y)&&l(u)==="duplicate"),C=w(()=>new RegExp(`^${cn(e.keyPath)}\\.\\d+$`)),E=w(()=>l(h)?Object.entries(l(_)).filter(([N])=>l(C).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{ho(Object.fromEntries(kC({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath}).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 j=N.querySelector(".widget-wrapper");(j?.querySelector('[contenteditable="true"], [tabindex="0"]')??j?.querySelector("input, textarea, button"))?.focus()}})};var O=V(),L=M(O);{var I=N=>{var j=G9();j.__keydown=[V9,A],j.__click=[W9,A];var H=R(j),B=R(H),W=D(H,2);{var G=K=>{var ee=V();const J=w(()=>CA[l(a)]);var Y=M(ee);yi(Y,()=>l(J),(te,ce)=>{ce(te,{get keyPath(){return e.keyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(E)}})}),T(K,ee)};U(W,K=>{l(a)in CA&&K(G)})}q(()=>{ke(j,"data-widget",l(a)),ke(j,"data-key-path",e.keyPath),Z(B,l(o)||l(s))}),T(N,j)};U(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(x)||l(k)||l(S))&&N(I)})}T(t,O),oe(),r()}sa(["keydown","click"]);var Y9=F('<div role="none" class="header svelte-1bztb9y"> </div>'),J9=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const Z9={hash:"svelte-1bztb9y",code:".subsection.svelte-1bztb9y {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1bztb9y .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1bztb9y {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-1bztb9y {padding:8px 16px;}.items.svelte-1bztb9y:empty {display:none;}"};function wA(t,e){se(e,!0),Ee(t,Z9);const r=`${er("section")}-header`;let i=ae(void 0);var s=J9(),o=R(s);{var a=d=>{var f=Y9();ke(f,"id",r);var h=R(f);q(()=>Z(h,e.label)),T(d,f)};U(o,d=>{e.label&&d(a)})}var c=D(o,2),u=R(c);hr(u,()=>su(l(i)),null,d=>{var f=V(),h=M(f);Re(h,()=>e.children??Me),T(d,f)}),Pt(s,d=>$(i,d),()=>l(i)),q(()=>ke(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var X9=F('<p dir="auto"> </p>');function Q9(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"locale",8),m=P(e,"keyPath",8),v=P(e,"fieldConfig",8),_=P(e,"currentValue",8);Fe(()=>(l(s),l(o),l(a),l(c),l(u),vt(v())),()=>{(S=>($(s,S.name),$(o,S.field),$(a,S.fields),$(c,S.types),$(u,it(S.typeKey,"type"))))(v())}),Fe(()=>(l(o),l(a),l(c)),()=>{$(d,!!(l(o)??l(a)??l(c)))}),Fe(()=>vt(m()),()=>{$(f,new RegExp(`^${cn(m())}\\.\\d+`))}),Fe(()=>vt(g()),()=>{$(h,_c(g()))}),Fe(()=>(i(),vt(g()),l(f),vt(m()),l(s)),()=>{$(p,za(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(f).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${cn(m())}`),l(s)),C])))[l(s)]??[])}),Rr(),Sr();var b=V(),y=M(b);{var x=S=>{var C=V(),E=M(C);dt(E,1,()=>l(p),Xn,(A,O,L)=>{const I=Ge(()=>Array.isArray(l(c))?i()?.currentValues[g()][`${m()}.${L}.${l(u)}`]:void 0),N=Ge(()=>l(c)?.find(({name:B})=>B===l(I))),j=Ge(()=>l(N)?l(N).label||l(N).name:void 0),H=Ge(()=>l(I)?l(N)?.fields??[]:l(a)??(l(o)?[l(o)]:[]));wA(A,{get label(){return l(j)},children:(B,W)=>{var G=V(),K=M(G);dt(K,1,()=>l(H),ee=>ee.name,(ee,J)=>{var Y=V(),te=M(Y);hr(te,()=>hn(0),null,ce=>{const he=Ge(()=>l(o)?`${m()}.${L}`:`${m()}.${L}.${l(J).name}`);vy(ce,{get keyPath(){return l(he)},get locale(){return g()},get fieldConfig(){return l(J)}})}),T(ee,Y)}),T(B,G)},$$slots:{default:!0}})}),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=O=>{var L=X9(),I=R(L);q(N=>{ke(L,"lang",g()),Z(I,N),L.dir=L.dir},[()=>l(h).format(_())],Ge),T(O,L)};U(E,O=>{Array.isArray(_())&&_().length&&O(A)},!0)}T(S,C)};U(y,S=>{l(d)?S(x):S(k,!1)})}T(t,b),oe(),r()}var eV=(t,e,n)=>{!t.target.matches("button, input, textarea")&&t.key!=="Tab"&&t.preventDefault(),t.target===l(e)&&t.key==="Backspace"&&n()(new CustomEvent("remove"))},tV=F('<section role="group" class="field svelte-z6qmsu"><header role="none"><h4 role="none" class="svelte-z6qmsu"> </h4></header> <div role="none" class="widget-wrapper"><!></div></section>'),nV=F('<div role="group" class="wrapper svelte-z6qmsu" contenteditable="false" tabindex="0"><header role="none" class="svelte-z6qmsu"><h3 role="none" class="svelte-z6qmsu"> </h3> <!></header> <!></div>');const rV={hash:"svelte-z6qmsu",code:".wrapper.svelte-z6qmsu {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-z6qmsu:focus {outline-color:var(--sui-primary-accent-color-translucent);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) {display:flex;align-items:center;justify-content:space-between;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) h3:where(.svelte-z6qmsu) {padding:0 8px;font-size:var(--sui-font-size-small);font-weight:600;}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) button {padding:0;height:16px;}section.svelte-z6qmsu {margin:0;border-top:1px solid var(--sui-secondary-border-color);padding:16px;}section.svelte-z6qmsu h4:where(.svelte-z6qmsu) {margin-bottom:8px;font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color);}"};function iV(t,e){se(e,!0),Ee(t,rV);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"values",19,()=>({})),o=P(e,"onChange",3,()=>{}),a=ae(void 0),c=ae(""),u=ae("");const d=ie({}),f=["image","string"],h=()=>l(a);ln(()=>{window.requestAnimationFrame(()=>{$(c,ie(l(a)?.closest("[data-locale]")?.dataset.locale)),$(u,ie(l(a)?.closest("[data-key-path]")?.dataset.keyPath))})}),Ue(()=>{s(),xe(()=>{Mn(s(),Gr(d))||Object.assign(d,s())})}),Ue(()=>{const S=Gr(d);xe(()=>{Mn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=nV();p.__keydown=[eV,a,o];var g=R(p),m=R(g),v=R(m),_=D(m,2);const b=w(()=>i()("remove"));Je(_,{size:"small",iconic:!0,get"aria-label"(){return l(b)},onclick:()=>{o()(new CustomEvent("remove"))},startIcon:C=>{et(C,{name:"close"})},$$slots:{startIcon:!0}});var y=D(g,2);{var x=S=>{var C=V(),E=M(C);dt(E,17,()=>e.fields,({name:A,label:O,widget:L})=>A,(A,O)=>{let L=()=>l(O).name,I=()=>l(O).label,N=()=>l(O).widget;var j=V(),H=M(j);{var B=W=>{var G=tV();const K=w(()=>sg[N()]);var ee=R(G),J=R(ee),Y=R(J),te=D(ee,2),ce=R(te);const he=w(()=>er("field")),re=w(()=>I()??L()),X=w(()=>({name:L(),widget:N()}));yi(ce,()=>l(K),(fe,be)=>{be(fe,{get locale(){return l(c)},get keyPath(){return`${l(u)??""}:${L()??""}`},get fieldId(){return l(he)},get fieldLabel(){return l(re)},get fieldConfig(){return l(X)},inEditorComponent:!0,get currentValue(){return d[L()]},set currentValue(ue){d[L()]=ue}})}),q(fe=>{ke(G,"aria-label",fe),ke(G,"data-widget",N()),ke(G,"data-key-path",`${l(u)??""}:${L()??""}`),Z(Y,I())},[()=>i()("x_field",{values:{field:I()}})]),_i("keydown",G,fe=>{fe.stopPropagation()},!0),T(W,G)};U(H,W=>{N()&&f.includes(N())&&W(B)})}T(A,j)}),T(S,C)};U(y,S=>{l(c)&&l(u)&&S(x)})}Pt(p,S=>$(a,S),()=>l(a)),q(()=>{ke(p,"aria-label",e.label),Z(v,e.label)}),T(t,p);var k=oe({getElement:h});return r(),k}sa(["keydown"]);const xA=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),sV=t=>({image:{id:"image",icon:"image",label:ne(le)("editor_components.image"),fields:[{name:"src",label:ne(le)("editor_components.src"),widget:"image"},{name:"alt",label:ne(le)("editor_components.alt"),widget:"string"},{name:"title",label:ne(le)("editor_components.title"),widget:"string"},{name:"link",label:ne(le)("editor_components.link"),widget:"string"}],pattern:/\[?!\[(?<alt>.*?)\]\((?<src>.*?)(?: "(?<title>.*?)")?\)(?:\]\((?<link>.*?)\))?/,toBlock:n=>{const{src:r,alt:i,title:s,link:o}=xA(n);if(!r)return"";const a=`![${i}](${r}${s?` "${s}"`:""})`;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=xA(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],oV=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends q0{__props;constructor(p,g){super(g),this.__props=p}static getType(){return t}isInline(){return!0}static clone(p){return new c(p.__props,p.__key)}static importJSON(p){return u().updateFromJSON(p)}exportJSON(){return{...this.__props,type:t,version:1}}createDOM(){let p,g=null;const m=async({type:_,detail:b})=>{await pl(),g??=Qm(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=b),_==="remove"&&this.remove()})},v=Cg(iV,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return EP(),p=v.getElement(),window.requestAnimationFrame(()=>{p.focus()}),p}exportDOM(){return{element:this.createDOM()}}static importDOM(){const p={[a]:()=>({conversion:g=>({node:u(Object.fromEntries(n.map(({name:m})=>[m,g[m]??""])))}),priority:3})};return t==="image"&&Object.assign(p,{a:g=>{if(g.firstChild?.nodeName.toLowerCase()==="img"){const{href:m}=g,{src:v,alt:_,title:b}=g.firstChild;return{conversion:()=>({node:u({src:v,alt:_,title:b,link:m}),after:()=>[]}),priority:4}}return null}}),p}updateDOM(){return!1}decorate(){return null}}const u=h=>new c(h??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=h=>h instanceof c&&h.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:h=>d(h)?s(h.__props):null,importRegExp:r,regExp:r,replace:(h,p)=>{const g=p,m=i?.(g)??g.groups??{};h.replace(u(m))},type:"text-match"}}},kA=new Map;class aV{constructor(e){const{id:n}=e,r=kA.get(n),i=r??oV(e);r||kA.set(n,i),Object.assign(this,{...e,...i})}}var lV=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const cV={hash:"svelte-1e9a0b3",code:`.wrapper.svelte-1e9a0b3 {display:contents;}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],
589
589
  .wrapper.minimal.svelte-1e9a0b3 textarea {overflow:auto;max-height:240px;}`};function uV(t,e){se(e,!0),Ee(t,cV);let n=P(e,"currentValue",15),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1),o=ae("");const a=w(()=>it(e.fieldConfig.modes,()=>[...UP],!0)),c=w(()=>it(e.fieldConfig.buttons,()=>[...qP],!0)),u=w(()=>it(e.fieldConfig.editor_components,()=>[...VP],!0)),d=w(()=>it(e.fieldConfig.minimal,!1)),f=w(()=>l(a).map(b=>BP[b]).filter(Boolean)),h=w(()=>[...l(c),...l(u).includes("code-block")?["code-block"]:[]].map(b=>HP[b]).filter(Boolean)),p=w(()=>[...l(u).map(b=>b==="code-block"||b in Nw?void 0:sV(b)).filter(b=>!!b),...Object.values(Nw)].map(b=>new aV(b))),g=()=>{const b=typeof n()=="string"?n():"";l(o)!==b&&$(o,ie(b))},m=()=>{const b=l(o);n()!==b&&n(b)};Ue(()=>{n(),xe(()=>{g()})}),Ue(()=>{l(o),xe(()=>{m()})});var v=lV(),_=R(v);hr(_,()=>hn(0),null,b=>{tF(b,{get lang(){return e.locale},get modes(){return l(f)},get buttons(){return l(h)},get components(){return l(p)},flex:!0,get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(o)},set value(y){$(o,ie(y))}})}),q(()=>ht(v,"minimal",l(d))),T(t,v),oe()}function dV(){return{useNewRenderer:!0,renderer:{heading(...t){return Ot.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return Ot.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return Ot.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}var fV=F('<div role="none" class="svelte-xzrmoz"><!></div>');const hV={hash:"svelte-xzrmoz",code:"div.svelte-xzrmoz :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}div.svelte-xzrmoz :is(video, img) {max-width:100%;max-height:100%;}div.svelte-xzrmoz :is(a:has(img)) {display:inline-block;}div.svelte-xzrmoz :is(a:has(img)) :is(img) {pointer-events:none;}"};function pV(t,e){se(e,!0),Ee(t,hV);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=ae("");const o=w(()=>it(e.fieldConfig.sanitize_preview,!1)),a={breaks:!0,async:!0,walkTokens:async f=>{if(f.type==="image"){const h=await Lc(f.href,i()?.originalEntry);h&&(f.href=h)}}};Ot.use(dV()),Ue(()=>{(async()=>$(s,ie(await Ot.parse(e.currentValue??"",a))))()});var c=fV(),u=R(c);{var d=f=>{var h=V(),p=M(h);pr(p,()=>l(o)?li.sanitize(l(s)):l(s)),T(f,h)};U(u,f=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&f(d)})}T(t,c),oe(),r()}function gV(t,e){se(e,!0);let n=P(e,"currentValue",15),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1),o=ae(void 0),a=ae("");const c=w(()=>it(e.fieldConfig.value_type,"int")),u=w(()=>e.fieldConfig.min),d=w(()=>e.fieldConfig.max),f=w(()=>it(e.fieldConfig.step,1)),h=w(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(o)!==n())if(typeof n()=="number")$(o,ie(n()));else if(typeof n()=="string"){const y=n().trim()?Number(n()):NaN;$(o,ie(Number.isNaN(y)?void 0:y))}else $(o,void 0);!l(h)&&l(a)!==n()&&$(a,ie(String(n())))}},g=()=>{let y;l(h)?l(o)===void 0?y=NaN:l(c)==="int"?y=Number.parseInt(l(h)?String(l(o)):l(a),10):y=Number.parseFloat(l(h)?String(l(o)):l(a)):y=l(a),l(h)&&Number.isNaN(y)&&(y=null),n()!==y&&n(y)};Ue(()=>{n(),xe(()=>{p()})}),Ue(()=>{l(a),xe(()=>{g()})}),Ue(()=>{l(o),xe(()=>{g()})});var m=V(),v=M(m);{var _=y=>{iF(y,{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 s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(o)},set value(x){$(o,ie(x))}})},b=y=>{yn(y,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(x){$(a,ie(x))}})};U(v,y=>{l(h)?y(_):y(b,!1)})}T(t,m),oe()}var mV=F('<p dir="auto"><!></p>');function vV(t,e){se(e,!0);const n=w(()=>it(e.fieldConfig.value_type,"int")),r=w(()=>pp(e.locale)),i=w(()=>Intl.NumberFormat(l(r)));var s=V(),o=M(s);{var a=c=>{var u=mV(),d=R(u);{var f=p=>{var g=Be();q(m=>Z(g,m),[()=>l(i).format(Number(e.currentValue))]),T(p,g)},h=p=>{var g=Be();q(()=>Z(g,e.currentValue)),T(p,g)};U(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}q(()=>{ke(u,"lang",e.locale),u.dir=u.dir}),T(c,u)};U(o,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}T(t,s),oe()}const bV=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s})=>s?s.replaceAll(/{{(.+?)}}/g,(o,a)=>{const[c,...u]=a.split(/\s*\|\s*/);return Dp({collectionName:t,fileName:e,valueMap:r,keyPath:`${n}.${c.replace(/^fields\./,"")}`,locale:i,transformations:u})}):r[`${n}.title`]||r[`${n}.name`]||Object.entries(r).find(([o,a])=>o.startsWith(`${n}.`)&&typeof a=="string"&&!!a)?.[1]||"";var _V=F('<div role="none" class="summary svelte-23x9on"> </div>'),yV=F('<!> <div role="none" class="item-list"><!></div>',1),wV=F('<div role="none" class="wrapper svelte-23x9on"><!></div>'),xV=F("<!> <!> <!>",1);const kV={hash:"svelte-23x9on",code:".wrapper.svelte-23x9on {display:contents;}.sui.checkbox + .wrapper.svelte-23x9on > .group {margin-top:8px;}.wrapper.svelte-23x9on > .group {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.summary.svelte-23x9on {overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis;}.summary.svelte-23x9on:empty {display:none;}"};function SV(t,e){se(e,!1),Ee(t,kV);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de();let H=P(e,"locale",8),B=P(e,"keyPath",8);P(e,"fieldId",8);let W=P(e,"fieldLabel",8),G=P(e,"fieldConfig",8);P(e,"currentValue",8),P(e,"readonly",8,!1);let K=P(e,"required",8,!0);P(e,"invalid",8,!1);let ee=de(""),J=de();ln(()=>{$(ee,Wn("short")),ho({[l(C)]:l(b)?._[l(C)]??!l(c)})});const Y=async _e=>{ot(is,!1),_e&&(Object.keys(i()?.currentValues??{}).forEach(Ce=>{(Ce===H()||l(a)==="duplicate")&&Ct(nt,xe(i).currentValues[Ce][l(O)]=_e,xe(i))}),await pl());const Ae=oA(Object.fromEntries(Object.entries(Xp(l(I),H())).map(([Ce,$e])=>[`${B()}.${Ce}`,$e])));Object.entries(i()?.currentValues??{}).forEach(([Ce,$e])=>{(Ce===H()||l(a)==="duplicate")&&(Ct(nt,xe(i).currentValues[Ce]=Object.assign($e,ec({...Ae,...$e})),xe(i)),delete i().currentValues[Ce][B()])}),ot(is,!0)},te=()=>{ot(is,!1),Object.entries(i()?.currentValues??{}).forEach(([_e,Ae])=>{(_e===H()||l(a)==="duplicate")&&(Object.keys(Ae).forEach(Ce=>{Ce.startsWith(`${B()}.`)&&(Ct(nt,xe(i).currentValues[_e][Ce]=null,xe(i)),delete i()?.currentValues[_e][Ce])}),Ct(nt,xe(i).currentValues[_e][B()]=null,xe(i)))}),ot(is,!0)},ce=()=>bV({collectionName:l(g),fileName:l(v),keyPath:B(),valueMap:l(x),locale:H(),summaryTemplate:l(N)});Fe(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),vt(G())),()=>{(_e=>($(o,_e.name),$(a,it(_e.i18n,!1)),$(c,it(_e.collapsed,!1)),$(u,_e.summary),$(d,_e.fields),$(f,_e.types),$(h,it(_e.typeKey,"type"))))(G())}),Fe(()=>i(),()=>{$(p,i()?.collection)}),Fe(()=>i(),()=>{$(g,i()?.collectionName??"")}),Fe(()=>i(),()=>{$(m,i()?.collectionFile)}),Fe(()=>i(),()=>{$(v,i()?.fileName)}),Fe(()=>i(),()=>{$(_,i()?.currentValues??{})}),Fe(()=>i(),()=>{$(b,i()?.expanderStates??{})}),Fe(()=>(l(y),l(m),l(p),$i),()=>{(_e=>$(y,_e.defaultLocale))((l(m)??l(p))?._i18n??$i)}),Fe(()=>(l(_),vt(H())),()=>{$(x,l(_)[H()])}),Fe(()=>(l(x),vt(B()),l(g),l(v)),()=>{$(k,Object.entries(l(x)).some(([_e,Ae])=>!!_e.startsWith(`${B()}.`)&&(Ae!==null||vn({collectionName:l(g),fileName:l(v),valueMap:l(x),keyPath:_e})?.widget==="object")))}),Fe(()=>(vt(H()),l(y),l(a)),()=>{$(S,H()===l(y)||l(a)!==!1)}),Fe(()=>vt(B()),()=>{$(C,`${B()}#`)}),Fe(()=>(l(b),l(C)),()=>{$(E,l(b)?._[l(C)]??!0)}),Fe(()=>l(f),()=>{$(A,Array.isArray(l(f)))}),Fe(()=>(vt(B()),l(h)),()=>{$(O,`${B()}.${l(h)}`)}),Fe(()=>(l(A),l(f),l(x),l(O)),()=>{$(L,l(A)?l(f)?.find(({name:_e})=>_e===l(x)[l(O)]):void 0)}),Fe(()=>(l(A),l(L),l(d)),()=>{$(I,(l(A)?l(L)?.fields:l(d))??[])}),Fe(()=>(l(A),l(L),l(u)),()=>{$(N,l(A)&&l(L)?.summary||l(u))}),Fe(()=>(vt(H()),l(y),l(a)),()=>{$(j,H()!==l(y)&&l(a)==="duplicate")}),Rr(),Sr();var he=xV(),re=M(he);{var X=_e=>{const Ae=Ge(()=>s()("add_x",{values:{name:W()||l(o)}}));au(_e,{get label(){return l(Ae)},get checked(){return l(k)},get disabled(){return l(j)},onChange:({detail:{checked:Ce}})=>{Ce?Y():te()}})};U(re,_e=>{K()||_e(X)})}var fe=D(re,2);{var be=_e=>{my(_e,{get disabled(){return l(j)},get fieldConfig(){return G()},addItem:Y})};U(fe,_e=>{l(A)&&!l(k)&&_e(be)})}var ue=D(fe,2);{var Te=_e=>{var Ae=wV(),Ce=R(Ae);const $e=Ge(()=>l(E)?void 0:`object-${l(ee)}-summary`);_r(Ce,{get"aria-labelledby"(){return l($e)},children:(Ve,We)=>{var pt=yV(),Ke=M(pt);const ge=Ge(()=>l(A)?l(L)?.label||l(L)?.name:""),ye=Ge(()=>l(I).length?()=>ho({[l(C)]:!l(E)}):void 0);yA(Ke,{get label(){return l(ge)},get controlId(){return`object-${l(ee)??""}-item-list`},get expanded(){return l(E)},get toggleExpanded(){return l(ye)},get removeButtonVisible(){return l(A)},get removeButtonDisabled(){return l(j)},remove:()=>{te()}});var we=D(Ke,2),Se=R(we);hr(Se,()=>su(l(J)),null,Ie=>{var ve=V(),Pe=M(ve);{var qe=ct=>{var Ye=V(),rt=M(Ye);dt(rt,1,()=>l(I),ft=>ft.name,(ft,ut)=>{var bt=V(),At=M(bt);hr(At,()=>hn(0),null,an=>{const jn=Ge(()=>[B(),l(ut).name].join("."));_y(an,{get keyPath(){return l(jn)},get locale(){return H()},get fieldConfig(){return l(ut)}})}),T(ft,bt)}),T(ct,Ye)},Xe=ct=>{var Ye=_V(),rt=R(Ye);q(ft=>{ke(Ye,"id",`object-${l(ee)??""}-summary`),Z(rt,ft)},[ce],Ge),T(ct,Ye)};U(Pe,ct=>{l(E)?ct(qe):ct(Xe,!1)})}T(Ie,ve)}),Pt(we,Ie=>$(J,Ie),()=>l(J)),q(()=>ke(we,"id",`object-${l(ee)??""}-item-list`)),T(Ve,pt)},$$slots:{default:!0}}),T(_e,Ae)};U(ue,_e=>{(!(!K()||l(A))||l(k))&&l(S)&&_e(Te)})}T(t,he),oe(),r()}function EV(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de();let m=P(e,"locale",8),v=P(e,"keyPath",8),_=P(e,"fieldConfig",8);P(e,"currentValue",8),Fe(()=>(l(s),l(o),l(a),vt(_())),()=>{(k=>($(s,k.fields),$(o,k.types),$(a,it(k.typeKey,"type"))))(_())}),Fe(()=>(i(),vt(m())),()=>{$(c,i()?.currentValues[m()]??{})}),Fe(()=>(l(c),vt(v())),()=>{$(u,Object.entries(l(c)).some(([k,S])=>!!k.startsWith(`${v()}.`)&&!!S))}),Fe(()=>l(o),()=>{$(d,Array.isArray(l(o)))}),Fe(()=>(vt(v()),l(a)),()=>{$(f,`${v()}.${l(a)}`)}),Fe(()=>(l(d),l(o),l(c),l(f)),()=>{$(h,l(d)?l(o)?.find(({name:k})=>k===l(c)[l(f)]):void 0)}),Fe(()=>l(h),()=>{$(p,l(h)?l(h).label||l(h).name:void 0)}),Fe(()=>(l(d),l(h),l(s)),()=>{$(g,(l(d)?l(h)?.fields:l(s))??[])}),Rr(),Sr();var b=V(),y=M(b);{var x=k=>{wA(k,{get label(){return l(p)},children:(S,C)=>{var E=V(),A=M(E);dt(A,1,()=>l(g),O=>O.name,(O,L)=>{var I=V(),N=M(I);hr(N,()=>hn(0),null,j=>{const H=Ge(()=>[v(),l(L).name].join("."));vy(j,{get keyPath(){return l(H)},get locale(){return m()},get fieldConfig(){return l(L)}})}),T(O,I)}),T(S,E)},$$slots:{default:!0}})};U(y,k=>{l(u)&&k(x)})}T(t,b),oe(),r()}function TV(t,e){se(e,!1);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=de(),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldId",8),f=P(e,"fieldConfig",8),h=P(e,"currentValue",8),p=P(e,"readonly",8,!1),g=P(e,"required",8,!0),m=P(e,"invalid",8,!1),v=P(e,"options",8);const _=E=>{i()&&Object.keys(i().currentValues??{}).forEach(A=>{l(s)!=="duplicate"&&A!==c()||sA(A,u(),E)})},b=E=>{_(({valueList:A})=>{A.push(E)})},y=E=>{_(({valueList:A})=>{A.splice(A.indexOf(E),1)})};Fe(()=>(l(s),l(o),l(a),vt(f())),()=>{(E=>($(s,E.i18n),$(o,E.max),$(a,it(E.dropdown_threshold,5))))(f())}),Rr(),Sr();var x=V(),k=M(x);{var S=E=>{pN(E,{get disabled(){return p()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get options(){return v()},get values(){return h()},get max(){return l(o)},get"aria-labelledby"(){return`${d()??""}-label`},get"aria-errormessage"(){return`${d()??""}-error`},onAddValue:({detail:{value:A}})=>{b(A)},onRemoveValue:({detail:{value:A}})=>{y(A)}})},C=E=>{aL(E,{get"aria-labelledby"(){return`${d()??""}-label`},children:(A,O)=>{var L=V(),I=M(L);dt(I,1,v,({label:N,value:j})=>j,(N,j)=>{let H=()=>l(j).label,B=()=>l(j).value;const W=Ge(()=>h().includes(B()));au(N,{get label(){return H()},get value(){return B()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get checked(){return l(W)},get"aria-errormessage"(){return`${d()??""}-error`},onChange:({detail:{checked:G}})=>{G?b(B()):y(B())}})}),T(A,L)},$$slots:{default:!0}})};U(k,E=>{v().length>l(a)?E(S):E(C,!1)})}T(t,x),oe(),r()}function SA(t,e){se(e,!1);const[n,r]=me(),i=()=>z(le,"$_",n),s=de();P(e,"locale",8),P(e,"keyPath",8);let o=P(e,"fieldId",8),a=P(e,"fieldConfig",8),c=P(e,"currentValue",12),u=P(e,"readonly",8,!1),d=P(e,"required",8,!0),f=P(e,"invalid",8,!1),h=P(e,"options",8);Fe(()=>(l(s),vt(a())),()=>{(_=>$(s,it(_.dropdown_threshold,5)))(a())}),Fe(()=>(vt(d()),vt(h()),i()),()=>{!d()&&!h().some(({value:_})=>_==="")&&h().unshift({label:i()("unselected_option"),value:"",searchValue:""})}),Rr(),Sr();var p=V(),g=M(p);{var m=_=>{du(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},get value(){return c()},set value(b){c(b)},children:(b,y)=>{var x=V(),k=M(x);dt(k,1,h,({label:S,value:C,searchValue:E})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value,O=()=>l(C).searchValue;const L=Ge(()=>A()===c());gr(S,{get label(){return E()},get value(){return A()},get searchValue(){return O()},get selected(){return l(L)},wrap:!0})}),T(b,x)},$$slots:{default:!0},$$legacy:!0})},v=_=>{XL(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},onChange:({detail:{value:b}})=>{c(b)},children:(b,y)=>{var x=V(),k=M(x);dt(k,1,h,({label:S,value:C})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value;const O=Ge(()=>A()===c());nN(S,{get label(){return E()},get value(){return A()},get checked(){return l(O)}})}),T(b,x)},$$slots:{default:!0}})};U(g,_=>{h().length>l(s)?_(m):_(v,!1)})}T(t,p),oe(),r()}function EA(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8),a=P(e,"keyPath",8),c=P(e,"fieldId",8);P(e,"fieldLabel",8);let u=P(e,"fieldConfig",8),d=P(e,"currentValue",12),f=P(e,"sortOptions",8,!1),h=P(e,"readonly",8,!1),p=P(e,"required",8,!0),g=P(e,"invalid",8,!1);Fe(()=>(l(n),l(r),vt(u())),()=>{(_=>($(n,_.options),$(r,_.multiple)))(u())}),Fe(()=>(l(n),vt(f()),oi),()=>{$(i,(()=>{const _=l(n).map(b=>Jn(b)?b:{label:b,value:b});return f()&&_.sort((b,y)=>oi(b.label,y.label)),_})())}),Fe(()=>(l(r),SA),()=>{$(s,l(r)?TV:SA)}),Rr(),Sr();var m=V(),v=M(m);ms(v,()=>JSON.stringify(l(i)),_=>{l(s)(_,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldConfig(){return u()},get readonly(){return h()},get required(){return p()},get invalid(){return g()},get options(){return l(i)},get currentValue(){return d()},set currentValue(b){d(b)},$$legacy:!0})}),T(t,m),oe()}var CV=F('<div role="none" class="wrapper"><!></div>');function AV(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8),a=P(e,"keyPath",8),c=P(e,"fieldId",8),u=P(e,"fieldLabel",8),d=P(e,"fieldConfig",8),f=P(e,"currentValue",12),h=P(e,"readonly",8,!1),p=P(e,"required",8,!0),g=P(e,"invalid",8,!1);Fe(()=>(l(n),l(r),vt(d())),()=>{(b=>($(n,b.collection),$(r,b.file)))(d())}),Fe(()=>(l(r),l(n),ns),()=>{$(i,l(r)?[T_(l(n),l(r))].filter(Boolean):ns(l(n)))}),Fe(()=>(vt(o()),vt(d()),l(i)),()=>{$(s,__(o(),d(),l(i)))}),Rr(),Sr();var m=CV(),v=R(m);const _=Ge(()=>({...d(),options:l(s)}));EA(v,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldLabel(){return u()},get fieldConfig(){return l(_)},get readonly(){return h()},get required(){return p()},get invalid(){return g()},sortOptions:!0,get currentValue(){return f()},set currentValue(b){f(b)},$$legacy:!0}),T(t,m),oe()}var PV=F('<p dir="auto"> </p>');function OV(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de(),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8);P(e,"keyPath",8);let f=P(e,"fieldConfig",8),h=P(e,"currentValue",8);Fe(()=>(l(n),l(r),l(i),l(s),vt(f())),()=>{(v=>($(n,v.collection),$(r,v.file),$(i,it(v.multiple,!1)),$(s,v.value_field)))(f())}),Fe(()=>(l(r),l(n),ns),()=>{$(o,l(r)?[T_(l(n),l(r))].filter(Boolean):ns(l(n)))}),Fe(()=>(vt(d()),vt(f()),l(o)),()=>{$(a,__(d(),f(),l(o)))}),Fe(()=>(l(i),vt(h()),l(a),l(s)),()=>{$(c,(l(i)?h():[h()]).filter(v=>v!==void 0).map(v=>{const _=l(a).find(b=>b.value===v)?.label;return _&&_!==v?["slug","{{slug}}","{{fields.slug}}"].includes(l(s))?_:`${_} (${v})`:v}))}),Fe(()=>vt(d()),()=>{$(u,_c(d()))}),Rr(),Sr();var p=V(),g=M(p);{var m=v=>{var _=PV(),b=R(_);q(y=>{ke(_,"lang",d()),Z(b,y),_.dir=_.dir},[()=>l(u).format(l(c))],Ge),T(v,_)};U(g,v=>{l(c).length&&v(m)})}T(t,p),oe()}var $V=F('<p dir="auto"> </p>'),LV=F('<p dir="auto"> </p>');function NV(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8);P(e,"keyPath",8);let a=P(e,"fieldConfig",8),c=P(e,"currentValue",8);const u=g=>l(i)&&l(n).find(m=>m.value===g)?.label||g;Fe(()=>(l(n),l(r),vt(a())),()=>{(g=>($(n,g.options),$(r,g.multiple)))(a())}),Fe(()=>l(n),()=>{$(i,rS(l(n)))}),Fe(()=>vt(o()),()=>{$(s,_c(o()))}),Rr(),Sr();var d=V(),f=M(d);{var h=g=>{var m=$V(),v=R(m);q(_=>{ke(m,"lang",o()),Z(v,_),m.dir=m.dir},[()=>l(s).format(c().map(u).sort())],Ge),T(g,m)},p=g=>{var m=V(),v=M(m);{var _=b=>{var y=LV(),x=R(y);q(k=>{ke(y,"lang",o()),Z(x,k),y.dir=y.dir},[()=>u(c())],Ge),T(b,y)};U(v,b=>{c()!==void 0&&b(_)},!0)}T(g,m)};U(f,g=>{l(r)&&Array.isArray(c())&&c().length?g(h):g(p,!1)})}T(t,d),oe()}var IV=F('<div class="wrapper svelte-5qs6s0"><!> <span role="none" class="count svelte-5qs6s0"> </span> <!></div>');const RV={hash:"svelte-5qs6s0",code:".wrapper.svelte-5qs6s0 {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:right;}.count.invalid.svelte-5qs6s0 {color:var(--sui-error-foreground-color);}.count.svelte-5qs6s0:not(.invalid) {color:var(--sui-success-foreground-color);}"};function TA(t,e){se(e,!0),Ee(t,RV);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>e.fieldConfig.minlength),o=w(()=>e.fieldConfig.maxlength),a=w(()=>IC(e.fieldConfig,e.currentValue)),c=w(()=>l(a).count),u=w(()=>l(a).hasMin),d=w(()=>l(a).hasMax),f=w(()=>l(a).invalid);var h=V(),p=M(h);{var g=m=>{var v=IV(),_=R(v);{var b=C=>{var E=Be();q(()=>Z(E,`${l(s)??""}
590
590
  / `)),T(C,E)};U(_,C=>{l(u)&&C(b)})}var y=D(_,2),x=R(y),k=D(y,2);{var S=C=>{var E=Be();q(()=>Z(E,` /
591
- ${l(o)??""}`)),T(C,E)};U(k,C=>{l(d)&&C(S)})}q(C=>{ke(v,"aria-label",C),ht(y,"invalid",l(f)),Z(x,l(c))},[()=>i()(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(s),max:l(o)}})]),T(m,v)};U(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function DV(t,e){se(e,!0);const[n,r]=me();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const u=w(()=>it(e.fieldConfig.type,"text")),d=w(()=>it(e.fieldConfig.prefix,"")),f=w(()=>it(e.fieldConfig.suffix,"")),{extraHint:h}=cs("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&$(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(f))&&(m=`${l(d)}${m}${l(f)}`),i()!==m&&i(m)};Ue(()=>{i(),xe(()=>{p()})}),Ue(()=>{l(c),xe(()=>{g()})}),Ue(()=>{h&&ot(h,TA)}),yn(t,{get lang(){return e.locale},get type(){return l(u)},get inputmode(){return l(u)},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(c)},set value(m){$(c,ie(m))}}),oe(),r()}var MV=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),FV=F("<a> </a>"),zV=F('<div role="none"><!></div>');const jV={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function UV(t,e){se(e,!0),Ee(t,jV);const[n,r]=me(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>jB(e.url));ln(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&$(o,!1)})});var c=zV(),u=R(c);{var d=h=>{var p=V(),g=M(p);hr(g,()=>su(l(s)),null,m=>{var v=MV();q((_,b)=>{ke(v,"src",_),ke(v,"title",b)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,v)}),T(h,p)},f=h=>{var p=FV(),g=R(p);q(m=>{ke(p,"href",m),Z(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};U(u,h=>{l(o)?h(d):h(f,!1)})}Pt(c,h=>$(s,h),()=>l(s)),T(t,c),oe(),r()}var BV=F("<a> </a>"),qV=F("<a> </a>"),HV=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const VV={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function WV(t,e){se(e,!0),Ee(t,VV);const n=w(()=>e.fieldConfig.name),r=w(()=>it(e.fieldConfig.type,"text"));var i=V(),s=M(i);{var o=a=>{var c=HV(),u=R(c);{var d=h=>{var p=V(),g=M(p);{var m=_=>{UV(_,{get url(){return e.currentValue}})},v=_=>{var b=BV(),y=R(b);q(x=>{ke(b,"href",x),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)};U(g,_=>{zB(e.currentValue)?_(m):_(v,!1)})}T(h,p)},f=h=>{var p=V(),g=M(p);{var m=_=>{var b=qV(),y=R(b);q(x=>{ke(b,"href",`mailto:${x??""}`),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)},v=_=>{var b=Be();q(()=>Z(b,e.currentValue)),T(_,b)};U(g,_=>{l(r)==="email"?_(m):_(v,!1)},!0)}T(h,p)};U(u,h=>{l(r)==="url"||Dg(e.currentValue)?h(d):h(f,!1)})}q(()=>{ke(c,"lang",e.locale),ht(c,"title",l(n)==="title"),c.dir=c.dir}),T(a,c)};U(s,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(o)})}T(t,i),oe()}function GV(t,e){se(e,!0);const[n,r]=me();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const{extraHint:u}=cs("field-editor")??{},d=()=>{const h=typeof i()=="string"?i():"";l(c)!==h&&$(c,ie(h))},f=()=>{const h=l(c);i()!==h&&i(h)};Ue(()=>{i(),xe(()=>{d()})}),Ue(()=>{l(c),xe(()=>{f()})}),Ue(()=>{u&&ot(u,TA)}),$h(t,{get lang(){return e.locale},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(c)},set value(h){$(c,ie(h))}}),oe(),r()}var KV=F('<p dir="auto" class="svelte-tzbr78"> </p>');const YV={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function JV(t,e){se(e,!0),Ee(t,YV);var n=V(),r=M(n);{var i=s=>{var o=KV(),a=R(o);q(()=>{ke(o,"lang",e.locale),Z(a,e.currentValue),o.dir=o.dir}),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}function ZV(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>i()?.collection),d=w(()=>i()?.collectionFile),f=w(()=>(l(d)??l(u))?._i18n??$i),h=w(()=>l(f).defaultLocale);ln(()=>{s()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s($C(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);yn(t,{flex:!0,get readonly(){return l(p)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return s()},set value(g){s(g)}}),oe(),r()}var XV=F('<p class="svelte-1e2mlgo"> </p>');const QV={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function eW(t,e){se(e,!0),Ee(t,QV);var n=V(),r=M(n);{var i=s=>{var o=XV(),a=R(o);q(()=>Z(a,e.currentValue)),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}const sg={boolean:o6,code:c6,color:m6,compute:y6,datetime:T6,file:vA,image:vA,keyvalue:A9,list:H9,markdown:uV,number:gV,object:SV,relation:AV,select:EA,string:DV,text:GV,uuid:ZV},CA={boolean:l6,code:d6,color:_6,compute:x6,datetime:P6,file:bA,image:bA,keyvalue:L9,list:Q9,markdown:pV,number:vV,object:EV,relation:OV,select:NV,string:WV,text:JV,uuid:eW};function by(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(nt,"$entryDraft",n);let a=P(e,"keyPath",3,""),c=P(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var f=V(),h=M(f);dt(h,17,()=>e.otherLocales,Xn,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ts(l(g))}})),v=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!Gr(o().currentValues[l(g)])[a()]||!c()&&a()&&Gr(o().currentValues[l(g)])[a()]===Gr(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));Lt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{lA(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,f),oe(),r()}function AA(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(le,"$_",n);let a=P(e,"size",3,"medium"),c=P(e,"keyPath",3,"");const u=w(()=>i()??{}),d=w(()=>l(u).getSourceLanguage),f=w(()=>l(u).getTargetLanguage),h=w(()=>!s()?.currentLocales[e.locale]||!l(d)(e.locale));var p=V(),g=M(p);{var m=_=>{const b=w(()=>{const[k]=e.otherLocales;return{otherLocale:k}}),y=w(()=>o()("translate_from_x",{values:{locale:Ts(l(b).otherLocale)}})),x=w(()=>l(h)||!s()?.currentLocales[l(b).otherLocale]||!l(f)(l(b).otherLocale));Je(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get title(){return l(y)},get disabled(){return l(x)},onclick:()=>{lA(l(b).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{et(S,{name:"translate"})},$$slots:{startIcon:!0}})},v=_=>{const b=w(()=>o()("translate"));Er(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(b)},get disabled(){return l(h)},endIcon:k=>{et(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));mr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{by(C,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})};U(g,_=>{e.otherLocales.length===1?_(m):_(v,!1)})}T(t,p),oe(),r()}var tW=F('<div class="required svelte-1vsh88z">*</div>'),nW=F("<!> <!>",1),rW=F('<p class="comment svelte-1vsh88z"><!></p>'),iW=F("<!> <!> <!> <!> <!> <!> <!>",1),sW=F('<div role="none" class="svelte-1vsh88z"> </div>'),oW=F('<div role="none" class="before-input svelte-1vsh88z"><!></div>'),aW=F('<div role="none" class="prefix svelte-1vsh88z"> </div>'),lW=F('<div role="none" class="suffix svelte-1vsh88z"> </div>'),cW=F('<div role="none" class="after-input svelte-1vsh88z"><!></div>'),uW=F("<!> <!> <!> <!> <!>",1),dW=F('<p class="hint svelte-1vsh88z"><!></p>'),fW=F('<div role="none" class="footer svelte-1vsh88z"><!> <!></div>'),hW=F('<section role="group" class="field svelte-1vsh88z"><header role="none" class="svelte-1vsh88z"><h4 role="none" class="svelte-1vsh88z"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none" class="widget-wrapper svelte-1vsh88z"><!></div> <!></section>');const pW={hash:"svelte-1vsh88z",code:`@keyframes svelte-1vsh88z-highlight {
592
- 50% {
593
- opacity: 0.2;
594
- }
595
- }section.svelte-1vsh88z {padding:16px;}section.svelte-1vsh88z:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-1vsh88z > :where(.svelte-1vsh88z) {margin-right:auto;margin-left:auto;max-width:768px;}
596
- @media (prefers-reduced-motion) {section.svelte-1vsh88z.highlight {outline-width:4px !important;outline-color:var(--sui-primary-accent-color-translucent);outline-offset:-4px;}
597
- }section.svelte-1vsh88z.highlight > * {
598
- animation: svelte-1vsh88z-highlight 750ms 2;}
599
- @media (prefers-reduced-motion) {section.svelte-1vsh88z.highlight > * {
600
- animation: none;}
601
- }header.svelte-1vsh88z {display:flex;align-items:center;margin-bottom:8px;height:var(--sui-button-small-height);}header.svelte-1vsh88z h4:where(.svelte-1vsh88z) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}header.svelte-1vsh88z .required:where(.svelte-1vsh88z) {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}.widget-wrapper.has-extra-labels.svelte-1vsh88z {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-1vsh88z input[type="text"],
602
- .widget-wrapper.svelte-1vsh88z textarea {width:100%;}.widget-wrapper.svelte-1vsh88z input[type="color"],
603
- .widget-wrapper.svelte-1vsh88z input[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-1vsh88z input[type="file"],
604
- .widget-wrapper.svelte-1vsh88z input[type="checkbox"], .widget-wrapper.svelte-1vsh88z > div {color:inherit;}.widget-wrapper.svelte-1vsh88z input[type="date"],
605
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"],
606
- .widget-wrapper.svelte-1vsh88z input[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-1vsh88z input[type="date"]:disabled,
607
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"]:disabled,
608
- .widget-wrapper.svelte-1vsh88z input[type="time"]:disabled {opacity:0.4;}.widget-wrapper.svelte-1vsh88z input[type="color"][aria-invalid="true"],
609
- .widget-wrapper.svelte-1vsh88z input[type="date"][aria-invalid="true"],
610
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"][aria-invalid="true"],
611
- .widget-wrapper.svelte-1vsh88z input[type="time"][aria-invalid="true"] {border-color:var(--sui-error-border-color);}.before-input.svelte-1vsh88z,
612
- .after-input.svelte-1vsh88z,
613
- .prefix.svelte-1vsh88z,
614
- .suffix.svelte-1vsh88z {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-1vsh88z {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-1vsh88z {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-1vsh88z {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function _y(t,e){se(e,!0),Ee(t,pW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=()=>z(u,"$extraHint",n),a=er("field"),c=ye=>li.sanitize(Ot.parseInline(ye.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),u=st();bg("field-editor",{extraHint:u});const d=w(()=>e.fieldConfig.name),f=w(()=>it(e.fieldConfig.label,"")),h=w(()=>it(e.fieldConfig.comment,"")),p=w(()=>it(e.fieldConfig.hint,"")),g=w(()=>it(e.fieldConfig.widget,"string")),m=w(()=>it(e.fieldConfig.i18n,!1)),v=w(()=>it(e.fieldConfig.pattern,()=>[],!0)),_=w(()=>xd({fieldConfig:e.fieldConfig,locale:e.locale})),b=w(()=>e.fieldConfig.field),y=w(()=>e.fieldConfig.fields),x=w(()=>e.fieldConfig.types),k=w(()=>!!l(b)||!!l(y)||!!l(x)),S=w(()=>e.fieldConfig.min),C=w(()=>e.fieldConfig.max),E=w(()=>l(g)==="string"?e.fieldConfig.type??"text":l(g)==="number"?"number":void 0),A=w(()=>["string"].includes(l(g))),O=w(()=>l(A)?e.fieldConfig.prefix:void 0),L=w(()=>l(A)?e.fieldConfig.suffix:void 0),I=w(()=>["boolean","number","string"].includes(l(g))),N=w(()=>l(I)?e.fieldConfig.before_input:void 0),j=w(()=>l(I)?e.fieldConfig.after_input:void 0),H=w(()=>!!(l(O)||l(L)||l(N)||l(j))),B=w(()=>["relation","select"].includes(l(g))),W=w(()=>l(B)?e.fieldConfig.multiple:void 0),G=w(()=>l(g)==="list"&&l(k)||l(W)||l(g)==="keyvalue"),K=w(()=>l(g)==="list"||l(B)&&l(W)),ee=w(()=>i()?.collection),J=w(()=>i()?.collectionFile),Y=w(()=>i()?.originalValues),te=w(()=>(l(J)??l(ee))?._i18n??$i),ce=w(()=>l(te).i18nEnabled),he=w(()=>l(te).allLocales),re=w(()=>l(te).defaultLocale),X=w(()=>l(ce)?l(he).filter(ye=>ye!==e.locale):[]),fe=w(()=>l(ce)&&(l(m)===!0||l(m)==="translate")),be=w(()=>l(ce)&&l(m)==="duplicate"),ue=w(()=>e.locale===l(re)||l(fe)||l(be)),Te=w(()=>new RegExp(`^${cn(e.keyPath)}\\.\\d+$`)),_e=w(()=>l(K)?Object.entries(Gr(i()?.currentValues[e.locale]??{})).filter(([ye])=>l(Te).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):Gr(i()?.currentValues[e.locale])?.[e.keyPath]),Ae=w(()=>l(K)?Object.entries(l(Y)?.[e.locale]??{}).filter(([ye])=>l(Te).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):l(Y)?.[e.locale][e.keyPath]),Ce=w(()=>i()?.validities[e.locale][e.keyPath]),$e=w(()=>l(f)||l(d)),Ve=w(()=>l(m)==="duplicate"&&e.locale!==l(re)||l(g)==="compute"),We=w(()=>l(Ce)?.valid===!1);var pt=V(),Ke=M(pt);{var ge=ye=>{var we=hW();const Se=w(()=>l(fe)&&l(X).length),Ie=w(()=>!(l(be)&&e.locale!==l(re)));var ve=R(we),Pe=R(ve);ke(Pe,"id",`${a??""}-label`);var qe=R(Pe),Xe=D(Pe,2);{var ct=wt=>{var nn=tW();q(In=>ke(nn,"aria-label",In),[()=>s()("required")]),T(wt,nn)};U(Xe,wt=>{!l(Ve)&&l(_)&&wt(ct)})}var Ye=D(Xe,2);Yr(Ye,{flex:!0});var rt=D(Ye,2);{var ft=wt=>{AA(wt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(rt,wt=>{l(Se)&&["markdown","string","text","list","object"].includes(l(g))&&wt(ft)})}var ut=D(rt,2);{var bt=wt=>{const nn=w(()=>s()("show_field_options"));Er(wt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(nn)},popup:Pn=>{const qt=w(()=>s()("field_options"));mr(Pn,{get"aria-label"(){return l(qt)},children:(Zt,bn)=>{var Un=nW(),or=M(Un);{var ar=yr=>{by(yr,{get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(or,yr=>{l(Se)&&yr(ar)})}var pi=D(or,2);{var Ms=yr=>{const Hn=w(()=>s()("revert_changes")),Bt=w(()=>Mn(l(_e),l(Ae)));Lt(yr,{get label(){return l(Hn)},get disabled(){return l(Bt)},onclick:()=>{py(e.locale,e.keyPath)}})};U(pi,yr=>{l(Ie)&&yr(Ms)})}T(Zt,Un)},$$slots:{default:!0}})},$$slots:{popup:!0}})};U(ut,wt=>{(l(Se)||l(Ie))&&wt(bt)})}var At=D(ve,2);{var an=wt=>{var nn=rW(),In=R(nn);pr(In,()=>c(l(h))),T(wt,nn)};U(At,wt=>{!l(Ve)&&l(h)&&wt(an)})}var jn=D(At,2);{var sr=wt=>{_A(wt,{id:`${a??""}-error`,children:(nn,In)=>{var Pn=iW(),qt=M(Pn);{var Zt=Qe=>{var St=Be();q(On=>Z(St,On),[()=>s()("validation.value_missing")]),T(Qe,St)};U(qt,Qe=>{l(Ce).valueMissing&&Qe(Zt)})}var bn=D(qt,2);{var Un=Qe=>{var St=Be();const On=w(()=>{const{minlength:lr}=e.fieldConfig;return{minlength:lr}});q(lr=>Z(St,lr),[()=>s()(l(On).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l(On).minlength}})]),T(Qe,St)};U(bn,Qe=>{l(Ce).tooShort&&Qe(Un)})}var or=D(bn,2);{var ar=Qe=>{var St=Be();const On=w(()=>{const{maxlength:lr}=e.fieldConfig;return{maxlength:lr}});q(lr=>Z(St,lr),[()=>s()(l(On).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l(On).maxlength}})]),T(Qe,St)};U(or,Qe=>{l(Ce).tooLong&&Qe(ar)})}var pi=D(or,2);{var Ms=Qe=>{var St=V();const On=w(()=>l(S)===1?"one":"many");var lr=M(St);{var po=Vn=>{var cr=Be();q(as=>Z(cr,as),[()=>s()("validation.range_underflow.number",{values:{min:l(S)}})]),T(Vn,cr)},Qo=Vn=>{var cr=V(),as=M(cr);{var ls=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_underflow.add_${l(On)}`,{values:{min:l(S)}})]),T(wr,ur)},rl=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_underflow.select_${l(On)}`,{values:{min:l(S)}})]),T(wr,ur)};U(as,wr=>{l(G)?wr(ls):wr(rl,!1)},!0)}T(Vn,cr)};U(lr,Vn=>{l(g)==="number"?Vn(po):Vn(Qo,!1)})}T(Qe,St)};U(pi,Qe=>{l(Ce).rangeUnderflow&&Qe(Ms)})}var yr=D(pi,2);{var Hn=Qe=>{var St=V();const On=w(()=>l(C)===1?"one":"many");var lr=M(St);{var po=Vn=>{var cr=Be();q(as=>Z(cr,as),[()=>s()("validation.range_overflow.number",{values:{max:l(C)}})]),T(Vn,cr)},Qo=Vn=>{var cr=V(),as=M(cr);{var ls=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_overflow.add_${l(On)}`,{values:{max:l(C)}})]),T(wr,ur)},rl=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_overflow.select_${l(On)}`,{values:{max:l(C)}})]),T(wr,ur)};U(as,wr=>{l(G)?wr(ls):wr(rl,!1)},!0)}T(Vn,cr)};U(lr,Vn=>{l(g)==="number"?Vn(po):Vn(Qo,!1)})}T(Qe,St)};U(yr,Qe=>{l(Ce).rangeOverflow&&Qe(Hn)})}var Bt=D(yr,2);{var gi=Qe=>{var St=Be();q(()=>Z(St,l(v)[1])),T(Qe,St)};U(Bt,Qe=>{l(Ce).patternMismatch&&Qe(gi)})}var Wt=D(Bt,2);{var rn=Qe=>{var St=Be();q(On=>Z(St,On),[()=>s()(`validation.type_mismatch.${l(E)}`)]),T(Qe,St)};U(Wt,Qe=>{l(Ce).typeMismatch&&Qe(rn)})}T(nn,Pn)}})};U(jn,wt=>{l(Ce)?.valid===!1&&wt(sr)})}var Lr=D(jn,2),os=R(Lr);{var Mi=wt=>{var nn=sW(),In=R(nn);q(Pn=>Z(In,Pn),[()=>s()("unsupported_widget_x",{values:{name:l(g)}})]),T(wt,nn)},It=wt=>{var nn=V(),In=M(nn);{var Pn=Zt=>{var bn=V();const Un=w(()=>sg[l(g)]);var or=M(bn);yi(or,()=>l(Un),(ar,pi)=>{pi(ar,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)}})}),T(Zt,bn)},qt=Zt=>{var bn=uW();const Un=w(()=>sg[l(g)]);var or=M(bn);{var ar=rn=>{var Qe=oW(),St=R(Qe);pr(St,()=>c(l(N))),T(rn,Qe)};U(or,rn=>{l(N)&&rn(ar)})}var pi=D(or,2);{var Ms=rn=>{var Qe=aW(),St=R(Qe);q(()=>Z(St,l(O))),T(rn,Qe)};U(pi,rn=>{l(O)&&rn(Ms)})}var yr=D(pi,2);yi(yr,()=>l(Un),(rn,Qe)=>{Qe(rn,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)},get currentValue(){return i().currentValues[e.locale][e.keyPath]},set currentValue(St){Ct(nt,xe(i).currentValues[e.locale][e.keyPath]=St,xe(i))}})});var Hn=D(yr,2);{var Bt=rn=>{var Qe=lW(),St=R(Qe);q(()=>Z(St,l(L))),T(rn,Qe)};U(Hn,rn=>{l(L)&&rn(Bt)})}var gi=D(Hn,2);{var Wt=rn=>{var Qe=cW(),St=R(Qe);pr(St,()=>c(l(j))),T(rn,Qe)};U(gi,rn=>{l(j)&&rn(Wt)})}T(Zt,bn)};U(In,Zt=>{l(K)?Zt(Pn):Zt(qt,!1)},!0)}T(wt,nn)};U(os,wt=>{l(g)in sg?wt(It,!1):wt(Mi)})}var An=D(Lr,2);{var Kt=wt=>{var nn=fW();const In=w(o);var Pn=R(nn);{var qt=bn=>{var Un=dW(),or=R(Un);pr(or,()=>c(l(p))),T(bn,Un)};U(Pn,bn=>{l(p)&&bn(qt)})}var Zt=D(Pn,2);yi(Zt,()=>l(In),(bn,Un)=>{Un(bn,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)}})}),T(wt,nn)};U(An,wt=>{!l(Ve)&&(l(p)||o())&&wt(Kt)})}q(wt=>{ke(we,"aria-label",wt),ke(we,"data-widget",l(g)),ke(we,"data-key-path",e.keyPath),we.hidden=l(g)==="compute",Z(qe,l($e)),ht(Lr,"has-extra-labels",l(H))},[()=>s()("x_field",{values:{field:l($e)}})]),T(ye,we)};U(Ke,ye=>{i()&&l(ue)&&l(g)!=="hidden"&&ye(ge)})}T(t,pt),oe(),r()}function gW(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>i()?.collection),o=w(()=>i()?.collectionFile),a=w(()=>l(o)?.fields??l(s)?.fields??[]);var c=V(),u=M(c);dt(u,17,()=>l(a),d=>d.name,(d,f)=>{var h=V(),p=M(h);hr(p,()=>hn(0),null,g=>{_y(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),T(t,c),oe(),r()}var mW=F('<div role="document" class="svelte-t01vxl"></div>');const vW={hash:"svelte-t01vxl",code:"div.svelte-t01vxl {padding:8px 16px;}"};function bW(t,e){se(e,!0),Ee(t,vW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=w(()=>i()?.collection),a=w(()=>i()?.collectionFile),c=w(()=>l(a)?.fields??l(o)?.fields??[]);var u=mW();dt(u,21,()=>l(c),d=>d.name,(d,f)=>{var h=V(),p=M(h);hr(p,()=>hn(0),null,g=>{vy(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),q(d=>ke(u,"aria-label",d),[()=>s()("content_preview")]),T(t,u),oe(),r()}var _W=F('<div role="none" class="content svelte-1g8n4fi"><!></div>'),yW=F('<span role="alert"> </span> <!>',1),wW=F('<div role="none" class="wrapper svelte-1g8n4fi"><!></div>');const xW={hash:"svelte-1g8n4fi",code:'@charset "UTF-8";.wrapper.svelte-1g8n4fi {display:contents;}.wrapper.svelte-1g8n4fi > .group {display:contents;}.content.svelte-1g8n4fi {flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;}'};function PA(t,e){se(e,!0),Ee(t,xW);const[n,r]=me(),i=()=>z(Di,"$entryEditorSettings",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(nt,"$entryDraft",n),a=()=>z(le,"$_",n);let c=P(e,"thisPaneContentArea",15),u=P(e,"thatPaneContentArea",15);const d=w(()=>i()??{}),f=w(()=>l(d).syncScrolling),h=w(()=>s()?.locale),p=w(()=>s()?.mode),g=w(()=>!!l(h)&&!!Gr(o()?.currentValues[l(h)])),m=w(()=>({values:{locale:l(h)?Ts(l(h)):""}})),v=w(()=>l(p)==="preview"?bW:gW),_=()=>{window.requestAnimationFrame(()=>{if(!l(f)||!c()||!u())return;const{x:C,y:E}=c().getBoundingClientRect(),A=document.elementsFromPoint(C+80,E).find(H=>H.matches("[data-key-path]"));if(!A)return;const{keyPath:O}=A.dataset,{top:L,height:I}=A.getBoundingClientRect(),N=(E-L)/I,j=u().querySelector(`[data-key-path="${CSS.escape(O??"")}"]`);N<0||N>1||!j||u(u().scrollTop=j.offsetTop-E+j.clientHeight*N,!0)})},b={capture:!0,passive:!0};Ue(()=>{c()&&(c(c().scrollTop=0,!0),c().addEventListener("wheel",_,b),c().addEventListener("touchmove",_,b))});var y=wW(),x=R(y);{var k=C=>{var E=_W(),A=R(E);yi(A,()=>l(v),(O,L)=>{L(O,{get locale(){return l(h)}})}),Pt(E,O=>c(O),()=>c()),T(C,E)},S=C=>{var E=V(),A=M(E);{var O=L=>{$r(L,{children:(I,N)=>{var j=yW(),H=M(j),B=R(H),W=D(H,2);const G=w(()=>a()(l(g)?"reenable_x_locale":"enable_x_locale",l(m)));Je(W,{variant:"tertiary",get label(){return l(G)},onclick:()=>{l(h)&&aA(l(h))}}),q(K=>Z(B,K),[()=>a()(l(g)?"locale_x_now_disabled":"locale_x_has_been_disabled",l(m))]),T(I,j)},$$slots:{default:!0}})};U(A,L=>{l(p)==="edit"&&L(O)},!0)}T(C,E)};U(x,C=>{l(h)&&o()?.currentLocales[l(h)]?C(k):C(S,!1)})}q(()=>ke(y,"id",e.id)),T(t,y),oe(),r()}var kW=F('<div class="inner svelte-1ivrcdt"><!> <!></div>'),SW=F('<div class="outer svelte-1ivrcdt"><!></div>');const EW={hash:"svelte-1ivrcdt",code:`.outer.svelte-1ivrcdt {display:contents;}.outer.svelte-1ivrcdt .combobox.error [role="combobox"] {border-color:var(--sui-error-border-color);}.inner.svelte-1ivrcdt {display:contents;}.inner.svelte-1ivrcdt .error,
615
- .inner.svelte-1ivrcdt .error button {color:var(--sui-error-foreground-color) !important;}`};function TW(t,e){se(e,!0),Ee(t,EW);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(d(),"$thatPane",n),a=()=>z(le,"$_",n),c=()=>z(e.thisPane,"$thisPane",n),u=()=>z(Di,"$entryEditorSettings",n);let d=P(e,"thatPane",19,()=>st(null));const f=w(()=>i()?.editor?.preview??!0),h=w(()=>s()?.collection),p=w(()=>s()?.collectionFile),g=w(()=>(l(p)??l(h))?._i18n??$i),m=w(()=>l(g).allLocales),v=w(()=>l(m).filter(N=>!(o()?.mode==="edit"&&o().locale===N))),_=w(()=>Object.entries(s()?.validities??{}).some(([N,j])=>l(v).includes(N)&&Object.values(j??{}).some(({valid:H})=>!H))),b=w(()=>(l(p)??l(h))?.editor?.preview??l(f)),y=w(()=>l(m).length>=5),x=w(()=>l(y)?du:Cf),k=w(()=>l(y)?gr:ou),S=w(()=>l(y)?void 0:"tertiary"),C=w(()=>l(y)?void 0:"small");var E=SW(),A=R(E);const O=w(()=>l(_)?"error":void 0),L=w(()=>a()("switch_locale")),I=w(()=>e.id.replace("-header","-body"));yi(A,()=>l(x),(N,j)=>{j(N,{get class(){return l(O)},get"aria-label"(){return l(L)},get"aria-controls"(){return l(I)},children:(H,B)=>{var W=kW(),G=R(W);dt(G,17,()=>l(v),Xn,(J,Y)=>{var te=V();const ce=w(()=>Ts(l(Y))),he=w(()=>!s()?.currentLocales[l(Y)]),re=w(()=>Object.values(s()?.validities[l(Y)]??{}).some(({valid:_e})=>!_e));var X=M(te);const fe=w(()=>l(ce)),be=w(()=>l(he)?a()("locale_content_disabled_short"):l(re)?a()("locale_content_error_short"):""),ue=w(()=>c()?.mode==="edit"&&c().locale===l(Y)),Te=w(()=>l(re)?"error":"");yi(X,()=>l(k),(_e,Ae)=>{Ae(_e,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get"aria-label"(){return`${l(fe)??""} ${l(be)??""}`},get selected(){return l(ue)},get class(){return l(Te)},onSelect:()=>{ot(e.thisPane,{mode:"edit",locale:l(Y)}),o()?.mode==="preview"&&ot(d(),{mode:"preview",locale:l(Y)})},startIcon:$e=>{var Ve=V(),We=M(Ve);{var pt=ge=>{et(ge,{name:"edit_off"})},Ke=ge=>{var ye=V(),we=M(ye);{var Se=Ie=>{et(Ie,{name:"error"})};U(we,Ie=>{l(re)&&Ie(Se)},!0)}T(ge,ye)};U(We,ge=>{l(he)?ge(pt):ge(Ke,!1)})}T($e,Ve)},$$slots:{startIcon:!0}})}),T(J,te)});var K=D(G,2);{var ee=J=>{var Y=V(),te=M(Y);const ce=w(()=>a()("preview")),he=w(()=>c()?.mode==="preview");yi(te,()=>l(k),(re,X)=>{X(re,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get selected(){return l(he)},onSelect:()=>{ot(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})}),T(J,Y)};U(K,J=>{o()?.mode==="edit"&&l(b)&&u()?.showPreview&&J(ee)})}T(H,W)},$$slots:{default:!0}})}),T(t,E),oe(),r()}var CW=F('<h3 role="none"> </h3>'),AW=F("<!> <!>",1),PW=F("<!> <!> <!>",1),OW=F("<!> <!> <!> <!>",1),$W=F("<!> <!>",1),LW=F("<!> <!> <!>",1),NW=F('<div role="none" class="header svelte-2uraod"><!></div>');const IW={hash:"svelte-2uraod",code:'.header.svelte-2uraod {flex:none !important;}.header.svelte-2uraod > [role="toolbar"] {margin-right:auto;margin-left:auto;max-width:800px;}.header.svelte-2uraod > [role="toolbar"] h3 {margin:0 8px;font-size:var(--sui-font-size-default);}'};function OA(t,e){se(e,!0),Ee(t,IW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(Nn,"$backend",n);let u=P(e,"thatPane",19,()=>st(null));const d=w(()=>i()?.collection),f=w(()=>i()?.collectionFile),h=w(()=>i()?.originalEntry),p=w(()=>i()?.originalValues??{}),g=w(()=>(l(f)??l(d))?._i18n??$i),m=w(()=>l(g).i18nEnabled),v=w(()=>l(g).saveAllLocales),_=w(()=>l(g).allLocales),b=w(()=>l(g).defaultLocale),y=w(()=>i()?.currentLocales[s()?.locale??""]),x=w(()=>Object.values(i()?.currentLocales??{}).filter(I=>I).length===1),k=w(()=>l(m)?l(_).filter(I=>I!==s()?.locale):[]),S=w(()=>!!l(k).length),C=w(()=>s()?.locale&&!Mn(Gr(i()?.currentValues[s().locale]),l(p)[s().locale])),E=w(()=>l(d)&&l(h)&&s()?.locale?HT(l(h),s().locale,l(d),l(f)):void 0);var A=NW(),O=R(A);const L=w(()=>o()("secondary"));Zs(O,{variant:"secondary",get"aria-label"(){return l(L)},children:(I,N)=>{var j=LW(),H=M(j);{var B=J=>{TW(J,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return u()}})},W=J=>{var Y=CW(),te=R(Y);q(ce=>Z(te,ce),[()=>s()?.mode==="preview"?o()("preview"):o()("edit")]),T(J,Y)};U(H,J=>{l(m)?J(B):J(W,!1)})}var G=D(H,2);Yr(G,{flex:!0});var K=D(G,2);{var ee=J=>{var Y=$W();const te=w(()=>Ts(s().locale));var ce=M(Y);{var he=fe=>{AA(fe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(ce,fe=>{l(S)&&fe(he)})}var re=D(ce,2);const X=w(()=>o()("show_content_options_x_locale",{values:{locale:l(te)}}));Er(re,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(X)},popup:be=>{const ue=w(()=>o()("content_options_x_locale",{values:{locale:l(te)}}));mr(be,{get"aria-label"(){return l(ue)},children:(Te,_e)=>{var Ae=OW(),Ce=M(Ae);{var $e=Se=>{by(Se,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(Ce,Se=>{l(S)&&s()?.locale&&Se($e)})}var Ve=D(Ce,2);const We=w(()=>o()("revert_changes")),pt=w(()=>!l(C));Lt(Ve,{get label(){return l(We)},get disabled(){return l(pt)},onclick:()=>{py(s()?.locale)}});var Ke=D(Ve,2);{var ge=Se=>{var Ie=AW(),ve=M(Ie);Tr(ve,{});var Pe=D(ve,2);const qe=w(()=>o()(l(y)?"disable_x_locale":Gr(i()?.currentValues[s().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(te)}})),Xe=w(()=>s().locale===l(b)||l(y)&&l(x));Lt(Pe,{get label(){return l(qe)},get disabled(){return l(Xe)},onclick:()=>{aA(s()?.locale??"")}}),T(Se,Ie)};U(Ke,Se=>{!l(v)&&s()?.locale&&Se(ge)})}var ye=D(Ke,2);{var we=Se=>{var Ie=PW(),ve=M(Ie);Tr(ve,{});var Pe=D(ve,2);{var qe=Ye=>{const rt=w(()=>o()("view_on_live_site"));Lt(Ye,{get label(){return l(rt)},onclick:()=>{window.open(l(E))}})};U(Pe,Ye=>{l(E)&&Ye(qe)})}var Xe=D(Pe,2);{var ct=Ye=>{const rt=w(()=>!c()?.repository?.blobBaseURL),ft=w(()=>o()("view_on_x",{values:{service:c()?.repository?.label},default:o()("view_in_repository")}));Lt(Ye,{get disabled(){return l(rt)},get label(){return l(ft)},onclick:()=>{l(h)&&s()&&window.open(IB(l(h),s().locale))}})};U(Xe,Ye=>{a().devModeEnabled&&Ye(ct)})}T(Se,Ie)};U(ye,Se=>{l(h)&&(l(E)||a().devModeEnabled)&&Se(we)})}T(Te,Ae)},$$slots:{default:!0}})},$$slots:{popup:!0}}),T(J,Y)};U(K,J=>{s()?.mode==="edit"&&J(ee)})}T(I,j)},$$slots:{default:!0}}),q(()=>ke(A,"id",e.id)),T(t,A),oe(),r()}var RW=F('<div role="none" class="svelte-ypyuow"><h3 class="svelte-ypyuow"> </h3></div>'),DW=F('<section class="svelte-ypyuow"><!> <div role="none" class="svelte-ypyuow"><!> <p class="error svelte-ypyuow"><!> <!></p></div></section>'),MW=F('<!> <div role="none" class="locales svelte-ypyuow"></div>',1);const FW={hash:"svelte-ypyuow",code:"p.svelte-ypyuow:not(:empty) {margin-top:0;}.locales.svelte-ypyuow {display:table;margin:16px 0 0;width:100%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) {display:table-row;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow):last-child {width:90%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) h3:where(.svelte-ypyuow) {margin-right:8px;font-size:inherit;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) p.error:where(.svelte-ypyuow) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function zW(t,e){se(e,!0),Ee(t,FW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n);let o=P(e,"open",15,!1);const a=w(()=>i()?.collectionName??""),c=w(()=>i()?.currentSlugs??{});let u=ae(ie([]));const d=ie({}),f=ie({}),h=Wn("short"),p=()=>{$(u,ie(ns(l(a)).map(_=>Object.values(_.locales).map(({slug:b})=>b)).flat(1).filter(_=>!Object.values(l(c)).includes(_)))),Object.assign(d,l(c)),Object.assign(f,Object.fromEntries(Object.keys(l(c)).map(_=>[_,!1])))};Ue(()=>{o()&&p()});const g=w(()=>s()("edit_slug")),m=w(()=>s()("update")),v=w(()=>Mn(l(c),d)||Object.values(f).some(_=>_!==!1));Ui(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{Ct(nt,xe(i).currentSlugs=d,xe(i))},get open(){return o()},set open(_){o(_)},children:(_,b)=>{var y=MW(),x=M(y);Bn(x,{status:"warning",children:(S,C)=>{var E=Be();q(A=>Z(E,A),[()=>s()("edit_slug_warning")]),T(S,E)},$$slots:{default:!0}});var k=D(x,2);dt(k,21,()=>Object.keys(d),Xn,(S,C)=>{var E=DW(),A=R(E);{var O=K=>{var ee=RW(),J=R(ee),Y=R(J);q(te=>Z(Y,te),[()=>Ts(l(C))]),T(K,ee)};U(A,K=>{["_","_default"].includes(l(C))||K(O)})}var L=D(A,2),I=R(L);const N=w(()=>f[l(C)]!==!1);yn(I,{flex:!0,oninput:()=>{f[l(C)]=d[l(C)].trim()?l(u).includes(d[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(N)},get"aria-errormessage"(){return`${h??""}-${l(C)??""}-error`},get value(){return d[l(C)]},set value(K){d[l(C)]=K}});var j=D(I,2),H=R(j);{var B=K=>{var ee=Be();q(J=>Z(ee,J),[()=>s()("edit_slug_error.empty")]),T(K,ee)};U(H,K=>{f[l(C)]==="empty"&&K(B)})}var W=D(H,2);{var G=K=>{var ee=Be();q(J=>Z(ee,J),[()=>s()("edit_slug_error.duplicate")]),T(K,ee)};U(W,K=>{f[l(C)]==="duplicate"&&K(G)})}q(()=>ke(j,"id",`${h??""}-${l(C)??""}-error`)),T(S,E)}),T(_,y)},$$slots:{default:!0}}),oe(),r()}const $A=async(t,e)=>{const{_i18n:{defaultLocale:n},_thumbnailFieldNames:r}=t,{locales:i}=e,{content:s}=i[n]??Object.values(i)[0]??{};if(!s)return;const o=r.map(a=>{if(a.includes("*")){const c=new RegExp(`^${cn(a).replace("\\*",".+")}$`);return Object.keys(s).filter(u=>c.test(u))}return a}).flat(1);for(const a of o){const c=s[a]?await Lc(s[a],e,{thumbnail:!0}):void 0;if(c)return c}},LA=({entry:t,collectionName:e,relative:n=!1})=>{const{locales:r}=t,i=Ri(e),s=Object.values(r).map(({content:o})=>Object.entries(o).map(([a,c])=>{if(typeof c=="string"&&(!n||!/^[/@]/.test(c))&&["image","file"].includes(vn({collectionName:e,keyPath:a})?.widget??"string")){const u=I_(c,{entry:t,collection:i});if(u&&N_(u).some(d=>d.name===e))return u}})).flat(1).filter((o,a,c)=>!!o&&c.indexOf(o)===a);if(n&&i?._assetFolder?.entryRelative){const o=$n(Object.values(t.locales)[0].path).dirname;ne(tn).forEach(a=>{$n(a.path).dirname===o&&!s.find(({path:c})=>c===a.path)&&s.push(a)})}return s};var jW=F("<!> <!>",1),UW=F("<!> <!> <!> <!> <!>",1),BW=F('<!> <h2 role="none"><strong role="none"><!></strong></h2> <!> <!> <!> <!> <!>',1),qW=F('<div class="error svelte-1432d6m"> </div>'),HW=F(" <!>",1),VW=F("<!> <!> <!> <!> <!> <!>",1);const WW={hash:"svelte-1432d6m",code:".error.svelte-1432d6m {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 GW(t,e){se(e,!0),Ee(t,WW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(Is,"$backendName",n),a=()=>z(xC,"$entryDraftModified",n),c=()=>z(Tt,"$prefs",n),u=()=>z(le,"$_",n),d=()=>z(Di,"$entryEditorSettings",n),f=()=>z(ey,"$copyFromLocaleToast",n);let h=P(e,"disabled",3,!1),p=ae(!1),g=ae(!1),m=ae(!1),v=ae(!1),_=ae(""),b=ae(!1),y=ae(void 0);const x=w(()=>i()?.isNew??!0),k=w(()=>i()?.collection),S=w(()=>i()?.collectionFile),C=w(()=>i()?.originalEntry),E=w(()=>s()?.editor?.preview??!0),A=w(()=>s()?.backend.automatic_deployments),O=w(()=>o()!=="local"&&typeof l(A)=="boolean"),L=w(()=>(l(S)??l(k))?._i18n??$i),I=w(()=>l(L).defaultLocale),N=w(()=>l(k)?.name),j=w(()=>l(k)?.label||l(N)),H=w(()=>l(k)?.label_singular||l(j)),B=w(()=>(l(S)??l(k))?.editor?.preview??l(E)),W=w(()=>l(x)||a()),G=w(()=>Object.values(i()?.validities??{}).map(Ae=>Object.values(Ae).map(({valid:Ce})=>!Ce)).flat(1).filter(Boolean).length),K=w(()=>l(N)&&l(C)&&l(k)?._assetFolder?.entryRelative?LA({entry:l(C),collectionName:l(N),relative:!0}):[]),ee=w(()=>l(k)&&l(C)?HT(l(C),l(I),l(k),l(S)):void 0),J=async({skipCI:Ae=void 0}={})=>{if($(b,!0),!!l(k))try{const Ce=await b5({skipCI:Ae});c()?.closeOnSave??!0?(Dc(`/collections/${l(N)}`),ot(nt,null)):(l(x)&&zn(`/collections/${l(N)}/entries/${Ce.subPath}`,{replaceState:!0,notifyChange:!1}),Nd({collection:l(k),collectionFile:l(S),originalEntry:Ce,expanderStates:i()?.expanderStates}))}catch(Ce){Ce.message==="validation_failed"?$(p,!0):Ce.message==="saving_failed"?($(v,!0),$(_,ie(Ce.cause?.message??Ce.message??u()("unexpected_error")))):($(v,!0),$(_,""),console.error(Ce))}finally{$(b,!1)}};var Y=VW(),te=M(Y);const ce=w(()=>u()("primary"));Zs(te,{variant:"primary",get"aria-label"(){return l(ce)},children:(Ae,Ce)=>{var $e=BW(),Ve=M($e);const We=w(()=>u()("cancel_editing"));Je(Ve,{variant:"ghost",iconic:!0,get"aria-label"(){return l(We)},keyShortcuts:"Escape",onclick:()=>{Dc(`/collections/${l(N)}`)},startIcon:bt=>{et(bt,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var pt=D(Ve,2),Ke=R(pt),ge=R(Ke);{var ye=ut=>{var bt=Be();q(At=>Z(bt,At),[()=>u()("creating_x",{values:{name:l(H)}})]),T(ut,bt)},we=ut=>{var bt=Be();q(At=>Z(bt,At),[()=>u()("editing_x_in_x",{values:{collection:l(j),entry:l(S)?l(S).label||l(S).name:l(k)&&l(C)?Vo(l(k),l(C)):""}})]),T(ut,bt)};U(ge,ut=>{l(x)?ut(ye):ut(we,!1)})}var Se=D(pt,2);Yr(Se,{flex:!0});var Ie=D(Se,2);{var ve=ut=>{const bt=w(()=>u()("view_on_live_site"));Je(ut,{variant:"tertiary",get label(){return l(bt)},onclick:()=>{window.open(l(ee))}})};U(Ie,ut=>{!h()&&l(ee)&&ut(ve)})}var Pe=D(Ie,2);{var qe=ut=>{var bt=jW(),At=M(bt);const an=w(()=>u()("duplicate")),jn=w(()=>u()("duplicate_entry")),sr=w(()=>l(k)?.create===!1);Je(At,{variant:"ghost",get label(){return l(an)},get"aria-label"(){return l(jn)},get disabled(){return l(sr)},onclick:()=>{zn(`/collections/${l(N)}/new`,{replaceState:!0,notifyChange:!1}),r5()}});var Lr=D(At,2);const os=w(()=>u()("delete")),Mi=w(()=>u()("delete_entry")),It=w(()=>l(k)?.delete===!1);Je(Lr,{variant:"ghost",get label(){return l(os)},get"aria-label"(){return l(Mi)},get disabled(){return l(It)},onclick:()=>{$(m,!0)}}),T(ut,bt)};U(Pe,ut=>{!h()&&!l(S)&&!l(x)&&ut(qe)})}var Xe=D(Pe,2);const ct=w(()=>u()("show_editor_options"));Pt(Er(Xe,{get disabled(){return h()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ct)},popup:bt=>{const At=w(()=>u()("editor_options"));mr(bt,{get"aria-label"(){return l(At)},children:(an,jn)=>{var sr=UW(),Lr=M(sr);const os=w(()=>u()("show_preview")),Mi=w(()=>d()?.showPreview),It=w(()=>!l(B));Pf(Lr,{get label(){return l(os)},get checked(){return l(Mi)},get disabled(){return l(It)},onChange:()=>{Di.update((ar={})=>({...ar,showPreview:!ar.showPreview}))}});var An=D(Lr,2);const Kt=w(()=>u()("sync_scrolling")),wt=w(()=>d()?.syncScrolling),nn=w(()=>!l(B)&&Object.keys(i()?.currentValues??{}).length===1);Pf(An,{get label(){return l(Kt)},get checked(){return l(wt)},get disabled(){return l(nn)},onChange:()=>{Di.update((ar={})=>({...ar,syncScrolling:!ar.syncScrolling}))}});var In=D(An,2);Tr(In,{});var Pn=D(In,2);const qt=w(()=>u()("edit_slug")),Zt=w(()=>!!l(S)||l(x)||l(k)?.delete===!1);Lt(Pn,{get label(){return l(qt)},get disabled(){return l(Zt)},onclick:()=>{$(g,!0)}});var bn=D(Pn,2);const Un=w(()=>u()("revert_all_changes")),or=w(()=>!l(W));Lt(bn,{get label(){return l(Un)},get disabled(){return l(or)},onclick:()=>{py()}}),T(an,sr)},$$slots:{default:!0}})},$$slots:{popup:!0}}),bt=>$(y,ie(bt)),()=>l(y));var Ye=D(Xe,2);{var rt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),At=w(()=>h()||!l(W)||l(b));eL(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(At)},keyShortcuts:"Accel+S",onclick:()=>{J()},popup:jn=>{mr(jn,{children:(sr,Lr)=>{const os=w(()=>u()(l(A)?"save_without_publishing":"save_and_publish"));Lt(sr,{get label(){return l(os)},onclick:()=>{J({skipCI:l(A)})}})},$$slots:{default:!0}})},$$slots:{popup:!0}})},ft=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),At=w(()=>h()||!l(W)||l(b));Je(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(At)},keyShortcuts:"Accel+S",onclick:()=>{J()}})};U(Ye,ut=>{l(O)?ut(rt):ut(ft,!1)})}T(Ae,$e)},$$slots:{default:!0}});var he=D(te,2);Gn(he,{get show(){return l(p)},set show(Ae){$(p,ie(Ae))},children:(Ae,Ce)=>{Bn(Ae,{status:"error",children:($e,Ve)=>{var We=Be();q(pt=>Z(We,pt),[()=>u()(l(G)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(G)}})]),T($e,We)},$$slots:{default:!0}})},$$slots:{default:!0}});var re=D(he,2);Gn(re,{get id(){return f().id},get show(){return f().show},set show(Ae){Ct(ey,xe(f).show=Ae,xe(f))},children:(Ae,Ce)=>{const $e=w(()=>{const{status:Ve,message:We,count:pt,sourceLocale:Ke}=f();return{status:Ve,message:We,count:pt,sourceLocale:Ke}});Bn(Ae,{get status(){return l($e).status},children:(Ve,We)=>{var pt=Be();q(Ke=>Z(pt,Ke),[()=>u()(`editor.${l($e).message}`,{values:{count:l($e).count,source:l($e).sourceLocale?Ts(l($e).sourceLocale):""}})]),T(Ve,pt)},$$slots:{default:!0}})},$$slots:{default:!0}});var X=D(re,2);zW(X,{get open(){return l(g)},set open(Ae){$(g,ie(Ae))}});var fe=D(X,2);const be=w(()=>u()("delete_entry")),ue=w(()=>u()("delete"));kl(fe,{get title(){return l(be)},get okLabel(){return l(ue)},onOk:async()=>{l(C)&&await PC([l(C).id],l(K).map(({path:Ae})=>Ae)),Dc(`/collections/${l(N)}`)},onClose:()=>{l(y).focus()},get open(){return l(m)},set open(Ae){$(m,ie(Ae))},children:(Ae,Ce)=>{var $e=Be();q(Ve=>Z($e,Ve),[()=>u()(l(K).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),T(Ae,$e)},$$slots:{default:!0}});var Te=D(fe,2);const _e=w(()=>u()("saving_entry.error.title"));kx(Te,{get title(){return l(_e)},onClose:()=>{l(y).focus()},get open(){return l(v)},set open(Ae){$(v,ie(Ae))},children:(Ae,Ce)=>{var $e=HW(),Ve=M($e),We=D(Ve);{var pt=Ke=>{var ge=qW(),ye=R(ge);q(()=>Z(ye,l(_))),T(Ke,ge)};U(We,Ke=>{l(_)&&Ke(pt)})}q(Ke=>Z(Ve,`${Ke??""} `),[()=>u()("saving_entry.error.description")]),T(Ae,$e)},$$slots:{default:!0}}),T(t,Y),oe(),r()}var KW=F('<div role="none"><!></div> <div role="none"><!></div>',1),YW=F("<!> <!>",1),JW=F("<!> <!>",1),ZW=F("<!> <!>",1),XW=F('<div role="none" class="cols svelte-1pb3yei"><!></div>'),QW=F("<!> <!>",1),e7=F('<div role="none" class="wrapper svelte-1pb3yei"><!></div> <!> <!>',1);const t7={hash:"svelte-1pb3yei",code:'.wrapper.svelte-1pb3yei {display:contents;}.wrapper[hidden].svelte-1pb3yei {display:none;}.wrapper.svelte-1pb3yei > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1pb3yei > .sui.group {filter:opacity(0);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="edit"] {flex:1 1;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="preview"] {flex:2 1;}'};function n7(t,e){se(e,!0),Ee(t,t7);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(Di,"$entryEditorSettings",n),a=()=>z(Za,"$editorLeftPane",n),c=()=>z(Yo,"$editorRightPane",n),u=()=>z(Ja,"$showContentOverlay",n),d=()=>z(le,"$_",n),f=()=>z(Q_,"$showDuplicateToast",n);let h,p=!1,g=ae(!1),m=ae(!0),v=ae(void 0),_=ae(void 0),b=ae(void 0);const y=w(()=>i()?.editor?.preview??!0),x=w(()=>s()?.isNew??!0),k=w(()=>s()?.collection),S=w(()=>s()?.collectionFile),C=w(()=>s()?.originalEntry),E=w(()=>l(C)?.id??[l(k)?.name??"-",l(S)?.name??"-"].join("/")),A=w(()=>o()??{}),O=w(()=>l(A).showPreview),L=w(()=>(l(S)??l(k))?._i18n??$i),I=w(()=>l(L).i18nEnabled),N=w(()=>l(L).allLocales),j=w(()=>l(L).defaultLocale),H=w(()=>(l(S)??l(k))?.editor?.preview??l(y)),B=w(()=>l(S)?.name?[l(k)?.name,l(S).name].join("|"):l(k)?.name),W=w(()=>l(k)?.create??!1),G=w(()=>l(k)?.limit??1/0),K=w(()=>l(x)&&(!l(W)||ns(l(k)?.name??"").length>=l(G))),ee=async()=>{const[ue,Te]=o()?.paneStates?.[l(B)??""]??[];return p||!ue||!Te||ue.locale&&!l(N).includes(ue.locale)||Te.locale&&!l(N).includes(Te.locale)||(!l(O)||!l(H))&&(ue.mode==="preview"||Te.mode==="preview")?!1:(p=!0,await pl(),ot(Za,ue),ot(Yo,Te),await pl(),p=!1,!0)},J=async()=>{if(s()&&!await ee())if(ot(Za,{mode:"edit",locale:a()?.locale??l(j)}),!l(O)||!l(H)){const ue=l(I)?l(N).filter(Te=>Te!==a()?.locale):[];ot(Yo,ue.length?{mode:"edit",locale:ue[0]}:null)}else ot(Yo,{mode:"preview",locale:a().locale})},Y=()=>{!l(k)||p||!a()||!c()||!l(B)||Di.update((ue={})=>({...ue,paneStates:{...ue.paneStates??{},[l(B)]:[a(),c()]}}))},te=async()=>{await pl(),h&&(h.tabIndex=0,h.focus())};ln(()=>{h=l(v)?.querySelector('[role="group"]'),h.addEventListener("transitionend",()=>{u()||($(g,!1),$(m,!0),ot(nt,null))})}),Ue(()=>{l(B)&&(ot(Za,null),ot(Yo,null))}),Ue(()=>{l(O),l(H),J()}),Ue(()=>{a(),c(),Y()}),Ue(()=>{l(v)&&(u()?l(m)&&($(g,!1),$(m,!1),J(),te(),a5()):($(g,!0),o5()))});var ce=e7(),he=M(ce),re=R(he);const X=w(()=>d()("content_editor"));_r(re,{class:"content-editor",get"aria-label"(){return l(X)},children:(ue,Te)=>{var _e=V(),Ae=M(_e);ms(Ae,()=>l(E),Ce=>{var $e=QW(),Ve=M($e);GW(Ve,{get disabled(){return l(K)}});var We=D(Ve,2);{var pt=ge=>{$r(ge,{children:(ye,we)=>{var Se=KW(),Ie=M(Se),ve=R(Ie);{var Pe=Ye=>{var rt=Be();q(ft=>Z(rt,ft),[()=>d()("creating_entries_disabled_by_admin")]),T(Ye,rt)},qe=Ye=>{var rt=Be();q(ft=>Z(rt,ft),[()=>d()("creating_entries_disabled_by_limit",{values:{limit:l(G)}})]),T(Ye,rt)};U(ve,Ye=>{l(W)?Ye(qe,!1):Ye(Pe)})}var Xe=D(Ie,2),ct=R(Xe);Je(ct,{variant:"primary",onclick:()=>{zn(`/collection/${l(k)?.name}`,{replaceState:!0})},children:(Ye,rt)=>{var ft=Be();q(ut=>Z(ft,ut),[()=>d()("back_to_collection")]),T(Ye,ft)},$$slots:{default:!0}}),T(ye,Se)},$$slots:{default:!0}})},Ke=ge=>{var ye=XW(),we=R(ye);{var Se=Ie=>{var ve=ZW(),Pe=M(ve);{var qe=Ye=>{const rt=w(()=>{const{locale:ut,mode:bt}=a();return{locale:ut,mode:bt}}),ft=w(()=>d()(l(rt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Ts(l(rt).locale)}}));_r(Ye,{class:"pane",get"aria-label"(){return l(ft)},get"data-locale"(){return l(rt).locale},get"data-mode"(){return l(rt).mode},children:(ut,bt)=>{var At=YW(),an=M(At);OA(an,{id:"left-pane-header",thisPane:Za,thatPane:Yo});var jn=D(an,2);PA(jn,{id:"left-pane-body",thisPane:Za,get thatPaneContentArea(){return l(b)},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(sr){$(_,ie(sr))}}),T(ut,At)},$$slots:{default:!0}})};U(Pe,Ye=>{a()&&Ye(qe)})}var Xe=D(Pe,2);{var ct=Ye=>{const rt=w(()=>{const{locale:ut,mode:bt}=c();return{locale:ut,mode:bt}}),ft=w(()=>d()(l(rt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Ts(l(rt).locale)}}));_r(Ye,{get"aria-label"(){return l(ft)},get"data-locale"(){return l(rt).locale},get"data-mode"(){return l(rt).mode},children:(ut,bt)=>{var At=JW(),an=M(At);OA(an,{id:"right-pane-header",thisPane:Yo,thatPane:Za});var jn=D(an,2);PA(jn,{id:"right-pane-body",thisPane:Yo,get thatPaneContentArea(){return l(_)},get thisPaneContentArea(){return l(b)},set thisPaneContentArea(sr){$(b,ie(sr))}}),T(ut,At)},$$slots:{default:!0}})};U(Xe,Ye=>{c()&&Ye(ct)})}T(Ie,ve)};U(we,Ie=>{l(k)&&Ie(Se)})}T(ge,ye)};U(We,ge=>{l(K)?ge(pt):ge(Ke,!1)})}T(Ce,$e)}),T(ue,_e)},$$slots:{default:!0}}),Pt(he,ue=>$(v,ue),()=>l(v));var fe=D(he,2);XH(fe,{});var be=D(fe,2);Gn(be,{get show(){return Ew(),f()},set show(ue){ot(Q_,ue)},children:(ue,Te)=>{Bn(ue,{status:"success",children:(_e,Ae)=>{var Ce=Be();q($e=>Z(Ce,$e),[()=>d()("entry_duplicated")]),T(_e,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),q(()=>{he.hidden=l(m),he.inert=!u(),ht(he,"hiding",l(g))}),T(t,ce),oe(),r()}const r7=["title","name","date","author","description"],hi=st({type:"list"}),NA=t=>t.replace(/[_*`]+/g,""),i7=(t,e,{key:n,order:r}={})=>{const i=[...t],{name:s,_i18n:{defaultLocale:o}}=e;if(n===void 0){const f={useTemplate:!0,allowMarkdown:!0};return i.sort((h,p)=>Vo(e,h,f).localeCompare(Vo(e,p,f)))}const a={slug:String,commit_author:String,commit_date:Date}[n]||(i.length?Oc({entry:i[0],locale:o,collectionName:s,key:n})?.constructor:String)||String,c=Object.fromEntries(i.map(f=>[f.slug,Oc({entry:f,locale:o,collectionName:s,key:n})])),u=vn({collectionName:s,keyPath:n}),d=u?.widget==="datetime"?u:void 0;return i.sort((f,h)=>{const p=c[f.slug],g=c[h.slug];if(p===void 0||g===void 0)return 0;if(d){const m=Pc(p,d),v=Pc(g,d);if(m&&v)return Number(m)-Number(v)}return a===String?oi(NA(p),NA(g)):a===Date?Number(p)-Number(g):p-g}),r==="descending"&&i.reverse(),i},s7=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:s}}=e,o=n.filter(({field:a,pattern:c})=>a!==void 0&&c!==void 0&&i.some(u=>u.field===a&&u.pattern===c));return t.filter(a=>o.every(({field:c,pattern:u})=>{const d={entry:a,locale:s,collectionName:r,key:c},f=Oc({...d,resolveRef:!1}),h=Oc({...d}),p=typeof u=="string"?new RegExp(u):void 0;return f===void 0||h===void 0?!1:p?p.test(String(f))||p.test(String(h)):f===u||h===u}))},o7=(t,e,{field:n,pattern:r}={field:"",pattern:void 0})=>{if(!n)return t.length?[{name:"*",entries:t}]:[];const{name:i,_i18n:{defaultLocale:s}}=e,o=ne(hi).sort,a=typeof r=="string"?new RegExp(r):void 0,c={},u=ne(le)("other");t.forEach(f=>{const h=Oc({entry:f,locale:s,collectionName:i,key:n});if(h===void 0)return;const p=a?String(h).match(a)?.[0]??u:String(h);p in c||(c[p]=[]),c[p].push(f)});const d=Object.entries(c).map(([f,h])=>({name:f,entries:h})).sort(({name:f},{name:h})=>oi(f,h));return o?.key===n&&o.order==="descending"&&d.reverse(),d},zc=st(),a7=t=>{const{name:e,identifier_field:n,sortable_fields:r}=t;let i=[],s,o;if(r){if(Array.isArray(r)&&(i=r),Jn(r)){const a=r;Array.isArray(a.fields)&&(i=a.fields),a.default&&Jn(a.default)&&(s=a.default.field,o=["descending","Descending"].includes(a.default.direction??"")?"descending":"ascending")}}else i=[...r7],n&&(i.unshift(n),s=n);return i=tc(i).filter(a=>!!vn({collectionName:e,keyPath:a})),{fields:i,default:{key:s??i[0],order:o??"ascending"}}},l7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(le)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const s=i.slice(0,r+1).join(".");return vn({collectionName:t.name,keyPath:s})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,c7=Qn([qn,ri,Ln],([t,e],n)=>{if(!t?.folder){n([]);return}const r=t,{fields:i,default:s}=a7(r),o=ne(zc)?.[r.name]??{type:"list"};o.sort??=s,e.every(a=>!!a.commitAuthor)&&!i.includes("author")&&i.push("commit_author"),e.every(a=>!!a.commitDate)&&!i.includes("date")&&i.push("commit_date"),n(i.map(a=>({key:a,label:l7(r,a)}))),Mn(o,ne(hi))||hi.set(o)}),Xo=Qn([ri,qn],([t,e],n)=>{n(t&&e?ns(e.name):[])}),yy=Qn([Xo,hi],([t,e],n)=>{const r=ne(qn);let i=[...t];if(!i.length||Wo(r,i[0]).length)n([]);else{i=i7(i,r,e.sort),e.filters&&(i=s7(i,r,e.filters));const s=o7(i,r,e.group);Mn(ne(yy),s)||n(s)}}),u7=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new Fo(e,"ui-settings"):null,r="contents-view";zc.set(await n?.get(r)??{}),zc.subscribe(i=>{(async()=>{try{Mn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),hi.subscribe(i=>{const{name:s}=ne(qn)??{},o=ne(zc)?.[s??""]??{};s&&!Mn(i,o)&&zc.update(a=>({...a,[s]:i}))})};Nn.subscribe(t=>{t&&!ne(zc)&&u7(t)}),Xo.subscribe(t=>{$c.set([]),ne(Tt).devModeEnabled&&console.info("listedEntries",t)}),qn.subscribe(t=>{t&&ne(Tt).devModeEnabled&&console.info("selectedCollection",t)});var d7=F('<span role="none"><!></span>'),f7=F("<!> <!> <!>",1);function h7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Xo,"$listedEntries",n),s=()=>z($c,"$selectedEntries",n),o=c=>{$c.update(u=>{const d=u.indexOf(e.entry);return c&&d===-1&&u.push(e.entry),!c&&d>-1&&u.splice(d,1),u})},a=w(()=>i().indexOf(e.entry));lu(t,{get"aria-rowindex"(){return l(a)},onChange:c=>{o(c.detail.selected)},onclick:()=>{zn(`/collections/${e.collection.name}/entries/${e.entry.subPath}`)},children:(c,u)=>{var d=f7(),f=M(d);ai(f,{class:"checkbox",children:(m,v)=>{const _=w(()=>s().includes(e.entry));au(m,{role:"none",tabindex:"-1",get checked(){return l(_)},onChange:({detail:{checked:b}})=>{o(b)}})},$$slots:{default:!0}});var h=D(f,2);{var p=m=>{ai(m,{class:"image",children:(v,_)=>{var b=V(),y=M(b);hr(y,()=>$A(e.collection,e.entry),null,(x,k)=>{var S=V(),C=M(S);{var E=A=>{const O=w(()=>e.viewType==="list"?"icon":"tile");dy(A,{get src(){return l(k)},get variant(){return l(O)},cover:!0})};U(C,A=>{l(k)&&A(E)})}T(x,S)}),T(v,b)},$$slots:{default:!0}})};U(h,m=>{e.collection._thumbnailFieldNames.length&&m(p)})}var g=D(h,2);ai(g,{class:"title",children:(m,v)=>{var _=d7(),b=R(_);pr(b,()=>Vo(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),T(m,_)},$$slots:{default:!0}}),T(c,d)},$$slots:{default:!0}}),oe(),r()}var p7=F('<span role="none"> </span>'),g7=F('<span role="none"> </span> <!>',1),m7=F('<span role="none"> </span>');function v7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(hi,"$currentView",n),o=()=>z(yy,"$entryGroups",n),a=()=>z(le,"$_",n),c=()=>z(Xo,"$listedEntries",n),u=w(i),d=w(()=>s().type),f=w(()=>o().map(({entries:p})=>p).flat(1)),h=w(()=>l(u)?.files?a()("file_list"):a()("entry_list"));fy(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=V(),v=M(m);{var _=y=>{var x=V(),k=M(x);{var S=E=>{const A=w(()=>{const{defaultLocale:L}=l(u)._i18n;return{defaultLocale:L}}),O=w(()=>a()("entries"));Dd(E,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(O)},get"aria-rowcount"(){return c().length},children:(L,I)=>{var N=V(),j=M(N);dt(j,1,o,({name:H,entries:B})=>H,(H,B)=>{let W=()=>l(B).name,G=()=>l(B).entries;const K=w(()=>W()!=="*"?W():void 0);Sx(H,{get label(){return l(K)},children:(ee,J)=>{const Y=w(()=>G().filter(({locales:te})=>!!(te[l(A).defaultLocale]??Object.values(te)[0])?.content));nl(ee,{get items(){return l(Y)},itemKey:"id",renderItem:(ce,he=Me)=>{h7(ce,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(L,N)},$$slots:{default:!0}})},C=E=>{var A=V(),O=M(A);{var L=N=>{$r(N,{children:(j,H)=>{var B=p7(),W=R(B);q(G=>Z(W,G),[()=>a()("no_entries_found")]),T(j,B)},$$slots:{default:!0}})},I=N=>{$r(N,{children:(j,H)=>{var B=g7(),W=M(B),G=R(W),K=D(W,2);const ee=w(()=>!l(u).create),J=w(()=>a()("create_new_entry"));Je(K,{variant:"primary",get disabled(){return l(ee)},get label(){return l(J)},onclick:()=>{zn(`/collections/${l(u).name}/new`)},startIcon:te=>{et(te,{name:"edit"})},$$slots:{startIcon:!0}}),q(Y=>Z(G,Y),[()=>a()("no_entries_created")]),T(j,B)},$$slots:{default:!0}})};U(O,N=>{c().length?N(L):N(I,!1)},!0)}T(E,A)};U(k,E=>{l(f).length?E(S):E(C,!1)})}T(y,x)},b=y=>{$r(y,{children:(x,k)=>{var S=m7(),C=R(S);q(E=>Z(C,E),[()=>a()("collection_not_found")]),T(x,S)},$$slots:{default:!0}})};U(v,y=>{l(u)?y(_):y(b,!1)})}T(p,m)},$$slots:{default:!0}}),oe(),r()}var b7=F('<span role="none"> </span>');function _7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=w(()=>i()("file_list"));fy(t,{get"aria-label"(){return l(o)},children:(a,c)=>{var u=V(),d=M(u);{var f=p=>{const g=w(()=>i()("files"));Dd(p,{viewType:"list",get"aria-label"(){return l(g)},get"aria-rowcount"(){return s().files.length},children:(m,v)=>{nl(m,{get items(){return s().files},itemKey:"name",renderItem:(b,y)=>{let x=()=>y?.().name,k=()=>y?.().label;lu(b,{onclick:()=>{zn(`/collections/${s().name}/entries/${x()}`)},children:(S,C)=>{ai(S,{class:"title",children:(E,A)=>{var O=Be();q(()=>Z(O,k()||x())),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})},h=p=>{$r(p,{children:(g,m)=>{var v=b7(),_=R(v);q(b=>Z(_,b),[()=>i()("no_files_in_collection")]),T(g,v)},$$slots:{default:!0}})};U(d,p=>{s()?.files?.length?p(f):p(h,!1)})}T(a,u)},$$slots:{default:!0}}),oe(),r()}var y7=F('<span class="count"> </span>'),w7=F('<div role="none" class="primary-sidebar"><!></div>');function x7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(le,"$_",n),a=()=>z(qn,"$selectedCollection",n),c=()=>z(ri,"$allEntries",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>s()?.collections.filter(({hide:g})=>!g)??[]);var f=w7(),h=R(f);const p=w(()=>o()("collections"));cu(h,{get"aria-label"(){return l(p)},"aria-controls":"collection-container",children:(g,m)=>{var v=V(),_=M(v);dt(_,17,()=>l(d),({name:b,label:y,icon:x,files:k,divider:S=!1})=>b,(b,y)=>{let x=()=>l(y).name,k=()=>l(y).label,S=()=>l(y).icon,C=()=>l(y).files,E=Ge(()=>it(l(y).divider,!1));var A=V(),O=M(A);{var L=N=>{Tr(N,{})},I=N=>{const j=w(()=>k()||x()),H=w(()=>a()?.name===x());gr(N,{get label(){return l(j)},get selected(){return l(H)},onSelect:()=>{zn(`/collections/${x()}`)},startIcon:G=>{const K=w(()=>S()||"edit_note");et(G,{get name(){return l(K)}})},endIcon:G=>{var K=V(),ee=M(K);ms(ee,c,J=>{var Y=V(),te=M(Y);hr(te,()=>hn(0),null,ce=>{var he=y7();const re=w(()=>(C()??ns(x())).length);var X=R(he);q((fe,be)=>{ke(he,"aria-label",`(${fe??""})`),Z(X,be)},[()=>o()(l(re)>1?"many_entries":l(re)===1?"one_entry":"no_entries",{values:{count:l(re)}}),()=>l(u).format(l(re))]),T(ce,he)}),T(J,Y)}),T(G,K)},$$slots:{startIcon:!0,endIcon:!0}})};U(O,N=>{l(E)?N(L):N(I,!1)})}T(b,A)}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function k7(t,e){se(e,!0);const[n,r]=me(),i=()=>z($c,"$selectedEntries",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(le,"$_",n),a=()=>z(Xo,"$listedEntries",n);let c=P(e,"open",15,!1);const u=w(()=>{if(i().length&&s()?._assetFolder?.entryRelative){const h=s().name;return i().map(p=>LA({entry:p,collectionName:h,relative:!0})).flat(1)}return[]}),d=w(()=>i().length===1?o()("delete_entry"):o()("delete_entries")),f=w(()=>o()("delete"));kl(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{PC(i().map(({id:h})=>h),l(u).map(({path:h})=>h))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=V(),m=M(g);{var v=b=>{var y=Be();q(x=>Z(y,x),[()=>o()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),T(b,y)},_=b=>{var y=V(),x=M(y);{var k=C=>{var E=Be();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),T(C,E)},S=C=>{var E=Be();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:i().length}})]),T(C,E)};U(x,C=>{i().length===a().length?C(k):C(S,!1)},!0)}T(b,y)};U(m,b=>{i().length===1?b(v):b(_,!1)})}T(h,g)},$$slots:{default:!0}}),oe(),r()}var S7=F("<!> <!>",1),E7=F('<h2 role="none"> </h2> <div role="none" class="description svelte-1koahme"><!></div> <!> <!>',1),T7=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),C7=F("<!> <!>",1),A7=F("<!> <!>",1);const P7={hash:"svelte-1koahme",code:".description.svelte-1koahme {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function O7(t,e){se(e,!0),Ee(t,P7);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(Xo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z($c,"$selectedEntries",n);let c=ae(!1);const u=C=>li.sanitize(Ot.parseInline(C),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),d=w(()=>i()?.name),f=w(()=>i()?.label),h=w(()=>i()?.description),p=w(()=>i()?.files),g=w(()=>i()?.create??!1),m=w(()=>i()?.delete??!0),v=w(()=>i()?.limit??1/0),_=w(()=>!l(g)||s().length>=l(v)),b=w(()=>l(f)||l(d)||"");var y=A7(),x=M(y);{var k=C=>{var E=C7(),A=M(E);const O=w(()=>o()("collection"));Zs(A,{variant:"primary",get"aria-label"(){return l(O)},children:(N,j)=>{var H=E7(),B=M(H),W=R(B),G=D(B,2),K=R(G);pr(K,()=>u(l(h)||""));var ee=D(G,2);Yr(ee,{flex:!0});var J=D(ee,2);{var Y=te=>{var ce=S7(),he=M(ce);const re=w(()=>o()("delete")),X=w(()=>a().length===1?o()("delete_selected_entry"):o()("delete_selected_entries")),fe=w(()=>!a().length||!l(m));Je(he,{variant:"ghost",get label(){return l(re)},get"aria-label"(){return l(X)},get disabled(){return l(fe)},onclick:()=>{$(c,!0)}});var be=D(he,2);const ue=w(()=>o()("create")),Te=w(()=>o()("create_new_entry"));Je(be,{variant:"primary",get disabled(){return l(_)},get label(){return l(ue)},get"aria-label"(){return l(Te)},keyShortcuts:"Accel+E",onclick:()=>{zn(`/collections/${l(d)}/new`)},startIcon:Ae=>{et(Ae,{name:"edit"})},$$slots:{startIcon:!0}}),T(te,ce)};U(J,te=>{l(p)||te(Y)})}q(()=>Z(W,l(b))),T(N,H)},$$slots:{default:!0}});var L=D(A,2);{var I=N=>{var j=T7(),H=M(j);ff(H,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),tm(H.lastChild,{dismissible:!1,children:(B,W)=>{var G=V(),K=M(G);{var ee=Y=>{var te=Be();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_admin")]),T(Y,te)},J=Y=>{var te=Be();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_limit",{values:{limit:l(v)}})]),T(Y,te)};U(K,Y=>{l(g)?Y(J,!1):Y(ee)})}T(B,G)},$$slots:{default:!0}}),T(N,j)};U(L,N=>{l(_)&&N(I)})}T(C,E)};U(x,C=>{i()&&C(k)})}var S=D(x,2);k7(S,{get open(){return l(c)},set open(C){$(c,ie(C))}}),T(t,y),oe(),r()}function $7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(hi,"$currentView",n),o=()=>z(le,"$_",n),a=()=>z(tn,"$allAssets",n),c=w(()=>i()?._assetFolder?.internalPath),u=w(()=>i()?._assetFolder?.entryRelative),d=w(()=>!!l(u));var f=V(),h=M(f);{var p=g=>{const m=w(()=>!s().showMedia),v=w(()=>o()("collection_assets"));_r(g,{id:"collection-assets",class:"secondary-sidebar",get hidden(){return l(m)},get"aria-label"(){return l(v)},children:(_,b)=>{Rd(_,{get disabled(){return l(d)},multiple:!0,onSelect:({files:y})=>{ot(Ls,{folder:l(c),files:y})},children:(y,x)=>{const k=w(()=>a().filter(({folder:S})=>l(c)===S));hA(y,{get assets(){return l(k)},onSelect:({asset:S})=>{zn(`/assets/${S.path}`)}})},$$slots:{default:!0}})},$$slots:{default:!0}})};U(h,g=>{l(c)&&g(p)})}T(t,f),oe(),r()}var L7=F("<!> <!>",1);function N7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"noneLabel",3,""),u=P(e,"groups",19,()=>[]);const d=w(()=>o()||i()("group"));Er(t,{variant:"ghost",get label(){return l(d)},get disabled(){return a()},popupPosition:"bottom-right",popup:h=>{const p=w(()=>i()("grouping_options"));mr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=L7(),_=M(v);const b=w(()=>c()||i()("sort_keys.none")),y=w(()=>!s().group);uu(_,{get label(){return l(b)},get checked(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,group:void 0}))}});var x=D(_,2);dt(x,17,u,Xn,(k,S)=>{let C=()=>l(S).label,E=()=>l(S).field,A=()=>l(S).pattern;const O=w(()=>s().group?.field===E()&&s().group.pattern===A());uu(k,{get label(){return C()},get checked(){return l(O)},onSelect:()=>{e.currentView.update(L=>({...L,group:{field:E(),pattern:A()}}))}})}),T(g,v)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var I7=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function R7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(Xo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(yy,"$entryGroups",n),c=()=>z(c7,"$sortFields",n),u=()=>z(hi,"$currentView",n),d=w(()=>i()?._type==="entry"?i():void 0),f=w(()=>l(d)?.name),h=w(()=>l(d)?._thumbnailFieldNames??[]),p=w(()=>!!s().length),g=w(()=>s().length>1);var m=V(),v=M(m);{var _=b=>{const y=w(()=>o()("entry_list"));Zs(b,{variant:"secondary",get"aria-label"(){return l(y)},children:(x,k)=>{var S=I7(),C=M(S);const E=w(()=>a().map(({entries:te})=>te).flat(1));JC(C,{get allItems(){return l(E)},selectedItems:$c});var A=D(C,2);Yr(A,{flex:!0});var O=D(A,2);const L=w(()=>!l(g)||!c().length);ZC(O,{get disabled(){return l(L)},currentView:hi,get fields(){return c()},get collectionName(){return l(f)},"aria-controls":"entry-list"});var I=D(O,2);{var N=te=>{const ce=w(()=>!l(g));YC(te,{get disabled(){return l(ce)},currentView:hi,get filters(){return l(d).view_filters},multiple:!0,"aria-controls":"entry-list"})};U(I,te=>{l(d).view_filters?.length&&te(N)})}var j=D(I,2);{var H=te=>{const ce=w(()=>!l(g));N7(te,{get disabled(){return l(ce)},currentView:hi,get groups(){return l(d).view_groups},"aria-controls":"entry-list"})};U(j,te=>{l(d).view_groups?.length&&te(H)})}var B=D(j,2);const W=w(()=>!l(p)||!l(h).length);hy(B,{get disabled(){return l(W)},currentView:hi,"aria-controls":"entry-list"});var G=D(B,2);Tr(G,{orientation:"vertical"});var K=D(G,2);const ee=w(()=>!l(p)||!l(d)._assetFolder),J=w(()=>!!u().showMedia),Y=w(()=>o()(u().showMedia?"hide_assets":"show_assets"));Je(K,{variant:"ghost",iconic:!0,get disabled(){return l(ee)},get pressed(){return l(J)},"aria-controls":"collection-assets",get"aria-expanded"(){return u().showMedia},get"aria-label"(){return l(Y)},onclick:()=>{hi.update(ce=>({...ce,showMedia:!u().showMedia}))},startIcon:ce=>{et(ce,{name:"photo_library"})},$$slots:{startIcon:!0}}),T(x,S)},$$slots:{default:!0}})};U(v,b=>{l(d)&&b(_)})}T(t,m),oe(),r()}var D7=F("<!> <!> <!> <!>",1);function M7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(le,"$_",n),o=()=>z(Xo,"$listedEntries",n),a=()=>z(Ld,"$contentUpdatesToast",n),c=/^\/collections\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?$/,u=w(()=>i()?.files?_7:v7),d=()=>{const{path:_,params:b}=$d(),y=_.match(c);if(!y?.groups)return;const{_collectionName:x,routeType:k,subPath:S}=y.groups,C=x?Ri(x):void 0;if(!C||C.hide?ot(qn,void 0):i()?.name!==C.name&&ot(qn,C),!C||!i()){ot(Rs,s()("collection_not_found"));return}const{name:E,label:A,files:O}=i(),L=A||E,I=O?i()._fileMap:void 0;if(!k){const N=o().length;ot(Rs,s()(N>1?"viewing_x_collection_many_entries":N===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:L,count:N}}));return}if(ot(Ja,!0),I){if(k==="entries"&&S){const N=T_(E,S),j=I[S];Nd(N?{collection:C,collectionFile:j,originalEntry:N}:{collection:C,collectionFile:j,originalEntry:{slug:j.name,locales:Object.fromEntries(j._i18n.initialLocales.map(H=>[H,{}]))}}),ot(Rs,s()("editing_x_collection_file",{values:{collection:L,file:j.label||j.name}}))}}else if(k==="new"&&!S&&(Nd({collection:C,dynamicValues:b}),ot(Rs,s()("creating_x_collection_entry",{values:{collection:L}}))),k==="entries"&&S){const N=o().find(j=>j.subPath===S);N&&(Nd({collection:C,originalEntry:N}),ot(Rs,s()("editing_x_collection_entry",{values:{collection:L,entry:Vo(i(),N)}})))}};ln(()=>{d()});var f=D7();_i("hashchange",al,()=>{d()});var h=M(f);const p=w(()=>s()("content_library"));Md(h,{class:"content",get"aria-label"(){return l(p)},primarySidebar:y=>{x7(y,{})},main:y=>{const x=w(()=>s()("x_collection",{values:{collection:i()?.label||i()?.name}})),k=w(()=>i()?.description);_r(y,{id:"collection-container",class:"main",get"aria-label"(){return l(x)},get"aria-description"(){return l(k)},children:(S,C)=>{XC(S,{primaryToolbar:I=>{O7(I,{})},secondaryToolbar:I=>{var N=V(),j=M(N);{var H=B=>{R7(B,{})};U(j,B=>{i()?._type==="entry"&&o().length&&B(H)})}T(I,N)},mainContent:I=>{var N=V(),j=M(N);yi(j,()=>l(u),(H,B)=>{B(H,{})}),T(I,N)},secondarySidebar:I=>{$7(I,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var g=D(h,2);n7(g,{});var m=D(g,2);Gn(m,{get show(){return a().saved},set show(_){Ct(Ld,xe(a).saved=_,xe(a))},children:(_,b)=>{Bn(_,{status:"success",children:(y,x)=>{var k=Be();q(S=>Z(k,S),[()=>s()(a().published?"entry_saved_and_published":"entry_saved")]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var v=D(m,2);Gn(v,{get show(){return a().deleted},set show(_){Ct(Ld,xe(a).deleted=_,xe(a))},children:(_,b)=>{Bn(_,{status:"success",children:(y,x)=>{var k=Be();q(S=>Z(k,S),[()=>s()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}function F7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(Ja,"$showContentOverlay",n),o=()=>z(Od,"$translatorApiKeyDialogState",n),a=()=>z(le,"$_",n),c=()=>z(Tt,"$prefs",n),u=w(()=>i().serviceId),d=w(()=>i().serviceLabel),f=w(()=>i().developerURL),h=w(()=>i().apiKeyURL),p=w(()=>i().apiKeyPattern);Ue(()=>{!s()&&o().show&&(Ct(Od,xe(o).show=!1,xe(o)),o().resolve?.())});const g=w(()=>a()(o().multiple?"translate_fields":"translate_field")),m=w(()=>({spellcheck:!1,"aria-label":a()("api_key")}));kL(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(Ct(Tt,xe(c).apiKeys??={},xe(c)),Ct(Tt,xe(c).apiKeys[l(u)]=_,xe(c)),Ct(Od,xe(o).show=!1,xe(o)),o().resolve?.(_))},onCancel:()=>{o().resolve?.()},get open(){return o().show},set open(v){Ct(Od,xe(o).show=v,xe(o))},children:(v,_)=>{var b=V(),y=M(b);pr(y,()=>li.sanitize(a()("prefs.languages.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(v,b)},$$slots:{default:!0}}),oe(),r()}function z7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(F_,"$entryParseErrors",n),s=()=>z(le,"$_",n);let o=ae(!!i().length);Gn(t,{get show(){return l(o)},set show(a){$(o,ie(a))},children:(a,c)=>{Bn(a,{status:"error",children:(u,d)=>{var f=Be();q(h=>Z(f,h),[()=>s()(i().length===1?"entry_parse_error":"entry_parse_errors")]),T(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var j7=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function U7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Ue(()=>{$(o,ie(i().underlineLinks??!0))}),Ue(()=>{i().underlineLinks!==l(o)&&Ct(Tt,xe(i).underlineLinks=l(o),xe(i))}),Sl(t,{id:"prefs-tab-accessibility",children:(a,c)=>{var u=j7(),d=R(u),f=R(d),h=D(d,2),p=R(h),g=D(h,2),m=R(g);const v=w(()=>s()("prefs.accessibility.underline_links.switch_label"));fu(m,{get label(){return l(v)},get checked(){return l(o)},set checked(_){$(o,ie(_))}}),q((_,b)=>{Z(f,_),Z(p,b)},[()=>s()("prefs.accessibility.underline_links.title"),()=>s()("prefs.accessibility.underline_links.description")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var B7=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>'),q7=F('<!> <section><h4> </h4> <p> </p> <div role="none"><!></div></section>',1);function H7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(le,"$_",n);let a=P(e,"onChange",3,void 0);const c=w(()=>i()?.backend.automatic_deployments);let u=ae(!1);Ue(()=>{$(u,ie(s().devModeEnabled??!1))}),Ue(()=>{s().devModeEnabled!==l(u)&&Ct(Tt,xe(s).devModeEnabled=l(u),xe(s))}),Sl(t,{id:"prefs-tab-advanced",children:(d,f)=>{var h=q7(),p=M(h);{var g=C=>{var E=B7(),A=R(E),O=R(A),L=D(A,2),I=R(L),N=D(L,2),j=R(N);const H=w(()=>o()("prefs.advanced.deploy_hook.field_label"));yn(j,{flex:!0,get label(){return l(H)},onchange:()=>{a()?.({message:o()(s().deployHookURL?"prefs.advanced.deploy_hook.url_saved":"prefs.advanced.deploy_hook.url_removed")})},get value(){return s().deployHookURL},set value(B){Ct(Tt,xe(s).deployHookURL=B,xe(s))}}),q((B,W)=>{Z(O,B),Z(I,W)},[()=>o()("prefs.advanced.deploy_hook.title"),()=>o()("prefs.advanced.deploy_hook.description")]),T(C,E)};U(p,C=>{typeof l(c)=="boolean"&&C(g)})}var m=D(p,2),v=R(m),_=R(v),b=D(v,2),y=R(b),x=D(b,2),k=R(x);const S=w(()=>o()("prefs.advanced.developer_mode.switch_label"));fu(k,{get label(){return l(S)},get checked(){return l(u)},set checked(C){$(u,ie(C))}}),q((C,E)=>{Z(_,C),Z(y,E)},[()=>o()("prefs.advanced.developer_mode.title"),()=>o()("prefs.advanced.developer_mode.description")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var V7=F('<section><h4> </h4> <div role="none"><!></div></section>');function W7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);P(e,"onChange",3,void 0),Sl(t,{id:"prefs-tab-appearance",children:(o,a)=>{var c=V7(),u=R(c),d=R(u),f=D(u,2),h=R(f);const p=w(()=>i()("prefs.appearance.select_theme"));Cf(h,{get"aria-label"(){return l(p)},onChange:g=>{ot(Tt,{...s(),theme:g.detail.value})},children:(g,m)=>{var v=V(),_=M(v);dt(_,16,()=>["auto","dark","light"],Xn,(b,y)=>{const x=w(()=>i()(`prefs.theme.${y}`)),k=w(()=>!s().theme&&y==="auto"||s().theme===y);ou(b,{variant:"tertiary",get label(){return l(x)},get value(){return y},get selected(){return l(k)}})}),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("prefs.appearance.theme")]),T(o,c)},$$slots:{default:!0}}),oe(),r()}var G7=F('<section><h4> </h4> <div role="none"><!></div></section>');function K7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Ue(()=>{$(o,ie(i().closeOnSave??!0))}),Ue(()=>{i().closeOnSave!==l(o)&&Ct(Tt,xe(i).closeOnSave=l(o),xe(i))}),Sl(t,{id:"prefs-tab-contents",children:(a,c)=>{var u=G7(),d=R(u),f=R(d),h=D(d,2),p=R(h);const g=w(()=>s()("prefs.contents.editor.close_on_save.switch_label"));fu(p,{get label(){return l(g)},get checked(){return l(o)},set checked(m){$(o,ie(m))}}),q(m=>Z(f,m),[()=>s()("prefs.contents.editor.title")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var Y7=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),J7=F('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function Z7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Ln,"$appLocale",n),o=()=>z(Tt,"$prefs",n),a=()=>z(ux,"$appLocales",n),c=()=>z(yt,"$siteConfig",n);let u=P(e,"onChange",3,void 0);Sl(t,{id:"prefs-tab-languages",children:(d,f)=>{var h=J7(),p=M(h),g=R(p),m=R(g),v=D(g,2),_=R(v);ms(_,s,x=>{const k=w(()=>i()("prefs.languages.ui_language.select_language")),S=w(()=>s()??void 0);du(x,{get"aria-label"(){return l(k)},get value(){return l(S)},onChange:C=>{ot(Tt,{...o(),locale:C.detail.value})},children:(C,E)=>{var A=V(),O=M(A);dt(O,1,a,Xn,(L,I)=>{const N=w(()=>Ts(l(I))),j=w(()=>l(I)===s());gr(L,{get label(){return l(N)},get value(){return l(I)},get selected(){return l(j)}})}),T(C,A)},$$slots:{default:!0}})});var b=D(p,2);{var y=x=>{var k=V(),S=M(k);dt(S,17,()=>Object.entries(s6),([C,E])=>C,(C,E)=>{let A=()=>l(E)[0],O=()=>l(E)[1];var L=Y7();const I=w(()=>{const{serviceLabel:ee,developerURL:J,apiKeyURL:Y}=O();return{serviceLabel:ee,developerURL:J,apiKeyURL:Y}});var N=R(L),j=R(N),H=D(N,2),B=R(H);pr(B,()=>li.sanitize(i()("prefs.languages.translator.description",{values:{service:l(I).serviceLabel,homeHref:`href="${l(I).developerURL}"`,apiKeyHref:`href="${l(I).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var W=D(H,2),G=R(W);{var K=ee=>{const J=w(()=>i()("prefs.languages.translator.field_label",{values:{service:l(I).serviceLabel}}));yn(ee,{flex:!0,spellcheck:"false",get"aria-label"(){return l(J)},onchange:()=>{u()?.({message:i()(o().apiKeys?.[A()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return o().apiKeys[A()]},set value(Y){Ct(Tt,xe(o).apiKeys[A()]=Y,xe(o))}})};U(G,ee=>{o().apiKeys&&ee(K)})}q(ee=>Z(j,ee),[()=>i()("prefs.languages.translator.title",{values:{service:l(I).serviceLabel}})]),T(C,L)}),T(x,k)};U(b,x=>{(c()?.i18n?.locales?.length??0)>1&&x(y)})}q(x=>Z(m,x),[()=>i()("prefs.languages.ui_language.title")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var X7=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>');function Q7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=P(e,"onChange",3,void 0);Sl(t,{id:"prefs-tab-media",children:(a,c)=>{var u=V(),d=M(u);dt(d,17,()=>Object.entries(zd),([f,h])=>f,(f,h)=>{let p=()=>l(h)[0],g=()=>l(h)[1];var m=X7();const v=w(()=>{const{serviceLabel:E,developerURL:A,apiKeyURL:O}=g();return{serviceLabel:E,developerURL:A,apiKeyURL:O}});var _=R(m),b=R(_),y=D(_,2),x=R(y);pr(x,()=>li.sanitize(i()("prefs.media.stock_photos.description",{values:{service:l(v).serviceLabel,homeHref:`href="${l(v).developerURL}"`,apiKeyHref:`href="${l(v).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var k=D(y,2),S=R(k);{var C=E=>{const A=w(()=>i()("prefs.media.stock_photos.field_label",{values:{service:l(v).serviceLabel}}));yn(E,{flex:!0,spellcheck:"false",get"aria-label"(){return l(A)},onchange:()=>{o()?.({message:i()(s().apiKeys?.[p()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return s().apiKeys[p()]},set value(O){Ct(Tt,xe(s).apiKeys[p()]=O,xe(s))}})};U(S,E=>{s().apiKeys&&E(C)})}q(E=>Z(b,E),[()=>i()("prefs.media.stock_photos.title",{values:{service:l(v).serviceLabel}})]),T(f,m)}),T(a,u)},$$slots:{default:!0}}),oe(),r()}var eG=F('<div role="none" class="wrapper svelte-z6esgm"><!> <!></div>'),tG=F("<!> <!>",1);const nG={hash:"svelte-z6esgm",code:".wrapper.svelte-z6esgm {display:flex;}.wrapper.svelte-z6esgm .tab-list {flex:none;}.wrapper.svelte-z6esgm .tab-panel {flex:auto;border-width:0;}.wrapper.svelte-z6esgm .tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-z6esgm .tab-panel p {margin-top:0;}.wrapper.svelte-z6esgm .tab-panel h4 {font-size:inherit;}.wrapper.svelte-z6esgm .tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-z6esgm .tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function rG(t,e){se(e,!0),Ee(t,nG);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0),a=ae("appearance"),c=ae(""),u=ae(!1);const d=[{key:"appearance",icon:"palette",component:W7},{key:"languages",icon:"language",component:Z7},{key:"contents",icon:"library_books",component:K7},{key:"media",icon:"photo_library",component:Q7},{key:"accessibility",icon:"accessibility_new",component:U7},{key:"advanced",icon:"build",component:H7}];var f=tG(),h=M(f);const p=w(()=>i()("settings"));Ui(h,{get title(){return l(p)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(m){s(m)},children:(m,v)=>{var _=eG(),b=R(_);const y=w(()=>i()("categories"));MN(b,{orientation:"vertical",get"aria-label"(){return l(y)},children:(k,S)=>{var C=V(),E=M(C);dt(E,17,()=>d,({key:A,icon:O})=>A,(A,O)=>{let L=()=>l(O).key,I=()=>l(O).icon;const N=w(()=>i()(`prefs.${L()}.title`)),j=w(()=>L()===l(a));jN(A,{get label(){return l(N)},get selected(){return l(j)},get"aria-controls"(){return`prefs-tab-${L()??""}`},onSelect:()=>{$(a,ie(L()))},startIcon:B=>{et(B,{get name(){return I()}})},$$slots:{startIcon:!0}})}),T(k,C)},$$slots:{default:!0}});var x=D(b,2);dt(x,17,()=>d,({key:k,component:S})=>k,(k,S)=>{let C=()=>l(S).component;var E=V(),A=M(E);yi(A,C,(O,L)=>{L(O,{onChange:({message:I})=>{$(c,ie(I)),$(u,!0)}})}),T(k,E)}),T(m,_)},$$slots:{default:!0}});var g=D(h,2);Gn(g,{get show(){return l(u)},set show(m){$(u,ie(m))},children:(m,v)=>{Bn(m,{status:"success",children:(_,b)=>{var y=Be();q(()=>Z(y,l(c))),T(_,y)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}var iG=F('<img class="avatar svelte-xssn1c" loading="lazy" alt="">'),sG=F("<!> <!>",1),oG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1),aG=F('<div role="none" class="wrapper svelte-xssn1c"><!></div> <!>',1);const lG={hash:"svelte-xssn1c",code:".wrapper.svelte-xssn1c {display:contents;}.wrapper.svelte-xssn1c button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-xssn1c {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function cG(t,e){se(e,!0),Ee(t,lG);const[n,r]=me(),i=()=>z(fi,"$user",n),s=()=>z(Is,"$backendName",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(Nn,"$backend",n);let u=ae(void 0),d=ae(!1);const f=w(()=>!!i()?.avatarURL),h=w(()=>s()==="local");var p=aG(),g=M(p),m=R(g);const v=w(()=>l(f)?"avatar":""),_=w(()=>o()("show_account_menu"));Pt(Er(m,{variant:"ghost",iconic:!0,get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:k=>{var S=V(),C=M(S);{var E=O=>{var L=iG();q(()=>ke(L,"src",i()?.avatarURL)),T(O,L)},A=O=>{et(O,{name:"account_circle"})};U(C,O=>{l(f)?O(E):O(A,!1)})}T(k,S)},popup:k=>{const S=w(()=>o()("account"));mr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{var A=oG(),O=M(A);const L=w(()=>l(h)?o()("working_with_local_repo"):o()("signed_in_as_x",{values:{name:i()?.login}}));Lt(O,{get label(){return l(L)},get disabled(){return l(h)},onclick:()=>{window.open(i()?.profileURL,"_blank")}});var I=D(O,2);Tr(I,{});var N=D(I,2);const j=w(()=>o()("live_site"));Lt(N,{get label(){return l(j)},onclick:()=>{EC()}});var H=D(N,2);{var B=te=>{var ce=sG(),he=M(ce);const re=w(()=>o()("git_repository")),X=w(()=>!c()?.repository?.treeBaseURL);Lt(he,{get label(){return l(re)},get disabled(){return l(X)},onclick:()=>{window.open(c()?.repository?.treeBaseURL)}});var fe=D(he,2);const be=w(()=>o()("site_config"));Lt(fe,{get label(){return l(be)},onclick:()=>{zn("/config")}}),T(te,ce)};U(H,te=>{a().devModeEnabled&&te(B)})}var W=D(H,2);Tr(W,{});var G=D(W,2);const K=w(()=>o()("settings"));Lt(G,{get label(){return l(K)},onclick:()=>{$(d,!0)}});var ee=D(G,2);Tr(ee,{});var J=D(ee,2);const Y=w(()=>o()("sign_out"));Lt(J,{get label(){return l(Y)},onclick:async()=>{window.requestAnimationFrame(()=>{X8()})}}),T(C,A)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),k=>$(u,ie(k)),()=>l(u));var b=D(g,2);rG(b,{onClose:()=>{l(u)?.focus()},get open(){return l(d)},set open(y){$(d,ie(y))}}),T(t,p),oe(),r()}var uG=F("<!> <!>",1),dG=F("<!> <!>",1);function fG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(le,"$_",n),o=w(()=>(i()?.collections??[]).filter(({folder:c,hide:u=!1,divider:d=!1})=>typeof c=="string"&&!u&&!d)),a=w(()=>s()("create_entry_or_assets"));Er(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(a)},endIcon:d=>{et(d,{name:"add"})},popup:d=>{const f=w(()=>s()("create_entry_or_assets"));mr(d,{get"aria-label"(){return l(f)},children:(h,p)=>{var g=dG(),m=M(g);{var v=y=>{var x=uG(),k=M(x);dt(k,17,()=>l(o),C=>C.name,(C,E)=>{const A=w(()=>{const{name:I,label:N,label_singular:j,create:H=!1,limit:B=1/0}=l(E);return{name:I,label:N,labelSingular:j,create:H,limit:B}}),O=w(()=>l(A).labelSingular||l(A).label||l(A).name),L=w(()=>!l(A).create||ns(l(A).name).length>=l(A).limit);Lt(C,{get label(){return l(O)},get disabled(){return l(L)},onclick:()=>{zn(`/collections/${l(A).name}/new`)}})});var S=D(k,2);Tr(S,{}),T(y,x)};U(m,y=>{l(o).length&&y(v)})}var _=D(m,2);const b=w(()=>s()("assets"));Lt(_,{get label(){return l(b)},onclick:async()=>{zn("/assets"),await hn(100),ot(el,!0)}}),T(h,g)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),oe(),r()}var hG=F('<kbd class="svelte-h10dbf"> </kbd>'),pG=F("<!> <!>",1),gG=F('<div role="none" class="wrapper svelte-h10dbf"><!></div>');const mG={hash:"svelte-h10dbf",code:".wrapper.svelte-h10dbf {display:contents;}.wrapper.svelte-h10dbf .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row .feature {flex:auto;}.wrapper.svelte-h10dbf .table-row .keys {display:flex;gap:8px;}kbd.svelte-h10dbf {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 vG(t,e){se(e,!0),Ee(t,mG);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(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=ae("Ctrl");ln(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&$(c,"⌘")});const u=w(()=>i()("help.keyboard_shortcuts"));Ui(t,{get title(){return l(u)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(d){s(d)},children:(d,f)=>{var h=gG(),p=R(h);const g=w(()=>i()("help.keyboard_shortcuts"));IN(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=V(),b=M(_);dt(b,17,()=>a,({feature:y,keys:x})=>x,(y,x)=>{let k=()=>l(x).feature,S=()=>l(x).keys;$N(y,{children:(C,E)=>{var A=pG(),O=M(A);Ex(O,{class:"feature",children:(I,N)=>{var j=Be();q(H=>Z(j,H),[()=>i()(`keyboard_shortcuts_.${k()}`)]),T(I,j)},$$slots:{default:!0}});var L=D(O,2);Ex(L,{class:"keys",children:(I,N)=>{var j=V(),H=M(j);dt(H,17,()=>S().split("+"),Xn,(B,W)=>{var G=hG(),K=R(G);q(ee=>Z(K,ee),[()=>l(W).replace("Accel",l(c))]),T(B,G)}),T(I,j)},$$slots:{default:!0}}),T(C,A)},$$slots:{default:!0}})}),T(m,_)},$$slots:{default:!0}}),T(d,h)},$$slots:{default:!0}}),oe(),r()}var bG=F('<span class="version svelte-69n4ux"></span>'),_G=F("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1),yG=F('<div role="none" class="wrapper svelte-69n4ux"><!></div> <!>',1);const wG={hash:"svelte-69n4ux",code:".wrapper.svelte-69n4ux {display:contents;}.version.svelte-69n4ux {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 xG(t,e){se(e,!0),Ee(t,wG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=ae(void 0),a=ae(!1);var c=yG(),u=M(c),d=R(u);const f=w(()=>i()("show_help_menu"));Pt(Er(d,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},endIcon:m=>{et(m,{name:"help"})},popup:m=>{const v=w(()=>i()("help"));mr(m,{get"aria-label"(){return l(v)},children:(_,b)=>{var y=_G(),x=M(y);{var k=ee=>{const J=w(()=>i()("keyboard_shortcuts"));Lt(ee,{get label(){return l(J)},onclick:()=>{$(a,!0)}})};U(x,ee=>{window.matchMedia("(pointer: fine)").matches&&ee(k)})}var S=D(x,2);const C=w(()=>i()("documentation"));Lt(S,{get label(){return l(C)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")}});var E=D(S,2);const A=w(()=>i()("release_notes"));Lt(E,{get label(){return l(A)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:J=>{var Y=V(),te=M(Y);{var ce=he=>{var re=bG();re.textContent=`v${ny}`,q(X=>ke(re,"aria-label",`(${X??""})`),[()=>i()("version_x",{values:{version:ny}})]),T(he,re)};U(te,he=>{s().devModeEnabled&&he(ce)})}T(J,Y)},$$slots:{endIcon:!0}});var O=D(E,2);Tr(O,{});var L=D(O,2);const I=w(()=>i()("report_issue"));Lt(L,{get label(){return l(I)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/issues/new?labels=bug","_blank")}});var N=D(L,2);const j=w(()=>i()("share_feedback"));Lt(N,{get label(){return l(j)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=general","_blank")}});var H=D(N,2);const B=w(()=>i()("get_help"));Lt(H,{get label(){return l(B)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=q-a","_blank")}});var W=D(H,2);Tr(W,{});var G=D(W,2);const K=w(()=>i()("join_discord"));Lt(G,{get label(){return l(K)},onclick:()=>{window.open("https://discord.gg/5hwCGqup5b","_blank")}}),T(_,y)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),m=>$(o,ie(m)),()=>l(o));var h=D(u,2);vG(h,{onClose:()=>{l(o)?.focus()},get open(){return l(a)},set open(p){$(a,ie(p))}}),T(t,c),oe(),r()}function kG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>i()("show_notifications"));Je(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:a=>{et(a,{name:"notifications"})},$$slots:{startIcon:!0}}),oe(),r()}var SG=F('<div role="none" class="wrapper svelte-1wpllk"><!></div>');const EG={hash:"svelte-1wpllk",code:".wrapper.svelte-1wpllk {display:contents;}.wrapper.svelte-1wpllk .sui.select-button-group {gap:4px;}.wrapper.svelte-1wpllk .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function TG(t,e){se(e,!0),Ee(t,EG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(ty,"$selectedPageName",n),u=w(()=>[{key:"collections",label:i()("contents"),icon:"library_books",link:`/collections/${s()?.name??o()?.collections[0].name}`},{key:"assets",label:i()("assets"),icon:"photo_library",link:a()?`/assets/${a().internalPath}`:"/assets"}]);var d=SG(),f=R(d);const h=w(()=>i()("switch_page"));Cf(f,{get"aria-label"(){return l(h)},"aria-controls":"page-container",children:(p,g)=>{var m=V(),v=M(m);dt(v,19,()=>l(u),({key:_,label:b,icon:y,link:x})=>_,(_,b,y)=>{let x=()=>l(b).key,k=()=>l(b).label,S=()=>l(b).icon,C=()=>l(b).link;const E=w(()=>c()===x()),A=w(()=>l(y)+1);ou(_,{variant:"ghost",iconic:!0,get selected(){return l(E)},get"aria-label"(){return k()},get keyShortcuts(){return`Alt+${l(A)??""}`},onSelect:()=>{zn(C())},startIcon:L=>{et(L,{get name(){return S()}})},$$slots:{startIcon:!0}})}),T(p,m)},$$slots:{default:!0}}),T(t,d),oe(),r()}var CG=F("<!> <!>",1);function AG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(Nn,"$backend",n),a=()=>z(Is,"$backendName",n),c=()=>z(Zp,"$isLastCommitPublished",n),u=()=>z(le,"$_",n),d=w(()=>i()?.backend.automatic_deployments),f=w(()=>s().deployHookURL),h=w(()=>o()?.triggerDeployment),p=w(()=>a()!=="local"&&typeof l(d)=="boolean"),g=w(()=>(!!l(f)||typeof l(h)=="function")&&!c());let m=ae("info"),v=ae(!1);const _=async()=>{$(m,"info"),$(v,!0);try{const{ok:k,status:S}=l(f)?await fetch(l(f),{method:"POST",mode:"no-cors"}):await l(h)?.()??{};if(!k&&S!==0)throw new Error(`Webhook returned ${S} error`);ot(Zp,!0)}catch(k){$(m,"error"),$(v,!0),console.error(k)}};var b=V(),y=M(b);{var x=k=>{var S=CG(),C=M(S);const E=w(()=>u()("publish_changes")),A=w(()=>!l(g));Je(C,{variant:"secondary",get label(){return l(E)},get disabled(){return l(A)},onclick:()=>_()});var O=D(C,2);Gn(O,{get show(){return l(v)},set show(L){$(v,ie(L))},children:(L,I)=>{Bn(L,{get status(){return l(m)},children:(N,j)=>{var H=Be();q(B=>Z(H,B),[()=>u()(l(m)==="error"?"publishing_changes_failed":"publishing_changes")]),T(N,H)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(k,S)};U(y,k=>{l(p)&&k(x)})}T(t,b),oe(),r()}var PG=F('<div role="none" class="wrapper svelte-ns8gcu"><svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper></div>');const OG={hash:"svelte-ns8gcu",code:".wrapper.svelte-ns8gcu {display:contents;--sui-textbox-border-width: 0;}"};function $G(t,e){se(e,!0),Ee(t,OG);const[n,r]=me(),i=()=>z(Fc,"$searchTerms",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a=()=>z(le,"$_",n),c=g=>{const m=!!i(),{path:v}=$d(),_=v.startsWith("/search/");ot(Fc,g),g?zn(`/search/${g}`,{replaceState:_}):m&&_&&Dc(`/collections/${s()?.name??o()?.collections[0].name}`)};let u=ae(void 0),d=ae(void 0);Ue(()=>{l(d)&&i()!==l(d)?.value&&(l(d).value=i())});var f=PG(),h=R(f);const p=w(()=>a()("search_placeholder"));ff(h,()=>({"--sui-textbox-placeholder-text-align":"center"})),Pt(nm(h.lastChild,{keyShortcuts:"Accel+F",showInlineLabel:!0,get"aria-label"(){return l(p)},oninput:({target:g})=>{c(g.value.trim())}}),g=>$(d,ie(g)),()=>l(d)),Pt(f,g=>$(u,g),()=>l(u)),T(t,f),oe(),r()}var LG=F('<img loading="lazy" alt="" class="logo svelte-14sy0eb">');const NG={hash:"svelte-14sy0eb",code:"img.svelte-14sy0eb {width:24px;height:24px;object-fit:contain;}"};function IG(t,e){se(e,!0),Ee(t,NG);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(le,"$_",n);var o=V(),a=M(o);{var c=u=>{const d=w(()=>s()("visit_live_site"));Je(u,{variant:"ghost",iconic:!0,get"aria-label"(){return l(d)},onclick:()=>{EC()},children:(f,h)=>{var p=LG();q(()=>ke(p,"src",i().logo_url)),T(f,p)},$$slots:{default:!0}})};U(a,u=>{i()?.logo_url&&u(c)})}T(t,o),oe(),r()}var RG=F('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),DG=F('<div role="none" class="toolbar-wrapper svelte-ornzx3"><!></div>');const MG={hash:"svelte-ornzx3",code:".toolbar-wrapper.svelte-ornzx3 {display:contents;}.toolbar-wrapper[inert].svelte-ornzx3 {display:none;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .search-bar {flex:none;width:640px;max-width:50%;}"};function FG(t,e){se(e,!0),Ee(t,MG);const[n,r]=me(),i=()=>z(SC,"$hasOverlay",n),s=()=>z(le,"$_",n);var o=DG(),a=R(o);const c=w(()=>s()("global"));Zs(a,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=RG(),h=M(f),p=R(h);IG(p,{});var g=D(p,2);TG(g,{});var m=D(h,2);$G(m,{});var v=D(m,2),_=R(v);AG(_,{});var b=D(_,2);fG(b,{});var y=D(b,2);kG(y,{});var x=D(y,2);xG(x,{});var k=D(x,2);cG(k,{}),T(u,f)},$$slots:{default:!0}}),q(()=>o.inert=i()),T(t,o),oe(),r()}var zG=F("<!> <!> <!>",1);function jG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=w(()=>e.asset.path),o=w(()=>e.asset.name),a=w(()=>e.asset.folder),c=w(()=>e.asset.kind);lu(t,{onclick:()=>{zn(`/assets/${l(s)}`)},children:(u,d)=>{var f=zG(),h=M(f);ai(h,{class:"image",children:(m,v)=>{Ds(m,{get kind(){return l(c)},get asset(){return e.asset},variant:"icon",cover:!0})},$$slots:{default:!0}});var p=D(h,2);ai(p,{class:"collection",children:(m,v)=>{var _=Be();q(b=>Z(_,b),[()=>i()?cy(l(a)):""]),T(m,_)},$$slots:{default:!0}});var g=D(p,2);ai(g,{class:"title",children:(m,v)=>{var _=Be();q(()=>Z(_,l(o))),T(m,_)},$$slots:{default:!0}}),T(u,f)},$$slots:{default:!0}}),oe(),r()}var UG=F("<!> <!> <!>",1);function BG(t,e){se(e,!0);const n=(a,c)=>{let u=()=>c?.().collection,d=()=>c?.().collectionFile;var f=V();const h=w(()=>{const{defaultLocale:v}=(d()??u())._i18n??$i;return{defaultLocale:v}}),p=w(()=>{const{content:v}=l(r)[l(h).defaultLocale]??Object.values(l(r))[0]??{};return{content:v}});var g=M(f);{var m=v=>{lu(v,{onclick:()=>{zn(`/collections/${u().name}/entries/${d()?.name||l(i)}`)},children:(_,b)=>{var y=UG(),x=M(y);ai(x,{class:"image",children:(C,E)=>{var A=V(),O=M(A);{var L=I=>{var N=V(),j=M(N);hr(j,()=>$A(u(),e.entry),null,(H,B)=>{var W=V(),G=M(W);{var K=ee=>{dy(ee,{get src(){return l(B)},variant:"icon",cover:!0})};U(G,ee=>{l(B)&&ee(K)})}T(H,W)}),T(I,N)};U(O,I=>{u()._type==="entry"&&I(L)})}T(C,A)},$$slots:{default:!0}});var k=D(x,2);ai(k,{class:"collection",children:(C,E)=>{var A=Be();q(()=>Z(A,u().label||u().name)),T(C,A)},$$slots:{default:!0}});var S=D(k,2);ai(S,{class:"title",children:(C,E)=>{var A=V(),O=M(A);{var L=N=>{var j=Be();q(()=>Z(j,d().label||d().name)),T(N,j)},I=N=>{var j=V(),H=M(j);pr(H,()=>Vo(u(),e.entry,{useTemplate:!0,allowMarkdown:!0})),T(N,j)};U(O,N=>{d()?N(L):N(I,!1)})}T(C,A)},$$slots:{default:!0}}),T(_,y)},$$slots:{default:!0}})};U(g,v=>{l(p).content&&v(m)})}T(a,f)},r=w(()=>e.entry.locales),i=w(()=>e.entry.subPath);var s=V(),o=M(s);dt(o,17,()=>co(e.entry),a=>a.name,(a,c)=>{var u=V(),d=M(u);dt(d,17,()=>Wo(l(c),e.entry),f=>f.name,(f,h)=>{n(f,()=>({collection:l(c),collectionFile:l(h)}))},f=>{n(f,()=>({collection:l(c)}))}),T(a,u)}),T(t,s),oe()}var qG=F('<h3 role="none" id="search-results-entries" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),HG=F('<h3 role="none" id="search-results-assets" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),VG=F('<div role="none" class="wrapper svelte-11iebi8"><header role="none" class="svelte-11iebi8"><h2 role="none" class="svelte-11iebi8"> </h2></header> <div role="none" class="results svelte-11iebi8"><!> <!></div></div>');const WG={hash:"svelte-11iebi8",code:".wrapper.svelte-11iebi8 {display:flex;flex-direction:column;width:100%;}header.svelte-11iebi8 {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}header.svelte-11iebi8 h2:where(.svelte-11iebi8) {font-size:var(--sui-font-size-x-large);}.results.svelte-11iebi8 {flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%;}.results.svelte-11iebi8 > .group {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%;}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) {flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) + div:where(.svelte-11iebi8) {overflow:auto;flex:auto;}"};function GG(t,e){se(e,!0),Ee(t,WG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Fc,"$searchTerms",n),o=()=>z(dA,"$searchResults",n);var a=VG(),c=R(a),u=R(c),d=R(u),f=D(c,2),h=R(f);_r(h,{"aria-labelledby":"search-results-entries",children:(g,m)=>{var v=qG(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("entries"));Dd(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().entries.length},children:(A,O)=>{var L=V(),I=M(L);ms(I,s,N=>{nl(N,{get items(){return o().entries},itemKey:"id",renderItem:(H,B=Me)=>{BG(H,{get entry(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Be();q(A=>Z(E,A),[()=>i()("no_entries_found")]),T(C,E)};U(x,C=>{o().entries.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("entries")]),T(g,v)},$$slots:{default:!0}});var p=D(h,2);_r(p,{"aria-labelledby":"search-results-assets",children:(g,m)=>{var v=HG(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("assets"));Dd(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().assets.length},children:(A,O)=>{var L=V(),I=M(L);ms(I,s,N=>{nl(N,{get items(){return o().assets},itemKey:"path",renderItem:(H,B=Me)=>{jG(H,{get asset(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Be();q(A=>Z(E,A),[()=>i()("no_files_found")]),T(C,E)};U(x,C=>{o().assets.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("assets")]),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("search_results_for_x",{values:{terms:s()}})]),T(t,a),oe(),r()}function KG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Fc,"$searchTerms",n),s=()=>z(dA,"$searchResults",n),o=()=>z(le,"$_",n),a=/^\/search\/(?<terms>.+)$/,c=()=>{const{path:d}=$d(),{terms:f}=d.match(a)?.groups??{};f&&f!==i()&&ot(Fc,f);const{entries:h,assets:p}=s(),g=h.length,m=p.length;ot(Rs,o()("viewing_search_results",{values:{terms:i(),entries:g>1?o()("many_entries",{values:{count:g}}):g===1?o()("one_entry"):o()("no_entries"),assets:m>1?o()("many_assets",{values:{count:m}}):m===1?o()("one_asset"):o()("no_assets")}}))};ln(()=>{c()}),_i("hashchange",al,()=>{c()});const u=w(()=>o()("search_results_for_x",{values:{terms:i()}}));Md(t,{class:"content",get"aria-label"(){return l(u)},main:f=>{GG(f,{})},$$slots:{main:!0}}),oe(),r()}var YG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="draft-column-title" class="svelte-1lr8kgc"> </h3></header>'),JG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="review-column-title" class="svelte-1lr8kgc"> </h3></header>'),ZG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="ready-column-title" class="svelte-1lr8kgc"> </h3></header>'),XG=F('<div role="none" class="columns svelte-1lr8kgc"><!> <!> <!></div>');const QG={hash:"svelte-1lr8kgc",code:".columns.svelte-1lr8kgc {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.columns.svelte-1lr8kgc .column {flex:auto;width:33.3333333333%;background-color:var(--sui-primary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) h3:where(.svelte-1lr8kgc) {font-size:var(--sui-font-size-x-large);}"};function eK(t,e){se(e,!0),Ee(t,QG);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>i()("editorial_workflow"));Md(t,{class:"content",get"aria-label"(){return l(s)},main:a=>{var c=XG(),u=R(c);_r(u,{class:"column","aria-labelledby":"draft-column-title",children:(h,p)=>{var g=YG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.drafts")]),T(h,g)},$$slots:{default:!0}});var d=D(u,2);_r(d,{class:"column","aria-labelledby":"review-column-title",children:(h,p)=>{var g=JG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.in_review")]),T(h,g)},$$slots:{default:!0}});var f=D(d,2);_r(f,{class:"column","aria-labelledby":"ready-column-title",children:(h,p)=>{var g=ZG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.ready")]),T(h,g)},$$slots:{default:!0}}),T(a,c)},$$slots:{main:!0}}),oe(),r()}var tK=F("<!> <!> <!> <!> <!> <!>",1);function nK(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ty,"$selectedPageName",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a={collections:M7,assets:HH,search:KG,workflow:eK,config:JH},c=w(()=>a[i()]),u=()=>{ot(Ja,!1),ot(Go,!1);const{path:b}=$d(),{pageName:y}=b.match(`^\\/(?<pageName>${Object.keys(a).join("|")})\\b`)?.groups??{};y?i()!==y&&ot(ty,y):window.location.replace(`#/collections/${s()?.name??o()?.collections[0].name}`)};ln(()=>{u()});var d=tK();_i("hashchange",al,()=>{u()});var f=M(d);FG(f,{});var h=D(f,2);yi(h,()=>l(c),(b,y)=>{y(b,{})});var p=D(h,2);GH(p,{});var g=D(p,2);WH(g,{});var m=D(g,2);F7(m,{});var v=D(m,2);z7(v,{}),T(t,d);var _=oe({pages:a,selectPage:u});return r(),_}const rK=Object.freeze(Object.defineProperty({__proto__:null,strings:{collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",user_name:"User Name",password:"Password",sign_in:"Sign In",signed_in_as_x:"Signed In as {name}",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",upload:"Upload",copy:"Copy",download:"Download",duplicate:"Duplicate",delete:"Delete",save:"Save",saving:"Saving…",rename:"Rename",update:"Update",replace:"Replace",add:"Add",remove:"Remove",remove_x:"Remove {name}",clear:"Clear",expand:"Expand",expand_all:"Expand All",collapse:"Collapse",collapse_all:"Collapse All",insert:"Insert",restore:"Restore",discard:"Discard",searching:"Searching…",global:"Global",primary:"Primary",secondary:"Secondary",collection:"Collection",folder:"Folder",api_key:"API Key",details:"Details",clipboard_error:"There was an error while copying data.",welcome_to_sveltia_cms:"Welcome to Sveltia CMS",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",loading_site_data_error:"There was an error while loading site data.",sign_in_with_x:"Sign In with {service}",authorizing:"Authorizing…",signing_in:"Signing in…",work_with_local_repo:"Work with Local Repository",work_with_local_repo_description:"Click the button to select the root directory of the “{repo}” repository.",work_with_local_repo_description_no_repo:"Click the button to select the root directory of your Git repository.",sign_in_error:{not_project_root:"The folder you have selected is not a repository root directory. Please try again.",picker_dismissed:"A repository root directory could not be selected. Please try again.",authentication_aborted:"Authentication aborted. Please try again.",UNSUPPORTED_BACKEND:"Your Git backend is not supported by the authenticator.",UNSUPPORTED_DOMAIN:"Your domain is not allowed to use the authenticator.",MISCONFIGURED_CLIENT:"OAuth app client ID or secret is not configured.",AUTH_CODE_REQUEST_FAILED:"Failed to receive an authorization code. Please try again later.",CSRF_DETECTED:"Potential CSRF attack detected. Authentication flow aborted.",TOKEN_REQUEST_FAILED:"Failed to request an access token. Please try again later.",MALFORMED_RESPONSE:"Server responded with malformed data. Please try again later."},repository_no_access:"You don’t have access to the “{repo}” repository.",repository_not_found:"The “{repo}” repository doesn’t exist.",repository_empty:"The “{repo}” repository has no branches.",branch_not_found:"The “{repo}” repository doesn’t have the “{branch}” branch.",unexpected_error:"Unexpected Error",entry_parse_error:"There was an error while parsing an entry file. Check the browser console for details.",entry_parse_errors:"There were errors while parsing entry files. Check the browser console for details.",visit_live_site:"Visit Live Site",switch_page:"Switch Page",search_placeholder:"Search for entries and assets…",create_entry_or_assets:"Create Entry or Assets",publish_changes:"Publish Changes",publishing_changes:"Publishing Changes…",publishing_changes_failed:"Changes could not be published. Please try again later.",show_notifications:"Show Notifications",notifications:"Notifications",show_account_menu:"Show Account Menu",account:"Account",live_site:"Live Site",git_repository:"Git Repository",settings:"Settings",site_config:"Site Configuration",show_help_menu:"Show Help Menu",help:"Help",keyboard_shortcuts:"Keyboard Shortcuts",documentation:"Documentation",release_notes:"Release Notes",version_x:"Version {version}",report_issue:"Report Issue",share_feedback:"Share Feedback",get_help:"Get Help",join_discord:"Join Us on Discord",update_available:"The latest version of Sveltia CMS is available.",update_now:"Update Now",backend_status:{minor_incident:"{service} is experiencing a minor incident. Your workflow may be potentially affected.",major_incident:"{service} is experiencing a major incident. You may want to wait until the situation has improved."},content_library:"Content Library",asset_library:"Asset Library",collection_assets:"Collection Assets",entry_assets:"Entry Assets",entry_list:"Entry List",file_list:"File List",asset_list:"Asset List",x_collection:"“{collection}” Collection",x_asset_folder:"“{folder}” Asset Folder",viewing_x_collection_many_entries:"You’re now viewing the “{collection}” collection, which has {count} entries.",viewing_x_collection_one_entry:"You’re now viewing the “{collection}” collection, which has one entry.",viewing_x_collection_no_entries:"You’re now viewing the “{collection}” collection, which has no entries yet.",viewing_x_asset_folder_many_assets:"You’re now viewing the “{folder}” asset folder, which has {count} assets.",viewing_x_asset_folder_one_asset:"You’re now viewing the “{folder}” asset folder, which has one asset.",viewing_x_asset_folder_no_assets:"You’re now viewing the “{folder}” asset folder, which has no assets yet.",collection_not_found:"Collection not found",file_not_found:"File not found.",x_of_x_selected:"{selected} of {total} selected",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort:"Sort",sorting_options:"Sorting Options",sort_keys:{none:"None",name:"Name",commit_author:"Updated by",commit_date:"Updated on"},ascending:"{label}, A to Z",ascending_date:"{label}, old to new",descending:"{label}, Z to A",descending_date:"{label}, new to old",filter:"Filter",filtering_options:"Filtering Options",group:"Group",grouping_options:"Grouping Options",type:"Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",hide_assets:"Hide Assets",show_info:"Show Info",hide_info:"Hide Info",asset_folders:"Asset Folders",all_assets:"All Assets",uncategorized:"Uncategorized",creating_entries_disabled_by_admin:"Creating new entries in this collection is disabled by the administrator.",creating_entries_disabled_by_limit:"You cannot add new entries to this collection because it has reached its limit of {limit} entries.",back_to_collection:"Back to Collection",search_results_for_x:"Search Results for “{terms}”",viewing_search_results:"You’re now viewing search results for “{terms}”. We’ve found {entries} and {assets}.",many_entries:"{count} entries",one_entry:"one entry",no_entries:"no entries",many_assets:"{count} assets",one_asset:"one asset",no_assets:"no assets",no_files_found:"No files found.",no_entries_found:"No entries found.",upload_assets:"Upload New Assets",edit_options:"Edit Options",show_edit_options:"Show Edit Options",edit_asset:"Edit Asset",edit_x:"Edit {name}",wrap_long_lines:"Wrap Long Lines",rename_asset:"Rename Asset",rename_x:"Rename {name}",enter_new_name_for_asset:"Enter a new name below.",enter_new_name_for_asset_with_one_entry:"Enter a new name below. An entry using the asset will also be updated.",enter_new_name_for_asset_with_many_entries:"Enter a new name below. {count} entries using the asset will also be updated.",enter_new_name_for_asset_error:{empty:"File name cannot be empty.",character:"File name cannot contain special characters.",duplicate:"This file name is used for another asset."},replace_asset:"Replace Asset",replace_x:"Replace {name}",browse_file:"Click to browse",drop_or_browse_file:"Drop a file here or click to browse",drop_or_browse_files:"Drop files here or click to browse",drop_or_browse_image_file:"Drop an image file here or click to browse",drop_or_browse_image_files:"Drop image files here or click to browse",drop_file_here:"Drop a file here",drop_files_here:"Drop files here",drop_files_type_mismatch:"The dropped file is not the “{type}” type. Please try again.",choose_file:"Choose File",choose_files:"Choose Files",delete_asset:"Delete Asset",delete_assets:"Delete Assets",delete_selected_asset:"Delete Selected Asset",delete_selected_assets:"Delete Selected Assets",confirm_deleting_this_asset:"Are you sure to delete this asset?",confirm_deleting_selected_asset:"Are you sure to delete the selected asset?",confirm_deleting_selected_assets:"Are you sure to delete the selected {count} assets?",confirm_deleting_all_assets:"Are you sure to delete all the assets?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",delete_selected_entry:"Delete Selected Entry",delete_selected_entries:"Delete Selected Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_this_entry_with_assets:"Are you sure to delete this entry and associated assets?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entry_with_assets:"Are you sure to delete the selected entry and associated assets?",confirm_deleting_selected_entries:"Are you sure to delete the selected {count} entries?",confirm_deleting_selected_entries_with_assets:"Are you sure to delete the selected {count} entries and associated assets?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",confirm_deleting_all_entries_with_assets:"Are you sure to delete all the entries and associated assets?",confirm_replacing_file:"Are you sure to replace “{name}” with the following file?",confirm_uploading_file:"Are you sure to save the following file to the “{folder}” folder?",confirm_uploading_files:"Are you sure to save the following {count} files to the “{folder}” folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_in_collection:"No files available in this collection.",asset_info:"Asset Info",select_asset_show_info:"Select an asset to show the info.",duplicate_entry:"Duplicate Entry",entry_duplicated:"Entry has been duplicated. It’s now a new draft.",entry_validation_error:"One field has an error. Please correct it to save the entry.",entry_validation_errors:"{count} fields have an error. Please correct them to save the entry.",entry_saved:"Entry has been saved.",entry_saved_and_published:"Entry has been saved and published.",entry_deleted:"Entry has been deleted.",entries_deleted:"{count} entries have been deleted.",asset_saved:"Asset has been saved.",asset_saved_and_published:"Asset has been saved and published.",assets_saved:"{count} assets have been saved.",assets_saved_and_published:"{count} assets have been saved and published.",asset_url_copied:"Asset URL has been copied to clipboard.",asset_urls_copied:"Asset URLs have been copied to clipboard.",asset_path_copied:"Asset file path has been copied to clipboard.",asset_paths_copied:"Asset file paths have been copied to clipboard.",asset_data_copied:"Asset file has been copied to clipboard.",asset_downloaded:"Asset file has been downloaded.",assets_downloaded:"Asset files have been downloaded.",asset_moved:"Asset has been moved.",assets_moved:"{count} assets have been moved.",asset_renamed:"Asset has been renamed.",assets_renamed:"{count} assets have been renamed.",asset_deleted:"Asset has been deleted.",assets_deleted:"{count} assets have been deleted.",content_editor:"Content Editor",restore_backup_title:"Restore Draft",restore_backup_description:"This entry has a backup from {datetime}. Do you want to restore the edited draft?",draft_backup_saved:"Draft backup has been saved.",draft_backup_restored:"Draft backup has been restored.",draft_backup_deleted:"Draft backup has been deleted.",cancel_editing:"Cancel Editing",creating_x:"Creating {name}",creating_x_collection_entry:"You’re now creating a new entry in the “{collection}” collection.",editing_x_in_x:"Editing {collection} › {entry}",editing_x_collection_entry:"You’re now editing the “{entry}” entry in the “{collection}” collection.",editing_x_collection_file:"You’re now editing the “{file}” file in the “{collection}” collection.",save_and_publish:"Save and Publish",save_without_publishing:"Save without Publishing",show_editor_options:"Show Editor Options",editor_options:"Editor Options",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",switch_locale:"Switch Locale",locale_content_disabled_short:"(disabled)",locale_content_error_short:"(error)",edit:"Edit",preview:"Preview",edit_x_locale:"Edit {locale} Content",preview_x_locale:"Preview {locale} Content",content_preview:"Content Preview",show_content_options_x_locale:"Show {locale} Content Options",content_options_x_locale:"{locale} Content Options",x_field:"“{field}” Field",show_field_options:"Show Field Options",field_options:"Field Options",unsupported_widget_x:"Unsupported widget: {name}",enable_x_locale:"Enable {locale}",reenable_x_locale:"Reenable {locale}",disable_x_locale:"Disable {locale}",locale_x_has_been_disabled:"The {locale} content has been disabled.",locale_x_now_disabled:"The {locale} content is now disabled. It will be deleted when you save the entry.",view_in_repository:"View in Repository",view_on_x:"View on {service}",view_on_live_site:"View on Live Site",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translation_options:"Translation Options",translate:"Translate",translate_field:"Translate Field",translate_fields:"Translate Fields",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",edit_slug:"Edit Slug",edit_slug_warning:"Changing the slug may break internal and external links to the entry. Currently, Sveltia CMS does not update references created with the Relation widget, so you’ll need to manually update such references along with other links.",edit_slug_error:{empty:"The slug cannot be empty.",duplicate:"This slug is used for another entry."},required:"Required",editor:{translation:{none:"Nothing has been translated.",started:"Translating…",error:"There was an error while translating.",complete:{one:"Translated the field from {source}.",many:"Translated {count} fields from {source}."}},copy:{none:"Nothing has been copied.",complete:{one:"Copied the field from {source}.",many:"Copied {count} fields from {source}."}}},validation:{value_missing:"This field is required.",range_underflow:{number:"Value must be greater than or equal to {min}.",select_many:"You have to select at least {min} items.",select_one:"You have to select at least {min} item.",add_many:"You have to add at least {min} items.",add_one:"You have to add at least {min} item."},range_overflow:{number:"Value must be less than or equal to {max}.",select_many:"You cannot select more than {max} items.",select_one:"You cannot select more than {max} item.",add_many:"You cannot add more than {max} items.",add_one:"You cannot add more than {max} item."},too_short:{one:"You must enter at least {min} character.",many:"You must enter at least {min} characters."},too_long:{one:"You cannot enter more than {max} character.",many:"You cannot enter more than {max} characters."},type_mismatch:{number:"Please enter a number.",email:"Please enter a valid email.",url:"Please enter a valid URL."}},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},viewing_x_asset_details:"You’re viewing the details of the “{name}” asset.",asset_editor:"Asset Editor",preview_unavailable:"Preview Unavailable.",public_url:"Public URL",public_urls:"Public URLs",file_path:"File Path",file_paths:"File Paths",file_data:"File Data",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",select_file:"Select File",select_image:"Select Image",replace_file:"Replace File",replace_image:"Replace Image",remove_file:"Remove File",remove_image:"Remove Image",remove_this_item:"Remove This Item",move_up:"Move Up",move_down:"Move Down",add_x:"Add {name}",select_list_type:"Select List Type",opacity:"Opacity",unselected_option:"(None)",assets_dialog:{title:{file:"Select File",image:"Select Image"},search_for_file:"Search for Files",search_for_image:"Search for Images",locations:"Locations",location:{local:"Your Computer",repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching assets. Please try again later.",image_fetch_failed:"There was an error while downloading the selected asset. Please try again later."},available_images:"Available Images",enter_url:"Enter URL",enter_file_url:"Enter URL of the file:",enter_image_url:"Enter URL of the image:",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"}},character_counter:{min_max:{one:"{count} character entered. Minimum: {min}. Maximum: {max}.",many:"{count} characters entered. Minimum: {min}. Maximum: {max}."},min:{one:"{count} character entered. Minimum: {min}.",many:"{count} characters entered. Minimum: {min}."},max:{one:"{count} character entered. Maximum: {max}.",many:"{count} characters entered. Maximum: {max}."}},youtube_video_player:"YouTube video player",today:"Today",now:"Now",editor_components:{image:"Image",src:"Source",alt:"Alt Text",title:"Title",link:"Link"},key_value:{key:"Key",value:"Value",action:"Action",empty_key:"Key is required.",duplicate_key:"Key must be unique."},boolean:{true:"Yes",false:"No"},cloud_storage:{invalid:"The service is not configured properly.",auth:{initial:"Sign into {service} to insert media on the storage to entry fields.",requested:"Signing in…",error:"User name or password is incorrect. Please double check and try again."}},config:{error:{no_secure_context:"Sveltia CMS only works with HTTPS or localhost URLs.",fetch_failed:"The configuration file could not be retrieved.",fetch_failed_not_ok:"HTTP response returned with status {status}.",parse_failed:"The configuration file could not be parsed.",parse_failed_invalid_object:"The configuration file is not a valid JavaScript object.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_repository:"The repository is not defined in the configuration file.",oauth_implicit_flow:"The configured authentication method (implicit flow) is not supported.",oauth_no_app_id:"OAuth application ID is not defined in the configuration file.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},local_backend:{unsupported_browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",disabled:"Local development is disabled in your browser. <a>Here’s how to enable it</a>."},status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},categories:"Categories",prefs:{changes:{api_key_saved:"API key has been saved.",api_key_removed:"API key has been removed."},error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme",select_theme:"Select Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language",select_language:"Select Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},contents:{title:"Contents",editor:{title:"Editor",close_on_save:{switch_label:"Close the editor after saving a draft"}}},media:{title:"Media",stock_photos:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},accessibility:{title:"Accessibility",underline_links:{title:"Underline Links",description:"Show underline for links in the entry preview and user interface labels.",switch_label:"Always Underline Links"}},advanced:{title:"Advanced",deploy_hook:{title:"Deploy Hook",description:"Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.",field_label:"Deploy Hook URL",url_saved:"Webhook URL has been saved.",url_removed:"Webhook URL has been removed."},developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},keyboard_shortcuts_:{view_content_library:"View Content Library",view_asset_library:"View Asset Library",search:"Search for entries and assets",create_entry:"Create a new entry",save_entry:"Save an entry",cancel_editing:"Cancel entry editing"},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tif:"TIFF image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet",html:"HTML text",js:"JavaScript",json:"JSON text",md:"Markdown text",toml:"TOML text",yaml:"YAML text",yml:"YAML text"},file_size_units:{b:"{size} bytes",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}}},Symbol.toStringTag,{value:"Module"})),iK=Object.freeze(Object.defineProperty({__proto__:null,strings:{collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"アセット",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",user_name:"ユーザー名",password:"パスワード",sign_in:"ログイン",signed_in_as_x:"{name} としてログイン中",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",upload:"アップロード",copy:"コピー",download:"ダウンロード",duplicate:"複製",delete:"削除",save:"保存",saving:"保存中…",rename:"名前を変更",update:"更新",replace:"差し替え",add:"追加",remove:"削除",remove_x:"{name} を削除",clear:"クリア",expand:"広げる",expand_all:"すべて広げる",collapse:"折り畳む",collapse_all:"すべて折り畳む",insert:"挿入",restore:"復元",discard:"破棄",searching:"検索中…",global:"グローバル",primary:"プライマリー",secondary:"セカンダリー",collection:"コレクション",folder:"フォルダー",api_key:"API キー",details:"詳細",clipboard_error:"データのコピー中に問題が発生しました。",welcome_to_sveltia_cms:"Sveltia CMS へようこそ",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",loading_site_data_error:"サイトデータの読み込み中にエラーが発生しました。",sign_in_with_x:"{service} でログイン",authorizing:"認証中…",signing_in:"ログイン中…",work_with_local_repo:"ローカルレポジトリで作業",work_with_local_repo_description:"ボタンをクリックして「{repo}」レポジトリのルートディレクトリを選択してください。",work_with_local_repo_description_no_repo:"ボタンをクリックして Git レポジトリのルートディレクトリを選択してください。",sign_in_error:{not_project_root:"選択されたフォルダーはレポジトリのルートディレクトリではありません。再度お試しください。",picker_dismissed:"レポジトリのルートディレクトリを選択できませんでした。再度お試しください。",authentication_aborted:"認証が中断されました。再度お試しください。",UNSUPPORTED_BACKEND:"この認証アプリはお使いの Git バックエンドに対応していません。",UNSUPPORTED_DOMAIN:"この認証アプリではお使いのドメインの使用は許可されていません。",MISCONFIGURED_CLIENT:"OAuth アプリのクライアント ID またはシークレットが設定されていません。",AUTH_CODE_REQUEST_FAILED:"認証コードを取得できませんでした。後で再度お試しください。",CSRF_DETECTED:"CSRF 攻撃の可能性が検出されたため、認証フローは中断されました。",TOKEN_REQUEST_FAILED:"アクセストークンを要求できませんでした。後で再度お試しください。",MALFORMED_RESPONSE:"サーバーから不正なデータが返されました。後で再度お試しください。"},repository_no_access:"あなたには「{repo}」レポジトリへのアクセス権がありません。",repository_not_found:"「{repo}」レポジトリは存在しません。",repository_empty:"「{repo}」レポジトリにはブランチがありません。",branch_not_found:"「{repo}」レポジトリに「{branch}」ブランチは存在しません。",unexpected_error:"予期せぬエラー",entry_parse_error:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",entry_parse_errors:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",visit_live_site:"管理対象サイトを開く",switch_page:"ページを切り替え",search_placeholder:"エントリーとアセットを検索…",create_entry_or_assets:"エントリーまたはアセットを作成",publish_changes:"変更を公開",publishing_changes:"変更を公開しています…",publishing_changes_failed:"変更を公開できませんでした。後で再度お試しください。",show_notifications:"通知を表示",notifications:"通知",show_account_menu:"アカウントメニューを表示",account:"アカウント",live_site:"管理対象サイト",git_repository:"Git レポジトリ",settings:"設定",site_config:"サイト設定",show_help_menu:"ヘルプメニューを表示",help:"ヘルプ",keyboard_shortcuts:"キーボードショートカット",documentation:"ドキュメンテーション",release_notes:"リリースノート",version_x:"バージョン {version}",report_issue:"問題を報告",share_feedback:"フィードバックを共有",get_help:"サポート",join_discord:"Discord チャンネルに参加",update_available:"Sveltia CMS の最新版が利用可能です。",update_now:"今すぐ更新",backend_status:{minor_incident:"{service} で軽微な障害が発生しています。ワークフローに潜在的な影響が及ぶ可能性があります。",major_incident:"{service} で重大な障害が発生しています。状況が改善されるまで待った方が良いかもしれません。"},content_library:"コンテンツライブラリ",asset_library:"アセットライブラリ",collection_assets:"コレクションアセット",entry_assets:"エントリーアセット",entry_list:"エントリーリスト",file_list:"ファイルリスト",asset_list:"アセットリスト",x_collection:"「{collection}」コレクション",x_asset_folder:"「{folder}」アセットフォルダー",viewing_x_collection_many_entries:"「{collection}」コレクションを表示しています。ここには {count} 個のエントリーがあります。",viewing_x_collection_one_entry:"「{collection}」コレクションを表示しています。ここにはひとつのエントリーがあります。",viewing_x_collection_no_entries:"「{collection}」コレクションを表示しています。ここにはまだエントリーがありません。",viewing_x_asset_folder_many_assets:"「{folder}」アセットフォルダーを表示しています。ここには {count} 個のアセットがあります。",viewing_x_asset_folder_one_asset:"「{folder}」アセットフォルダーを表示しています。ここにはひとつのアセットがあります。",viewing_x_asset_folder_no_assets:"「{folder}」アセットフォルダーを表示しています。ここにはまだアセットがありません。",collection_not_found:"コレクションが見つかりませんでした",file_not_found:"ファイルが見つかりませんでした",x_of_x_selected:"{total} 個のうち {selected} 個を選択中",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort:"並び替え",sorting_options:"並べ替えオプション",sort_keys:{none:"なし",name:"名前",commit_author:"更新者",commit_date:"更新日時"},ascending:"{label} (A–Z)",ascending_date:"{label} (古い順)",descending:"{label} (Z–A)",descending_date:"{label} (新しい順)",filter:"絞り込み",filtering_options:"絞り込みオプション",group:"グループ化",grouping_options:"グループ化オプション",type:"種類",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"アセットを表示",hide_assets:"アセットを隠す",show_info:"情報を表示",hide_info:"情報を隠す",asset_folders:"アセットフォルダー",all_assets:"すべてのアセット",uncategorized:"未分類",creating_entries_disabled_by_admin:"このコレクションへの新しいエントリーの作成は、管理者によって無効化されています。",creating_entries_disabled_by_limit:"このコレクションは最大の {limit} エントリーに達したため、新しいエントリーを作成することはできません。",back_to_collection:"コレクションへ戻る",search_results_for_x:"「{terms}」の検索結果",viewing_search_results:"「{terms}」の検索結果を表示しています。{entries} と {assets} が見つかりました。",many_entries:"{count} 個のエントリー",one_entry:"1 個のエントリー",no_entries:"0 個のエントリー",many_assets:"{count} 個のアセット",one_asset:"1 個のアセット",no_assets:"0 個のアセット",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",upload_assets:"新しいアセットをアップロード",edit_options:"編集オプション",show_edit_options:"編集オプションを表示",edit_asset:"アセットを編集",edit_x:"{name} を編集",wrap_long_lines:"長い行を折り返す",rename_asset:"アセットの名前を変更",rename_x:"{name} の名前を変更",enter_new_name_for_asset:"新しい名前を以下に入力してください。",enter_new_name_for_asset_with_one_entry:"新しい名前を以下に入力してください。このアセットを使用している 1 個のエントリーも更新されます。",enter_new_name_for_asset_with_many_entries:"新しい名前を以下に入力してください。このアセットを使用している {count} 個のエントリーも更新されます。",enter_new_name_for_asset_error:{empty:"ファイル名を空白にすることはできません。",character:"ファイル名に特別な文字を含めることはできません。",duplicate:"このファイル名は他のアセットに使われています。"},replace_asset:"アセットを差し替え",replace_x:"{name} を差し替え",browse_file:"クリックして参照",drop_or_browse_file:"ここにファイルをドロップするかクリックして参照",drop_or_browse_files:"ここにファイルをドロップするかクリックして参照",drop_or_browse_image_file:"ここに画像ファイルをドロップするかクリックして参照",drop_or_browse_image_files:"ここに画像ファイルをドロップするかクリックして参照",drop_file_here:"ここにファイルをドロップ",drop_files_here:"ここにファイルをドロップ",drop_files_type_mismatch:"ドロップされたファイルは「{type}」形式ではありません。再度お試しください。",choose_file:"ファイルを選択",choose_files:"ファイルを選択",delete_asset:"アセットを削除",delete_assets:"アセットを削除",delete_selected_asset:"選択されたアセットを削除",delete_selected_assets:"選択されたアセットを削除",confirm_deleting_this_asset:"このアセットを削除してもよろしいですか?",confirm_deleting_selected_asset:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_assets:"選択された {count} 個のファイルを削除してもよろしいですか?",confirm_deleting_all_assets:"すべてのアセットを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",delete_selected_entry:"選択されたエントリーを削除",delete_selected_entries:"選択されたエントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_this_entry_with_assets:"このエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry_with_assets:"選択されたエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {count} 個のエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries_with_assets:"選択された {count} 個のエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",confirm_deleting_all_entries_with_assets:"すべてのエントリーと関連アセットを削除してもよろしいですか?",confirm_replacing_file:"「{name}」を以下のファイルと差し替えてもよろしいですか?",confirm_uploading_file:"以下のファイルを「{folder}」フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {count} 個のファイルを「{folder}」フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_in_collection:"このコレクションにはファイルがありません。",asset_info:"アセット情報",select_asset_show_info:"アセットを選択すると情報が表示されます。",duplicate_entry:"エントリーを複製",entry_duplicated:"エントリーが複製され、新しい下書きとなりました。",entry_validation_error:"ひとつのフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_validation_errors:"{count} 個のフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_saved:"エントリーが保存されました。",entry_saved_and_published:"エントリーが保存、公開されました。",entry_deleted:"エントリーが削除されました。",entries_deleted:"{count} 個のエントリーが削除されました。",asset_saved:"アセットが保存されました。",asset_saved_and_published:"アセットが保存、公開されました。",assets_saved:"{count} 個のアセットが保存されました。",assets_saved_and_published:"{count} 個のアセットが保存、公開されました。",asset_url_copied:"アセット URL がクリップボードにコピーされました。",asset_urls_copied:"アセット URL がクリップボードにコピーされました。",asset_path_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_paths_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_data_copied:"アセットファイルがクリップボードにコピーされました。",asset_downloaded:"アセットファイルがダウンロードされました。",assets_downloaded:"アセットファイルがダウンロードされました。",asset_moved:"アセットが移動されました。",assets_moved:"{count} 個のアセットが移動されました。",asset_renamed:"アセットの名前が変更されました。",assets_renamed:"{count} 個のアセットの名前が変更されました。",asset_deleted:"アセットが削除されました。",assets_deleted:"{count} 個のアセットが削除されました。",content_editor:"コンテンツエディター",restore_backup_title:"下書きを復元",restore_backup_description:"このエントリーには {datetime} に保存されたバックアップがあります。その編集済みの下書きを復元しますか?",draft_backup_saved:"下書きのバックアップが保存されました。",draft_backup_restored:"下書きのバックアップが復元されました。",draft_backup_deleted:"下書きのバックアップが削除されました。",cancel_editing:"編集をキャンセル",creating_x:"{name} を作成",creating_x_collection_entry:"「{collection}」コレクションの新しいエントリーを作成しています。",editing_x_in_x:"{collection} › {entry} を編集",editing_x_collection_entry:"「{collection}」コレクションの「{entry}」エントリーを編集しています。",editing_x_collection_file:"「{collection}」コレクションの「{file}」ファイルを編集しています。",save_and_publish:"保存して公開",save_without_publishing:"公開せずに保存",show_editor_options:"エディターオプションを表示",editor_options:"エディターオプション",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",switch_locale:"ロケールを切り替え",locale_content_disabled_short:"(無効)",locale_content_error_short:"(エラー)",edit:"編集",preview:"プレビュー",edit_x_locale:"{locale} コンテンツを編集",preview_x_locale:"{locale} コンテンツをプレビュー",content_preview:"コンテンツプレビュー",show_content_options_x_locale:"{locale} コンテンツのオプションを表示",content_options_x_locale:"{locale} コンテンツのオプション",x_field:"「{field}」フィールド",show_field_options:"フィールドオプションを表示",field_options:"フィールドオプション",unsupported_widget_x:"非対応ウィジェット: {name}",enable_x_locale:"{locale} を有効化",reenable_x_locale:"{locale} を再度有効化",disable_x_locale:"{locale} を無効化",locale_x_has_been_disabled:"{locale} コンテンツは無効化されています。",locale_x_now_disabled:"{locale} コンテンツは無効化されました。エントリーを保存する際に削除されます。",view_in_repository:"レポジトリ内で見る",view_on_x:"{service} で見る",view_on_live_site:"管理対象サイトで見る",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translation_options:"翻訳オプション",translate:"翻訳",translate_field:"フィールドを翻訳",translate_fields:"フィールドを翻訳",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",edit_slug:"スラッグを編集",edit_slug_warning:"スラッグを変更すると、エントリーへの内部・外部リンクが壊れる可能性があります。現在のところ、Sveltia CMS は Relation ウィジェットで作成された参照を更新しないため、そのような参照は他のリンクとともに手動で更新する必要があります。",edit_slug_error:{empty:"スラッグは空白にはできません。",duplicate:"このスラッグは他のエントリーに使われています。"},required:"必須",editor:{translation:{none:"翻訳されたフィールドはありません。",started:"翻訳中…",error:"翻訳中に問題が発生しました。",complete:{one:"{source} からフィールドを翻訳しました。",many:"{source} から {count} 個のフィールドを翻訳しました。"}},copy:{none:"コピーされたフィールドはありません。",complete:{one:"{source} からフィールドをコピーしました。",many:"{source} から {count} 個のフィールドをコピーしました。"}}},validation:{value_missing:"この項目は必須です。",range_underflow:{select_many:"少なくとも {min} 個の項目を選択してください。",select_one:"少なくとも {min} 個の項目を選択してください。",add_many:"少なくとも {min} 個の項目を追加してください。",add_one:"少なくとも {min} 個の項目を追加してください。"},range_overflow:{select_many:"選択できるのは最大で {max} 項目です。",select_one:"選択できるのは最大で {max} 項目です。",add_many:"追加できるのは最大で {max} 項目です。",add_one:"追加できるのは最大で {max} 項目です。"},too_short:{one:"少なくとも {min} 文字は入力してください。",many:"少なくとも {min} 文字は入力してください。"},too_long:{one:"{max} 文字を超える入力はできません。",many:"{max} 文字を超える入力はできません。"},type_mismatch:{email:"正しいメールアドレスを入力してください。",url:"正しい URL を入力してください。"}},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},viewing_x_asset_details:"「{name}」アセットの詳細を表示しています。",asset_editor:"アセットエディター",preview_unavailable:"プレビューは表示できません",public_url:"公開 URL",public_urls:"公開 URL",file_path:"ファイルパス",file_paths:"ファイルパス",file_data:"ファイルデータ",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",select_file:"ファイルを選択",select_image:"画像を選択",replace_file:"ファイルを差し替え",replace_image:"画像を差し替え",remove_file:"ファイルを削除",remove_image:"画像を削除",remove_this_item:"このアイテムを削除",move_up:"上へ移動",move_down:"下へ移動",add_x:"{name} を追加",select_list_type:"リストタイプを選択",opacity:"透明度",unselected_option:"(なし)",assets_dialog:{title:{file:"ファイルを選択",image:"画像を選択"},search_for_file:"ファイルを検索",search_for_image:"画像を検索",locations:"場所",location:{local:"お使いのコンピューター",repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},error:{invalid_key:"あなたの API キーは正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"アセットを検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択されたアセットをダウンロード中に問題が発生しました。後で再度お試しください。"},available_images:"利用可能な画像",enter_url:"URL を入力",enter_file_url:"ファイルの URL を入力:",enter_image_url:"画像の URL を入力:",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"}},character_counter:{min_max:{one:"{count} 文字入力されています。最小: {min}。最大 {max}。",many:"{count} 文字入力されています。最小: {min}。最大 {max}。"},min:{one:"{count} 文字入力されています。最小: {min}。",many:"{count} 文字入力されています。最小: {min}。"},max:{one:"{count} 文字入力されています。最大: {max}。",many:"{count} 文字入力されています。最大: {max}。"}},youtube_video_player:"YouTube 動画プレーヤー",today:"今日",now:"現在時刻",editor_components:{image:"画像",src:"ソース",alt:"代替テキスト",title:"タイトル",link:"リンク"},key_value:{key:"キー",value:"値",action:"アクション",empty_key:"キーは必須です。",duplicate_key:"キーが重複しています。"},boolean:{true:"はい",false:"いいえ"},cloud_storage:{invalid:"このサービスは正しく設定されていません。",auth:{initial:"{service} へログインすると、ストレージ上のメディアをエントリー項目へ挿入できます。",requested:"ログイン中…",error:"ユーザー名またはパスワードが間違っています。確認の上、再度お試しください。"}},config:{error:{no_secure_context:"Sveltia CMS は HTTPS またはローカルホスト URL でのみ動作します。",fetch_failed:"設定ファイルを読み込めませんでした。",fetch_failed_not_ok:"HTTP レスポンスがステータス {status} で返されました。",parse_failed:"設定ファイルを解析できませんでした。",parse_failed_invalid_object:"設定ファイルが有効な JavaScript オブジェクトではありません。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_repository:"設定ファイル内でレポジトリが定義されていません。",oauth_implicit_flow:"設定されている認証方式 (暗黙的フロー) は非対応です。",oauth_no_app_id:"設定ファイル内で OAuth アプリケーション ID が定義されていません。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},local_backend:{unsupported_browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",disabled:"お使いのブラウザーではローカル開発が無効化されています。<a>有効化する方法はこちら</a>。"},status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},categories:"カテゴリ",prefs:{changes:{api_key_saved:"API キーが保存されました。",api_key_removed:"API キーが削除されました。"},error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ",select_theme:"テーマを選択"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語",select_language:"言語を選択"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},contents:{title:"コンテンツ",editor:{title:"エディター",close_on_save:{switch_label:"下書き保存後にエディターを閉じる"}}},media:{title:"メディア",stock_photos:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},accessibility:{title:"アクセシビリティ",underline_links:{title:"リンクに下線を付ける",description:"エントリープレビューやユーザーインターフェイスラベル内のリンクに下線を表示します。",switch_label:"常に下線を付ける"}},advanced:{title:"詳細",deploy_hook:{title:"デプロイフック",description:"「変更を公開」を選択して手動でデプロイを実行する際に呼び出すウェブフック URL を入力してください。GitHub Actions を使用する場合は空欄のままで構いません。",field_label:"デプロイフック URL",url_saved:"ウェブフック URL が保存されました。",url_removed:"ウェブフック URL が削除されました。"},developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},keyboard_shortcuts_:{view_content_library:"コンテンツライブラリを表示",view_asset_library:"アセットライブラリを表示",search:"エントリーとアセットを検索",create_entry:"新しいエントリーを作成",save_entry:"エントリーを保存",cancel_editing:"エントリーの編集をキャンセル"},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tif:"TIFF 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート",html:"HTML テキスト",js:"JavaScript",json:"JSON テキスト",md:"Markdown テキスト",toml:"TOML テキスト",yaml:"YAML テキスト",yml:"YAML テキスト"},file_size_units:{b:"{size} バイト",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}}},Symbol.toStringTag,{value:"Module"})),sK=()=>{Object.entries(Object.assign({"/src/lib/locales/en.js":rK,"/src/lib/locales/ja.js":iK})).forEach(([e,{strings:n}])=>{const r=$n(e).filename;Zg(r,n)}),iS({fallbackLocale:"en",initialLocale:ne(Tt).locale||(u$()??"").split("-")[0]||"en"})};var oK=F('<link rel="icon">'),aK=F('<meta name="referrer" content="same-origin"> <meta name="robots" content="noindex"> <!> <!>',1),lK=F('<div role="none" class="outer svelte-1729mpr"><!> <!> <div role="none" class="main svelte-1729mpr"><!> <!></div></div>'),cK=F('<!> <div role="status" class="svelte-1729mpr"> </div>',1);const uK={hash:"svelte-1729mpr",code:"body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-1729mpr {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-1729mpr {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-1729mpr {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}"};function dK(t,e){se(e,!0),Ee(t,uK);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(xf,"$isLoading",n),o=()=>z(Nn,"$backend",n),a=()=>z(fi,"$user",n),c=()=>z(Nc,"$dataLoaded",n),u=()=>z(Rs,"$announcedPageStatus",n);ln(()=>{sK(),YB(e.config)}),ln(()=>{const d=document.querySelector("#nc-root");if(d&&window.getComputedStyle(d).position==="static"){const{top:f,height:h}=d.getBoundingClientRect();h?d.style.position="relative":(d.style.position="fixed",d.style.inset=`${f}px 0 0 0`)}}),mw(d=>{var f=aK(),h=D(M(f),4);{var p=m=>{var v=oK();const _=w(()=>i().logo_url);q((b,y)=>{ke(v,"href",b),ke(v,"type",y)},[()=>l(_)||`data:image/svg+xml;base64,${btoa(aS)}`,()=>l(_)?Mo.getType(l(_))??void 0:"image/svg+xml"]),T(m,v)};U(h,m=>{i()&&m(p)})}var g=D(h,2);U(g,m=>{}),T(d,f)}),_i("mousedown",_g.body,d=>{d.target?.matches("a")&&d.target.origin!==window.location.origin&&(d.target.target="_blank")}),fF(t,{children:(d,f)=>{var h=cK(),p=M(h);{var g=_=>{var b=lK(),y=R(b);Tq(y,{});var x=D(y,2);{var k=O=>{kq(O,{})};U(x,O=>{o()&&O(k)})}var S=D(x,2),C=R(S);yq(C,{});var E=D(C,2);{var A=O=>{nK(O,{})};U(E,O=>{a()&&c()&&O(A)})}T(_,b)};U(p,_=>{s()||_(g)})}var m=D(p,2),v=R(m);q(()=>Z(v,u())),T(d,h)},$$slots:{default:!0}}),oe(),r()}const fK=["registerEditorComponent","registerEventListener","registerPreviewStyle","registerPreviewTemplate","registerWidget"],hK=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerLocale","registerMediaLibrary","registerRemarkPlugin","registerWidgetValueSerializer","removeEventListener","resolveWidget"],pK="https://github.com/sveltia/sveltia-cms#compatibility";let IA=!1;const og=async({config:t={}}={})=>{IA||(IA=!0,document.readyState==="loading"&&!document.querySelector("#nc-root")&&await new Promise(e=>{window.addEventListener("DOMContentLoaded",()=>e(void 0),{once:!0})}),Cg(dK,{target:document.querySelector("#nc-root")??document.body,props:{config:t}}))},gK=(t,e,{fromFile:n,toFile:r})=>{pf[t]={extension:e,parser:n,formatter:r}},RA=new Proxy({init:og,registerCustomFormat:gK},{get:(t,e)=>{if(e in t)return t[e];let n="";if(fK.includes(e)&&(n="CMS.%s() is not yet supported in Sveltia CMS, but we plan to implement it soon."),hK.includes(e)&&(n="CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it."),n)return console.error(`${n} See %s for compatibility information.`,e,pK),()=>{}}});return window.CMS=RA,window.initCMS=og,!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&og(),qd.default=RA,qd.init=og,Object.defineProperties(qd,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),qd})({});
591
+ ${l(o)??""}`)),T(C,E)};U(k,C=>{l(d)&&C(S)})}q(C=>{ke(v,"aria-label",C),ht(y,"invalid",l(f)),Z(x,l(c))},[()=>i()(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(s),max:l(o)}})]),T(m,v)};U(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function DV(t,e){se(e,!0);const[n,r]=me();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const u=w(()=>it(e.fieldConfig.type,"text")),d=w(()=>it(e.fieldConfig.prefix,"")),f=w(()=>it(e.fieldConfig.suffix,"")),{extraHint:h}=cs("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&$(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(f))&&(m=`${l(d)}${m}${l(f)}`),i()!==m&&i(m)};Ue(()=>{i(),xe(()=>{p()})}),Ue(()=>{l(c),xe(()=>{g()})}),Ue(()=>{h&&ot(h,TA)}),yn(t,{get lang(){return e.locale},get type(){return l(u)},get inputmode(){return l(u)},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(c)},set value(m){$(c,ie(m))}}),oe(),r()}var MV=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),FV=F("<a> </a>"),zV=F('<div role="none"><!></div>');const jV={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function UV(t,e){se(e,!0),Ee(t,jV);const[n,r]=me(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>jB(e.url));ln(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&$(o,!1)})});var c=zV(),u=R(c);{var d=h=>{var p=V(),g=M(p);hr(g,()=>su(l(s)),null,m=>{var v=MV();q((_,b)=>{ke(v,"src",_),ke(v,"title",b)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,v)}),T(h,p)},f=h=>{var p=FV(),g=R(p);q(m=>{ke(p,"href",m),Z(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};U(u,h=>{l(o)?h(d):h(f,!1)})}Pt(c,h=>$(s,h),()=>l(s)),T(t,c),oe(),r()}var BV=F("<a> </a>"),qV=F("<a> </a>"),HV=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const VV={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function WV(t,e){se(e,!0),Ee(t,VV);const n=w(()=>e.fieldConfig.name),r=w(()=>it(e.fieldConfig.type,"text"));var i=V(),s=M(i);{var o=a=>{var c=HV(),u=R(c);{var d=h=>{var p=V(),g=M(p);{var m=_=>{UV(_,{get url(){return e.currentValue}})},v=_=>{var b=BV(),y=R(b);q(x=>{ke(b,"href",x),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)};U(g,_=>{zB(e.currentValue)?_(m):_(v,!1)})}T(h,p)},f=h=>{var p=V(),g=M(p);{var m=_=>{var b=qV(),y=R(b);q(x=>{ke(b,"href",`mailto:${x??""}`),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)},v=_=>{var b=Be();q(()=>Z(b,e.currentValue)),T(_,b)};U(g,_=>{l(r)==="email"?_(m):_(v,!1)},!0)}T(h,p)};U(u,h=>{l(r)==="url"||Dg(e.currentValue)?h(d):h(f,!1)})}q(()=>{ke(c,"lang",e.locale),ht(c,"title",l(n)==="title"),c.dir=c.dir}),T(a,c)};U(s,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(o)})}T(t,i),oe()}function GV(t,e){se(e,!0);const[n,r]=me();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const{extraHint:u}=cs("field-editor")??{},d=()=>{const h=typeof i()=="string"?i():"";l(c)!==h&&$(c,ie(h))},f=()=>{const h=l(c);i()!==h&&i(h)};Ue(()=>{i(),xe(()=>{d()})}),Ue(()=>{l(c),xe(()=>{f()})}),Ue(()=>{u&&ot(u,TA)}),$h(t,{get lang(){return e.locale},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(c)},set value(h){$(c,ie(h))}}),oe(),r()}var KV=F('<p dir="auto" class="svelte-tzbr78"> </p>');const YV={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function JV(t,e){se(e,!0),Ee(t,YV);var n=V(),r=M(n);{var i=s=>{var o=KV(),a=R(o);q(()=>{ke(o,"lang",e.locale),Z(a,e.currentValue),o.dir=o.dir}),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}function ZV(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>i()?.collection),d=w(()=>i()?.collectionFile),f=w(()=>(l(d)??l(u))?._i18n??$i),h=w(()=>l(f).defaultLocale);ln(()=>{s()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s($C(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);yn(t,{flex:!0,get readonly(){return l(p)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return s()},set value(g){s(g)}}),oe(),r()}var XV=F('<p class="svelte-1e2mlgo"> </p>');const QV={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function eW(t,e){se(e,!0),Ee(t,QV);var n=V(),r=M(n);{var i=s=>{var o=XV(),a=R(o);q(()=>Z(a,e.currentValue)),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}const sg={boolean:o6,code:c6,color:m6,compute:y6,datetime:T6,file:vA,image:vA,keyvalue:A9,list:H9,markdown:uV,number:gV,object:SV,relation:AV,select:EA,string:DV,text:GV,uuid:ZV},CA={boolean:l6,code:d6,color:_6,compute:x6,datetime:P6,file:bA,image:bA,keyvalue:L9,list:Q9,markdown:pV,number:vV,object:EV,relation:OV,select:NV,string:WV,text:JV,uuid:eW};function by(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(nt,"$entryDraft",n);let a=P(e,"keyPath",3,""),c=P(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var f=V(),h=M(f);dt(h,17,()=>e.otherLocales,Xn,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ts(l(g))}})),v=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!Gr(o().currentValues[l(g)])[a()]||!c()&&a()&&Gr(o().currentValues[l(g)])[a()]===Gr(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));Lt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{lA(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,f),oe(),r()}function AA(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(le,"$_",n);let a=P(e,"size",3,"medium"),c=P(e,"keyPath",3,"");const u=w(()=>i()??{}),d=w(()=>l(u).getSourceLanguage),f=w(()=>l(u).getTargetLanguage),h=w(()=>!s()?.currentLocales[e.locale]||!l(d)(e.locale));var p=V(),g=M(p);{var m=_=>{const b=w(()=>{const[k]=e.otherLocales;return{otherLocale:k}}),y=w(()=>o()("translate_from_x",{values:{locale:Ts(l(b).otherLocale)}})),x=w(()=>l(h)||!s()?.currentLocales[l(b).otherLocale]||!l(f)(l(b).otherLocale));Je(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get title(){return l(y)},get disabled(){return l(x)},onclick:()=>{lA(l(b).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{et(S,{name:"translate"})},$$slots:{startIcon:!0}})},v=_=>{const b=w(()=>o()("translate"));Er(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(b)},get disabled(){return l(h)},endIcon:k=>{et(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));mr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{by(C,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})};U(g,_=>{e.otherLocales.length===1?_(m):_(v,!1)})}T(t,p),oe(),r()}var tW=F('<div class="required svelte-1tqwg2k">*</div>'),nW=F("<!> <!>",1),rW=F('<p class="comment svelte-1tqwg2k"><!></p>'),iW=F("<!> <!> <!> <!> <!> <!> <!>",1),sW=F('<div role="none"> </div>'),oW=F('<div role="none" class="before-input svelte-1tqwg2k"><!></div>'),aW=F('<div role="none" class="prefix svelte-1tqwg2k"> </div>'),lW=F('<div role="none" class="suffix svelte-1tqwg2k"> </div>'),cW=F('<div role="none" class="after-input svelte-1tqwg2k"><!></div>'),uW=F("<!> <!> <!> <!> <!>",1),dW=F('<p class="hint svelte-1tqwg2k"><!></p>'),fW=F('<div role="none" class="footer svelte-1tqwg2k"><!> <!></div>'),hW=F('<section role="group" class="field svelte-1tqwg2k"><header role="none" class="svelte-1tqwg2k"><h4 role="none" class="svelte-1tqwg2k"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none" class="widget-wrapper svelte-1tqwg2k"><!></div> <!></section>');const pW={hash:"svelte-1tqwg2k",code:`section.svelte-1tqwg2k {padding:16px;}section.svelte-1tqwg2k:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-1tqwg2k > :where(.svelte-1tqwg2k) {margin-right:auto;margin-left:auto;max-width:768px;}header.svelte-1tqwg2k {display:flex;align-items:center;margin-bottom:8px;height:var(--sui-button-small-height);}header.svelte-1tqwg2k h4:where(.svelte-1tqwg2k) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}header.svelte-1tqwg2k .required:where(.svelte-1tqwg2k) {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}.widget-wrapper.has-extra-labels.svelte-1tqwg2k {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-1tqwg2k input[type="text"],
592
+ .widget-wrapper.svelte-1tqwg2k textarea {width:100%;}.widget-wrapper.svelte-1tqwg2k input[type="color"],
593
+ .widget-wrapper.svelte-1tqwg2k input[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-1tqwg2k input[type="file"],
594
+ .widget-wrapper.svelte-1tqwg2k input[type="checkbox"], .widget-wrapper.svelte-1tqwg2k > div {color:inherit;}.widget-wrapper.svelte-1tqwg2k input[type="date"],
595
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"],
596
+ .widget-wrapper.svelte-1tqwg2k input[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-1tqwg2k input[type="date"]:disabled,
597
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"]:disabled,
598
+ .widget-wrapper.svelte-1tqwg2k input[type="time"]:disabled {opacity:0.4;}.widget-wrapper.svelte-1tqwg2k input[type="color"][aria-invalid="true"],
599
+ .widget-wrapper.svelte-1tqwg2k input[type="date"][aria-invalid="true"],
600
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"][aria-invalid="true"],
601
+ .widget-wrapper.svelte-1tqwg2k input[type="time"][aria-invalid="true"] {border-color:var(--sui-error-border-color);}.before-input.svelte-1tqwg2k,
602
+ .after-input.svelte-1tqwg2k,
603
+ .prefix.svelte-1tqwg2k,
604
+ .suffix.svelte-1tqwg2k {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-1tqwg2k {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-1tqwg2k {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-1tqwg2k {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function _y(t,e){se(e,!0),Ee(t,pW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=()=>z(u,"$extraHint",n),a=er("field"),c=ye=>li.sanitize(Ot.parseInline(ye.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),u=st();bg("field-editor",{extraHint:u});const d=w(()=>e.fieldConfig.name),f=w(()=>it(e.fieldConfig.label,"")),h=w(()=>it(e.fieldConfig.comment,"")),p=w(()=>it(e.fieldConfig.hint,"")),g=w(()=>it(e.fieldConfig.widget,"string")),m=w(()=>it(e.fieldConfig.i18n,!1)),v=w(()=>it(e.fieldConfig.pattern,()=>[],!0)),_=w(()=>xd({fieldConfig:e.fieldConfig,locale:e.locale})),b=w(()=>e.fieldConfig.field),y=w(()=>e.fieldConfig.fields),x=w(()=>e.fieldConfig.types),k=w(()=>!!l(b)||!!l(y)||!!l(x)),S=w(()=>e.fieldConfig.min),C=w(()=>e.fieldConfig.max),E=w(()=>l(g)==="string"?e.fieldConfig.type??"text":l(g)==="number"?"number":void 0),A=w(()=>["string"].includes(l(g))),O=w(()=>l(A)?e.fieldConfig.prefix:void 0),L=w(()=>l(A)?e.fieldConfig.suffix:void 0),I=w(()=>["boolean","number","string"].includes(l(g))),N=w(()=>l(I)?e.fieldConfig.before_input:void 0),j=w(()=>l(I)?e.fieldConfig.after_input:void 0),H=w(()=>!!(l(O)||l(L)||l(N)||l(j))),B=w(()=>["relation","select"].includes(l(g))),W=w(()=>l(B)?e.fieldConfig.multiple:void 0),G=w(()=>l(g)==="list"&&l(k)||l(W)||l(g)==="keyvalue"),K=w(()=>l(g)==="list"||l(B)&&l(W)),ee=w(()=>i()?.collection),J=w(()=>i()?.collectionFile),Y=w(()=>i()?.originalValues),te=w(()=>(l(J)??l(ee))?._i18n??$i),ce=w(()=>l(te).i18nEnabled),he=w(()=>l(te).allLocales),re=w(()=>l(te).defaultLocale),X=w(()=>l(ce)?l(he).filter(ye=>ye!==e.locale):[]),fe=w(()=>l(ce)&&(l(m)===!0||l(m)==="translate")),be=w(()=>l(ce)&&l(m)==="duplicate"),ue=w(()=>e.locale===l(re)||l(fe)||l(be)),Te=w(()=>new RegExp(`^${cn(e.keyPath)}\\.\\d+$`)),_e=w(()=>l(K)?Object.entries(Gr(i()?.currentValues[e.locale]??{})).filter(([ye])=>l(Te).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):Gr(i()?.currentValues[e.locale])?.[e.keyPath]),Ae=w(()=>l(K)?Object.entries(l(Y)?.[e.locale]??{}).filter(([ye])=>l(Te).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):l(Y)?.[e.locale]?.[e.keyPath]),Ce=w(()=>i()?.validities[e.locale][e.keyPath]),$e=w(()=>l(f)||l(d)),Ve=w(()=>l(m)==="duplicate"&&e.locale!==l(re)||l(g)==="compute"),We=w(()=>l(Ce)?.valid===!1);var pt=V(),Ke=M(pt);{var ge=ye=>{var we=hW();const Se=w(()=>l(fe)&&l(X).length),Ie=w(()=>!(l(be)&&e.locale!==l(re)));var ve=R(we),Pe=R(ve);ke(Pe,"id",`${a??""}-label`);var qe=R(Pe),Xe=D(Pe,2);{var ct=wt=>{var nn=tW();q(In=>ke(nn,"aria-label",In),[()=>s()("required")]),T(wt,nn)};U(Xe,wt=>{!l(Ve)&&l(_)&&wt(ct)})}var Ye=D(Xe,2);Yr(Ye,{flex:!0});var rt=D(Ye,2);{var ft=wt=>{AA(wt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(rt,wt=>{l(Se)&&["markdown","string","text","list","object"].includes(l(g))&&wt(ft)})}var ut=D(rt,2);{var bt=wt=>{const nn=w(()=>s()("show_field_options"));Er(wt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(nn)},popup:Pn=>{const qt=w(()=>s()("field_options"));mr(Pn,{get"aria-label"(){return l(qt)},children:(Zt,bn)=>{var Un=nW(),or=M(Un);{var ar=yr=>{by(yr,{get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(or,yr=>{l(Se)&&yr(ar)})}var pi=D(or,2);{var Ms=yr=>{const Hn=w(()=>s()("revert_changes")),Bt=w(()=>Mn(l(_e),l(Ae)));Lt(yr,{get label(){return l(Hn)},get disabled(){return l(Bt)},onclick:()=>{py(e.locale,e.keyPath)}})};U(pi,yr=>{l(Ie)&&yr(Ms)})}T(Zt,Un)},$$slots:{default:!0}})},$$slots:{popup:!0}})};U(ut,wt=>{(l(Se)||l(Ie))&&wt(bt)})}var At=D(ve,2);{var an=wt=>{var nn=rW(),In=R(nn);pr(In,()=>c(l(h))),T(wt,nn)};U(At,wt=>{!l(Ve)&&l(h)&&wt(an)})}var jn=D(At,2);{var sr=wt=>{_A(wt,{id:`${a??""}-error`,children:(nn,In)=>{var Pn=iW(),qt=M(Pn);{var Zt=Qe=>{var St=Be();q(On=>Z(St,On),[()=>s()("validation.value_missing")]),T(Qe,St)};U(qt,Qe=>{l(Ce).valueMissing&&Qe(Zt)})}var bn=D(qt,2);{var Un=Qe=>{var St=Be();const On=w(()=>{const{minlength:lr}=e.fieldConfig;return{minlength:lr}});q(lr=>Z(St,lr),[()=>s()(l(On).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l(On).minlength}})]),T(Qe,St)};U(bn,Qe=>{l(Ce).tooShort&&Qe(Un)})}var or=D(bn,2);{var ar=Qe=>{var St=Be();const On=w(()=>{const{maxlength:lr}=e.fieldConfig;return{maxlength:lr}});q(lr=>Z(St,lr),[()=>s()(l(On).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l(On).maxlength}})]),T(Qe,St)};U(or,Qe=>{l(Ce).tooLong&&Qe(ar)})}var pi=D(or,2);{var Ms=Qe=>{var St=V();const On=w(()=>l(S)===1?"one":"many");var lr=M(St);{var po=Vn=>{var cr=Be();q(as=>Z(cr,as),[()=>s()("validation.range_underflow.number",{values:{min:l(S)}})]),T(Vn,cr)},Qo=Vn=>{var cr=V(),as=M(cr);{var ls=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_underflow.add_${l(On)}`,{values:{min:l(S)}})]),T(wr,ur)},rl=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_underflow.select_${l(On)}`,{values:{min:l(S)}})]),T(wr,ur)};U(as,wr=>{l(G)?wr(ls):wr(rl,!1)},!0)}T(Vn,cr)};U(lr,Vn=>{l(g)==="number"?Vn(po):Vn(Qo,!1)})}T(Qe,St)};U(pi,Qe=>{l(Ce).rangeUnderflow&&Qe(Ms)})}var yr=D(pi,2);{var Hn=Qe=>{var St=V();const On=w(()=>l(C)===1?"one":"many");var lr=M(St);{var po=Vn=>{var cr=Be();q(as=>Z(cr,as),[()=>s()("validation.range_overflow.number",{values:{max:l(C)}})]),T(Vn,cr)},Qo=Vn=>{var cr=V(),as=M(cr);{var ls=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_overflow.add_${l(On)}`,{values:{max:l(C)}})]),T(wr,ur)},rl=wr=>{var ur=Be();q(Fi=>Z(ur,Fi),[()=>s()(`validation.range_overflow.select_${l(On)}`,{values:{max:l(C)}})]),T(wr,ur)};U(as,wr=>{l(G)?wr(ls):wr(rl,!1)},!0)}T(Vn,cr)};U(lr,Vn=>{l(g)==="number"?Vn(po):Vn(Qo,!1)})}T(Qe,St)};U(yr,Qe=>{l(Ce).rangeOverflow&&Qe(Hn)})}var Bt=D(yr,2);{var gi=Qe=>{var St=Be();q(()=>Z(St,l(v)[1])),T(Qe,St)};U(Bt,Qe=>{l(Ce).patternMismatch&&Qe(gi)})}var Wt=D(Bt,2);{var rn=Qe=>{var St=Be();q(On=>Z(St,On),[()=>s()(`validation.type_mismatch.${l(E)}`)]),T(Qe,St)};U(Wt,Qe=>{l(Ce).typeMismatch&&Qe(rn)})}T(nn,Pn)}})};U(jn,wt=>{l(Ce)?.valid===!1&&wt(sr)})}var Lr=D(jn,2),os=R(Lr);{var Mi=wt=>{var nn=sW(),In=R(nn);q(Pn=>Z(In,Pn),[()=>s()("unsupported_widget_x",{values:{name:l(g)}})]),T(wt,nn)},It=wt=>{var nn=V(),In=M(nn);{var Pn=Zt=>{var bn=V();const Un=w(()=>sg[l(g)]);var or=M(bn);yi(or,()=>l(Un),(ar,pi)=>{pi(ar,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)}})}),T(Zt,bn)},qt=Zt=>{var bn=uW();const Un=w(()=>sg[l(g)]);var or=M(bn);{var ar=rn=>{var Qe=oW(),St=R(Qe);pr(St,()=>c(l(N))),T(rn,Qe)};U(or,rn=>{l(N)&&rn(ar)})}var pi=D(or,2);{var Ms=rn=>{var Qe=aW(),St=R(Qe);q(()=>Z(St,l(O))),T(rn,Qe)};U(pi,rn=>{l(O)&&rn(Ms)})}var yr=D(pi,2);yi(yr,()=>l(Un),(rn,Qe)=>{Qe(rn,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)},get currentValue(){return i().currentValues[e.locale][e.keyPath]},set currentValue(St){Ct(nt,xe(i).currentValues[e.locale][e.keyPath]=St,xe(i))}})});var Hn=D(yr,2);{var Bt=rn=>{var Qe=lW(),St=R(Qe);q(()=>Z(St,l(L))),T(rn,Qe)};U(Hn,rn=>{l(L)&&rn(Bt)})}var gi=D(Hn,2);{var Wt=rn=>{var Qe=cW(),St=R(Qe);pr(St,()=>c(l(j))),T(rn,Qe)};U(gi,rn=>{l(j)&&rn(Wt)})}T(Zt,bn)};U(In,Zt=>{l(K)?Zt(Pn):Zt(qt,!1)},!0)}T(wt,nn)};U(os,wt=>{l(g)in sg?wt(It,!1):wt(Mi)})}var An=D(Lr,2);{var Kt=wt=>{var nn=fW();const In=w(o);var Pn=R(nn);{var qt=bn=>{var Un=dW(),or=R(Un);pr(or,()=>c(l(p))),T(bn,Un)};U(Pn,bn=>{l(p)&&bn(qt)})}var Zt=D(Pn,2);yi(Zt,()=>l(In),(bn,Un)=>{Un(bn,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)}})}),T(wt,nn)};U(An,wt=>{!l(Ve)&&(l(p)||o())&&wt(Kt)})}q(wt=>{ke(we,"aria-label",wt),ke(we,"data-widget",l(g)),ke(we,"data-key-path",e.keyPath),we.hidden=l(g)==="compute",Z(qe,l($e)),ht(Lr,"has-extra-labels",l(H))},[()=>s()("x_field",{values:{field:l($e)}})]),T(ye,we)};U(Ke,ye=>{i()&&l(ue)&&l(g)!=="hidden"&&ye(ge)})}T(t,pt),oe(),r()}function gW(t,e){se(e,!0);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=w(()=>i()?.collection),o=w(()=>i()?.collectionFile),a=w(()=>l(o)?.fields??l(s)?.fields??[]);var c=V(),u=M(c);dt(u,17,()=>l(a),d=>d.name,(d,f)=>{var h=V(),p=M(h);hr(p,()=>hn(0),null,g=>{_y(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),T(t,c),oe(),r()}var mW=F('<div role="document" class="svelte-t01vxl"></div>');const vW={hash:"svelte-t01vxl",code:"div.svelte-t01vxl {padding:8px 16px;}"};function bW(t,e){se(e,!0),Ee(t,vW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n),o=w(()=>i()?.collection),a=w(()=>i()?.collectionFile),c=w(()=>l(a)?.fields??l(o)?.fields??[]);var u=mW();dt(u,21,()=>l(c),d=>d.name,(d,f)=>{var h=V(),p=M(h);hr(p,()=>hn(0),null,g=>{vy(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),q(d=>ke(u,"aria-label",d),[()=>s()("content_preview")]),T(t,u),oe(),r()}var _W=F('<div role="none" class="content svelte-1g8n4fi"><!></div>'),yW=F('<span role="alert"> </span> <!>',1),wW=F('<div role="none" class="wrapper svelte-1g8n4fi"><!></div>');const xW={hash:"svelte-1g8n4fi",code:'@charset "UTF-8";.wrapper.svelte-1g8n4fi {display:contents;}.wrapper.svelte-1g8n4fi > .group {display:contents;}.content.svelte-1g8n4fi {flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;}'};function PA(t,e){se(e,!0),Ee(t,xW);const[n,r]=me(),i=()=>z(Di,"$entryEditorSettings",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(nt,"$entryDraft",n),a=()=>z(le,"$_",n);let c=P(e,"thisPaneContentArea",15),u=P(e,"thatPaneContentArea",15);const d=w(()=>i()??{}),f=w(()=>l(d).syncScrolling),h=w(()=>s()?.locale),p=w(()=>s()?.mode),g=w(()=>!!l(h)&&!!Gr(o()?.currentValues[l(h)])),m=w(()=>({values:{locale:l(h)?Ts(l(h)):""}})),v=w(()=>l(p)==="preview"?bW:gW),_=()=>{window.requestAnimationFrame(()=>{if(!l(f)||!c()||!u())return;const{x:C,y:E}=c().getBoundingClientRect(),A=document.elementsFromPoint(C+80,E).find(H=>H.matches("[data-key-path]"));if(!A)return;const{keyPath:O}=A.dataset,{top:L,height:I}=A.getBoundingClientRect(),N=(E-L)/I,j=u().querySelector(`[data-key-path="${CSS.escape(O??"")}"]`);N<0||N>1||!j||u(u().scrollTop=j.offsetTop-E+j.clientHeight*N,!0)})},b={capture:!0,passive:!0};Ue(()=>{c()&&(c(c().scrollTop=0,!0),c().addEventListener("wheel",_,b),c().addEventListener("touchmove",_,b))});var y=wW(),x=R(y);{var k=C=>{var E=_W(),A=R(E);yi(A,()=>l(v),(O,L)=>{L(O,{get locale(){return l(h)}})}),Pt(E,O=>c(O),()=>c()),T(C,E)},S=C=>{var E=V(),A=M(E);{var O=L=>{$r(L,{children:(I,N)=>{var j=yW(),H=M(j),B=R(H),W=D(H,2);const G=w(()=>a()(l(g)?"reenable_x_locale":"enable_x_locale",l(m)));Je(W,{variant:"tertiary",get label(){return l(G)},onclick:()=>{l(h)&&aA(l(h))}}),q(K=>Z(B,K),[()=>a()(l(g)?"locale_x_now_disabled":"locale_x_has_been_disabled",l(m))]),T(I,j)},$$slots:{default:!0}})};U(A,L=>{l(p)==="edit"&&L(O)},!0)}T(C,E)};U(x,C=>{l(h)&&o()?.currentLocales[l(h)]?C(k):C(S,!1)})}q(()=>ke(y,"id",e.id)),T(t,y),oe(),r()}var kW=F('<div class="inner svelte-1ivrcdt"><!> <!></div>'),SW=F('<div class="outer svelte-1ivrcdt"><!></div>');const EW={hash:"svelte-1ivrcdt",code:`.outer.svelte-1ivrcdt {display:contents;}.outer.svelte-1ivrcdt .combobox.error [role="combobox"] {border-color:var(--sui-error-border-color);}.inner.svelte-1ivrcdt {display:contents;}.inner.svelte-1ivrcdt .error,
605
+ .inner.svelte-1ivrcdt .error button {color:var(--sui-error-foreground-color) !important;}`};function TW(t,e){se(e,!0),Ee(t,EW);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(d(),"$thatPane",n),a=()=>z(le,"$_",n),c=()=>z(e.thisPane,"$thisPane",n),u=()=>z(Di,"$entryEditorSettings",n);let d=P(e,"thatPane",19,()=>st(null));const f=w(()=>i()?.editor?.preview??!0),h=w(()=>s()?.collection),p=w(()=>s()?.collectionFile),g=w(()=>(l(p)??l(h))?._i18n??$i),m=w(()=>l(g).allLocales),v=w(()=>l(m).filter(N=>!(o()?.mode==="edit"&&o().locale===N))),_=w(()=>Object.entries(s()?.validities??{}).some(([N,j])=>l(v).includes(N)&&Object.values(j??{}).some(({valid:H})=>!H))),b=w(()=>(l(p)??l(h))?.editor?.preview??l(f)),y=w(()=>l(m).length>=5),x=w(()=>l(y)?du:Cf),k=w(()=>l(y)?gr:ou),S=w(()=>l(y)?void 0:"tertiary"),C=w(()=>l(y)?void 0:"small");var E=SW(),A=R(E);const O=w(()=>l(_)?"error":void 0),L=w(()=>a()("switch_locale")),I=w(()=>e.id.replace("-header","-body"));yi(A,()=>l(x),(N,j)=>{j(N,{get class(){return l(O)},get"aria-label"(){return l(L)},get"aria-controls"(){return l(I)},children:(H,B)=>{var W=kW(),G=R(W);dt(G,17,()=>l(v),Xn,(J,Y)=>{var te=V();const ce=w(()=>Ts(l(Y))),he=w(()=>!s()?.currentLocales[l(Y)]),re=w(()=>Object.values(s()?.validities[l(Y)]??{}).some(({valid:_e})=>!_e));var X=M(te);const fe=w(()=>l(ce)),be=w(()=>l(he)?a()("locale_content_disabled_short"):l(re)?a()("locale_content_error_short"):""),ue=w(()=>c()?.mode==="edit"&&c().locale===l(Y)),Te=w(()=>l(re)?"error":"");yi(X,()=>l(k),(_e,Ae)=>{Ae(_e,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get"aria-label"(){return`${l(fe)??""} ${l(be)??""}`},get selected(){return l(ue)},get class(){return l(Te)},onSelect:()=>{ot(e.thisPane,{mode:"edit",locale:l(Y)}),o()?.mode==="preview"&&ot(d(),{mode:"preview",locale:l(Y)})},startIcon:$e=>{var Ve=V(),We=M(Ve);{var pt=ge=>{et(ge,{name:"edit_off"})},Ke=ge=>{var ye=V(),we=M(ye);{var Se=Ie=>{et(Ie,{name:"error"})};U(we,Ie=>{l(re)&&Ie(Se)},!0)}T(ge,ye)};U(We,ge=>{l(he)?ge(pt):ge(Ke,!1)})}T($e,Ve)},$$slots:{startIcon:!0}})}),T(J,te)});var K=D(G,2);{var ee=J=>{var Y=V(),te=M(Y);const ce=w(()=>a()("preview")),he=w(()=>c()?.mode==="preview");yi(te,()=>l(k),(re,X)=>{X(re,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get selected(){return l(he)},onSelect:()=>{ot(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})}),T(J,Y)};U(K,J=>{o()?.mode==="edit"&&l(b)&&u()?.showPreview&&J(ee)})}T(H,W)},$$slots:{default:!0}})}),T(t,E),oe(),r()}var CW=F('<h3 role="none"> </h3>'),AW=F("<!> <!>",1),PW=F("<!> <!> <!>",1),OW=F("<!> <!> <!> <!>",1),$W=F("<!> <!>",1),LW=F("<!> <!> <!>",1),NW=F('<div role="none" class="header svelte-2uraod"><!></div>');const IW={hash:"svelte-2uraod",code:'.header.svelte-2uraod {flex:none !important;}.header.svelte-2uraod > [role="toolbar"] {margin-right:auto;margin-left:auto;max-width:800px;}.header.svelte-2uraod > [role="toolbar"] h3 {margin:0 8px;font-size:var(--sui-font-size-default);}'};function OA(t,e){se(e,!0),Ee(t,IW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(Nn,"$backend",n);let u=P(e,"thatPane",19,()=>st(null));const d=w(()=>i()?.collection),f=w(()=>i()?.collectionFile),h=w(()=>i()?.originalEntry),p=w(()=>i()?.originalValues??{}),g=w(()=>(l(f)??l(d))?._i18n??$i),m=w(()=>l(g).i18nEnabled),v=w(()=>l(g).saveAllLocales),_=w(()=>l(g).allLocales),b=w(()=>l(g).defaultLocale),y=w(()=>i()?.currentLocales[s()?.locale??""]),x=w(()=>Object.values(i()?.currentLocales??{}).filter(I=>I).length===1),k=w(()=>l(m)?l(_).filter(I=>I!==s()?.locale):[]),S=w(()=>!!l(k).length),C=w(()=>s()?.locale&&!Mn(Gr(i()?.currentValues[s().locale]),l(p)[s().locale])),E=w(()=>l(d)&&l(h)&&s()?.locale?HT(l(h),s().locale,l(d),l(f)):void 0);var A=NW(),O=R(A);const L=w(()=>o()("secondary"));Zs(O,{variant:"secondary",get"aria-label"(){return l(L)},children:(I,N)=>{var j=LW(),H=M(j);{var B=J=>{TW(J,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return u()}})},W=J=>{var Y=CW(),te=R(Y);q(ce=>Z(te,ce),[()=>s()?.mode==="preview"?o()("preview"):o()("edit")]),T(J,Y)};U(H,J=>{l(m)?J(B):J(W,!1)})}var G=D(H,2);Yr(G,{flex:!0});var K=D(G,2);{var ee=J=>{var Y=$W();const te=w(()=>Ts(s().locale));var ce=M(Y);{var he=fe=>{AA(fe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(ce,fe=>{l(S)&&fe(he)})}var re=D(ce,2);const X=w(()=>o()("show_content_options_x_locale",{values:{locale:l(te)}}));Er(re,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(X)},popup:be=>{const ue=w(()=>o()("content_options_x_locale",{values:{locale:l(te)}}));mr(be,{get"aria-label"(){return l(ue)},children:(Te,_e)=>{var Ae=OW(),Ce=M(Ae);{var $e=Se=>{by(Se,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(Ce,Se=>{l(S)&&s()?.locale&&Se($e)})}var Ve=D(Ce,2);const We=w(()=>o()("revert_changes")),pt=w(()=>!l(C));Lt(Ve,{get label(){return l(We)},get disabled(){return l(pt)},onclick:()=>{py(s()?.locale)}});var Ke=D(Ve,2);{var ge=Se=>{var Ie=AW(),ve=M(Ie);Tr(ve,{});var Pe=D(ve,2);const qe=w(()=>o()(l(y)?"disable_x_locale":Gr(i()?.currentValues[s().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(te)}})),Xe=w(()=>s().locale===l(b)||l(y)&&l(x));Lt(Pe,{get label(){return l(qe)},get disabled(){return l(Xe)},onclick:()=>{aA(s()?.locale??"")}}),T(Se,Ie)};U(Ke,Se=>{!l(v)&&s()?.locale&&Se(ge)})}var ye=D(Ke,2);{var we=Se=>{var Ie=PW(),ve=M(Ie);Tr(ve,{});var Pe=D(ve,2);{var qe=Ye=>{const rt=w(()=>o()("view_on_live_site"));Lt(Ye,{get label(){return l(rt)},onclick:()=>{window.open(l(E))}})};U(Pe,Ye=>{l(E)&&Ye(qe)})}var Xe=D(Pe,2);{var ct=Ye=>{const rt=w(()=>!c()?.repository?.blobBaseURL),ft=w(()=>o()("view_on_x",{values:{service:c()?.repository?.label},default:o()("view_in_repository")}));Lt(Ye,{get disabled(){return l(rt)},get label(){return l(ft)},onclick:()=>{l(h)&&s()&&window.open(IB(l(h),s().locale))}})};U(Xe,Ye=>{a().devModeEnabled&&Ye(ct)})}T(Se,Ie)};U(ye,Se=>{l(h)&&(l(E)||a().devModeEnabled)&&Se(we)})}T(Te,Ae)},$$slots:{default:!0}})},$$slots:{popup:!0}}),T(J,Y)};U(K,J=>{s()?.mode==="edit"&&J(ee)})}T(I,j)},$$slots:{default:!0}}),q(()=>ke(A,"id",e.id)),T(t,A),oe(),r()}var RW=F('<div role="none" class="svelte-ypyuow"><h3 class="svelte-ypyuow"> </h3></div>'),DW=F('<section class="svelte-ypyuow"><!> <div role="none" class="svelte-ypyuow"><!> <p class="error svelte-ypyuow"><!> <!></p></div></section>'),MW=F('<!> <div role="none" class="locales svelte-ypyuow"></div>',1);const FW={hash:"svelte-ypyuow",code:"p.svelte-ypyuow:not(:empty) {margin-top:0;}.locales.svelte-ypyuow {display:table;margin:16px 0 0;width:100%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) {display:table-row;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow):last-child {width:90%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) h3:where(.svelte-ypyuow) {margin-right:8px;font-size:inherit;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) p.error:where(.svelte-ypyuow) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function zW(t,e){se(e,!0),Ee(t,FW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(le,"$_",n);let o=P(e,"open",15,!1);const a=w(()=>i()?.collectionName??""),c=w(()=>i()?.currentSlugs??{});let u=ae(ie([]));const d=ie({}),f=ie({}),h=Wn("short"),p=()=>{$(u,ie(ns(l(a)).map(_=>Object.values(_.locales).map(({slug:b})=>b)).flat(1).filter(_=>!Object.values(l(c)).includes(_)))),Object.assign(d,l(c)),Object.assign(f,Object.fromEntries(Object.keys(l(c)).map(_=>[_,!1])))};Ue(()=>{o()&&p()});const g=w(()=>s()("edit_slug")),m=w(()=>s()("update")),v=w(()=>Mn(l(c),d)||Object.values(f).some(_=>_!==!1));Ui(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{Ct(nt,xe(i).currentSlugs=d,xe(i))},get open(){return o()},set open(_){o(_)},children:(_,b)=>{var y=MW(),x=M(y);Bn(x,{status:"warning",children:(S,C)=>{var E=Be();q(A=>Z(E,A),[()=>s()("edit_slug_warning")]),T(S,E)},$$slots:{default:!0}});var k=D(x,2);dt(k,21,()=>Object.keys(d),Xn,(S,C)=>{var E=DW(),A=R(E);{var O=K=>{var ee=RW(),J=R(ee),Y=R(J);q(te=>Z(Y,te),[()=>Ts(l(C))]),T(K,ee)};U(A,K=>{["_","_default"].includes(l(C))||K(O)})}var L=D(A,2),I=R(L);const N=w(()=>f[l(C)]!==!1);yn(I,{flex:!0,oninput:()=>{f[l(C)]=d[l(C)].trim()?l(u).includes(d[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(N)},get"aria-errormessage"(){return`${h??""}-${l(C)??""}-error`},get value(){return d[l(C)]},set value(K){d[l(C)]=K}});var j=D(I,2),H=R(j);{var B=K=>{var ee=Be();q(J=>Z(ee,J),[()=>s()("edit_slug_error.empty")]),T(K,ee)};U(H,K=>{f[l(C)]==="empty"&&K(B)})}var W=D(H,2);{var G=K=>{var ee=Be();q(J=>Z(ee,J),[()=>s()("edit_slug_error.duplicate")]),T(K,ee)};U(W,K=>{f[l(C)]==="duplicate"&&K(G)})}q(()=>ke(j,"id",`${h??""}-${l(C)??""}-error`)),T(S,E)}),T(_,y)},$$slots:{default:!0}}),oe(),r()}const $A=async(t,e)=>{const{_i18n:{defaultLocale:n},_thumbnailFieldNames:r}=t,{locales:i}=e,{content:s}=i[n]??Object.values(i)[0]??{};if(!s)return;const o=r.map(a=>{if(a.includes("*")){const c=new RegExp(`^${cn(a).replace("\\*",".+")}$`);return Object.keys(s).filter(u=>c.test(u))}return a}).flat(1);for(const a of o){const c=s[a]?await Lc(s[a],e,{thumbnail:!0}):void 0;if(c)return c}},LA=({entry:t,collectionName:e,relative:n=!1})=>{const{locales:r}=t,i=Ri(e),s=Object.values(r).map(({content:o})=>Object.entries(o).map(([a,c])=>{if(typeof c=="string"&&(!n||!/^[/@]/.test(c))&&["image","file"].includes(vn({collectionName:e,keyPath:a})?.widget??"string")){const u=I_(c,{entry:t,collection:i});if(u&&N_(u).some(d=>d.name===e))return u}})).flat(1).filter((o,a,c)=>!!o&&c.indexOf(o)===a);if(n&&i?._assetFolder?.entryRelative){const o=$n(Object.values(t.locales)[0].path).dirname;ne(tn).forEach(a=>{$n(a.path).dirname===o&&!s.find(({path:c})=>c===a.path)&&s.push(a)})}return s};var jW=F("<!> <!>",1),UW=F("<!> <!> <!> <!> <!>",1),BW=F('<!> <h2 role="none"><strong role="none"><!></strong></h2> <!> <!> <!> <!> <!>',1),qW=F('<div class="error svelte-1432d6m"> </div>'),HW=F(" <!>",1),VW=F("<!> <!> <!> <!> <!> <!>",1);const WW={hash:"svelte-1432d6m",code:".error.svelte-1432d6m {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 GW(t,e){se(e,!0),Ee(t,WW);const[n,r]=me(),i=()=>z(nt,"$entryDraft",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(Is,"$backendName",n),a=()=>z(xC,"$entryDraftModified",n),c=()=>z(Tt,"$prefs",n),u=()=>z(le,"$_",n),d=()=>z(Di,"$entryEditorSettings",n),f=()=>z(ey,"$copyFromLocaleToast",n);let h=P(e,"disabled",3,!1),p=ae(!1),g=ae(!1),m=ae(!1),v=ae(!1),_=ae(""),b=ae(!1),y=ae(void 0);const x=w(()=>i()?.isNew??!0),k=w(()=>i()?.collection),S=w(()=>i()?.collectionFile),C=w(()=>i()?.originalEntry),E=w(()=>s()?.editor?.preview??!0),A=w(()=>s()?.backend.automatic_deployments),O=w(()=>o()!=="local"&&typeof l(A)=="boolean"),L=w(()=>(l(S)??l(k))?._i18n??$i),I=w(()=>l(L).defaultLocale),N=w(()=>l(k)?.name),j=w(()=>l(k)?.label||l(N)),H=w(()=>l(k)?.label_singular||l(j)),B=w(()=>(l(S)??l(k))?.editor?.preview??l(E)),W=w(()=>l(x)||a()),G=w(()=>Object.values(i()?.validities??{}).map(Ae=>Object.values(Ae).map(({valid:Ce})=>!Ce)).flat(1).filter(Boolean).length),K=w(()=>l(N)&&l(C)&&l(k)?._assetFolder?.entryRelative?LA({entry:l(C),collectionName:l(N),relative:!0}):[]),ee=w(()=>l(k)&&l(C)?HT(l(C),l(I),l(k),l(S)):void 0),J=async({skipCI:Ae=void 0}={})=>{if($(b,!0),!!l(k))try{const Ce=await b8({skipCI:Ae});c()?.closeOnSave??!0?(Dc(`/collections/${l(N)}`),ot(nt,null)):(l(x)&&zn(`/collections/${l(N)}/entries/${Ce.subPath}`,{replaceState:!0,notifyChange:!1}),Nd({collection:l(k),collectionFile:l(S),originalEntry:Ce,expanderStates:i()?.expanderStates}))}catch(Ce){Ce.message==="validation_failed"?$(p,!0):Ce.message==="saving_failed"?($(v,!0),$(_,ie(Ce.cause?.message??Ce.message??u()("unexpected_error")))):($(v,!0),$(_,""),console.error(Ce))}finally{$(b,!1)}};var Y=VW(),te=M(Y);const ce=w(()=>u()("primary"));Zs(te,{variant:"primary",get"aria-label"(){return l(ce)},children:(Ae,Ce)=>{var $e=BW(),Ve=M($e);const We=w(()=>u()("cancel_editing"));Je(Ve,{variant:"ghost",iconic:!0,get"aria-label"(){return l(We)},keyShortcuts:"Escape",onclick:()=>{Dc(`/collections/${l(N)}`)},startIcon:bt=>{et(bt,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var pt=D(Ve,2),Ke=R(pt),ge=R(Ke);{var ye=ut=>{var bt=Be();q(At=>Z(bt,At),[()=>u()("creating_x",{values:{name:l(H)}})]),T(ut,bt)},we=ut=>{var bt=Be();q(At=>Z(bt,At),[()=>u()("editing_x_in_x",{values:{collection:l(j),entry:l(S)?l(S).label||l(S).name:l(k)&&l(C)?Vo(l(k),l(C)):""}})]),T(ut,bt)};U(ge,ut=>{l(x)?ut(ye):ut(we,!1)})}var Se=D(pt,2);Yr(Se,{flex:!0});var Ie=D(Se,2);{var ve=ut=>{const bt=w(()=>u()("view_on_live_site"));Je(ut,{variant:"tertiary",get label(){return l(bt)},onclick:()=>{window.open(l(ee))}})};U(Ie,ut=>{!h()&&l(ee)&&ut(ve)})}var Pe=D(Ie,2);{var qe=ut=>{var bt=jW(),At=M(bt);const an=w(()=>u()("duplicate")),jn=w(()=>u()("duplicate_entry")),sr=w(()=>l(k)?.create===!1);Je(At,{variant:"ghost",get label(){return l(an)},get"aria-label"(){return l(jn)},get disabled(){return l(sr)},onclick:()=>{zn(`/collections/${l(N)}/new`,{replaceState:!0,notifyChange:!1}),r8()}});var Lr=D(At,2);const os=w(()=>u()("delete")),Mi=w(()=>u()("delete_entry")),It=w(()=>l(k)?.delete===!1);Je(Lr,{variant:"ghost",get label(){return l(os)},get"aria-label"(){return l(Mi)},get disabled(){return l(It)},onclick:()=>{$(m,!0)}}),T(ut,bt)};U(Pe,ut=>{!h()&&!l(S)&&!l(x)&&ut(qe)})}var Xe=D(Pe,2);const ct=w(()=>u()("show_editor_options"));Pt(Er(Xe,{get disabled(){return h()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ct)},popup:bt=>{const At=w(()=>u()("editor_options"));mr(bt,{get"aria-label"(){return l(At)},children:(an,jn)=>{var sr=UW(),Lr=M(sr);const os=w(()=>u()("show_preview")),Mi=w(()=>d()?.showPreview),It=w(()=>!l(B));Pf(Lr,{get label(){return l(os)},get checked(){return l(Mi)},get disabled(){return l(It)},onChange:()=>{Di.update((ar={})=>({...ar,showPreview:!ar.showPreview}))}});var An=D(Lr,2);const Kt=w(()=>u()("sync_scrolling")),wt=w(()=>d()?.syncScrolling),nn=w(()=>!l(B)&&Object.keys(i()?.currentValues??{}).length===1);Pf(An,{get label(){return l(Kt)},get checked(){return l(wt)},get disabled(){return l(nn)},onChange:()=>{Di.update((ar={})=>({...ar,syncScrolling:!ar.syncScrolling}))}});var In=D(An,2);Tr(In,{});var Pn=D(In,2);const qt=w(()=>u()("edit_slug")),Zt=w(()=>!!l(S)||l(x)||l(k)?.delete===!1);Lt(Pn,{get label(){return l(qt)},get disabled(){return l(Zt)},onclick:()=>{$(g,!0)}});var bn=D(Pn,2);const Un=w(()=>u()("revert_all_changes")),or=w(()=>!l(W));Lt(bn,{get label(){return l(Un)},get disabled(){return l(or)},onclick:()=>{py()}}),T(an,sr)},$$slots:{default:!0}})},$$slots:{popup:!0}}),bt=>$(y,ie(bt)),()=>l(y));var Ye=D(Xe,2);{var rt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),At=w(()=>h()||!l(W)||l(b));eL(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(At)},keyShortcuts:"Accel+S",onclick:()=>{J()},popup:jn=>{mr(jn,{children:(sr,Lr)=>{const os=w(()=>u()(l(A)?"save_without_publishing":"save_and_publish"));Lt(sr,{get label(){return l(os)},onclick:()=>{J({skipCI:l(A)})}})},$$slots:{default:!0}})},$$slots:{popup:!0}})},ft=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),At=w(()=>h()||!l(W)||l(b));Je(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(At)},keyShortcuts:"Accel+S",onclick:()=>{J()}})};U(Ye,ut=>{l(O)?ut(rt):ut(ft,!1)})}T(Ae,$e)},$$slots:{default:!0}});var he=D(te,2);Gn(he,{get show(){return l(p)},set show(Ae){$(p,ie(Ae))},children:(Ae,Ce)=>{Bn(Ae,{status:"error",children:($e,Ve)=>{var We=Be();q(pt=>Z(We,pt),[()=>u()(l(G)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(G)}})]),T($e,We)},$$slots:{default:!0}})},$$slots:{default:!0}});var re=D(he,2);Gn(re,{get id(){return f().id},get show(){return f().show},set show(Ae){Ct(ey,xe(f).show=Ae,xe(f))},children:(Ae,Ce)=>{const $e=w(()=>{const{status:Ve,message:We,count:pt,sourceLocale:Ke}=f();return{status:Ve,message:We,count:pt,sourceLocale:Ke}});Bn(Ae,{get status(){return l($e).status},children:(Ve,We)=>{var pt=Be();q(Ke=>Z(pt,Ke),[()=>u()(`editor.${l($e).message}`,{values:{count:l($e).count,source:l($e).sourceLocale?Ts(l($e).sourceLocale):""}})]),T(Ve,pt)},$$slots:{default:!0}})},$$slots:{default:!0}});var X=D(re,2);zW(X,{get open(){return l(g)},set open(Ae){$(g,ie(Ae))}});var fe=D(X,2);const be=w(()=>u()("delete_entry")),ue=w(()=>u()("delete"));kl(fe,{get title(){return l(be)},get okLabel(){return l(ue)},onOk:async()=>{l(C)&&await PC([l(C).id],l(K).map(({path:Ae})=>Ae)),Dc(`/collections/${l(N)}`)},onClose:()=>{l(y).focus()},get open(){return l(m)},set open(Ae){$(m,ie(Ae))},children:(Ae,Ce)=>{var $e=Be();q(Ve=>Z($e,Ve),[()=>u()(l(K).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),T(Ae,$e)},$$slots:{default:!0}});var Te=D(fe,2);const _e=w(()=>u()("saving_entry.error.title"));kx(Te,{get title(){return l(_e)},onClose:()=>{l(y).focus()},get open(){return l(v)},set open(Ae){$(v,ie(Ae))},children:(Ae,Ce)=>{var $e=HW(),Ve=M($e),We=D(Ve);{var pt=Ke=>{var ge=qW(),ye=R(ge);q(()=>Z(ye,l(_))),T(Ke,ge)};U(We,Ke=>{l(_)&&Ke(pt)})}q(Ke=>Z(Ve,`${Ke??""} `),[()=>u()("saving_entry.error.description")]),T(Ae,$e)},$$slots:{default:!0}}),T(t,Y),oe(),r()}var KW=F('<div role="none"><!></div> <div role="none"><!></div>',1),YW=F("<!> <!>",1),JW=F("<!> <!>",1),ZW=F("<!> <!>",1),XW=F('<div role="none" class="cols svelte-1pb3yei"><!></div>'),QW=F("<!> <!>",1),e7=F('<div role="none" class="wrapper svelte-1pb3yei"><!></div> <!> <!>',1);const t7={hash:"svelte-1pb3yei",code:'.wrapper.svelte-1pb3yei {display:contents;}.wrapper[hidden].svelte-1pb3yei {display:none;}.wrapper.svelte-1pb3yei > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1pb3yei > .sui.group {filter:opacity(0);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="edit"] {flex:1 1;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="preview"] {flex:2 1;}'};function n7(t,e){se(e,!0),Ee(t,t7);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(nt,"$entryDraft",n),o=()=>z(Di,"$entryEditorSettings",n),a=()=>z(Za,"$editorLeftPane",n),c=()=>z(Yo,"$editorRightPane",n),u=()=>z(Ja,"$showContentOverlay",n),d=()=>z(le,"$_",n),f=()=>z(Q_,"$showDuplicateToast",n);let h,p=!1,g=ae(!1),m=ae(!0),v=ae(void 0),_=ae(void 0),b=ae(void 0);const y=w(()=>i()?.editor?.preview??!0),x=w(()=>s()?.isNew??!0),k=w(()=>s()?.collection),S=w(()=>s()?.collectionFile),C=w(()=>s()?.originalEntry),E=w(()=>l(C)?.id??[l(k)?.name??"-",l(S)?.name??"-"].join("/")),A=w(()=>o()??{}),O=w(()=>l(A).showPreview),L=w(()=>(l(S)??l(k))?._i18n??$i),I=w(()=>l(L).i18nEnabled),N=w(()=>l(L).allLocales),j=w(()=>l(L).defaultLocale),H=w(()=>(l(S)??l(k))?.editor?.preview??l(y)),B=w(()=>l(S)?.name?[l(k)?.name,l(S).name].join("|"):l(k)?.name),W=w(()=>l(k)?.create??!1),G=w(()=>l(k)?.limit??1/0),K=w(()=>l(x)&&(!l(W)||ns(l(k)?.name??"").length>=l(G))),ee=async()=>{const[ue,Te]=o()?.paneStates?.[l(B)??""]??[];return p||!ue||!Te||ue.locale&&!l(N).includes(ue.locale)||Te.locale&&!l(N).includes(Te.locale)||(!l(O)||!l(H))&&(ue.mode==="preview"||Te.mode==="preview")?!1:(p=!0,await pl(),ot(Za,ue),ot(Yo,Te),await pl(),p=!1,!0)},J=async()=>{if(s()&&!await ee())if(ot(Za,{mode:"edit",locale:a()?.locale??l(j)}),!l(O)||!l(H)){const ue=l(I)?l(N).filter(Te=>Te!==a()?.locale):[];ot(Yo,ue.length?{mode:"edit",locale:ue[0]}:null)}else ot(Yo,{mode:"preview",locale:a().locale})},Y=()=>{!l(k)||p||!a()||!c()||!l(B)||Di.update((ue={})=>({...ue,paneStates:{...ue.paneStates??{},[l(B)]:[a(),c()]}}))},te=async()=>{await pl(),h&&(h.tabIndex=0,h.focus())};ln(()=>{h=l(v)?.querySelector('[role="group"]'),h.addEventListener("transitionend",()=>{u()||($(g,!1),$(m,!0),ot(nt,null))})}),Ue(()=>{l(B)&&(ot(Za,null),ot(Yo,null))}),Ue(()=>{l(O),l(H),J()}),Ue(()=>{a(),c(),Y()}),Ue(()=>{l(v)&&(u()?l(m)&&($(g,!1),$(m,!1),J(),te(),a8()):($(g,!0),o8()))});var ce=e7(),he=M(ce),re=R(he);const X=w(()=>d()("content_editor"));_r(re,{class:"content-editor",get"aria-label"(){return l(X)},children:(ue,Te)=>{var _e=V(),Ae=M(_e);ms(Ae,()=>l(E),Ce=>{var $e=QW(),Ve=M($e);GW(Ve,{get disabled(){return l(K)}});var We=D(Ve,2);{var pt=ge=>{$r(ge,{children:(ye,we)=>{var Se=KW(),Ie=M(Se),ve=R(Ie);{var Pe=Ye=>{var rt=Be();q(ft=>Z(rt,ft),[()=>d()("creating_entries_disabled_by_admin")]),T(Ye,rt)},qe=Ye=>{var rt=Be();q(ft=>Z(rt,ft),[()=>d()("creating_entries_disabled_by_limit",{values:{limit:l(G)}})]),T(Ye,rt)};U(ve,Ye=>{l(W)?Ye(qe,!1):Ye(Pe)})}var Xe=D(Ie,2),ct=R(Xe);Je(ct,{variant:"primary",onclick:()=>{zn(`/collection/${l(k)?.name}`,{replaceState:!0})},children:(Ye,rt)=>{var ft=Be();q(ut=>Z(ft,ut),[()=>d()("back_to_collection")]),T(Ye,ft)},$$slots:{default:!0}}),T(ye,Se)},$$slots:{default:!0}})},Ke=ge=>{var ye=XW(),we=R(ye);{var Se=Ie=>{var ve=ZW(),Pe=M(ve);{var qe=Ye=>{const rt=w(()=>{const{locale:ut,mode:bt}=a();return{locale:ut,mode:bt}}),ft=w(()=>d()(l(rt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Ts(l(rt).locale)}}));_r(Ye,{class:"pane",get"aria-label"(){return l(ft)},get"data-locale"(){return l(rt).locale},get"data-mode"(){return l(rt).mode},children:(ut,bt)=>{var At=YW(),an=M(At);OA(an,{id:"left-pane-header",thisPane:Za,thatPane:Yo});var jn=D(an,2);PA(jn,{id:"left-pane-body",thisPane:Za,get thatPaneContentArea(){return l(b)},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(sr){$(_,ie(sr))}}),T(ut,At)},$$slots:{default:!0}})};U(Pe,Ye=>{a()&&Ye(qe)})}var Xe=D(Pe,2);{var ct=Ye=>{const rt=w(()=>{const{locale:ut,mode:bt}=c();return{locale:ut,mode:bt}}),ft=w(()=>d()(l(rt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:Ts(l(rt).locale)}}));_r(Ye,{get"aria-label"(){return l(ft)},get"data-locale"(){return l(rt).locale},get"data-mode"(){return l(rt).mode},children:(ut,bt)=>{var At=JW(),an=M(At);OA(an,{id:"right-pane-header",thisPane:Yo,thatPane:Za});var jn=D(an,2);PA(jn,{id:"right-pane-body",thisPane:Yo,get thatPaneContentArea(){return l(_)},get thisPaneContentArea(){return l(b)},set thisPaneContentArea(sr){$(b,ie(sr))}}),T(ut,At)},$$slots:{default:!0}})};U(Xe,Ye=>{c()&&Ye(ct)})}T(Ie,ve)};U(we,Ie=>{l(k)&&Ie(Se)})}T(ge,ye)};U(We,ge=>{l(K)?ge(pt):ge(Ke,!1)})}T(Ce,$e)}),T(ue,_e)},$$slots:{default:!0}}),Pt(he,ue=>$(v,ue),()=>l(v));var fe=D(he,2);XH(fe,{});var be=D(fe,2);Gn(be,{get show(){return Ew(),f()},set show(ue){ot(Q_,ue)},children:(ue,Te)=>{Bn(ue,{status:"success",children:(_e,Ae)=>{var Ce=Be();q($e=>Z(Ce,$e),[()=>d()("entry_duplicated")]),T(_e,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),q(()=>{he.hidden=l(m),he.inert=!u(),ht(he,"hiding",l(g))}),T(t,ce),oe(),r()}const r7=["title","name","date","author","description"],hi=st({type:"list"}),NA=t=>t.replace(/[_*`]+/g,""),i7=(t,e,{key:n,order:r}={})=>{const i=[...t],{name:s,_i18n:{defaultLocale:o}}=e;if(n===void 0){const f={useTemplate:!0,allowMarkdown:!0};return i.sort((h,p)=>Vo(e,h,f).localeCompare(Vo(e,p,f)))}const a={slug:String,commit_author:String,commit_date:Date}[n]||(i.length?Oc({entry:i[0],locale:o,collectionName:s,key:n})?.constructor:String)||String,c=Object.fromEntries(i.map(f=>[f.slug,Oc({entry:f,locale:o,collectionName:s,key:n})])),u=vn({collectionName:s,keyPath:n}),d=u?.widget==="datetime"?u:void 0;return i.sort((f,h)=>{const p=c[f.slug],g=c[h.slug];if(p===void 0||g===void 0)return 0;if(d){const m=Pc(p,d),v=Pc(g,d);if(m&&v)return Number(m)-Number(v)}return a===String?oi(NA(p),NA(g)):a===Date?Number(p)-Number(g):p-g}),r==="descending"&&i.reverse(),i},s7=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:s}}=e,o=n.filter(({field:a,pattern:c})=>a!==void 0&&c!==void 0&&i.some(u=>u.field===a&&u.pattern===c));return t.filter(a=>o.every(({field:c,pattern:u})=>{const d={entry:a,locale:s,collectionName:r,key:c},f=Oc({...d,resolveRef:!1}),h=Oc({...d}),p=typeof u=="string"?new RegExp(u):void 0;return f===void 0||h===void 0?!1:p?p.test(String(f))||p.test(String(h)):f===u||h===u}))},o7=(t,e,{field:n,pattern:r}={field:"",pattern:void 0})=>{if(!n)return t.length?[{name:"*",entries:t}]:[];const{name:i,_i18n:{defaultLocale:s}}=e,o=ne(hi).sort,a=typeof r=="string"?new RegExp(r):void 0,c={},u=ne(le)("other");t.forEach(f=>{const h=Oc({entry:f,locale:s,collectionName:i,key:n});if(h===void 0)return;const p=a?String(h).match(a)?.[0]??u:String(h);p in c||(c[p]=[]),c[p].push(f)});const d=Object.entries(c).map(([f,h])=>({name:f,entries:h})).sort(({name:f},{name:h})=>oi(f,h));return o?.key===n&&o.order==="descending"&&d.reverse(),d},zc=st(),a7=t=>{const{name:e,identifier_field:n,sortable_fields:r}=t;let i=[],s,o;if(r){if(Array.isArray(r)&&(i=r),Jn(r)){const a=r;Array.isArray(a.fields)&&(i=a.fields),a.default&&Jn(a.default)&&(s=a.default.field,o=["descending","Descending"].includes(a.default.direction??"")?"descending":"ascending")}}else i=[...r7],n&&(i.unshift(n),s=n);return i=tc(i).filter(a=>!!vn({collectionName:e,keyPath:a})),{fields:i,default:{key:s??i[0],order:o??"ascending"}}},l7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(le)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const s=i.slice(0,r+1).join(".");return vn({collectionName:t.name,keyPath:s})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,c7=Qn([qn,ri,Ln],([t,e],n)=>{if(!t?.folder){n([]);return}const r=t,{fields:i,default:s}=a7(r),o=ne(zc)?.[r.name]??{type:"list"};o.sort??=s,e.every(a=>!!a.commitAuthor)&&!i.includes("author")&&i.push("commit_author"),e.every(a=>!!a.commitDate)&&!i.includes("date")&&i.push("commit_date"),n(i.map(a=>({key:a,label:l7(r,a)}))),Mn(o,ne(hi))||hi.set(o)}),Xo=Qn([ri,qn],([t,e],n)=>{n(t&&e?ns(e.name):[])}),yy=Qn([Xo,hi],([t,e],n)=>{const r=ne(qn);let i=[...t];if(!i.length||Wo(r,i[0]).length)n([]);else{i=i7(i,r,e.sort),e.filters&&(i=s7(i,r,e.filters));const s=o7(i,r,e.group);Mn(ne(yy),s)||n(s)}}),u7=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new Fo(e,"ui-settings"):null,r="contents-view";zc.set(await n?.get(r)??{}),zc.subscribe(i=>{(async()=>{try{Mn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),hi.subscribe(i=>{const{name:s}=ne(qn)??{},o=ne(zc)?.[s??""]??{};s&&!Mn(i,o)&&zc.update(a=>({...a,[s]:i}))})};Nn.subscribe(t=>{t&&!ne(zc)&&u7(t)}),Xo.subscribe(t=>{$c.set([]),ne(Tt).devModeEnabled&&console.info("listedEntries",t)}),qn.subscribe(t=>{t&&ne(Tt).devModeEnabled&&console.info("selectedCollection",t)});var d7=F('<span role="none"><!></span>'),f7=F("<!> <!> <!>",1);function h7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Xo,"$listedEntries",n),s=()=>z($c,"$selectedEntries",n),o=c=>{$c.update(u=>{const d=u.indexOf(e.entry);return c&&d===-1&&u.push(e.entry),!c&&d>-1&&u.splice(d,1),u})},a=w(()=>i().indexOf(e.entry));lu(t,{get"aria-rowindex"(){return l(a)},onChange:c=>{o(c.detail.selected)},onclick:()=>{zn(`/collections/${e.collection.name}/entries/${e.entry.subPath}`)},children:(c,u)=>{var d=f7(),f=M(d);ai(f,{class:"checkbox",children:(m,v)=>{const _=w(()=>s().includes(e.entry));au(m,{role:"none",tabindex:"-1",get checked(){return l(_)},onChange:({detail:{checked:b}})=>{o(b)}})},$$slots:{default:!0}});var h=D(f,2);{var p=m=>{ai(m,{class:"image",children:(v,_)=>{var b=V(),y=M(b);hr(y,()=>$A(e.collection,e.entry),null,(x,k)=>{var S=V(),C=M(S);{var E=A=>{const O=w(()=>e.viewType==="list"?"icon":"tile");dy(A,{get src(){return l(k)},get variant(){return l(O)},cover:!0})};U(C,A=>{l(k)&&A(E)})}T(x,S)}),T(v,b)},$$slots:{default:!0}})};U(h,m=>{e.collection._thumbnailFieldNames.length&&m(p)})}var g=D(h,2);ai(g,{class:"title",children:(m,v)=>{var _=d7(),b=R(_);pr(b,()=>Vo(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),T(m,_)},$$slots:{default:!0}}),T(c,d)},$$slots:{default:!0}}),oe(),r()}var p7=F('<span role="none"> </span>'),g7=F('<span role="none"> </span> <!>',1),m7=F('<span role="none"> </span>');function v7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(hi,"$currentView",n),o=()=>z(yy,"$entryGroups",n),a=()=>z(le,"$_",n),c=()=>z(Xo,"$listedEntries",n),u=w(i),d=w(()=>s().type),f=w(()=>o().map(({entries:p})=>p).flat(1)),h=w(()=>l(u)?.files?a()("file_list"):a()("entry_list"));fy(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=V(),v=M(m);{var _=y=>{var x=V(),k=M(x);{var S=E=>{const A=w(()=>{const{defaultLocale:L}=l(u)._i18n;return{defaultLocale:L}}),O=w(()=>a()("entries"));Dd(E,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(O)},get"aria-rowcount"(){return c().length},children:(L,I)=>{var N=V(),j=M(N);dt(j,1,o,({name:H,entries:B})=>H,(H,B)=>{let W=()=>l(B).name,G=()=>l(B).entries;const K=w(()=>W()!=="*"?W():void 0);Sx(H,{get label(){return l(K)},children:(ee,J)=>{const Y=w(()=>G().filter(({locales:te})=>!!(te[l(A).defaultLocale]??Object.values(te)[0])?.content));nl(ee,{get items(){return l(Y)},itemKey:"id",renderItem:(ce,he=Me)=>{h7(ce,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(L,N)},$$slots:{default:!0}})},C=E=>{var A=V(),O=M(A);{var L=N=>{$r(N,{children:(j,H)=>{var B=p7(),W=R(B);q(G=>Z(W,G),[()=>a()("no_entries_found")]),T(j,B)},$$slots:{default:!0}})},I=N=>{$r(N,{children:(j,H)=>{var B=g7(),W=M(B),G=R(W),K=D(W,2);const ee=w(()=>!l(u).create),J=w(()=>a()("create_new_entry"));Je(K,{variant:"primary",get disabled(){return l(ee)},get label(){return l(J)},onclick:()=>{zn(`/collections/${l(u).name}/new`)},startIcon:te=>{et(te,{name:"edit"})},$$slots:{startIcon:!0}}),q(Y=>Z(G,Y),[()=>a()("no_entries_created")]),T(j,B)},$$slots:{default:!0}})};U(O,N=>{c().length?N(L):N(I,!1)},!0)}T(E,A)};U(k,E=>{l(f).length?E(S):E(C,!1)})}T(y,x)},b=y=>{$r(y,{children:(x,k)=>{var S=m7(),C=R(S);q(E=>Z(C,E),[()=>a()("collection_not_found")]),T(x,S)},$$slots:{default:!0}})};U(v,y=>{l(u)?y(_):y(b,!1)})}T(p,m)},$$slots:{default:!0}}),oe(),r()}var b7=F('<span role="none"> </span>');function _7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=w(()=>i()("file_list"));fy(t,{get"aria-label"(){return l(o)},children:(a,c)=>{var u=V(),d=M(u);{var f=p=>{const g=w(()=>i()("files"));Dd(p,{viewType:"list",get"aria-label"(){return l(g)},get"aria-rowcount"(){return s().files.length},children:(m,v)=>{nl(m,{get items(){return s().files},itemKey:"name",renderItem:(b,y)=>{let x=()=>y?.().name,k=()=>y?.().label;lu(b,{onclick:()=>{zn(`/collections/${s().name}/entries/${x()}`)},children:(S,C)=>{ai(S,{class:"title",children:(E,A)=>{var O=Be();q(()=>Z(O,k()||x())),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})},h=p=>{$r(p,{children:(g,m)=>{var v=b7(),_=R(v);q(b=>Z(_,b),[()=>i()("no_files_in_collection")]),T(g,v)},$$slots:{default:!0}})};U(d,p=>{s()?.files?.length?p(f):p(h,!1)})}T(a,u)},$$slots:{default:!0}}),oe(),r()}var y7=F('<span class="count"> </span>'),w7=F('<div role="none" class="primary-sidebar"><!></div>');function x7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=()=>z(yt,"$siteConfig",n),o=()=>z(le,"$_",n),a=()=>z(qn,"$selectedCollection",n),c=()=>z(ri,"$allEntries",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>s()?.collections.filter(({hide:g})=>!g)??[]);var f=w7(),h=R(f);const p=w(()=>o()("collections"));cu(h,{get"aria-label"(){return l(p)},"aria-controls":"collection-container",children:(g,m)=>{var v=V(),_=M(v);dt(_,17,()=>l(d),({name:b,label:y,icon:x,files:k,divider:S=!1})=>b,(b,y)=>{let x=()=>l(y).name,k=()=>l(y).label,S=()=>l(y).icon,C=()=>l(y).files,E=Ge(()=>it(l(y).divider,!1));var A=V(),O=M(A);{var L=N=>{Tr(N,{})},I=N=>{const j=w(()=>k()||x()),H=w(()=>a()?.name===x());gr(N,{get label(){return l(j)},get selected(){return l(H)},onSelect:()=>{zn(`/collections/${x()}`)},startIcon:G=>{const K=w(()=>S()||"edit_note");et(G,{get name(){return l(K)}})},endIcon:G=>{var K=V(),ee=M(K);ms(ee,c,J=>{var Y=V(),te=M(Y);hr(te,()=>hn(0),null,ce=>{var he=y7();const re=w(()=>(C()??ns(x())).length);var X=R(he);q((fe,be)=>{ke(he,"aria-label",`(${fe??""})`),Z(X,be)},[()=>o()(l(re)>1?"many_entries":l(re)===1?"one_entry":"no_entries",{values:{count:l(re)}}),()=>l(u).format(l(re))]),T(ce,he)}),T(J,Y)}),T(G,K)},$$slots:{startIcon:!0,endIcon:!0}})};U(O,N=>{l(E)?N(L):N(I,!1)})}T(b,A)}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function k7(t,e){se(e,!0);const[n,r]=me(),i=()=>z($c,"$selectedEntries",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(le,"$_",n),a=()=>z(Xo,"$listedEntries",n);let c=P(e,"open",15,!1);const u=w(()=>{if(i().length&&s()?._assetFolder?.entryRelative){const h=s().name;return i().map(p=>LA({entry:p,collectionName:h,relative:!0})).flat(1)}return[]}),d=w(()=>i().length===1?o()("delete_entry"):o()("delete_entries")),f=w(()=>o()("delete"));kl(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{PC(i().map(({id:h})=>h),l(u).map(({path:h})=>h))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=V(),m=M(g);{var v=b=>{var y=Be();q(x=>Z(y,x),[()=>o()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),T(b,y)},_=b=>{var y=V(),x=M(y);{var k=C=>{var E=Be();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),T(C,E)},S=C=>{var E=Be();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:i().length}})]),T(C,E)};U(x,C=>{i().length===a().length?C(k):C(S,!1)},!0)}T(b,y)};U(m,b=>{i().length===1?b(v):b(_,!1)})}T(h,g)},$$slots:{default:!0}}),oe(),r()}var S7=F("<!> <!>",1),E7=F('<h2 role="none"> </h2> <div role="none" class="description svelte-1koahme"><!></div> <!> <!>',1),T7=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),C7=F("<!> <!>",1),A7=F("<!> <!>",1);const P7={hash:"svelte-1koahme",code:".description.svelte-1koahme {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function O7(t,e){se(e,!0),Ee(t,P7);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(Xo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z($c,"$selectedEntries",n);let c=ae(!1);const u=C=>li.sanitize(Ot.parseInline(C),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),d=w(()=>i()?.name),f=w(()=>i()?.label),h=w(()=>i()?.description),p=w(()=>i()?._type==="entry"),g=w(()=>i()?.create??!1),m=w(()=>i()?.delete??!0),v=w(()=>i()?.limit??1/0),_=w(()=>l(p)&&(!l(g)||s().length>=l(v))),b=w(()=>l(f)||l(d)||"");var y=A7(),x=M(y);{var k=C=>{var E=C7(),A=M(E);const O=w(()=>o()("collection"));Zs(A,{variant:"primary",get"aria-label"(){return l(O)},children:(N,j)=>{var H=E7(),B=M(H),W=R(B),G=D(B,2),K=R(G);pr(K,()=>u(l(h)||""));var ee=D(G,2);Yr(ee,{flex:!0});var J=D(ee,2);{var Y=te=>{var ce=S7(),he=M(ce);const re=w(()=>o()("delete")),X=w(()=>a().length===1?o()("delete_selected_entry"):o()("delete_selected_entries")),fe=w(()=>!a().length||!l(m));Je(he,{variant:"ghost",get label(){return l(re)},get"aria-label"(){return l(X)},get disabled(){return l(fe)},onclick:()=>{$(c,!0)}});var be=D(he,2);const ue=w(()=>o()("create")),Te=w(()=>o()("create_new_entry"));Je(be,{variant:"primary",get disabled(){return l(_)},get label(){return l(ue)},get"aria-label"(){return l(Te)},keyShortcuts:"Accel+E",onclick:()=>{zn(`/collections/${l(d)}/new`)},startIcon:Ae=>{et(Ae,{name:"edit"})},$$slots:{startIcon:!0}}),T(te,ce)};U(J,te=>{l(p)&&te(Y)})}q(()=>Z(W,l(b))),T(N,H)},$$slots:{default:!0}});var L=D(A,2);{var I=N=>{var j=T7(),H=M(j);ff(H,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),tm(H.lastChild,{dismissible:!1,children:(B,W)=>{var G=V(),K=M(G);{var ee=Y=>{var te=Be();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_admin")]),T(Y,te)},J=Y=>{var te=Be();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_limit",{values:{limit:l(v)}})]),T(Y,te)};U(K,Y=>{l(g)?Y(J,!1):Y(ee)})}T(B,G)},$$slots:{default:!0}}),T(N,j)};U(L,N=>{l(_)&&N(I)})}T(C,E)};U(x,C=>{i()&&C(k)})}var S=D(x,2);k7(S,{get open(){return l(c)},set open(C){$(c,ie(C))}}),T(t,y),oe(),r()}function $7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(hi,"$currentView",n),o=()=>z(le,"$_",n),a=()=>z(tn,"$allAssets",n),c=w(()=>i()?._assetFolder?.internalPath),u=w(()=>i()?._assetFolder?.entryRelative),d=w(()=>!!l(u));var f=V(),h=M(f);{var p=g=>{const m=w(()=>!s().showMedia),v=w(()=>o()("collection_assets"));_r(g,{id:"collection-assets",class:"secondary-sidebar",get hidden(){return l(m)},get"aria-label"(){return l(v)},children:(_,b)=>{Rd(_,{get disabled(){return l(d)},multiple:!0,onSelect:({files:y})=>{ot(Ls,{folder:l(c),files:y})},children:(y,x)=>{const k=w(()=>a().filter(({folder:S})=>l(c)===S));hA(y,{get assets(){return l(k)},onSelect:({asset:S})=>{zn(`/assets/${S.path}`)}})},$$slots:{default:!0}})},$$slots:{default:!0}})};U(h,g=>{l(c)&&g(p)})}T(t,f),oe(),r()}var L7=F("<!> <!>",1);function N7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"noneLabel",3,""),u=P(e,"groups",19,()=>[]);const d=w(()=>o()||i()("group"));Er(t,{variant:"ghost",get label(){return l(d)},get disabled(){return a()},popupPosition:"bottom-right",popup:h=>{const p=w(()=>i()("grouping_options"));mr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=L7(),_=M(v);const b=w(()=>c()||i()("sort_keys.none")),y=w(()=>!s().group);uu(_,{get label(){return l(b)},get checked(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,group:void 0}))}});var x=D(_,2);dt(x,17,u,Xn,(k,S)=>{let C=()=>l(S).label,E=()=>l(S).field,A=()=>l(S).pattern;const O=w(()=>s().group?.field===E()&&s().group.pattern===A());uu(k,{get label(){return C()},get checked(){return l(O)},onSelect:()=>{e.currentView.update(L=>({...L,group:{field:E(),pattern:A()}}))}})}),T(g,v)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var I7=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function R7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(Xo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(yy,"$entryGroups",n),c=()=>z(c7,"$sortFields",n),u=()=>z(hi,"$currentView",n),d=w(()=>i()?._type==="entry"?i():void 0),f=w(()=>l(d)?.name),h=w(()=>l(d)?._thumbnailFieldNames??[]),p=w(()=>!!s().length),g=w(()=>s().length>1);var m=V(),v=M(m);{var _=b=>{const y=w(()=>o()("entry_list"));Zs(b,{variant:"secondary",get"aria-label"(){return l(y)},children:(x,k)=>{var S=I7(),C=M(S);const E=w(()=>a().map(({entries:te})=>te).flat(1));JC(C,{get allItems(){return l(E)},selectedItems:$c});var A=D(C,2);Yr(A,{flex:!0});var O=D(A,2);const L=w(()=>!l(g)||!c().length);ZC(O,{get disabled(){return l(L)},currentView:hi,get fields(){return c()},get collectionName(){return l(f)},"aria-controls":"entry-list"});var I=D(O,2);{var N=te=>{const ce=w(()=>!l(g));YC(te,{get disabled(){return l(ce)},currentView:hi,get filters(){return l(d).view_filters},multiple:!0,"aria-controls":"entry-list"})};U(I,te=>{l(d).view_filters?.length&&te(N)})}var j=D(I,2);{var H=te=>{const ce=w(()=>!l(g));N7(te,{get disabled(){return l(ce)},currentView:hi,get groups(){return l(d).view_groups},"aria-controls":"entry-list"})};U(j,te=>{l(d).view_groups?.length&&te(H)})}var B=D(j,2);const W=w(()=>!l(p)||!l(h).length);hy(B,{get disabled(){return l(W)},currentView:hi,"aria-controls":"entry-list"});var G=D(B,2);Tr(G,{orientation:"vertical"});var K=D(G,2);const ee=w(()=>!l(p)||!l(d)._assetFolder),J=w(()=>!!u().showMedia),Y=w(()=>o()(u().showMedia?"hide_assets":"show_assets"));Je(K,{variant:"ghost",iconic:!0,get disabled(){return l(ee)},get pressed(){return l(J)},"aria-controls":"collection-assets",get"aria-expanded"(){return u().showMedia},get"aria-label"(){return l(Y)},onclick:()=>{hi.update(ce=>({...ce,showMedia:!u().showMedia}))},startIcon:ce=>{et(ce,{name:"photo_library"})},$$slots:{startIcon:!0}}),T(x,S)},$$slots:{default:!0}})};U(v,b=>{l(d)&&b(_)})}T(t,m),oe(),r()}var D7=F("<!> <!> <!> <!>",1);function M7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(qn,"$selectedCollection",n),s=()=>z(le,"$_",n),o=()=>z(Xo,"$listedEntries",n),a=()=>z(Ld,"$contentUpdatesToast",n),c=/^\/collections\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?$/,u=w(()=>i()?.files?_7:v7),d=()=>{const{path:_,params:b}=$d(),y=_.match(c);if(!y?.groups)return;const{_collectionName:x,routeType:k,subPath:S}=y.groups,C=x?Ri(x):void 0;if(!C||C.hide?ot(qn,void 0):i()?.name!==C.name&&ot(qn,C),!C||!i()){ot(Rs,s()("collection_not_found"));return}const{name:E,label:A,files:O}=i(),L=A||E,I=O?i()._fileMap:void 0;if(!k){const N=o().length;ot(Rs,s()(N>1?"viewing_x_collection_many_entries":N===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:L,count:N}}));return}if(ot(Ja,!0),I){if(k==="entries"&&S){const N=T_(E,S),j=I[S];Nd(N?{collection:C,collectionFile:j,originalEntry:N}:{collection:C,collectionFile:j,originalEntry:{slug:j.name,locales:Object.fromEntries(j._i18n.initialLocales.map(H=>[H,{}]))}}),ot(Rs,s()("editing_x_collection_file",{values:{collection:L,file:j.label||j.name}}))}}else if(k==="new"&&!S&&(Nd({collection:C,dynamicValues:b}),ot(Rs,s()("creating_x_collection_entry",{values:{collection:L}}))),k==="entries"&&S){const N=o().find(j=>j.subPath===S);N&&(Nd({collection:C,originalEntry:N}),ot(Rs,s()("editing_x_collection_entry",{values:{collection:L,entry:Vo(i(),N)}})))}};ln(()=>{d()});var f=D7();_i("hashchange",al,()=>{d()});var h=M(f);const p=w(()=>s()("content_library"));Md(h,{class:"content",get"aria-label"(){return l(p)},primarySidebar:y=>{x7(y,{})},main:y=>{const x=w(()=>s()("x_collection",{values:{collection:i()?.label||i()?.name}})),k=w(()=>i()?.description);_r(y,{id:"collection-container",class:"main",get"aria-label"(){return l(x)},get"aria-description"(){return l(k)},children:(S,C)=>{XC(S,{primaryToolbar:I=>{O7(I,{})},secondaryToolbar:I=>{var N=V(),j=M(N);{var H=B=>{R7(B,{})};U(j,B=>{i()?._type==="entry"&&o().length&&B(H)})}T(I,N)},mainContent:I=>{var N=V(),j=M(N);yi(j,()=>l(u),(H,B)=>{B(H,{})}),T(I,N)},secondarySidebar:I=>{$7(I,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var g=D(h,2);n7(g,{});var m=D(g,2);Gn(m,{get show(){return a().saved},set show(_){Ct(Ld,xe(a).saved=_,xe(a))},children:(_,b)=>{Bn(_,{status:"success",children:(y,x)=>{var k=Be();q(S=>Z(k,S),[()=>s()(a().published?"entry_saved_and_published":"entry_saved")]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var v=D(m,2);Gn(v,{get show(){return a().deleted},set show(_){Ct(Ld,xe(a).deleted=_,xe(a))},children:(_,b)=>{Bn(_,{status:"success",children:(y,x)=>{var k=Be();q(S=>Z(k,S),[()=>s()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}function F7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(rg,"$translator",n),s=()=>z(Ja,"$showContentOverlay",n),o=()=>z(Od,"$translatorApiKeyDialogState",n),a=()=>z(le,"$_",n),c=()=>z(Tt,"$prefs",n),u=w(()=>i().serviceId),d=w(()=>i().serviceLabel),f=w(()=>i().developerURL),h=w(()=>i().apiKeyURL),p=w(()=>i().apiKeyPattern);Ue(()=>{!s()&&o().show&&(Ct(Od,xe(o).show=!1,xe(o)),o().resolve?.())});const g=w(()=>a()(o().multiple?"translate_fields":"translate_field")),m=w(()=>({spellcheck:!1,"aria-label":a()("api_key")}));kL(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(Ct(Tt,xe(c).apiKeys??={},xe(c)),Ct(Tt,xe(c).apiKeys[l(u)]=_,xe(c)),Ct(Od,xe(o).show=!1,xe(o)),o().resolve?.(_))},onCancel:()=>{o().resolve?.()},get open(){return o().show},set open(v){Ct(Od,xe(o).show=v,xe(o))},children:(v,_)=>{var b=V(),y=M(b);pr(y,()=>li.sanitize(a()("prefs.languages.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(v,b)},$$slots:{default:!0}}),oe(),r()}function z7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(F_,"$entryParseErrors",n),s=()=>z(le,"$_",n);let o=ae(!!i().length);Gn(t,{get show(){return l(o)},set show(a){$(o,ie(a))},children:(a,c)=>{Bn(a,{status:"error",children:(u,d)=>{var f=Be();q(h=>Z(f,h),[()=>s()(i().length===1?"entry_parse_error":"entry_parse_errors")]),T(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var j7=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function U7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Ue(()=>{$(o,ie(i().underlineLinks??!0))}),Ue(()=>{i().underlineLinks!==l(o)&&Ct(Tt,xe(i).underlineLinks=l(o),xe(i))}),Sl(t,{id:"prefs-tab-accessibility",children:(a,c)=>{var u=j7(),d=R(u),f=R(d),h=D(d,2),p=R(h),g=D(h,2),m=R(g);const v=w(()=>s()("prefs.accessibility.underline_links.switch_label"));fu(m,{get label(){return l(v)},get checked(){return l(o)},set checked(_){$(o,ie(_))}}),q((_,b)=>{Z(f,_),Z(p,b)},[()=>s()("prefs.accessibility.underline_links.title"),()=>s()("prefs.accessibility.underline_links.description")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var B7=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>'),q7=F('<!> <section><h4> </h4> <p> </p> <div role="none"><!></div></section>',1);function H7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(le,"$_",n);let a=P(e,"onChange",3,void 0);const c=w(()=>i()?.backend.automatic_deployments);let u=ae(!1);Ue(()=>{$(u,ie(s().devModeEnabled??!1))}),Ue(()=>{s().devModeEnabled!==l(u)&&Ct(Tt,xe(s).devModeEnabled=l(u),xe(s))}),Sl(t,{id:"prefs-tab-advanced",children:(d,f)=>{var h=q7(),p=M(h);{var g=C=>{var E=B7(),A=R(E),O=R(A),L=D(A,2),I=R(L),N=D(L,2),j=R(N);const H=w(()=>o()("prefs.advanced.deploy_hook.field_label"));yn(j,{flex:!0,get label(){return l(H)},onchange:()=>{a()?.({message:o()(s().deployHookURL?"prefs.advanced.deploy_hook.url_saved":"prefs.advanced.deploy_hook.url_removed")})},get value(){return s().deployHookURL},set value(B){Ct(Tt,xe(s).deployHookURL=B,xe(s))}}),q((B,W)=>{Z(O,B),Z(I,W)},[()=>o()("prefs.advanced.deploy_hook.title"),()=>o()("prefs.advanced.deploy_hook.description")]),T(C,E)};U(p,C=>{typeof l(c)=="boolean"&&C(g)})}var m=D(p,2),v=R(m),_=R(v),b=D(v,2),y=R(b),x=D(b,2),k=R(x);const S=w(()=>o()("prefs.advanced.developer_mode.switch_label"));fu(k,{get label(){return l(S)},get checked(){return l(u)},set checked(C){$(u,ie(C))}}),q((C,E)=>{Z(_,C),Z(y,E)},[()=>o()("prefs.advanced.developer_mode.title"),()=>o()("prefs.advanced.developer_mode.description")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var V7=F('<section><h4> </h4> <div role="none"><!></div></section>');function W7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);P(e,"onChange",3,void 0),Sl(t,{id:"prefs-tab-appearance",children:(o,a)=>{var c=V7(),u=R(c),d=R(u),f=D(u,2),h=R(f);const p=w(()=>i()("prefs.appearance.select_theme"));Cf(h,{get"aria-label"(){return l(p)},onChange:g=>{ot(Tt,{...s(),theme:g.detail.value})},children:(g,m)=>{var v=V(),_=M(v);dt(_,16,()=>["auto","dark","light"],Xn,(b,y)=>{const x=w(()=>i()(`prefs.theme.${y}`)),k=w(()=>!s().theme&&y==="auto"||s().theme===y);ou(b,{variant:"tertiary",get label(){return l(x)},get value(){return y},get selected(){return l(k)}})}),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("prefs.appearance.theme")]),T(o,c)},$$slots:{default:!0}}),oe(),r()}var G7=F('<section><h4> </h4> <div role="none"><!></div></section>');function K7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Ue(()=>{$(o,ie(i().closeOnSave??!0))}),Ue(()=>{i().closeOnSave!==l(o)&&Ct(Tt,xe(i).closeOnSave=l(o),xe(i))}),Sl(t,{id:"prefs-tab-contents",children:(a,c)=>{var u=G7(),d=R(u),f=R(d),h=D(d,2),p=R(h);const g=w(()=>s()("prefs.contents.editor.close_on_save.switch_label"));fu(p,{get label(){return l(g)},get checked(){return l(o)},set checked(m){$(o,ie(m))}}),q(m=>Z(f,m),[()=>s()("prefs.contents.editor.title")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var Y7=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),J7=F('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function Z7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Ln,"$appLocale",n),o=()=>z(Tt,"$prefs",n),a=()=>z(ux,"$appLocales",n),c=()=>z(yt,"$siteConfig",n);let u=P(e,"onChange",3,void 0);Sl(t,{id:"prefs-tab-languages",children:(d,f)=>{var h=J7(),p=M(h),g=R(p),m=R(g),v=D(g,2),_=R(v);ms(_,s,x=>{const k=w(()=>i()("prefs.languages.ui_language.select_language")),S=w(()=>s()??void 0);du(x,{get"aria-label"(){return l(k)},get value(){return l(S)},onChange:C=>{ot(Tt,{...o(),locale:C.detail.value})},children:(C,E)=>{var A=V(),O=M(A);dt(O,1,a,Xn,(L,I)=>{const N=w(()=>Ts(l(I))),j=w(()=>l(I)===s());gr(L,{get label(){return l(N)},get value(){return l(I)},get selected(){return l(j)}})}),T(C,A)},$$slots:{default:!0}})});var b=D(p,2);{var y=x=>{var k=V(),S=M(k);dt(S,17,()=>Object.entries(s6),([C,E])=>C,(C,E)=>{let A=()=>l(E)[0],O=()=>l(E)[1];var L=Y7();const I=w(()=>{const{serviceLabel:ee,developerURL:J,apiKeyURL:Y}=O();return{serviceLabel:ee,developerURL:J,apiKeyURL:Y}});var N=R(L),j=R(N),H=D(N,2),B=R(H);pr(B,()=>li.sanitize(i()("prefs.languages.translator.description",{values:{service:l(I).serviceLabel,homeHref:`href="${l(I).developerURL}"`,apiKeyHref:`href="${l(I).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var W=D(H,2),G=R(W);{var K=ee=>{const J=w(()=>i()("prefs.languages.translator.field_label",{values:{service:l(I).serviceLabel}}));yn(ee,{flex:!0,spellcheck:"false",get"aria-label"(){return l(J)},onchange:()=>{u()?.({message:i()(o().apiKeys?.[A()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return o().apiKeys[A()]},set value(Y){Ct(Tt,xe(o).apiKeys[A()]=Y,xe(o))}})};U(G,ee=>{o().apiKeys&&ee(K)})}q(ee=>Z(j,ee),[()=>i()("prefs.languages.translator.title",{values:{service:l(I).serviceLabel}})]),T(C,L)}),T(x,k)};U(b,x=>{(c()?.i18n?.locales?.length??0)>1&&x(y)})}q(x=>Z(m,x),[()=>i()("prefs.languages.ui_language.title")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var X7=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>');function Q7(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=P(e,"onChange",3,void 0);Sl(t,{id:"prefs-tab-media",children:(a,c)=>{var u=V(),d=M(u);dt(d,17,()=>Object.entries(zd),([f,h])=>f,(f,h)=>{let p=()=>l(h)[0],g=()=>l(h)[1];var m=X7();const v=w(()=>{const{serviceLabel:E,developerURL:A,apiKeyURL:O}=g();return{serviceLabel:E,developerURL:A,apiKeyURL:O}});var _=R(m),b=R(_),y=D(_,2),x=R(y);pr(x,()=>li.sanitize(i()("prefs.media.stock_photos.description",{values:{service:l(v).serviceLabel,homeHref:`href="${l(v).developerURL}"`,apiKeyHref:`href="${l(v).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var k=D(y,2),S=R(k);{var C=E=>{const A=w(()=>i()("prefs.media.stock_photos.field_label",{values:{service:l(v).serviceLabel}}));yn(E,{flex:!0,spellcheck:"false",get"aria-label"(){return l(A)},onchange:()=>{o()?.({message:i()(s().apiKeys?.[p()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return s().apiKeys[p()]},set value(O){Ct(Tt,xe(s).apiKeys[p()]=O,xe(s))}})};U(S,E=>{s().apiKeys&&E(C)})}q(E=>Z(b,E),[()=>i()("prefs.media.stock_photos.title",{values:{service:l(v).serviceLabel}})]),T(f,m)}),T(a,u)},$$slots:{default:!0}}),oe(),r()}var eG=F('<div role="none" class="wrapper svelte-z6esgm"><!> <!></div>'),tG=F("<!> <!>",1);const nG={hash:"svelte-z6esgm",code:".wrapper.svelte-z6esgm {display:flex;}.wrapper.svelte-z6esgm .tab-list {flex:none;}.wrapper.svelte-z6esgm .tab-panel {flex:auto;border-width:0;}.wrapper.svelte-z6esgm .tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-z6esgm .tab-panel p {margin-top:0;}.wrapper.svelte-z6esgm .tab-panel h4 {font-size:inherit;}.wrapper.svelte-z6esgm .tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-z6esgm .tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function rG(t,e){se(e,!0),Ee(t,nG);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0),a=ae("appearance"),c=ae(""),u=ae(!1);const d=[{key:"appearance",icon:"palette",component:W7},{key:"languages",icon:"language",component:Z7},{key:"contents",icon:"library_books",component:K7},{key:"media",icon:"photo_library",component:Q7},{key:"accessibility",icon:"accessibility_new",component:U7},{key:"advanced",icon:"build",component:H7}];var f=tG(),h=M(f);const p=w(()=>i()("settings"));Ui(h,{get title(){return l(p)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(m){s(m)},children:(m,v)=>{var _=eG(),b=R(_);const y=w(()=>i()("categories"));MN(b,{orientation:"vertical",get"aria-label"(){return l(y)},children:(k,S)=>{var C=V(),E=M(C);dt(E,17,()=>d,({key:A,icon:O})=>A,(A,O)=>{let L=()=>l(O).key,I=()=>l(O).icon;const N=w(()=>i()(`prefs.${L()}.title`)),j=w(()=>L()===l(a));jN(A,{get label(){return l(N)},get selected(){return l(j)},get"aria-controls"(){return`prefs-tab-${L()??""}`},onSelect:()=>{$(a,ie(L()))},startIcon:B=>{et(B,{get name(){return I()}})},$$slots:{startIcon:!0}})}),T(k,C)},$$slots:{default:!0}});var x=D(b,2);dt(x,17,()=>d,({key:k,component:S})=>k,(k,S)=>{let C=()=>l(S).component;var E=V(),A=M(E);yi(A,C,(O,L)=>{L(O,{onChange:({message:I})=>{$(c,ie(I)),$(u,!0)}})}),T(k,E)}),T(m,_)},$$slots:{default:!0}});var g=D(h,2);Gn(g,{get show(){return l(u)},set show(m){$(u,ie(m))},children:(m,v)=>{Bn(m,{status:"success",children:(_,b)=>{var y=Be();q(()=>Z(y,l(c))),T(_,y)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}var iG=F('<img class="avatar svelte-xssn1c" loading="lazy" alt="">'),sG=F("<!> <!>",1),oG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1),aG=F('<div role="none" class="wrapper svelte-xssn1c"><!></div> <!>',1);const lG={hash:"svelte-xssn1c",code:".wrapper.svelte-xssn1c {display:contents;}.wrapper.svelte-xssn1c button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-xssn1c {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function cG(t,e){se(e,!0),Ee(t,lG);const[n,r]=me(),i=()=>z(fi,"$user",n),s=()=>z(Is,"$backendName",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(Nn,"$backend",n);let u=ae(void 0),d=ae(!1);const f=w(()=>!!i()?.avatarURL),h=w(()=>s()==="local");var p=aG(),g=M(p),m=R(g);const v=w(()=>l(f)?"avatar":""),_=w(()=>o()("show_account_menu"));Pt(Er(m,{variant:"ghost",iconic:!0,get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:k=>{var S=V(),C=M(S);{var E=O=>{var L=iG();q(()=>ke(L,"src",i()?.avatarURL)),T(O,L)},A=O=>{et(O,{name:"account_circle"})};U(C,O=>{l(f)?O(E):O(A,!1)})}T(k,S)},popup:k=>{const S=w(()=>o()("account"));mr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{var A=oG(),O=M(A);const L=w(()=>l(h)?o()("working_with_local_repo"):o()("signed_in_as_x",{values:{name:i()?.login}}));Lt(O,{get label(){return l(L)},get disabled(){return l(h)},onclick:()=>{window.open(i()?.profileURL,"_blank")}});var I=D(O,2);Tr(I,{});var N=D(I,2);const j=w(()=>o()("live_site"));Lt(N,{get label(){return l(j)},onclick:()=>{EC()}});var H=D(N,2);{var B=te=>{var ce=sG(),he=M(ce);const re=w(()=>o()("git_repository")),X=w(()=>!c()?.repository?.treeBaseURL);Lt(he,{get label(){return l(re)},get disabled(){return l(X)},onclick:()=>{window.open(c()?.repository?.treeBaseURL)}});var fe=D(he,2);const be=w(()=>o()("site_config"));Lt(fe,{get label(){return l(be)},onclick:()=>{zn("/config")}}),T(te,ce)};U(H,te=>{a().devModeEnabled&&te(B)})}var W=D(H,2);Tr(W,{});var G=D(W,2);const K=w(()=>o()("settings"));Lt(G,{get label(){return l(K)},onclick:()=>{$(d,!0)}});var ee=D(G,2);Tr(ee,{});var J=D(ee,2);const Y=w(()=>o()("sign_out"));Lt(J,{get label(){return l(Y)},onclick:async()=>{window.requestAnimationFrame(()=>{Xq()})}}),T(C,A)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),k=>$(u,ie(k)),()=>l(u));var b=D(g,2);rG(b,{onClose:()=>{l(u)?.focus()},get open(){return l(d)},set open(y){$(d,ie(y))}}),T(t,p),oe(),r()}var uG=F("<!> <!>",1),dG=F("<!> <!>",1);function fG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(le,"$_",n),o=w(()=>(i()?.collections??[]).filter(({folder:c,hide:u=!1,divider:d=!1})=>typeof c=="string"&&!u&&!d)),a=w(()=>s()("create_entry_or_assets"));Er(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(a)},endIcon:d=>{et(d,{name:"add"})},popup:d=>{const f=w(()=>s()("create_entry_or_assets"));mr(d,{get"aria-label"(){return l(f)},children:(h,p)=>{var g=dG(),m=M(g);{var v=y=>{var x=uG(),k=M(x);dt(k,17,()=>l(o),C=>C.name,(C,E)=>{const A=w(()=>{const{name:I,label:N,label_singular:j,create:H=!1,limit:B=1/0}=l(E);return{name:I,label:N,labelSingular:j,create:H,limit:B}}),O=w(()=>l(A).labelSingular||l(A).label||l(A).name),L=w(()=>!l(A).create||ns(l(A).name).length>=l(A).limit);Lt(C,{get label(){return l(O)},get disabled(){return l(L)},onclick:()=>{zn(`/collections/${l(A).name}/new`)}})});var S=D(k,2);Tr(S,{}),T(y,x)};U(m,y=>{l(o).length&&y(v)})}var _=D(m,2);const b=w(()=>s()("assets"));Lt(_,{get label(){return l(b)},onclick:async()=>{zn("/assets"),await hn(100),ot(el,!0)}}),T(h,g)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),oe(),r()}var hG=F('<kbd class="svelte-h10dbf"> </kbd>'),pG=F("<!> <!>",1),gG=F('<div role="none" class="wrapper svelte-h10dbf"><!></div>');const mG={hash:"svelte-h10dbf",code:".wrapper.svelte-h10dbf {display:contents;}.wrapper.svelte-h10dbf .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row .feature {flex:auto;}.wrapper.svelte-h10dbf .table-row .keys {display:flex;gap:8px;}kbd.svelte-h10dbf {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 vG(t,e){se(e,!0),Ee(t,mG);const[n,r]=me(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(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=ae("Ctrl");ln(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&$(c,"⌘")});const u=w(()=>i()("help.keyboard_shortcuts"));Ui(t,{get title(){return l(u)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(d){s(d)},children:(d,f)=>{var h=gG(),p=R(h);const g=w(()=>i()("help.keyboard_shortcuts"));IN(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=V(),b=M(_);dt(b,17,()=>a,({feature:y,keys:x})=>x,(y,x)=>{let k=()=>l(x).feature,S=()=>l(x).keys;$N(y,{children:(C,E)=>{var A=pG(),O=M(A);Ex(O,{class:"feature",children:(I,N)=>{var j=Be();q(H=>Z(j,H),[()=>i()(`keyboard_shortcuts_.${k()}`)]),T(I,j)},$$slots:{default:!0}});var L=D(O,2);Ex(L,{class:"keys",children:(I,N)=>{var j=V(),H=M(j);dt(H,17,()=>S().split("+"),Xn,(B,W)=>{var G=hG(),K=R(G);q(ee=>Z(K,ee),[()=>l(W).replace("Accel",l(c))]),T(B,G)}),T(I,j)},$$slots:{default:!0}}),T(C,A)},$$slots:{default:!0}})}),T(m,_)},$$slots:{default:!0}}),T(d,h)},$$slots:{default:!0}}),oe(),r()}var bG=F('<span class="version svelte-69n4ux"></span>'),_G=F("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1),yG=F('<div role="none" class="wrapper svelte-69n4ux"><!></div> <!>',1);const wG={hash:"svelte-69n4ux",code:".wrapper.svelte-69n4ux {display:contents;}.version.svelte-69n4ux {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 xG(t,e){se(e,!0),Ee(t,wG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=ae(void 0),a=ae(!1);var c=yG(),u=M(c),d=R(u);const f=w(()=>i()("show_help_menu"));Pt(Er(d,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},endIcon:m=>{et(m,{name:"help"})},popup:m=>{const v=w(()=>i()("help"));mr(m,{get"aria-label"(){return l(v)},children:(_,b)=>{var y=_G(),x=M(y);{var k=ee=>{const J=w(()=>i()("keyboard_shortcuts"));Lt(ee,{get label(){return l(J)},onclick:()=>{$(a,!0)}})};U(x,ee=>{window.matchMedia("(pointer: fine)").matches&&ee(k)})}var S=D(x,2);const C=w(()=>i()("documentation"));Lt(S,{get label(){return l(C)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")}});var E=D(S,2);const A=w(()=>i()("release_notes"));Lt(E,{get label(){return l(A)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:J=>{var Y=V(),te=M(Y);{var ce=he=>{var re=bG();re.textContent=`v${ny}`,q(X=>ke(re,"aria-label",`(${X??""})`),[()=>i()("version_x",{values:{version:ny}})]),T(he,re)};U(te,he=>{s().devModeEnabled&&he(ce)})}T(J,Y)},$$slots:{endIcon:!0}});var O=D(E,2);Tr(O,{});var L=D(O,2);const I=w(()=>i()("report_issue"));Lt(L,{get label(){return l(I)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/issues/new?labels=bug","_blank")}});var N=D(L,2);const j=w(()=>i()("share_feedback"));Lt(N,{get label(){return l(j)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=general","_blank")}});var H=D(N,2);const B=w(()=>i()("get_help"));Lt(H,{get label(){return l(B)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=q-a","_blank")}});var W=D(H,2);Tr(W,{});var G=D(W,2);const K=w(()=>i()("join_discord"));Lt(G,{get label(){return l(K)},onclick:()=>{window.open("https://discord.gg/5hwCGqup5b","_blank")}}),T(_,y)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),m=>$(o,ie(m)),()=>l(o));var h=D(u,2);vG(h,{onClose:()=>{l(o)?.focus()},get open(){return l(a)},set open(p){$(a,ie(p))}}),T(t,c),oe(),r()}function kG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>i()("show_notifications"));Je(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:a=>{et(a,{name:"notifications"})},$$slots:{startIcon:!0}}),oe(),r()}var SG=F('<div role="none" class="wrapper svelte-1wpllk"><!></div>');const EG={hash:"svelte-1wpllk",code:".wrapper.svelte-1wpllk {display:contents;}.wrapper.svelte-1wpllk .sui.select-button-group {gap:4px;}.wrapper.svelte-1wpllk .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function TG(t,e){se(e,!0),Ee(t,EG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(ty,"$selectedPageName",n),u=w(()=>[{key:"collections",label:i()("contents"),icon:"library_books",link:`/collections/${s()?.name??o()?.collections[0].name}`},{key:"assets",label:i()("assets"),icon:"photo_library",link:a()?`/assets/${a().internalPath}`:"/assets"}]);var d=SG(),f=R(d);const h=w(()=>i()("switch_page"));Cf(f,{get"aria-label"(){return l(h)},"aria-controls":"page-container",children:(p,g)=>{var m=V(),v=M(m);dt(v,19,()=>l(u),({key:_,label:b,icon:y,link:x})=>_,(_,b,y)=>{let x=()=>l(b).key,k=()=>l(b).label,S=()=>l(b).icon,C=()=>l(b).link;const E=w(()=>c()===x()),A=w(()=>l(y)+1);ou(_,{variant:"ghost",iconic:!0,get selected(){return l(E)},get"aria-label"(){return k()},get keyShortcuts(){return`Alt+${l(A)??""}`},onSelect:()=>{zn(C())},startIcon:L=>{et(L,{get name(){return S()}})},$$slots:{startIcon:!0}})}),T(p,m)},$$slots:{default:!0}}),T(t,d),oe(),r()}var CG=F("<!> <!>",1);function AG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(Nn,"$backend",n),a=()=>z(Is,"$backendName",n),c=()=>z(Zp,"$isLastCommitPublished",n),u=()=>z(le,"$_",n),d=w(()=>i()?.backend.automatic_deployments),f=w(()=>s().deployHookURL),h=w(()=>o()?.triggerDeployment),p=w(()=>a()!=="local"&&typeof l(d)=="boolean"),g=w(()=>(!!l(f)||typeof l(h)=="function")&&!c());let m=ae("info"),v=ae(!1);const _=async()=>{$(m,"info"),$(v,!0);try{const{ok:k,status:S}=l(f)?await fetch(l(f),{method:"POST",mode:"no-cors"}):await l(h)?.()??{};if(!k&&S!==0)throw new Error(`Webhook returned ${S} error`);ot(Zp,!0)}catch(k){$(m,"error"),$(v,!0),console.error(k)}};var b=V(),y=M(b);{var x=k=>{var S=CG(),C=M(S);const E=w(()=>u()("publish_changes")),A=w(()=>!l(g));Je(C,{variant:"secondary",get label(){return l(E)},get disabled(){return l(A)},onclick:()=>_()});var O=D(C,2);Gn(O,{get show(){return l(v)},set show(L){$(v,ie(L))},children:(L,I)=>{Bn(L,{get status(){return l(m)},children:(N,j)=>{var H=Be();q(B=>Z(H,B),[()=>u()(l(m)==="error"?"publishing_changes_failed":"publishing_changes")]),T(N,H)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(k,S)};U(y,k=>{l(p)&&k(x)})}T(t,b),oe(),r()}var PG=F('<div role="none" class="wrapper svelte-ns8gcu"><svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper></div>');const OG={hash:"svelte-ns8gcu",code:".wrapper.svelte-ns8gcu {display:contents;--sui-textbox-border-width: 0;}"};function $G(t,e){se(e,!0),Ee(t,OG);const[n,r]=me(),i=()=>z(Fc,"$searchTerms",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a=()=>z(le,"$_",n),c=g=>{const m=!!i(),{path:v}=$d(),_=v.startsWith("/search/");ot(Fc,g),g?zn(`/search/${g}`,{replaceState:_}):m&&_&&Dc(`/collections/${s()?.name??o()?.collections[0].name}`)};let u=ae(void 0),d=ae(void 0);Ue(()=>{l(d)&&i()!==l(d)?.value&&(l(d).value=i())});var f=PG(),h=R(f);const p=w(()=>a()("search_placeholder"));ff(h,()=>({"--sui-textbox-placeholder-text-align":"center"})),Pt(nm(h.lastChild,{keyShortcuts:"Accel+F",showInlineLabel:!0,get"aria-label"(){return l(p)},oninput:({target:g})=>{c(g.value.trim())}}),g=>$(d,ie(g)),()=>l(d)),Pt(f,g=>$(u,g),()=>l(u)),T(t,f),oe(),r()}var LG=F('<img loading="lazy" alt="" class="logo svelte-14sy0eb">');const NG={hash:"svelte-14sy0eb",code:"img.svelte-14sy0eb {width:24px;height:24px;object-fit:contain;}"};function IG(t,e){se(e,!0),Ee(t,NG);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(le,"$_",n);var o=V(),a=M(o);{var c=u=>{const d=w(()=>s()("visit_live_site"));Je(u,{variant:"ghost",iconic:!0,get"aria-label"(){return l(d)},onclick:()=>{EC()},children:(f,h)=>{var p=LG();q(()=>ke(p,"src",i().logo_url)),T(f,p)},$$slots:{default:!0}})};U(a,u=>{i()?.logo_url&&u(c)})}T(t,o),oe(),r()}var RG=F('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),DG=F('<div role="none" class="toolbar-wrapper svelte-ornzx3"><!></div>');const MG={hash:"svelte-ornzx3",code:".toolbar-wrapper.svelte-ornzx3 {display:contents;}.toolbar-wrapper[inert].svelte-ornzx3 {display:none;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .search-bar {flex:none;width:640px;max-width:50%;}"};function FG(t,e){se(e,!0),Ee(t,MG);const[n,r]=me(),i=()=>z(SC,"$hasOverlay",n),s=()=>z(le,"$_",n);var o=DG(),a=R(o);const c=w(()=>s()("global"));Zs(a,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=RG(),h=M(f),p=R(h);IG(p,{});var g=D(p,2);TG(g,{});var m=D(h,2);$G(m,{});var v=D(m,2),_=R(v);AG(_,{});var b=D(_,2);fG(b,{});var y=D(b,2);kG(y,{});var x=D(y,2);xG(x,{});var k=D(x,2);cG(k,{}),T(u,f)},$$slots:{default:!0}}),q(()=>o.inert=i()),T(t,o),oe(),r()}var zG=F("<!> <!> <!>",1);function jG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Ln,"$appLocale",n),s=w(()=>e.asset.path),o=w(()=>e.asset.name),a=w(()=>e.asset.folder),c=w(()=>e.asset.kind);lu(t,{onclick:()=>{zn(`/assets/${l(s)}`)},children:(u,d)=>{var f=zG(),h=M(f);ai(h,{class:"image",children:(m,v)=>{Ds(m,{get kind(){return l(c)},get asset(){return e.asset},variant:"icon",cover:!0})},$$slots:{default:!0}});var p=D(h,2);ai(p,{class:"collection",children:(m,v)=>{var _=Be();q(b=>Z(_,b),[()=>i()?cy(l(a)):""]),T(m,_)},$$slots:{default:!0}});var g=D(p,2);ai(g,{class:"title",children:(m,v)=>{var _=Be();q(()=>Z(_,l(o))),T(m,_)},$$slots:{default:!0}}),T(u,f)},$$slots:{default:!0}}),oe(),r()}var UG=F("<!> <!> <!>",1);function BG(t,e){se(e,!0);const n=(a,c)=>{let u=()=>c?.().collection,d=()=>c?.().collectionFile;var f=V();const h=w(()=>{const{defaultLocale:v}=(d()??u())._i18n??$i;return{defaultLocale:v}}),p=w(()=>{const{content:v}=l(r)[l(h).defaultLocale]??Object.values(l(r))[0]??{};return{content:v}});var g=M(f);{var m=v=>{lu(v,{onclick:()=>{zn(`/collections/${u().name}/entries/${d()?.name||l(i)}`)},children:(_,b)=>{var y=UG(),x=M(y);ai(x,{class:"image",children:(C,E)=>{var A=V(),O=M(A);{var L=I=>{var N=V(),j=M(N);hr(j,()=>$A(u(),e.entry),null,(H,B)=>{var W=V(),G=M(W);{var K=ee=>{dy(ee,{get src(){return l(B)},variant:"icon",cover:!0})};U(G,ee=>{l(B)&&ee(K)})}T(H,W)}),T(I,N)};U(O,I=>{u()._type==="entry"&&I(L)})}T(C,A)},$$slots:{default:!0}});var k=D(x,2);ai(k,{class:"collection",children:(C,E)=>{var A=Be();q(()=>Z(A,u().label||u().name)),T(C,A)},$$slots:{default:!0}});var S=D(k,2);ai(S,{class:"title",children:(C,E)=>{var A=V(),O=M(A);{var L=N=>{var j=Be();q(()=>Z(j,d().label||d().name)),T(N,j)},I=N=>{var j=V(),H=M(j);pr(H,()=>Vo(u(),e.entry,{useTemplate:!0,allowMarkdown:!0})),T(N,j)};U(O,N=>{d()?N(L):N(I,!1)})}T(C,A)},$$slots:{default:!0}}),T(_,y)},$$slots:{default:!0}})};U(g,v=>{l(p).content&&v(m)})}T(a,f)},r=w(()=>e.entry.locales),i=w(()=>e.entry.subPath);var s=V(),o=M(s);dt(o,17,()=>co(e.entry),a=>a.name,(a,c)=>{var u=V(),d=M(u);dt(d,17,()=>Wo(l(c),e.entry),f=>f.name,(f,h)=>{n(f,()=>({collection:l(c),collectionFile:l(h)}))},f=>{n(f,()=>({collection:l(c)}))}),T(a,u)}),T(t,s),oe()}var qG=F('<h3 role="none" id="search-results-entries" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),HG=F('<h3 role="none" id="search-results-assets" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),VG=F('<div role="none" class="wrapper svelte-11iebi8"><header role="none" class="svelte-11iebi8"><h2 role="none" class="svelte-11iebi8"> </h2></header> <div role="none" class="results svelte-11iebi8"><!> <!></div></div>');const WG={hash:"svelte-11iebi8",code:".wrapper.svelte-11iebi8 {display:flex;flex-direction:column;width:100%;}header.svelte-11iebi8 {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}header.svelte-11iebi8 h2:where(.svelte-11iebi8) {font-size:var(--sui-font-size-x-large);}.results.svelte-11iebi8 {flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%;}.results.svelte-11iebi8 > .group {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%;}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) {flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) + div:where(.svelte-11iebi8) {overflow:auto;flex:auto;}"};function GG(t,e){se(e,!0),Ee(t,WG);const[n,r]=me(),i=()=>z(le,"$_",n),s=()=>z(Fc,"$searchTerms",n),o=()=>z(dA,"$searchResults",n);var a=VG(),c=R(a),u=R(c),d=R(u),f=D(c,2),h=R(f);_r(h,{"aria-labelledby":"search-results-entries",children:(g,m)=>{var v=qG(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("entries"));Dd(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().entries.length},children:(A,O)=>{var L=V(),I=M(L);ms(I,s,N=>{nl(N,{get items(){return o().entries},itemKey:"id",renderItem:(H,B=Me)=>{BG(H,{get entry(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Be();q(A=>Z(E,A),[()=>i()("no_entries_found")]),T(C,E)};U(x,C=>{o().entries.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("entries")]),T(g,v)},$$slots:{default:!0}});var p=D(h,2);_r(p,{"aria-labelledby":"search-results-assets",children:(g,m)=>{var v=HG(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("assets"));Dd(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().assets.length},children:(A,O)=>{var L=V(),I=M(L);ms(I,s,N=>{nl(N,{get items(){return o().assets},itemKey:"path",renderItem:(H,B=Me)=>{jG(H,{get asset(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Be();q(A=>Z(E,A),[()=>i()("no_files_found")]),T(C,E)};U(x,C=>{o().assets.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("assets")]),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("search_results_for_x",{values:{terms:s()}})]),T(t,a),oe(),r()}function KG(t,e){se(e,!0);const[n,r]=me(),i=()=>z(Fc,"$searchTerms",n),s=()=>z(dA,"$searchResults",n),o=()=>z(le,"$_",n),a=/^\/search\/(?<terms>.+)$/,c=()=>{const{path:d}=$d(),{terms:f}=d.match(a)?.groups??{};f&&f!==i()&&ot(Fc,f);const{entries:h,assets:p}=s(),g=h.length,m=p.length;ot(Rs,o()("viewing_search_results",{values:{terms:i(),entries:g>1?o()("many_entries",{values:{count:g}}):g===1?o()("one_entry"):o()("no_entries"),assets:m>1?o()("many_assets",{values:{count:m}}):m===1?o()("one_asset"):o()("no_assets")}}))};ln(()=>{c()}),_i("hashchange",al,()=>{c()});const u=w(()=>o()("search_results_for_x",{values:{terms:i()}}));Md(t,{class:"content",get"aria-label"(){return l(u)},main:f=>{GG(f,{})},$$slots:{main:!0}}),oe(),r()}var YG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="draft-column-title" class="svelte-1lr8kgc"> </h3></header>'),JG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="review-column-title" class="svelte-1lr8kgc"> </h3></header>'),ZG=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="ready-column-title" class="svelte-1lr8kgc"> </h3></header>'),XG=F('<div role="none" class="columns svelte-1lr8kgc"><!> <!> <!></div>');const QG={hash:"svelte-1lr8kgc",code:".columns.svelte-1lr8kgc {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.columns.svelte-1lr8kgc .column {flex:auto;width:33.3333333333%;background-color:var(--sui-primary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) h3:where(.svelte-1lr8kgc) {font-size:var(--sui-font-size-x-large);}"};function eK(t,e){se(e,!0),Ee(t,QG);const[n,r]=me(),i=()=>z(le,"$_",n),s=w(()=>i()("editorial_workflow"));Md(t,{class:"content",get"aria-label"(){return l(s)},main:a=>{var c=XG(),u=R(c);_r(u,{class:"column","aria-labelledby":"draft-column-title",children:(h,p)=>{var g=YG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.drafts")]),T(h,g)},$$slots:{default:!0}});var d=D(u,2);_r(d,{class:"column","aria-labelledby":"review-column-title",children:(h,p)=>{var g=JG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.in_review")]),T(h,g)},$$slots:{default:!0}});var f=D(d,2);_r(f,{class:"column","aria-labelledby":"ready-column-title",children:(h,p)=>{var g=ZG(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.ready")]),T(h,g)},$$slots:{default:!0}}),T(a,c)},$$slots:{main:!0}}),oe(),r()}var tK=F("<!> <!> <!> <!> <!> <!>",1);function nK(t,e){se(e,!0);const[n,r]=me(),i=()=>z(ty,"$selectedPageName",n),s=()=>z(qn,"$selectedCollection",n),o=()=>z(yt,"$siteConfig",n),a={collections:M7,assets:HH,search:KG,workflow:eK,config:JH},c=w(()=>a[i()]),u=()=>{ot(Ja,!1),ot(Go,!1);const{path:b}=$d(),{pageName:y}=b.match(`^\\/(?<pageName>${Object.keys(a).join("|")})\\b`)?.groups??{};y?i()!==y&&ot(ty,y):window.location.replace(`#/collections/${s()?.name??o()?.collections[0].name}`)};ln(()=>{u()});var d=tK();_i("hashchange",al,()=>{u()});var f=M(d);FG(f,{});var h=D(f,2);yi(h,()=>l(c),(b,y)=>{y(b,{})});var p=D(h,2);GH(p,{});var g=D(p,2);WH(g,{});var m=D(g,2);F7(m,{});var v=D(m,2);z7(v,{}),T(t,d);var _=oe({pages:a,selectPage:u});return r(),_}const rK=Object.freeze(Object.defineProperty({__proto__:null,strings:{collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",user_name:"User Name",password:"Password",sign_in:"Sign In",signed_in_as_x:"Signed In as {name}",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",upload:"Upload",copy:"Copy",download:"Download",duplicate:"Duplicate",delete:"Delete",save:"Save",saving:"Saving…",rename:"Rename",update:"Update",replace:"Replace",add:"Add",remove:"Remove",remove_x:"Remove {name}",clear:"Clear",expand:"Expand",expand_all:"Expand All",collapse:"Collapse",collapse_all:"Collapse All",insert:"Insert",restore:"Restore",discard:"Discard",searching:"Searching…",global:"Global",primary:"Primary",secondary:"Secondary",collection:"Collection",folder:"Folder",api_key:"API Key",details:"Details",clipboard_error:"There was an error while copying data.",welcome_to_sveltia_cms:"Welcome to Sveltia CMS",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",loading_site_data_error:"There was an error while loading site data.",sign_in_with_x:"Sign In with {service}",authorizing:"Authorizing…",signing_in:"Signing in…",work_with_local_repo:"Work with Local Repository",work_with_local_repo_description:"Click the button to select the root directory of the “{repo}” repository.",work_with_local_repo_description_no_repo:"Click the button to select the root directory of your Git repository.",sign_in_error:{not_project_root:"The folder you have selected is not a repository root directory. Please try again.",picker_dismissed:"A repository root directory could not be selected. Please try again.",authentication_aborted:"Authentication aborted. Please try again.",UNSUPPORTED_BACKEND:"Your Git backend is not supported by the authenticator.",UNSUPPORTED_DOMAIN:"Your domain is not allowed to use the authenticator.",MISCONFIGURED_CLIENT:"OAuth app client ID or secret is not configured.",AUTH_CODE_REQUEST_FAILED:"Failed to receive an authorization code. Please try again later.",CSRF_DETECTED:"Potential CSRF attack detected. Authentication flow aborted.",TOKEN_REQUEST_FAILED:"Failed to request an access token. Please try again later.",MALFORMED_RESPONSE:"Server responded with malformed data. Please try again later."},repository_no_access:"You don’t have access to the “{repo}” repository.",repository_not_found:"The “{repo}” repository doesn’t exist.",repository_empty:"The “{repo}” repository has no branches.",branch_not_found:"The “{repo}” repository doesn’t have the “{branch}” branch.",unexpected_error:"Unexpected Error",entry_parse_error:"There was an error while parsing an entry file. Check the browser console for details.",entry_parse_errors:"There were errors while parsing entry files. Check the browser console for details.",visit_live_site:"Visit Live Site",switch_page:"Switch Page",search_placeholder:"Search for entries and assets…",create_entry_or_assets:"Create Entry or Assets",publish_changes:"Publish Changes",publishing_changes:"Publishing Changes…",publishing_changes_failed:"Changes could not be published. Please try again later.",show_notifications:"Show Notifications",notifications:"Notifications",show_account_menu:"Show Account Menu",account:"Account",live_site:"Live Site",git_repository:"Git Repository",settings:"Settings",site_config:"Site Configuration",show_help_menu:"Show Help Menu",help:"Help",keyboard_shortcuts:"Keyboard Shortcuts",documentation:"Documentation",release_notes:"Release Notes",version_x:"Version {version}",report_issue:"Report Issue",share_feedback:"Share Feedback",get_help:"Get Help",join_discord:"Join Us on Discord",update_available:"The latest version of Sveltia CMS is available.",update_now:"Update Now",backend_status:{minor_incident:"{service} is experiencing a minor incident. Your workflow may be potentially affected.",major_incident:"{service} is experiencing a major incident. You may want to wait until the situation has improved."},content_library:"Content Library",asset_library:"Asset Library",collection_assets:"Collection Assets",entry_assets:"Entry Assets",entry_list:"Entry List",file_list:"File List",asset_list:"Asset List",x_collection:"“{collection}” Collection",x_asset_folder:"“{folder}” Asset Folder",viewing_x_collection_many_entries:"You’re now viewing the “{collection}” collection, which has {count} entries.",viewing_x_collection_one_entry:"You’re now viewing the “{collection}” collection, which has one entry.",viewing_x_collection_no_entries:"You’re now viewing the “{collection}” collection, which has no entries yet.",viewing_x_asset_folder_many_assets:"You’re now viewing the “{folder}” asset folder, which has {count} assets.",viewing_x_asset_folder_one_asset:"You’re now viewing the “{folder}” asset folder, which has one asset.",viewing_x_asset_folder_no_assets:"You’re now viewing the “{folder}” asset folder, which has no assets yet.",collection_not_found:"Collection not found",file_not_found:"File not found.",x_of_x_selected:"{selected} of {total} selected",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort:"Sort",sorting_options:"Sorting Options",sort_keys:{none:"None",name:"Name",commit_author:"Updated by",commit_date:"Updated on"},ascending:"{label}, A to Z",ascending_date:"{label}, old to new",descending:"{label}, Z to A",descending_date:"{label}, new to old",filter:"Filter",filtering_options:"Filtering Options",group:"Group",grouping_options:"Grouping Options",type:"Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",hide_assets:"Hide Assets",show_info:"Show Info",hide_info:"Hide Info",asset_folders:"Asset Folders",all_assets:"All Assets",uncategorized:"Uncategorized",creating_entries_disabled_by_admin:"Creating new entries in this collection is disabled by the administrator.",creating_entries_disabled_by_limit:"You cannot add new entries to this collection because it has reached its limit of {limit} entries.",back_to_collection:"Back to Collection",search_results_for_x:"Search Results for “{terms}”",viewing_search_results:"You’re now viewing search results for “{terms}”. We’ve found {entries} and {assets}.",many_entries:"{count} entries",one_entry:"one entry",no_entries:"no entries",many_assets:"{count} assets",one_asset:"one asset",no_assets:"no assets",no_files_found:"No files found.",no_entries_found:"No entries found.",upload_assets:"Upload New Assets",edit_options:"Edit Options",show_edit_options:"Show Edit Options",edit_asset:"Edit Asset",edit_x:"Edit {name}",wrap_long_lines:"Wrap Long Lines",rename_asset:"Rename Asset",rename_x:"Rename {name}",enter_new_name_for_asset:"Enter a new name below.",enter_new_name_for_asset_with_one_entry:"Enter a new name below. An entry using the asset will also be updated.",enter_new_name_for_asset_with_many_entries:"Enter a new name below. {count} entries using the asset will also be updated.",enter_new_name_for_asset_error:{empty:"File name cannot be empty.",character:"File name cannot contain special characters.",duplicate:"This file name is used for another asset."},replace_asset:"Replace Asset",replace_x:"Replace {name}",browse_file:"Click to browse",drop_or_browse_file:"Drop a file here or click to browse",drop_or_browse_files:"Drop files here or click to browse",drop_or_browse_image_file:"Drop an image file here or click to browse",drop_or_browse_image_files:"Drop image files here or click to browse",drop_file_here:"Drop a file here",drop_files_here:"Drop files here",drop_files_type_mismatch:"The dropped file is not the “{type}” type. Please try again.",choose_file:"Choose File",choose_files:"Choose Files",delete_asset:"Delete Asset",delete_assets:"Delete Assets",delete_selected_asset:"Delete Selected Asset",delete_selected_assets:"Delete Selected Assets",confirm_deleting_this_asset:"Are you sure to delete this asset?",confirm_deleting_selected_asset:"Are you sure to delete the selected asset?",confirm_deleting_selected_assets:"Are you sure to delete the selected {count} assets?",confirm_deleting_all_assets:"Are you sure to delete all the assets?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",delete_selected_entry:"Delete Selected Entry",delete_selected_entries:"Delete Selected Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_this_entry_with_assets:"Are you sure to delete this entry and associated assets?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entry_with_assets:"Are you sure to delete the selected entry and associated assets?",confirm_deleting_selected_entries:"Are you sure to delete the selected {count} entries?",confirm_deleting_selected_entries_with_assets:"Are you sure to delete the selected {count} entries and associated assets?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",confirm_deleting_all_entries_with_assets:"Are you sure to delete all the entries and associated assets?",confirm_replacing_file:"Are you sure to replace “{name}” with the following file?",confirm_uploading_file:"Are you sure to save the following file to the “{folder}” folder?",confirm_uploading_files:"Are you sure to save the following {count} files to the “{folder}” folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_in_collection:"No files available in this collection.",asset_info:"Asset Info",select_asset_show_info:"Select an asset to show the info.",duplicate_entry:"Duplicate Entry",entry_duplicated:"Entry has been duplicated. It’s now a new draft.",entry_validation_error:"One field has an error. Please correct it to save the entry.",entry_validation_errors:"{count} fields have an error. Please correct them to save the entry.",entry_saved:"Entry has been saved.",entry_saved_and_published:"Entry has been saved and published.",entry_deleted:"Entry has been deleted.",entries_deleted:"{count} entries have been deleted.",asset_saved:"Asset has been saved.",asset_saved_and_published:"Asset has been saved and published.",assets_saved:"{count} assets have been saved.",assets_saved_and_published:"{count} assets have been saved and published.",asset_url_copied:"Asset URL has been copied to clipboard.",asset_urls_copied:"Asset URLs have been copied to clipboard.",asset_path_copied:"Asset file path has been copied to clipboard.",asset_paths_copied:"Asset file paths have been copied to clipboard.",asset_data_copied:"Asset file has been copied to clipboard.",asset_downloaded:"Asset file has been downloaded.",assets_downloaded:"Asset files have been downloaded.",asset_moved:"Asset has been moved.",assets_moved:"{count} assets have been moved.",asset_renamed:"Asset has been renamed.",assets_renamed:"{count} assets have been renamed.",asset_deleted:"Asset has been deleted.",assets_deleted:"{count} assets have been deleted.",content_editor:"Content Editor",restore_backup_title:"Restore Draft",restore_backup_description:"This entry has a backup from {datetime}. Do you want to restore the edited draft?",draft_backup_saved:"Draft backup has been saved.",draft_backup_restored:"Draft backup has been restored.",draft_backup_deleted:"Draft backup has been deleted.",cancel_editing:"Cancel Editing",creating_x:"Creating {name}",creating_x_collection_entry:"You’re now creating a new entry in the “{collection}” collection.",editing_x_in_x:"Editing {collection} › {entry}",editing_x_collection_entry:"You’re now editing the “{entry}” entry in the “{collection}” collection.",editing_x_collection_file:"You’re now editing the “{file}” file in the “{collection}” collection.",save_and_publish:"Save and Publish",save_without_publishing:"Save without Publishing",show_editor_options:"Show Editor Options",editor_options:"Editor Options",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",switch_locale:"Switch Locale",locale_content_disabled_short:"(disabled)",locale_content_error_short:"(error)",edit:"Edit",preview:"Preview",edit_x_locale:"Edit {locale} Content",preview_x_locale:"Preview {locale} Content",content_preview:"Content Preview",show_content_options_x_locale:"Show {locale} Content Options",content_options_x_locale:"{locale} Content Options",x_field:"“{field}” Field",show_field_options:"Show Field Options",field_options:"Field Options",unsupported_widget_x:"Unsupported widget: {name}",enable_x_locale:"Enable {locale}",reenable_x_locale:"Reenable {locale}",disable_x_locale:"Disable {locale}",locale_x_has_been_disabled:"The {locale} content has been disabled.",locale_x_now_disabled:"The {locale} content is now disabled. It will be deleted when you save the entry.",view_in_repository:"View in Repository",view_on_x:"View on {service}",view_on_live_site:"View on Live Site",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translation_options:"Translation Options",translate:"Translate",translate_field:"Translate Field",translate_fields:"Translate Fields",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",edit_slug:"Edit Slug",edit_slug_warning:"Changing the slug may break internal and external links to the entry. Currently, Sveltia CMS does not update references created with the Relation widget, so you’ll need to manually update such references along with other links.",edit_slug_error:{empty:"The slug cannot be empty.",duplicate:"This slug is used for another entry."},required:"Required",editor:{translation:{none:"Nothing has been translated.",started:"Translating…",error:"There was an error while translating.",complete:{one:"Translated the field from {source}.",many:"Translated {count} fields from {source}."}},copy:{none:"Nothing has been copied.",complete:{one:"Copied the field from {source}.",many:"Copied {count} fields from {source}."}}},validation:{value_missing:"This field is required.",range_underflow:{number:"Value must be greater than or equal to {min}.",select_many:"You have to select at least {min} items.",select_one:"You have to select at least {min} item.",add_many:"You have to add at least {min} items.",add_one:"You have to add at least {min} item."},range_overflow:{number:"Value must be less than or equal to {max}.",select_many:"You cannot select more than {max} items.",select_one:"You cannot select more than {max} item.",add_many:"You cannot add more than {max} items.",add_one:"You cannot add more than {max} item."},too_short:{one:"You must enter at least {min} character.",many:"You must enter at least {min} characters."},too_long:{one:"You cannot enter more than {max} character.",many:"You cannot enter more than {max} characters."},type_mismatch:{number:"Please enter a number.",email:"Please enter a valid email.",url:"Please enter a valid URL."}},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},viewing_x_asset_details:"You’re viewing the details of the “{name}” asset.",asset_editor:"Asset Editor",preview_unavailable:"Preview Unavailable.",public_url:"Public URL",public_urls:"Public URLs",file_path:"File Path",file_paths:"File Paths",file_data:"File Data",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",select_file:"Select File",select_image:"Select Image",replace_file:"Replace File",replace_image:"Replace Image",remove_file:"Remove File",remove_image:"Remove Image",remove_this_item:"Remove This Item",move_up:"Move Up",move_down:"Move Down",add_x:"Add {name}",select_list_type:"Select List Type",opacity:"Opacity",unselected_option:"(None)",assets_dialog:{title:{file:"Select File",image:"Select Image"},search_for_file:"Search for Files",search_for_image:"Search for Images",locations:"Locations",location:{local:"Your Computer",repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching assets. Please try again later.",image_fetch_failed:"There was an error while downloading the selected asset. Please try again later."},available_images:"Available Images",enter_url:"Enter URL",enter_file_url:"Enter URL of the file:",enter_image_url:"Enter URL of the image:",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"}},character_counter:{min_max:{one:"{count} character entered. Minimum: {min}. Maximum: {max}.",many:"{count} characters entered. Minimum: {min}. Maximum: {max}."},min:{one:"{count} character entered. Minimum: {min}.",many:"{count} characters entered. Minimum: {min}."},max:{one:"{count} character entered. Maximum: {max}.",many:"{count} characters entered. Maximum: {max}."}},youtube_video_player:"YouTube video player",today:"Today",now:"Now",editor_components:{image:"Image",src:"Source",alt:"Alt Text",title:"Title",link:"Link"},key_value:{key:"Key",value:"Value",action:"Action",empty_key:"Key is required.",duplicate_key:"Key must be unique."},boolean:{true:"Yes",false:"No"},cloud_storage:{invalid:"The service is not configured properly.",auth:{initial:"Sign into {service} to insert media on the storage to entry fields.",requested:"Signing in…",error:"User name or password is incorrect. Please double check and try again."}},config:{error:{no_secure_context:"Sveltia CMS only works with HTTPS or localhost URLs.",fetch_failed:"The configuration file could not be retrieved.",fetch_failed_not_ok:"HTTP response returned with status {status}.",parse_failed:"The configuration file could not be parsed.",parse_failed_invalid_object:"The configuration file is not a valid JavaScript object.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_repository:"The repository is not defined in the configuration file.",oauth_implicit_flow:"The configured authentication method (implicit flow) is not supported.",oauth_no_app_id:"OAuth application ID is not defined in the configuration file.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},local_backend:{unsupported_browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",disabled:"Local development is disabled in your browser. <a>Here’s how to enable it</a>."},status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},categories:"Categories",prefs:{changes:{api_key_saved:"API key has been saved.",api_key_removed:"API key has been removed."},error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme",select_theme:"Select Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language",select_language:"Select Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},contents:{title:"Contents",editor:{title:"Editor",close_on_save:{switch_label:"Close the editor after saving a draft"}}},media:{title:"Media",stock_photos:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},accessibility:{title:"Accessibility",underline_links:{title:"Underline Links",description:"Show underline for links in the entry preview and user interface labels.",switch_label:"Always Underline Links"}},advanced:{title:"Advanced",deploy_hook:{title:"Deploy Hook",description:"Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.",field_label:"Deploy Hook URL",url_saved:"Webhook URL has been saved.",url_removed:"Webhook URL has been removed."},developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},keyboard_shortcuts_:{view_content_library:"View Content Library",view_asset_library:"View Asset Library",search:"Search for entries and assets",create_entry:"Create a new entry",save_entry:"Save an entry",cancel_editing:"Cancel entry editing"},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tif:"TIFF image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet",html:"HTML text",js:"JavaScript",json:"JSON text",md:"Markdown text",toml:"TOML text",yaml:"YAML text",yml:"YAML text"},file_size_units:{b:"{size} bytes",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}}},Symbol.toStringTag,{value:"Module"})),iK=Object.freeze(Object.defineProperty({__proto__:null,strings:{collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"アセット",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",user_name:"ユーザー名",password:"パスワード",sign_in:"ログイン",signed_in_as_x:"{name} としてログイン中",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",upload:"アップロード",copy:"コピー",download:"ダウンロード",duplicate:"複製",delete:"削除",save:"保存",saving:"保存中…",rename:"名前を変更",update:"更新",replace:"差し替え",add:"追加",remove:"削除",remove_x:"{name} を削除",clear:"クリア",expand:"広げる",expand_all:"すべて広げる",collapse:"折り畳む",collapse_all:"すべて折り畳む",insert:"挿入",restore:"復元",discard:"破棄",searching:"検索中…",global:"グローバル",primary:"プライマリー",secondary:"セカンダリー",collection:"コレクション",folder:"フォルダー",api_key:"API キー",details:"詳細",clipboard_error:"データのコピー中に問題が発生しました。",welcome_to_sveltia_cms:"Sveltia CMS へようこそ",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",loading_site_data_error:"サイトデータの読み込み中にエラーが発生しました。",sign_in_with_x:"{service} でログイン",authorizing:"認証中…",signing_in:"ログイン中…",work_with_local_repo:"ローカルレポジトリで作業",work_with_local_repo_description:"ボタンをクリックして「{repo}」レポジトリのルートディレクトリを選択してください。",work_with_local_repo_description_no_repo:"ボタンをクリックして Git レポジトリのルートディレクトリを選択してください。",sign_in_error:{not_project_root:"選択されたフォルダーはレポジトリのルートディレクトリではありません。再度お試しください。",picker_dismissed:"レポジトリのルートディレクトリを選択できませんでした。再度お試しください。",authentication_aborted:"認証が中断されました。再度お試しください。",UNSUPPORTED_BACKEND:"この認証アプリはお使いの Git バックエンドに対応していません。",UNSUPPORTED_DOMAIN:"この認証アプリではお使いのドメインの使用は許可されていません。",MISCONFIGURED_CLIENT:"OAuth アプリのクライアント ID またはシークレットが設定されていません。",AUTH_CODE_REQUEST_FAILED:"認証コードを取得できませんでした。後で再度お試しください。",CSRF_DETECTED:"CSRF 攻撃の可能性が検出されたため、認証フローは中断されました。",TOKEN_REQUEST_FAILED:"アクセストークンを要求できませんでした。後で再度お試しください。",MALFORMED_RESPONSE:"サーバーから不正なデータが返されました。後で再度お試しください。"},repository_no_access:"あなたには「{repo}」レポジトリへのアクセス権がありません。",repository_not_found:"「{repo}」レポジトリは存在しません。",repository_empty:"「{repo}」レポジトリにはブランチがありません。",branch_not_found:"「{repo}」レポジトリに「{branch}」ブランチは存在しません。",unexpected_error:"予期せぬエラー",entry_parse_error:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",entry_parse_errors:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",visit_live_site:"管理対象サイトを開く",switch_page:"ページを切り替え",search_placeholder:"エントリーとアセットを検索…",create_entry_or_assets:"エントリーまたはアセットを作成",publish_changes:"変更を公開",publishing_changes:"変更を公開しています…",publishing_changes_failed:"変更を公開できませんでした。後で再度お試しください。",show_notifications:"通知を表示",notifications:"通知",show_account_menu:"アカウントメニューを表示",account:"アカウント",live_site:"管理対象サイト",git_repository:"Git レポジトリ",settings:"設定",site_config:"サイト設定",show_help_menu:"ヘルプメニューを表示",help:"ヘルプ",keyboard_shortcuts:"キーボードショートカット",documentation:"ドキュメンテーション",release_notes:"リリースノート",version_x:"バージョン {version}",report_issue:"問題を報告",share_feedback:"フィードバックを共有",get_help:"サポート",join_discord:"Discord チャンネルに参加",update_available:"Sveltia CMS の最新版が利用可能です。",update_now:"今すぐ更新",backend_status:{minor_incident:"{service} で軽微な障害が発生しています。ワークフローに潜在的な影響が及ぶ可能性があります。",major_incident:"{service} で重大な障害が発生しています。状況が改善されるまで待った方が良いかもしれません。"},content_library:"コンテンツライブラリ",asset_library:"アセットライブラリ",collection_assets:"コレクションアセット",entry_assets:"エントリーアセット",entry_list:"エントリーリスト",file_list:"ファイルリスト",asset_list:"アセットリスト",x_collection:"「{collection}」コレクション",x_asset_folder:"「{folder}」アセットフォルダー",viewing_x_collection_many_entries:"「{collection}」コレクションを表示しています。ここには {count} 個のエントリーがあります。",viewing_x_collection_one_entry:"「{collection}」コレクションを表示しています。ここにはひとつのエントリーがあります。",viewing_x_collection_no_entries:"「{collection}」コレクションを表示しています。ここにはまだエントリーがありません。",viewing_x_asset_folder_many_assets:"「{folder}」アセットフォルダーを表示しています。ここには {count} 個のアセットがあります。",viewing_x_asset_folder_one_asset:"「{folder}」アセットフォルダーを表示しています。ここにはひとつのアセットがあります。",viewing_x_asset_folder_no_assets:"「{folder}」アセットフォルダーを表示しています。ここにはまだアセットがありません。",collection_not_found:"コレクションが見つかりませんでした",file_not_found:"ファイルが見つかりませんでした",x_of_x_selected:"{total} 個のうち {selected} 個を選択中",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort:"並び替え",sorting_options:"並べ替えオプション",sort_keys:{none:"なし",name:"名前",commit_author:"更新者",commit_date:"更新日時"},ascending:"{label} (A–Z)",ascending_date:"{label} (古い順)",descending:"{label} (Z–A)",descending_date:"{label} (新しい順)",filter:"絞り込み",filtering_options:"絞り込みオプション",group:"グループ化",grouping_options:"グループ化オプション",type:"種類",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"アセットを表示",hide_assets:"アセットを隠す",show_info:"情報を表示",hide_info:"情報を隠す",asset_folders:"アセットフォルダー",all_assets:"すべてのアセット",uncategorized:"未分類",creating_entries_disabled_by_admin:"このコレクションへの新しいエントリーの作成は、管理者によって無効化されています。",creating_entries_disabled_by_limit:"このコレクションは最大の {limit} エントリーに達したため、新しいエントリーを作成することはできません。",back_to_collection:"コレクションへ戻る",search_results_for_x:"「{terms}」の検索結果",viewing_search_results:"「{terms}」の検索結果を表示しています。{entries} と {assets} が見つかりました。",many_entries:"{count} 個のエントリー",one_entry:"1 個のエントリー",no_entries:"0 個のエントリー",many_assets:"{count} 個のアセット",one_asset:"1 個のアセット",no_assets:"0 個のアセット",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",upload_assets:"新しいアセットをアップロード",edit_options:"編集オプション",show_edit_options:"編集オプションを表示",edit_asset:"アセットを編集",edit_x:"{name} を編集",wrap_long_lines:"長い行を折り返す",rename_asset:"アセットの名前を変更",rename_x:"{name} の名前を変更",enter_new_name_for_asset:"新しい名前を以下に入力してください。",enter_new_name_for_asset_with_one_entry:"新しい名前を以下に入力してください。このアセットを使用している 1 個のエントリーも更新されます。",enter_new_name_for_asset_with_many_entries:"新しい名前を以下に入力してください。このアセットを使用している {count} 個のエントリーも更新されます。",enter_new_name_for_asset_error:{empty:"ファイル名を空白にすることはできません。",character:"ファイル名に特別な文字を含めることはできません。",duplicate:"このファイル名は他のアセットに使われています。"},replace_asset:"アセットを差し替え",replace_x:"{name} を差し替え",browse_file:"クリックして参照",drop_or_browse_file:"ここにファイルをドロップするかクリックして参照",drop_or_browse_files:"ここにファイルをドロップするかクリックして参照",drop_or_browse_image_file:"ここに画像ファイルをドロップするかクリックして参照",drop_or_browse_image_files:"ここに画像ファイルをドロップするかクリックして参照",drop_file_here:"ここにファイルをドロップ",drop_files_here:"ここにファイルをドロップ",drop_files_type_mismatch:"ドロップされたファイルは「{type}」形式ではありません。再度お試しください。",choose_file:"ファイルを選択",choose_files:"ファイルを選択",delete_asset:"アセットを削除",delete_assets:"アセットを削除",delete_selected_asset:"選択されたアセットを削除",delete_selected_assets:"選択されたアセットを削除",confirm_deleting_this_asset:"このアセットを削除してもよろしいですか?",confirm_deleting_selected_asset:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_assets:"選択された {count} 個のファイルを削除してもよろしいですか?",confirm_deleting_all_assets:"すべてのアセットを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",delete_selected_entry:"選択されたエントリーを削除",delete_selected_entries:"選択されたエントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_this_entry_with_assets:"このエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry_with_assets:"選択されたエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {count} 個のエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries_with_assets:"選択された {count} 個のエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",confirm_deleting_all_entries_with_assets:"すべてのエントリーと関連アセットを削除してもよろしいですか?",confirm_replacing_file:"「{name}」を以下のファイルと差し替えてもよろしいですか?",confirm_uploading_file:"以下のファイルを「{folder}」フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {count} 個のファイルを「{folder}」フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_in_collection:"このコレクションにはファイルがありません。",asset_info:"アセット情報",select_asset_show_info:"アセットを選択すると情報が表示されます。",duplicate_entry:"エントリーを複製",entry_duplicated:"エントリーが複製され、新しい下書きとなりました。",entry_validation_error:"ひとつのフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_validation_errors:"{count} 個のフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_saved:"エントリーが保存されました。",entry_saved_and_published:"エントリーが保存、公開されました。",entry_deleted:"エントリーが削除されました。",entries_deleted:"{count} 個のエントリーが削除されました。",asset_saved:"アセットが保存されました。",asset_saved_and_published:"アセットが保存、公開されました。",assets_saved:"{count} 個のアセットが保存されました。",assets_saved_and_published:"{count} 個のアセットが保存、公開されました。",asset_url_copied:"アセット URL がクリップボードにコピーされました。",asset_urls_copied:"アセット URL がクリップボードにコピーされました。",asset_path_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_paths_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_data_copied:"アセットファイルがクリップボードにコピーされました。",asset_downloaded:"アセットファイルがダウンロードされました。",assets_downloaded:"アセットファイルがダウンロードされました。",asset_moved:"アセットが移動されました。",assets_moved:"{count} 個のアセットが移動されました。",asset_renamed:"アセットの名前が変更されました。",assets_renamed:"{count} 個のアセットの名前が変更されました。",asset_deleted:"アセットが削除されました。",assets_deleted:"{count} 個のアセットが削除されました。",content_editor:"コンテンツエディター",restore_backup_title:"下書きを復元",restore_backup_description:"このエントリーには {datetime} に保存されたバックアップがあります。その編集済みの下書きを復元しますか?",draft_backup_saved:"下書きのバックアップが保存されました。",draft_backup_restored:"下書きのバックアップが復元されました。",draft_backup_deleted:"下書きのバックアップが削除されました。",cancel_editing:"編集をキャンセル",creating_x:"{name} を作成",creating_x_collection_entry:"「{collection}」コレクションの新しいエントリーを作成しています。",editing_x_in_x:"{collection} › {entry} を編集",editing_x_collection_entry:"「{collection}」コレクションの「{entry}」エントリーを編集しています。",editing_x_collection_file:"「{collection}」コレクションの「{file}」ファイルを編集しています。",save_and_publish:"保存して公開",save_without_publishing:"公開せずに保存",show_editor_options:"エディターオプションを表示",editor_options:"エディターオプション",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",switch_locale:"ロケールを切り替え",locale_content_disabled_short:"(無効)",locale_content_error_short:"(エラー)",edit:"編集",preview:"プレビュー",edit_x_locale:"{locale} コンテンツを編集",preview_x_locale:"{locale} コンテンツをプレビュー",content_preview:"コンテンツプレビュー",show_content_options_x_locale:"{locale} コンテンツのオプションを表示",content_options_x_locale:"{locale} コンテンツのオプション",x_field:"「{field}」フィールド",show_field_options:"フィールドオプションを表示",field_options:"フィールドオプション",unsupported_widget_x:"非対応ウィジェット: {name}",enable_x_locale:"{locale} を有効化",reenable_x_locale:"{locale} を再度有効化",disable_x_locale:"{locale} を無効化",locale_x_has_been_disabled:"{locale} コンテンツは無効化されています。",locale_x_now_disabled:"{locale} コンテンツは無効化されました。エントリーを保存する際に削除されます。",view_in_repository:"レポジトリ内で見る",view_on_x:"{service} で見る",view_on_live_site:"管理対象サイトで見る",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translation_options:"翻訳オプション",translate:"翻訳",translate_field:"フィールドを翻訳",translate_fields:"フィールドを翻訳",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",edit_slug:"スラッグを編集",edit_slug_warning:"スラッグを変更すると、エントリーへの内部・外部リンクが壊れる可能性があります。現在のところ、Sveltia CMS は Relation ウィジェットで作成された参照を更新しないため、そのような参照は他のリンクとともに手動で更新する必要があります。",edit_slug_error:{empty:"スラッグは空白にはできません。",duplicate:"このスラッグは他のエントリーに使われています。"},required:"必須",editor:{translation:{none:"翻訳されたフィールドはありません。",started:"翻訳中…",error:"翻訳中に問題が発生しました。",complete:{one:"{source} からフィールドを翻訳しました。",many:"{source} から {count} 個のフィールドを翻訳しました。"}},copy:{none:"コピーされたフィールドはありません。",complete:{one:"{source} からフィールドをコピーしました。",many:"{source} から {count} 個のフィールドをコピーしました。"}}},validation:{value_missing:"この項目は必須です。",range_underflow:{select_many:"少なくとも {min} 個の項目を選択してください。",select_one:"少なくとも {min} 個の項目を選択してください。",add_many:"少なくとも {min} 個の項目を追加してください。",add_one:"少なくとも {min} 個の項目を追加してください。"},range_overflow:{select_many:"選択できるのは最大で {max} 項目です。",select_one:"選択できるのは最大で {max} 項目です。",add_many:"追加できるのは最大で {max} 項目です。",add_one:"追加できるのは最大で {max} 項目です。"},too_short:{one:"少なくとも {min} 文字は入力してください。",many:"少なくとも {min} 文字は入力してください。"},too_long:{one:"{max} 文字を超える入力はできません。",many:"{max} 文字を超える入力はできません。"},type_mismatch:{email:"正しいメールアドレスを入力してください。",url:"正しい URL を入力してください。"}},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},viewing_x_asset_details:"「{name}」アセットの詳細を表示しています。",asset_editor:"アセットエディター",preview_unavailable:"プレビューは表示できません",public_url:"公開 URL",public_urls:"公開 URL",file_path:"ファイルパス",file_paths:"ファイルパス",file_data:"ファイルデータ",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",select_file:"ファイルを選択",select_image:"画像を選択",replace_file:"ファイルを差し替え",replace_image:"画像を差し替え",remove_file:"ファイルを削除",remove_image:"画像を削除",remove_this_item:"このアイテムを削除",move_up:"上へ移動",move_down:"下へ移動",add_x:"{name} を追加",select_list_type:"リストタイプを選択",opacity:"透明度",unselected_option:"(なし)",assets_dialog:{title:{file:"ファイルを選択",image:"画像を選択"},search_for_file:"ファイルを検索",search_for_image:"画像を検索",locations:"場所",location:{local:"お使いのコンピューター",repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},error:{invalid_key:"あなたの API キーは正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"アセットを検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択されたアセットをダウンロード中に問題が発生しました。後で再度お試しください。"},available_images:"利用可能な画像",enter_url:"URL を入力",enter_file_url:"ファイルの URL を入力:",enter_image_url:"画像の URL を入力:",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"}},character_counter:{min_max:{one:"{count} 文字入力されています。最小: {min}。最大 {max}。",many:"{count} 文字入力されています。最小: {min}。最大 {max}。"},min:{one:"{count} 文字入力されています。最小: {min}。",many:"{count} 文字入力されています。最小: {min}。"},max:{one:"{count} 文字入力されています。最大: {max}。",many:"{count} 文字入力されています。最大: {max}。"}},youtube_video_player:"YouTube 動画プレーヤー",today:"今日",now:"現在時刻",editor_components:{image:"画像",src:"ソース",alt:"代替テキスト",title:"タイトル",link:"リンク"},key_value:{key:"キー",value:"値",action:"アクション",empty_key:"キーは必須です。",duplicate_key:"キーが重複しています。"},boolean:{true:"はい",false:"いいえ"},cloud_storage:{invalid:"このサービスは正しく設定されていません。",auth:{initial:"{service} へログインすると、ストレージ上のメディアをエントリー項目へ挿入できます。",requested:"ログイン中…",error:"ユーザー名またはパスワードが間違っています。確認の上、再度お試しください。"}},config:{error:{no_secure_context:"Sveltia CMS は HTTPS またはローカルホスト URL でのみ動作します。",fetch_failed:"設定ファイルを読み込めませんでした。",fetch_failed_not_ok:"HTTP レスポンスがステータス {status} で返されました。",parse_failed:"設定ファイルを解析できませんでした。",parse_failed_invalid_object:"設定ファイルが有効な JavaScript オブジェクトではありません。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_repository:"設定ファイル内でレポジトリが定義されていません。",oauth_implicit_flow:"設定されている認証方式 (暗黙的フロー) は非対応です。",oauth_no_app_id:"設定ファイル内で OAuth アプリケーション ID が定義されていません。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},local_backend:{unsupported_browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",disabled:"お使いのブラウザーではローカル開発が無効化されています。<a>有効化する方法はこちら</a>。"},status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},categories:"カテゴリ",prefs:{changes:{api_key_saved:"API キーが保存されました。",api_key_removed:"API キーが削除されました。"},error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ",select_theme:"テーマを選択"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語",select_language:"言語を選択"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},contents:{title:"コンテンツ",editor:{title:"エディター",close_on_save:{switch_label:"下書き保存後にエディターを閉じる"}}},media:{title:"メディア",stock_photos:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},accessibility:{title:"アクセシビリティ",underline_links:{title:"リンクに下線を付ける",description:"エントリープレビューやユーザーインターフェイスラベル内のリンクに下線を表示します。",switch_label:"常に下線を付ける"}},advanced:{title:"詳細",deploy_hook:{title:"デプロイフック",description:"「変更を公開」を選択して手動でデプロイを実行する際に呼び出すウェブフック URL を入力してください。GitHub Actions を使用する場合は空欄のままで構いません。",field_label:"デプロイフック URL",url_saved:"ウェブフック URL が保存されました。",url_removed:"ウェブフック URL が削除されました。"},developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},keyboard_shortcuts_:{view_content_library:"コンテンツライブラリを表示",view_asset_library:"アセットライブラリを表示",search:"エントリーとアセットを検索",create_entry:"新しいエントリーを作成",save_entry:"エントリーを保存",cancel_editing:"エントリーの編集をキャンセル"},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tif:"TIFF 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート",html:"HTML テキスト",js:"JavaScript",json:"JSON テキスト",md:"Markdown テキスト",toml:"TOML テキスト",yaml:"YAML テキスト",yml:"YAML テキスト"},file_size_units:{b:"{size} バイト",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}}},Symbol.toStringTag,{value:"Module"})),sK=()=>{Object.entries(Object.assign({"/src/lib/locales/en.js":rK,"/src/lib/locales/ja.js":iK})).forEach(([e,{strings:n}])=>{const r=$n(e).filename;Zg(r,n)}),iS({fallbackLocale:"en",initialLocale:ne(Tt).locale||(u$()??"").split("-")[0]||"en"})};var oK=F('<link rel="icon">'),aK=F('<meta name="referrer" content="same-origin"> <meta name="robots" content="noindex"> <!> <!>',1),lK=F('<div role="none" class="outer svelte-1729mpr"><!> <!> <div role="none" class="main svelte-1729mpr"><!> <!></div></div>'),cK=F('<!> <div role="status" class="svelte-1729mpr"> </div>',1);const uK={hash:"svelte-1729mpr",code:"body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-1729mpr {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-1729mpr {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-1729mpr {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}"};function dK(t,e){se(e,!0),Ee(t,uK);const[n,r]=me(),i=()=>z(yt,"$siteConfig",n),s=()=>z(xf,"$isLoading",n),o=()=>z(Nn,"$backend",n),a=()=>z(fi,"$user",n),c=()=>z(Nc,"$dataLoaded",n),u=()=>z(Rs,"$announcedPageStatus",n);ln(()=>{sK(),YB(e.config)}),ln(()=>{const d=document.querySelector("#nc-root");if(d&&window.getComputedStyle(d).position==="static"){const{top:f,height:h}=d.getBoundingClientRect();h?d.style.position="relative":(d.style.position="fixed",d.style.inset=`${f}px 0 0 0`)}}),mw(d=>{var f=aK(),h=D(M(f),4);{var p=m=>{var v=oK();const _=w(()=>i().logo_url);q((b,y)=>{ke(v,"href",b),ke(v,"type",y)},[()=>l(_)||`data:image/svg+xml;base64,${btoa(aS)}`,()=>l(_)?Mo.getType(l(_))??void 0:"image/svg+xml"]),T(m,v)};U(h,m=>{i()&&m(p)})}var g=D(h,2);U(g,m=>{}),T(d,f)}),_i("mousedown",_g.body,d=>{d.target?.matches("a")&&d.target.origin!==window.location.origin&&(d.target.target="_blank")}),fF(t,{children:(d,f)=>{var h=cK(),p=M(h);{var g=_=>{var b=lK(),y=R(b);T5(y,{});var x=D(y,2);{var k=O=>{k5(O,{})};U(x,O=>{o()&&O(k)})}var S=D(x,2),C=R(S);y5(C,{});var E=D(C,2);{var A=O=>{nK(O,{})};U(E,O=>{a()&&c()&&O(A)})}T(_,b)};U(p,_=>{s()||_(g)})}var m=D(p,2),v=R(m);q(()=>Z(v,u())),T(d,h)},$$slots:{default:!0}}),oe(),r()}const fK=["registerEditorComponent","registerEventListener","registerPreviewStyle","registerPreviewTemplate","registerWidget"],hK=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerLocale","registerMediaLibrary","registerRemarkPlugin","registerWidgetValueSerializer","removeEventListener","resolveWidget"],pK="https://github.com/sveltia/sveltia-cms#compatibility";let IA=!1;const og=async({config:t={}}={})=>{IA||(IA=!0,document.readyState==="loading"&&!document.querySelector("#nc-root")&&await new Promise(e=>{window.addEventListener("DOMContentLoaded",()=>e(void 0),{once:!0})}),Cg(dK,{target:document.querySelector("#nc-root")??document.body,props:{config:t}}))},gK=(t,e,{fromFile:n,toFile:r})=>{pf[t]={extension:e,parser:n,formatter:r}},RA=new Proxy({init:og,registerCustomFormat:gK},{get:(t,e)=>{if(e in t)return t[e];let n="";if(fK.includes(e)&&(n="CMS.%s() is not yet supported in Sveltia CMS, but we plan to implement it soon."),hK.includes(e)&&(n="CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it."),n)return console.error(`${n} See %s for compatibility information.`,e,pK),()=>{}}});return window.CMS=RA,window.initCMS=og,!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&og(),qd.default=RA,qd.init=og,Object.defineProperties(qd,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),qd})({});
616
606
  /**
617
607
  * Prism: Lightweight, robust, elegant syntax highlighting
618
608
  *