@sveltia/cms 0.87.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sveltia-cms.js +1 -1
- package/dist/sveltia-cms.mjs +1 -1
- package/package.json +2 -1
- package/schema/sveltia-cms.json +4140 -0
package/dist/sveltia-cms.js
CHANGED
|
@@ -371,7 +371,7 @@ ${s}`.trim()}function q6(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(mf(t)!=="
|
|
|
371
371
|
}
|
|
372
372
|
`);if(s.push(...Object.values(o.project.repository).map(({lastCommit:a})=>a)),!i.length)break}return s},H8=async(t,e,n)=>{const r=t.map(({path:i,sha:s},o)=>{const{size:a,rawTextBlob:c}=e[o],u=n[o],d={sha:s,size:Number(a),text:c,meta:{}};if(u){const{author:f,authorName:h,authorEmail:p,committedDate:g}=u,{id:m,username:v}=f??{},y=m?.match(/\d+/);d.meta={commitAuthor:{name:h,email:p,id:y?Number(y[0]):void 0,login:v},committedDate:new Date(g)}}return[i,d]});return Object.fromEntries(r)},G8=async t=>{const e=t.map(({path:i})=>i),n=await j8(e),r=e.length<100?await q8(e):[];return H8(t,n,r)},W8={isGit:!0,name:wl,label:FC,repository:bi,statusDashboardURL:I8,checkStatus:L8,init:$8,signIn:F8,signOut:D8,fetchFiles:async()=>{await M8(),await uy({repository:bi,fetchDefaultBranchName:z8,fetchLastCommit:U8,fetchFileList:B8,fetchFileContents:G8})},fetchBlob:async t=>{const{owner:e,repo:n,branch:r=""}=bi,{path:i}=t;return vf(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:"blob"})},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=bi,s=await Promise.all(t.map(async({action:a,path:c,previousPath:u,data:d="",base64:f})=>({action:a,content:f??(typeof d!="string"?await Vv(d):d),encoding:f||typeof d!="string"?"base64":"text",file_path:c,previous_path:u})));return(await vf(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:ey(t,e),actions:s}})).web_url}},xl=async(t,e)=>{let n=t;if(!e)return n;const r=Dn(e).split("/"),i=!0;for(const s of r)n=await(s.includes(".")?n.getFileHandle(s,{create:i}):n.getDirectoryHandle(s,{create:i}));return n},zC=t=>iC(t,e=>e.replace(/{{.+?}}/,".+?")),UC=async(t,e)=>{const{rootDirHandle:n,scanningPaths:r,scanningPathsRegEx:i,fileList:s}=e;for await(const[o,a]of t.entries()){if(o.startsWith(".")&&!WC.test(o))continue;const c=(await n.resolve(a))?.join("/")??"",u=i.some(d=>d.test(c));if(a.kind==="file"){if(!u)continue;try{let d=await a.getFile();const{type:f,lastModified:h}=d;d=new File([d],d.name,{type:f,lastModified:h}),s.push({file:d,path:c})}catch(d){console.error(d)}}if(a.kind==="directory"){const d=zC(c);if(!u&&!r.some(f=>d.test(f)))continue;await UC(a,e)}}},K8=async t=>{try{return await Oi(t)}catch(e){console.error(e)}return""},V8=async({file:t,path:e})=>({file:t,path:e.normalize(),name:t.name.normalize(),size:t.size,sha:await K8(t)}),Y8=async t=>{const e=[],n=of([...re(G_).map(({filePathMap:r,folderPathMap:i})=>Object.values(r||(i??{}))).flat(1),...re(Xs).filter(({internalPath:r})=>r!==void 0).map(({internalPath:r})=>r)].map(r=>Dn(r??"")));return await UC(t,{rootDirHandle:t,scanningPaths:n,scanningPathsRegEx:n.map(zC),fileList:e}),Promise.all(e.map(V8))},Z8=async t=>{const{name:e,file:n}=t;if(e!==".gitkeep")try{t.text=await JF(n)}catch(r){t.text="",console.error(r)}},BC=async t=>{const{entryFiles:e,assetFiles:n,configFiles:r}=ly(await Y8(t));await Promise.all([...e,...r].map(Z8));const{entries:i,errors:s}=await TC(e);ni.set(i),Nn.set(pC(n)),yy.set(r),W_.set(s),Qc.set(!0)},J8=async({rootDirHandle:t,previousPath:e,path:n})=>{const{dirname:r,basename:i}=xn(n),s=await xl(t,e);return r&&r!==xn(e).dirname?await s.move(await xl(t,r),i):await s.move(i),s},X8=async({rootDirHandle:t,fileHandle:e,path:n,data:r})=>{e??=await xl(t,n);const i=await e.createWritable?.();try{await i?.write(r)}catch{}finally{try{await i?.close()}catch{}}return e.getFile()},Q8=async(t,e)=>{let n=await xl(t,e.join("/"));for(;;){const r=[];for await(const s of n.keys())r.push(s);if(r.length>1||!e.length)break;const i=e.pop();n=await xl(t,e.join("/")),await n.removeEntry(i)}},e5=async({rootDirHandle:t,path:e})=>{const{dirname:n="",basename:r}=xn(Dn(e));await(await xl(t,n)).removeEntry(r),n&&await Q8(t,n.split("/"))},t5=async(t,{action:e,path:n,previousPath:r,data:i})=>{let s;return e==="move"&&r&&(s=await J8({rootDirHandle:t,previousPath:r,path:n})),["create","update","move"].includes(e)&&i?X8({rootDirHandle:t,fileHandle:s,path:n,data:i}):(e==="delete"&&await e5({rootDirHandle:t,path:n}),null)},jC=async(t,e)=>Promise.all(e.map(async n=>{try{return await t5(t,n)}catch(r){console.error(r)}return null})),qC="local",n5="Local Repository";let vy;const r5={service:"",label:"",owner:"",repo:"",branch:""},HC=new Proxy({},{get:(t,e)=>(vy??r5)[e]}),_y="root_dir_handle";let og,by;const i5=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await og?.get(_y)??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 og?.set(_y,n))),n},s5={isGit:!1,name:qC,label:n5,repository:HC,init:()=>{const{name:t}=re(It).backend;vy=yf[t]?.init?.();const{databaseName:e}=vy??{};return og=e?new xo(e,"file-system-handles"):null,HC},signIn:async({auto:t=!1})=>{const e=await i5({showPicker:!t});if(e)by=e;else throw new Error("Directory handle could not be acquired");return{backendName:qC}},signOut:async()=>{await og?.delete(_y)},fetchFiles:async()=>{await BC(by)},commitChanges:async t=>jC(by,t)},GC="test-repo",o5="Test";let bf;const yf={github:A8,gitlab:W8,gitea:d8,local:s5,"test-repo":{isGit:!1,name:GC,label:o5,init:()=>{},signIn:async()=>{try{bf=await xl(await navigator.storage.getDirectory(),"sveltia-cms-test")}catch{}return{backendName:GC}},signOut:async()=>{},fetchFiles:async()=>{bf?await BC(bf):Qc.set(!0)},commitChanges:async t=>bf?jC(bf,t):[]}},a5=Object.keys(yf).filter(t=>t!=="local"),l5=Object.fromEntries(Object.entries(yf).filter(([,t])=>t.isGit)),mu=tt(),En=Hn([mu],([t],e,n)=>{n(r=>{const i=t?yf[t]:void 0;return i&&i!==r&&i.init(),i})}),ag=tt(!0),WC=/^(?:.+\/)?(\.git(?:attributes|ignore|keep))$/,yy=tt([]);Hn(yy,t=>t.find(({path:e})=>e===".gitattributes")?.text?.replace(/\r\n?/g,`
|
|
373
373
|
`).split(`
|
|
374
|
-
`).map(e=>e.startsWith("*.")&&e.includes("filter=lfs")?e.split(" ")[0].slice(2).toLowerCase():"").filter(Boolean)??[]);const wy=[],KC=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),c5=({collectionName:t,fileName:e,mediaFolder:n,publicFolder:r,baseFolder:i,globalFolders:s})=>{n=KC(n,s),r=r!==void 0?KC(r,s):n;const o=!n.startsWith("/");return{collectionName:t,fileName:e,internalPath:Dn(o?i??"":n),publicPath:r===""||/^[.@]/.test(r)?r:`/${Dn(r)}`,entryRelative:o,hasTemplateTags:/{{.+?}}/.test(n)}},VC=t=>{if(t.mediaFolder===void 0)return;const e=c5(t),{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders;!e.entryRelative&&e.internalPath===n&&e.publicPath===r||wy.push(e)},YC=({collectionName:t,files:e,globalFolders:n})=>{e.forEach(r=>{if(!pf(r))return;const{name:i,file:s,media_folder:o,public_folder:a}=r;VC({collectionName:t,fileName:i,mediaFolder:o,publicFolder:a,baseFolder:xn(s).dirname,globalFolders:n})})},u5=t=>{const{media_folder:e,public_folder:n,collections:r,singletons:i}=t,s=Dn(e).replace(/^\.$/,""),o=n?`/${Dn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},c={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1,hasTemplateTags:!1},u={globalMediaFolder:s,globalPublicFolder:o};return r.forEach(d=>{const{divider:f=!1,name:h,files:p,folder:g,path:m,media_folder:v,public_folder:y}=d;if(f)return;VC({collectionName:h,mediaFolder:v===void 0&&m!==void 0?"":v,publicFolder:y,baseFolder:g,globalFolders:u}),p?.length&&YC({collectionName:h,files:p,globalFolders:u})}),i?.length&&YC({collectionName:"_singletons",files:i,globalFolders:u}),wy.sort((d,f)=>Zi(d.internalPath??"",f.internalPath??"")),[a,c,...wy]},ZC=(t,e)=>{if(!pf(e))return;const n=(()=>{const r=Dn(e.file);if(!r.includes("{{locale}}"))return{_default:r};const i=sf(t,e),{allLocales:s,defaultLocale:o,omitDefaultLocaleFromFileName:a}=i;return Object.fromEntries(s.map(c=>[c,a&&c===o?r.replace(".{{locale}}",""):r.replace("{{locale}}",c)]))})();return{collectionName:t.name,fileName:e.name,filePathMap:n}},JC=(t,e)=>Zi(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),d5=({collections:t})=>t.filter(({folder:e})=>typeof e=="string").map(e=>{const{name:n,folder:r}=e,i=Dn(r),{i18nEnabled:s,structure:o,allLocales:a}=sf(e),c=s&&o==="multiple_folders_i18n_root";return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(a.map(u=>[u,c?`${u}/${i}`:i]))}}).sort((e,n)=>Zi(e.folderPath??"",n.folderPath??"")),f5=({collections:t})=>t.filter(({files:e})=>Array.isArray(e)).map(e=>(e.files??[]).map(n=>ZC(e,n))).flat(1).filter(e=>!!e).sort(JC),h5=({singletons:t})=>{if(!Array.isArray(t)||!t.length)return[];const e={name:"_singletons"};return t.map(n=>ZC(e,n)).filter(n=>!!n).sort(JC)},p5=t=>[...d5(t),...f5(t),...h5(t)],g5=["text/yaml","application/yaml","application/json"],m5=async({href:t,type:e="application/yaml"})=>{let n;if(!g5.includes(e))throw new Error(re(ue)("config.error.parse_failed"),{cause:new Error(re(ue)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(o){throw new Error(re(ue)("config.error.fetch_failed"),{cause:o})}const{ok:r,status:i}=n;if(!r)throw new Error(re(ue)("config.error.fetch_failed"),{cause:new Error(re(ue)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let s;try{e==="application/json"?s=n.json():s=Gd.parse(await n.text(),{merge:!0})}catch(o){throw new Error(re(ue)("config.error.parse_failed"),{cause:o})}if(!yn(s))throw new Error(re(ue)("config.error.parse_failed"),{cause:new Error(re(ue)("config.error.parse_failed_invalid_object"))});return s},XC=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml"});const e=await Promise.all(t.map(n=>m5(n)));return e.length===1?e[0]:Zv.all(e)},v5={DEV:!1},{DEV:_5}=v5,b5=void 0,QC={},It=tt(),xy=tt(),ky=tt(),y5=t=>{if(!t.collections?.length)throw new Error(re(ue)("config.error.no_collection"));if(!t.backend)throw new Error(re(ue)("config.error.missing_backend"));if(!t.backend.name)throw new Error(re(ue)("config.error.missing_backend_name"));if(!a5.includes(t.backend.name))throw new Error(re(ue)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(Object.keys(l5).includes(t.backend.name)){if(t.backend.repo===void 0)throw new Error(re(ue)("config.error.missing_repository"));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(re(ue)("config.error.invalid_repository"))}if(t.backend.auth_type==="implicit")throw new Error(re(ue)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(re(ue)("config.error.oauth_no_app_id"));if(t.media_folder===void 0)throw new Error(re(ue)("config.error.missing_media_folder"));if(typeof t.media_folder!="string")throw new Error(re(ue)("config.error.invalid_media_folder"));if(t.public_folder!==void 0){if(typeof t.public_folder!="string")throw new Error(re(ue)("config.error.invalid_public_folder"));if(/^\.{1,2}\//.test(t.public_folder))throw new Error(re(ue)("config.error.public_folder_relative_path"));if(/^https?:/.test(t.public_folder))throw new Error(re(ue)("config.error.public_folder_absolute_url"))}},w5=async t=>{It.set(void 0),ky.set(void 0);try{if(!window.isSecureContext)throw new Error(re(ue)("config.error.no_secure_context"));let e;if(t){if(!yn(t))throw new Error(re(ue)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=Zv(await XC(),e))}else e=await XC();Object.assign(QC,e),y5(e);const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(_5?b5:window.location.origin),n._baseURL=Kv(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),It.set(n),xy.set(await Oi(Gd.stringify(n)))}catch(e){ky.set({message:e.name==="Error"?e.message:re(ue)("config.error.unexpected")}),console.error(e,e.cause)}};It.subscribe(t=>{if(re(St).devModeEnabled&&console.info("siteConfig",t),!t)return;const e=p5(t),n=u5(t);G_.set(e),Xs.set(n),re(St).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const x5=["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"],eA="https://api.pexels.com/v1",k5={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=re(rn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:x5.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${eA}/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 Ct(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${eA}/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>`}))}},S5=["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"],E5="https://pixabay.com/api",T5={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:async(t,{apiKey:e})=>{const[n]=re(rn).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:S5.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${E5}/?${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()}},C5=["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"],tA="https://api.unsplash.com",nA="utm_source=sveltia-cms&utm_medium=referral",A5={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=re(rn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:C5.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${tA}/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 Ct(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${tA}/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}?${nA}">${f}</a> on <a href="https://unsplash.com/?${nA}">Unsplash</a>`}))}},lg={},cg={pexels:k5,pixabay:T5,unsplash:A5},Hfe="modulepreload",Gfe=function(t){return"/"+t},Wfe={},rA=function(e,n,r){let i=Promise.resolve();function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},Sy="0.87.0",I5={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.32.1","@sindresorhus/transliterate":"^1.6.0","@sveltia/ui":"^0.27.3","@sveltia/utils":"^0.8.0",deepmerge:"^4.3.1",exifreader:"^4.31.1","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.25.0",leaflet:"^1.9.4",lexical:"^0.32.1",marked:"^16.0.0","marked-bidi":"^1.0.13",mime:"^4.0.7",moment:"^2.30.1","parse-entities":"^4.0.2","pdfjs-dist":"^5.3.31",qrcode:"^1.5.4","sanitize-filename":"^1.6.3","smol-toml":"^1.4.1",svgo:"^4.0.0","terra-draw":"^1.9.1","terra-draw-leaflet-adapter":"^1.0.3",turndown:"^7.2.0",yaml:"^2.8.0"},Ey=t=>{const e=`https://unpkg.com/${t}`,n=I5[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},vu=async(t,e)=>rA(()=>import(`${Ey(t)}/${e}`),void 0),iA=["avif","gif","jpeg","png","webp"],P5=iA.map(t=>`image/${t}`),Ty=/\b(?:avif|gif|jpe?g|png|webp)$/i,O5=["image/svg+xml"],N5=/\b(?:svg)$/i,Zs=[...P5,...O5],sA=["webp"],L5=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const s={scale:1,width:t,height:e};if(t===r&&e===r)return s;const o=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return s;i="contain"}return i==="contain"&&(o?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},oA=(t,e,n)=>{const{scale:r,width:i,height:s}=L5(e,n);return t.width=i,t.height=s,{scale:r,width:i,height:s}},Cy={},$5=async t=>{if(t in Cy)return Cy[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return Cy[t]=i,i},aA=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await $5(e)&&sA.includes(e)){const s=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const o=(await vu(`@jsquash/${e}`,"encode.js?module")).default,a=await o(s,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},R5=async t=>{const e=URL.createObjectURL(t);let n=0,r=0;const i=await new Promise(s=>{if(t.type.startsWith("video/")){const o=document.createElement("video");o.addEventListener("canplay",async()=>{o.pause(),{videoWidth:n,videoHeight:r}=o,s(o)},{once:!0}),o.muted=!0,o.autoplay=!0,o.playsInline=!0,o.src=e,o.style.opacity="0",o.style.pointerEvents="none",document.body.appendChild(o)}else{const o=new Image;o.addEventListener("load",()=>{({naturalWidth:n,naturalHeight:r}=o),s(o)},{once:!0}),o.src=e}});return URL.revokeObjectURL(e),{source:i,naturalWidth:n,naturalHeight:r}},Ay=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:s="scale-down"}={})=>{let o,a=0,c=0;try{o=await createImageBitmap(t),{width:a,height:c}=o}catch{({source:o,naturalWidth:a,naturalHeight:c}=await R5(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return oA(u,{width:a,height:c},{fit:s,width:r,height:i}),d.drawImage(o,0,0,u.width,u.height),o instanceof HTMLVideoElement&&document.body.removeChild(o),aA(u,{format:e,quality:n})},F5=async t=>{const e=await t.text();try{const{optimize:n}=await vu("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},lA=({libraryName:t="default",fieldConfig:e}={})=>{const n=re(It);return e?.media_libraries?.[t]??(e?.media_library?.name===t||n?.media_library?.name===t?e?.media_library:void 0)??n?.media_libraries?.[t]??(n?.media_library?.name===t?n.media_library:void 0)??{}},wf=({fieldConfig:t}={})=>{const e=lA({fieldConfig:t}),{max_file_size:n,slugify_filename:r,transformations:i}=typeof e=="boolean"?{}:e?.config??{};return{config:{max_file_size:typeof n=="number"&&Number.isInteger(n)?n:1/0,slugify_filename:typeof r=="boolean"?r:!1,transformations:yn(i)?i:void 0}}},cA=({fieldConfig:t}={})=>{const e=lA({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(cg),{providers:r}=e;return{providers:Array.isArray(r)?r:n}},uA=async(t,e)=>{const[n,r]=t.type.split("/");if(n==="image"&&r!=="svg+xml"){let i;if(r in e?i=e[r]:"raster_image"in e&&iA.includes(r)&&(i=e.raster_image),i){const{format:s,quality:o,width:a,height:c}=i,u=s&&sA.includes(s)?s:"webp",d=await Ay(t,{format:u,quality:o&&Number.isSafeInteger(o)?o:85,width:a&&Number.isSafeInteger(a)?a:void 0,height:c&&Number.isSafeInteger(c)?c:void 0}),f=d.type===`image/${u}`?Ty.test(t.name)?t.name.replace(Ty,u):t.name.concat(u):t.name;return new File([d],f,{type:d.type})}}return n==="image"&&r==="svg+xml"&&e.svg?.optimize?new File([await F5(t)],t.name,{type:t.type}):t};let dA=class{constructor(e){if(D5(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,n){return n?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,n){return n?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,n){return n?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}};function D5(t){return typeof t!="object"||t.length===void 0||t.readUInt8===void 0||t.readUInt16LE===void 0||t.readUInt16BE===void 0||t.readUInt32LE===void 0||t.readUInt32BE===void 0||t.readInt32LE===void 0||t.readInt32BE===void 0}function fA(t,e,n){try{return new DataView(t,e,n)}catch{return new dA(t,e,n)}}function At(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i++)r.push(t.getUint8(e+i));return kl(r)}function _u(t,e){const n=[];let r=0;for(;e+r<t.byteLength;){const i=t.getUint8(e+r);if(i===0)break;n.push(i),r++}return kl(n)}function M5(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i+=2)r.push(t.getUint16(e+i));return r[r.length-1]===0&&r.pop(),kl(r)}function hA(t,e){const n=t.getUint8(e),r=At(t,e+1,n);return[n,r]}function kl(t){return t.map(e=>String.fromCharCode(e)).join("")}function Lt(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function pA(t,e,n){let r=!1;Object.defineProperty(t,e,{get(){return r||(r=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]},configurable:!0,enumerable:!0})}function gA(t){if(typeof btoa<"u")return btoa(typeof t=="string"?t:Array.prototype.reduce.call(new Uint8Array(t),(e,n)=>e+String.fromCharCode(n),""));if(!(typeof Buffer>"u"))return typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function z5(t){const e=t.substring(t.indexOf(",")+1);if(t.indexOf(";base64")!==-1)return typeof atob<"u"?Uint8Array.from(atob(e),r=>r.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,r=>r.charCodeAt(0)).buffer}function U5(t,e,n){return mA(n,e-t.length)+t}function B5(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}function mA(t,e){return new Array(e+1).join(t)}const ug=void 0,vA=0;function _A(t,e,n,r="string"){if(e===vA&&typeof DecompressionStream=="function"){const i=new DecompressionStream("deflate"),s=new Blob([t]).stream().pipeThrough(i);return r==="dataview"?new Response(s).arrayBuffer().then(o=>new DataView(o)):new Response(s).arrayBuffer().then(o=>new TextDecoder(n).decode(o))}return e!==void 0?Promise.reject(`Unknown compression method ${e}.`):t}const bA={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_PHOTOSHOP:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_AVIF:!0,USE_WEBP:!0,USE_GIF:!0,USE_MAKER_NOTES:!0};function or(t){return t.map(e=>String.fromCharCode(e)).join("")}function Iy(t){if(t.length>=8){const e=or(t.slice(0,8));if(e==="ASCII\0\0\0")return or(t.slice(8));if(e==="JIS\0\0\0\0\0")return"[JIS encoded text]";if(e==="UNICODE\0")return"[Unicode encoded text]";if(e==="\0\0\0\0\0\0\0\0")return"[Undefined encoding]"}return"Undefined"}function dg(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const Py=18761,Oy=19789,Js={BIG_ENDIAN:Oy,LITTLE_ENDIAN:Py,getByteOrder:j5};function j5(t,e){if(t.getUint16(e)===Py)return Py;if(t.getUint16(e)===Oy)return Oy;throw new Error("Illegal byte order value. Faulty image.")}const yA={isTiffFile:q5,findTiffOffsets:G5};function q5(t){return!!t&&t.byteLength>=4&&H5(t)}function H5(t){const r=t.getUint16(0)===Js.LITTLE_ENDIAN;return t.getUint16(2,r)===42}function G5(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}const wA={isJpegFile:aq,findJpegOffsets:lq},W5=2,K5=65496,xA=2,rs=4,Hr=2,V5=2,Y5=10,Z5=18,kA=33,SA=79,EA=18,J5=8,Ny="ICC_PROFILE\0",TA=rs+Ny.length,X5=TA+1,CA="MPF\0",AA=65472,IA=65474,Q5=65476,eq=65499,tq=65501,nq=65498,PA=65504,Ly=65505,OA=65506,rq=65517,iq=65519,sq=65534,oq=65535,NA="JFIF",LA="Exif",$A="http://ns.adobe.com/xap/1.0/\0",RA="http://ns.adobe.com/xmp/extension/\0",FA="Photoshop 3.0";function aq(t){return!!t&&t.byteLength>=W5&&t.getUint16(0)===K5}function lq(t){let e=xA,n,r,i,s,o,a,c,u,d;for(;e+rs+5<=t.byteLength;){if(cq(t,e))n=t.getUint16(e+Hr),r=e+Hr;else if(uq(t,e))n=t.getUint16(e+Hr),i=e+Hr;else if(hq(t,e))n=t.getUint16(e+Hr),s=e+V5;else if(pq(t,e))n=t.getUint16(e+Hr),o=e+Y5;else if(gq(t,e))c||(c=[]),n=t.getUint16(e+Hr),c.push(bq(e,n));else if(vq(t,e))c||(c=[]),n=t.getUint16(e+Hr),c.push(yq(e,n));else if(wq(t,e))n=t.getUint16(e+Hr),a=e+Z5;else if(dq(t,e)){n=t.getUint16(e+Hr);const f=e+EA,h=n-(EA-Hr),p=t.getUint8(e+TA),g=t.getUint8(e+X5);u||(u=[]),u.push({offset:f,length:h,chunkNumber:p,chunksTotal:g})}else if(fq(t,e))n=t.getUint16(e+Hr),d=e+J5;else if(xq(t,e))n=t.getUint16(e+Hr);else if(kq(t,e)){e++;continue}else break;e+=Hr+n}return{hasAppMarkers:e>xA,fileDataOffset:r||i,jfifDataOffset:s,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:c,iccChunks:u,mpfDataOffset:d}}function cq(t,e){return t.getUint16(e)===AA}function uq(t,e){return t.getUint16(e)===IA}function dq(t,e){const n=Ny.length;return t.getUint16(e)===OA&&At(t,e+rs,n)===Ny}function fq(t,e){const n=CA.length;return t.getUint16(e)===OA&&At(t,e+rs,n)===CA}function hq(t,e){const n=NA.length;return t.getUint16(e)===PA&&At(t,e+rs,n)===NA&&t.getUint8(e+rs+n)===0}function pq(t,e){const n=LA.length;return t.getUint16(e)===Ly&&At(t,e+rs,n)===LA&&t.getUint8(e+rs+n)===0}function gq(t,e){return t.getUint16(e)===Ly&&mq(t,e)}function mq(t,e){const n=$A.length;return At(t,e+rs,n)===$A}function vq(t,e){return t.getUint16(e)===Ly&&_q(t,e)}function _q(t,e){const n=RA.length;return At(t,e+rs,n)===RA}function bq(t,e){return{dataOffset:t+kA,length:e-(kA-Hr)}}function yq(t,e){return{dataOffset:t+SA,length:e-(SA-Hr)}}function wq(t,e){const n=FA.length;return t.getUint16(e)===rq&&At(t,e+rs,n)===FA&&t.getUint8(e+rs+n)===0}function xq(t,e){const n=t.getUint16(e);return n>=PA&&n<=iq||n===sq||n===AA||n===IA||n===Q5||n===eq||n===tq||n===nq}function kq(t,e){return t.getUint16(e)===oq}const DA={isPngFile:Tq,findPngOffsets:Cq},$y=`PNG\r
|
|
374
|
+
`).map(e=>e.startsWith("*.")&&e.includes("filter=lfs")?e.split(" ")[0].slice(2).toLowerCase():"").filter(Boolean)??[]);const wy=[],KC=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),c5=({collectionName:t,fileName:e,mediaFolder:n,publicFolder:r,baseFolder:i,globalFolders:s})=>{n=KC(n,s),r=r!==void 0?KC(r,s):n;const o=!n.startsWith("/");return{collectionName:t,fileName:e,internalPath:Dn(o?i??"":n),publicPath:r===""||/^[.@]/.test(r)?r:`/${Dn(r)}`,entryRelative:o,hasTemplateTags:/{{.+?}}/.test(n)}},VC=t=>{if(t.mediaFolder===void 0)return;const e=c5(t),{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders;!e.entryRelative&&e.internalPath===n&&e.publicPath===r||wy.push(e)},YC=({collectionName:t,files:e,globalFolders:n})=>{e.forEach(r=>{if(!pf(r))return;const{name:i,file:s,media_folder:o,public_folder:a}=r;VC({collectionName:t,fileName:i,mediaFolder:o,publicFolder:a,baseFolder:xn(s).dirname,globalFolders:n})})},u5=t=>{const{media_folder:e,public_folder:n,collections:r,singletons:i}=t,s=Dn(e).replace(/^\.$/,""),o=n?`/${Dn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},c={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1,hasTemplateTags:!1},u={globalMediaFolder:s,globalPublicFolder:o};return r.forEach(d=>{const{divider:f=!1,name:h,files:p,folder:g,path:m,media_folder:v,public_folder:y}=d;if(f)return;VC({collectionName:h,mediaFolder:v===void 0&&m!==void 0?"":v,publicFolder:y,baseFolder:g,globalFolders:u}),p?.length&&YC({collectionName:h,files:p,globalFolders:u})}),i?.length&&YC({collectionName:"_singletons",files:i,globalFolders:u}),wy.sort((d,f)=>Zi(d.internalPath??"",f.internalPath??"")),[a,c,...wy]},ZC=(t,e)=>{if(!pf(e))return;const n=(()=>{const r=Dn(e.file);if(!r.includes("{{locale}}"))return{_default:r};const i=sf(t,e),{allLocales:s,defaultLocale:o,omitDefaultLocaleFromFileName:a}=i;return Object.fromEntries(s.map(c=>[c,a&&c===o?r.replace(".{{locale}}",""):r.replace("{{locale}}",c)]))})();return{collectionName:t.name,fileName:e.name,filePathMap:n}},JC=(t,e)=>Zi(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),d5=({collections:t})=>t.filter(({folder:e})=>typeof e=="string").map(e=>{const{name:n,folder:r}=e,i=Dn(r),{i18nEnabled:s,structure:o,allLocales:a}=sf(e),c=s&&o==="multiple_folders_i18n_root";return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(a.map(u=>[u,c?`${u}/${i}`:i]))}}).sort((e,n)=>Zi(e.folderPath??"",n.folderPath??"")),f5=({collections:t})=>t.filter(({files:e})=>Array.isArray(e)).map(e=>(e.files??[]).map(n=>ZC(e,n))).flat(1).filter(e=>!!e).sort(JC),h5=({singletons:t})=>{if(!Array.isArray(t)||!t.length)return[];const e={name:"_singletons"};return t.map(n=>ZC(e,n)).filter(n=>!!n).sort(JC)},p5=t=>[...d5(t),...f5(t),...h5(t)],g5=["text/yaml","application/yaml","application/json"],m5=async({href:t,type:e="application/yaml"})=>{let n;if(!g5.includes(e))throw new Error(re(ue)("config.error.parse_failed"),{cause:new Error(re(ue)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(o){throw new Error(re(ue)("config.error.fetch_failed"),{cause:o})}const{ok:r,status:i}=n;if(!r)throw new Error(re(ue)("config.error.fetch_failed"),{cause:new Error(re(ue)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let s;try{e==="application/json"?s=n.json():s=Gd.parse(await n.text(),{merge:!0})}catch(o){throw new Error(re(ue)("config.error.parse_failed"),{cause:o})}if(!yn(s))throw new Error(re(ue)("config.error.parse_failed"),{cause:new Error(re(ue)("config.error.parse_failed_invalid_object"))});return s},XC=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml"});const e=await Promise.all(t.map(n=>m5(n)));return e.length===1?e[0]:Zv.all(e)},v5={DEV:!1},{DEV:_5}=v5,b5=void 0,QC={},It=tt(),xy=tt(),ky=tt(),y5=t=>{if(!t.collections?.length)throw new Error(re(ue)("config.error.no_collection"));if(!t.backend)throw new Error(re(ue)("config.error.missing_backend"));if(!t.backend.name)throw new Error(re(ue)("config.error.missing_backend_name"));if(!a5.includes(t.backend.name))throw new Error(re(ue)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(Object.keys(l5).includes(t.backend.name)){if(t.backend.repo===void 0)throw new Error(re(ue)("config.error.missing_repository"));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(re(ue)("config.error.invalid_repository"))}if(t.backend.auth_type==="implicit")throw new Error(re(ue)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(re(ue)("config.error.oauth_no_app_id"));if(t.media_folder===void 0)throw new Error(re(ue)("config.error.missing_media_folder"));if(typeof t.media_folder!="string")throw new Error(re(ue)("config.error.invalid_media_folder"));if(t.public_folder!==void 0){if(typeof t.public_folder!="string")throw new Error(re(ue)("config.error.invalid_public_folder"));if(/^\.{1,2}\//.test(t.public_folder))throw new Error(re(ue)("config.error.public_folder_relative_path"));if(/^https?:/.test(t.public_folder))throw new Error(re(ue)("config.error.public_folder_absolute_url"))}},w5=async t=>{It.set(void 0),ky.set(void 0);try{if(!window.isSecureContext)throw new Error(re(ue)("config.error.no_secure_context"));let e;if(t){if(!yn(t))throw new Error(re(ue)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=Zv(await XC(),e))}else e=await XC();Object.assign(QC,e),y5(e);const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(_5?b5:window.location.origin),n._baseURL=Kv(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),It.set(n),xy.set(await Oi(Gd.stringify(n)))}catch(e){ky.set({message:e.name==="Error"?e.message:re(ue)("config.error.unexpected")}),console.error(e,e.cause)}};It.subscribe(t=>{if(re(St).devModeEnabled&&console.info("siteConfig",t),!t)return;const e=p5(t),n=u5(t);G_.set(e),Xs.set(n),re(St).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const x5=["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"],eA="https://api.pexels.com/v1",k5={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=re(rn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:x5.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${eA}/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 Ct(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${eA}/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>`}))}},S5=["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"],E5="https://pixabay.com/api",T5={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:async(t,{apiKey:e})=>{const[n]=re(rn).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:S5.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${E5}/?${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()}},C5=["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"],tA="https://api.unsplash.com",nA="utm_source=sveltia-cms&utm_medium=referral",A5={serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=re(rn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:C5.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${tA}/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 Ct(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${tA}/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}?${nA}">${f}</a> on <a href="https://unsplash.com/?${nA}">Unsplash</a>`}))}},lg={},cg={pexels:k5,pixabay:T5,unsplash:A5},Hfe="modulepreload",Gfe=function(t){return"/"+t},Wfe={},rA=function(e,n,r){let i=Promise.resolve();function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},Sy="0.87.1",I5={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.32.1","@sindresorhus/transliterate":"^1.6.0","@sveltia/ui":"^0.27.3","@sveltia/utils":"^0.8.0",deepmerge:"^4.3.1",exifreader:"^4.31.1","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.25.0",leaflet:"^1.9.4",lexical:"^0.32.1",marked:"^16.0.0","marked-bidi":"^1.0.13",mime:"^4.0.7",moment:"^2.30.1","parse-entities":"^4.0.2","pdfjs-dist":"^5.3.31",qrcode:"^1.5.4","sanitize-filename":"^1.6.3","smol-toml":"^1.4.1",svgo:"^4.0.0","terra-draw":"^1.9.1","terra-draw-leaflet-adapter":"^1.0.3",turndown:"^7.2.0",yaml:"^2.8.0"},Ey=t=>{const e=`https://unpkg.com/${t}`,n=I5[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},vu=async(t,e)=>rA(()=>import(`${Ey(t)}/${e}`),void 0),iA=["avif","gif","jpeg","png","webp"],P5=iA.map(t=>`image/${t}`),Ty=/\b(?:avif|gif|jpe?g|png|webp)$/i,O5=["image/svg+xml"],N5=/\b(?:svg)$/i,Zs=[...P5,...O5],sA=["webp"],L5=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const s={scale:1,width:t,height:e};if(t===r&&e===r)return s;const o=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return s;i="contain"}return i==="contain"&&(o?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},oA=(t,e,n)=>{const{scale:r,width:i,height:s}=L5(e,n);return t.width=i,t.height=s,{scale:r,width:i,height:s}},Cy={},$5=async t=>{if(t in Cy)return Cy[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return Cy[t]=i,i},aA=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await $5(e)&&sA.includes(e)){const s=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const o=(await vu(`@jsquash/${e}`,"encode.js?module")).default,a=await o(s,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},R5=async t=>{const e=URL.createObjectURL(t);let n=0,r=0;const i=await new Promise(s=>{if(t.type.startsWith("video/")){const o=document.createElement("video");o.addEventListener("canplay",async()=>{o.pause(),{videoWidth:n,videoHeight:r}=o,s(o)},{once:!0}),o.muted=!0,o.autoplay=!0,o.playsInline=!0,o.src=e,o.style.opacity="0",o.style.pointerEvents="none",document.body.appendChild(o)}else{const o=new Image;o.addEventListener("load",()=>{({naturalWidth:n,naturalHeight:r}=o),s(o)},{once:!0}),o.src=e}});return URL.revokeObjectURL(e),{source:i,naturalWidth:n,naturalHeight:r}},Ay=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:s="scale-down"}={})=>{let o,a=0,c=0;try{o=await createImageBitmap(t),{width:a,height:c}=o}catch{({source:o,naturalWidth:a,naturalHeight:c}=await R5(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return oA(u,{width:a,height:c},{fit:s,width:r,height:i}),d.drawImage(o,0,0,u.width,u.height),o instanceof HTMLVideoElement&&document.body.removeChild(o),aA(u,{format:e,quality:n})},F5=async t=>{const e=await t.text();try{const{optimize:n}=await vu("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},lA=({libraryName:t="default",fieldConfig:e}={})=>{const n=re(It);return e?.media_libraries?.[t]??(e?.media_library?.name===t||n?.media_library?.name===t?e?.media_library:void 0)??n?.media_libraries?.[t]??(n?.media_library?.name===t?n.media_library:void 0)??{}},wf=({fieldConfig:t}={})=>{const e=lA({fieldConfig:t}),{max_file_size:n,slugify_filename:r,transformations:i}=typeof e=="boolean"?{}:e?.config??{};return{config:{max_file_size:typeof n=="number"&&Number.isInteger(n)?n:1/0,slugify_filename:typeof r=="boolean"?r:!1,transformations:yn(i)?i:void 0}}},cA=({fieldConfig:t}={})=>{const e=lA({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(cg),{providers:r}=e;return{providers:Array.isArray(r)?r:n}},uA=async(t,e)=>{const[n,r]=t.type.split("/");if(n==="image"&&r!=="svg+xml"){let i;if(r in e?i=e[r]:"raster_image"in e&&iA.includes(r)&&(i=e.raster_image),i){const{format:s,quality:o,width:a,height:c}=i,u=s&&sA.includes(s)?s:"webp",d=await Ay(t,{format:u,quality:o&&Number.isSafeInteger(o)?o:85,width:a&&Number.isSafeInteger(a)?a:void 0,height:c&&Number.isSafeInteger(c)?c:void 0}),f=d.type===`image/${u}`?Ty.test(t.name)?t.name.replace(Ty,u):t.name.concat(u):t.name;return new File([d],f,{type:d.type})}}return n==="image"&&r==="svg+xml"&&e.svg?.optimize?new File([await F5(t)],t.name,{type:t.type}):t};let dA=class{constructor(e){if(D5(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,n){return n?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,n){return n?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,n){return n?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}};function D5(t){return typeof t!="object"||t.length===void 0||t.readUInt8===void 0||t.readUInt16LE===void 0||t.readUInt16BE===void 0||t.readUInt32LE===void 0||t.readUInt32BE===void 0||t.readInt32LE===void 0||t.readInt32BE===void 0}function fA(t,e,n){try{return new DataView(t,e,n)}catch{return new dA(t,e,n)}}function At(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i++)r.push(t.getUint8(e+i));return kl(r)}function _u(t,e){const n=[];let r=0;for(;e+r<t.byteLength;){const i=t.getUint8(e+r);if(i===0)break;n.push(i),r++}return kl(n)}function M5(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i+=2)r.push(t.getUint16(e+i));return r[r.length-1]===0&&r.pop(),kl(r)}function hA(t,e){const n=t.getUint8(e),r=At(t,e+1,n);return[n,r]}function kl(t){return t.map(e=>String.fromCharCode(e)).join("")}function Lt(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function pA(t,e,n){let r=!1;Object.defineProperty(t,e,{get(){return r||(r=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]},configurable:!0,enumerable:!0})}function gA(t){if(typeof btoa<"u")return btoa(typeof t=="string"?t:Array.prototype.reduce.call(new Uint8Array(t),(e,n)=>e+String.fromCharCode(n),""));if(!(typeof Buffer>"u"))return typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function z5(t){const e=t.substring(t.indexOf(",")+1);if(t.indexOf(";base64")!==-1)return typeof atob<"u"?Uint8Array.from(atob(e),r=>r.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,r=>r.charCodeAt(0)).buffer}function U5(t,e,n){return mA(n,e-t.length)+t}function B5(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}function mA(t,e){return new Array(e+1).join(t)}const ug=void 0,vA=0;function _A(t,e,n,r="string"){if(e===vA&&typeof DecompressionStream=="function"){const i=new DecompressionStream("deflate"),s=new Blob([t]).stream().pipeThrough(i);return r==="dataview"?new Response(s).arrayBuffer().then(o=>new DataView(o)):new Response(s).arrayBuffer().then(o=>new TextDecoder(n).decode(o))}return e!==void 0?Promise.reject(`Unknown compression method ${e}.`):t}const bA={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_PHOTOSHOP:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_AVIF:!0,USE_WEBP:!0,USE_GIF:!0,USE_MAKER_NOTES:!0};function or(t){return t.map(e=>String.fromCharCode(e)).join("")}function Iy(t){if(t.length>=8){const e=or(t.slice(0,8));if(e==="ASCII\0\0\0")return or(t.slice(8));if(e==="JIS\0\0\0\0\0")return"[JIS encoded text]";if(e==="UNICODE\0")return"[Unicode encoded text]";if(e==="\0\0\0\0\0\0\0\0")return"[Undefined encoding]"}return"Undefined"}function dg(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const Py=18761,Oy=19789,Js={BIG_ENDIAN:Oy,LITTLE_ENDIAN:Py,getByteOrder:j5};function j5(t,e){if(t.getUint16(e)===Py)return Py;if(t.getUint16(e)===Oy)return Oy;throw new Error("Illegal byte order value. Faulty image.")}const yA={isTiffFile:q5,findTiffOffsets:G5};function q5(t){return!!t&&t.byteLength>=4&&H5(t)}function H5(t){const r=t.getUint16(0)===Js.LITTLE_ENDIAN;return t.getUint16(2,r)===42}function G5(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}const wA={isJpegFile:aq,findJpegOffsets:lq},W5=2,K5=65496,xA=2,rs=4,Hr=2,V5=2,Y5=10,Z5=18,kA=33,SA=79,EA=18,J5=8,Ny="ICC_PROFILE\0",TA=rs+Ny.length,X5=TA+1,CA="MPF\0",AA=65472,IA=65474,Q5=65476,eq=65499,tq=65501,nq=65498,PA=65504,Ly=65505,OA=65506,rq=65517,iq=65519,sq=65534,oq=65535,NA="JFIF",LA="Exif",$A="http://ns.adobe.com/xap/1.0/\0",RA="http://ns.adobe.com/xmp/extension/\0",FA="Photoshop 3.0";function aq(t){return!!t&&t.byteLength>=W5&&t.getUint16(0)===K5}function lq(t){let e=xA,n,r,i,s,o,a,c,u,d;for(;e+rs+5<=t.byteLength;){if(cq(t,e))n=t.getUint16(e+Hr),r=e+Hr;else if(uq(t,e))n=t.getUint16(e+Hr),i=e+Hr;else if(hq(t,e))n=t.getUint16(e+Hr),s=e+V5;else if(pq(t,e))n=t.getUint16(e+Hr),o=e+Y5;else if(gq(t,e))c||(c=[]),n=t.getUint16(e+Hr),c.push(bq(e,n));else if(vq(t,e))c||(c=[]),n=t.getUint16(e+Hr),c.push(yq(e,n));else if(wq(t,e))n=t.getUint16(e+Hr),a=e+Z5;else if(dq(t,e)){n=t.getUint16(e+Hr);const f=e+EA,h=n-(EA-Hr),p=t.getUint8(e+TA),g=t.getUint8(e+X5);u||(u=[]),u.push({offset:f,length:h,chunkNumber:p,chunksTotal:g})}else if(fq(t,e))n=t.getUint16(e+Hr),d=e+J5;else if(xq(t,e))n=t.getUint16(e+Hr);else if(kq(t,e)){e++;continue}else break;e+=Hr+n}return{hasAppMarkers:e>xA,fileDataOffset:r||i,jfifDataOffset:s,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:c,iccChunks:u,mpfDataOffset:d}}function cq(t,e){return t.getUint16(e)===AA}function uq(t,e){return t.getUint16(e)===IA}function dq(t,e){const n=Ny.length;return t.getUint16(e)===OA&&At(t,e+rs,n)===Ny}function fq(t,e){const n=CA.length;return t.getUint16(e)===OA&&At(t,e+rs,n)===CA}function hq(t,e){const n=NA.length;return t.getUint16(e)===PA&&At(t,e+rs,n)===NA&&t.getUint8(e+rs+n)===0}function pq(t,e){const n=LA.length;return t.getUint16(e)===Ly&&At(t,e+rs,n)===LA&&t.getUint8(e+rs+n)===0}function gq(t,e){return t.getUint16(e)===Ly&&mq(t,e)}function mq(t,e){const n=$A.length;return At(t,e+rs,n)===$A}function vq(t,e){return t.getUint16(e)===Ly&&_q(t,e)}function _q(t,e){const n=RA.length;return At(t,e+rs,n)===RA}function bq(t,e){return{dataOffset:t+kA,length:e-(kA-Hr)}}function yq(t,e){return{dataOffset:t+SA,length:e-(SA-Hr)}}function wq(t,e){const n=FA.length;return t.getUint16(e)===rq&&At(t,e+rs,n)===FA&&t.getUint8(e+rs+n)===0}function xq(t,e){const n=t.getUint16(e);return n>=PA&&n<=iq||n===sq||n===AA||n===IA||n===Q5||n===eq||n===tq||n===nq}function kq(t,e){return t.getUint16(e)===oq}const DA={isPngFile:Tq,findPngOffsets:Cq},$y=`PNG\r
|
|
375
375
|
|
|
376
376
|
`,fg=4,ys=4,bu=0,Ca=fg,Rr=fg+ys,Ry="XML:com.adobe.xmp\0",Fy="tEXt",Sl="iTXt",hg="zTXt",MA="pHYs",zA="tIME",Sq="eXIf",Eq="iCCP";function Tq(t){return!!t&&At(t,0,$y.length)===$y}function Cq(t,e){const r={hasAppMarkers:!1};let i=$y.length;for(;i+fg+ys<=t.byteLength;){if(Aq(t,i))r.hasAppMarkers=!0,r.pngHeaderOffset=i+Rr;else if(Iq(t,i)){const s=$q(t,i);s!==void 0&&(r.hasAppMarkers=!0,r.xmpChunks=[{dataOffset:s,length:t.getUint32(i+bu)-(s-(i+Rr))}])}else if(Pq(t,i,e)){r.hasAppMarkers=!0;const s=At(t,i+Ca,ys);r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push({length:t.getUint32(i+bu),type:s,offset:i+Rr})}else if(Oq(t,i))r.hasAppMarkers=!0,r.tiffHeaderOffset=i+Rr;else if(e&&Nq(t,i)){r.hasAppMarkers=!0;const s=t.getUint32(i+bu),o=i+Rr,{profileName:a,compressionMethod:c,compressedProfileOffset:u}=Rq(t,o);r.iccChunks||(r.iccChunks=[]),r.iccChunks.push({offset:u,length:s-(u-o),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:c})}else Lq(t,i)&&(r.hasAppMarkers=!0,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(i+bu));i+=t.getUint32(i+bu)+fg+ys+4}return r}function Aq(t,e){return At(t,e+Ca,ys)==="IHDR"}function Iq(t,e){return At(t,e+Ca,ys)===Sl&&At(t,e+Rr,Ry.length)===Ry}function Pq(t,e,n){const r=At(t,e+Ca,ys);return r===Fy||r===Sl||r===hg&&n}function Oq(t,e){return At(t,e+Ca,ys)===Sq}function Nq(t,e){return At(t,e+Ca,ys)===Eq}function Lq(t,e){const n=[MA,zA],r=At(t,e+Ca,ys);return n.includes(r)}function $q(t,e){e+=Rr+Ry.length+1+1;let i=0;for(;i<2&&e<t.byteLength;)t.getUint8(e)===0&&i++,e++;if(!(i<2))return e}function Rq(t,e){const i=_u(t,e);e+=i.length+1;const s=t.getUint8(e);return e+=1,{profileName:i,compressionMethod:s,compressedProfileOffset:e}}function Fq(t,e){return t.getUint32(e+4)}function Dq(t,e,n,r){const{offsets:s,sizes:o}=Mq(e,n+3),a=t.getUint8(s.offsetSize)>>4;o.item.extent.extentOffset=a;const c=t.getUint8(s.lengthSize)&15;o.item.extent.extentLength=c;const u=t.getUint8(s.baseOffsetSize)>>4;o.item.baseOffset=u;const d=zq(t,s.indexSize,e);o.item.extent.extentIndex=d!==void 0?d:0;const f=Uq(t,s.itemCount,e);return{type:"iloc",items:Bq(t,e,s,o,a,c,d,f),length:r}}function Mq(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):t===2&&(n.itemCount=4,n.item.itemId=4),t===1||t===2?n.item.constructionMethod=2:n.item.constructionMethod=0;const r={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return r.itemCount=e+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}function zq(t,e,n){if(n===1||n===2)return t.getUint8(e)&15}function Uq(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Bq(t,e,n,r,i,s,o,a){if(a===void 0)return[];const c=[];let u=n.items;for(let d=0;d<a;d++){const f={extents:[]};f.itemId=jq(t,u,e),u+=r.item.itemId,f.constructionMethod=e===1||e===2?t.getUint16(u)&15:void 0,u+=r.item.constructionMethod,f.dataReferenceIndex=t.getUint16(u),u+=r.item.dataReferenceIndex,f.baseOffset=pg(t,u,r.item.baseOffset),u+=r.item.baseOffset,f.extentCount=t.getUint16(u),u+=r.item.extentCount;for(let h=0;h<f.extentCount;h++){const p={};p.extentIndex=qq(t,e,u,o),u+=r.item.extent.extentIndex,p.extentOffset=pg(t,u,i),u+=r.item.extent.extentOffset,p.extentLength=pg(t,u,s),u+=r.item.extent.extentLength,f.extents.push(p)}c.push(f)}return c}function jq(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function qq(t,e,n,r){if((e===1||e===2)&&r>0)return pg(t,n,r)}function pg(t,e,n){return n===4?t.getUint32(e):n===8?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),Fq(t,e)):0}const Hq=1718909296,Gq=1768977008,Wq=1835365473,Kq=1768714083,Vq=1768517222,Yq=1768842853,Zq=1768973167,Jq=1668246642,UA=1165519206,Dy=1835625829,Xq=1970432288;function gg(t,e){const{length:s,contentOffset:o}=Qq(t,e);if(s<8)return;const a=t.getUint32(e+4);if(a===Hq)return uH(t,o,s);if(a===Gq)return dH(t,e,o,s);if(a===Zq)return fH(t,e,o,s);if(a===Jq)return hH(t,o,s);const c=t.getUint8(o);return a===Wq?gH(t,e,o+1,s):a===Kq?Dq(t,c,o+1,s):a===Vq?mH(t,e,c,o+1,s):a===Yq?_H(t,e,c,o+1,s):{type:void 0,length:s}}function Qq(t,e){const o=t.getUint32(e);return eH(o)?{length:t.byteLength-e,contentOffset:e+4+4}:tH(o)&&nH(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:o,contentOffset:e+4+4}}function eH(t){return t===0}function tH(t){return t===1}function nH(t,e){return t.getUint32(e+8)===0}function BA(t){{const e={},n=rH(t);return n?(e.tiffHeaderOffset=iH(t,n),e.xmpChunks=aH(n),e.iccChunks=cH(n),e.hasAppMarkers=e.tiffHeaderOffset!==void 0||e.xmpChunks!==void 0||e.iccChunks!==void 0,e):{hasAppMarkers:!1}}}function rH(t){let r=0;for(;r+4+4<=t.byteLength;){const i=gg(t,r);if(i===void 0)break;if(i.type==="meta")return i;r+=i.length}}function iH(t,e){try{const n=sH(e).itemId,r=My(e,n),i=r.baseOffset+r.extents[0].extentOffset;return oH(t,i)}catch{return}}function sH(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===UA)}function My(t,e){return t.subBoxes.find(n=>n.type==="iloc").items.find(n=>n.itemId===e)}function oH(t,e){return e+4+t.getUint32(e)}function aH(t){try{const e=lH(t).itemId,n=My(t,e),r=My(t,e).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch{return}}function lH(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===Dy&&e.contentType==="application/rdf+xml")}function cH(t){try{const e=t.subBoxes.find(n=>n.type==="iprp").subBoxes.find(n=>n.type==="ipco").properties.find(n=>n.type==="colr").icc;if(e)return[e]}catch{}}function uH(t,e,n){return{type:"ftyp",majorBrand:At(t,e,4),length:n}}function dH(t,e,n,r){return{type:"iprp",subBoxes:mg(t,n,r-(n-e)),length:r}}function fH(t,e,n,r){return{type:"ipco",properties:mg(t,n,r-(n-e)),length:r}}function hH(t,e,n){return{type:"colr",icc:pH(t,e),length:n}}function pH(t,e){const r=At(t,e,4);if(!(r!=="prof"&&r!=="rICC"))return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function gH(t,e,n,r){return{type:"meta",subBoxes:mg(t,n+3,r-(n+3-e)),length:r}}function mg(t,e,n){const r=[UA,Dy],i=[];let s=e;for(;s<e+n;){const o=gg(t,s);if(o===void 0)break;o.type!==void 0&&(o.itemType===void 0||r.indexOf(o.itemType)!==-1)&&i.push(o),s+=o.length}return i}function mH(t,e,n,r,i){const{offsets:s}=vH(n,r);return{type:"iinf",itemInfos:mg(t,s.itemInfos,i-(s.itemInfos-e)),length:i}}function vH(t,e){const r={entryCount:e+3},i={};return t===0?i.entryCount=2:i.entryCount=4,r.itemInfos=r.entryCount+i.entryCount,{offsets:r}}function _H(t,e,n,r,i){r+=3;const o={type:"infe",length:i};return(n===0||n===1)&&(o.itemId=t.getUint16(r),r+=2,o.itemProtectionIndex=t.getUint16(r),r+=2,o.itemName=_u(t,r),r+=o.itemName.length+1),n>=2&&(n===2?(o.itemId=t.getUint16(r),r+=2):n===3&&(o.itemId=t.getUint32(r),r+=4),o.itemProtectionIndex=t.getUint16(r),r+=2,o.itemType=t.getUint32(r),r+=4,o.itemName=_u(t,r),r+=o.itemName.length+1,o.itemType===Dy?(o.contentType=_u(t,r),r+=o.contentType.length+1,e+i>r&&(o.contentEncoding=_u(t,r),r+=o.contentEncoding.length+1)):o.itemType===Xq&&(o.itemUri=_u(t,r),r+=o.itemUri.length+1)),o}const jA={isHeicFile:bH,findHeicOffsets:yH};function bH(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=gg(t,0);return n&&e.indexOf(n.majorBrand)!==-1}catch{return!1}}function yH(t){return BA(t)}const qA={isAvifFile:wH,findAvifOffsets:xH};function wH(t){if(!t)return!1;try{const e=gg(t,0);return e&&e.majorBrand==="avif"}catch{return!1}}function xH(t){return BA(t)}const HA={isWebpFile:kH,findOffsets:SH};function kH(t){const n="RIFF",i="WEBP";return!!t&&At(t,0,n.length)===n&&At(t,8,i.length)===i}function SH(t){const r="Exif\0\0";let s=12,o=!1,a,c,u,d;for(;s+8<t.byteLength;){const f=At(t,s,4),h=t.getUint32(s+4,!0);f==="EXIF"?(o=!0,At(t,s+8,r.length)===r?a=s+8+r.length:a=s+8):f==="XMP "?(o=!0,c=[{dataOffset:s+8,length:h}]):f==="ICCP"?(o=!0,u=[{offset:s+8,length:h,chunkNumber:1,chunksTotal:1}]):f==="VP8X"&&(o=!0,d=s+8),s+=8+(h%2===0?h:h+1)}return{hasAppMarkers:o,tiffHeaderOffset:a,xmpChunks:c,iccChunks:u,vp8xChunkOffset:d}}const GA={isGifFile:CH,findOffsets:AH},EH=6,TH=["GIF87a","GIF89a"];function CH(t){return!!t&&TH.includes(At(t,0,EH))}function AH(){return{gifHeaderOffset:0}}const WA={isXMLFile:IH,findOffsets:PH},KA=0,VA="<?xpacket begin";function IH(t){return!!t&&At(t,KA,VA.length)===VA}function PH(t){const e=[];return e.push({dataOffset:KA,length:t.byteLength}),{xmpChunks:e}}const OH={parseAppMarkers:NH};function NH(t,e){if(yA.isTiffFile(t))return Aa(yA.findTiffOffsets(),"tiff","TIFF");if(wA.isJpegFile(t))return Aa(wA.findJpegOffsets(t),"jpeg","JPEG");if(DA.isPngFile(t))return Aa(DA.findPngOffsets(t,e),"png","PNG");if(jA.isHeicFile(t))return Aa(jA.findHeicOffsets(t),"heic","HEIC");if(qA.isAvifFile(t))return Aa(qA.findAvifOffsets(t),"avif","AVIF");if(HA.isWebpFile(t))return Aa(HA.findOffsets(t),"webp","WebP");if(GA.isGifFile(t))return Aa(GA.findOffsets(t),"gif","GIF");if(WA.isXMLFile(t))return Aa(WA.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}function Aa(t,e,n){return Lt({},t,{fileType:{value:e,description:n}})}const Et={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace(t){return t===1?"sRGB":t===65535?"Uncalibrated":"Unknown"},ComponentsConfiguration(t){return t.map(e=>{if(e===49)return"Y";if(e===50)return"Cb";if(e===51)return"Cr";if(e===52)return"R";if(e===53)return"G";if(e===54)return"B"}).join("")},Contrast(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},CustomRendered(t){return t===0?"Normal process":t===1?"Custom process":"Unknown"},ExposureMode(t){return t===0?"Auto exposure":t===1?"Manual exposure":t===2?"Auto bracket":"Unknown"},ExposureProgram(t){return t===0?"Undefined":t===1?"Manual":t===2?"Normal program":t===3?"Aperture priority":t===4?"Shutter priority":t===5?"Creative program":t===6?"Action program":t===7?"Portrait mode":t===8?"Landscape mode":t===9?"Bulb":"Unknown"},ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return t[0]!==0?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit(t){return t===2?"inches":t===3?"centimeters":t===4?"millimeters":"Unknown"},LightSource:t=>t===1?"Daylight":t===2?"Fluorescent":t===3?"Tungsten (incandescent light)":t===4?"Flash":t===9?"Fine weather":t===10?"Cloudy weather":t===11?"Shade":t===12?"Daylight fluorescent (D 5700 – 7100K)":t===13?"Day white fluorescent (N 4600 – 5400K)":t===14?"Cool white fluorescent (W 3900 – 4500K)":t===15?"White fluorescent (WW 3200 – 3700K)":t===17?"Standard light A":t===18?"Standard light B":t===19?"Standard light C":t===20?"D55":t===21?"D65":t===22?"D75":t===23?"D50":t===24?"ISO studio tungsten":t===255?"Other light source":"Unknown",MeteringMode(t){return t===1?"Average":t===2?"CenterWeightedAverage":t===3?"Spot":t===4?"MultiSpot":t===5?"Pattern":t===6?"Partial":t===255?"Other":"Unknown"},ResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},Saturation(t){return t===0?"Normal":t===1?"Low saturation":t===2?"High saturation":"Unknown"},FocalLengthIn35mmFilm(t){return t===0?"Unknown":t+" mm"},SceneCaptureType(t){return t===0?"Standard":t===1?"Landscape":t===2?"Portrait":t===3?"Night scene":"Unknown"},Sharpness(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance(t){return t===0?"Auto white balance":t===1?"Manual white balance":"Unknown"},XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},YA={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[t]||"Unknown"},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[t]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[t]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"})[t]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>t===1?"top-left":t===2?"top-right":t===3?"bottom-right":t===4?"bottom-left":t===5?"left-top":t===6?"right-top":t===7?"right-bottom":t===8?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:Et.XResolution},283:{name:"YResolution",description:Et.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[t]||"Unknown"},296:{name:"ResolutionUnit",description:Et.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"})[t]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[t]||"Unknown"},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(n=>e[n]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>t===1?"centered":t===2?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:xf},40092:{name:"XPComment",description:xf},40093:{name:"XPAuthor",description:xf},40094:{name:"XPKeywords",description:xf},40095:{name:"XPSubject",description:xf},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"})[t]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:Et.LightSource},50779:{name:"CalibrationIlluminant2",description:Et.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[t]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[t]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"})[t]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function xf(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const LH={33434:{name:"ExposureTime",description:Et.ExposureTime},33437:{name:"FNumber",description:Et.FNumber},34850:{name:"ExposureProgram",description:Et.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[t]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>or(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Et.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Et.ShutterSpeedValue},37378:{name:"ApertureValue",description:Et.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:Et.MeteringMode},37384:{name:"LightSource",description:Et.LightSource},37385:{name:"Flash",description:t=>t===0?"Flash did not fire":t===1?"Flash fired":t===5?"Strobe return light not detected":t===7?"Strobe return light detected":t===9?"Flash fired, compulsory flash mode":t===13?"Flash fired, compulsory flash mode, return light not detected":t===15?"Flash fired, compulsory flash mode, return light detected":t===16?"Flash did not fire, compulsory flash mode":t===24?"Flash did not fire, auto mode":t===25?"Flash fired, auto mode":t===29?"Flash fired, auto mode, return light not detected":t===31?"Flash fired, auto mode, return light detected":t===32?"No flash function":t===65?"Flash fired, red-eye reduction mode":t===69?"Flash fired, red-eye reduction mode, return light not detected":t===71?"Flash fired, red-eye reduction mode, return light detected":t===73?"Flash fired, compulsory flash mode, red-eye reduction mode":t===77?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":t===79?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":t===89?"Flash fired, auto mode, red-eye reduction mode":t===93?"Flash fired, auto mode, return light not detected, red-eye reduction mode":t===95?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:Et.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[t]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>t.length===2?`Location; X: ${t[0]}, Y: ${t[1]}`:t.length===3?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:t.length===4?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:Iy},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:Et.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:Et.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>t===1?"Undefined":t===2?"One-chip color area sensor":t===3?"Two-chip color area sensor":t===4?"Three-chip color area sensor":t===5?"Color sequential area sensor":t===7?"Trilinear sensor":t===8?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>t===3?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>t===1?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:Et.CustomRendered},41986:{name:"ExposureMode",description:Et.ExposureMode},41987:{name:"WhiteBalance",description:Et.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>t[0]===0?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:Et.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:Et.SceneCaptureType},41991:{name:"GainControl",description:t=>t===0?"None":t===1?"Low gain up":t===2?"High gain up":t===3?"Low gain down":t===4?"High gain down":"Unknown"},41992:{name:"Contrast",description:Et.Contrast},41993:{name:"Saturation",description:Et.Saturation},41994:{name:"Sharpness",description:Et.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>t===1?"Macro":t===2?"Close view":t===3?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=parseFloat((t[0][0]/t[0][1]).toFixed(5)),n=parseFloat((t[1][0]/t[1][1]).toFixed(5)),r=`${e}-${n} mm`;if(t[3][1]===0)return`${r} f/?`;const i=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${r} f/${parseFloat(i.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[t]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},$H={0:{name:"GPSVersionID",description:t=>t[0]===2&&t[1]===2&&t[2]===0&&t[3]===0?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:dg},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:dg},5:{name:"GPSAltitudeRef",description:t=>t===0?"Sea level":t===1?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([e,n])=>{const r=e/n;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return e==="A"?"Measurement in progress":e==="V"?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return e==="2"?"2-dimensional measurement":e==="3"?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers per hour":e==="M"?"Miles per hour":e==="N"?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers":e==="M"?"Miles":e==="N"?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:Iy},28:{name:"GPSAreaInformation",description:Iy},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>t===0?"Measurement without differential correction":t===1?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},RH={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>or(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},FH={45056:{name:"MPFVersion",description:t=>or(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},DH={4:{name:"ShotInfo",description:t=>t}},MH={0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"},ZA=Lt({},YA,LH),zy="0th",JA="1st",XA="exif",QA="gps",e2="interoperability",t2="mpf",n2="canon",Uy="pentax",Ia={[zy]:ZA,[JA]:YA,[XA]:ZA,[QA]:$H,[e2]:RH,[t2]:FH,[n2]:DH,[Uy]:MH},r2={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},By={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Ge={getAsciiValue:zH,getByteAt:i2,getAsciiAt:UH,getShortAt:BH,getLongAt:vg,getRationalAt:jH,getUndefinedAt:qH,getSlongAt:jy,getSrationalAt:HH,getIfdPointerAt:GH,typeSizes:r2,tagTypes:By,getTypeSize:WH};function zH(t){return t.map(e=>String.fromCharCode(e))}function i2(t,e){return t.getUint8(e)}function UH(t,e){return t.getUint8(e)}function BH(t,e,n){return t.getUint16(e,n===Js.LITTLE_ENDIAN)}function vg(t,e,n){return t.getUint32(e,n===Js.LITTLE_ENDIAN)}function jH(t,e,n){return[vg(t,e,n),vg(t,e+4,n)]}function qH(t,e){return i2(t,e)}function jy(t,e,n){return t.getInt32(e,n===Js.LITTLE_ENDIAN)}function HH(t,e,n){return[jy(t,e,n),jy(t,e+4,n)]}function GH(t,e,n){return vg(t,e,n)}function WH(t){if(By[t]===void 0)throw new Error("No such type found.");return r2[By[t]]}const KH={1:Ge.getByteAt,2:Ge.getAsciiAt,3:Ge.getShortAt,4:Ge.getLongAt,5:Ge.getRationalAt,7:Ge.getUndefinedAt,9:Ge.getSlongAt,10:Ge.getSrationalAt,13:Ge.getIfdPointerAt};function s2(t,e,n){return e+Ge.getLongAt(t,e+4,n)}function Pa(t,e,n,r,i,s){const o=Ge.getTypeSize("SHORT"),a=12,c={},u=VH(t,r,i);r+=o;for(let d=0;d<u&&!(r+a>t.byteLength);d++){const f=YH(t,e,n,r,i,s);f!==void 0&&(c[f.name]={id:f.id,value:f.value,description:f.description},(f.name==="MakerNote"||e===Uy&&f.name==="LevelInfo")&&(c[f.name].__offset=f.__offset)),r+=a}if(r<t.byteLength-Ge.getTypeSize("LONG")){const d=Ge.getLongAt(t,r,i);d!==0&&e===zy&&(c.Thumbnail=Pa(t,JA,n,n+d,i,s))}return c}function VH(t,e,n){return e+Ge.getTypeSize("SHORT")<=t.byteLength?Ge.getShortAt(t,e,n):0}function YH(t,e,n,r,i,s){const a=Ge.getTypeSize("SHORT"),c=a+Ge.getTypeSize("SHORT"),u=c+Ge.getTypeSize("LONG"),d=Ge.getShortAt(t,r,i),f=Ge.getShortAt(t,r+a,i),h=Ge.getLongAt(t,r+c,i);let p,g;if(Ge.typeSizes[f]===void 0||!s&&Ia[e][d]===void 0)return;if(ZH(f,h))g=r+u,p=o2(t,g,f,h,i);else if(g=Ge.getLongAt(t,r+u,i),JH(t,n,g,f,h)){const y=d===33723;p=o2(t,n+g,f,h,i,y)}else p="<faulty value>";f===Ge.tagTypes.ASCII&&(p=XH(p),p=QH(p));let m=`undefined-${d}`,v=p;if(Ia[e][d]!==void 0)if(Ia[e][d].name!==void 0&&Ia[e][d].description!==void 0){m=Ia[e][d].name;try{v=Ia[e][d].description(p)}catch{v=a2(p)}}else f===Ge.tagTypes.RATIONAL||f===Ge.tagTypes.SRATIONAL?(m=Ia[e][d],v=""+p[0]/p[1]):(m=Ia[e][d],v=a2(p));return{id:d,name:m,value:p,description:v,__offset:g}}function ZH(t,e){return Ge.typeSizes[t]*e<=Ge.getTypeSize("LONG")}function o2(t,e,n,r,i,s=!1){let o=[];s&&(r=r*Ge.typeSizes[n],n=Ge.tagTypes.BYTE);for(let a=0;a<r;a++)o.push(KH[n](t,e,i)),e+=Ge.typeSizes[n];return n===Ge.tagTypes.ASCII?o=Ge.getAsciiValue(o):o.length===1&&(o=o[0]),o}function JH(t,e,n,r,i){return e+n+Ge.typeSizes[r]*i<=t.byteLength}function XH(t){const e=[];let n=0;for(let r=0;r<t.length;r++){if(t[r]==="\0"){n++;continue}e[n]===void 0&&(e[n]=""),e[n]+=t[r]}return e}function QH(t){try{return t.map(e=>decodeURIComponent(escape(e)))}catch{return t}}function a2(t){return t instanceof Array?t.join(", "):t}const l2="Exif IFD Pointer",c2="GPS Info IFD Pointer",u2="Interoperability IFD Pointer",d2={read:eG};function eG(t,e,n){const r=Js.getByteOrder(t,e);let i=tG(t,e,r,n);return i=nG(i,t,e,r,n),i=rG(i,t,e,r,n),i=iG(i,t,e,r,n),{tags:i,byteOrder:r}}function tG(t,e,n,r){return Pa(t,zy,e,s2(t,e,n),n,r)}function nG(t,e,n,r,i){return t[l2]!==void 0?Lt(t,Pa(e,XA,n,n+t[l2].value,r,i)):t}function rG(t,e,n,r,i){return t[c2]!==void 0?Lt(t,Pa(e,QA,n,n+t[c2].value,r,i)):t}function iG(t,e,n,r,i){return t[u2]!==void 0?Lt(t,Pa(e,e2,n,n+t[u2].value,r,i)):t}const sG={read:oG},yu=16;function oG(t,e,n){const r=Js.getByteOrder(t,e),i=Pa(t,t2,e,s2(t,e,r),r,n);return aG(t,e,i,r)}function aG(t,e,n,r){if(!n.MPEntry)return n;const i=[];for(let s=0;s<Math.ceil(n.MPEntry.value.length/yu);s++){i[s]={};const o=kf(n.MPEntry.value,s*yu,Ge.getTypeSize("LONG"),r);i[s].ImageFlags=lG(o),i[s].ImageFormat=cG(o),i[s].ImageType=uG(o);const a=kf(n.MPEntry.value,s*yu+4,Ge.getTypeSize("LONG"),r);i[s].ImageSize={value:a,description:""+a};const c=dG(s,n.MPEntry,r,e);i[s].ImageOffset={value:c,description:""+c};const u=kf(n.MPEntry.value,s*yu+12,Ge.getTypeSize("SHORT"),r);i[s].DependentImage1EntryNumber={value:u,description:""+u};const d=kf(n.MPEntry.value,s*yu+14,Ge.getTypeSize("SHORT"),r);i[s].DependentImage2EntryNumber={value:d,description:""+d},i[s].image=t.buffer.slice(c,c+a),pA(i[s],"base64",function(){return gA(this.image)})}return n.Images=i,n}function kf(t,e,n,r){if(r===Js.LITTLE_ENDIAN){let s=0;for(let o=0;o<n;o++)s+=t[e+o]<<8*o;return s}let i=0;for(let s=0;s<n;s++)i+=t[e+s]<<8*(n-1-s);return i}function lG(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function cG(t){const e=t>>24&7;return{value:e,description:e===0?"JPEG":"Unknown"}}function uG(t){const e=t&16777215;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function dG(t,e,n,r){return fG(t)?0:kf(e.value,t*yu+8,Ge.getTypeSize("LONG"),n)+r}function fG(t){return t===0}const hG={read:pG};function pG(t,e){const n=gG(t,e),r=bG(t,e,n);return{"Bits Per Sample":mG(t,e,n),"Image Height":vG(t,e,n),"Image Width":_G(t,e,n),"Color Components":r,Subsampling:r&&yG(t,e,r.value,n)}}function gG(t,e){return Ge.getShortAt(t,e)}function mG(t,e,n){if(3>n)return;const s=Ge.getByteAt(t,e+2);return{value:s,description:""+s}}function vG(t,e,n){if(5>n)return;const s=Ge.getShortAt(t,e+3);return{value:s,description:`${s}px`}}function _G(t,e,n){if(7>n)return;const s=Ge.getShortAt(t,e+5);return{value:s,description:`${s}px`}}function bG(t,e,n){if(8>n)return;const s=Ge.getByteAt(t,e+7);return{value:s,description:""+s}}function yG(t,e,n,r){if(8+3*n>r)return;const o=[];for(let a=0;a<n;a++){const c=e+8+a*3;o.push([Ge.getByteAt(t,c),Ge.getByteAt(t,c+1),Ge.getByteAt(t,c+2)])}return{value:o,description:o.length>1?wG(o)+xG(o):""}}function wG(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(n=>e[n[0]]).join("")}function xG(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return t.length===0||t[0][1]===void 0||e[t[0][1]]===void 0?"":e[t[0][1]]}const kG={read:SG};function SG(t,e){const n=EG(t,e),r=OG(t,e,n),i=NG(t,e,n),s={"JFIF Version":TG(t,e,n),"Resolution Unit":CG(t,e,n),XResolution:IG(t,e,n),YResolution:PG(t,e,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(r!==void 0&&i!==void 0){const o=LG(t,e,3*r.value*i.value,n);o&&(s["JFIF Thumbnail"]=o)}for(const o in s)s[o]===void 0&&delete s[o];return s}function EG(t,e){return Ge.getShortAt(t,e)}function TG(t,e,n){if(9>n)return;const s=Ge.getByteAt(t,e+7),o=Ge.getByteAt(t,e+7+1);return{value:s*256+o,description:s+"."+o}}function CG(t,e,n){if(10>n)return;const s=Ge.getByteAt(t,e+9);return{value:s,description:AG(s)}}function AG(t){return t===0?"None":t===1?"inches":t===2?"cm":"Unknown"}function IG(t,e,n){if(12>n)return;const s=Ge.getShortAt(t,e+10);return{value:s,description:""+s}}function PG(t,e,n){if(14>n)return;const s=Ge.getShortAt(t,e+12);return{value:s,description:""+s}}function OG(t,e,n){if(15>n)return;const s=Ge.getByteAt(t,e+14);return{value:s,description:`${s}px`}}function NG(t,e,n){if(16>n)return;const s=Ge.getByteAt(t,e+15);return{value:s,description:`${s}px`}}function LG(t,e,n,r){return n===0||16+n>r?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}const Oa={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:qy},336:{name:"Time Sent",description:Hy},346:{name:"Coded Character Set",description:f2,encoding_name:f2},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>or(t)==="01"?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=or(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=or(t);return e==="01"?"Object Kill":e==="02"?"Object Replace":e==="03"?"Object Append":e==="04"?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:qy},572:{name:"Time Created",description:Hy},574:{name:"Digital Creation Date",description:qy},575:{name:"Digital Creation Time",description:Hy},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=or(t);return e==="a"?"morning":e==="p"?"evening":e==="b"?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=or(t);return e==="P"?"Portrait":e==="L"?"Landscape":e==="S"?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=or(t),n=e.charAt(0),r=e.charAt(1);let i="";return n==="1"?i+="Mono":n==="2"&&(i+="Stereo"),r==="A"?i+=", actuality":r==="C"?i+=", question and answer session":r==="M"?i+=", music, transmitted by itself":r==="Q"?i+=", response to a question":r==="R"?i+=", raw sound":r==="S"?i+=", scener":r==="V"?i+=", voicer":r==="W"&&(i+=", wrap"),i!==""?i:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(or(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(or(t),10);return e+(e===1?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=or(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>t.length===2?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(t.length===2){const e=(t[0]<<8)+t[1];return e===0?"No ObjectData":e===1?"IPTC-NAA Digital Newsphoto Parameter Record":e===2?"IPTC7901 Recommended Message Format":e===3?"Tagged Image File Format (Adobe/Aldus Image data)":e===4?"Illustrator (Adobe Graphics data)":e===5?"AppleSingle (Apple Computer Inc)":e===6?"NAA 89-3 (ANPA 1312)":e===7?"MacBinary II":e===8?"IPTC Unstructured Character Oriented File Format (UCOFF)":e===9?"United Press International ANPA 1312 variant":e===10?"United Press International Down-Load Message":e===11?"JPEG File Interchange (JFIF)":e===12?"Photo-CD Image-Pac (Eastman Kodak)":e===13?"Microsoft Bit Mapped Graphics File [*.BMP]":e===14?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":e===15?"Audio plus Moving Video [*.AVI] (Microsoft)":e===16?"PC DOS/Windows Executable Files [*.COM][*.EXE]":e===17?"Compressed Binary File [*.ZIP] (PKWare Inc)":e===18?"Audio Interchange File Format AIFF (Apple Computer Inc)":e===19?"RIFF Wave (Microsoft Corporation)":e===20?"Freehand (Macromedia/Aldus)":e===21?'Hypertext Markup Language "HTML" (The Internet Society)':e===22?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":e===23?"MPEG 2 Audio Layer 3, ISO/IEC":e===24?"Portable Document File (*.PDF) Adobe":e===25?"News Industry Text Format (NITF)":e===26?"Tape Archive (*.TAR)":e===27?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":e===28?"Ritzaus Bureau NITF version (RBNITF DTD)":e===29?"Corel Draw [*.CDR]":`Unknown format ${e}`}return or(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=or(t);if(e["ObjectData Preview File Format"]){const i=or(e["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function qy(t){const e=or(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function Hy(t){const e=or(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),e.length===11&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function f2(t){const e=or(t);return e==="\x1B%G"?"UTF-8":e==="\x1B%5"?"Windows-1252":e==="\x1B%/G"?"UTF-8 Level 1":e==="\x1B%/H"?"UTF-8 Level 2":e==="\x1B%/I"?"UTF-8 Level 3":e==="\x1B/A"?"ISO-8859-1":e==="\x1B/B"?"ISO-8859-2":e==="\x1B/C"?"ISO-8859-3":e==="\x1B/D"?"ISO-8859-4":e==="\x1B/@"?"ISO-8859-5":e==="\x1B/G"?"ISO-8859-6":e==="\x1B/F"?"ISO-8859-7":e==="\x1B/H"?"ISO-8859-8":"Unknown"}const $G={get:RG};function RG(){if(typeof TextDecoder<"u")return TextDecoder}const h2={decode:FG,TAG_HEADER_SIZE:5};function FG(t,e){const n=$G.get();if(typeof n<"u"&&t!==void 0)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const r=e.map(i=>String.fromCharCode(i)).join("");return DG(r)}function DG(t){try{return decodeURIComponent(escape(t))}catch{return t}}const MG=943868237,Sf=4,_g=2,zG=1,UG=2,p2=4,BG=Sf+_g+UG+p2,jG=1028,g2=5,Gy={read:qG};function qG(t,e,n){try{if(Array.isArray(t))return m2(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:r,dataOffset:i}=HG(t,e);return m2(t,r,i,n)}catch{return{}}}function HG(t,e){for(;e+BG<=t.byteLength;){const n=GG(t,e);if(WG(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+KG(n)}throw new Error("No IPTC NAA resource block.")}function GG(t,e){if(t.getUint32(e,!1)!==MG)throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+Sf+_g),r=(n%2===0?n+1:n)+zG;return{headerSize:Sf+_g+r+p2,type:t.getUint16(e+Sf),size:t.getUint32(e+Sf+_g+r)}}function WG(t){return t.type===jG}function KG(t){return t.size%2!==0?1:0}function m2(t,e,n,r){const i={};let s;const o=n+e.size;for(;n<o&&n<t.byteLength;){const{tag:a,tagSize:c}=VG(t,n,i,s,r);if(a===null)break;a&&("encoding"in a&&(s=a.encoding),i[a.name]===void 0||a.repeatable===void 0?i[a.name]={id:a.id,value:a.value,description:a.description}:(i[a.name]instanceof Array||(i[a.name]=[{id:i[a.name].id,value:i[a.name].value,description:i[a.name].description}]),i[a.name].push({id:a.id,value:a.value,description:a.description}))),n+=g2+c}return i}function VG(t,e,n,r,i){if(YG(t,e))return{tag:null,tagSize:0};const a=t.getUint16(e+1),c=t.getUint16(e+3);if(!i&&!Oa.iptc[a])return{tag:void 0,tagSize:c};const u=ZG(t,e+g2,c),d={id:a,name:JG(Oa.iptc[a],a,u),value:u,description:e9(Oa.iptc[a],u,n,r)};return r9(a)&&(d.repeatable=!0),i9(a)&&(d.encoding=Oa.iptc[a].encoding_name(u)),{tag:d,tagSize:c}}function YG(t,e){return t.getUint8(e)!==28}function ZG(t,e,n){const r=[];for(let i=0;i<n;i++)r.push(t.getUint8(e+i));return r}function JG(t,e,n){return t?XG(t)?t:QG(t)?t.name(n):t.name:`undefined-${e}`}function XG(t){return typeof t=="string"}function QG(t){return typeof t.name=="function"}function e9(t,e,n,r){if(n9(t))try{return t.description(e,n)}catch{}return t9(t,e)?h2.decode(r,e):e}function t9(t,e){return t&&e instanceof Array}function n9(t){return t&&t.description!==void 0}function r9(t){return Oa.iptc[t]&&Oa.iptc[t].repeatable}function i9(t){return Oa.iptc[t]&&Oa.iptc[t].encoding_name!==void 0}const bg={"tiff:Orientation"(t){return t==="1"?"Horizontal (normal)":t==="2"?"Mirror horizontal":t==="3"?"Rotate 180":t==="4"?"Mirror vertical":t==="5"?"Mirror horizontal and rotate 270 CW":t==="6"?"Rotate 90 CW":t==="7"?"Mirror horizontal and rotate 90 CW":t==="8"?"Rotate 270 CW":t},"tiff:ResolutionUnit":t=>Et.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>wu(Et.XResolution,t),"tiff:YResolution":t=>wu(Et.YResolution,t),"exif:ApertureValue":t=>wu(Et.ApertureValue,t),"exif:GPSLatitude":_2,"exif:GPSLongitude":_2,"exif:FNumber":t=>wu(Et.FNumber,t),"exif:FocalLength":t=>wu(Et.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>Et.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>Et.ColorSpace(s9(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const n=e.split(", ").map(r=>r.charCodeAt(0));return Et.ComponentsConfiguration(n)}return e},"exif:Contrast":t=>Et.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>Et.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>Et.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>Et.ExposureProgram(parseInt(t,10)),"exif:ExposureTime"(t){return v2(t)?Et.ExposureTime(t.split("/").map(e=>parseInt(e,10))):t},"exif:MeteringMode":t=>Et.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>Et.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>Et.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>Et.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>wu(Et.ShutterSpeedValue,t),"exif:WhiteBalance":t=>Et.WhiteBalance(parseInt(t,10))};function wu(t,e){return v2(e)?t(e.split("/")):e}function s9(t){return t.substring(0,2)==="0x"?parseInt(t.substring(2),16):parseInt(t,10)}function v2(t){return/^-?\d+\/-?\d+$/.test(t)}function _2(t){const[e,n]=t.split(",");if(e!==void 0&&n!==void 0){const r=parseFloat(e),i=parseFloat(n),s=n.charAt(n.length-1);if(!Number.isNaN(r)&&!Number.isNaN(i))return""+(r+i/60)+s}return t}const o9={get:a9};function a9(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:e,onErrorStopParsing:n}=__non_webpack_require__("@xmldom/xmldom");return new e({onError:n})}catch{return}}function l9(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}function c9(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],r=u9(t),s=d9(t).filter(a=>r.indexOf(a)===-1);if(s.length===0)return t;const o=h9(s);return p9(t,n,o)}function u9(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let r;for(;(r=n.exec(t))!==null;)e.indexOf(r[1])===-1&&e.push(r[1]);return e}function d9(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let r;for(;(r=n.exec(t))!==null;){const i=r[1];i==="xmlns"||i==="xml"||e.indexOf(i)===-1&&e.push(i)}return e}const f9={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function h9(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=f9[r]||"http://fallback.namespace/"+r;e.push(" xmlns:"+r+'="'+i+'"')}return e.join("")}function p9(t,e,n){const r=new RegExp("<"+e+"([^>]*)>");return t.replace(r,"<"+e+"$1"+n+">")}const b2={read:m9};class g9 extends Error{constructor(e){super(e),this.name="ParseError"}}function m9(t,e,n){const r={};if(typeof t=="string")return yg(r,t,n),r;const[i,s]=v9(t,e),o=yg(r,i,n);if(s){const a=yg(r,s,n);!o&&!a&&(delete r._raw,yg(r,Wy(t,e),n))}return r}function v9(t,e){if(e.length===0)return[];const n=[Wy(t,e.slice(0,1))];return e.length>1&&n.push(Wy(t,e.slice(1))),n}function Wy(t,e){const n=e.reduce((s,o)=>s+o.length,0),r=new Uint8Array(n);let i=0;for(let s=0;s<e.length;s++){const o=e[s],a=t.buffer.slice(o.dataOffset,o.dataOffset+o.length);r.set(new Uint8Array(a),i),i+=o.length}return new DataView(r.buffer)}function yg(t,e,n){try{const{doc:r,raw:i}=_9(e,n);t._raw=(t._raw||"")+i;const s=w2(r);return Lt(t,k2(x2(s,!0))),!0}catch{return!1}}function _9(t,e){const n=o9.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const r=typeof t=="string"?t:At(t,0,t.byteLength);return{doc:y2(n,b9(r)),raw:r}}function b9(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function y2(t,e,n=!1){try{const r=t.parseFromString(e,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new g9(i[0].textContent);return r}catch(r){if(r.name==="ParseError"&&l9(r)&&!n)return y2(t,c9(e),!0);throw r}}function w2(t){for(let e=0;e<t.childNodes.length;e++){if(t.childNodes[e].tagName==="x:xmpmeta")return w2(t.childNodes[e]);if(t.childNodes[e].tagName==="rdf:RDF")return t.childNodes[e]}throw new Error}function x2(t,e=!1){const n=y9(t);return w9(n)?e?{}:x9(n[0]):k9(n)}function y9(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}function w9(t){return t.length===1&&t[0].nodeName==="#text"}function x9(t){return t.nodeValue}function k9(t){const e={};return t.forEach(n=>{if(S9(n)){const r=E9(n);e[n.nodeName]!==void 0?(Array.isArray(e[n.nodeName])||(e[n.nodeName]=[e[n.nodeName]]),e[n.nodeName].push(r)):e[n.nodeName]=r}}),e}function S9(t){return t.nodeName&&t.nodeName!=="#text"}function E9(t){return{attributes:T9(t),value:x2(t)}}function T9(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function k2(t){const e={};if(typeof t=="string")return t;for(const n in t){let r=t[n];Array.isArray(r)||(r=[r]),r.forEach(i=>{Lt(e,Ky(i.attributes)),typeof i.value=="object"&&Lt(e,S2(i.value))})}return e}function Ky(t){const e={};for(const n in t)try{C9(n)&&(e[xg(n)]={value:t[n],attributes:{},description:jo(t[n],n)})}catch{}return e}function C9(t){return t!=="rdf:parseType"&&!wg(t)}function wg(t){return t.split(":")[0]==="xmlns"}function xg(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function jo(t,e=void 0){if(Array.isArray(t)){const n=A9(t);return e&&typeof bg[e]=="function"?bg[e](t,n):n}if(typeof t=="object")return I9(t);try{return e&&typeof bg[e]=="function"?bg[e](t):decodeURIComponent(escape(t))}catch{return t}}function A9(t){return t.map(e=>e.value!==void 0?jo(e.value):jo(e)).join(", ")}function I9(t){const e=[];for(const n in t)e.push(`${P9(n)}: ${jo(t[n].value)}`);return e.join("; ")}function P9(t){return t==="CiAdrCity"?"CreatorCity":t==="CiAdrCtry"?"CreatorCountry":t==="CiAdrExtadr"?"CreatorAddress":t==="CiAdrPcode"?"CreatorPostalCode":t==="CiAdrRegion"?"CreatorRegion":t==="CiEmailWork"?"CreatorWorkEmail":t==="CiTelWork"?"CreatorWorkPhone":t==="CiUrlWork"?"CreatorWorkUrl":t}function S2(t){const e={};for(const n in t)try{wg(n)||(e[xg(n)]=O9(t[n],n))}catch{}return e}function O9(t,e){return L9(t)?$9(t,e):N9(t)?{value:"",attributes:{},description:""}:E2(t)?T2(t,e):C2(t)?A2(t,e):I2(t)?P2(t,e):D9(t)?M9(t,e):Vy(t,e)}function N9(t){return t.attributes["rdf:parseType"]==="Resource"&&typeof t.value=="string"&&t.value.trim()===""}function L9(t){return Array.isArray(t)}function $9(t,e){return Vy(t[t.length-1],e)}function E2(t){return t.attributes["rdf:parseType"]==="Resource"&&t.value["rdf:value"]!==void 0||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]!==void 0}function T2(t,e){const n=Ef(t);t.value["rdf:Description"]!==void 0&&(t=t.value["rdf:Description"]),Lt(n,Ef(t),R9(t));const r=F9(t);return{value:r,attributes:n,description:jo(r,e)}}function Ef(t){const e={};for(const n in t.attributes)n!=="rdf:parseType"&&n!=="rdf:resource"&&!wg(n)&&(e[xg(n)]=t.attributes[n]);return e}function R9(t){const e={};for(const n in t.value)n!=="rdf:value"&&!wg(n)&&(e[xg(n)]=t.value[n].value);return e}function F9(t){return N2(t.value["rdf:value"])||t.value["rdf:value"].value}function C2(t){return t.attributes["rdf:parseType"]==="Resource"||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]===void 0}function A2(t,e){const n={value:{},attributes:{}};return t.value["rdf:Description"]!==void 0&&(Lt(n.value,Ky(t.value["rdf:Description"].attributes)),Lt(n.attributes,Ef(t)),t=t.value["rdf:Description"]),Lt(n.value,S2(t.value)),n.description=jo(n.value,e),n}function I2(t){return Object.keys(t.value).length===0&&t.attributes["xml:lang"]===void 0&&t.attributes["rdf:resource"]===void 0}function P2(t,e){const n=Ky(t.attributes);return{value:n,attributes:{},description:jo(n,e)}}function D9(t){return O2(t.value)!==void 0}function O2(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function M9(t,e){let n=O2(t.value).value["rdf:li"];const r=Ef(t),i=[];return n===void 0?n=[]:Array.isArray(n)||(n=[n]),n.forEach(s=>{i.push(z9(s))}),{value:i,attributes:r,description:jo(i,e)}}function z9(t){return E2(t)?T2(t):C2(t)?A2(t).value:I2(t)?P2(t).value:Vy(t)}function Vy(t,e){const n=N2(t)||k2(t.value);return{value:n,attributes:Ef(t),description:jo(n,e)}}function N2(t){return t.attributes&&t.attributes["rdf:resource"]}const qo={CLOSED_SUBPATH_LENGTH:0,CLOSED_SUBPATH_BEZIER_LINKED:1,CLOSED_SUBPATH_BEZIER_UNLINKED:2,OPEN_SUBPATH_LENGTH:3,OPEN_SUBPATH_BEZIER_LINKED:4,OPEN_SUBPATH_BEZIER_UNLINKED:5,FILL_RULE:6,CLIPBOARD:7,INITIAL_FILL_RULE:8},L2=24,Yy={2e3:{name:"PathInformation",description:U9},2999:{name:"ClippingPathName",description(t){const[,e]=hA(t,0);return e}}};function U9(t){const n={},r=[];for(let i=0;i<t.byteLength;i+=2+L2){const s=Ge.getShortAt(t,i);Zy[s]&&(n[s]||(n[s]=Zy[s].description),r.push({type:s,path:Zy[s].path(t,i+2)}))}return JSON.stringify({types:n,paths:r})}const Zy={[qo.CLOSED_SUBPATH_LENGTH]:{description:"Closed subpath length",path:(t,e)=>[Ge.getShortAt(t,e)]},[qo.CLOSED_SUBPATH_BEZIER_LINKED]:{description:"Closed subpath Bezier knot, linked",path:kg},[qo.CLOSED_SUBPATH_BEZIER_UNLINKED]:{description:"Closed subpath Bezier knot, unlinked",path:kg},[qo.OPEN_SUBPATH_LENGTH]:{description:"Open subpath length",path:(t,e)=>[Ge.getShortAt(t,e)]},[qo.OPEN_SUBPATH_BEZIER_LINKED]:{description:"Open subpath Bezier knot, linked",path:kg},[qo.OPEN_SUBPATH_BEZIER_UNLINKED]:{description:"Open subpath Bezier knot, unlinked",path:kg},[qo.FILL_RULE]:{description:"Path fill rule",path:()=>[]},[qo.INITIAL_FILL_RULE]:{description:"Initial fill rule",path:(t,e)=>[Ge.getShortAt(t,e)]},[qo.CLIPBOARD]:{description:"Clipboard",path:j9}};function kg(t,e){const r=[];for(let i=0;i<L2;i+=8)r.push(B9(t,e+i));return r}function B9(t,e){const n=El(t,e,8);return[El(t,e+4,8),n]}function j9(t,e){return[[El(t,e,8),El(t,e+4,8),El(t,e+8,8),El(t,e+12,8)],El(t,e+16,8)]}function El(t,e,n){const r=Ge.getLongAt(t,e),i=r>>>31?-1:1,s=(r&2130706432)>>>32-n,o=r&parseInt(mA("1",32-n),2);return i*B5(s.toString(2)+"."+U5(o.toString(2),32-n,"0"),2)}const q9={read:W9},$2="8BIM",H9=2,G9=4,R2=$2.length;function W9(t,e){const n=fA(new Uint8Array(t).buffer),r={};let i=0;for(;i<t.length;){const s=At(n,i,R2);i+=R2;const o=Ge.getShortAt(n,i);i+=H9;const{tagName:a,tagNameSize:c}=K9(n,i);i+=c;const u=Ge.getLongAt(n,i);if(i+=G9,s===$2){const d=fA(n.buffer,i,u),f={id:o,value:At(d,0,u)};if(Yy[o]){try{f.description=Yy[o].description(d)}catch{f.description="<no description formatter>"}r[a||Yy[o].name]=f}else e&&(r[`undefined-${o}`]=f)}i+=u+u%2}return r}function K9(t,e){const[n,r]=hA(t,e);return{tagName:r,tagNameSize:1+n+(n%2===0?1:0)}}const F2={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},D2={4:{name:"Preferred CMM type",value:(t,e)=>At(t,e,4),description:t=>t!==null?Jy(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>At(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>At(t,e,4)},20:{name:"Connection Space",value:(t,e)=>At(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>V9(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>Y9(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>At(t,e,4),description:t=>Jy(t)},48:{name:"Device Manufacturer",value:(t,e)=>At(t,e,4),description:t=>Jy(t)},52:{name:"Device Model Number",value:(t,e)=>At(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>At(t,e,4)}};function V9(t,e){const n=t.getUint16(e),r=t.getUint16(e+2)-1,i=t.getUint16(e+4),s=t.getUint16(e+6),o=t.getUint16(e+8),a=t.getUint16(e+10);return new Date(Date.UTC(n,r,i,s,o,a))}function Y9(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Jy(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const M2={read:i7},Z9=84,J9=128,X9="acsp",Q9="desc",e7="mluc",t7="text",n7="sig ",r7=12;function i7(t,e,n){return n&&e[0].compressionMethod!==ug?s7(t,e):a7(t,e)}function s7(t,e){if(!o7(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return _A(n,e[0].compressionMethod,"utf-8","dataview").then(z2).catch(()=>({}))}function o7(t){return t===vA}function a7(t,e){try{const n=e.reduce((o,a)=>o+a.length,0),r=new Uint8Array(n);let i=0;const s=l7(t);for(let o=1;o<=e.length;o++){const a=e.find(d=>d.chunkNumber===o);if(!a)throw new Error(`ICC chunk ${o} not found`);const c=s.slice(a.offset,a.offset+a.length),u=new Uint8Array(c);r.set(u,i),i+=u.length}return z2(new DataView(r.buffer))}catch{return{}}}function l7(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}function c7(t){return t.length<J9+4}function u7(t,e){return t.length<e+r7}function z2(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<Z9)throw new Error("ICC profile too short");const r={},i=Object.keys(D2);for(let c=0;c<i.length;c++){const u=i[c],d=D2[u],f=d.value(t,parseInt(u,10));let h=f;d.description&&(h=d.description(f)),r[d.name]={value:f,description:h}}if(Sg(e.slice(36,40))!==X9)throw new Error("ICC profile: missing signature");if(c7(e))return r;const o=t.getUint32(128);let a=132;for(let c=0;c<o;c++){if(u7(e,a))return r;const u=At(t,a,4),d=t.getUint32(a+4),f=t.getUint32(a+8);if(d>e.length)return r;const h=At(t,d,4);if(h===Q9){const p=t.getUint32(d+8);if(p>f)return r;const g=Sg(e.slice(d+12,d+p+11));Tf(r,u,g)}else if(h===e7){const p=t.getUint32(d+8),g=t.getUint32(d+12);let m=d+16;const v=[];for(let y=0;y<p;y++){const b=At(t,m+0,2),w=At(t,m+2,2),x=t.getUint32(m+4),C=t.getUint32(m+8),k=M5(t,d+C,x);v.push({languageCode:b,countryCode:w,text:k}),m+=g}if(p===1)Tf(r,u,v[0].text);else{const y={};for(let b=0;b<v.length;b++)y[`${v[b].languageCode}-${v[b].countryCode}`]=v[b].text;Tf(r,u,y)}}else if(h===t7){const p=Sg(e.slice(d+8,d+f-7));Tf(r,u,p)}else if(h===n7){const p=Sg(e.slice(d+8,d+12));Tf(r,u,p)}a=a+12}return r}function Sg(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Tf(t,e,n){F2[e]?t[F2[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Eg=27,d7={read:f7,SHOT_INFO_AUTO_ROTATE:Eg};function f7(t,e,n,r,i){let s=Pa(t,n2,e,e+n,r,i);return s.ShotInfo&&(s=Lt({},s,h7(s.ShotInfo.value)),delete s.ShotInfo),s}function h7(t){const e={};return t[Eg]!==void 0&&(e.AutoRotate={value:t[Eg],description:p7(t[Eg])}),e}function p7(t){return t===0?"None":t===1?"Rotate 90 CW":t===2?"Rotate 180":t===3?"Rotate 270 CW":"Unknown"}const U2=8,B2=U2+2,j2={K3_III:78420},Tg={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},g7={read:m7,PENTAX_IFD_OFFSET:B2,MODEL_ID:j2,LIK3III:Tg};function m7(t,e,n,r){const i=Js.getByteOrder(t,e+n+U2),s=e+n;let o=Pa(t,Uy,s,s+B2,i,r);return v7(o)&&(o=Lt({},o,_7(t,s+o.LevelInfo.__offset,i)),delete o.LevelInfo),o}function v7(t){return t.PentaxModelID&&t.PentaxModelID.value===j2.K3_III&&t.LevelInfo}function _7(t,e,n){const r={};if(e+7>t.byteLength)return r;const i=t.getInt8(e+Tg.CAMERA_ORIENTATION);r.CameraOrientation={value:i,description:b7(i)};const s=t.getInt16(e+Tg.ROLL_ANGLE,n===Js.LITTLE_ENDIAN);r.RollAngle={value:s,description:y7(s)};const o=t.getInt16(e+Tg.PITCH_ANGLE,n===Js.LITTLE_ENDIAN);return r.PitchAngle={value:o,description:w7(o)},r}function b7(t){return t===0?"Horizontal (normal)":t===1?"Rotate 270 CW":t===2?"Rotate 180":t===3?"Rotate 90 CW":t===4?"Upwards":t===5?"Downwards":"Unknown"}function y7(t){return""+t*-.5}function w7(t){return""+t*-.5}const x7={read:k7};function k7(t,e){return{"Image Width":S7(t,e),"Image Height":E7(t,e),"Bit Depth":T7(t,e),"Color Type":C7(t,e),Compression:A7(t,e),Filter:I7(t,e),Interlace:P7(t,e)}}function S7(t,e){if(e+0+4>t.byteLength)return;const i=Ge.getLongAt(t,e);return{value:i,description:`${i}px`}}function E7(t,e){if(e+4+4>t.byteLength)return;const i=Ge.getLongAt(t,e+4);return{value:i,description:`${i}px`}}function T7(t,e){if(e+8+1>t.byteLength)return;const i=Ge.getByteAt(t,e+8);return{value:i,description:`${i}`}}function C7(t,e){const i={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"};if(e+9+1>t.byteLength)return;const s=Ge.getByteAt(t,e+9);return{value:s,description:i[s]||"Unknown"}}function A7(t,e){if(e+10+1>t.byteLength)return;const i=Ge.getByteAt(t,e+10);return{value:i,description:i===0?"Deflate/Inflate":"Unknown"}}function I7(t,e){if(e+11+1>t.byteLength)return;const i=Ge.getByteAt(t,e+11);return{value:i,description:i===0?"Adaptive":"Unknown"}}function P7(t,e){const i={0:"Noninterlaced",1:"Adam7 Interlace"};if(e+12+1>t.byteLength)return;const s=Ge.getByteAt(t,e+12);return{value:s,description:i[s]||"Unknown"}}const O7={read:F7},Xy="STATE_KEYWORD",Qy="STATE_COMPRESSION",ew="STATE_LANG",N7="STATE_TRANSLATED_KEYWORD",tw="STATE_TEXT",L7=1,$7=1,R7=6;function F7(t,e,n,r){const i={},s=[];for(let o=0;o<e.length;o++){const{offset:a,length:c,type:u}=e[o],d=D7(t,a,c,u,n);if(d instanceof Promise)s.push(d.then(({name:f,value:h,description:p})=>{try{if(bA.USE_EXIF&&H2(f,h))return{__exif:d2.read(W2(h),R7,r).tags};if(bA.USE_IPTC&&G2(f,h))return{__iptc:Gy.read(W2(h),0,r)};if(f&&!H2(f,h)&&!G2(f,h))return{[f]:{value:h,description:p}}}catch{}return{}}));else{const{name:f,value:h,description:p}=d;f&&(i[f]={value:h,description:p})}}return{readTags:i,readTagsPromise:s.length>0?Promise.all(s):void 0}}function D7(t,e,n,r,i){const s=[],o=[];let a,c=Xy,u=ug;for(let f=0;f<n&&e+f<t.byteLength;f++){if(c===Qy){u=M7({type:r,dataView:t,offset:e+f}),r===Sl&&(f+=L7),c=q2(r,c);continue}else if(c===tw){a=new DataView(t.buffer.slice(e+f,e+n));break}const h=t.getUint8(e+f);h===0?c=q2(r,c):c===Xy?s.push(h):c===ew&&o.push(h)}if(u!==ug&&!i)return{};const d=_A(a,u,z7(r));return d instanceof Promise?d.then(f=>nw(f,r,o,s)).catch(()=>nw("<text using unknown compression>".split(""),r,o,s)):nw(d,r,o,s)}function M7({type:t,dataView:e,offset:n}){if(t===Sl){if(e.getUint8(n)===$7)return e.getUint8(n+1)}else if(t===hg)return e.getUint8(n);return ug}function q2(t,e){return e===Xy&&[Sl,hg].includes(t)?Qy:e===Qy?t===Sl?ew:tw:e===ew?N7:tw}function z7(t){return t===Fy||t===hg?"latin1":"utf-8"}function nw(t,e,n,r){const i=B7(t);return{name:U7(e,n,r),value:i,description:e===Sl?j7(t):i}}function U7(t,e,n){const r=kl(n);if(t===Fy||e.length===0)return r;const i=kl(e);return`${r} (${i})`}function B7(t){return t instanceof DataView?At(t,0,t.byteLength):t}function j7(t){return h2.decode("UTF-8",t)}function H2(t,e){return t.toLowerCase()==="raw profile type exif"&&e.substring(1,5)==="exif"}function G2(t,e){return t.toLowerCase()==="raw profile type iptc"&&e.substring(1,5)==="iptc"}function W2(t){const e=t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/);return q7(e[2].replace(/\n/g,""))}function q7(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}const H7={read:G7};function G7(t,e){const n={};for(let r=0;r<e.length;r++){const i=Ge.getLongAt(t,e[r]+bu),s=At(t,e[r]+Ca,ys);s===MA?(n["Pixels Per Unit X"]=W7(t,e[r],i),n["Pixels Per Unit Y"]=K7(t,e[r],i),n["Pixel Units"]=V7(t,e[r],i)):s===zA&&(n["Modify Date"]=Y7(t,e[r],i))}return n}function W7(t,e,n){if(!Cg(t,e,n,0,4))return;const s=Ge.getLongAt(t,e+Rr+0);return{value:s,description:""+s}}function K7(t,e,n){if(!Cg(t,e,n,4,4))return;const s=Ge.getLongAt(t,e+Rr+4);return{value:s,description:""+s}}function V7(t,e,n){if(!Cg(t,e,n,8,1))return;const s=Ge.getByteAt(t,e+Rr+8);return{value:s,description:s===1?"meters":"Unknown"}}function Y7(t,e,n){if(!Cg(t,e,n,0,7))return;const i=Ge.getShortAt(t,e+Rr),s=Ge.getByteAt(t,e+Rr+2),o=Ge.getByteAt(t,e+Rr+3),a=Ge.getByteAt(t,e+Rr+4),c=Ge.getByteAt(t,e+Rr+5),u=Ge.getByteAt(t,e+Rr+6);return{value:[i,s,o,a,c,u],description:`${xu(i,4)}-${xu(s,2)}-${xu(o,2)} ${xu(a,2)}:${xu(c,2)}:${xu(u,2)}`}}function Cg(t,e,n,r,i){return r+i<=n&&e+Rr+r+i<=t.byteLength}function xu(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const Z7={read:Q7},J7=4,X7=7;function Q7(t,e){const n={},r=Ge.getByteAt(t,e);return n.Alpha=eW(r),n.Animation=tW(r),n.ImageWidth=K2(t,e+J7),n.ImageHeight=K2(t,e+X7),n}function eW(t){const e=t&16;return{value:e?1:0,description:e?"Yes":"No"}}function tW(t){const e=t&2;return{value:e?1:0,description:e?"Yes":"No"}}function K2(t,e){const n=Ge.getByteAt(t,e)+256*Ge.getByteAt(t,e+1)+65536*Ge.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const nW={read:rW};function rW(t){return{"GIF Version":iW(t),"Image Width":sW(t),"Image Height":oW(t),"Global Color Map":aW(t),"Bits Per Pixel":cW(t),"Color Resolution Depth":lW(t)}}function iW(t){if(6>t.byteLength)return;const r=At(t,3,3);return{value:r,description:r}}function sW(t){if(8>t.byteLength)return;const r=t.getUint16(6,!0);return{value:r,description:`${r}px`}}function oW(t){if(10>t.byteLength)return;const r=t.getUint16(8,!0);return{value:r,description:`${r}px`}}function aW(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&128)>>>7;return{value:i,description:i===1?"Yes":"No"}}function lW(t){if(11>t.byteLength)return;const i=((t.getUint8(10)&112)>>>4)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}function cW(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&7)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}const uW=[6,7,99],dW={get:fW};function fW(t,e,n){if(hW(e)){e.type="image/jpeg";const r=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(r,r+e.JPEGInterchangeFormatLength.value),pA(e,"base64",function(){return gA(this.image)})}return e}function hW(t){return t&&(t.Compression===void 0||uW.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}const rw={INCHES:2,CENTIMETERS:3,MILLIMETERS:4},iw={INCHES_TO_MM:25.4,CM_TO_MM:10,MM_TO_MM:1},pW={get:gW};function gW(t,e){const n={};let r=!1;const i=Tl(t,"exif","FocalLength",e),s=Tl(t,"exif","FocalPlaneXResolution",e),o=Tl(t,"exif","FocalPlaneYResolution",e),a=Tl(t,"exif","FocalPlaneResolutionUnit",e),c=Tl(t,"file","Image Width",e),u=Tl(t,"file","Image Height",e),d=Tl(t,"exif","FocalLengthIn35mmFilm",e)||mW(s,o,a,c,u,i);d&&(n.FocalLength35efl={value:d,description:Et.FocalLengthIn35mmFilm(d)},r=!0);const f=vW(i,d);f&&(n.ScaleFactorTo35mmEquivalent=f,r=!0);const h=_W(d);if(h&&(n.FieldOfView=h,r=!0),r)return n}function Tl(t,e,n,r){if(r&&t[e]&&t[e][n])return t[e][n].value;if(!r&&t[n])return t[n].value}function mW(t,e,n,r,i,s){if(t&&e&&n&&r&&i&&s)try{let a;switch(n){case rw.INCHES:a=iw.INCHES_TO_MM;break;case rw.CENTIMETERS:a=iw.CM_TO_MM;break;case rw.MILLIMETERS:a=iw.MM_TO_MM;break;default:return}const c=t[0]/t[1]*a,u=e[0]/e[1]*a,d=r/c,f=i/u,h=Math.sqrt(d**2+f**2);return s[0]/s[1]*(43.27/h)}catch{}}function vW(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}function _W(t){if(t)try{const n=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:n,description:n.toFixed(1)+" deg"}}catch{}}function V2(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=new Error().stack}V2.prototype=new Error;const Y2={MetadataMissingError:V2},bW={load:yW,loadView:Z2,errors:Y2};function yW(t,e={}){return wW(t)?(e.async=!0,xW(t,e).then(n=>sw(n,e))):IW(t)?(e.async=!0,PW(t).then(n=>sw(n,e))):sw(t,e)}function wW(t){return typeof t=="string"}function xW(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?kW(t,e):SW(t,e):TW(t)?Promise.resolve(z5(t)):CW(t,e)}function kW(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:`bytes=0-${e-1}`}),fetch(t,n).then(r=>r.arrayBuffer())}function SW(t,{length:e}={}){return new Promise((n,r)=>{const i={};Number.isInteger(e)&&e>=0&&(i.headers={range:`bytes=0-${e-1}`}),EW(t)(t,i,o=>{if(o.statusCode>=200&&o.statusCode<=299){const a=[];o.on("data",c=>a.push(Buffer.from(c))),o.on("error",c=>r(c)),o.on("end",()=>n(Buffer.concat(a)))}else r(`Could not fetch file: ${o.statusCode} ${o.statusMessage}`),o.resume()}).on("error",o=>r(o))})}function EW(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}function TW(t){return/^data:[^;,]*(;base64)?,/.test(t)}function CW(t,{length:e}={}){return new Promise((n,r)=>{const i=AW();i.open(t,(s,o)=>{s?r(s):i.stat(t,(a,c)=>{if(a)r(a);else{const u=Math.min(c.size,e!==void 0?e:c.size),d=Buffer.alloc(u),f={buffer:d,length:u};i.read(o,f,h=>{h?r(h):i.close(o,p=>{p&&console.warn(`Could not close file ${t}:`,p),n(d)})})}})})})}function AW(){try{return __non_webpack_require__("fs")}catch{return}}function IW(t){return typeof File<"u"&&t instanceof File}function PW(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>e(i.target.result),r.onerror=()=>n(r.error),r.readAsArrayBuffer(t)})}function sw(t,e){return OW(t)&&(t=new Uint8Array(t).buffer),Z2(NW(t),e)}function OW(t){try{return Buffer.isBuffer(t)}catch{return!1}}function NW(t){try{return new DataView(t)}catch{return new dA(t)}}function Z2(t,{expanded:e=!1,async:n=!1,includeUnknown:r=!1,domParser:i=void 0}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let s=!1,o={};const a=[],{fileType:c,fileDataOffset:u,jfifDataOffset:d,tiffHeaderOffset:f,iptcDataOffset:h,xmpChunks:p,iccChunks:g,mpfDataOffset:m,pngHeaderOffset:v,pngTextChunks:y,pngChunkOffsets:b,vp8xChunkOffset:w,gifHeaderOffset:x}=OH.parseAppMarkers(t,n);if(LW(u)){s=!0;const E=hG.read(t,u);e?o.file=E:o=Lt({},o,E)}if($W(d)){s=!0;const E=kG.read(t,d);e?o.jfif=E:o=Lt({},o,E)}if(RW(f)){s=!0;const{tags:E,byteOrder:A}=d2.read(t,f,r);if(E.Thumbnail&&(o.Thumbnail=E.Thumbnail,delete E.Thumbnail),e?(o.exif=E,FW(o)):o=Lt({},o,E),E["IPTC-NAA"]&&!J2(h)){const P=Gy.read(E["IPTC-NAA"].value,0,r);e?o.iptc=P:o=Lt({},o,P)}if(E.ApplicationNotes&&!X2(p)){const P=b2.read(kl(E.ApplicationNotes.value),void 0,i);e?o.xmp=P:(delete P._raw,o=Lt({},o,P))}if(E.ImageSourceData&&E.PhotoshopSettings){const P=q9.read(E.PhotoshopSettings.value,r);e?o.photoshop=P:o=Lt({},o,P)}if(E.ICC_Profile&&!Q2(g)){const P=M2.read(E.ICC_Profile.value,[{offset:0,length:E.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?o.icc=P:o=Lt({},o,P)}if(E.MakerNote){if(DW(E)){const P=d7.read(t,f,E.MakerNote.__offset,A,r);e?o.makerNotes=P:o=Lt({},o,P)}else if(MW(E)){const P=g7.read(t,f,E.MakerNote.__offset,r);e?o.makerNotes=P:o=Lt({},o,P)}}E.MakerNote&&delete E.MakerNote.__offset}if(J2(h)){s=!0;const E=Gy.read(t,h,r);e?o.iptc=E:o=Lt({},o,E)}if(X2(p)){s=!0;const E=b2.read(t,p,i);e?o.xmp=E:(delete E._raw,o=Lt({},o,E))}if(Q2(g)){s=!0;const E=M2.read(t,g,n);E instanceof Promise?a.push(E.then(I)):I(E)}if(zW(m)){s=!0;const E=sG.read(t,m,r);e?o.mpf=E:o=Lt({},o,E)}if(UW(v)){s=!0;const E=x7.read(t,v);e?(o.png=o.png?Lt({},o.png,E):E,o.pngFile=E):o=Lt({},o,E)}if(BW(y)){s=!0;const{readTags:E,readTagsPromise:A}=O7.read(t,y,n,r);S(E),A&&a.push(A.then(P=>P.forEach(S)))}if(jW(b)){s=!0;const E=H7.read(t,b);e?o.png=o.png?Lt({},o.png,E):E:o=Lt({},o,E)}if(qW(w)){s=!0;const E=Z7.read(t,w);e?o.riff=o.riff?Lt({},o.riff,E):E:o=Lt({},o,E)}if(HW(x)){s=!0;const E=nW.read(t,x);e?o.gif=o.gif?Lt({},o.gif,E):E:o=Lt({},o,E)}const C=pW.get(o,e);C&&(e?o.composite=C:o=Lt({},o,C));const k=dW.get(t,o.Thumbnail,f);if(k?(s=!0,o.Thumbnail=k):delete o.Thumbnail,c&&(e?(o.file||(o.file={}),o.file.FileType=c):o.FileType=c,s=!0),!s)throw new Y2.MetadataMissingError;if(n)return Promise.all(a).then(()=>o);return o;function I(E){e?o.icc=E:o=Lt({},o,E)}function S(E){if(e){for(const A of["exif","iptc"]){const P=`__${A}`;E[P]&&(o[A]=o[A]?Lt({},o.exif,E[P]):E[P],delete E[P])}o.png=o.png?Lt({},o.png,E):E,o.pngText=o.pngText?Lt({},o.png,E):E}else o=Lt({},o,E.__exif?E.__exif:{},E.__iptc?E.__iptc:{},E),delete o.__exif,delete o.__iptc}}function LW(t){return t!==void 0}function $W(t){return t!==void 0}function RW(t){return t!==void 0}function FW(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=dg(t.exif.GPSLatitude.value),t.exif.GPSLatitudeRef.value.join("")==="S"&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=dg(t.exif.GPSLongitude.value),t.exif.GPSLongitudeRef.value.join("")==="W"&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],t.exif.GPSAltitudeRef.value===1&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}function J2(t){return t!==void 0}function X2(t){return Array.isArray(t)&&t.length>0}function Q2(t){return Array.isArray(t)&&t.length>0}function DW(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&t.Make.value[0]==="Canon"&&t.MakerNote&&t.MakerNote.__offset}function MW(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&kl(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}function zW(t){return t!==void 0}function UW(t){return t!==void 0}function BW(t){return t!==void 0}function jW(t){return t!==void 0}function qW(t){return t!==void 0}function HW(t){return t!==void 0}const Cl=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},GW=/^(?<year>\d{4}):(?<month>\d{2}):(?<date>\d{2}) (?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})$/,WW=(t,e)=>{const n=e==="image",r=n?new Image:document.createElement(e);return new Promise(i=>{const s=()=>{const o=e==="audio"?void 0:{width:n?r.naturalWidth:r.videoWidth,height:n?r.naturalHeight:r.videoHeight},a=n?void 0:r.duration;i({dimensions:o,duration:a})};r.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),r.src=t})},KW=async(t,e)=>{if(!(e==="image")||!t.file)return{createdDate:void 0,coordinates:void 0};const{exif:{DateTimeOriginal:r,DateTime:i}={DateTimeOriginal:void 0,DateTime:void 0},gps:{Latitude:s,Longitude:o}={Latitude:void 0,Longitude:void 0}}=await bW.load(t.file,{expanded:!0}).catch(()=>{})??{},c=(r?.description??i?.description)?.match(GW);let u,d;if(c?.groups){const{year:f,month:h,date:p,hour:g,minute:m,second:v}=c.groups,y=new Date(`${f}-${h}-${p}T${g}:${m}:${v}Z`);Number.isNaN(y.getTime())||(u=y)}return typeof s=="number"&&typeof o=="number"&&Number.isFinite(s)&&Number.isFinite(o)&&(d={latitude:Cl(s,7),longitude:Cl(o,7)}),{createdDate:u,coordinates:d}},VW=async(t,e,n)=>{const{dimensions:r,duration:i}=await WW(e,n),{createdDate:s,coordinates:o}=await KW(t,n);return{dimensions:r,duration:i,createdDate:s,coordinates:o}},ku=Ey("pdfjs-dist"),YW=`${ku}/build/pdf.min.mjs`,ZW=`${ku}/build/pdf.worker.min.mjs`,JW={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${ku}/cmaps/`,iccUrl:`${ku}/iccs/`,standardFontDataUrl:`${ku}/standard_fonts/`,wasmUrl:`${ku}/wasm/`};let Ag;const XW=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:s="scale-down"}={})=>{if(!Ag)try{Ag=await import(YW),Ag.GlobalWorkerOptions.workerSrc=ZW}catch{throw new Error("Failed to load PDF.js library")}const o=URL.createObjectURL(t),a=new OffscreenCanvas(512,512),c=a.getContext("2d");try{const d=await(await Ag.getDocument({...JW,url:o}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=oA(a,{width:f.width,height:f.height},{width:r,height:i,fit:s});await d.render({canvasContext:c,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(o)}catch{throw new Error("Failed to render PDF")}return aA(a,{format:e,quality:n})},eI=["image","video","audio"],QW=[...eI,"document","other"],eK=/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i,Nn=tt([]),Xs=tt([]),Al=Hn([Xs],([t],e)=>{e(t.find(({collectionName:n,internalPath:r})=>n===void 0&&r!==void 0))}),Ri=tt(),Cf=tt([]),Qs=tt(),Na=tt(!1),La=tt(),ws=tt({folder:void 0,files:[]}),ow=tt(),Ig=tt(),Pg=Hn([Ri,Al],([t,e])=>t?.internalPath!==void 0?t:e),tK=Hn([ws],([t],e,n)=>{e({processing:!1,undersizedFiles:[],oversizedFiles:[],transformedFileMap:new WeakMap});const r=t.files,i=new WeakMap,{max_file_size:s,transformations:o}=wf().config;let a=[];(async()=>(r.length&&o?(n(c=>({...c,processing:!0})),a=await Promise.all(r.map(async c=>{const u=await uA(c,o);return u!==c&&i.set(u,c),u}))):a=[...r],n(()=>({processing:!1,undersizedFiles:a.filter(({size:c})=>c<=s),oversizedFiles:a.filter(({size:c})=>c>s),transformedFileMap:i}))))()}),Og=t=>eI.includes(t),aw=t=>{const e=So.getType(t.path);return Og(t.kind)||e==="application/pdf"||!!e&&Id(e)},tI=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else e=So.getType(t)??"";else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(Og(n)&&!r.startsWith("x-"))return n},nK=t=>{const e=So.getType(t.path);return!!e&&Id(e)},Af=t=>So.getType(t)?.match(/^(?<type>image|audio|video)\//)?.groups?.type??(eK.test(t)?"document":"other"),Il=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 re(En)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");i=new Blob([s],{type:So.getType(r)??s.type})}return t.blobURL=URL.createObjectURL(i),i},lw=async t=>(t.blobURL||await Il(t),t.blobURL);let Ng;const cw=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(Ng===void 0){const{databaseName:i}=re(En)?.repository??{};Ng=i?new xo(i,"asset-thumbnails"):null}let r=await Ng?.get(t.sha);if(!r){if(e)return;const i=await Il(t),s={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await XW(i,s):await Ay(i,s),await Ng?.set(t.sha,r)}return URL.createObjectURL(r)},xs=({collectionName:t,fileName:e,keyPath:n})=>re(Xs).find(r=>r.collectionName===t&&r.fileName===e&&r.keyPath===n),nI=(t,{matchSubFolders:e=!1}={})=>{const{filename:n}=xn(t);return n.startsWith("+")?[]:re(Xs).filter(({internalPath:r,entryRelative:i})=>r===void 0?!1:i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test(xn(t).dirname??"")).sort((r,i)=>(i.internalPath??"").localeCompare(r.internalPath??"")??0)},uw=t=>nI(t.path,{matchSubFolders:!0}).map(({collectionName:e})=>e?qr(e):void 0).filter(e=>!!e),rI=({path:t,entry:e,_i18n:n})=>{const{locales:r}=e,{defaultLocale:i}=n,s=i in r?i:Object.keys(r)[0],{path:o,content:a}=r[s];if(!o||!a)return;const{entryFolder:c}=o.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},u=Xb(`${c}/${t}`);return re(Nn).find(d=>d.path===u)},rK=({path:t,entry:e})=>e?Mo(e).map(r=>{const i=Ta(r,e);return i.length?i.map(s=>rI({path:t,entry:e,_i18n:s._i18n})):rI({path:t,entry:e,_i18n:r._i18n})}).flat(1).filter(Boolean)[0]??re(Nn).find(r=>r.path===t):void 0,iK=({path:t,entry:e,collectionName:n,fileName:r})=>{const i=re(Nn).find(u=>u.path===Dn(t));if(i)return i;const{dirname:s="",basename:o}=xn(t);let a;return[xs({collectionName:n,fileName:r}),xs({collectionName:n}),re(Al),re(Xs).findLast(u=>s.match(`^${(u.publicPath??"").replace(/{{.+?}}/g,".+?")}\\b`))].filter(u=>!!u).find(u=>{let{internalPath:d}=u;if(d!==void 0&&/{{.+?}}/.test(d)){const{collectionName:p}=u,g=p?qr(p):e?Mo(e)?.[0]:void 0;if(!(e&&g))return!1;const{content:m,path:v}=e.locales[g._i18n.defaultLocale];d=Ys(d,{type:"media_folder",collection:g,content:ko(m),currentSlug:e.slug,entryFilePath:v,isIndexFile:to(g,e)})}const f=hf([d,o]),h=re(Nn).find(p=>p.path===f);return h&&(a=h),!!h}),a},dw=({value:t,entry:e,collectionName:n,fileName:r})=>{const i=b6(t);return/^[/@]/.test(i)?iK({path:i,entry:e,collectionName:n,fileName:r}):rK({path:i,entry:e})},If=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:s,hasTemplateTags:o}=t.folder.collectionName===void 0?t.folder:re(Xs).find(({collectionName:d})=>uw(t).some(f=>f.name===d))??re(Al);if(s)return e&&r&&xn(t.path).dirname===xn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:a="",output:{encode_file_path:c=!1}={}}=re(It);let u=o?t.path.replace(iC(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:gn(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(c&&(u=sC(u)),!(!u.startsWith("/")&&!n))return e?u:`${a}${u}`},Su=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const s=dw({value:t,entry:e,collectionName:n,fileName:r});if(s)return(i?await cw(s):await lw(s))??If(s)},Lg={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},$g=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=re(En)?.repository??{},i=await lw(t),s=If(t,{allowSpecial:!0,pathOnly:!0})??i;let o={};return["image","video","audio"].includes(e)&&i&&(o=await VW(t,i,e)),{...o,publicURL:If(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:s?await pw(s):[]}},sK=t=>re(Nn).filter(e=>ln(e.folder,t)),fw=t=>re(Nn).filter(e=>xn(e.path).dirname===t);Ri.subscribe(()=>{Qs.set(void 0)});const hw=t=>!!t&&!t.entryRelative&&!t.hasTemplateTags,oK=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,Eu=t=>{if(t instanceof RegExp)return t;if(typeof t=="string"){const{pattern:e,flags:n}=t.match(oK)?.groups??{};if(e)try{return new RegExp(e,n)}catch{}}},aK=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,Tu=tt([]),eo=t=>{const e=qr(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:r}}=e,i=n?.field,s=Eu(n?.pattern),o=n?.value===void 0?[]:Array.isArray(n.value)?n.value:[n.value];return re(ni).filter(a=>{if(!Mo(a).some(({name:u})=>u===t))return!1;if(!i)return!0;const c=ff({entry:a,locale:r,collectionName:t,key:i})??null;return s?s.test(c):o.includes(c)})},Rg=t=>{if(!t)return!1;const{_type:e,create:n=!1,limit:r=1/0}=t;return e!=="entry"?!0:n&&eo(t.name).length<r},pw=async(t,{entries:e=re(ni),newURL:n=""}={})=>{const r=re(It)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,s=i.startsWith("blob:"),o=await Promise.all(e.map(async a=>{const{locales:c}=a,u=Mo(a);return(await Promise.all(Object.values(c).map(async({content:f})=>(await Promise.all(Object.entries(f).map(async([p,g])=>typeof g!="string"||!g?!1:(await Promise.all(u.map(async v=>{const y=v.name,b={collectionName:y,valueMap:f,keyPath:p,isIndexFile:to(v,a)},w=async C=>{const k=C?.name,I=Sn({...b,fileName:k});if(!I)return!1;const S={entry:a,collectionName:y,fileName:k},{widget:E="string"}=I;if(["image","file"].includes(E)){const A=s?await Su({...S,value:g})===i:g===i;return A&&n&&(f[p]=n),A}if(E==="markdown"){const A=[...g.matchAll(aK)];if(A.length)return(await Promise.all(A.map(async([,P])=>{const L=(s?await Su({...S,value:P}):P)===i;return L&&n&&(f[p]=f[p].replace(P,n)),L}))).some(Boolean)}return!1},x=Ta(v,a);return x.length?(await Promise.all(x.map(w))).includes(!0):w()}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((a,c)=>o[c])},lK=()=>{try{return re(ue)("index_file")}catch{return"Index File"}},yi=t=>{const{folder:e,index_file:n}=t;if(!(typeof e=="string")||!n)return;const i=n===!0?{}:n;return{name:i.name??"_index",label:i.label??lK(),icon:i.icon??"home",fields:i.fields,editor:i.editor}},to=(t,e)=>{const n=yi(t);return n?e.slug===n.name:!1},cK=t=>{const e=yi(t);return e?!eo(t.name).some(({slug:n})=>n===e.name):!1},Fg={},iI=({extension:t,format:e})=>{const n=e?Fg[e]?.extension:void 0;return n||t||(e==="yaml"||e==="yml"?"yml":e==="toml"?"toml":e==="json"?"json":"md")},uK=({extension:t,format:e})=>e||(t==="yaml"||t==="yml"?"yaml":t==="toml"?"toml":t==="json"?"json":["md","mkd","mkdn","mdwn","mdown","markdown"].includes(t)?"frontmatter":"yaml-frontmatter"),dK=({extension:t,format:e,basePath:n,subPath:r,indexFileName:i,_i18n:s})=>{const{i18nEnabled:o,structure:a,allLocales:c,defaultLocale:u,omitDefaultLocaleFromFileName:d}=s,f=o&&a==="multiple_files",h=o&&a==="multiple_folders",p=o&&a==="multiple_folders_i18n_root",g=r?`(?<subPath>${r.replace(/\//g,"\\/").replace(/{{.+?}}/g,"[^/]+?")}${i?`|${i}`:""})`:"(?<subPath>[^/]+?)",m=`(?<locale>${c.join("|")})`,v=["^",p?`${m}\\/`:"",n?`${gn(n)}\\/`:"",h?`${m}\\/`:"",g,f?d?`(?:\\.(?<locale>${c.filter(y=>y!==u).join("|")}))?`:`\\.${m}`:"","\\.",iI({format:e,extension:t}),"$"].join("");return new RegExp(v)},sI=({format:t,delimiter:e})=>{if(typeof e=="string"&&e.trim())return[e,e];if(Array.isArray(e)&&e.length===2)return e;if(t==="json-frontmatter")return["{","}"];if(t==="toml-frontmatter")return["+++","+++"];if(t==="yaml-frontmatter")return["---","---"]};let oI=!1;const aI=({rawCollection:t,file:e,_i18n:n})=>{const{folder:r,path:i,extension:s,format:o,frontmatter_delimiter:a,yaml_quote:c}=t,u=typeof r=="string",d=e?.file?Dn(e.file):void 0,f=d?xn(d).extension:s,h=e?.format??o,p=iI({format:h,extension:f}),g=uK({format:h,extension:p}),m=e?.frontmatter_delimiter??a,v=u?Dn(r):void 0,y=u?yi(t)?.name:void 0;return c!==void 0&&!oI&&(oI=!0,console.warn("The yaml_quote collection option is deprecated and will be removed in Sveltia CMS 1.0. Use the global output.yaml.quote option instead. https://github.com/sveltia/sveltia-cms#controlling-data-output")),{extension:p,format:g,basePath:v,subPath:u?i:void 0,fullPathRegEx:v!==void 0?dK({extension:p,format:g,basePath:v,subPath:i,indexFileName:y,_i18n:n}):void 0,fullPath:d?n.omitDefaultLocaleFromFileName?d.replace(".{{locale}}",""):d.replace("{{locale}}",n.defaultLocale):void 0,fmDelimiters:sI({format:g,delimiter:m}),yamlQuote:!!c}},fK=["rich_text","raw"],hK={rich_text:"rich-text",raw:"plain-text"},pK=["bold","italic","code","link","heading-one","heading-two","heading-three","heading-four","heading-five","heading-six","bulleted-list","numbered-list","quote"],gK={bold:"bold",italic:"italic",code:"code",link:"link","heading-one":"heading-1","heading-two":"heading-2","heading-three":"heading-3","heading-four":"heading-4","heading-five":"heading-5","heading-six":"heading-6","bulleted-list":"bulleted-list","numbered-list":"numbered-list",quote:"blockquote","code-block":"code-block"},mK=["code-block","image"],gw={},vK="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(vK);const _K=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",dismiss:"Dismiss",calendar:{year:"Year",previous_decade:"Previous Decade",next_decade:"Next Decade",month:"Month",previous_month:"Previous Month",next_month:"Next Month",today:"Today"},split_button:{x_options:"{name} Options",more_options:"More Options"},combobox:{select_an_option:"Select an option…",filter_options:"Filter Options",no_matching_options:"No matching options found"},number_input:{decrease:"Decrease",increase:"Increase"},password_input:{show_password:"Show Password",hide_password:"Hide Password"},text_editor:{text_editor:"Text Editor",code_editor:"Code Editor",text_style_options:"Text Style Options",show_text_style_options:"Show Text Style Options",paragraph:"Paragraph",heading_1:"Heading 1",heading_2:"Heading 2",heading_3:"Heading 3",heading_4:"Heading 4",heading_5:"Heading 5",heading_6:"Heading 6",bulleted_list:"Bulleted List",numbered_list:"Numbered List",blockquote:"Block Quote",code_block:"Code Block",bold:"Bold",italic:"Italic",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",edit_in_markdown:"Edit in Markdown",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead.",language:"Language",plain_text:"Plain Text"}}},Symbol.toStringTag,{value:"Module"})),bK=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",dismiss:"閉じる",calendar:{year:"年",previous_decade:"前の 10 年",next_decade:"次の 10 年",month:"月",previous_month:"前月",next_month:"翌月",today:"今日"},split_button:{x_options:"{name} オプション",more_options:"その他のオプション"},combobox:{select_an_option:"オプションを選択…",filter_options:"オプションを絞り込み",no_matching_options:"一致するオプションは見つかりませんでした"},number_input:{decrease:"減らす",increase:"増やす"},password_input:{show_password:"パスワードを表示",hide_password:"パスワードを隠す"},text_editor:{text_editor:"テキストエディター",code_editor:"コードエディター",text_style_options:"テキストスタイルオプション",show_text_style_options:"テキストスタイルオプションを表示",paragraph:"段落",heading_1:"見出し 1",heading_2:"見出し 2",heading_3:"見出し 3",heading_4:"見出し 4",heading_5:"見出し 5",heading_6:"見出し 6",bulleted_list:"番号なしリスト",numbered_list:"番号付きリスト",blockquote:"ブロック引用",code_block:"コードブロック",bold:"太字",italic:"斜体",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",edit_in_markdown:"マークダウンで編集",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。",language:"言語",plain_text:"プレーンテキスト"}}},Symbol.toStringTag,{value:"Module"}));var yK=D("<span> </span>");const wK={hash:"svelte-1tdjcqs",code:".icon.small-arrow.svelte-1tdjcqs {overflow:hidden;width:12px;text-indent:-6px;}"};function Xe(t,e){ye(t,wK);let n=ot(e,["$$slots","$$events","$$legacy","class","name"]);var r=yK();kt(r,()=>({...n,class:`sui icon material-symbols-outlined ${e.class??""}`,"aria-hidden":!("aria-label"in n)}),void 0,"svelte-1tdjcqs");var i=R(r);W(()=>Q(i,e.name)),T(t,r)}var xK=D("<div><!> <!></div>");const kK={hash:"svelte-1lvgxwx",code:".alert.svelte-1lvgxwx {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-1lvgxwx {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-1lvgxwx {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-1lvgxwx {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-1lvgxwx {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}"};function Jn(t,e){ye(t,kK);let n=ot(e,["$$slots","$$events","$$legacy","status","children","icon"]);var r=xK();kt(r,()=>({...n,role:"alert",class:`sui alert ${e.status??""}`}),void 0,"svelte-1lvgxwx");var i=R(r);{var s=c=>{var u=V(),d=M(u);De(d,()=>e.icon),T(c,u)},o=c=>{const u=_(()=>e.status==="success"?"check_circle":e.status);Xe(c,{get name(){return l(u)}})};U(i,c=>{e.icon?c(s):c(o,!1)})}var a=F(i,2);De(a,()=>e.children??ze),T(t,r)}const lI=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),mw=(t,e)=>{const{ctrlKey:n,metaKey:r,altKey:i,shiftKey:s,code:o}=t,a=o.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(c=>{const u=c.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!r||u.includes("Alt")&&!i||u.includes("Shift")&&!s||!u.includes("Ctrl")&&n||!u.includes("Meta")&&r||!u.includes("Alt")&&i||!u.includes("Shift")&&s?!1:u.filter(d=>!["Ctrl","Meta","Alt","Shift"].includes(d)).every(d=>d.toUpperCase()===a.toUpperCase())})},cI=(t,e="")=>{let n;const r=o=>{const{disabled:a,offsetParent:c}=t,{top:u,left:d}=t.getBoundingClientRect();!mw(o,n)||!c||(a&&t.style.setProperty("pointer-events","auto"),document.elementsFromPoint(d+4,u+4).includes(t)&&(o.preventDefault(),a||(t.focus(),t.click())),a&&t.style.removeProperty("pointer-events"))},i=()=>{globalThis.removeEventListener("keydown",r,{capture:!0}),t.removeAttribute("aria-keyshortcuts")},s=()=>{n=e?e.replace(/\bAccel\b/g,lI()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",r,{capture:!0}),t.setAttribute("aria-keyshortcuts",n))};return s(),{update(o){i(),s()},destroy(){i()}}};var SK=D('<span role="none" class="sui truncated-text svelte-xh9ynf"><!></span>');const EK={hash:"svelte-xh9ynf",code:".truncated-text.svelte-xh9ynf {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}"};function Fr(t,e){ye(t,EK);let n=N(e,"lines",3,1),r=N(e,"children",3,void 0);var i=SK(),s=R(i);De(s,()=>r()??ze),W(()=>hs(i,`-webkit-line-clamp: ${n()??""}; line-clamp: ${n()??""};`)),T(t,i)}const Dg=(t="e",e=7)=>[t,Qr(e)].join("-"),Pf=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(n.disconnect(),e(void 0))});globalThis.requestAnimationFrame(()=>{n.observe(t)})})};let TK=class{open=tt(!1);style=tt({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:r})=>{if(!n||!r)return;const i=this.popupElement.querySelector(".content"),{scrollHeight:s,scrollWidth:o}=i,a=n.top-8,c=r.height-n.bottom-8;let{position:u}=this,d;u.startsWith("bottom-")&&s>c&&(a>c?(u=u.replace("bottom-","top-"),d=a):d=c),u.endsWith("-left")&&n.left+o>r.width-8&&(u=u.replace("-left","-right"));const f=u.startsWith("bottom-")?`${Math.round(n.bottom)}px`:u.endsWith("-top")?`${Math.round(n.top)}px`:"auto",h=u.startsWith("left-")?`${Math.round(r.width-n.left)}px`:u.endsWith("-right")?`${Math.round(r.width-n.right)}px`:"auto",p=u.startsWith("top-")?`${Math.round(r.height-n.top)}px`:u.endsWith("-bottom")?`${Math.round(r.height-n.bottom)}px`:"auto",g=u.startsWith("right-")?`${Math.round(n.right)}px`:u.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m={inset:[f,h,p,g].join(" "),zIndex:1e3,minWidth:`${Math.round(n.width)}px`,maxWidth:u.endsWith("-left")?`${Math.round(r.width-n.left-8)}px`:`${Math.round(n.right-8)}px`,height:d?`${Math.round(d)}px`:"auto"};JSON.stringify(m)!==JSON.stringify(re(this.style))&&this.style.set(m)})});constructor(e,n,r,i){this.anchorElement=e,this.popupElement=n,this.position=r,this.positionBaseElement=i??e,this.id=Dg("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),Ed(e,"click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!re(this.open))}),Ed(e,"keydown",s=>{const{key:o,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=s,f=u||d||a||c;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(o)&&!f&&(s.preventDefault(),s.stopPropagation(),this.open.set(!re(this.open)))}),Ed(e,"transitionstart",()=>{this.anchorElement.closest(".hiding, .hidden, [hidden]")&&this.hideImmediately()}),new IntersectionObserver(([s])=>{!s.isIntersecting&&re(this.open)&&this.hideImmediately()}).observe(this.anchorElement),Ed(this.popupElement,"click",s=>{s.stopPropagation();const o=s.target;re(this.open)&&(o===this.popupElement||o.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),Ed(this.popupElement,"keydown",s=>{const{key:o,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=s;o==="Escape"&&!(u||d||a||c)&&(s.preventDefault(),s.stopPropagation(),this.open.set(!1))}),this.open.subscribe(s=>{s?this.checkPosition():this.anchorElement.getAttribute("aria-expanded")==="true"&&(this.anchorElement.focus(),this.anchorElement.removeAttribute("aria-controls")),this.anchorElement.setAttribute("aria-expanded",String(s))}),new ResizeObserver(()=>{this.checkPosition()}).observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches('[aria-disabled="true"]')}get isReadOnly(){return this.anchorElement.matches('[aria-readonly="true"]')}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open.set(!1),await Ct(50),this.popupElement.hidden=!1}};const CK=(...t)=>new TK(...t);function AK(t,e){var n=V(),r=M(n);De(r,()=>e.children??ze),T(t,n)}var IK=D("<dialog><!> <!></dialog>");const PK={hash:"svelte-4e0en9",code:"dialog.svelte-4e0en9 {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-4e0en9::backdrop {background:transparent;}dialog.backdrop.svelte-4e0en9 {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-4e0en9 {transition-duration:50ms;opacity:1;}dialog.svelte-4e0en9:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-4e0en9 {transition-duration:1ms !important;}dialog.svelte-4e0en9:not(.active) {pointer-events:none !important;}dialog.svelte-4e0en9:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}"};function uI(t,e){le(e,!0),ye(t,PK);const n=w=>{var x=IK(),C=({target:A})=>{i()&&a()&&A?.matches("dialog")&&(i(i().returnValue="cancel",!0),r(!1))},k=A=>{A.preventDefault(),i()&&c()&&(i(i().returnValue="cancel",!0),r(!1))};kt(x,A=>({...d,inert:!l(p),role:s(),class:`sui modal ${e.class??""}`,onclick:C,oncancel:k,[$r]:A}),[()=>({backdrop:o(),open:l(p),active:l(g)})],"svelte-4e0en9");var I=R(x);De(I,()=>e.extraContent??ze);var S=F(I,2);{var E=A=>{var P=V(),L=M(P);De(L,()=>e.children??ze),T(A,P)};U(S,A=>{(l(m)||u())&&A(E)})}Pt(x,A=>i(A),()=>i()),T(w,x)};let r=N(e,"open",15,!1),i=N(e,"dialog",15),s=N(e,"role",3,"dialog"),o=N(e,"showBackdrop",3,!1),a=N(e,"lightDismiss",3,!1),c=N(e,"escapeDismiss",3,!0),u=N(e,"keepContent",3,!1),d=ot(e,["$$slots","$$events","$$legacy","open","dialog","class","role","showBackdrop","lightDismiss","escapeDismiss","keepContent","children","extraContent","onOpening","onOpen","onClosing","onOk","onCancel","onClose"]);const f=()=>{i()?.focus()},h=w=>{i()&&(i(i().returnValue=w,!0),r(!1))};let p=ie(!1),g=ie(!1),m=ie(!1);const v=async()=>new Promise(w=>{const x=C=>{C.target===i()&&(i().removeEventListener("transitionend",x),w())};i()?.addEventListener("transitionend",x)}),y=async()=>{!i()||i()?.open||(e.onOpening?.(new CustomEvent("Opening")),j(m,!0),i().showModal(),e.onOpen?.(new CustomEvent("Open")),await Ct(0),j(p,!0),await v(),j(g,!0))},b=async()=>{if(!i()||!i().open)return;const{returnValue:w}=i();e.onClosing?.(new CustomEvent("Closing")),document.body.inert=!0,i().close(),document.body.inert=!1,j(g,!1),j(p,!1),await v(),j(m,!1),w==="ok"&&e.onOk?.(new CustomEvent("Ok")),w==="cancel"&&e.onCancel?.(new CustomEvent("Cancel")),e.onClose?.(new CustomEvent("Close",{detail:{returnValue:w}})),i(i().returnValue="",!0)};return Fe(()=>{r()?y():b()}),tn(()=>{const w=$v(AK,{target:document.querySelector(".sui.app-shell")??document.body,props:{children:n}});return()=>{i()?.close(),xF(w)}}),ce({focus:f,close:h})}var OK=D('<div role="none"><!></div>');const NK={hash:"svelte-eb9zx0",code:".content.svelte-eb9zx0 {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-eb9zx0 {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-eb9zx0 .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-eb9zx0 {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-eb9zx0 .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-eb9zx0 {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-eb9zx0 {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-eb9zx0 {transform:scale(90%);}.content.touch.combobox.svelte-eb9zx0 .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-eb9zx0 {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-eb9zx0 {transition-duration:300ms;opacity:0;transform:translateY(-8px);}"};function Mg(t,e){le(e,!0),ye(t,NK);const[n,r]=ge(),i=()=>z(w,"$style",n),s=L=>{var O=OK();let $,B;var q=R(O);De(q,()=>e.children??ze),Pt(O,G=>c(G),()=>c()),W((G,Y)=>{O.hidden=!o(),$=bn(O,1,`content ${e.class??""} ${l(b)??""}`,"svelte-eb9zx0",$,G),B=hs(O,"",B,Y)},[()=>({touch:l(I)}),()=>({inset:i().inset,"z-index":i().zIndex,"min-width":i().minWidth,"max-width":i().maxWidth,"max-height":i().height,visibility:i().inset?void 0:"hidden"})]),Xr("mouseenter",O,()=>{a(!0),h()&&window.clearTimeout(C)}),Xr("mouseleave",O,()=>{a(!1),h()&&(C=window.setTimeout(()=>{o(!1)},200))}),T(L,O)};let o=N(e,"open",15,!1),a=N(e,"hovered",15,!1),c=N(e,"content",15,void 0),u=N(e,"showBackdrop",3,void 0),d=N(e,"position",3,"bottom-left"),f=N(e,"positionBaseElement",3,void 0),h=N(e,"parentDialogElement",3,void 0),p=N(e,"touchOptimized",3,!1),g=ot(e,["$$slots","$$events","$$legacy","open","hovered","content","class","showBackdrop","anchor","position","positionBaseElement","parentDialogElement","touchOptimized","children","onOpen"]),m=ie(!1),v=ie(void 0),y=ie(!1),b=ie(void 0),w=tt({inset:void 0,zIndex:void 0,width:void 0,height:void 0}),x,C=0;const k=()=>{x=CK(e.anchor,l(v),d(),f()),w=x.style,x.open.subscribe(L=>{o(L)}),j(b,e.anchor?.getAttribute("aria-haspopup")??void 0,!0),j(m,!0),i()};Fe(()=>{h()&&!l(v)&&c()&&(j(v,h()),l(v).append(c()))}),Fe(()=>{e.anchor&&l(v)&&!l(m)&&k()}),Fe(()=>{h()&&o()&&x?.checkPosition()});const I=_(()=>p()&&l(y));tn(()=>{j(y,globalThis.matchMedia("(pointer: coarse)").matches,!0)});var S=V(),E=M(S);{var A=L=>{s(L)},P=L=>{const O=_(()=>u()??l(I));uI(L,In(()=>g,{role:"none",class:"popup",get showBackdrop(){return l(O)},lightDismiss:!0,keepContent:!0,onOpen:async $=>{if(e.onOpen?.($),await Ct(100),!c())return;const B=c().querySelector('[tabindex]:not([aria-disabled="true"])');B?B.focus():(c(c().tabIndex=-1,!0),c().focus())},get dialog(){return l(v)},set dialog($){j(v,$,!0)},get open(){return o()},set open($){o($)},children:($,B)=>{s($)},$$slots:{default:!0}}))};U(E,L=>{h()?L(A):L(P,!1)})}T(t,S),ce(),r()}var LK=D('<span role="none" class="label svelte-1dln6ll"><!></span>'),$K=D('<span role="none" class="label svelte-1dln6ll"><!></span>'),RK=D('<span role="none" class="label svelte-1dln6ll"><!></span>'),FK=D("<!> <!>",1),DK=D("<button><!> <!> <!></button> <!>",1);const MK={hash:"svelte-1dln6ll",code:'button.svelte-1dln6ll {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-1dln6ll {display:none !important;}button.svelte-1dln6ll:not(:disabled):focus-visible {z-index:1;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) {justify-content:center;border-width:1px;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) .label:where(.svelte-1dln6ll):only-child {padding:0 4px;}button.primary.svelte-1dln6ll {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-1dln6ll:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-1dln6ll {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-1dln6ll:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-1dln6ll {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-1dln6ll:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-1dln6ll {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-1dln6ll:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-1dln6ll {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links="true"] button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {text-decoration:underline;}button.link.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus, :where(.svelte-1dln6ll):active) .label:where(.svelte-1dln6ll) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-1dln6ll {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-1dln6ll .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-1dln6ll {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-1dln6ll {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-1dln6ll {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-1dln6ll {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-1dln6ll {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-1dln6ll {background-color:var(--sui-error-background-color);}button.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0 4px;}button.svelte-1dln6ll > * {pointer-events:none;}button.svelte-1dln6ll :has([slot=start-icon] + [slot=end-icon]) {gap:0;}'};function Qe(t,e){le(e,!0),ye(t,MK);let n=N(e,"element",15),r=N(e,"class",3,""),i=N(e,"type",3,"button"),s=N(e,"role",3,"button"),o=N(e,"name",3,void 0),a=N(e,"value",3,void 0),c=N(e,"valueType",19,()=>typeof a()),u=N(e,"hidden",3,!1),d=N(e,"disabled",3,!1),f=N(e,"readonly",3,!1),h=N(e,"pressed",3,void 0),p=N(e,"keyShortcuts",3,void 0),g=N(e,"label",3,""),m=N(e,"lines",3,1),v=N(e,"variant",3,void 0),y=N(e,"size",3,"medium"),b=N(e,"iconic",3,!1),w=N(e,"pill",3,!1),x=N(e,"flex",3,!1),C=N(e,"popupPosition",3,"bottom-left"),k=N(e,"showPopupBackdrop",3,!1),I=ot(e,["$$slots","$$events","$$legacy","element","class","type","role","name","value","valueType","hidden","disabled","readonly","pressed","keyShortcuts","label","lines","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop","children","startIcon","endIcon","popup"]);var S=DK(),E=M(S);kt(E,G=>({...I,class:`sui button ${v()??""} ${y()??""} ${r()??""}`,type:i(),name:o(),value:a(),hidden:u(),disabled:d(),role:s(),"aria-hidden":u(),"aria-disabled":d(),"aria-readonly":f(),"aria-pressed":h(),"data-type":c(),"data-name":o(),"data-label":g(),"data-value":a(),[$r]:G}),[()=>({iconic:b(),pill:w(),flex:x()})],"svelte-1dln6ll");var A=R(E);De(A,()=>e.startIcon??ze);var P=F(A,2);{var L=G=>{var Y=V(),ee=M(Y);{var X=H=>{var J=LK(),te=R(J);Fr(te,{get lines(){return m()},children:(oe,ne)=>{var Z=Oe();W(()=>Q(Z,g())),T(oe,Z)},$$slots:{default:!0}}),T(H,J)},K=H=>{var J=$K(),te=R(J);De(te,()=>e.children??ze),T(H,J)};U(ee,H=>{g()?H(X):H(K,!1)})}T(G,Y)},O=G=>{var Y=FK(),ee=M(Y);{var X=H=>{var J=RK(),te=R(J);Fr(te,{get lines(){return m()},children:(oe,ne)=>{var Z=Oe();W(()=>Q(Z,g())),T(oe,Z)},$$slots:{default:!0}}),T(H,J)};U(ee,H=>{g()&&H(X)})}var K=F(ee,2);De(K,()=>e.children??ze),T(G,Y)};U(P,G=>{v()==="link"?G(L):G(O,!1)})}var $=F(P,2);De($,()=>e.endIcon??ze),Pt(E,G=>n(G),()=>n()),ha(E,(G,Y)=>cI?.(G,Y),p);var B=F(E,2);{var q=G=>{Mg(G,{get anchor(){return n()},get position(){return C()},get showBackdrop(){return k()},touchOptimized:!0,children:(Y,ee)=>{var X=V(),K=M(X);De(K,()=>e.popup),T(Y,X)},$$slots:{default:!0}})};U(B,G=>{e.popup&&G(q)})}T(t,S),ce()}var zK=D('<div role="none"><!></div>'),UK=D('<div role="none"><div role="alert" class="message svelte-16zgk6j"><!> <!></div> <!></div>');const BK={hash:"svelte-16zgk6j",code:".infobar.svelte-16zgk6j {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-16zgk6j {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-16zgk6j {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-16zgk6j {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-16zgk6j {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-16zgk6j {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, left);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 0 8px);}.message.svelte-16zgk6j button {font-size:inherit !important;}.message.svelte-16zgk6j .icon {font-size:16px; /* !hardcoded */}"};function zg(t,e){le(e,!0),ye(t,BK);const[n,r]=ge(),i=()=>z(ue,"$_",n);let s=N(e,"show",15,!0),o=N(e,"dismissible",3,!0),a=N(e,"status",3,"info"),c=N(e,"children",3,void 0),u=N(e,"icon",3,void 0);var d=V(),f=M(d);{var h=p=>{var g=UK(),m=R(g),v=R(m);{var y=k=>{var I=V(),S=M(I);De(S,u),T(k,I)},b=k=>{const I=_(()=>a()==="success"?"check_circle":a());Xe(k,{get name(){return l(I)}})};U(v,k=>{u()?k(y):k(b,!1)})}var w=F(v,2);De(w,()=>c()??ze);var x=F(m,2);{var C=k=>{var I=zK(),S=R(I);const E=_(()=>i()("_sui.dismiss"));Qe(S,{iconic:!0,size:"small",variant:"ghost",get"aria-label"(){return l(E)},onclick:()=>{s(!1)},children:(A,P)=>{Xe(A,{name:"close"})},$$slots:{default:!0}}),T(k,I)};U(x,k=>{o()&&k(C)})}W(()=>bn(g,1,`infobar ${a()??""}`,"svelte-16zgk6j")),T(p,g)};U(f,p=>{s()&&p(h)})}T(t,d),ce(),r()}var jK=D("<div><!></div>");const qK={hash:"svelte-1iwfqt0",code:".bottom-navigation.svelte-1iwfqt0 {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-1iwfqt0:is([inert]:where(.svelte-1iwfqt0), [hidden]:where(.svelte-1iwfqt0)) {display:none;}.bottom-navigation.svelte-1iwfqt0 .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}"};function HK(t,e){ye(t,qK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=jK();kt(r,()=>({role:"none",class:`sui bottom-navigation ${e.class??""}`,...n}),void 0,"svelte-1iwfqt0");var i=R(r);De(i,()=>e.children??ze),T(t,r)}var GK=D("<div><!></div>");const WK={hash:"svelte-h04q9p",code:".button-group.svelte-h04q9p {flex:none;display:inline-flex;align-items:center;}"};function KK(t,e){ye(t,WK);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=GK();kt(r,()=>({...n,role:"group",class:`sui button-group ${e.class??""}`}),void 0,"svelte-h04q9p");var i=R(r);De(i,()=>e.children??ze),T(t,r)}var VK=D('<div role="none" class="sui floating-action-button-wrapper svelte-7t3j1e"><!></div>');const YK={hash:"svelte-7t3j1e",code:`.floating-action-button-wrapper.svelte-7t3j1e {display:contents;}
|
|
377
377
|
@media (width < 768px) {.floating-action-button-wrapper.svelte-7t3j1e {display:block;position:fixed;inset:auto 16px 72px auto;z-index:100;}.floating-action-button-wrapper.svelte-7t3j1e button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-7t3j1e button .icon {font-size:32px;}
|