@sveltia/cms 0.20.0 → 0.21.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/README.md +61 -48
- package/dist/sveltia-cms.js +386 -318
- package/dist/sveltia-cms.mjs +627 -0
- package/package.json +17 -8
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
function H(){}function Z(t,e){for(const n in e)t[n]=e[n];return t}function PT(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Kk(t){return t()}function Kg(){return Object.create(null)}function Gt(t){t.forEach(Kk)}function Gs(t){return typeof t=="function"}function te(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let hu;function Xn(t,e){return t===e?!0:(hu||(hu=document.createElement("a")),hu.href=e,t===hu.href)}function IT(t){return Object.keys(t).length===0}function Qn(t,...e){if(t==null){for(const i of e)i(void 0);return H}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function le(t){let e;return Qn(t,n=>e=n)(),e}function B(t,e,n){t.$$.on_destroy.push(Qn(e,n))}function ke(t,e,n,i){if(t){const r=Zk(t,e,n,i);return t[0](r)}}function Zk(t,e,n,i){return t[1]&&i?Z(n.ctx.slice(),t[1](i(e))):n.ctx}function Se(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],l=Math.max(e.dirty.length,r.length);for(let o=0;o<l;o+=1)s[o]=e.dirty[o]|r[o];return s}return e.dirty|r}return e.dirty}function Ee(t,e,n,i,r,s){if(r){const l=Zk(e,n,i,s);t.p(l,r)}}function Te(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function tt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function he(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function Aa(t){const e={};for(const n in t)e[n]=!0;return e}function ze(t,e,n){return t.set(n),e}function Ks(t){return t&&Gs(t.destroy)?t.destroy:H}const DT=["",!0,1,"true","contenteditable"],vp=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function $(t,e){t.appendChild(e)}function ye(t,e,n){const i=MT(t);if(!i.getElementById(e)){const r=F("style");r.id=e,r.textContent=n,RT(i,r)}}function MT(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function RT(t,e){return $(t.head||t,e),e.sheet}function A(t,e,n){t.insertBefore(e,n||null)}function T(t){t.parentNode&&t.parentNode.removeChild(t)}function ni(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function $T(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function G(t){return document.createTextNode(t)}function j(){return G(" ")}function Q(){return G("")}function Fe(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Kr(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Jk(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function C(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const FT=["width","height"];function je(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set&&FT.indexOf(i)===-1?t[i]=e[i]:C(t,i,e[i])}function zT(t,e){Object.keys(e).forEach(n=>{jT(t,n,e[n])})}function jT(t,e,n){const i=e.toLowerCase();i in t?t[i]=typeof t[i]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:C(t,e,n)}function Zg(t){return/-/.test(t)?zT:je}function BT(t){return Array.from(t.childNodes)}function X(t,e){e=""+e,t.data!==e&&(t.data=e)}function UT(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function qT(t,e,n){~DT.indexOf(n)?UT(t,e):X(t,e)}function ss(t,e){t.value=e??""}function jt(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function re(t,e,n){t.classList.toggle(e,!!n)}function HT(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}class xc{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(e=!1){this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=$T(n.nodeName):this.e=F(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)A(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(T)}}function an(t,e){return new t(e)}let ia;function Sr(t){ia=t}function Ca(){if(!ia)throw new Error("Function called outside component initialization");return ia}function Ut(t){Ca().$$.on_mount.push(t)}function sn(){const t=Ca();return(e,n,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=HT(e,n,{cancelable:i});return r.slice().forEach(l=>{l.call(t,s)}),!s.defaultPrevented}return!0}}function xT(t,e){return Ca().$$.context.set(t,e),e}function Na(t){return Ca().$$.context.get(t)}function fe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const bl=[],ae=[];let Dl=[];const sh=[],Xk=Promise.resolve();let lh=!1;function Qk(){lh||(lh=!0,Xk.then(Je))}function e2(){return Qk(),Xk}function oh(t){Dl.push(t)}function $e(t){sh.push(t)}const pd=new Set;let cl=0;function Je(){if(cl!==0)return;const t=ia;do{try{for(;cl<bl.length;){const e=bl[cl];cl++,Sr(e),VT(e.$$)}}catch(e){throw bl.length=0,cl=0,e}for(Sr(null),bl.length=0,cl=0;ae.length;)ae.pop()();for(let e=0;e<Dl.length;e+=1){const n=Dl[e];pd.has(n)||(pd.add(n),n())}Dl.length=0}while(bl.length);for(;sh.length;)sh.pop()();lh=!1,pd.clear(),Sr(t)}function VT(t){if(t.fragment!==null){t.update(),Gt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(oh)}}function WT(t){const e=[],n=[];Dl.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),Dl=e}const Iu=new Set;let Ts;function x(){Ts={r:0,c:[],p:Ts}}function V(){Ts.r||Gt(Ts.c),Ts=Ts.p}function _(t,e){t&&t.i&&(Iu.delete(t),t.i(e))}function y(t,e,n,i){if(t&&t.o){if(Iu.has(t))return;Iu.add(t),Ts.c.push(()=>{Iu.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function Ci(t,e){const n=e.token={};function i(r,s,l,o){if(e.token!==n)return;e.resolved=o;let a=e.ctx;l!==void 0&&(a=a.slice(),a[l]=o);const u=r&&(e.current=r)(a);let c=!1;e.block&&(e.blocks?e.blocks.forEach((f,d)=>{d!==s&&f&&(x(),y(f,1,1,()=>{e.blocks[d]===f&&(e.blocks[d]=null)}),V())}):e.block.d(1),u.c(),_(u,1),u.m(e.mount(),e.anchor),c=!0),e.block=u,e.blocks&&(e.blocks[s]=u),c&&Je()}if(PT(t)){const r=Ca();if(t.then(s=>{Sr(r),i(e.then,1,e.value,s),Sr(null)},s=>{if(Sr(r),i(e.catch,2,e.error,s),Sr(null),!e.hasCatch)throw s}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,t),!0;e.resolved=t}}function so(t,e,n){const i=e.slice(),{resolved:r}=t;t.current===t.then&&(i[t.value]=r),t.current===t.catch&&(i[t.error]=r),t.block.p(i,n)}function be(t){return t?.length!==void 0?t:Array.from(t)}function _t(t,e){y(t,1,1,()=>{e.delete(t.key)})}function bt(t,e,n,i,r,s,l,o,a,u,c,f){let d=t.length,h=s.length,m=d;const p={};for(;m--;)p[t[m].key]=m;const g=[],v=new Map,b=new Map,w=[];for(m=h;m--;){const P=f(r,s,m),M=n(P);let I=l.get(M);I?i&&w.push(()=>I.p(P,e)):(I=u(M,P),I.c()),v.set(M,g[m]=I),M in p&&b.set(M,Math.abs(m-p[M]))}const k=new Set,S=new Set;function E(P){_(P,1),P.m(o,c),l.set(P.key,P),c=P.first,h--}for(;d&&h;){const P=g[h-1],M=t[d-1],I=P.key,D=M.key;P===M?(c=P.first,d--,h--):v.has(D)?!l.has(I)||k.has(I)?E(P):S.has(D)?d--:b.get(I)>b.get(D)?(S.add(I),E(P)):(k.add(D),d--):(a(M,l),d--)}for(;d--;){const P=t[d];v.has(P.key)||a(P,l)}for(;h;)E(g[h-1]);return Gt(w),g}function Ge(t,e){const n={},i={},r={$$scope:1};let s=t.length;for(;s--;){const l=t[s],o=e[s];if(o){for(const a in l)a in o||(i[a]=1);for(const a in o)r[a]||(n[a]=o[a],r[a]=1);t[s]=o}else for(const a in l)r[a]=1}for(const l in i)l in n||(n[l]=void 0);return n}function qt(t){return typeof t=="object"&&t!==null?t:{}}function Re(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function O(t){t&&t.c()}function N(t,e,n){const{fragment:i,after_update:r}=t.$$;i&&i.m(e,n),oh(()=>{const s=t.$$.on_mount.map(Kk).filter(Gs);t.$$.on_destroy?t.$$.on_destroy.push(...s):Gt(s),t.$$.on_mount=[]}),r.forEach(oh)}function L(t,e){const n=t.$$;n.fragment!==null&&(WT(n.after_update),Gt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function YT(t,e){t.$$.dirty[0]===-1&&(bl.push(t),Qk(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ne(t,e,n,i,r,s,l=null,o=[-1]){const a=ia;Sr(t);const u=t.$$={fragment:null,ctx:[],props:s,update:H,not_equal:r,bound:Kg(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:Kg(),dirty:o,skip_bound:!1,root:e.target||a.$$.root};l&&l(u.root);let c=!1;if(u.ctx=n?n(t,e.props||{},(f,d,...h)=>{const m=h.length?h[0]:d;return u.ctx&&r(u.ctx[f],u.ctx[f]=m)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](m),c&&YT(t,f)),d}):[],u.update(),c=!0,Gt(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const f=BT(e.target);u.fragment&&u.fragment.l(f),f.forEach(T)}else u.fragment&&u.fragment.c();e.intro&&_(t.$$.fragment),N(t,e.target,e.anchor),Je()}Sr(a)}class ie{$$=void 0;$$set=void 0;$destroy(){L(this,1),this.$destroy=H}$on(e,n){if(!Gs(n))return H;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!IT(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const GT="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(GT);const KT={ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",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",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",bold:"Bold",italic:"Italic",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",rich_text:"Rich Text",use_rich_text_mode:"Use Rich Text Mode",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead."}},ZT=Object.freeze(Object.defineProperty({__proto__:null,strings:KT},Symbol.toStringTag,{value:"Module"})),JT={ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",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:"テキストエディター",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:"ブロック引用",bold:"太字",italic:"斜体",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",rich_text:"リッチテキスト",use_rich_text_mode:"リッチテキストモードを使用",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。"}},XT=Object.freeze(Object.defineProperty({__proto__:null,strings:JT},Symbol.toStringTag,{value:"Module"})),QT={collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",notifications:"Notifications",site_config:"Site Configuration",settings:"Settings",account:"Account",live_site:"Live Site",git_repository:"Git Repository",help:{keyboard_shortcuts:"Keyboard Shortcuts",documentation:"Documentation",release_notes:"Release Notes",release_notes_version_x:"Release Notes (v{version})",issue:"Report Issue",feedback:"Share Feedback"},user_name:"User Name",password:"Password",sign_in:"Sign In",signed_in_as_x:"Signed In as {name}",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",clear_selection:"Clear Selection",upload:"Upload",copy:"Copy",download:"Download",duplicate:"Duplicate",delete:"Delete",save:"Save",saving:"Saving…",replace:"Replace",remove:"Remove",remove_x:"Remove {name}",clear:"Clear",expand:"Expand",collapse:"Collapse",insert:"Insert",searching:"Searching…",global:"Global",primary:"Primary",secondary:"Secondary",collection:"Collection",folder:"Folder",api_key:"API Key",details:"Details",clipboard_error:"There was an error while copying data.",welcome_to_sveltia_cms:"Welcome to Sveltia CMS",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",loading_site_data_error:"There was an error while loading site data.",sign_in_with_x:"Sign In with {service}",authorizing:"Authorizing…",work_with_local_repo:"Work with Local Repository",work_with_local_repo_description:"Click the button to select the root directory of the “{repo}” repository.",work_with_local_repo_description_no_repo:"Click the button to select the root directory of your Git repository.",sign_in_error:{not_project_root:"The folder you have selected is not a repository root directory. Please try again.",picker_dismissed:"A repository root directory could not be selected. Please try again.",authentication_aborted:"Authentication aborted. Please try again.",UNSUPPORTED_BACKEND:"Your Git backend is not supported by the authenticator.",UNSUPPORTED_DOMAIN:"Your domain is not allowed to use the authenticator.",MISCONFIGURED_CLIENT:"OAuth app client ID or secret is not configured.",AUTH_CODE_REQUEST_FAILED:"Failed to receive an authorization code. Please try again later.",CSRF_DETECTED:"Potential CSRF attack detected. Authentication flow aborted.",TOKEN_REQUEST_FAILED:"Failed to request an access token. Please try again later.",MALFORMED_RESPONSE:"Server responded with malformed data. Please try again later."},repository_not_found:"The “{repo}” repository doesn’t exist.",repository_empty:"The “{repo}” repository has no branches.",branch_not_found:"The “{repo}” repository doesn’t have the “{branch}” branch.",unexpected_error:"Unexpected Error",visit_live_site:"Visit Live Site",switch_page:"Switch Page",search_placeholder:"Search for entries and assets…",create_entry_or_assets:"Create Entry or Assets",publish_changes:"Publish Changes",publishing_changes:"Publishing Changes…",publishing_changes_failed:"Changes could not be published. Please try again later.",show_notifications:"Show Notifications",show_account_menu:"Show Account Menu",update_available:"The latest version of Sveltia CMS is available.",update_now:"Update Now",backend_status:{minor_incident:"{service} is experiencing a minor incident. Your workflow may be potentially affected.",major_incident:"{service} is experiencing a major incident. You may want to wait until the situation has improved."},content_library:"Content Library",asset_library:"Asset Library",collection_assets:"Collection Assets",entry_list:"Entry List",file_list:"File List",asset_list:"Asset List",x_collection:"“{collection}” Collection",x_asset_folder:"“{folder}” Asset Folder",viewing_x_collection_many_entries:"You’re now viewing the “{collection}” collection, which has {count} entries.",viewing_x_collection_one_entry:"You’re now viewing the “{collection}” collection, which has one entry.",viewing_x_collection_no_entries:"You’re now viewing the “{collection}” collection, which has no entries yet.",viewing_x_asset_folder_many_assets:"You’re now viewing the “{folder}” asset folder, which has {count} assets.",viewing_x_asset_folder_one_asset:"You’re now viewing the “{folder}” asset folder, which has one asset.",viewing_x_asset_folder_no_assets:"You’re now viewing the “{folder}” asset folder, which has no assets yet.",collection_not_found:"Collection not found",file_not_found:"File not found.",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort:"Sort",sorting_options:"Sorting Options",sort_keys:{none:"None",name:"Name",commit_author:"Updated by",commit_date:"Updated on"},ascending:"{label}, A to Z",ascending_date:"{label}, old to new",descending:"{label}, Z to A",descending_date:"{label}, new to old",filter:"Filter",filtering_options:"Filtering Options",group:"Group",grouping_options:"Grouping Options",file_type:"File Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",hide_assets:"Hide Assets",show_info:"Show Info",hide_info:"Hide Info",asset_folders:"Asset Folders",all_assets:"All Assets",uncategorized:"Uncategorized",search_results_for_x:"Search Results for “{terms}”",viewing_search_results:"You’re now viewing search results for “{terms}”. We’ve found {entries} and {assets}.",many_entries:"{count} entries",one_entry:"one entry",no_entries:"no entries",many_assets:"{count} assets",one_asset:"one asset",no_assets:"no assets",no_files_found:"No files found.",no_entries_found:"No entries found.",upload_assets:"Upload New Assets",edit_options:"Edit Options",show_edit_options:"Show Edit Options",edit_asset:"Edit Asset",edit_x:"Edit {name}",wrap_long_lines:"Wrap Long Lines",replace_asset:"Replace Asset",replace_x:"Replace {name}",drop_file_or_browse:"Drop a file here or click to browse:",drop_files_or_browse:"Drop files here or click to browse:",drop_files_here:"Drop files here",drop_files_type_mismatch:"The dropped file is not the “{type}” type. Please try again.",choose_file:"Choose File",choose_files:"Choose Files",delete_asset:"Delete Asset",delete_assets:"Delete Assets",delete_selected_asset:"Delete Selected Asset",delete_selected_assets:"Delete Selected Assets",confirm_deleting_this_asset:"Are you sure to delete this asset?",confirm_deleting_selected_asset:"Are you sure to delete the selected asset?",confirm_deleting_selected_assets:"Are you sure to delete the selected {count} assets?",confirm_deleting_all_assets:"Are you sure to delete all the assets?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",delete_selected_entry:"Delete Selected Entry",delete_selected_entries:"Delete Selected Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_this_entry_with_assets:"Are you sure to delete this entry and associated assets?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entry_with_assets:"Are you sure to delete the selected entry and associated assets?",confirm_deleting_selected_entries:"Are you sure to delete the selected {count} entries?",confirm_deleting_selected_entries_with_assets:"Are you sure to delete the selected {count} entries and associated assets?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",confirm_deleting_all_entries_with_assets:"Are you sure to delete all the entries and associated assets?",confirm_replacing_file:"Are you sure to replace “{name}” with the following file?",confirm_uploading_file:"Are you sure to save the following file to the “{folder}” folder?",confirm_uploading_files:"Are you sure to save the following {count} files to the “{folder}” folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_in_collection:"No files available in this collection.",asset_info:"Asset Info",select_asset_show_info:"Select an asset to show the info.",duplicate_entry:"Duplicate Entry",entry_duplicated:"Entry has been duplicated. It’s now a new draft.",entry_validation_error:"One field has an error. Please correct it to save the entry.",entry_validation_errors:"{count} fields have an error. Please correct them to save the entry.",entry_saved:"Entry has been saved.",entry_saved_and_published:"Entry has been saved and published.",entry_deleted:"Entry has been deleted.",entries_deleted:"{count} entries have been deleted.",asset_saved:"Asset has been saved.",asset_saved_and_published:"Asset has been saved and published.",assets_saved:"{count} assets have been saved.",assets_saved_and_published:"{count} assets have been saved and published.",asset_url_copied:"Asset URL has been copied to clipboard.",asset_urls_copied:"Asset URLs have been copied to clipboard.",asset_path_copied:"Asset file path has been copied to clipboard.",asset_paths_copied:"Asset file paths have been copied to clipboard.",asset_data_copied:"Asset file has been copied to clipboard.",asset_downloaded:"Asset file has been downloaded.",assets_downloaded:"Asset files have been downloaded.",asset_deleted:"Asset has been deleted.",assets_deleted:"{count} assets have been deleted.",content_editor:"Content Editor",cancel_editing:"Cancel Editing",creating_x:"Creating {name}",creating_x_collection_entry:"You’re now creating a new entry in the “{collection}” collection.",editing_x_in_x:"Editing {collection} / {entry}",editing_x_collection_entry:"You’re now editing the “{entry}” entry in the “{collection}” collection.",editing_x_collection_file:"You’re now editing the “{file}” file in the “{collection}” collection.",save_and_publish:"Save and Publish",save_without_publishing:"Save without Publishing",show_editor_options:"Show Editor Options",editor_options:"Editor Options",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",switch_locale:"Switch Locale",locale_content_errors:"One more more fields in this locale content have an error.",edit:"Edit",preview:"Preview",edit_x_locale:"Edit {locale} Content",preview_x_locale:"Preview {locale} Content",content_preview:"Content Preview",show_content_options_x_locale:"Show {locale} Content Options",content_options_x_locale:"{locale} Content Options",x_field:"“{field}” Field",show_field_options:"Show Field Options",field_options:"Field Options",unsupported_widget_x:"Unsupported widget: {name}",enable_x_locale:"Enable {locale}",reenable_x_locale:"Reenable {locale}",disable_x_locale:"Disable {locale}",locale_x_has_been_disabled:"The {locale} content has been disabled.",locale_x_now_disabled:"The {locale} content is now disabled. It will be deleted when you save the entry.",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",required:"Required",editor:{translation:{none:"Nothing has been translated.",started:"Translating…",error:"There was an error while translating.",complete:{one:"Translated the field from {source}.",many:"Translated {count} fields from {source}."}},copy:{none:"Nothing has been copied.",complete:{one:"Copied the field from {source}.",many:"Copied {count} fields from {source}."}}},validation:{value_missing:"This field is required.",range_underflow:{select_many:"You have to select at least {min} items.",select_one:"You have to select at least {min} item.",add_many:"You have to add at least {min} items.",add_one:"You have to add at least {min} item."},range_overflow:{select_many:"You cannot select more than {max} items.",select_one:"You cannot select more than {max} item.",add_many:"You cannot add more than {max} items.",add_one:"You cannot add more than {max} item."},type_mismatch:{email:"Please enter a valid email.",url:"Please enter a valid URL."}},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},viewing_x_asset_details:"You’re viewing the details of the “{name}” asset.",asset_editor:"Asset Editor",preview_unavailable:"Preview Unavailable.",public_url:"Public URL",public_urls:"Public URLs",file_path:"File Path",file_paths:"File Paths",file_data:"File Data",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",select_file:"Select File",select_image:"Select Image",replace_file:"Replace File",replace_image:"Replace Image",remove_file:"Remove File",remove_image:"Remove Image",remove_this_item:"Remove This Item",move_up:"Move Up",move_down:"Move Down",add_x:"Add {name}",select_list_type:"Select List Type",opacity:"Opacity",assets_dialog:{title:{file:"Select File",image:"Select Image"},search_for_file:"Search for Files",search_for_image:"Search for Images",locations:"Locations",location:{local:"Your Computer",repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching assets. Please try again later.",image_fetch_failed:"There was an error while downloading the selected asset. Please try again later."},available_images:"Available Images",enter_url:"Enter URL",enter_file_url:"Enter URL of the file:",enter_image_url:"Enter URL of the image:",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"}},boolean:{true:"Yes",false:"No"},cloud_storage:{invalid:"The service is not configured properly.",auth:{initial:"Sign into {service} to insert media on the storage to entry fields.",requested:"Signing in…",error:"User name or password is incorrect. Please double check and try again."}},config:{error:{fetch_failed:"The configuration file could not be retrieved.",fetch_failed_not_ok:"HTTP response returned with status {status}.",parse_failed:"The configuration file could not be parsed.",parse_failed_invalid_object:"The configuration file is not a valid JavaScript object.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_repository:"The repository is not defined in the configuration file.",oauth_implicit_flow:"The configured authentication method (implicit flow) is not supported.",oauth_no_app_id:"OAuth application ID is not defined in the configuration file.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},unsupported:{browser:"Local development is not supported in your browser. Please use Chrome or Edge instead."},status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},categories:"Categories",prefs:{changes:{api_key_saved:"API key has been saved.",api_key_removed:"API key has been removed."},error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme",select_theme:"Select Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language",select_language:"Select Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},media:{title:"Media",stock_photos:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},advanced:{title:"Advanced",deploy_hook:{title:"Deploy Hook",description:"Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.",field_label:"Deploy Hook URL",url_saved:"Webhook URL has been saved.",url_removed:"Webhook URL has been removed."},developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},keyboard_shortcuts:{view_content_library:"View Content Library",view_asset_library:"View Asset Library",search:"Search for entries and assets",create_entry:"Create a new entry",save_entry:"Save an entry"},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tif:"TIFF image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet"},file_size_units:{b:"{size} bytes",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},t2=Object.freeze(Object.defineProperty({__proto__:null,strings:QT},Symbol.toStringTag,{value:"Module"})),e6={collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"アセット",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",notifications:"通知",site_config:"サイト設定",settings:"設定",account:"アカウント",live_site:"管理対象サイト",git_repository:"Git レポジトリ",help:{keyboard_shortcuts:"キーボードショートカット",documentation:"ドキュメンテーション",release_notes:"リリースノート",release_notes_version_x:"リリースノート (v{version})",issue:"問題を報告",feedback:"フィードバックを共有"},user_name:"ユーザー名",password:"パスワード",sign_in:"ログイン",signed_in_as_x:"{name} としてログイン中",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",clear_selection:"選択を解除",upload:"アップロード",copy:"コピー",download:"ダウンロード",duplicate:"複製",delete:"削除",save:"保存",saving:"保存中…",replace:"差し替え",remove:"削除",remove_x:"{name} を削除",clear:"クリア",expand:"広げる",collapse:"折り畳む",insert:"挿入",searching:"検索中…",global:"グローバル",primary:"プライマリー",secondary:"セカンダリー",collection:"コレクション",folder:"フォルダー",api_key:"API キー",details:"詳細",clipboard_error:"データのコピー中に問題が発生しました。",welcome_to_sveltia_cms:"Sveltia CMS へようこそ",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",loading_site_data_error:"サイトデータの読み込み中にエラーが発生しました。",sign_in_with_x:"{service} でログイン",authorizing:"認証中…",work_with_local_repo:"ローカルレポジトリで作業",work_with_local_repo_description:"ボタンをクリックして「{repo}」レポジトリのルートディレクトリを選択してください。",work_with_local_repo_description_no_repo:"ボタンをクリックして Git レポジトリのルートディレクトリを選択してください。",sign_in_error:{not_project_root:"選択されたフォルダーはレポジトリのルートディレクトリではありません。再度お試しください。",picker_dismissed:"レポジトリのルートディレクトリを選択できませんでした。再度お試しください。",authentication_aborted:"認証が中断されました。再度お試しください。",UNSUPPORTED_BACKEND:"この認証アプリはお使いの Git バックエンドに対応していません。",UNSUPPORTED_DOMAIN:"この認証アプリではお使いのドメインの使用は許可されていません。",MISCONFIGURED_CLIENT:"OAuth アプリのクライアント ID またはシークレットが設定されていません。",AUTH_CODE_REQUEST_FAILED:"認証コードを取得できませんでした。後で再度お試しください。",CSRF_DETECTED:"CSRF 攻撃の可能性が検出されたため、認証フローは中断されました。",TOKEN_REQUEST_FAILED:"アクセストークンを要求できませんでした。後で再度お試しください。",MALFORMED_RESPONSE:"サーバーから不正なデータが返されました。後で再度お試しください。"},repository_not_found:"「{repo}」レポジトリは存在しません。",repository_empty:"「{repo}」レポジトリにはブランチがありません。",branch_not_found:"「{repo}」レポジトリに「{branch}」ブランチは存在しません。",unexpected_error:"予期せぬエラー",visit_live_site:"管理対象サイトを開く",switch_page:"ページを切り替え",search_placeholder:"エントリーとアセットを検索…",create_entry_or_assets:"エントリーまたはアセットを作成",publish_changes:"変更を公開",publishing_changes:"変更を公開しています…",publishing_changes_failed:"変更を公開できませんでした。後で再度お試しください。",show_notifications:"通知を表示",show_account_menu:"アカウントメニューを表示",update_available:"Sveltia CMS の最新版が利用可能です。",update_now:"今すぐ更新",backend_status:{minor_incident:"{service} で軽微な障害が発生しています。ワークフローに潜在的な影響が及ぶ可能性があります。",major_incident:"{service} で重大な障害が発生しています。状況が改善されるまで待った方が良いでしょう。"},content_library:"コンテンツライブラリ",asset_library:"アセットライブラリ",collection_assets:"コレクションアセット",entry_list:"エントリーリスト",file_list:"ファイルリスト",asset_list:"アセットリスト",x_collection:"「{collection}」コレクション",x_asset_folder:"「{folder}」アセットフォルダー",viewing_x_collection_many_entries:"「{collection}」コレクションを表示しています。ここには {count} 個のエントリーがあります。",viewing_x_collection_one_entry:"「{collection}」コレクションを表示しています。ここにはひとつのエントリーがあります。",viewing_x_collection_no_entries:"「{collection}」コレクションを表示しています。ここにはまだエントリーがありません。",viewing_x_asset_folder_many_assets:"「{folder}」アセットフォルダーを表示しています。ここには {count} 個のアセットがあります。",viewing_x_asset_folder_one_asset:"「{folder}」アセットフォルダーを表示しています。ここにはひとつのアセットがあります。",viewing_x_asset_folder_no_assets:"「{folder}」アセットフォルダーを表示しています。ここにはまだアセットがありません。",collection_not_found:"コレクションが見つかりませんでした",file_not_found:"ファイルが見つかりませんでした",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort:"並び替え",sorting_options:"並べ替えオプション",sort_keys:{none:"なし",name:"名前",commit_author:"更新者",commit_date:"更新日時"},ascending:"{label} (A–Z)",ascending_date:"{label} (古い順)",descending:"{label} (Z–A)",descending_date:"{label} (新しい順)",filter:"絞り込み",filtering_options:"絞り込みオプション",group:"グループ化",grouping_options:"グループ化オプション",file_type:"ファイル形式",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"アセットを表示",hide_assets:"アセットを隠す",show_info:"情報を表示",hide_info:"情報を隠す",asset_folders:"アセットフォルダー",all_assets:"すべてのアセット",uncategorized:"未分類",search_results_for_x:"「{terms}」の検索結果",viewing_search_results:"「{terms}」の検索結果を表示しています。{entries} と {assets} が見つかりました。",many_entries:"{count} 個のエントリー",one_entry:"1 個のエントリー",no_entries:"0 個のエントリー",many_assets:"{count} 個のアセット",one_asset:"1 個のアセット",no_assets:"0 個のアセット",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",upload_assets:"新しいアセットをアップロード",edit_options:"編集オプション",show_edit_options:"編集オプションを表示",edit_asset:"アセットを編集",edit_x:"{name} を編集",wrap_long_lines:"長い行を折り返す",replace_asset:"アセットを差し替え",replace_x:"{name} を差し替え",drop_file_or_browse:"ここにファイルをドロップするか下のボタンをクリックして参照:",drop_files_or_browse:"ここにファイルをドロップするか下のボタンをクリックして参照:",drop_files_here:"ここにファイルをドロップ",drop_files_type_mismatch:"ドロップされたファイルは「{type}」形式ではありません。再度お試しください。",choose_file:"ファイルを選択",choose_files:"ファイルを選択",delete_asset:"アセットを削除",delete_assets:"アセットを削除",delete_selected_asset:"選択されたアセットを削除",delete_selected_assets:"選択されたアセットを削除",confirm_deleting_this_asset:"このアセットを削除してもよろしいですか?",confirm_deleting_selected_asset:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_assets:"選択された {count} 個のファイルを削除してもよろしいですか?",confirm_deleting_all_assets:"すべてのアセットを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",delete_selected_entry:"選択されたエントリーを削除",delete_selected_entries:"選択されたエントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_this_entry_with_assets:"このエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry_with_assets:"選択されたエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {count} 個のエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries_with_assets:"選択された {count} 個のエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",confirm_deleting_all_entries_with_assets:"すべてのエントリーと関連アセットを削除してもよろしいですか?",confirm_replacing_file:"「{name}」を以下のファイルと差し替えてもよろしいですか?",confirm_uploading_file:"以下のファイルを「{folder}」フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {count} 個のファイルを「{folder}」フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_in_collection:"このコレクションにはファイルがありません。",asset_info:"アセット情報",select_asset_show_info:"アセットを選択すると情報が表示されます。",duplicate_entry:"エントリーを複製",entry_duplicated:"エントリーが複製され、新しい下書きとなりました。",entry_validation_error:"ひとつのフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_validation_errors:"{count} 個のフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_saved:"エントリーが保存されました。",entry_saved_and_published:"エントリーが保存、公開されました。",entry_deleted:"エントリーが削除されました。",entries_deleted:"{count} 個のエントリーが削除されました。",asset_saved:"アセットが保存されました。",asset_saved_and_published:"アセットが保存、公開されました。",assets_saved:"{count} 個のアセットが保存されました。",assets_saved_and_published:"{count} 個のアセットが保存、公開されました。",asset_url_copied:"アセット URL がクリップボードにコピーされました。",asset_urls_copied:"アセット URL がクリップボードにコピーされました。",asset_path_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_paths_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_data_copied:"アセットファイルがクリップボードにコピーされました。",asset_downloaded:"アセットファイルがダウンロードされました。",assets_downloaded:"アセットファイルがダウンロードされました。",asset_deleted:"アセットが削除されました。",assets_deleted:"{count} 個のアセットが削除されました。",content_editor:"コンテンツエディター",cancel_editing:"編集をキャンセル",creating_x:"{name} を作成",creating_x_collection_entry:"「{collection}」コレクションの新しいエントリーを作成しています。",editing_x_in_x:"{collection} / {entry} を編集",editing_x_collection_entry:"「{collection}」コレクションの「{entry}」エントリーを編集しています。",editing_x_collection_file:"「{collection}」コレクションの「{file}」ファイルを編集しています。",save_and_publish:"保存して公開",save_without_publishing:"公開せずに保存",show_editor_options:"エディターオプションを表示",editor_options:"エディターオプション",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",switch_locale:"ロケールを切り替え",locale_content_errors:"このロケールコンテンツのひとつか複数のフィールドにエラーがあります。",edit:"編集",preview:"プレビュー",edit_x_locale:"{locale} コンテンツを編集",preview_x_locale:"{locale} コンテンツをプレビュー",content_preview:"コンテンツプレビュー",show_content_options_x_locale:"{locale} コンテンツのオプションを表示",content_options_x_locale:"{locale} コンテンツのオプション",x_field:"「{field}」フィールド",show_field_options:"フィールドオプションを表示",field_options:"フィールドオプション",unsupported_widget_x:"非対応ウィジェット: {name}",enable_x_locale:"{locale} を有効化",reenable_x_locale:"{locale} を再度有効化",disable_x_locale:"{locale} を無効化",locale_x_has_been_disabled:"{locale} コンテンツは無効化されています。",locale_x_now_disabled:"{locale} コンテンツは無効化されました。エントリーを保存する際に削除されます。",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",required:"必須",editor:{translation:{none:"翻訳されたフィールドはありません。",started:"翻訳中…",error:"翻訳中に問題が発生しました。",complete:{one:"{source} からフィールドを翻訳しました。",many:"{source} から {count} 個のフィールドを翻訳しました。"}},copy:{none:"コピーされたフィールドはありません。",complete:{one:"{source} からフィールドをコピーしました。",many:"{source} から {count} 個のフィールドをコピーしました。"}}},validation:{value_missing:"この項目は必須です。",range_underflow:{select_many:"少なくとも {min} 個の項目を選択してください。",select_one:"少なくとも {min} 個の項目を選択してください。",add_many:"少なくとも {min} 個の項目を追加してください。",add_one:"少なくとも {min} 個の項目を追加してください。"},range_overflow:{select_many:"選択できるのは最大で {max} 項目です。",select_one:"選択できるのは最大で {max} 項目です。",add_many:"追加できるのは最大で {max} 項目です。",add_one:"追加できるのは最大で {max} 項目です。"},type_mismatch:{email:"正しいメールアドレスを入力してください。",url:"正しい URL を入力してください。"}},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},viewing_x_asset_details:"「{name}」アセットの詳細を表示しています。",asset_editor:"アセットエディター",preview_unavailable:"プレビューは表示できません",public_url:"公開 URL",public_urls:"公開 URL",file_path:"ファイルパス",file_paths:"ファイルパス",file_data:"ファイルデータ",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",select_file:"ファイルを選択",select_image:"画像を選択",replace_file:"ファイルを差し替え",replace_image:"画像を差し替え",remove_file:"ファイルを削除",remove_image:"画像を削除",remove_this_item:"このアイテムを削除",move_up:"上へ移動",move_down:"下へ移動",add_x:"{name} を追加",select_list_type:"リストタイプを選択",opacity:"透明度",assets_dialog:{title:{file:"ファイルを選択",image:"画像を選択"},search_for_file:"ファイルを検索",search_for_image:"画像を検索",locations:"場所",location:{local:"お使いのコンピューター",repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},error:{invalid_key:"あなたの API キーは正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"アセットを検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択されたアセットをダウンロード中に問題が発生しました。後で再度お試しください。"},available_images:"利用可能な画像",enter_url:"URL を入力",enter_file_url:"ファイルの URL を入力:",enter_image_url:"画像の URL を入力:",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"}},boolean:{true:"はい",false:"いいえ"},cloud_storage:{invalid:"このサービスは正しく設定されていません。",auth:{initial:"{service} へログインすると、ストレージ上のメディアをエントリー項目へ挿入できます。",requested:"ログイン中…",error:"ユーザー名またはパスワードが間違っています。確認の上、再度お試しください。"}},config:{error:{fetch_failed:"設定ファイルを読み込めませんでした。",fetch_failed_not_ok:"HTTP レスポンスがステータス {status} で返されました。",parse_failed:"設定ファイルを解析できませんでした。",parse_failed_invalid_object:"設定ファイルが有効な JavaScript オブジェクトではありません。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_repository:"設定ファイル内でレポジトリが定義されていません。",oauth_implicit_flow:"設定されている認証方式 (暗黙的フロー) は非対応です。",oauth_no_app_id:"設定ファイル内で OAuth アプリケーション ID が定義されていません。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},unsupported:{browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。"},status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},categories:"カテゴリ",prefs:{changes:{api_key_saved:"API キーが保存されました。",api_key_removed:"API キーが削除されました。"},error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ",select_theme:"テーマを選択"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語",select_language:"言語を選択"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},media:{title:"メディア",stock_photos:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},advanced:{title:"詳細",deploy_hook:{title:"デプロイフック",description:"「変更を公開」を選択して手動でデプロイを実行する際に呼び出すウェブフック URL を入力してください。GitHub Actions を使用する場合は空欄のままで構いません。",field_label:"デプロイフック URL",url_saved:"ウェブフック URL が保存されました。",url_removed:"ウェブフック URL が削除されました。"},developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},keyboard_shortcuts:{view_content_library:"コンテンツライブラリを表示",view_asset_library:"アセットライブラリを表示",search:"エントリーとアセットを検索",create_entry:"新しいエントリーを作成",save_entry:"エントリーを保存"},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tif:"TIFF 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート"},file_size_units:{b:"{size} バイト",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},n2=Object.freeze(Object.defineProperty({__proto__:null,strings:e6},Symbol.toStringTag,{value:"Module"})),fl=[];function t6(t,e){return{subscribe:Xe(t,e).subscribe}}function Xe(t,e=H){let n;const i=new Set;function r(o){if(te(t,o)&&(t=o,n)){const a=!fl.length;for(const u of i)u[1](),fl.push(u,t);if(a){for(let u=0;u<fl.length;u+=2)fl[u][0](fl[u+1]);fl.length=0}}}function s(o){r(o(t))}function l(o,a=H){const u=[o,a];return i.add(u),i.size===1&&(n=e(r,s)||H),o(t),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:l}}function An(t,e,n){const i=!Array.isArray(t),r=i?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return t6(n,(l,o)=>{let a=!1;const u=[];let c=0,f=H;const d=()=>{if(c)return;f();const m=e(i?u[0]:u,l,o);s?l(m):f=Gs(m)?m:H},h=r.map((m,p)=>Qn(m,g=>{u[p]=g,c&=~(1<<p),a&&d()},()=>{c|=1<<p}));return a=!0,d(),function(){Gt(h),f(),a=!1}})}var ah=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n6=function(e){return i6(e)&&!r6(e)};function i6(t){return!!t&&typeof t=="object"}function r6(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||o6(t)}var s6=typeof Symbol=="function"&&Symbol.for,l6=s6?Symbol.for("react.element"):60103;function o6(t){return t.$$typeof===l6}function a6(t){return Array.isArray(t)?[]:{}}function ra(t,e){return e.clone!==!1&&e.isMergeableObject(t)?xl(a6(t),t,e):t}function u6(t,e,n){return t.concat(e).map(function(i){return ra(i,n)})}function c6(t,e){if(!e.customMerge)return xl;var n=e.customMerge(t);return typeof n=="function"?n:xl}function f6(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Jg(t){return Object.keys(t).concat(f6(t))}function i2(t,e){try{return e in t}catch{return!1}}function d6(t,e){return i2(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function h6(t,e,n){var i={};return n.isMergeableObject(t)&&Jg(t).forEach(function(r){i[r]=ra(t[r],n)}),Jg(e).forEach(function(r){d6(t,r)||(i2(t,r)&&n.isMergeableObject(e[r])?i[r]=c6(r,n)(t[r],e[r],n):i[r]=ra(e[r],n))}),i}function xl(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||u6,n.isMergeableObject=n.isMergeableObject||n6,n.cloneUnlessOtherwiseSpecified=ra;var i=Array.isArray(e),r=Array.isArray(t),s=i===r;return s?i?n.arrayMerge(t,e,n):h6(t,e,n):ra(e,n)}xl.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(i,r){return xl(i,r,n)},{})};var p6=xl,m6=p6;const r2=yp(m6);var uh=function(t,e){return uh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},uh(t,e)};function Vc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uh(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Et=function(){return Et=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Et.apply(this,arguments)};function g6(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function md(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}var vt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(vt||(vt={}));var xt;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(xt||(xt={}));var Vl;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Vl||(Vl={}));function Xg(t){return t.type===xt.literal}function _6(t){return t.type===xt.argument}function s2(t){return t.type===xt.number}function l2(t){return t.type===xt.date}function o2(t){return t.type===xt.time}function a2(t){return t.type===xt.select}function u2(t){return t.type===xt.plural}function b6(t){return t.type===xt.pound}function c2(t){return t.type===xt.tag}function f2(t){return!!(t&&typeof t=="object"&&t.type===Vl.number)}function ch(t){return!!(t&&typeof t=="object"&&t.type===Vl.dateTime)}var d2=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,v6=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function y6(t){var e={};return t.replace(v6,function(n){var i=n.length;switch(n[0]){case"G":e.era=i===4?"long":i===5?"narrow":"short";break;case"y":e.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][i-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][i-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][i-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][i-1];break;case"s":e.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var w6=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function k6(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(w6).filter(function(d){return d.length>0}),n=[],i=0,r=e;i<r.length;i++){var s=r[i],l=s.split("/");if(l.length===0)throw new Error("Invalid number skeleton");for(var o=l[0],a=l.slice(1),u=0,c=a;u<c.length;u++){var f=c[u];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:a})}return n}function S6(t){return t.replace(/^(.*?)-/,"")}var Qg=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,h2=/^(@+)?(\+|#+)?[rs]?$/g,E6=/(\*)(0+)|(#+)(0+)|(0+)/g,p2=/^(0+)$/;function e_(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(h2,function(n,i,r){return typeof r!="string"?(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length):r==="+"?e.minimumSignificantDigits=i.length:i[0]==="#"?e.maximumSignificantDigits=i.length:(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),e}function m2(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function T6(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!p2.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function t_(t){var e={},n=m2(t);return n||e}function A6(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=r.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=S6(r.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Et(Et(Et({},e),{notation:"scientific"}),r.options.reduce(function(a,u){return Et(Et({},a),t_(u))},{}));continue;case"engineering":e=Et(Et(Et({},e),{notation:"engineering"}),r.options.reduce(function(a,u){return Et(Et({},a),t_(u))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(E6,function(a,u,c,f,d,h){if(u)e.minimumIntegerDigits=c.length;else{if(f&&d)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(p2.test(r.stem)){e.minimumIntegerDigits=r.stem.length;continue}if(Qg.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Qg,function(a,u,c,f,d,h){return c==="*"?e.minimumFractionDigits=u.length:f&&f[0]==="#"?e.maximumFractionDigits=f.length:d&&h?(e.minimumFractionDigits=d.length,e.maximumFractionDigits=d.length+h.length):(e.minimumFractionDigits=u.length,e.maximumFractionDigits=u.length),""});var s=r.options[0];s==="w"?e=Et(Et({},e),{trailingZeroDisplay:"stripIfInteger"}):s&&(e=Et(Et({},e),e_(s)));continue}if(h2.test(r.stem)){e=Et(Et({},e),e_(r.stem));continue}var l=m2(r.stem);l&&(e=Et(Et({},e),l));var o=T6(r.stem);o&&(e=Et(Et({},e),o))}return e}var pu={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function C6(t,e){for(var n="",i=0;i<t.length;i++){var r=t.charAt(i);if(r==="j"){for(var s=0;i+1<t.length&&t.charAt(i+1)===r;)s++,i++;var l=1+(s&1),o=s<2?1:3+(s>>1),a="a",u=N6(e);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=a;for(;l-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function N6(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,i;n!=="root"&&(i=t.maximize().region);var r=pu[i||""]||pu[n||""]||pu["".concat(n,"-001")]||pu["001"];return r[0]}var gd,L6=new RegExp("^".concat(d2.source,"*")),O6=new RegExp("".concat(d2.source,"*$"));function kt(t,e){return{start:t,end:e}}var P6=!!String.prototype.startsWith&&"_a".startsWith("a",1),I6=!!String.fromCodePoint,D6=!!Object.fromEntries,M6=!!String.prototype.codePointAt,R6=!!String.prototype.trimStart,$6=!!String.prototype.trimEnd,F6=!!Number.isSafeInteger,z6=F6?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},fh=!0;try{var j6=_2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");fh=((gd=j6.exec("a"))===null||gd===void 0?void 0:gd[0])==="a"}catch{fh=!1}var n_=P6?function(e,n,i){return e.startsWith(n,i)}:function(e,n,i){return e.slice(i,i+n.length)===n},dh=I6?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i="",r=e.length,s=0,l;r>s;){if(l=e[s++],l>1114111)throw RangeError(l+" is not a valid code point");i+=l<65536?String.fromCharCode(l):String.fromCharCode(((l-=65536)>>10)+55296,l%1024+56320)}return i},i_=D6?Object.fromEntries:function(e){for(var n={},i=0,r=e;i<r.length;i++){var s=r[i],l=s[0],o=s[1];n[l]=o}return n},g2=M6?function(e,n){return e.codePointAt(n)}:function(e,n){var i=e.length;if(!(n<0||n>=i)){var r=e.charCodeAt(n),s;return r<55296||r>56319||n+1===i||(s=e.charCodeAt(n+1))<56320||s>57343?r:(r-55296<<10)+(s-56320)+65536}},B6=R6?function(e){return e.trimStart()}:function(e){return e.replace(L6,"")},U6=$6?function(e){return e.trimEnd()}:function(e){return e.replace(O6,"")};function _2(t,e){return new RegExp(t,e)}var hh;if(fh){var r_=_2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");hh=function(e,n){var i;r_.lastIndex=n;var r=r_.exec(e);return(i=r[1])!==null&&i!==void 0?i:""}}else hh=function(e,n){for(var i=[];;){var r=g2(e,n);if(r===void 0||b2(r)||V6(r))break;i.push(r),n+=r>=65536?2:1}return dh.apply(void 0,i)};var q6=function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,i){for(var r=[];!this.isEOF();){var s=this.char();if(s===123){var l=this.parseArgument(e,i);if(l.err)return l;r.push(l.val)}else{if(s===125&&e>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),r.push({type:xt.pound,location:kt(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(vt.UNMATCHED_CLOSING_TAG,kt(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&ph(this.peek()||0)){var l=this.parseTag(e,n);if(l.err)return l;r.push(l.val)}else{var l=this.parseLiteral(e,n);if(l.err)return l;r.push(l.val)}}}return{val:r,err:null}},t.prototype.parseTag=function(e,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:xt.literal,value:"<".concat(r,"/>"),location:kt(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,n,!0);if(s.err)return s;var l=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ph(this.char()))return this.error(vt.INVALID_TAG,kt(o,this.clonePosition()));var a=this.clonePosition(),u=this.parseTagName();return r!==u?this.error(vt.UNMATCHED_CLOSING_TAG,kt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:xt.tag,value:r,children:l,location:kt(i,this.clonePosition())},err:null}:this.error(vt.INVALID_TAG,kt(o,this.clonePosition())))}else return this.error(vt.UNCLOSED_TAG,kt(i,this.clonePosition()))}else return this.error(vt.INVALID_TAG,kt(i,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&x6(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var i=this.clonePosition(),r="";;){var s=this.tryParseQuote(n);if(s){r+=s;continue}var l=this.tryParseUnquoted(e,n);if(l){r+=l;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var a=kt(i,this.clonePosition());return{val:{type:xt.literal,value:r,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!H6(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return dh.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&e>0?null:(this.bump(),dh(i))},t.prototype.parseArgument=function(e,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(vt.EXPECT_ARGUMENT_CLOSING_BRACE,kt(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(vt.EMPTY_ARGUMENT,kt(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(vt.MALFORMED_ARGUMENT,kt(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(vt.EXPECT_ARGUMENT_CLOSING_BRACE,kt(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:xt.argument,value:r,location:kt(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(vt.EXPECT_ARGUMENT_CLOSING_BRACE,kt(i,this.clonePosition())):this.parseArgumentOptions(e,n,r,i);default:return this.error(vt.MALFORMED_ARGUMENT,kt(i,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),i=hh(this.message,n),r=n+i.length;this.bumpTo(r);var s=this.clonePosition(),l=kt(e,s);return{value:i,location:l}},t.prototype.parseArgumentOptions=function(e,n,i,r){var s,l=this.clonePosition(),o=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(o){case"":return this.error(vt.EXPECT_ARGUMENT_TYPE,kt(l,a));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var d=U6(f.val);if(d.length===0)return this.error(vt.EXPECT_ARGUMENT_STYLE,kt(this.clonePosition(),this.clonePosition()));var h=kt(c,this.clonePosition());u={style:d,styleLocation:h}}var m=this.tryParseArgumentClose(r);if(m.err)return m;var p=kt(r,this.clonePosition());if(u&&n_(u?.style,"::",0)){var g=B6(u.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(g,u.styleLocation);return f.err?f:{val:{type:xt.number,value:i,location:p,style:f.val},err:null}}else{if(g.length===0)return this.error(vt.EXPECT_DATE_TIME_SKELETON,p);var v=g;this.locale&&(v=C6(g,this.locale));var d={type:Vl.dateTime,pattern:v,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?y6(v):{}},b=o==="date"?xt.date:xt.time;return{val:{type:b,value:i,location:p,style:d},err:null}}}return{val:{type:o==="number"?xt.number:o==="date"?xt.date:xt.time,value:i,location:p,style:(s=u?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(vt.EXPECT_SELECT_ARGUMENT_OPTIONS,kt(w,Et({},w)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),S=0;if(o!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,kt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,vt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),k=this.parseIdentifierIfPossible(),S=f.val}var E=this.tryParsePluralOrSelectOptions(e,o,n,k);if(E.err)return E;var m=this.tryParseArgumentClose(r);if(m.err)return m;var P=kt(r,this.clonePosition());return o==="select"?{val:{type:xt.select,value:i,options:i_(E.val),location:P},err:null}:{val:{type:xt.plural,value:i,options:i_(E.val),offset:S,pluralType:o==="plural"?"cardinal":"ordinal",location:P},err:null}}default:return this.error(vt.INVALID_ARGUMENT_TYPE,kt(l,a))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(vt.EXPECT_ARGUMENT_CLOSING_BRACE,kt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(vt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,kt(r,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var i=[];try{i=k6(e)}catch{return this.error(vt.INVALID_NUMBER_SKELETON,n)}return{val:{type:Vl.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?A6(i):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,i,r){for(var s,l=!1,o=[],a=new Set,u=r.value,c=r.location;;){if(u.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(vt.EXPECT_PLURAL_ARGUMENT_SELECTOR,vt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=kt(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(a.has(u))return this.error(n==="select"?vt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:vt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(l=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?vt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:vt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,kt(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,n,i);if(m.err)return m;var p=this.tryParseArgumentClose(h);if(p.err)return p;o.push([u,{value:m.val,location:kt(h,this.clonePosition())}]),a.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,c=s.location}return o.length===0?this.error(n==="select"?vt.EXPECT_SELECT_ARGUMENT_SELECTOR:vt.EXPECT_PLURAL_ARGUMENT_SELECTOR,kt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!l?this.error(vt.MISSING_OTHER_CLAUSE,kt(this.clonePosition(),this.clonePosition())):{val:o,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,l=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)s=!0,l=l*10+(o-48),this.bump();else break}var a=kt(r,this.clonePosition());return s?(l*=i,z6(l)?{val:l,err:null}:this.error(n,a)):this.error(e,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=g2(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(n_(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),i=this.message.indexOf(e,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&b2(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(e>=65536?2:1));return i??null},t}();function ph(t){return t>=97&&t<=122||t>=65&&t<=90}function H6(t){return ph(t)||t===47}function x6(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function b2(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function V6(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function mh(t){t.forEach(function(e){if(delete e.location,a2(e)||u2(e))for(var n in e.options)delete e.options[n].location,mh(e.options[n].value);else s2(e)&&f2(e.style)||(l2(e)||o2(e))&&ch(e.style)?delete e.style.location:c2(e)&&mh(e.children)})}function W6(t,e){e===void 0&&(e={}),e=Et({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new q6(t,e).parse();if(n.err){var i=SyntaxError(vt[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return e?.captureLocation||mh(n.val),n.val}function _d(t,e){var n=e&&e.cache?e.cache:X6,i=e&&e.serializer?e.serializer:J6,r=e&&e.strategy?e.strategy:G6;return r(t,{cache:n,serializer:i})}function Y6(t){return t==null||typeof t=="number"||typeof t=="boolean"}function v2(t,e,n,i){var r=Y6(i)?i:n(i),s=e.get(r);return typeof s>"u"&&(s=t.call(this,i),e.set(r,s)),s}function y2(t,e,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=e.get(r);return typeof s>"u"&&(s=t.apply(this,i),e.set(r,s)),s}function wp(t,e,n,i,r){return n.bind(e,t,i,r)}function G6(t,e){var n=t.length===1?v2:y2;return wp(t,this,n,e.cache.create(),e.serializer)}function K6(t,e){return wp(t,this,y2,e.cache.create(),e.serializer)}function Z6(t,e){return wp(t,this,v2,e.cache.create(),e.serializer)}var J6=function(){return JSON.stringify(arguments)};function kp(){this.cache=Object.create(null)}kp.prototype.get=function(t){return this.cache[t]};kp.prototype.set=function(t,e){this.cache[t]=e};var X6={create:function(){return new kp}},bd={variadic:K6,monadic:Z6},Wl;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Wl||(Wl={}));var Wc=function(t){Vc(e,t);function e(n,i,r){var s=t.call(this,n)||this;return s.code=i,s.originalMessage=r,s}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),s_=function(t){Vc(e,t);function e(n,i,r,s){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Wl.INVALID_VALUE,s)||this}return e}(Wc),Q6=function(t){Vc(e,t);function e(n,i,r){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),Wl.INVALID_VALUE,r)||this}return e}(Wc),eA=function(t){Vc(e,t);function e(n,i){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),Wl.MISSING_VALUE,i)||this}return e}(Wc),Mn;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Mn||(Mn={}));function tA(t){return t.length<2?t:t.reduce(function(e,n){var i=e[e.length-1];return!i||i.type!==Mn.literal||n.type!==Mn.literal?e.push(n):i.value+=n.value,e},[])}function nA(t){return typeof t=="function"}function Du(t,e,n,i,r,s,l){if(t.length===1&&Xg(t[0]))return[{type:Mn.literal,value:t[0].value}];for(var o=[],a=0,u=t;a<u.length;a++){var c=u[a];if(Xg(c)){o.push({type:Mn.literal,value:c.value});continue}if(b6(c)){typeof s=="number"&&o.push({type:Mn.literal,value:n.getNumberFormat(e).format(s)});continue}var f=c.value;if(!(r&&f in r))throw new eA(f,l);var d=r[f];if(_6(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),o.push({type:typeof d=="string"?Mn.literal:Mn.object,value:d});continue}if(l2(c)){var h=typeof c.style=="string"?i.date[c.style]:ch(c.style)?c.style.parsedOptions:void 0;o.push({type:Mn.literal,value:n.getDateTimeFormat(e,h).format(d)});continue}if(o2(c)){var h=typeof c.style=="string"?i.time[c.style]:ch(c.style)?c.style.parsedOptions:i.time.medium;o.push({type:Mn.literal,value:n.getDateTimeFormat(e,h).format(d)});continue}if(s2(c)){var h=typeof c.style=="string"?i.number[c.style]:f2(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),o.push({type:Mn.literal,value:n.getNumberFormat(e,h).format(d)});continue}if(c2(c)){var m=c.children,p=c.value,g=r[p];if(!nA(g))throw new Q6(p,"function",l);var v=Du(m,e,n,i,r,s),b=g(v.map(function(S){return S.value}));Array.isArray(b)||(b=[b]),o.push.apply(o,b.map(function(S){return{type:typeof S=="string"?Mn.literal:Mn.object,value:S}}))}if(a2(c)){var w=c.options[d]||c.options.other;if(!w)throw new s_(c.value,d,Object.keys(c.options),l);o.push.apply(o,Du(w.value,e,n,i,r));continue}if(u2(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Wc(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,Wl.MISSING_INTL_API,l);var k=n.getPluralRules(e,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[k]||c.options.other}if(!w)throw new s_(c.value,d,Object.keys(c.options),l);o.push.apply(o,Du(w.value,e,n,i,r,d-(c.offset||0)));continue}}return tA(o)}function iA(t,e){return e?Et(Et(Et({},t||{}),e||{}),Object.keys(t).reduce(function(n,i){return n[i]=Et(Et({},t[i]),e[i]||{}),n},{})):t}function rA(t,e){return e?Object.keys(t).reduce(function(n,i){return n[i]=iA(t[i],e[i]),n},Et({},t)):t}function vd(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function sA(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:_d(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,md([void 0],n,!1)))},{cache:vd(t.number),strategy:bd.variadic}),getDateTimeFormat:_d(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,md([void 0],n,!1)))},{cache:vd(t.dateTime),strategy:bd.variadic}),getPluralRules:_d(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,md([void 0],n,!1)))},{cache:vd(t.pluralRules),strategy:bd.variadic})}}var w2=function(){function t(e,n,i,r){n===void 0&&(n=t.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(a){var u=s.formatToParts(a);if(u.length===1)return u[0].value;var c=u.reduce(function(f,d){return!f.length||d.type!==Mn.literal||typeof f[f.length-1]!="string"?f.push(d.value):f[f.length-1]+=d.value,f},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(a){return Du(s.ast,s.locales,s.formatters,s.formats,a,void 0,s.message)},this.resolvedOptions=function(){var a;return{locale:((a=s.resolvedLocale)===null||a===void 0?void 0:a.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var l=r||{};l.formatters;var o=g6(l,["formatters"]);this.ast=t.__parse(e,Et(Et({},o),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=rA(t.formats,i),this.formatters=r&&r.formatters||sA(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=W6,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();function lA(t,e){if(e==null)return;if(e in t)return t[e];const n=e.split(".");let i=t;for(let r=0;r<n.length;r++)if(typeof i=="object"){if(r>0){const s=n.slice(r,n.length).join(".");if(s in i){i=i[s];break}}i=i[n[r]]}else i=void 0;return i}const Zr={},oA=(t,e,n)=>n&&(e in Zr||(Zr[e]={}),t in Zr[e]||(Zr[e][t]=n),n),k2=(t,e)=>{if(e==null)return;if(e in Zr&&t in Zr[e])return Zr[e][t];const n=Oa(e);for(let i=0;i<n.length;i++){const r=n[i],s=uA(r,t);if(s)return oA(t,e,s)}};let Sp;const La=Xe({});function aA(t){return Sp[t]||null}function S2(t){return t in Sp}function uA(t,e){if(!S2(t))return null;const n=aA(t);return lA(n,e)}function cA(t){if(t==null)return;const e=Oa(t);for(let n=0;n<e.length;n++){const i=e[n];if(S2(i))return i}}function Ep(t,...e){delete Zr[t],La.update(n=>(n[t]=r2.all([n[t]||{},...e]),n))}const E2=An([La],([t])=>Object.keys(t));La.subscribe(t=>Sp=t);const Mu={};function fA(t,e){Mu[t].delete(e),Mu[t].size===0&&delete Mu[t]}function T2(t){return Mu[t]}function dA(t){return Oa(t).map(e=>{const n=T2(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function Ju(t){return t==null?!1:Oa(t).some(e=>{var n;return(n=T2(e))==null?void 0:n.size})}function hA(t,e){return Promise.all(e.map(i=>(fA(t,i),i().then(r=>r.default||r)))).then(i=>Ep(t,...i))}const Oo={};function A2(t){if(!Ju(t))return t in Oo?Oo[t]:Promise.resolve();const e=dA(t);return Oo[t]=Promise.all(e.map(([n,i])=>hA(n,i))).then(()=>{if(Ju(t))return A2(t);delete Oo[t]}),Oo[t]}var l_=Object.getOwnPropertySymbols,pA=Object.prototype.hasOwnProperty,mA=Object.prototype.propertyIsEnumerable,gA=(t,e)=>{var n={};for(var i in t)pA.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&l_)for(var i of l_(t))e.indexOf(i)<0&&mA.call(t,i)&&(n[i]=t[i]);return n};const _A={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function bA({locale:t,id:e}){console.warn(`[svelte-i18n] The message "${e}" was not found in "${Oa(t).join('", "')}".${Ju(ds())?`
|
|
4
|
+
|
|
5
|
+
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const vA={fallbackLocale:null,loadingDelay:200,formats:_A,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},zo=vA;function Yl(){return zo}function yA(t){const e=t,{formats:n}=e,i=gA(e,["formats"]);let r=t.fallbackLocale;if(t.initialLocale)try{w2.resolveLocale(t.initialLocale)&&(r=t.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}return i.warnOnMissingMessages&&(delete i.warnOnMissingMessages,i.handleMissingMessage==null?i.handleMissingMessage=bA:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(zo,i,{initialLocale:r}),n&&("number"in n&&Object.assign(zo.formats.number,n.number),"date"in n&&Object.assign(zo.formats.date,n.date),"time"in n&&Object.assign(zo.formats.time,n.time)),un.set(r)}const Ru=Xe(!1);var wA=Object.defineProperty,kA=Object.defineProperties,SA=Object.getOwnPropertyDescriptors,o_=Object.getOwnPropertySymbols,EA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,a_=(t,e,n)=>e in t?wA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AA=(t,e)=>{for(var n in e||(e={}))EA.call(e,n)&&a_(t,n,e[n]);if(o_)for(var n of o_(e))TA.call(e,n)&&a_(t,n,e[n]);return t},CA=(t,e)=>kA(t,SA(e));let gh;const Xu=Xe(null);function u_(t){return t.split("-").map((e,n,i)=>i.slice(0,n+1).join("-")).reverse()}function Oa(t,e=Yl().fallbackLocale){const n=u_(t);return e?[...new Set([...n,...u_(e)])]:n}function ds(){return gh??void 0}Xu.subscribe(t=>{gh=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const NA=t=>{if(t&&cA(t)&&Ju(t)){const{loadingDelay:e}=Yl();let n;return typeof window<"u"&&ds()!=null&&e?n=window.setTimeout(()=>Ru.set(!0),e):Ru.set(!0),A2(t).then(()=>{Xu.set(t)}).finally(()=>{clearTimeout(n),Ru.set(!1)})}return Xu.set(t)},un=CA(AA({},Xu),{set:NA}),LA=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Yc=t=>{const e=Object.create(null);return i=>{const r=JSON.stringify(i);return r in e?e[r]:e[r]=t(i)}};var OA=Object.defineProperty,Qu=Object.getOwnPropertySymbols,C2=Object.prototype.hasOwnProperty,N2=Object.prototype.propertyIsEnumerable,c_=(t,e,n)=>e in t?OA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tp=(t,e)=>{for(var n in e||(e={}))C2.call(e,n)&&c_(t,n,e[n]);if(Qu)for(var n of Qu(e))N2.call(e,n)&&c_(t,n,e[n]);return t},lo=(t,e)=>{var n={};for(var i in t)C2.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Qu)for(var i of Qu(t))e.indexOf(i)<0&&N2.call(t,i)&&(n[i]=t[i]);return n};const sa=(t,e)=>{const{formats:n}=Yl();if(t in n&&e in n[t])return n[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},PA=Yc(t=>{var e=t,{locale:n,format:i}=e,r=lo(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return i&&(r=sa("number",i)),new Intl.NumberFormat(n,r)}),IA=Yc(t=>{var e=t,{locale:n,format:i}=e,r=lo(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return i?r=sa("date",i):Object.keys(r).length===0&&(r=sa("date","short")),new Intl.DateTimeFormat(n,r)}),DA=Yc(t=>{var e=t,{locale:n,format:i}=e,r=lo(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return i?r=sa("time",i):Object.keys(r).length===0&&(r=sa("time","short")),new Intl.DateTimeFormat(n,r)}),MA=(t={})=>{var e=t,{locale:n=ds()}=e,i=lo(e,["locale"]);return PA(Tp({locale:n},i))},RA=(t={})=>{var e=t,{locale:n=ds()}=e,i=lo(e,["locale"]);return IA(Tp({locale:n},i))},$A=(t={})=>{var e=t,{locale:n=ds()}=e,i=lo(e,["locale"]);return DA(Tp({locale:n},i))},FA=Yc((t,e=ds())=>new w2(t,e,Yl().formats,{ignoreTag:Yl().ignoreTag})),zA=(t,e={})=>{var n,i,r,s;let l=e;typeof t=="object"&&(l=t,t=l.id);const{values:o,locale:a=ds(),default:u}=l;if(a==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=k2(t,a);if(!c)c=(s=(r=(i=(n=Yl()).handleMissingMessage)==null?void 0:i.call(n,{locale:a,id:t,defaultValue:u}))!=null?r:u)!=null?s:t;else if(typeof c!="string")return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c;if(!o)return c;let f=c;try{f=FA(c,a).format(o)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,d.message)}return f},jA=(t,e)=>$A(e).format(t),BA=(t,e)=>RA(e).format(t),UA=(t,e)=>MA(e).format(t),qA=(t,e=ds())=>k2(t,e),ue=An([un,La],()=>zA);An([un],()=>jA);An([un],()=>BA);An([un],()=>UA);An([un,La],()=>qA);function HA(t){ye(t,"svelte-1tdjcqs",".icon.small-arrow.svelte-1tdjcqs{overflow:hidden;width:12px;text-indent:-6px}")}function xA(t){let e,n,i,r,s=[{class:i="sui icon material-symbols-outlined "+t[0]},{"aria-hidden":r=!("aria-label"in t[2])},t[2]],l={};for(let o=0;o<s.length;o+=1)l=Z(l,s[o]);return{c(){e=F("span"),n=G(t[1]),je(e,l),re(e,"svelte-1tdjcqs",!0)},m(o,a){A(o,e,a),$(e,n)},p(o,[a]){a&2&&qT(n,o[1],l.contenteditable),je(e,l=Ge(s,[a&1&&i!==(i="sui icon material-symbols-outlined "+o[0])&&{class:i},a&4&&r!==(r=!("aria-label"in o[2]))&&{"aria-hidden":r},a&4&&o[2]])),re(e,"svelte-1tdjcqs",!0)},i:H,o:H,d(o){o&&T(e)}}}function VA(t,e,n){const i=["class","name"];let r=he(e,i),{class:s=""}=e,{name:l=""}=e;return t.$$set=o=>{e=Z(Z({},e),tt(o)),n(2,r=he(e,i)),"class"in o&&n(0,s=o.class),"name"in o&&n(1,l=o.name)},[s,l,r]}class xe extends ie{constructor(e){super(),ne(this,e,VA,xA,te,{class:0,name:1},HA)}}function WA(t){ye(t,"svelte-1lvgxwx",".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)}")}const YA=t=>({}),f_=t=>({});function GA(t){let e,n;return e=new xe({props:{name:t[0]==="success"?"check_circle":t[0]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.name=i[0]==="success"?"check_circle":i[0]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function KA(t){let e,n,i,r;const s=t[3].icon,l=ke(s,t,t[2],f_),o=l||GA(t),a=t[3].default,u=ke(a,t,t[2],null);let c=[{role:"alert"},{class:i="sui alert "+t[0]},t[1]],f={};for(let d=0;d<c.length;d+=1)f=Z(f,c[d]);return{c(){e=F("div"),o&&o.c(),n=j(),u&&u.c(),je(e,f),re(e,"svelte-1lvgxwx",!0)},m(d,h){A(d,e,h),o&&o.m(e,null),$(e,n),u&&u.m(e,null),r=!0},p(d,[h]){l?l.p&&(!r||h&4)&&Ee(l,s,d,d[2],r?Se(s,d[2],h,YA):Te(d[2]),f_):o&&o.p&&(!r||h&1)&&o.p(d,r?h:-1),u&&u.p&&(!r||h&4)&&Ee(u,a,d,d[2],r?Se(a,d[2],h,null):Te(d[2]),null),je(e,f=Ge(c,[{role:"alert"},(!r||h&1&&i!==(i="sui alert "+d[0]))&&{class:i},h&2&&d[1]])),re(e,"svelte-1lvgxwx",!0)},i(d){r||(_(o,d),_(u,d),r=!0)},o(d){y(o,d),y(u,d),r=!1},d(d){d&&T(e),o&&o.d(d),u&&u.d(d)}}}function ZA(t,e,n){const i=["status"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{status:o="error"}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"status"in a&&n(0,o=a.status),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class Ii extends ie{constructor(e){super(),ne(this,e,ZA,KA,te,{status:0},WA)}}function JA(t){ye(t,"svelte-2fx5on",".button-group.svelte-2fx5on{display:inline-flex;align-items:center}")}function XA(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"group"},{class:n="sui button-group "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-2fx5on",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"group"},(!i||u&1&&n!==(n="sui button-group "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-2fx5on",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function QA(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class eC extends ie{constructor(e){super(),ne(this,e,QA,XA,te,{class:0},JA)}}const hs=(t=1e3)=>new Promise(e=>{window.setTimeout(()=>{e(void 0)},t)});function tC(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const nC="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",iC="0123456789ABCDEFGHIJKLMNOPQRSTUV",rC="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function sC(t,e,n){n=n||{};let i,r;switch(e){case"RFC3548":case"RFC4648":i=nC,r=!0;break;case"RFC4648-HEX":i=iC,r=!0;break;case"Crockford":i=rC,r=!1;break;default:throw new Error("Unknown base32 variant: "+e)}const s=n.padding!==void 0?n.padding:r,l=tC(t);let o=0,a=0,u="";for(let c=0;c<l.byteLength;c++)for(a=a<<8|l.getUint8(c),o+=8;o>=5;)u+=i[a>>>o-5&31],o-=5;if(o>0&&(u+=i[a<<5-o&31]),s)for(;u.length%8!==0;)u+="=";return u}const ki=t=>{const e=globalThis.crypto.randomUUID();return t==="short"?e.split("-").pop():t==="shorter"?e.split("-").shift():typeof t=="number"?e.split("-").join("").slice(0,t):e},_h=()=>{const t=ki().replaceAll("-",""),{buffer:e}=new Uint8Array((t.match(/../g)??[]).map(n=>parseInt(n,16)));return sC(e,"RFC4648",{padding:!1}).toLowerCase()},la=async(t,{algorithm:e="SHA-1",format:n="hex"}={})=>{const i=typeof t=="string"?new TextEncoder().encode(t):await t.arrayBuffer(),r=await globalThis.crypto.subtle.digest(e,i);return n==="binary"?Array.from(new Uint8Array(r),s=>String.fromCharCode(s)).join(""):Array.from(new Uint8Array(r),s=>s.toString(16).padStart(2,"0")).join("")},ii=(t="e",e=7)=>[t,ki(e)].join("-"),Ni=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([i])=>{i.isIntersecting&&(n.disconnect(),e(void 0))});window.requestAnimationFrame(()=>{n.observe(t)})})};let lC=class{open=Xe(!1);style=Xe({inset:void 0,zIndex:void 0,width:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:i})=>{if(!n||!i)return;const{scrollHeight:r,scrollWidth:s}=this.popupElement.querySelector(".content"),l=n.top-8,o=i.height-n.bottom-8;let{position:a}=this,u;a.startsWith("bottom-")&&r>o&&(l>o?(a=a.replace("bottom-","top-"),u=l):u=o),a.endsWith("-left")&&n.left+s>i.width-8&&(a=a.replace("-left","-right"));const c=a.startsWith("bottom-")?`${Math.round(n.bottom)}px`:a.endsWith("-top")?`${Math.round(n.top)}px`:"auto",f=a.startsWith("left-")?`${Math.round(i.width-n.left)}px`:a.endsWith("-right")?`${Math.round(i.width-n.right)}px`:"auto",d=a.startsWith("top-")?`${Math.round(i.height-n.top)}px`:a.endsWith("-bottom")?`${Math.round(i.height-n.bottom)}px`:"auto",h=a.startsWith("right-")?`${Math.round(n.right)}px`:a.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m=this.anchorElement.closest(".popup"),p={inset:[c,f,d,h].join(" "),zIndex:m?Number(m.style.zIndex)+1:1e3,width:`${Math.round(n.width)}px`,height:u?`${Math.round(u)}px`:"auto"};JSON.stringify(p)!==JSON.stringify(le(this.style))&&this.style.set(p)})});constructor(e,n,i,r){this.anchorElement=e,this.popupElement=n,this.position=i,this.positionBaseElement=r??e,this.id=ii("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),this.anchorElement.addEventListener("click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!le(this.open))}),this.anchorElement.addEventListener("keydown",s=>{const{key:l,ctrlKey:o,metaKey:a,shiftKey:u,altKey:c}=s,f=u||c||o||a;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(l)&&!f&&(s.preventDefault(),s.stopPropagation(),this.open.set(!le(this.open)))}),this.popupElement.addEventListener("click",s=>{s.stopPropagation();const l=s.target;le(this.open)&&(l===this.popupElement||l.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),this.popupElement.addEventListener("keydown",s=>{const{key:l,ctrlKey:o,metaKey:a,shiftKey:u,altKey:c}=s;l==="Escape"&&!(u||c||o||a)&&(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))})}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)}};const oC=(...t)=>new lC(...t);function aC(t){ye(t,"svelte-1vbjznp","dialog.svelte-1vbjznp{position:fixed;inset:0;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-1vbjznp::backdrop{background:transparent}dialog.backdrop.svelte-1vbjznp{background-color:var(--sui-popup-backdrop-color)}dialog.open.svelte-1vbjznp{transition-duration:50ms;opacity:1}dialog.svelte-1vbjznp:not(.open){transition-duration:400ms;opacity:0}dialog.svelte-1vbjznp:not(.active){pointer-events:none !important}dialog.svelte-1vbjznp:not(.active) *{pointer-events:none !important}")}const uC=t=>({}),d_=t=>({});function h_(t){let e;const n=t[14].default,i=ke(n,t,t[13],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&8192)&&Ee(i,n,r,r[13],e?Se(n,r[13],s,null):Te(r[13]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function cC(t){let e,n,i,r,s,l;const o=t[14]["extra-content"],a=ke(o,t,t[13],d_);let u=(t[10]||t[7])&&h_(t),c=[{role:t[3]},{class:i="sui modal "+t[2]},t[11]],f={};for(let d=0;d<c.length;d+=1)f=Z(f,c[d]);return{c(){e=F("dialog"),a&&a.c(),n=j(),u&&u.c(),je(e,f),re(e,"backdrop",t[4]),re(e,"open",t[8]),re(e,"active",t[9]),re(e,"svelte-1vbjznp",!0)},m(d,h){A(d,e,h),a&&a.m(e,null),$(e,n),u&&u.m(e,null),t[15](e),r=!0,s||(l=[Fe(e,"click",t[16]),Fe(e,"cancel",Kr(t[17]))],s=!0)},p(d,[h]){a&&a.p&&(!r||h&8192)&&Ee(a,o,d,d[13],r?Se(o,d[13],h,uC):Te(d[13]),d_),d[10]||d[7]?u?(u.p(d,h),h&1152&&_(u,1)):(u=h_(d),u.c(),_(u,1),u.m(e,null)):u&&(x(),y(u,1,1,()=>{u=null}),V()),je(e,f=Ge(c,[(!r||h&8)&&{role:d[3]},(!r||h&4&&i!==(i="sui modal "+d[2]))&&{class:i},h&2048&&d[11]])),re(e,"backdrop",d[4]),re(e,"open",d[8]),re(e,"active",d[9]),re(e,"svelte-1vbjznp",!0)},i(d){r||(_(a,d),_(u),r=!0)},o(d){y(a,d),y(u),r=!1},d(d){d&&T(e),a&&a.d(d),u&&u.d(),t[15](null),s=!1,Gt(l)}}}function fC(t,e,n){const i=["class","role","open","showBackdrop","lightDismiss","escapeDismiss","keepContent","dialog","close"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{role:a="dialog"}=e,{open:u=!1}=e,{showBackdrop:c=!1}=e,{lightDismiss:f=!1}=e,{escapeDismiss:d=!0}=e,{keepContent:h=!1}=e,{dialog:m=void 0}=e;const p=z=>{m&&(n(1,m.returnValue=z,m),n(0,u=!1))},g=sn();let v=!1,b=!1,w=!1;const k=async()=>new Promise(z=>{const R=U=>{U.target===m&&(m.removeEventListener("transitionend",R),z())};m?.addEventListener("transitionend",R)}),S=async()=>{m&&(g("opening"),(document.querySelector(".sui.app-shell")??document.body).appendChild(m),n(10,w=!0),m.showModal(),g("open"),await hs(100),n(8,v=!0),await k(),n(9,b=!0))},E=async()=>{m&&(g("closing"),n(9,b=!1),n(8,v=!1),await k(),n(10,w=!1),m.close(),m.remove(),["ok","cancel"].includes(m.returnValue)&&g(m?.returnValue),g("close",m.returnValue),n(1,m.returnValue="",m))},P=()=>{m&&(u?S():E())};Ut(()=>(m?.remove(),()=>{m?.close(),m?.remove()}));function M(z){ae[z?"unshift":"push"](()=>{m=z,n(1,m)})}const I=({target:z})=>{m&&f&&z?.matches("dialog")&&(n(1,m.returnValue="cancel",m),n(0,u=!1))},D=()=>{m&&d&&(n(1,m.returnValue="cancel",m),n(0,u=!1))};return t.$$set=z=>{e=Z(Z({},e),tt(z)),n(11,r=he(e,i)),"class"in z&&n(2,o=z.class),"role"in z&&n(3,a=z.role),"open"in z&&n(0,u=z.open),"showBackdrop"in z&&n(4,c=z.showBackdrop),"lightDismiss"in z&&n(5,f=z.lightDismiss),"escapeDismiss"in z&&n(6,d=z.escapeDismiss),"keepContent"in z&&n(7,h=z.keepContent),"dialog"in z&&n(1,m=z.dialog),"$$scope"in z&&n(13,l=z.$$scope)},t.$$.update=()=>{t.$$.dirty&1&&P()},[u,m,o,a,c,f,d,h,v,b,w,r,p,l,s,M,I,D]}class L2 extends ie{constructor(e){super(),ne(this,e,fC,cC,te,{class:2,role:3,open:0,showBackdrop:4,lightDismiss:5,escapeDismiss:6,keepContent:7,dialog:1,close:12},aC)}get class(){return this.$$.ctx[2]}set class(e){this.$$set({class:e}),Je()}get role(){return this.$$.ctx[3]}set role(e){this.$$set({role:e}),Je()}get open(){return this.$$.ctx[0]}set open(e){this.$$set({open:e}),Je()}get showBackdrop(){return this.$$.ctx[4]}set showBackdrop(e){this.$$set({showBackdrop:e}),Je()}get lightDismiss(){return this.$$.ctx[5]}set lightDismiss(e){this.$$set({lightDismiss:e}),Je()}get escapeDismiss(){return this.$$.ctx[6]}set escapeDismiss(e){this.$$set({escapeDismiss:e}),Je()}get keepContent(){return this.$$.ctx[7]}set keepContent(e){this.$$set({keepContent:e}),Je()}get dialog(){return this.$$.ctx[1]}set dialog(e){this.$$set({dialog:e}),Je()}get close(){return this.$$.ctx[12]}}function dC(t){ye(t,"svelte-14bp0f8",".content.svelte-14bp0f8{position:absolute;overflow-y:auto;outline-width:0 !important;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-14bp0f8{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-14bp0f8 .sui.menu{border-width:0;border-radius:0;padding:0;background-color:transparent}.content.listbox.svelte-14bp0f8{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-14bp0f8 .sui.listbox{border-width:0;border-radius:0;padding:0;background-color:transparent}.content.touch.svelte-14bp0f8{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-14bp0f8{transform:scale(100%) !important}dialog:not(.open) .content.touch.svelte-14bp0f8{transform:scale(90%)}.content.touch.combobox.svelte-14bp0f8 .sui.listbox{gap:4px;padding:8px 4px !important}dialog.open .content.svelte-14bp0f8{transition-duration:50ms;opacity:1;transform:translateY(2px)}dialog:not(.open) .content.svelte-14bp0f8{transition-duration:300ms;opacity:0;transform:translateY(-8px)}")}const hC=t=>({}),p_=t=>({slot:"extra-content"});function pC(t){let e,n,i;const r=t[16].default,s=ke(r,t,t[27],null);return{c(){e=F("div"),s&&s.c(),C(e,"role","none"),C(e,"class",n="content "+t[2]+" "+t[5]+" svelte-14bp0f8"),re(e,"touch",t[7]),jt(e,"inset",t[9].inset),jt(e,"z-index",t[9].zIndex),jt(e,"min-width",t[9].width),jt(e,"max-height",t[9].height),jt(e,"visibility",t[9].inset?void 0:"hidden")},m(l,o){A(l,e,o),s&&s.m(e,null),t[17](e),i=!0},p(l,o){s&&s.p&&(!i||o&134217728)&&Ee(s,r,l,l[27],i?Se(r,l[27],o,null):Te(l[27]),null),(!i||o&36&&n!==(n="content "+l[2]+" "+l[5]+" svelte-14bp0f8"))&&C(e,"class",n),(!i||o&164)&&re(e,"touch",l[7]),o&512&&jt(e,"inset",l[9].inset),o&512&&jt(e,"z-index",l[9].zIndex),o&512&&jt(e,"min-width",l[9].width),o&512&&jt(e,"max-height",l[9].height),o&512&&jt(e,"visibility",l[9].inset?void 0:"hidden")},i(l){i||(_(s,l),i=!0)},o(l){y(s,l),i=!1},d(l){l&&T(e),s&&s.d(l),t[17](null)}}}function mC(t){let e;const n=t[16]["extra-content"],i=ke(n,t,t[27],p_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&134217728)&&Ee(i,n,r,r[27],e?Se(n,r[27],s,hC):Te(r[27]),p_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function gC(t){let e,n,i;const r=[{role:"none"},{class:"popup"},{showBackdrop:t[3]??t[7]},{lightDismiss:!0},{keepContent:!0},t[10]];function s(o){t[18](o)}let l={$$slots:{"extra-content":[mC],default:[pC]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[8]!==void 0&&(l.open=t[8]),e=new L2({props:l}),ae.push(()=>Re(e,"open",s)),t[19](e),e.$on("opening",t[20]),e.$on("open",t[21]),e.$on("ok",t[22]),e.$on("cancel",t[23]),e.$on("closing",t[24]),e.$on("close",t[25]),e.$on("open",t[26]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&1160?Ge(r,[r[0],r[1],a&136&&{showBackdrop:o[3]??o[7]},r[3],r[4],a&1024&&qt(o[10])]):{};a&134218406&&(u.$$scope={dirty:a,ctx:o}),!n&&a&256&&(n=!0,u.open=o[8],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){t[19](null),L(e,o)}}}function _C(t,e,n){let i;const r=["class","open","showBackdrop","anchor","content","position","positionBaseElement","touchOptimized"];let s=he(e,r),l,o=H,a=()=>(o(),o=Qn(p,q=>n(8,l=q)),p),u,c=H,f=()=>(c(),c=Qn(I,q=>n(9,u=q)),I);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>c());let{$$slots:d={},$$scope:h}=e,{class:m=""}=e,{open:p=Xe(!1)}=e;a();let{showBackdrop:g=!1}=e,{anchor:v}=e,{content:b=void 0}=e,{position:w="bottom-left"}=e,{positionBaseElement:k=void 0}=e,{touchOptimized:S=!1}=e,E,P=!1,M,I=Xe({inset:void 0,zIndex:void 0,width:void 0,height:void 0});f(),Ut(()=>{n(15,P=globalThis.matchMedia("(pointer: coarse)").matches)});function D(q){ae[q?"unshift":"push"](()=>{b=q,n(1,b)})}function z(q){l=q,p.set(l)}function R(q){ae[q?"unshift":"push"](()=>{E=q,n(4,E)})}function U(q){fe.call(this,t,q)}function W(q){fe.call(this,t,q)}function ee(q){fe.call(this,t,q)}function K(q){fe.call(this,t,q)}function ve(q){fe.call(this,t,q)}function me(q){fe.call(this,t,q)}const se=async()=>{if(await hs(100),!b)return;const q=b.querySelector('[tabindex]:not([aria-disabled="true"])');q?q.focus():(n(1,b.tabIndex=-1,b),b.focus())};return t.$$set=q=>{e=Z(Z({},e),tt(q)),n(10,s=he(e,r)),"class"in q&&n(2,m=q.class),"open"in q&&a(n(0,p=q.open)),"showBackdrop"in q&&n(3,g=q.showBackdrop),"anchor"in q&&n(11,v=q.anchor),"content"in q&&n(1,b=q.content),"position"in q&&n(12,w=q.position),"positionBaseElement"in q&&n(13,k=q.positionBaseElement),"touchOptimized"in q&&n(14,S=q.touchOptimized),"$$scope"in q&&n(27,h=q.$$scope)},t.$$.update=()=>{t.$$.dirty&14352&&v&&E?.dialog&&(a(n(0,{open:p,style:I}=oC(v,E.dialog,w,k),p,f(n(6,I)))),n(5,M=v.getAttribute("aria-haspopup")??void 0)),t.$$.dirty&49152&&n(7,i=S&&P)},[p,b,m,g,E,M,I,i,l,u,s,v,w,k,S,P,d,D,z,R,U,W,ee,K,ve,me,se,h]}class Gc extends ie{constructor(e){super(),ne(this,e,_C,gC,te,{class:2,open:0,showBackdrop:3,anchor:11,content:1,position:12,positionBaseElement:13,touchOptimized:14},dC)}get class(){return this.$$.ctx[2]}set class(e){this.$$set({class:e}),Je()}get open(){return this.$$.ctx[0]}set open(e){this.$$set({open:e}),Je()}get showBackdrop(){return this.$$.ctx[3]}set showBackdrop(e){this.$$set({showBackdrop:e}),Je()}get anchor(){return this.$$.ctx[11]}set anchor(e){this.$$set({anchor:e}),Je()}get content(){return this.$$.ctx[1]}set content(e){this.$$set({content:e}),Je()}get position(){return this.$$.ctx[12]}set position(e){this.$$set({position:e}),Je()}get positionBaseElement(){return this.$$.ctx[13]}set positionBaseElement(e){this.$$set({positionBaseElement:e}),Je()}get touchOptimized(){return this.$$.ctx[14]}set touchOptimized(e){this.$$set({touchOptimized:e}),Je()}}const O2=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),bh=(t,e)=>{const{ctrlKey:n,metaKey:i,altKey:r,shiftKey:s,code:l}=t,o=l.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(a=>{const u=a.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!i||u.includes("Alt")&&!r||u.includes("Shift")&&!s||!u.includes("Ctrl")&&n||!u.includes("Meta")&&i||!u.includes("Alt")&&r||!u.includes("Shift")&&s?!1:u.filter(c=>!["Ctrl","Meta","Alt","Shift"].includes(c)).every(c=>c.toUpperCase()===o.toUpperCase())})},P2=(t,e="")=>{let n;const i=l=>{const{disabled:o,offsetParent:a}=t,{top:u,left:c}=t.getBoundingClientRect();!o&&a&&document.elementsFromPoint(c+4,u+4).includes(t)&&bh(l,n)&&(l.preventDefault(),t.focus(),t.click())},r=()=>{globalThis.removeEventListener("keydown",i),t.removeAttribute("aria-keyshortcuts")},s=()=>{n=e?e.replace(/\bAccel\b/g,O2()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",i),t.setAttribute("aria-keyshortcuts",n))};return s(),{update(l){r(),s()},destroy(){r()}}};function bC(t){ye(t,"svelte-1cg7856","button.svelte-1cg7856{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:normal;text-align:left;white-space:nowrap;cursor:pointer;transition:all 200ms}button.svelte-1cg7856>*{pointer-events:none}button.svelte-1cg7856:not(:disabled):focus-visible{z-index:1}button[hidden].svelte-1cg7856{display:none !important}button.svelte-1cg7856.primary,button.svelte-1cg7856.secondary,button.svelte-1cg7856.tertiary,button.svelte-1cg7856.ghost{justify-content:center;border-width:1px}button.svelte-1cg7856.primary .label:only-child,button.svelte-1cg7856.secondary .label:only-child,button.svelte-1cg7856.tertiary .label:only-child,button.svelte-1cg7856.ghost .label:only-child{padding:0 4px}button.svelte-1cg7856.primary{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, normal)}button.svelte-1cg7856.primary:hover,button.svelte-1cg7856.primary:focus-visible,button.primary[aria-expanded=true].svelte-1cg7856{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.svelte-1cg7856.primary: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.svelte-1cg7856.secondary{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, normal)}button.svelte-1cg7856.secondary:hover,button.svelte-1cg7856.secondary:focus-visible,button.secondary[aria-expanded=true].svelte-1cg7856{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.svelte-1cg7856.secondary: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-1cg7856{color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color))}button.svelte-1cg7856.tertiary{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, normal)}button.svelte-1cg7856.tertiary:hover,button.svelte-1cg7856.tertiary:focus-visible,button.tertiary[aria-expanded=true].svelte-1cg7856{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.svelte-1cg7856.tertiary: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-1cg7856{color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color))}button.svelte-1cg7856.ghost{font-weight:var(--sui-button-ghost-font-weight, normal)}button.svelte-1cg7856.ghost:hover,button.svelte-1cg7856.ghost:focus-visible,button.ghost[aria-expanded=true].svelte-1cg7856{color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color))}button.svelte-1cg7856.ghost: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-1cg7856{color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color))}button.svelte-1cg7856.link{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.svelte-1cg7856.link .label{padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);white-space:normal}button.svelte-1cg7856.link:hover .label,button.svelte-1cg7856.link:focus .label,button.svelte-1cg7856.link:active .label{text-decoration:var(--sui-button-link-text-decoration-focus, underline)}button.svelte-1cg7856.small{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.svelte-1cg7856.small .icon{font-size:var(--sui-font-size-large)}button.svelte-1cg7856.medium{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.svelte-1cg7856.large{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.svelte-1cg7856.pill{border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px)}button.svelte-1cg7856.flex{width:-moz-available;width:-webkit-fill-available;width:stretch}button.svelte-1cg7856.iconic{justify-content:center;padding:0;aspect-ratio:1/1}button.svelte-1cg7856.danger{background-color:var(--sui-error-background-color)}button.svelte-1cg7856 .label{padding:0 4px}button.svelte-1cg7856:has([slot=start-icon] + [slot=end-icon]){gap:0}")}const vC=t=>({}),m_=t=>({}),yC=t=>({}),g_=t=>({}),wC=t=>({}),__=t=>({});function kC(t){let e,n,i=t[11]&&b_(t);const r=t[23].default,s=ke(r,t,t[42],null);return{c(){i&&i.c(),e=j(),s&&s.c()},m(l,o){i&&i.m(l,o),A(l,e,o),s&&s.m(l,o),n=!0},p(l,o){l[11]?i?i.p(l,o):(i=b_(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),s&&s.p&&(!n||o[1]&2048)&&Ee(s,r,l,l[42],n?Se(r,l[42],o,null):Te(l[42]),null)},i(l){n||(_(s,l),n=!0)},o(l){y(s,l),n=!1},d(l){l&&T(e),i&&i.d(l),s&&s.d(l)}}}function SC(t){let e,n,i,r;const s=[TC,EC],l=[];function o(a,u){return a[11]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function b_(t){let e,n;return{c(){e=F("span"),n=G(t[11]),C(e,"role","none"),C(e,"class","label")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r[0]&2048&&X(n,i[11])},d(i){i&&T(e)}}}function EC(t){let e,n;const i=t[23].default,r=ke(i,t,t[42],null);return{c(){e=F("span"),r&&r.c(),C(e,"role","none"),C(e,"class","label")},m(s,l){A(s,e,l),r&&r.m(e,null),n=!0},p(s,l){r&&r.p&&(!n||l[1]&2048)&&Ee(r,i,s,s[42],n?Se(i,s[42],l,null):Te(s[42]),null)},i(s){n||(_(r,s),n=!0)},o(s){y(r,s),n=!1},d(s){s&&T(e),r&&r.d(s)}}}function TC(t){let e,n;return{c(){e=F("span"),n=G(t[11]),C(e,"role","none"),C(e,"class","label")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r[0]&2048&&X(n,i[11])},i:H,o:H,d(i){i&&T(e)}}}function v_(t){let e,n,i={anchor:t[0],position:t[17],showBackdrop:t[18],touchOptimized:!0,$$slots:{default:[AC]},$$scope:{ctx:t}};return e=new Gc({props:i}),t[41](e),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s[0]&1&&(l.anchor=r[0]),s[0]&131072&&(l.position=r[17]),s[0]&262144&&(l.showBackdrop=r[18]),s[1]&2048&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[41](null),L(e,r)}}}function AC(t){let e;const n=t[23].popup,i=ke(n,t,t[42],m_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s[1]&2048)&&Ee(i,n,r,r[42],e?Se(n,r[42],s,vC):Te(r[42]),m_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function CC(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m;const p=t[23]["start-icon"],g=ke(p,t,t[42],__),v=[SC,kC],b=[];function w(I,D){return I[12]==="link"?0:1}i=w(t),r=b[i]=v[i](t);const k=t[23]["end-icon"],S=ke(k,t,t[42],g_);let E=[{class:l="sui button "+(t[12]??"")+" "+t[13]+" "+t[1]},{type:t[2]},{name:t[4]},{value:t[5]},{hidden:o=t[6]||void 0},{disabled:a=t[7]||void 0},{role:t[3]},{"aria-hidden":t[6]},{"aria-disabled":t[7]},{"aria-readonly":t[8]},{"aria-pressed":t[9]},t[21]],P={};for(let I=0;I<E.length;I+=1)P=Z(P,E[I]);let M=t[22].popup&&v_(t);return{c(){e=F("button"),g&&g.c(),n=j(),r.c(),s=j(),S&&S.c(),c=j(),M&&M.c(),f=Q(),je(e,P),re(e,"iconic",t[14]),re(e,"pill",t[15]),re(e,"flex",t[16]),re(e,"svelte-1cg7856",!0)},m(I,D){A(I,e,D),g&&g.m(e,null),$(e,n),b[i].m(e,null),$(e,s),S&&S.m(e,null),e.autofocus&&e.focus(),t[38](e),A(I,c,D),M&&M.m(I,D),A(I,f,D),d=!0,h||(m=[Ks(u=P2.call(null,e,t[10])),Fe(e,"mouseenter",t[24]),Fe(e,"mouseleave",t[25]),Fe(e,"click",t[26]),Fe(e,"dblclick",t[27]),Fe(e,"dragover",t[28]),Fe(e,"dragleave",t[29]),Fe(e,"dragend",t[30]),Fe(e,"drop",t[31]),Fe(e,"keydown",t[32]),Fe(e,"keyup",t[33]),Fe(e,"keypress",t[34]),Fe(e,"focus",t[35]),Fe(e,"blur",t[36]),Fe(e,"select",t[39]),Fe(e,"change",t[40]),Fe(e,"toggle",t[37])],h=!0)},p(I,D){g&&g.p&&(!d||D[1]&2048)&&Ee(g,p,I,I[42],d?Se(p,I[42],D,wC):Te(I[42]),__);let z=i;i=w(I),i===z?b[i].p(I,D):(x(),y(b[z],1,1,()=>{b[z]=null}),V(),r=b[i],r?r.p(I,D):(r=b[i]=v[i](I),r.c()),_(r,1),r.m(e,s)),S&&S.p&&(!d||D[1]&2048)&&Ee(S,k,I,I[42],d?Se(k,I[42],D,yC):Te(I[42]),g_),je(e,P=Ge(E,[(!d||D[0]&12290&&l!==(l="sui button "+(I[12]??"")+" "+I[13]+" "+I[1]))&&{class:l},(!d||D[0]&4)&&{type:I[2]},(!d||D[0]&16)&&{name:I[4]},(!d||D[0]&32)&&{value:I[5]},(!d||D[0]&64&&o!==(o=I[6]||void 0))&&{hidden:o},(!d||D[0]&128&&a!==(a=I[7]||void 0))&&{disabled:a},(!d||D[0]&8)&&{role:I[3]},(!d||D[0]&64)&&{"aria-hidden":I[6]},(!d||D[0]&128)&&{"aria-disabled":I[7]},(!d||D[0]&256)&&{"aria-readonly":I[8]},(!d||D[0]&512)&&{"aria-pressed":I[9]},D[0]&2097152&&I[21]])),u&&Gs(u.update)&&D[0]&1024&&u.update.call(null,I[10]),re(e,"iconic",I[14]),re(e,"pill",I[15]),re(e,"flex",I[16]),re(e,"svelte-1cg7856",!0),I[22].popup?M?(M.p(I,D),D[0]&4194304&&_(M,1)):(M=v_(I),M.c(),_(M,1),M.m(f.parentNode,f)):M&&(x(),y(M,1,1,()=>{M=null}),V())},i(I){d||(_(g,I),_(r),_(S,I),_(M),d=!0)},o(I){y(g,I),y(r),y(S,I),y(M),d=!1},d(I){I&&(T(e),T(c),T(f)),g&&g.d(I),b[i].d(),S&&S.d(I),t[38](null),M&&M.d(I),h=!1,Gt(m)}}}function NC(t,e,n){const i=["element","class","type","role","name","value","hidden","disabled","readonly","pressed","keyShortcuts","label","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop"];let r=he(e,i),{$$slots:s={},$$scope:l}=e;const o=Aa(s);let{element:a=void 0}=e,{class:u=""}=e,{type:c="button"}=e,{role:f="button"}=e,{name:d=void 0}=e,{value:h=void 0}=e,{hidden:m=void 0}=e,{disabled:p=!1}=e,{readonly:g=void 0}=e,{pressed:v=void 0}=e,{keyShortcuts:b=void 0}=e,{label:w=""}=e,{variant:k=void 0}=e,{size:S="medium"}=e,{iconic:E=!1}=e,{pill:P=!1}=e,{flex:M=!1}=e,{popupPosition:I="bottom-left"}=e,{showPopupBackdrop:D=!1}=e;const z=sn();let R;function U(oe){fe.call(this,t,oe)}function W(oe){fe.call(this,t,oe)}function ee(oe){fe.call(this,t,oe)}function K(oe){fe.call(this,t,oe)}function ve(oe){fe.call(this,t,oe)}function me(oe){fe.call(this,t,oe)}function se(oe){fe.call(this,t,oe)}function q(oe){fe.call(this,t,oe)}function J(oe){fe.call(this,t,oe)}function Le(oe){fe.call(this,t,oe)}function _e(oe){fe.call(this,t,oe)}function Be(oe){fe.call(this,t,oe)}function Ke(oe){fe.call(this,t,oe)}function de(oe){fe.call(this,t,oe)}function ge(oe){ae[oe?"unshift":"push"](()=>{a=oe,n(0,a)})}const pe=oe=>{z("select",oe.detail)},We=oe=>{z("change",oe.detail)};function ot(oe){ae[oe?"unshift":"push"](()=>{R=oe,n(19,R)})}return t.$$set=oe=>{e=Z(Z({},e),tt(oe)),n(21,r=he(e,i)),"element"in oe&&n(0,a=oe.element),"class"in oe&&n(1,u=oe.class),"type"in oe&&n(2,c=oe.type),"role"in oe&&n(3,f=oe.role),"name"in oe&&n(4,d=oe.name),"value"in oe&&n(5,h=oe.value),"hidden"in oe&&n(6,m=oe.hidden),"disabled"in oe&&n(7,p=oe.disabled),"readonly"in oe&&n(8,g=oe.readonly),"pressed"in oe&&n(9,v=oe.pressed),"keyShortcuts"in oe&&n(10,b=oe.keyShortcuts),"label"in oe&&n(11,w=oe.label),"variant"in oe&&n(12,k=oe.variant),"size"in oe&&n(13,S=oe.size),"iconic"in oe&&n(14,E=oe.iconic),"pill"in oe&&n(15,P=oe.pill),"flex"in oe&&n(16,M=oe.flex),"popupPosition"in oe&&n(17,I=oe.popupPosition),"showPopupBackdrop"in oe&&n(18,D=oe.showPopupBackdrop),"$$scope"in oe&&n(42,l=oe.$$scope)},[a,u,c,f,d,h,m,p,g,v,b,w,k,S,E,P,M,I,D,R,z,r,o,s,U,W,ee,K,ve,me,se,q,J,Le,_e,Be,Ke,de,ge,pe,We,ot,l]}class et extends ie{constructor(e){super(),ne(this,e,NC,CC,te,{element:0,class:1,type:2,role:3,name:4,value:5,hidden:6,disabled:7,readonly:8,pressed:9,keyShortcuts:10,label:11,variant:12,size:13,iconic:14,pill:15,flex:16,popupPosition:17,showPopupBackdrop:18},bC,[-1,-1])}get element(){return this.$$.ctx[0]}set element(e){this.$$set({element:e}),Je()}get class(){return this.$$.ctx[1]}set class(e){this.$$set({class:e}),Je()}get type(){return this.$$.ctx[2]}set type(e){this.$$set({type:e}),Je()}get role(){return this.$$.ctx[3]}set role(e){this.$$set({role:e}),Je()}get name(){return this.$$.ctx[4]}set name(e){this.$$set({name:e}),Je()}get value(){return this.$$.ctx[5]}set value(e){this.$$set({value:e}),Je()}get hidden(){return this.$$.ctx[6]}set hidden(e){this.$$set({hidden:e}),Je()}get disabled(){return this.$$.ctx[7]}set disabled(e){this.$$set({disabled:e}),Je()}get readonly(){return this.$$.ctx[8]}set readonly(e){this.$$set({readonly:e}),Je()}get pressed(){return this.$$.ctx[9]}set pressed(e){this.$$set({pressed:e}),Je()}get keyShortcuts(){return this.$$.ctx[10]}set keyShortcuts(e){this.$$set({keyShortcuts:e}),Je()}get label(){return this.$$.ctx[11]}set label(e){this.$$set({label:e}),Je()}get variant(){return this.$$.ctx[12]}set variant(e){this.$$set({variant:e}),Je()}get size(){return this.$$.ctx[13]}set size(e){this.$$set({size:e}),Je()}get iconic(){return this.$$.ctx[14]}set iconic(e){this.$$set({iconic:e}),Je()}get pill(){return this.$$.ctx[15]}set pill(e){this.$$set({pill:e}),Je()}get flex(){return this.$$.ctx[16]}set flex(e){this.$$set({flex:e}),Je()}get popupPosition(){return this.$$.ctx[17]}set popupPosition(e){this.$$set({popupPosition:e}),Je()}get showPopupBackdrop(){return this.$$.ctx[18]}set showPopupBackdrop(e){this.$$set({showPopupBackdrop:e}),Je()}}const LC={grid:{orientation:"vertical",childRoles:["row"],childSelectedAttr:"aria-selected",focusChild:!0},listbox:{orientation:"vertical",childRoles:["option"],childSelectedAttr:"aria-selected",focusChild:!1},menu:{orientation:"vertical",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0},menubar:{orientation:"horizontal",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0},radiogroup:{orientation:"horizontal",childRoles:["radio"],childSelectedAttr:"aria-checked",focusChild:!0},tablist:{orientation:"horizontal",childRoles:["tab"],childSelectedAttr:"aria-selected",focusChild:!0}};let OC=class{constructor(e){e.dispatchEvent(new CustomEvent("initializing")),this.parent=e,this.role=e.getAttribute("role"),this.multi=this.parent.getAttribute("aria-multiselectable")==="true",this.id=ii(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`;const{orientation:n,childRoles:i,childSelectedAttr:r,focusChild:s}=LC[this.role];this.orientation=this.grid?"horizontal":this.parent.getAttribute("aria-orientation")??n,this.childRoles=i,this.childSelectedAttr=r,this.childSelectedProp=r.replace("aria-",""),this.focusChild=s,(async()=>(await hs(100),this.activate()))()}activate(){const{parent:e,allMembers:n,selected:i}=this;n.forEach((r,s)=>{const l=i?r===i:s===0,o=document.querySelector(`#${r.getAttribute("aria-controls")}`);r.id||=`${this.id}-item-${s+1}`,r.tabIndex||=l?0:-1,r.setAttribute(this.childSelectedAttr,String(l)),o&&(o.inert=!l,o.setAttribute("aria-labelledby",r.id),o.setAttribute("aria-hidden",String(!l)),l&&globalThis.setTimeout(()=>{try{o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{o.scrollIntoView(!0)}},300))}),e.addEventListener("click",r=>{this.onClick(r)}),e.addEventListener("keydown",r=>{this.onKeyDown(r)}),e.dispatchEvent(new CustomEvent("initialized"))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(",")}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches('[aria-disabled="true"], [aria-hidden="true"]'))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches('[aria-disabled="true"]')}get isReadOnly(){return this.parent.matches('[aria-readonly="true"]')}get grid(){return this.role==="grid"||this.role==="listbox"&&this.parent.matches(".grid")}selectTarget(e,n){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}const i=n.getAttribute("role"),r=n.closest(this.parentGroupSelector),s=e.type==="click",l=e.type==="keydown"&&e.key===" ";this.activeMembers.forEach(o=>{const a=o.matches('[role="menuitemcheckbox"]'),u=o.matches('[role="menuitemradio"]');if((a||u)&&(o.getAttribute("role")!==i||o.closest(this.parentGroupSelector)!==r))return;const c=a||this.multi,f=u||!c,d=o===n,h=o.matches(`[${this.childSelectedAttr}="true"]`),m=o.getAttribute("aria-controls"),p=m?document.getElementById(m):null;c&&d&&(s||l)&&(o.setAttribute(this.childSelectedAttr,String(!h)),o.dispatchEvent(new CustomEvent("change",{detail:{[this.childSelectedProp]:!h}})),h||o.dispatchEvent(new CustomEvent("select"))),f&&h!==d&&(!u||l||s)&&(o.setAttribute(this.childSelectedAttr,String(d)),o.dispatchEvent(new CustomEvent("change",{detail:{[this.childSelectedProp]:d}})),d&&o.dispatchEvent(new CustomEvent("select"))),this.focusChild?globalThis.requestAnimationFrame(()=>{o.tabIndex=d?0:-1,d&&(o.focus(),o.dispatchEvent(new CustomEvent("focus")))}):(o.classList.toggle("focused",d),d&&o.dispatchEvent(new CustomEvent("focus"))),p&&(p.inert=!d,p.setAttribute("aria-hidden",String(!d)),d&&globalThis.setTimeout(()=>{try{p.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{p.scrollIntoView(!0)}},300)),d&&(this.parent.setAttribute("aria-activedescendant",o.id),globalThis.setTimeout(()=>{try{o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{o.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent("change",{detail:{value:n.value,name:n.name}}))}onClick(e){const n=e.target,i=n.matches(this.selector)?n:n.closest(this.selector);!i||e.button!==0||this.selectTarget(e,i)}onKeyDown(e){const{key:n,ctrlKey:i,metaKey:r,shiftKey:s,altKey:l}=e;if(s||l||i||r)return;const a=e.target,{allMembers:u,activeMembers:c}=this,f=(()=>{if(!this.focusChild)return c.find(m=>m.matches(".focused"));if(a.matches(this.selector))return a})();if(["Enter"," ","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n)&&e.preventDefault(),n==="Enter"){f?.click();return}if(n===" "){f&&this.selectTarget(e,f);return}let d,h;if(this.grid){const m=Math.floor(this.parent.clientWidth/c[0].clientWidth);d=f?u.indexOf(f):-1,n==="ArrowUp"&&d>0&&(h=u[d-m]),n==="ArrowDown"&&d<u.length-1&&(h=u[d+m]),n==="ArrowLeft"&&d>0&&(h=u[d-1]),n==="ArrowRight"&&d<u.length-1&&(h=u[d+1]),h?.matches('[aria-disabled="true"], [aria-hidden="true"]')&&(h=void 0)}else d=f?c.indexOf(f):-1,n===(this.orientation==="horizontal"?"ArrowLeft":"ArrowUp")&&(d>0&&(h=c[d-1]),d===0&&(h=c[c.length-1])),n===(this.orientation==="horizontal"?"ArrowRight":"ArrowDown")&&(d<c.length-1&&(h=c[d+1]),d===c.length-1&&([h]=c));h&&h!==f&&this.selectTarget(e,h)}onUpdate({searchTerms:e}){const n=e.trim().toLocaleLowerCase(),i=n?n.split(/\s+/):[],r=this.allMembers.map(s=>{const l=(s.dataset.searchValue??s.dataset.label??s.querySelector(".label")?.textContent??s.textContent)?.toLocaleLowerCase()??"",o=!i.every(a=>l.includes(a));return s.dispatchEvent(new CustomEvent("toggle",{detail:{hidden:o}})),o}).filter(s=>!s).length;this.parent.dispatchEvent(new CustomEvent("filter",{detail:{matched:r,total:this.allMembers.length}}))}};const Pa=(t,e)=>{const n=new OC(t);return{update(i){n.onUpdate(i)}}};function PC(t){ye(t,"svelte-tyrtaf",'.select-button-group.svelte-tyrtaf{display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width)}.select-button-group.svelte-tyrtaf:focus-visible{outline-width:0 !important}.select-button-group.svelte-tyrtaf button{margin:0 !important;border-radius:0;color:var(--sui-primary-foreground-color)}.select-button-group.svelte-tyrtaf button:first-child{border-top-left-radius:4px !important;border-bottom-left-radius:4px}.select-button-group.svelte-tyrtaf button:not(:first-child){border-left-width:0}.select-button-group.svelte-tyrtaf button:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.select-button-group.svelte-tyrtaf button[aria-checked="true"]{color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color)}.select-button-group[aria-disabled=false].svelte-tyrtaf button[aria-disabled="true"]{filter:grayscale(0) opacity(1)}.select-button-group[aria-disabled=false].svelte-tyrtaf button[aria-disabled="true"] *{filter:grayscale(1) opacity(0.35)}.inner.svelte-tyrtaf{display:contents}')}function IC(t){let e,n,i,r,s,l,o;const a=t[9].default,u=ke(a,t,t[8],null);let c=[{role:"radiogroup"},{class:i="sui select-button-group "+t[0]},{hidden:r=t[1]||void 0},{tabindex:"-1"},{"aria-hidden":t[1]},{"aria-disabled":t[2]},{"aria-readonly":t[3]},{"aria-required":t[4]},{"aria-invalid":t[5]},t[7]],f={};for(let d=0;d<c.length;d+=1)f=Z(f,c[d]);return{c(){e=F("div"),n=F("div"),u&&u.c(),C(n,"role","none"),C(n,"class","inner svelte-tyrtaf"),n.inert=t[2],je(e,f),re(e,"svelte-tyrtaf",!0)},m(d,h){A(d,e,h),$(e,n),u&&u.m(n,null),s=!0,l||(o=[Ks(Pa.call(null,e)),Fe(e,"change",t[10])],l=!0)},p(d,[h]){u&&u.p&&(!s||h&256)&&Ee(u,a,d,d[8],s?Se(a,d[8],h,null):Te(d[8]),null),(!s||h&4)&&(n.inert=d[2]),je(e,f=Ge(c,[{role:"radiogroup"},(!s||h&1&&i!==(i="sui select-button-group "+d[0]))&&{class:i},(!s||h&2&&r!==(r=d[1]||void 0))&&{hidden:r},{tabindex:"-1"},(!s||h&2)&&{"aria-hidden":d[1]},(!s||h&4)&&{"aria-disabled":d[2]},(!s||h&8)&&{"aria-readonly":d[3]},(!s||h&16)&&{"aria-required":d[4]},(!s||h&32)&&{"aria-invalid":d[5]},h&128&&d[7]])),re(e,"svelte-tyrtaf",!0)},i(d){s||(_(u,d),s=!0)},o(d){y(u,d),s=!1},d(d){d&&T(e),u&&u.d(d),l=!1,Gt(o)}}}function DC(t,e,n){const i=["class","hidden","disabled","readonly","required","invalid"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{readonly:c=!1}=e,{required:f=!1}=e,{invalid:d=!1}=e;const h=sn(),m=p=>{h("change",p.detail)};return t.$$set=p=>{e=Z(Z({},e),tt(p)),n(7,r=he(e,i)),"class"in p&&n(0,o=p.class),"hidden"in p&&n(1,a=p.hidden),"disabled"in p&&n(2,u=p.disabled),"readonly"in p&&n(3,c=p.readonly),"required"in p&&n(4,f=p.required),"invalid"in p&&n(5,d=p.invalid),"$$scope"in p&&n(8,l=p.$$scope)},[o,a,u,c,f,d,h,r,l,s,m]}class Kc extends ie{constructor(e){super(),ne(this,e,DC,IC,te,{class:0,hidden:1,disabled:2,readonly:3,required:4,invalid:5},PC)}}const MC=t=>({}),y_=t=>({slot:"start-icon"}),RC=t=>({}),w_=t=>({slot:"end-icon"});function $C(t){let e;const n=t[10].default,i=ke(n,t,t[16],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&65536)&&Ee(i,n,r,r[16],e?Se(n,r[16],s,null):Te(r[16]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function FC(t){let e;const n=t[10]["start-icon"],i=ke(n,t,t[16],y_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&65536)&&Ee(i,n,r,r[16],e?Se(n,r[16],s,MC):Te(r[16]),y_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function zC(t){let e;const n=t[10]["end-icon"],i=ke(n,t,t[16],w_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&65536)&&Ee(i,n,r,r[16],e?Se(n,r[16],s,RC):Te(r[16]),w_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function jC(t){let e,n;const i=[{role:"radio"},{class:"sui select-button "+t[1]},{value:t[2]},{hidden:t[3]},{disabled:t[4]},{label:t[5]},{variant:t[6]},{size:t[7]},{iconic:t[8]},{"aria-checked":t[0]},t[9]];let r={$$slots:{"end-icon":[zC],"start-icon":[FC],default:[$C]},$$scope:{ctx:t}};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new et({props:r}),e.$on("click",t[11]),e.$on("dblclick",t[12]),e.$on("select",t[13]),e.$on("change",t[14]),e.$on("change",t[15]),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,[l]){const o=l&1023?Ge(i,[i[0],l&2&&{class:"sui select-button "+s[1]},l&4&&{value:s[2]},l&8&&{hidden:s[3]},l&16&&{disabled:s[4]},l&32&&{label:s[5]},l&64&&{variant:s[6]},l&128&&{size:s[7]},l&256&&{iconic:s[8]},l&1&&{"aria-checked":s[0]},l&512&&qt(s[9])]):{};l&65536&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function BC(t,e,n){const i=["class","value","selected","hidden","disabled","label","variant","size","iconic"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{value:a=void 0}=e,{selected:u=!1}=e,{hidden:c=void 0}=e,{disabled:f=!1}=e,{label:d=""}=e,{variant:h=void 0}=e,{size:m="medium"}=e,{iconic:p=!1}=e;function g(S){fe.call(this,t,S)}function v(S){fe.call(this,t,S)}function b(S){fe.call(this,t,S)}function w(S){fe.call(this,t,S)}const k=S=>{n(0,u=S.detail.selected)};return t.$$set=S=>{e=Z(Z({},e),tt(S)),n(9,r=he(e,i)),"class"in S&&n(1,o=S.class),"value"in S&&n(2,a=S.value),"selected"in S&&n(0,u=S.selected),"hidden"in S&&n(3,c=S.hidden),"disabled"in S&&n(4,f=S.disabled),"label"in S&&n(5,d=S.label),"variant"in S&&n(6,h=S.variant),"size"in S&&n(7,m=S.size),"iconic"in S&&n(8,p=S.iconic),"$$scope"in S&&n(16,l=S.$$scope)},[u,o,a,c,f,d,h,m,p,r,s,g,v,b,w,k,l]}class Gl extends ie{constructor(e){super(),ne(this,e,BC,jC,te,{class:1,value:2,selected:0,hidden:3,disabled:4,label:5,variant:6,size:7,iconic:8})}}const UC=t=>({}),k_=t=>({}),qC=t=>({}),S_=t=>({slot:"start-icon"}),HC=t=>({}),E_=t=>({slot:"end-icon"});function xC(t){let e;const n=t[14].default,i=ke(n,t,t[17],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&131072)&&Ee(i,n,r,r[17],e?Se(n,r[17],s,null):Te(r[17]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function VC(t){let e;const n=t[14]["start-icon"],i=ke(n,t,t[17],S_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&131072)&&Ee(i,n,r,r[17],e?Se(n,r[17],s,qC):Te(r[17]),S_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function WC(t){let e;const n=t[14]["end-icon"],i=ke(n,t,t[17],E_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&131072)&&Ee(i,n,r,r[17],e?Se(n,r[17],s,HC):Te(r[17]),E_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function YC(t){let e;const n=t[14].popup,i=ke(n,t,t[17],k_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&131072)&&Ee(i,n,r,r[17],e?Se(n,r[17],s,UC):Te(r[17]),k_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function GC(t){let e,n,i,r,s;const l=[{class:"sui menu-button "+t[0]},{hidden:t[1]},{disabled:t[2]},{label:t[6]},{variant:t[7]},{size:t[8]},{iconic:t[9]},{"aria-haspopup":"menu"},t[12]];let o={$$slots:{"end-icon":[WC],"start-icon":[VC],default:[xC]},$$scope:{ctx:t}};for(let u=0;u<l.length;u+=1)o=Z(o,l[u]);n=new et({props:o}),t[15](n);let a={anchor:t[10]?.element,position:t[3],positionBaseElement:t[4],showBackdrop:t[5],$$slots:{default:[YC]},$$scope:{ctx:t}};return r=new Gc({props:a}),t[16](r),{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),C(e,"role","none"),C(e,"class","wrapper")},m(u,c){A(u,e,c),N(n,e,null),A(u,i,c),N(r,u,c),s=!0},p(u,[c]){const f=c&5063?Ge(l,[c&1&&{class:"sui menu-button "+u[0]},c&2&&{hidden:u[1]},c&4&&{disabled:u[2]},c&64&&{label:u[6]},c&128&&{variant:u[7]},c&256&&{size:u[8]},c&512&&{iconic:u[9]},l[7],c&4096&&qt(u[12])]):{};c&131072&&(f.$$scope={dirty:c,ctx:u}),n.$set(f);const d={};c&1024&&(d.anchor=u[10]?.element),c&8&&(d.position=u[3]),c&16&&(d.positionBaseElement=u[4]),c&32&&(d.showBackdrop=u[5]),c&131072&&(d.$$scope={dirty:c,ctx:u}),r.$set(d)},i(u){s||(_(n.$$.fragment,u),_(r.$$.fragment,u),s=!0)},o(u){y(n.$$.fragment,u),y(r.$$.fragment,u),s=!1},d(u){u&&(T(e),T(i)),t[15](null),L(n),t[16](null),L(r,u)}}}function KC(t,e,n){const i=["class","hidden","disabled","popupPosition","popupPositionBaseElement","showPopupBackdrop","label","variant","size","iconic","focus"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{popupPosition:c="bottom-left"}=e,{popupPositionBaseElement:f=void 0}=e,{showPopupBackdrop:d=!1}=e,{label:h=""}=e,{variant:m=void 0}=e,{size:p="medium"}=e,{iconic:g=!1}=e,v,b;const w=()=>{v?.element?.focus()};function k(E){ae[E?"unshift":"push"](()=>{v=E,n(10,v)})}function S(E){ae[E?"unshift":"push"](()=>{b=E,n(11,b)})}return t.$$set=E=>{e=Z(Z({},e),tt(E)),n(12,r=he(e,i)),"class"in E&&n(0,o=E.class),"hidden"in E&&n(1,a=E.hidden),"disabled"in E&&n(2,u=E.disabled),"popupPosition"in E&&n(3,c=E.popupPosition),"popupPositionBaseElement"in E&&n(4,f=E.popupPositionBaseElement),"showPopupBackdrop"in E&&n(5,d=E.showPopupBackdrop),"label"in E&&n(6,h=E.label),"variant"in E&&n(7,m=E.variant),"size"in E&&n(8,p=E.size),"iconic"in E&&n(9,g=E.iconic),"$$scope"in E&&n(17,l=E.$$scope)},[o,a,u,c,f,d,h,m,p,g,v,b,r,w,s,k,S,l]}class pi extends ie{constructor(e){super(),ne(this,e,KC,GC,te,{class:0,hidden:1,disabled:2,popupPosition:3,popupPositionBaseElement:4,showPopupBackdrop:5,label:6,variant:7,size:8,iconic:9,focus:13})}get focus(){return this.$$.ctx[13]}}function ZC(t){ye(t,"svelte-xbyykt",".split-button.svelte-xbyykt{display:inline-flex;margin:var(--sui-focus-ring-width)}.split-button.svelte-xbyykt button{margin:0}.split-button.svelte-xbyykt button:not(.menu-button){border-top-right-radius:0;border-bottom-right-radius:0}.split-button.svelte-xbyykt button:is(.menu-button){border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0;aspect-ratio:3/4}")}const JC=t=>({}),T_=t=>({slot:"end-icon"}),XC=t=>({}),A_=t=>({slot:"popup"}),QC=t=>({}),C_=t=>({slot:"start-icon"});function eN(t){let e;const n=t[11]["start-icon"],i=ke(n,t,t[14],C_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&16384)&&Ee(i,n,r,r[14],e?Se(n,r[14],s,QC):Te(r[14]),C_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function tN(t){let e,n;return e=new xe({props:{name:"arrow_drop_down",class:"small-arrow"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function nN(t){let e;const n=t[11]["chevron-icon"],i=ke(n,t,t[14],T_),r=i||tN();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&16384)&&Ee(i,n,s,s[14],e?Se(n,s[14],l,JC):Te(s[14]),T_)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function iN(t){let e;const n=t[11].popup,i=ke(n,t,t[14],A_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&16384)&&Ee(i,n,r,r[14],e?Se(n,r[14],s,XC):Te(r[14]),A_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function rN(t){let e,n,i,r,s,l,o;const a=[{class:t[0]},{hidden:t[1]},{disabled:t[2]},{label:t[3]},{variant:t[4]},{size:t[5]},t[10]];let u={$$slots:{"start-icon":[eN]},$$scope:{ctx:t}};for(let c=0;c<a.length;c+=1)u=Z(u,a[c]);return n=new et({props:u}),n.$on("click",t[12]),r=new pi({props:{iconic:!0,hidden:t[1],disabled:t[2],variant:t[4],size:t[5],"aria-label":t[9]("_sui.split_button.more_options"),popupPosition:t[6],popupPositionBaseElement:t[8],showPopupBackdrop:t[7],$$slots:{popup:[iN],"end-icon":[nN]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),C(e,"role","group"),C(e,"class","sui split-button svelte-xbyykt"),e.hidden=s=t[1]||void 0,C(e,"aria-hidden",t[1]),C(e,"aria-disabled",t[2]),C(e,"aria-label",l=t[9]("_sui.split_button.x_options",{values:{name:t[3]}}))},m(c,f){A(c,e,f),N(n,e,null),$(e,i),N(r,e,null),t[13](e),o=!0},p(c,[f]){const d=f&1087?Ge(a,[f&1&&{class:c[0]},f&2&&{hidden:c[1]},f&4&&{disabled:c[2]},f&8&&{label:c[3]},f&16&&{variant:c[4]},f&32&&{size:c[5]},f&1024&&qt(c[10])]):{};f&16384&&(d.$$scope={dirty:f,ctx:c}),n.$set(d);const h={};f&2&&(h.hidden=c[1]),f&4&&(h.disabled=c[2]),f&16&&(h.variant=c[4]),f&32&&(h.size=c[5]),f&512&&(h["aria-label"]=c[9]("_sui.split_button.more_options")),f&64&&(h.popupPosition=c[6]),f&256&&(h.popupPositionBaseElement=c[8]),f&128&&(h.showPopupBackdrop=c[7]),f&16384&&(h.$$scope={dirty:f,ctx:c}),r.$set(h),(!o||f&2&&s!==(s=c[1]||void 0))&&(e.hidden=s),(!o||f&2)&&C(e,"aria-hidden",c[1]),(!o||f&4)&&C(e,"aria-disabled",c[2]),(!o||f&520&&l!==(l=c[9]("_sui.split_button.x_options",{values:{name:c[3]}})))&&C(e,"aria-label",l)},i(c){o||(_(n.$$.fragment,c),_(r.$$.fragment,c),o=!0)},o(c){y(n.$$.fragment,c),y(r.$$.fragment,c),o=!1},d(c){c&&T(e),L(n),L(r),t[13](null)}}}function sN(t,e,n){const i=["class","hidden","disabled","label","variant","size","popupPosition","showPopupBackdrop"];let r=he(e,i),s;B(t,ue,w=>n(9,s=w));let{$$slots:l={},$$scope:o}=e,{class:a=""}=e,{hidden:u=void 0}=e,{disabled:c=!1}=e,{label:f=""}=e,{variant:d=void 0}=e,{size:h="medium"}=e,{popupPosition:m="bottom-left"}=e,{showPopupBackdrop:p=!1}=e,g;function v(w){fe.call(this,t,w)}function b(w){ae[w?"unshift":"push"](()=>{g=w,n(8,g)})}return t.$$set=w=>{e=Z(Z({},e),tt(w)),n(10,r=he(e,i)),"class"in w&&n(0,a=w.class),"hidden"in w&&n(1,u=w.hidden),"disabled"in w&&n(2,c=w.disabled),"label"in w&&n(3,f=w.label),"variant"in w&&n(4,d=w.variant),"size"in w&&n(5,h=w.size),"popupPosition"in w&&n(6,m=w.popupPosition),"showPopupBackdrop"in w&&n(7,p=w.showPopupBackdrop),"$$scope"in w&&n(14,o=w.$$scope)},[a,u,c,f,d,h,m,p,g,s,r,l,v,b,o]}class lN extends ie{constructor(e){super(),ne(this,e,sN,rN,te,{class:0,hidden:1,disabled:2,label:3,variant:4,size:5,popupPosition:6,showPopupBackdrop:7},ZC)}}function oN(t){ye(t,"svelte-ncj2qo",".divider.svelte-ncj2qo{flex:none;background-color:var(--sui-secondary-border-color)}.divider[aria-orientation=horizontal].svelte-ncj2qo{margin:8px 0;width:100%;height:1px}.divider[aria-orientation=vertical].svelte-ncj2qo{margin:0 8px;width:1px;height:100%}")}function aN(t){let e,n,i,r=[{role:"separator"},{class:n="sui divider "+t[0]},{hidden:i=t[1]||void 0},{"aria-hidden":t[1]},{"aria-orientation":t[2]},t[3]],s={};for(let l=0;l<r.length;l+=1)s=Z(s,r[l]);return{c(){e=F("div"),je(e,s),re(e,"svelte-ncj2qo",!0)},m(l,o){A(l,e,o)},p(l,[o]){je(e,s=Ge(r,[{role:"separator"},o&1&&n!==(n="sui divider "+l[0])&&{class:n},o&2&&i!==(i=l[1]||void 0)&&{hidden:i},o&2&&{"aria-hidden":l[1]},o&4&&{"aria-orientation":l[2]},o&8&&l[3]])),re(e,"svelte-ncj2qo",!0)},i:H,o:H,d(l){l&&T(e)}}}function uN(t,e,n){const i=["class","hidden","orientation"];let r=he(e,i),{class:s=""}=e,{hidden:l=void 0}=e,{orientation:o="horizontal"}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(3,r=he(e,i)),"class"in a&&n(0,s=a.class),"hidden"in a&&n(1,l=a.hidden),"orientation"in a&&n(2,o=a.orientation)},[s,l,o,r]}class $n extends ie{constructor(e){super(),ne(this,e,uN,aN,te,{class:0,hidden:1,orientation:2},oN)}}function cN(t){ye(t,"svelte-1rs4j5f",".spacer.flex.svelte-1rs4j5f{flex:auto}.spacer.svelte-1rs4j5f:not(.flex){width:8px;height:8px}")}function fN(t){let e,n,i=[{role:"none"},{class:n="sui spacer "+t[0]},t[2]],r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return{c(){e=F("div"),je(e,r),re(e,"flex",t[1]),re(e,"svelte-1rs4j5f",!0)},m(s,l){A(s,e,l)},p(s,[l]){je(e,r=Ge(i,[{role:"none"},l&1&&n!==(n="sui spacer "+s[0])&&{class:n},l&4&&s[2]])),re(e,"flex",s[1]),re(e,"svelte-1rs4j5f",!0)},i:H,o:H,d(s){s&&T(e)}}}function dN(t,e,n){const i=["class","flex"];let r=he(e,i),{class:s=""}=e,{flex:l=!1}=e;return t.$$set=o=>{e=Z(Z({},e),tt(o)),n(2,r=he(e,i)),"class"in o&&n(0,s=o.class),"flex"in o&&n(1,l=o.flex)},[s,l,r]}class In extends ie{constructor(e){super(),ne(this,e,dN,fN,te,{class:0,flex:1},cN)}}function hN(t){ye(t,"svelte-2htx8g",'.checkbox.svelte-2htx8g.svelte-2htx8g{display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none}.checkbox.svelte-2htx8g:hover button{background-color:var(--sui-hover-background-color)}.checkbox.svelte-2htx8g:hover button[aria-checked="true"]{background-color:var(--sui-primary-accent-color-light)}.checkbox.svelte-2htx8g:active button{background-color:var(--sui-active-background-color)}.checkbox.svelte-2htx8g:active button[aria-checked="true"]{background-color:var(--sui-primary-accent-color-dark)}.checkbox.svelte-2htx8g button{align-items:center;justify-content:center;overflow:hidden;margin:0 !important;border-width:var(--sui-checkbox-border-width, 1.5px);border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-border-radius);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);color:var(--sui-primary-accent-text-color);background-color:var(--sui-checkbox-background-color);transition:all 200ms}.checkbox.svelte-2htx8g button .icon{font-size:calc(var(--sui-checkbox-height) - 2px)}.checkbox.svelte-2htx8g button[aria-checked="true"]{border-color:var(--sui-checkbox-border-color-checked, var(--sui-primary-accent-color));color:var(--sui-checkbox-foreground-color-checked, var(--sui-primary-accent-color-inverted));background-color:var(--sui-checkbox-background-color-checked, var(--sui-primary-accent-color))}.checkbox.svelte-2htx8g button[aria-checked="false"]{color:transparent}.checkbox.svelte-2htx8g label.svelte-2htx8g{cursor:inherit}.inner.svelte-2htx8g.svelte-2htx8g{display:contents}')}const pN=t=>({}),N_=t=>({slot:"start-icon"});function mN(t){let e,n;return e=new xe({props:{name:t[11]?"remove":"check"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2048&&(s.name=i[11]?"remove":"check"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gN(t){let e;const n=t[17]["check-icon"],i=ke(n,t,t[21],N_),r=i||mN(t);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&2097152)&&Ee(i,n,s,s[21],e?Se(n,s[21],l,pN):Te(s[21]),N_):r&&r.p&&(!e||l&2048)&&r.p(s,e?l:-1)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function L_(t){let e,n,i,r;const s=[bN,_N],l=[];function o(a,u){return a[16].default?0:1}return n=o(t),i=l[n]=s[n](t),{c(){e=F("label"),i.c(),C(e,"id",t[14]+"-label"),C(e,"class","svelte-2htx8g")},m(a,u){A(a,e,u),l[n].m(e,null),r=!0},p(a,u){let c=n;n=o(a),n===c?l[n].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),i=l[n],i?i.p(a,u):(i=l[n]=s[n](a),i.c()),_(i,1),i.m(e,null))},i(a){r||(_(i),r=!0)},o(a){y(i),r=!1},d(a){a&&T(e),l[n].d()}}}function _N(t){let e;return{c(){e=G(t[9])},m(n,i){A(n,e,i)},p(n,i){i&512&&X(e,n[9])},i:H,o:H,d(n){n&&T(e)}}}function bN(t){let e;const n=t[17].default,i=ke(n,t,t[21],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&2097152)&&Ee(i,n,r,r[21],e?Se(n,r[21],s,null):Te(r[21]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function vN(t){let e,n,i,r,s,l,o,a,u;const c=[{role:"checkbox"},{id:t[14]},{name:t[2]},{value:t[3]},{hidden:t[4]},{disabled:t[5]},{readonly:t[6]},{required:t[7]},{invalid:t[8]},{"aria-checked":t[0]},{"aria-label":t[12]||void 0},{"aria-labelledby":t[12]?void 0:"{id}-label"},t[15]];let f={$$slots:{"start-icon":[gN]},$$scope:{ctx:t}};for(let h=0;h<c.length;h+=1)f=Z(f,c[h]);i=new et({props:f}),t[18](i),i.$on("click",t[19]);let d=(t[16].default||t[9])&&L_(t);return{c(){e=F("div"),n=F("div"),O(i.$$.fragment),r=j(),d&&d.c(),C(n,"role","none"),C(n,"class","inner svelte-2htx8g"),n.inert=t[5],C(e,"role","none"),C(e,"class",s="sui checkbox "+t[1]+" svelte-2htx8g"),e.hidden=l=t[4]||void 0,re(e,"checked",t[0]),re(e,"indeterminate",t[11]),re(e,"disabled",t[5]),re(e,"readonly",t[6])},m(h,m){A(h,e,m),$(e,n),N(i,n,null),$(n,r),d&&d.m(n,null),o=!0,a||(u=Fe(e,"click",Jk(Kr(t[20]))),a=!0)},p(h,[m]){const p=m&53757?Ge(c,[c[0],m&16384&&{id:h[14]},m&4&&{name:h[2]},m&8&&{value:h[3]},m&16&&{hidden:h[4]},m&32&&{disabled:h[5]},m&64&&{readonly:h[6]},m&128&&{required:h[7]},m&256&&{invalid:h[8]},m&1&&{"aria-checked":h[0]},m&4096&&{"aria-label":h[12]||void 0},m&4096&&{"aria-labelledby":h[12]?void 0:"{id}-label"},m&32768&&qt(h[15])]):{};m&2099200&&(p.$$scope={dirty:m,ctx:h}),i.$set(p),h[16].default||h[9]?d?(d.p(h,m),m&66048&&_(d,1)):(d=L_(h),d.c(),_(d,1),d.m(n,null)):d&&(x(),y(d,1,1,()=>{d=null}),V()),(!o||m&32)&&(n.inert=h[5]),(!o||m&2&&s!==(s="sui checkbox "+h[1]+" svelte-2htx8g"))&&C(e,"class",s),(!o||m&16&&l!==(l=h[4]||void 0))&&(e.hidden=l),(!o||m&3)&&re(e,"checked",h[0]),(!o||m&2050)&&re(e,"indeterminate",h[11]),(!o||m&34)&&re(e,"disabled",h[5]),(!o||m&66)&&re(e,"readonly",h[6])},i(h){o||(_(i.$$.fragment,h),_(d),o=!0)},o(h){y(i.$$.fragment,h),y(d),o=!1},d(h){h&&T(e),t[18](null),L(i),d&&d.d(),a=!1,u()}}}function yN(t,e,n){let i,r;const s=["class","name","value","hidden","disabled","readonly","required","invalid","checked","label"];let l=he(e,s),{$$slots:o={},$$scope:a}=e;const u=Aa(o);let{class:c=""}=e,{name:f=void 0}=e,{value:d=void 0}=e,{hidden:h=void 0}=e,{disabled:m=!1}=e,{readonly:p=!1}=e,{required:g=!1}=e,{invalid:v=!1}=e,{checked:b=!1}=e,{label:w=void 0}=e;const k=sn(),S=ii("checkbox");let E;function P(D){ae[D?"unshift":"push"](()=>{E=D,n(10,E)})}const M=D=>{D.preventDefault(),D.stopPropagation(),!m&&!p&&(n(0,b=r?!0:!b),k("change",{checked:b}))},I=D=>{D.target.matches("button")||E?.element?.click()};return t.$$set=D=>{e=Z(Z({},e),tt(D)),n(15,l=he(e,s)),"class"in D&&n(1,c=D.class),"name"in D&&n(2,f=D.name),"value"in D&&n(3,d=D.value),"hidden"in D&&n(4,h=D.hidden),"disabled"in D&&n(5,m=D.disabled),"readonly"in D&&n(6,p=D.readonly),"required"in D&&n(7,g=D.required),"invalid"in D&&n(8,v=D.invalid),"checked"in D&&n(0,b=D.checked),"label"in D&&n(9,w=D.label),"$$scope"in D&&n(21,a=D.$$scope)},t.$$.update=()=>{n(12,i=l["aria-label"]),t.$$.dirty&1&&n(11,r=b==="mixed")},[b,c,f,d,h,m,p,g,v,w,E,r,i,k,S,l,u,o,P,M,I,a]}class I2 extends ie{constructor(e){super(),ne(this,e,yN,vN,te,{class:1,name:2,value:3,hidden:4,disabled:5,readonly:6,required:7,invalid:8,checked:0,label:9},hN)}}function wN(t){ye(t,"svelte-1t95ghb",".content.svelte-1t95ghb.svelte-1t95ghb{position:relative;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--sui-dialog-content-border-radius, 4px);max-width:calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);background-color:var(--sui-dialog-content-background-color, var(--sui-secondary-background-color-translucent));box-shadow:var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));-webkit-backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));transition-property:transform}dialog.open .content.svelte-1t95ghb.svelte-1t95ghb{transition-duration:150ms;transform:scale(100%)}dialog:not(.open) .content.svelte-1t95ghb.svelte-1t95ghb{transition-duration:300ms;transform:scale(90%)}.content.small.svelte-1t95ghb.svelte-1t95ghb{width:var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));max-height:var(--sui-dialog-small-content-max-height, var(--sui-dialog-content-max-height, 400px))}@media(max-height: 400px){.content.small.svelte-1t95ghb.svelte-1t95ghb{max-height:calc(100dvh - 32px)}}.content.medium.svelte-1t95ghb.svelte-1t95ghb{width:var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));max-height:var(--sui-dialog-medium-content-max-height, var(--sui-dialog-content-max-height, 600px))}@media(max-height: 600px){.content.medium.svelte-1t95ghb.svelte-1t95ghb{max-height:calc(100dvh - 32px)}}.content.large.svelte-1t95ghb.svelte-1t95ghb{width:var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));max-height:var(--sui-dialog-large-content-max-height, var(--sui-dialog-content-max-height, 800px))}@media(max-height: 800px){.content.large.svelte-1t95ghb.svelte-1t95ghb{max-height:calc(100dvh - 32px)}}.content.x-large.svelte-1t95ghb.svelte-1t95ghb{width:var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));max-height:var(--sui-dialog-x-large-content-max-height, var(--sui-dialog-content-max-height, 1000px))}@media(max-height: 1000px){.content.x-large.svelte-1t95ghb.svelte-1t95ghb{max-height:calc(100dvh - 32px)}}.header.svelte-1t95ghb.svelte-1t95ghb,.footer.svelte-1t95ghb.svelte-1t95ghb{display:flex;align-items:center;gap:4px}.header.svelte-1t95ghb.svelte-1t95ghb{box-sizing:content-box;margin:var(--sui-dialog-header-margin, 0 16px);border-width:var(--sui-dialog-header-border-width, 0 0 1px);border-color:var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));padding:var(--sui-dialog-header-padding, 16px 8px);height:var(--sui-dialog-header-height, 32px)}.header.svelte-1t95ghb .title.svelte-1t95ghb{font-size:var(--sui-font-size-large)}.footer.svelte-1t95ghb.svelte-1t95ghb{margin:var(--sui-dialog-footer-margin, 0 24px 24px)}.body.svelte-1t95ghb.svelte-1t95ghb{overflow:auto;margin:var(--sui-dialog-body-margin, 24px 24px);white-space:normal;line-height:var(--sui-line-height-compact)}")}const kN=t=>({}),O_=t=>({}),SN=t=>({}),P_=t=>({}),EN=t=>({}),I_=t=>({slot:"start-icon"}),TN=t=>({}),D_=t=>({}),AN=t=>({}),M_=t=>({}),CN=t=>({}),R_=t=>({slot:"extra-content"});function $_(t){let e,n,i,r;const s=[LN,NN],l=[];function o(a,u){return a[16].header?0:1}return n=o(t),i=l[n]=s[n](t),{c(){e=F("div"),i.c(),C(e,"role","none"),C(e,"class","header svelte-1t95ghb")},m(a,u){A(a,e,u),l[n].m(e,null),r=!0},p(a,u){let c=n;n=o(a),n===c?l[n].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),i=l[n],i?i.p(a,u):(i=l[n]=s[n](a),i.c()),_(i,1),i.m(e,null))},i(a){r||(_(i),r=!0)},o(a){y(i),r=!1},d(a){a&&T(e),l[n].d()}}}function NN(t){let e,n,i,r,s,l,o,a;r=new In({props:{flex:!0}});let u=t[16]["header-extra"]&&F_(t),c=t[5]&&z_(t);return{c(){e=F("div"),n=G(t[4]),i=j(),O(r.$$.fragment),s=j(),u&&u.c(),l=j(),c&&c.c(),o=Q(),C(e,"role","none"),C(e,"id",t[15]+"-title"),C(e,"class","title svelte-1t95ghb")},m(f,d){A(f,e,d),$(e,n),A(f,i,d),N(r,f,d),A(f,s,d),u&&u.m(f,d),A(f,l,d),c&&c.m(f,d),A(f,o,d),a=!0},p(f,d){(!a||d&16)&&X(n,f[4]),f[16]["header-extra"]?u?(u.p(f,d),d&65536&&_(u,1)):(u=F_(f),u.c(),_(u,1),u.m(l.parentNode,l)):u&&(x(),y(u,1,1,()=>{u=null}),V()),f[5]?c?(c.p(f,d),d&32&&_(c,1)):(c=z_(f),c.c(),_(c,1),c.m(o.parentNode,o)):c&&(x(),y(c,1,1,()=>{c=null}),V())},i(f){a||(_(r.$$.fragment,f),_(u),_(c),a=!0)},o(f){y(r.$$.fragment,f),y(u),y(c),a=!1},d(f){f&&(T(e),T(i),T(s),T(l),T(o)),L(r,f),u&&u.d(f),c&&c.d(f)}}}function LN(t){let e;const n=t[18].header,i=ke(n,t,t[30],M_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1073741824)&&Ee(i,n,r,r[30],e?Se(n,r[30],s,AN):Te(r[30]),M_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function F_(t){let e;const n=t[18]["header-extra"],i=ke(n,t,t[30],D_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1073741824)&&Ee(i,n,r,r[30],e?Se(n,r[30],s,TN):Te(r[30]),D_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function z_(t){let e,n;return e=new et({props:{variant:"ghost",iconic:!0,"aria-label":t[14]("_sui.close"),"aria-controls":t[15],$$slots:{"start-icon":[PN]},$$scope:{ctx:t}}}),e.$on("click",t[19]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16384&&(s["aria-label"]=i[14]("_sui.close")),r&1073741824&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ON(t){let e,n;return e=new xe({props:{name:"close"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function PN(t){let e;const n=t[18]["close-icon"],i=ke(n,t,t[30],I_),r=i||ON();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&1073741824)&&Ee(i,n,s,s[30],e?Se(n,s[30],l,EN):Te(s[30]),I_)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function j_(t){let e,n,i,r;const s=[DN,IN],l=[];function o(a,u){return a[16].footer?0:1}return n=o(t),i=l[n]=s[n](t),{c(){e=F("div"),i.c(),C(e,"role","none"),C(e,"class","footer svelte-1t95ghb")},m(a,u){A(a,e,u),l[n].m(e,null),r=!0},p(a,u){let c=n;n=o(a),n===c?l[n].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),i=l[n],i?i.p(a,u):(i=l[n]=s[n](a),i.c()),_(i,1),i.m(e,null))},i(a){r||(_(i),r=!0)},o(a){y(i),r=!1},d(a){a&&T(e),l[n].d()}}}function IN(t){let e,n,i,r,s,l,o=t[16]["footer-extra"]&&B_(t);n=new In({props:{flex:!0}});let a=t[6]&&U_(t),u=t[9]&&q_(t);return{c(){o&&o.c(),e=j(),O(n.$$.fragment),i=j(),a&&a.c(),r=j(),u&&u.c(),s=Q()},m(c,f){o&&o.m(c,f),A(c,e,f),N(n,c,f),A(c,i,f),a&&a.m(c,f),A(c,r,f),u&&u.m(c,f),A(c,s,f),l=!0},p(c,f){c[16]["footer-extra"]?o?(o.p(c,f),f&65536&&_(o,1)):(o=B_(c),o.c(),_(o,1),o.m(e.parentNode,e)):o&&(x(),y(o,1,1,()=>{o=null}),V()),c[6]?a?(a.p(c,f),f&64&&_(a,1)):(a=U_(c),a.c(),_(a,1),a.m(r.parentNode,r)):a&&(x(),y(a,1,1,()=>{a=null}),V()),c[9]?u?(u.p(c,f),f&512&&_(u,1)):(u=q_(c),u.c(),_(u,1),u.m(s.parentNode,s)):u&&(x(),y(u,1,1,()=>{u=null}),V())},i(c){l||(_(o),_(n.$$.fragment,c),_(a),_(u),l=!0)},o(c){y(o),y(n.$$.fragment,c),y(a),y(u),l=!1},d(c){c&&(T(e),T(i),T(r),T(s)),o&&o.d(c),L(n,c),a&&a.d(c),u&&u.d(c)}}}function DN(t){let e;const n=t[18].footer,i=ke(n,t,t[30],P_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1073741824)&&Ee(i,n,r,r[30],e?Se(n,r[30],s,SN):Te(r[30]),P_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function B_(t){let e;const n=t[18]["footer-extra"],i=ke(n,t,t[30],O_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1073741824)&&Ee(i,n,r,r[30],e?Se(n,r[30],s,kN):Te(r[30]),O_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function U_(t){let e,n;return e=new et({props:{variant:"primary",label:t[7]||t[14]("_sui.ok"),disabled:t[8]}}),e.$on("click",t[20]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16512&&(s.label=i[7]||i[14]("_sui.ok")),r&256&&(s.disabled=i[8]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function q_(t){let e,n;return e=new et({props:{variant:"secondary",label:t[10]||t[14]("_sui.cancel"),disabled:t[11]}}),e.$on("click",t[21]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&17408&&(s.label=i[10]||i[14]("_sui.cancel")),r&2048&&(s.disabled=i[11]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function MN(t){let e,n,i,r,s,l,o=(t[4]||t[5]||t[16].header||t[16]["header-extra"])&&$_(t);const a=t[18].default,u=ke(a,t,t[30],null);let c=(t[6]||t[9]||t[16].footer||t[16]["footer-extra"])&&j_(t);return{c(){e=F("div"),o&&o.c(),n=j(),i=F("div"),u&&u.c(),r=j(),c&&c.c(),C(i,"role","none"),C(i,"id",t[15]+"-body"),C(i,"class","body svelte-1t95ghb"),C(e,"role","none"),C(e,"class",s="content "+t[1]+" "+t[3]+" svelte-1t95ghb")},m(f,d){A(f,e,d),o&&o.m(e,null),$(e,n),$(e,i),u&&u.m(i,null),$(e,r),c&&c.m(e,null),l=!0},p(f,d){f[4]||f[5]||f[16].header||f[16]["header-extra"]?o?(o.p(f,d),d&65584&&_(o,1)):(o=$_(f),o.c(),_(o,1),o.m(e,n)):o&&(x(),y(o,1,1,()=>{o=null}),V()),u&&u.p&&(!l||d&1073741824)&&Ee(u,a,f,f[30],l?Se(a,f[30],d,null):Te(f[30]),null),f[6]||f[9]||f[16].footer||f[16]["footer-extra"]?c?(c.p(f,d),d&66112&&_(c,1)):(c=j_(f),c.c(),_(c,1),c.m(e,null)):c&&(x(),y(c,1,1,()=>{c=null}),V()),(!l||d&10&&s!==(s="content "+f[1]+" "+f[3]+" svelte-1t95ghb"))&&C(e,"class",s)},i(f){l||(_(o),_(u,f),_(c),l=!0)},o(f){y(o),y(u,f),y(c),l=!1},d(f){f&&T(e),o&&o.d(),u&&u.d(f),c&&c.d()}}}function RN(t){let e;const n=t[18]["extra-content"],i=ke(n,t,t[30],R_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1073741824)&&Ee(i,n,r,r[30],e?Se(n,r[30],s,CN):Te(r[30]),R_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function $N(t){let e,n,i;const r=[{role:t[2]},{id:t[15]},{class:"dialog"},{"aria-label":t[16].header?void 0:t[4]},{"aria-labelledby":t[16].header?t[4]:`${t[15]}-title`},{"aria-describedby":t[15]+"-body"},{showBackdrop:!0},{lightDismiss:t[12]},t[17]];function s(o){t[22](o)}let l={$$slots:{"extra-content":[RN],default:[MN]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[0]!==void 0&&(l.open=t[0]),e=new L2({props:l}),ae.push(()=>Re(e,"open",s)),t[23](e),e.$on("opening",t[24]),e.$on("open",t[25]),e.$on("ok",t[26]),e.$on("cancel",t[27]),e.$on("closing",t[28]),e.$on("close",t[29]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&233492?Ge(r,[a&4&&{role:o[2]},a&32768&&{id:o[15]},r[2],a&65552&&{"aria-label":o[16].header?void 0:o[4]},a&98320&&{"aria-labelledby":o[16].header?o[4]:`${o[15]}-title`},a&32768&&{"aria-describedby":o[15]+"-body"},r[6],a&4096&&{lightDismiss:o[12]},a&131072&&qt(o[17])]):{};a&1073836026&&(u.$$scope={dirty:a,ctx:o}),!n&&a&1&&(n=!0,u.open=o[0],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){t[23](null),L(e,o)}}}function FN(t,e,n){const i=["class","role","size","open","title","showClose","showOk","okLabel","okDisabled","showCancel","cancelLabel","cancelDisabled","lightDismiss"];let r=he(e,i),s;B(t,ue,se=>n(14,s=se));let{$$slots:l={},$$scope:o}=e;const a=Aa(l);let{class:u=""}=e,{role:c="dialog"}=e,{size:f="medium"}=e,{open:d=!1}=e,{title:h}=e,{showClose:m=!1}=e,{showOk:p=!0}=e,{okLabel:g=""}=e,{okDisabled:v=!1}=e,{showCancel:b=!0}=e,{cancelLabel:w=""}=e,{cancelDisabled:k=!1}=e,{lightDismiss:S=!1}=e;const E=ii("dialog");let P;const M=()=>{P.close("close")},I=()=>{P.close("ok")},D=()=>{P.close("cancel")};function z(se){d=se,n(0,d)}function R(se){ae[se?"unshift":"push"](()=>{P=se,n(13,P)})}function U(se){fe.call(this,t,se)}function W(se){fe.call(this,t,se)}function ee(se){fe.call(this,t,se)}function K(se){fe.call(this,t,se)}function ve(se){fe.call(this,t,se)}function me(se){fe.call(this,t,se)}return t.$$set=se=>{e=Z(Z({},e),tt(se)),n(17,r=he(e,i)),"class"in se&&n(1,u=se.class),"role"in se&&n(2,c=se.role),"size"in se&&n(3,f=se.size),"open"in se&&n(0,d=se.open),"title"in se&&n(4,h=se.title),"showClose"in se&&n(5,m=se.showClose),"showOk"in se&&n(6,p=se.showOk),"okLabel"in se&&n(7,g=se.okLabel),"okDisabled"in se&&n(8,v=se.okDisabled),"showCancel"in se&&n(9,b=se.showCancel),"cancelLabel"in se&&n(10,w=se.cancelLabel),"cancelDisabled"in se&&n(11,k=se.cancelDisabled),"lightDismiss"in se&&n(12,S=se.lightDismiss),"$$scope"in se&&n(30,o=se.$$scope)},[d,u,c,f,h,m,p,g,v,b,w,k,S,P,s,E,a,r,l,M,I,D,z,R,U,W,ee,K,ve,me,o]}class Br extends ie{constructor(e){super(),ne(this,e,FN,$N,te,{class:1,role:2,size:3,open:0,title:4,showClose:5,showOk:6,okLabel:7,okDisabled:8,showCancel:9,cancelLabel:10,cancelDisabled:11,lightDismiss:12},wN)}}function zN(t){let e;const n=t[5].default,i=ke(n,t,t[13],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&8192)&&Ee(i,n,r,r[13],e?Se(n,r[13],s,null):Te(r[13]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function jN(t){let e,n,i;const r=[{role:"alertdialog"},{class:t[1]},{title:t[2]},{okLabel:t[3]},{showCancel:!1},t[4]];function s(o){t[6](o)}let l={$$slots:{default:[zN]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[0]!==void 0&&(l.open=t[0]),e=new Br({props:l}),ae.push(()=>Re(e,"open",s)),e.$on("opening",t[7]),e.$on("open",t[8]),e.$on("ok",t[9]),e.$on("cancel",t[10]),e.$on("closing",t[11]),e.$on("close",t[12]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&30?Ge(r,[r[0],a&2&&{class:o[1]},a&4&&{title:o[2]},a&8&&{okLabel:o[3]},r[4],a&16&&qt(o[4])]):{};a&8192&&(u.$$scope={dirty:a,ctx:o}),!n&&a&1&&(n=!0,u.open=o[0],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function BN(t,e,n){const i=["class","open","title","okLabel"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{open:a=!1}=e,{title:u}=e,{okLabel:c=""}=e;function f(b){a=b,n(0,a)}function d(b){fe.call(this,t,b)}function h(b){fe.call(this,t,b)}function m(b){fe.call(this,t,b)}function p(b){fe.call(this,t,b)}function g(b){fe.call(this,t,b)}function v(b){fe.call(this,t,b)}return t.$$set=b=>{e=Z(Z({},e),tt(b)),n(4,r=he(e,i)),"class"in b&&n(1,o=b.class),"open"in b&&n(0,a=b.open),"title"in b&&n(2,u=b.title),"okLabel"in b&&n(3,c=b.okLabel),"$$scope"in b&&n(13,l=b.$$scope)},[a,o,u,c,r,s,f,d,h,m,p,g,v,l]}class D2 extends ie{constructor(e){super(),ne(this,e,BN,jN,te,{class:1,open:0,title:2,okLabel:3})}}function UN(t){let e;const n=t[6].default,i=ke(n,t,t[14],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&16384)&&Ee(i,n,r,r[14],e?Se(n,r[14],s,null):Te(r[14]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function qN(t){let e,n,i;const r=[{role:"alertdialog"},{class:t[1]},{title:t[2]},{okLabel:t[3]},{cancelLabel:t[4]},t[5]];function s(o){t[7](o)}let l={$$slots:{default:[UN]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[0]!==void 0&&(l.open=t[0]),e=new Br({props:l}),ae.push(()=>Re(e,"open",s)),e.$on("opening",t[8]),e.$on("open",t[9]),e.$on("ok",t[10]),e.$on("cancel",t[11]),e.$on("closing",t[12]),e.$on("close",t[13]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&62?Ge(r,[r[0],a&2&&{class:o[1]},a&4&&{title:o[2]},a&8&&{okLabel:o[3]},a&16&&{cancelLabel:o[4]},a&32&&qt(o[5])]):{};a&16384&&(u.$$scope={dirty:a,ctx:o}),!n&&a&1&&(n=!0,u.open=o[0],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function HN(t,e,n){const i=["class","open","title","okLabel","cancelLabel"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{open:a=!1}=e,{title:u}=e,{okLabel:c=""}=e,{cancelLabel:f=""}=e;function d(w){a=w,n(0,a)}function h(w){fe.call(this,t,w)}function m(w){fe.call(this,t,w)}function p(w){fe.call(this,t,w)}function g(w){fe.call(this,t,w)}function v(w){fe.call(this,t,w)}function b(w){fe.call(this,t,w)}return t.$$set=w=>{e=Z(Z({},e),tt(w)),n(5,r=he(e,i)),"class"in w&&n(1,o=w.class),"open"in w&&n(0,a=w.open),"title"in w&&n(2,u=w.title),"okLabel"in w&&n(3,c=w.okLabel),"cancelLabel"in w&&n(4,f=w.cancelLabel),"$$scope"in w&&n(14,l=w.$$scope)},[a,o,u,c,f,r,s,d,h,m,p,g,v,b,l]}class Ia extends ie{constructor(e){super(),ne(this,e,HN,qN,te,{class:1,open:0,title:2,okLabel:3,cancelLabel:4})}}function xN(t){ye(t,"svelte-1dpki7p",".text-input.svelte-1dpki7p.svelte-1dpki7p{display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width)}.text-input.flex.svelte-1dpki7p.svelte-1dpki7p{width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0}input.svelte-1dpki7p.svelte-1dpki7p:-webkit-autofill,input.svelte-1dpki7p.svelte-1dpki7p:-webkit-autofill:focus{transition:background-color 0s 600000s, color 0s 600000s}input.svelte-1dpki7p.svelte-1dpki7p{display:inline-block;flex:auto;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-padding, 0 8px);min-width:0;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-singleline-line-height);font-weight:var(--sui-textbox-font-weight, normal);text-align:var(--sui-textbox-text-align, left);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);transition:all 200ms}input.svelte-1dpki7p.svelte-1dpki7p:focus{border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color))}input.svelte-1dpki7p.svelte-1dpki7p:read-only{color:var(--sui-tertiary-foreground-color);border-color:var(--sui-textbox-border-color) !important}input.svelte-1dpki7p.svelte-1dpki7p:disabled,input.svelte-1dpki7p.svelte-1dpki7p:read-only{background-color:var(--sui-disabled-background-color)}input[aria-invalid=true].svelte-1dpki7p.svelte-1dpki7p{border-color:var(--sui-error-foreground-color)}input.svelte-1dpki7p~button{flex:none;margin-left:-1px;border-width:1px;border-color:var(--sui-textbox-border-color);height:var(--sui-textbox-height);aspect-ratio:1/1}input.svelte-1dpki7p~button:last-child{border-radius:0 4px 4px 0}input.svelte-1dpki7p~button .icon{font-size:var(--sui-font-size-xx-large)}.label.svelte-1dpki7p.svelte-1dpki7p{position:absolute;inset:var(--sui-textbox-padding, 0 8px);z-index:2;display:flex;align-items:center;justify-content:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, left));white-space:nowrap;pointer-events:none}.label.hidden.svelte-1dpki7p.svelte-1dpki7p{opacity:0}input.svelte-1dpki7p:focus+.label.svelte-1dpki7p{opacity:0}input.svelte-1dpki7p.svelte-1dpki7p::placeholder,.label.svelte-1dpki7p.svelte-1dpki7p{color:var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));opacity:var(--sui-textbox-placeholder-opacity, 0.5);font-family:var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));font-size:var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));line-height:var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));font-weight:var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, normal));text-align:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, left));text-indent:var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));letter-spacing:var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal))}")}function H_(t){let e,n;return{c(){e=F("span"),n=G(t[14]),C(e,"id",t[15]+"-label"),C(e,"class","label svelte-1dpki7p"),C(e,"aria-hidden","true"),re(e,"hidden",!!t[1])},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&16384&&X(n,i[14]),r&2&&re(e,"hidden",!!i[1])},d(i){i&&T(e)}}}function VN(t){let e,n,i,r,s,l,o,a,u,c,f,d,h=[{type:"text"},{role:t[4]},{name:i=t[11]||void 0},{tabindex:r=t[6]?-1:0},{disabled:s=t[6]||void 0},{readOnly:l=t[7]||void 0},{inputmode:t[13]},{"aria-hidden":t[5]},{"aria-disabled":t[6]},{"aria-readonly":t[7]},{"aria-required":t[8]},{"aria-invalid":t[9]},t[16]],m={};for(let g=0;g<h.length;g+=1)m=Z(m,h[g]);let p=t[14]&&t[12]&&H_(t);return{c(){e=F("div"),n=F("input"),a=j(),p&&p.c(),je(n,m),re(n,"svelte-1dpki7p",!0),C(e,"role","none"),C(e,"class",u="sui text-input "+t[2]+" svelte-1dpki7p"),e.hidden=c=t[5]||void 0,re(e,"flex",t[3]),re(e,"disabled",t[6]),re(e,"readonly",t[7])},m(g,v){A(g,e,v),$(e,n),n.autofocus&&n.focus(),t[22](n),ss(n,t[1]),$(e,a),p&&p.m(e,null),f||(d=[Fe(n,"input",t[23]),Fe(n,"keydown",t[17]),Fe(n,"keyup",t[18]),Fe(n,"keypress",t[19]),Fe(n,"input",t[20]),Fe(n,"change",t[21]),Ks(o=P2.call(null,n,t[10]))],f=!0)},p(g,[v]){je(n,m=Ge(h,[{type:"text"},v&16&&{role:g[4]},v&2048&&i!==(i=g[11]||void 0)&&{name:i},v&64&&r!==(r=g[6]?-1:0)&&{tabindex:r},v&64&&s!==(s=g[6]||void 0)&&{disabled:s},v&128&&l!==(l=g[7]||void 0)&&{readOnly:l},v&8192&&{inputmode:g[13]},v&32&&{"aria-hidden":g[5]},v&64&&{"aria-disabled":g[6]},v&128&&{"aria-readonly":g[7]},v&256&&{"aria-required":g[8]},v&512&&{"aria-invalid":g[9]},v&65536&&g[16]])),v&2&&n.value!==g[1]&&ss(n,g[1]),o&&Gs(o.update)&&v&1024&&o.update.call(null,g[10]),re(n,"svelte-1dpki7p",!0),g[14]&&g[12]?p?p.p(g,v):(p=H_(g),p.c(),p.m(e,null)):p&&(p.d(1),p=null),v&4&&u!==(u="sui text-input "+g[2]+" svelte-1dpki7p")&&C(e,"class",u),v&32&&c!==(c=g[5]||void 0)&&(e.hidden=c),v&12&&re(e,"flex",g[3]),v&68&&re(e,"disabled",g[6]),v&132&&re(e,"readonly",g[7])},i:H,o:H,d(g){g&&T(e),t[22](null),p&&p.d(),f=!1,Gt(d)}}}function WN(t,e,n){let i;const r=["element","class","flex","role","hidden","disabled","readonly","required","invalid","keyShortcuts","name","value","showInlineLabel","inputmode"];let s=he(e,r),{element:l=void 0}=e,{class:o=""}=e,{flex:a=!1}=e,{role:u="textbox"}=e,{hidden:c=void 0}=e,{disabled:f=!1}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e,{keyShortcuts:p=void 0}=e,{name:g=void 0}=e,{value:v=void 0}=e,{showInlineLabel:b=!1}=e,{inputmode:w="text"}=e;const k=ii("input");function S(R){fe.call(this,t,R)}function E(R){fe.call(this,t,R)}function P(R){fe.call(this,t,R)}function M(R){fe.call(this,t,R)}function I(R){fe.call(this,t,R)}function D(R){ae[R?"unshift":"push"](()=>{l=R,n(0,l)})}function z(){v=this.value,n(1,v)}return t.$$set=R=>{e=Z(Z({},e),tt(R)),n(16,s=he(e,r)),"element"in R&&n(0,l=R.element),"class"in R&&n(2,o=R.class),"flex"in R&&n(3,a=R.flex),"role"in R&&n(4,u=R.role),"hidden"in R&&n(5,c=R.hidden),"disabled"in R&&n(6,f=R.disabled),"readonly"in R&&n(7,d=R.readonly),"required"in R&&n(8,h=R.required),"invalid"in R&&n(9,m=R.invalid),"keyShortcuts"in R&&n(10,p=R.keyShortcuts),"name"in R&&n(11,g=R.name),"value"in R&&n(1,v=R.value),"showInlineLabel"in R&&n(12,b=R.showInlineLabel),"inputmode"in R&&n(13,w=R.inputmode)},t.$$.update=()=>{n(14,i=s["aria-label"])},[l,v,o,a,u,c,f,d,h,m,p,g,b,w,i,k,s,S,E,P,M,I,D,z]}class Sn extends ie{constructor(e){super(),ne(this,e,WN,VN,te,{element:0,class:2,flex:3,role:4,hidden:5,disabled:6,readonly:7,required:8,invalid:9,keyShortcuts:10,name:11,value:1,showInlineLabel:12,inputmode:13},xN)}get element(){return this.$$.ctx[0]}set element(e){this.$$set({element:e}),Je()}get class(){return this.$$.ctx[2]}set class(e){this.$$set({class:e}),Je()}get flex(){return this.$$.ctx[3]}set flex(e){this.$$set({flex:e}),Je()}get role(){return this.$$.ctx[4]}set role(e){this.$$set({role:e}),Je()}get hidden(){return this.$$.ctx[5]}set hidden(e){this.$$set({hidden:e}),Je()}get disabled(){return this.$$.ctx[6]}set disabled(e){this.$$set({disabled:e}),Je()}get readonly(){return this.$$.ctx[7]}set readonly(e){this.$$set({readonly:e}),Je()}get required(){return this.$$.ctx[8]}set required(e){this.$$set({required:e}),Je()}get invalid(){return this.$$.ctx[9]}set invalid(e){this.$$set({invalid:e}),Je()}get keyShortcuts(){return this.$$.ctx[10]}set keyShortcuts(e){this.$$set({keyShortcuts:e}),Je()}get name(){return this.$$.ctx[11]}set name(e){this.$$set({name:e}),Je()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),Je()}get showInlineLabel(){return this.$$.ctx[12]}set showInlineLabel(e){this.$$set({showInlineLabel:e}),Je()}get inputmode(){return this.$$.ctx[13]}set inputmode(e){this.$$set({inputmode:e}),Je()}}function YN(t){ye(t,"svelte-1cxrmev",".input-outer.svelte-1cxrmev{margin:12px 0 0}")}const GN=t=>({}),x_=t=>({});function KN(t){let e,n,i;const r=[{flex:!0},{autofocus:!0},t[7]];function s(o){t[11](o)}let l={};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[1]!==void 0&&(l.value=t[1]),e=new Sn({props:l}),ae.push(()=>Re(e,"value",s)),e.$on("input",t[12]),e.$on("keydown",t[13]),e.$on("keyup",t[14]),e.$on("keypress",t[15]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,a){const u=a&128?Ge(r,[r[0],r[1],qt(o[7])]):{};!n&&a&2&&(n=!0,u.value=o[1],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function ZN(t){let e;const n=t[10].input,i=ke(n,t,t[23],x_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&8388608)&&Ee(i,n,r,r[23],e?Se(n,r[23],s,GN):Te(r[23]),x_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function JN(t){let e,n,i,r,s;const l=t[10].default,o=ke(l,t,t[23],null),a=[ZN,KN],u=[];function c(f,d){return f[9].input?0:1}return i=c(t),r=u[i]=a[i](t),{c(){o&&o.c(),e=j(),n=F("div"),r.c(),C(n,"class","input-outer svelte-1cxrmev")},m(f,d){o&&o.m(f,d),A(f,e,d),A(f,n,d),u[i].m(n,null),s=!0},p(f,d){o&&o.p&&(!s||d&8388608)&&Ee(o,l,f,f[23],s?Se(l,f[23],d,null):Te(f[23]),null);let h=i;i=c(f),i===h?u[i].p(f,d):(x(),y(u[h],1,1,()=>{u[h]=null}),V(),r=u[i],r?r.p(f,d):(r=u[i]=a[i](f),r.c()),_(r,1),r.m(n,null))},i(f){s||(_(o,f),_(r),s=!0)},o(f){y(o,f),y(r),s=!1},d(f){f&&(T(e),T(n)),o&&o.d(f),u[i].d()}}}function XN(t){let e,n,i;const r=[{role:"alertdialog"},{class:t[2]},{title:t[3]},{okLabel:t[4]},{okDisabled:t[5]},{cancelLabel:t[6]},t[8]];function s(o){t[16](o)}let l={$$slots:{default:[JN]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[0]!==void 0&&(l.open=t[0]),e=new Br({props:l}),ae.push(()=>Re(e,"open",s)),e.$on("opening",t[17]),e.$on("open",t[18]),e.$on("ok",t[19]),e.$on("cancel",t[20]),e.$on("closing",t[21]),e.$on("close",t[22]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&380?Ge(r,[r[0],a&4&&{class:o[2]},a&8&&{title:o[3]},a&16&&{okLabel:o[4]},a&32&&{okDisabled:o[5]},a&64&&{cancelLabel:o[6]},a&256&&qt(o[8])]):{};a&8389250&&(u.$$scope={dirty:a,ctx:o}),!n&&a&1&&(n=!0,u.open=o[0],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function QN(t,e,n){const i=["class","open","title","okLabel","okDisabled","cancelLabel","value","textboxAttrs"];let r=he(e,i),{$$slots:s={},$$scope:l}=e;const o=Aa(s);let{class:a=""}=e,{open:u=!1}=e,{title:c}=e,{okLabel:f=""}=e,{okDisabled:d=!1}=e,{cancelLabel:h=""}=e,{value:m=""}=e,{textboxAttrs:p={}}=e;function g(R){m=R,n(1,m)}function v(R){fe.call(this,t,R)}function b(R){fe.call(this,t,R)}function w(R){fe.call(this,t,R)}function k(R){fe.call(this,t,R)}function S(R){u=R,n(0,u)}function E(R){fe.call(this,t,R)}function P(R){fe.call(this,t,R)}function M(R){fe.call(this,t,R)}function I(R){fe.call(this,t,R)}function D(R){fe.call(this,t,R)}function z(R){fe.call(this,t,R)}return t.$$set=R=>{e=Z(Z({},e),tt(R)),n(8,r=he(e,i)),"class"in R&&n(2,a=R.class),"open"in R&&n(0,u=R.open),"title"in R&&n(3,c=R.title),"okLabel"in R&&n(4,f=R.okLabel),"okDisabled"in R&&n(5,d=R.okDisabled),"cancelLabel"in R&&n(6,h=R.cancelLabel),"value"in R&&n(1,m=R.value),"textboxAttrs"in R&&n(7,p=R.textboxAttrs),"$$scope"in R&&n(23,l=R.$$scope)},[u,m,a,c,f,d,h,p,r,o,s,g,v,b,w,k,S,E,P,M,I,D,z,l]}class eL extends ie{constructor(e){super(),ne(this,e,QN,XN,te,{class:2,open:0,title:3,okLabel:4,okDisabled:5,cancelLabel:6,value:1,textboxAttrs:7},YN)}}function tL(t){ye(t,"svelte-1kwzcm6",".grid-body.svelte-1kwzcm6{display:table-row-group}th.svelte-1kwzcm6{padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);text-align:left}")}function V_(t){let e,n,i;return{c(){e=F("tr"),n=F("th"),i=G(t[1]),C(n,"id",t[2]+"-label"),C(n,"colspan","9999"),C(n,"scope","rowgroup"),C(n,"class","svelte-1kwzcm6"),C(e,"class","row-group-caption")},m(r,s){A(r,e,s),$(e,n),$(n,i)},p(r,s){s&2&&X(i,r[1])},d(r){r&&T(e)}}}function nL(t){let e,n,i,r,s,l=t[1]&&V_(t);const o=t[5].default,a=ke(o,t,t[4],null);let u=[{role:"rowgroup"},{class:i="sui grid-body row-group "+t[0]},{"aria-labelledby":r=t[1]?`${t[2]}-label`:void 0},{"aria-roledescription":"grid body"},t[3]],c={};for(let f=0;f<u.length;f+=1)c=Z(c,u[f]);return{c(){e=F("div"),l&&l.c(),n=j(),a&&a.c(),je(e,c),re(e,"svelte-1kwzcm6",!0)},m(f,d){A(f,e,d),l&&l.m(e,null),$(e,n),a&&a.m(e,null),s=!0},p(f,[d]){f[1]?l?l.p(f,d):(l=V_(f),l.c(),l.m(e,n)):l&&(l.d(1),l=null),a&&a.p&&(!s||d&16)&&Ee(a,o,f,f[4],s?Se(o,f[4],d,null):Te(f[4]),null),je(e,c=Ge(u,[{role:"rowgroup"},(!s||d&1&&i!==(i="sui grid-body row-group "+f[0]))&&{class:i},(!s||d&2&&r!==(r=f[1]?`${f[2]}-label`:void 0))&&{"aria-labelledby":r},{"aria-roledescription":"grid body"},d&8&&f[3]])),re(e,"svelte-1kwzcm6",!0)},i(f){s||(_(a,f),s=!0)},o(f){y(a,f),s=!1},d(f){f&&T(e),l&&l.d(),a&&a.d(f)}}}function iL(t,e,n){const i=["class","label"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{label:a=""}=e;const u=ii("tbody");return t.$$set=c=>{e=Z(Z({},e),tt(c)),n(3,r=he(e,i)),"class"in c&&n(0,o=c.class),"label"in c&&n(1,a=c.label),"$$scope"in c&&n(4,l=c.$$scope)},[o,a,u,r,l,s]}class M2 extends ie{constructor(e){super(),ne(this,e,iL,nL,te,{class:0,label:1},tL)}}function rL(t){ye(t,"svelte-wr4g2i",".grid-cell.svelte-wr4g2i{display:table-cell}")}function sL(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"gridcell"},{class:n="sui grid-cell "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-wr4g2i",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"gridcell"},(!i||u&1&&n!==(n="sui grid-cell "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-wr4g2i",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function lL(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class fi extends ie{constructor(e){super(),ne(this,e,lL,sL,te,{class:0},rL)}}function oL(t){ye(t,"svelte-1kfxsl7",".grid-row.svelte-1kfxsl7{display:table-row;height:var(--sui-primary-row-height)}")}function aL(t){let e,n,i,r,s;const l=t[5].default,o=ke(l,t,t[4],null);let a=[{role:"row"},{class:n="sui grid-row "+t[0]},{tabindex:"0"},{"aria-selected":t[1]},t[3]],u={};for(let c=0;c<a.length;c+=1)u=Z(u,a[c]);return{c(){e=F("div"),o&&o.c(),je(e,u),re(e,"svelte-1kfxsl7",!0)},m(c,f){A(c,e,f),o&&o.m(e,null),i=!0,r||(s=[Fe(e,"click",t[6]),Fe(e,"dblclick",t[7]),Fe(e,"focus",t[8]),Fe(e,"blur",t[9]),Fe(e,"select",t[10]),Fe(e,"change",t[11])],r=!0)},p(c,[f]){o&&o.p&&(!i||f&16)&&Ee(o,l,c,c[4],i?Se(l,c[4],f,null):Te(c[4]),null),je(e,u=Ge(a,[{role:"row"},(!i||f&1&&n!==(n="sui grid-row "+c[0]))&&{class:n},{tabindex:"0"},(!i||f&2)&&{"aria-selected":c[1]},f&8&&c[3]])),re(e,"svelte-1kfxsl7",!0)},i(c){i||(_(o,c),i=!0)},o(c){y(o,c),i=!1},d(c){c&&T(e),o&&o.d(c),r=!1,Gt(s)}}}function uL(t,e,n){const i=["class","selected"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{selected:a=!1}=e;const u=sn();function c(g){fe.call(this,t,g)}function f(g){fe.call(this,t,g)}function d(g){fe.call(this,t,g)}function h(g){fe.call(this,t,g)}const m=g=>{u("select",g.detail)},p=g=>{u("change",g.detail)};return t.$$set=g=>{e=Z(Z({},e),tt(g)),n(3,r=he(e,i)),"class"in g&&n(0,o=g.class),"selected"in g&&n(1,a=g.selected),"$$scope"in g&&n(4,l=g.$$scope)},[o,a,u,r,l,s,c,f,d,h,m,p]}class Da extends ie{constructor(e){super(),ne(this,e,uL,aL,te,{class:0,selected:1},oL)}}function cL(t){ye(t,"svelte-s4077y",".grid.svelte-s4077y{display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2)}.grid.svelte-s4077y.data{border-collapse:collapse}.grid.svelte-s4077y.data .grid-col-header,.grid.svelte-s4077y.data .grid-row-header,.grid.svelte-s4077y.data .grid-cell{border:1px solid var(--sui-secondary-border-color);padding:8px 8px}")}function fL(t){let e,n,i,r,s;const l=t[6].default,o=ke(l,t,t[5],null);let a=[{role:"grid"},{class:n="sui grid "+t[1]},{"aria-multiselectable":t[2]},t[4]],u={};for(let c=0;c<a.length;c+=1)u=Z(u,a[c]);return{c(){e=F("div"),o&&o.c(),je(e,u),re(e,"svelte-s4077y",!0)},m(c,f){A(c,e,f),o&&o.m(e,null),t[7](e),i=!0,r||(s=[Ks(Pa.call(null,e)),Fe(e,"change",t[8])],r=!0)},p(c,[f]){o&&o.p&&(!i||f&32)&&Ee(o,l,c,c[5],i?Se(l,c[5],f,null):Te(c[5]),null),je(e,u=Ge(a,[{role:"grid"},(!i||f&2&&n!==(n="sui grid "+c[1]))&&{class:n},(!i||f&4)&&{"aria-multiselectable":c[2]},f&16&&c[4]])),re(e,"svelte-s4077y",!0)},i(c){i||(_(o,c),i=!0)},o(c){y(o,c),i=!1},d(c){c&&T(e),o&&o.d(c),t[7](null),r=!1,Gt(s)}}}function dL(t,e,n){const i=["class","multiple","element"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{multiple:a=!1}=e,{element:u=void 0}=e;const c=sn();function f(h){ae[h?"unshift":"push"](()=>{u=h,n(0,u)})}const d=h=>{c("change",h.detail)};return t.$$set=h=>{e=Z(Z({},e),tt(h)),n(4,r=he(e,i)),"class"in h&&n(1,o=h.class),"multiple"in h&&n(2,a=h.multiple),"element"in h&&n(0,u=h.element),"$$scope"in h&&n(5,l=h.$$scope)},[u,o,a,c,r,l,s,f,d]}class hL extends ie{constructor(e){super(),ne(this,e,dL,fL,te,{class:1,multiple:2,element:0},cL)}}function pL(t){ye(t,"svelte-1i49j4h",'[role=listbox].svelte-1i49j4h{display:flex;flex-direction:column;margin:var(--sui-focus-ring-width);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);min-width:var(--sui-listbox-min-width, calc(var(--sui-option-height) * 5));color:var(--sui-listbox-foreground-color);background-color:var(--sui-listbox-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height)}[role=listbox].svelte-1i49j4h [role="separator"]{margin:4px;background-color:var(--sui-control-border-color)}[role=listbox].svelte-1i49j4h.tabs{padding:0;border-width:0 1px 0 0;border-color:var(--sui-control-border-color)}[role=listbox].svelte-1i49j4h.tabs .option button{justify-content:flex-start;border-width:0 2px 0 0;border-color:transparent;padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;height:var(--sui-tab-medium-height)}[role=listbox].svelte-1i49j4h.tabs .option button .icon{display:none}[role=listbox].svelte-1i49j4h.tabs .option button[aria-selected="true"]{border-color:var(--sui-primary-accent-color-light)}[role=listbox].in-combobox.svelte-1i49j4h:focus-visible{outline-color:transparent}[role=listbox].filtered.svelte-1i49j4h [role="separator"]{display:none}.inner.svelte-1i49j4h{display:contents}')}function mL(t){let e,n,i,r,s,l,o,a,u;const c=t[12].default,f=ke(c,t,t[11],null);let d=[{role:"listbox"},{class:i="sui listbox "+t[0]},{tabindex:r=t[2]?-1:0},{hidden:s=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},{"aria-readonly":t[3]},{"aria-required":t[4]},{"aria-invalid":t[5]},{"aria-multiselectable":t[6]},t[10]],h={};for(let m=0;m<d.length;m+=1)h=Z(h,d[m]);return{c(){e=F("div"),n=F("div"),f&&f.c(),C(n,"role","none"),C(n,"class","inner svelte-1i49j4h"),n.inert=t[2],je(e,h),re(e,"filtered",t[8]),re(e,"svelte-1i49j4h",!0)},m(m,p){A(m,e,p),$(e,n),f&&f.m(n,null),o=!0,a||(u=[Ks(l=Pa.call(null,e,{searchTerms:t[7]})),Fe(e,"click",t[13]),Fe(e,"change",t[15]),Fe(e,"filter",t[14]),Fe(e,"filter",t[16])],a=!0)},p(m,[p]){f&&f.p&&(!o||p&2048)&&Ee(f,c,m,m[11],o?Se(c,m[11],p,null):Te(m[11]),null),(!o||p&4)&&(n.inert=m[2]),je(e,h=Ge(d,[{role:"listbox"},(!o||p&1&&i!==(i="sui listbox "+m[0]))&&{class:i},(!o||p&4&&r!==(r=m[2]?-1:0))&&{tabindex:r},(!o||p&2&&s!==(s=m[1]||void 0))&&{hidden:s},(!o||p&2)&&{"aria-hidden":m[1]},(!o||p&4)&&{"aria-disabled":m[2]},(!o||p&8)&&{"aria-readonly":m[3]},(!o||p&16)&&{"aria-required":m[4]},(!o||p&32)&&{"aria-invalid":m[5]},(!o||p&64)&&{"aria-multiselectable":m[6]},p&1024&&m[10]])),l&&Gs(l.update)&&p&128&&l.update.call(null,{searchTerms:m[7]}),re(e,"filtered",m[8]),re(e,"svelte-1i49j4h",!0)},i(m){o||(_(f,m),o=!0)},o(m){y(f,m),o=!1},d(m){m&&T(e),f&&f.d(m),a=!1,Gt(u)}}}function gL(t,e,n){const i=["class","hidden","disabled","readonly","required","invalid","multiple","searchTerms"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{readonly:c=!1}=e,{required:f=!1}=e,{invalid:d=!1}=e,{multiple:h=!1}=e,{searchTerms:m=""}=e,p=!1;const g=sn();function v(S){fe.call(this,t,S)}function b(S){fe.call(this,t,S)}const w=S=>{g("change",S.detail)},k=({detail:{matched:S,total:E}})=>{n(8,p=S!==E)};return t.$$set=S=>{e=Z(Z({},e),tt(S)),n(10,r=he(e,i)),"class"in S&&n(0,o=S.class),"hidden"in S&&n(1,a=S.hidden),"disabled"in S&&n(2,u=S.disabled),"readonly"in S&&n(3,c=S.readonly),"required"in S&&n(4,f=S.required),"invalid"in S&&n(5,d=S.invalid),"multiple"in S&&n(6,h=S.multiple),"searchTerms"in S&&n(7,m=S.searchTerms),"$$scope"in S&&n(11,l=S.$$scope)},[o,a,u,c,f,d,h,m,p,g,r,l,s,v,b,w,k]}class Ma extends ie{constructor(e){super(),ne(this,e,gL,mL,te,{class:0,hidden:1,disabled:2,readonly:3,required:4,invalid:5,multiple:6,searchTerms:7},pL)}}function _L(t){ye(t,"svelte-k0vuw4",".option-group.svelte-k0vuw4:not(:first-child){margin:12px 0 0}.label.svelte-k0vuw4{margin:8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}.inner.svelte-k0vuw4{display:contents}")}function bL(t){let e,n,i,r,s,l,o,a,u;const c=t[7].default,f=ke(c,t,t[6],null);let d=[{role:"group"},{id:t[4]},{class:l="sui option-group "+t[0]},{hidden:o=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},{"aria-labelledby":a=t[4]+"-label"},{"aria-roledescription":"option group"},t[5]],h={};for(let m=0;m<d.length;m+=1)h=Z(h,d[m]);return{c(){e=F("div"),n=F("div"),i=G(t[3]),r=j(),s=F("div"),f&&f.c(),C(n,"role","none"),C(n,"id",t[4]+"-label"),C(n,"class","label svelte-k0vuw4"),C(s,"role","none"),C(s,"class","inner svelte-k0vuw4"),s.inert=t[2],je(e,h),re(e,"svelte-k0vuw4",!0)},m(m,p){A(m,e,p),$(e,n),$(n,i),$(e,r),$(e,s),f&&f.m(s,null),u=!0},p(m,[p]){(!u||p&8)&&X(i,m[3]),f&&f.p&&(!u||p&64)&&Ee(f,c,m,m[6],u?Se(c,m[6],p,null):Te(m[6]),null),(!u||p&4)&&(s.inert=m[2]),je(e,h=Ge(d,[{role:"group"},{id:m[4]},(!u||p&1&&l!==(l="sui option-group "+m[0]))&&{class:l},(!u||p&2&&o!==(o=m[1]||void 0))&&{hidden:o},(!u||p&2)&&{"aria-hidden":m[1]},(!u||p&4)&&{"aria-disabled":m[2]},{"aria-labelledby":a},{"aria-roledescription":"option group"},p&32&&m[5]])),re(e,"svelte-k0vuw4",!0)},i(m){u||(_(f,m),u=!0)},o(m){y(f,m),u=!1},d(m){m&&T(e),f&&f.d(m)}}}function vL(t,e,n){const i=["class","hidden","disabled","label"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{label:c=""}=e;const f=ii("optgroup");return t.$$set=d=>{e=Z(Z({},e),tt(d)),n(5,r=he(e,i)),"class"in d&&n(0,o=d.class),"hidden"in d&&n(1,a=d.hidden),"disabled"in d&&n(2,u=d.disabled),"label"in d&&n(3,c=d.label),"$$scope"in d&&n(6,l=d.$$scope)},[o,a,u,c,f,r,l,s]}class $u extends ie{constructor(e){super(),ne(this,e,vL,bL,te,{class:0,hidden:1,disabled:2,label:3},_L)}}function yL(t){ye(t,"svelte-ob6gdr",'.option.svelte-ob6gdr{display:contents}.option.svelte-ob6gdr:focus-visible{outline-width:0 !important}.option.svelte-ob6gdr button{flex:none;display:flex;justify-content:space-between;gap:4px;margin:0 !important;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);width:100%;height:var(--sui-option-height);white-space:nowrap}.option.svelte-ob6gdr .focused,.option.svelte-ob6gdr button:hover{color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color)}.option.svelte-ob6gdr button:active{background-color:var(--sui-active-background-color)}.option.svelte-ob6gdr button[aria-selected="true"] .icon{color:var(--sui-primary-accent-color-text)}')}const wL=t=>({}),W_=t=>({}),kL=t=>({}),Y_=t=>({slot:"start-icon"}),SL=t=>({}),G_=t=>({slot:"end-icon"});function K_(t){let e;const n=t[8]["check-icon"],i=ke(n,t,t[21],W_),r=i||EL();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&2097152)&&Ee(i,n,s,s[21],e?Se(n,s[21],l,wL):Te(s[21]),W_)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function EL(t){let e,n;return e=new xe({props:{class:"check",name:"check"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TL(t){let e,n,i=t[0]&&K_(t);const r=t[8].default,s=ke(r,t,t[21],null);return{c(){i&&i.c(),e=j(),s&&s.c()},m(l,o){i&&i.m(l,o),A(l,e,o),s&&s.m(l,o),n=!0},p(l,o){l[0]?i?(i.p(l,o),o&1&&_(i,1)):(i=K_(l),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V()),s&&s.p&&(!n||o&2097152)&&Ee(s,r,l,l[21],n?Se(r,l[21],o,null):Te(l[21]),null)},i(l){n||(_(i),_(s,l),n=!0)},o(l){y(i),y(s,l),n=!1},d(l){l&&T(e),i&&i.d(l),s&&s.d(l)}}}function AL(t){let e;const n=t[8]["start-icon"],i=ke(n,t,t[21],Y_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&2097152)&&Ee(i,n,r,r[21],e?Se(n,r[21],s,kL):Te(r[21]),Y_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function CL(t){let e;const n=t[8]["end-icon"],i=ke(n,t,t[21],G_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&2097152)&&Ee(i,n,r,r[21],e?Se(n,r[21],s,SL):Te(r[21]),G_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function NL(t){let e,n,i,r,s;const l=[{role:"option"},{tabindex:"-1"},{"aria-selected":t[0]},{label:t[4]},{value:t[5]},{hidden:t[1]},{disabled:t[3]},{"data-type":typeof t[5]},{"data-label":t[4]},{"data-search-value":t[6]},t[7]];let o={$$slots:{"end-icon":[CL],"start-icon":[AL],default:[TL]},$$scope:{ctx:t}};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return n=new et({props:o}),n.$on("click",t[9]),n.$on("dblclick",t[10]),n.$on("focus",t[11]),n.$on("blur",t[12]),n.$on("dragover",t[13]),n.$on("dragleave",t[14]),n.$on("dragend",t[15]),n.$on("drop",t[16]),n.$on("select",t[17]),n.$on("change",t[18]),n.$on("change",t[19]),n.$on("toggle",t[20]),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class",i="sui option "+t[2]+" svelte-ob6gdr"),e.hidden=r=t[1]||void 0},m(a,u){A(a,e,u),N(n,e,null),s=!0},p(a,[u]){const c=u&251?Ge(l,[l[0],l[1],u&1&&{"aria-selected":a[0]},u&16&&{label:a[4]},u&32&&{value:a[5]},u&2&&{hidden:a[1]},u&8&&{disabled:a[3]},u&32&&{"data-type":typeof a[5]},u&16&&{"data-label":a[4]},u&64&&{"data-search-value":a[6]},u&128&&qt(a[7])]):{};u&2097153&&(c.$$scope={dirty:u,ctx:a}),n.$set(c),(!s||u&4&&i!==(i="sui option "+a[2]+" svelte-ob6gdr"))&&C(e,"class",i),(!s||u&2&&r!==(r=a[1]||void 0))&&(e.hidden=r)},i(a){s||(_(n.$$.fragment,a),s=!0)},o(a){y(n.$$.fragment,a),s=!1},d(a){a&&T(e),L(n)}}}function LL(t,e,n){const i=["class","selected","hidden","disabled","label","value","searchValue"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{selected:a=!1}=e,{hidden:u=void 0}=e,{disabled:c=!1}=e,{label:f}=e,{value:d=f}=e,{searchValue:h=f}=e;function m(D){fe.call(this,t,D)}function p(D){fe.call(this,t,D)}function g(D){fe.call(this,t,D)}function v(D){fe.call(this,t,D)}function b(D){fe.call(this,t,D)}function w(D){fe.call(this,t,D)}function k(D){fe.call(this,t,D)}function S(D){fe.call(this,t,D)}function E(D){fe.call(this,t,D)}function P(D){fe.call(this,t,D)}const M=D=>{n(0,a=D.detail.selected)},I=D=>{n(1,u=D.detail.hidden),n(0,a=!1)};return t.$$set=D=>{e=Z(Z({},e),tt(D)),n(7,r=he(e,i)),"class"in D&&n(2,o=D.class),"selected"in D&&n(0,a=D.selected),"hidden"in D&&n(1,u=D.hidden),"disabled"in D&&n(3,c=D.disabled),"label"in D&&n(4,f=D.label),"value"in D&&n(5,d=D.value),"searchValue"in D&&n(6,h=D.searchValue),"$$scope"in D&&n(21,l=D.$$scope)},[a,u,o,c,f,d,h,r,s,m,p,g,v,b,w,k,S,E,P,M,I,l]}class mi extends ie{constructor(e){super(),ne(this,e,LL,NL,te,{class:2,selected:0,hidden:1,disabled:3,label:4,value:5,searchValue:6},yL)}}function OL(t){ye(t,"svelte-p2ez68",'.menu.svelte-p2ez68{display:flex;flex-direction:column;margin:0;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)}.menu.svelte-p2ez68 [role="separator"]{margin:var(--sui-menu-divider-margin, 4px);background-color:var(--sui-menu-divider-color, var(--sui-control-border-color))}')}function PL(t){let e,n,i,r,s,l;const o=t[6].default,a=ke(o,t,t[5],null);let u=[{role:"menu"},{class:n="sui menu "+t[0]},{hidden:i=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},t[4]],c={};for(let f=0;f<u.length;f+=1)c=Z(c,u[f]);return{c(){e=F("div"),a&&a.c(),je(e,c),re(e,"svelte-p2ez68",!0)},m(f,d){A(f,e,d),a&&a.m(e,null),r=!0,s||(l=[Ks(Pa.call(null,e)),Fe(e,"change",t[7])],s=!0)},p(f,[d]){a&&a.p&&(!r||d&32)&&Ee(a,o,f,f[5],r?Se(o,f[5],d,null):Te(f[5]),null),je(e,c=Ge(u,[{role:"menu"},(!r||d&1&&n!==(n="sui menu "+f[0]))&&{class:n},(!r||d&2&&i!==(i=f[1]||void 0))&&{hidden:i},(!r||d&2)&&{"aria-hidden":f[1]},(!r||d&4)&&{"aria-disabled":f[2]},d&16&&f[4]])),re(e,"svelte-p2ez68",!0)},i(f){r||(_(a,f),r=!0)},o(f){y(a,f),r=!1},d(f){f&&T(e),a&&a.d(f),s=!1,Gt(l)}}}function IL(t,e,n){const i=["class","hidden","disabled"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e;const c=sn(),f=d=>{c("change",d.detail)};return t.$$set=d=>{e=Z(Z({},e),tt(d)),n(4,r=he(e,i)),"class"in d&&n(0,o=d.class),"hidden"in d&&n(1,a=d.hidden),"disabled"in d&&n(2,u=d.disabled),"$$scope"in d&&n(5,l=d.$$scope)},[o,a,u,c,r,l,s,f]}class ri extends ie{constructor(e){super(),ne(this,e,IL,PL,te,{class:0,hidden:1,disabled:2},OL)}}function DL(t){ye(t,"svelte-1vfv2b4",'.menuitem.svelte-1vfv2b4{position:relative}.menuitem.svelte-1vfv2b4 button{display:flex;gap:var(--sui-menuitem-gap, 4px);align-items:var(--sui-menuitem-align-items, center);border-radius:var(--sui-menuitem-border-radius, var(--sui-option-border-radius, 4px));margin:0 !important;padding:var(--sui-menuitem-padding, 0 16px);width:100%;min-width:var(--sui-menuitem-min-width, 160px);height:var(--sui-menuitem-height, var(--sui-option-height));color:var(--sui-menuitem-foreground-color, var(--sui-control-foreground-color, inherit));background-color:var(--sui-menuitem-background-color, transparent);font-size:var(--sui-menuitem-font-size, var(--sui-option-font-size));font-weight:var(--sui-menuitem-font-weight, var(--sui-option-font-weight))}.menuitem.svelte-1vfv2b4 button[aria-checked="true"] .icon{color:var(--sui-primary-accent-color-text)}.menuitem.svelte-1vfv2b4 button:hover{color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color)}.menuitem.svelte-1vfv2b4 button:active{background-color:var(--sui-active-background-color)}.menuitem.svelte-1vfv2b4:hover>[role="menu"]{opacity:1}.menuitem.svelte-1vfv2b4>[role="menu"]{position:absolute;inset:2px auto auto calc(100% + 4px)}.menuitem.svelte-1vfv2b4>[role="menu"]:hover{opacity:1}.content.svelte-1vfv2b4{flex:auto}.icon-outer.svelte-1vfv2b4{flex:none;width:24px;height:24px}')}const ML=t=>({}),Z_=t=>({}),RL=t=>({}),J_=t=>({}),$L=t=>({}),X_=t=>({slot:"start-icon"}),FL=t=>({}),Q_=t=>({slot:"end-icon"});function zL(t){let e;const n=t[12].default,i=ke(n,t,t[22],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&4194304)&&Ee(i,n,r,r[22],e?Se(n,r[22],s,null):Te(r[22]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function jL(t){let e;return{c(){e=G(t[4])},m(n,i){A(n,e,i)},p(n,i){i&16&&X(e,n[4])},i:H,o:H,d(n){n&&T(e)}}}function eb(t){let e,n;const i=t[12]["chevron-icon"],r=ke(i,t,t[22],J_),s=r||BL();return{c(){e=F("span"),s&&s.c(),C(e,"role","none"),C(e,"class","icon-outer svelte-1vfv2b4")},m(l,o){A(l,e,o),s&&s.m(e,null),n=!0},p(l,o){r&&r.p&&(!n||o&4194304)&&Ee(r,i,l,l[22],n?Se(i,l[22],o,RL):Te(l[22]),J_)},i(l){n||(_(s,l),n=!0)},o(l){y(s,l),n=!1},d(l){l&&T(e),s&&s.d(l)}}}function BL(t){let e,n;return e=new xe({props:{name:"chevron_right"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function UL(t){let e,n,i,r,s,l;const o=[jL,zL],a=[];function u(f,d){return f[4]?0:1}n=u(t),i=a[n]=o[n](t);let c=t[9]&&eb(t);return{c(){e=F("div"),i.c(),r=j(),c&&c.c(),s=Q(),C(e,"role","none"),C(e,"class","content svelte-1vfv2b4"),re(e,"label",!!t[4])},m(f,d){A(f,e,d),a[n].m(e,null),A(f,r,d),c&&c.m(f,d),A(f,s,d),l=!0},p(f,d){let h=n;n=u(f),n===h?a[n].p(f,d):(x(),y(a[h],1,1,()=>{a[h]=null}),V(),i=a[n],i?i.p(f,d):(i=a[n]=o[n](f),i.c()),_(i,1),i.m(e,null)),(!l||d&16)&&re(e,"label",!!f[4]),f[9]?c?(c.p(f,d),d&512&&_(c,1)):(c=eb(f),c.c(),_(c,1),c.m(s.parentNode,s)):c&&(x(),y(c,1,1,()=>{c=null}),V())},i(f){l||(_(i),_(c),l=!0)},o(f){y(i),y(c),l=!1},d(f){f&&(T(e),T(r),T(s)),a[n].d(),c&&c.d(f)}}}function tb(t){let e,n;return e=new xe({props:{name:t[5],"aria-label":t[6]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s.name=i[5]),r&64&&(s["aria-label"]=i[6]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qL(t){let e,n,i=t[5]&&tb(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[5]?i?(i.p(r,s),s&32&&_(i,1)):(i=tb(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function HL(t){let e;const n=t[12]["start-icon"],i=ke(n,t,t[22],X_),r=i||qL(t);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&4194304)&&Ee(i,n,s,s[22],e?Se(n,s[22],l,$L):Te(s[22]),X_):r&&r.p&&(!e||l&96)&&r.p(s,e?l:-1)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function xL(t){let e;const n=t[12]["end-icon"],i=ke(n,t,t[22],Q_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&4194304)&&Ee(i,n,r,r[22],e?Se(n,r[22],s,FL):Te(r[22]),Q_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function nb(t){let e,n,i;function r(l){t[21](l)}let s={anchor:t[7]?.element,position:"right-top",$$slots:{default:[WL]},$$scope:{ctx:t}};return t[8]!==void 0&&(s.open=t[8]),e=new Gc({props:s}),ae.push(()=>Re(e,"open",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&128&&(a.anchor=l[7]?.element),o&4194304&&(a.$$scope={dirty:o,ctx:l}),!n&&o&256&&(n=!0,a.open=l[8],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function VL(t){let e;const n=t[12].children,i=ke(n,t,t[22],Z_);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&4194304)&&Ee(i,n,r,r[22],e?Se(n,r[22],s,ML):Te(r[22]),Z_)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function WL(t){let e,n;return e=new ri({props:{$$slots:{default:[VL]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4194304&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function YL(t){let e,n,i,r,s,l;const o=[{role:t[1]},{hidden:t[2]},{disabled:t[3]},{"aria-haspopup":t[9]?"menu":void 0},{"aria-expanded":t[9]?t[10]:void 0},t[11]];let a={$$slots:{"end-icon":[xL],"start-icon":[HL],default:[UL]},$$scope:{ctx:t}};for(let c=0;c<o.length;c+=1)a=Z(a,o[c]);n=new et({props:a}),t[13](n),n.$on("click",t[14]),n.$on("mouseenter",t[15]),n.$on("mouseleave",t[16]),n.$on("focus",t[17]),n.$on("blur",t[18]),n.$on("select",t[19]),n.$on("change",t[20]);let u=t[9]&&nb(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),u&&u.c(),C(e,"role","none"),C(e,"class",r="sui menuitem "+t[0]+" svelte-1vfv2b4"),e.hidden=s=t[2]||void 0},m(c,f){A(c,e,f),N(n,e,null),$(e,i),u&&u.m(e,null),l=!0},p(c,[f]){const d=f&3598?Ge(o,[f&2&&{role:c[1]},f&4&&{hidden:c[2]},f&8&&{disabled:c[3]},f&512&&{"aria-haspopup":c[9]?"menu":void 0},f&1536&&{"aria-expanded":c[9]?c[10]:void 0},f&2048&&qt(c[11])]):{};f&4194928&&(d.$$scope={dirty:f,ctx:c}),n.$set(d),c[9]?u?(u.p(c,f),f&512&&_(u,1)):(u=nb(c),u.c(),_(u,1),u.m(e,null)):u&&(x(),y(u,1,1,()=>{u=null}),V()),(!l||f&1&&r!==(r="sui menuitem "+c[0]+" svelte-1vfv2b4"))&&C(e,"class",r),(!l||f&4&&s!==(s=c[2]||void 0))&&(e.hidden=s)},i(c){l||(_(n.$$.fragment,c),_(u),l=!0)},o(c){y(n.$$.fragment,c),y(u),l=!1},d(c){c&&T(e),t[13](null),L(n),u&&u.d()}}}function GL(t,e,n){let i;const r=["class","role","hidden","disabled","label","iconName","iconLabel"];let s=he(e,r),l,o=H,a=()=>(o(),o=Qn(k,W=>n(10,l=W)),k);t.$$.on_destroy.push(()=>o());let{$$slots:u={},$$scope:c}=e;const f=Aa(u);let{class:d=""}=e,{role:h="menuitem"}=e,{hidden:m=void 0}=e,{disabled:p=!1}=e,{label:g=""}=e,{iconName:v=""}=e,{iconLabel:b=""}=e,w,k=Xe(!1);a();function S(W){ae[W?"unshift":"push"](()=>{w=W,n(7,w)})}function E(W){fe.call(this,t,W)}const P=()=>{i&&ze(k,l=!0,l)},M=()=>{i&&ze(k,l=!1,l)};function I(W){fe.call(this,t,W)}function D(W){fe.call(this,t,W)}function z(W){fe.call(this,t,W)}function R(W){fe.call(this,t,W)}function U(W){k=W,a(n(8,k))}return t.$$set=W=>{e=Z(Z({},e),tt(W)),n(11,s=he(e,r)),"class"in W&&n(0,d=W.class),"role"in W&&n(1,h=W.role),"hidden"in W&&n(2,m=W.hidden),"disabled"in W&&n(3,p=W.disabled),"label"in W&&n(4,g=W.label),"iconName"in W&&n(5,v=W.iconName),"iconLabel"in W&&n(6,b=W.iconLabel),"$$scope"in W&&n(22,c=W.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&n(9,i=h==="menuitem"&&f.children)},[d,h,m,p,g,v,b,w,k,i,l,s,u,S,E,P,M,I,D,z,R,U,c]}class Pt extends ie{constructor(e){super(),ne(this,e,GL,YL,te,{class:0,role:1,hidden:2,disabled:3,label:4,iconName:5,iconLabel:6},DL)}}function KL(t){let e;const n=t[8].default,i=ke(n,t,t[13],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&8192)&&Ee(i,n,r,r[13],e?Se(n,r[13],s,null):Te(r[13]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function ZL(t){let e,n,i;var r=t[0]?xe:void 0;function s(l,o){return{props:{slot:"end-icon",name:"check"}}}return r&&(e=an(r,s())),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o&1&&r!==(r=l[0]?xe:void 0)){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s()),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function JL(t){let e,n;const i=[{role:"menuitemcheckbox"},{class:"sui menu-item-checkbox "+t[1]},{label:t[4]},{hidden:t[2]},{disabled:t[3]},{"aria-checked":t[0]},{iconName:t[5]},{iconLabel:t[6]},t[7]];let r={$$slots:{"end-icon":[ZL],default:[KL]},$$scope:{ctx:t}};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new Pt({props:r}),e.$on("click",t[9]),e.$on("select",t[10]),e.$on("change",t[11]),e.$on("change",t[12]),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,[l]){const o=l&255?Ge(i,[i[0],l&2&&{class:"sui menu-item-checkbox "+s[1]},l&16&&{label:s[4]},l&4&&{hidden:s[2]},l&8&&{disabled:s[3]},l&1&&{"aria-checked":s[0]},l&32&&{iconName:s[5]},l&64&&{iconLabel:s[6]},l&128&&qt(s[7])]):{};l&8193&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function XL(t,e,n){const i=["class","hidden","disabled","checked","label","iconName","iconLabel"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{checked:c=!1}=e,{label:f=""}=e,{iconName:d=""}=e,{iconLabel:h=""}=e;function m(b){fe.call(this,t,b)}function p(b){fe.call(this,t,b)}function g(b){fe.call(this,t,b)}const v=b=>{n(0,c=b.detail.checked)};return t.$$set=b=>{e=Z(Z({},e),tt(b)),n(7,r=he(e,i)),"class"in b&&n(1,o=b.class),"hidden"in b&&n(2,a=b.hidden),"disabled"in b&&n(3,u=b.disabled),"checked"in b&&n(0,c=b.checked),"label"in b&&n(4,f=b.label),"iconName"in b&&n(5,d=b.iconName),"iconLabel"in b&&n(6,h=b.iconLabel),"$$scope"in b&&n(13,l=b.$$scope)},[c,o,a,u,f,d,h,r,s,m,p,g,v,l]}class ec extends ie{constructor(e){super(),ne(this,e,XL,JL,te,{class:1,hidden:2,disabled:3,checked:0,label:4,iconName:5,iconLabel:6})}}function QL(t){let e;const n=t[8].default,i=ke(n,t,t[13],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&8192)&&Ee(i,n,r,r[13],e?Se(n,r[13],s,null):Te(r[13]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function eO(t){let e,n,i;var r=t[0]?xe:void 0;function s(l,o){return{props:{slot:"end-icon",name:"check"}}}return r&&(e=an(r,s())),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o&1&&r!==(r=l[0]?xe:void 0)){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s()),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function tO(t){let e,n;const i=[{role:"menuitemradio"},{class:"sui menu-item-radio "+t[1]},{label:t[4]},{hidden:t[2]},{disabled:t[3]},{"aria-checked":t[0]},{iconName:t[5]},{iconLabel:t[6]},t[7]];let r={$$slots:{"end-icon":[eO],default:[QL]},$$scope:{ctx:t}};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new Pt({props:r}),e.$on("click",t[9]),e.$on("select",t[10]),e.$on("change",t[11]),e.$on("change",t[12]),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,[l]){const o=l&255?Ge(i,[i[0],l&2&&{class:"sui menu-item-radio "+s[1]},l&16&&{label:s[4]},l&4&&{hidden:s[2]},l&8&&{disabled:s[3]},l&1&&{"aria-checked":s[0]},l&32&&{iconName:s[5]},l&64&&{iconLabel:s[6]},l&128&&qt(s[7])]):{};l&8193&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function nO(t,e,n){const i=["class","hidden","disabled","checked","label","iconName","iconLabel"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{checked:c=!1}=e,{label:f=""}=e,{iconName:d=""}=e,{iconLabel:h=""}=e;function m(b){fe.call(this,t,b)}function p(b){fe.call(this,t,b)}function g(b){fe.call(this,t,b)}const v=b=>{n(0,c=b.detail.checked)};return t.$$set=b=>{e=Z(Z({},e),tt(b)),n(7,r=he(e,i)),"class"in b&&n(1,o=b.class),"hidden"in b&&n(2,a=b.hidden),"disabled"in b&&n(3,u=b.disabled),"checked"in b&&n(0,c=b.checked),"label"in b&&n(4,f=b.label),"iconName"in b&&n(5,d=b.iconName),"iconLabel"in b&&n(6,h=b.iconLabel),"$$scope"in b&&n(13,l=b.$$scope)},[c,o,a,u,f,d,h,r,s,m,p,g,v,l]}class Ra extends ie{constructor(e){super(),ne(this,e,nO,tO,te,{class:1,hidden:2,disabled:3,checked:0,label:4,iconName:5,iconLabel:6})}}function iO(t){ye(t,"svelte-1dnrm12",".search-bar.svelte-1dnrm12.svelte-1dnrm12{display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width)}.search-bar.flex.svelte-1dnrm12.svelte-1dnrm12{width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0}.search-bar.svelte-1dnrm12 .icon{font-size:var(--sui-font-size-xx-large);opacity:0.5}.search-bar.svelte-1dnrm12>span.svelte-1dnrm12{position:absolute;inset:0 auto 0 0;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height)}.search-bar.svelte-1dnrm12>button{position:absolute;inset:0 0 auto auto;z-index:2;margin:0 !important;height:var(--sui-button-medium-height)}.search-bar.svelte-1dnrm12 .label{--sui-textbox-padding:0 36px}.search-bar.svelte-1dnrm12 .text-input{flex:auto;margin:0 !important;width:0;min-width:0 !important}.search-bar.svelte-1dnrm12 input{z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%}")}const rO=t=>({}),ib=t=>({slot:"start-icon"}),sO=t=>({}),rb=t=>({});function lO(t){let e,n;return e=new xe({props:{name:"search"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sb(t){let e,n;return e=new et({props:{iconic:!0,"aria-label":t[10]("_sui.clear"),"aria-controls":t[11],$$slots:{"start-icon":[aO]},$$scope:{ctx:t}}}),e.$on("click",t[22]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1024&&(s["aria-label"]=i[10]("_sui.clear")),r&8388608&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oO(t){let e,n;return e=new xe({props:{name:"close"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function aO(t){let e;const n=t[14]["close-button"],i=ke(n,t,t[23],ib),r=i||oO();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&8388608)&&Ee(i,n,s,s[23],e?Se(n,s[23],l,rO):Te(s[23]),ib)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function uO(t){let e,n,i,r,s,l,o,a,u,c;const f=t[14]["search-icon"],d=ke(f,t,t[23],rb),h=d||lO(),m=[{role:"searchbox"},{id:t[11]},{flex:t[2]},{hidden:t[3]},{disabled:t[4]},{readonly:t[5]},{required:t[6]},{invalid:t[7]},{inputmode:"search"},t[12]];function p(b){t[15](b)}let g={};for(let b=0;b<m.length;b+=1)g=Z(g,m[b]);t[0]!==void 0&&(g.value=t[0]),r=new Sn({props:g}),ae.push(()=>Re(r,"value",p)),t[16](r),r.$on("keydown",t[17]),r.$on("keyup",t[18]),r.$on("keypress",t[19]),r.$on("input",t[20]),r.$on("change",t[21]);let v=t[0]&&sb(t);return{c(){e=F("div"),n=F("span"),h&&h.c(),i=j(),O(r.$$.fragment),l=j(),v&&v.c(),C(n,"role","none"),C(n,"class","svelte-1dnrm12"),C(e,"role",o=t[3]?void 0:"none"),C(e,"class",a="sui search-bar "+t[1]+" svelte-1dnrm12"),e.hidden=u=t[3]||void 0,C(e,"aria-hidden",t[3]),re(e,"flex",t[2]),re(e,"disabled",t[4]),re(e,"readonly",t[5])},m(b,w){A(b,e,w),$(e,n),h&&h.m(n,null),$(e,i),N(r,e,null),$(e,l),v&&v.m(e,null),c=!0},p(b,[w]){d&&d.p&&(!c||w&8388608)&&Ee(d,f,b,b[23],c?Se(f,b[23],w,sO):Te(b[23]),rb);const k=w&6396?Ge(m,[m[0],w&2048&&{id:b[11]},w&4&&{flex:b[2]},w&8&&{hidden:b[3]},w&16&&{disabled:b[4]},w&32&&{readonly:b[5]},w&64&&{required:b[6]},w&128&&{invalid:b[7]},m[8],w&4096&&qt(b[12])]):{};!s&&w&1&&(s=!0,k.value=b[0],$e(()=>s=!1)),r.$set(k),b[0]?v?(v.p(b,w),w&1&&_(v,1)):(v=sb(b),v.c(),_(v,1),v.m(e,null)):v&&(x(),y(v,1,1,()=>{v=null}),V()),(!c||w&8&&o!==(o=b[3]?void 0:"none"))&&C(e,"role",o),(!c||w&2&&a!==(a="sui search-bar "+b[1]+" svelte-1dnrm12"))&&C(e,"class",a),(!c||w&8&&u!==(u=b[3]||void 0))&&(e.hidden=u),(!c||w&8)&&C(e,"aria-hidden",b[3]),(!c||w&6)&&re(e,"flex",b[2]),(!c||w&18)&&re(e,"disabled",b[4]),(!c||w&34)&&re(e,"readonly",b[5])},i(b){c||(_(h,b),_(r.$$.fragment,b),_(v),c=!0)},o(b){y(h,b),y(r.$$.fragment,b),y(v),c=!1},d(b){b&&T(e),h&&h.d(b),t[16](null),L(r),v&&v.d()}}}function cO(t,e,n){let i;const r=["class","flex","hidden","disabled","readonly","required","invalid","value","focus"];let s=he(e,r),l;B(t,ue,R=>n(10,l=R));let{$$slots:o={},$$scope:a}=e,{class:u=""}=e,{flex:c=!1}=e,{hidden:f=void 0}=e,{disabled:d=!1}=e,{readonly:h=!1}=e,{required:m=!1}=e,{invalid:p=!1}=e,{value:g=void 0}=e;const v=ii("searchbox");let b;const w=()=>{i?.focus()};function k(R){g=R,n(0,g)}function S(R){ae[R?"unshift":"push"](()=>{b=R,n(8,b)})}function E(R){fe.call(this,t,R)}function P(R){fe.call(this,t,R)}function M(R){fe.call(this,t,R)}function I(R){fe.call(this,t,R)}function D(R){fe.call(this,t,R)}const z=()=>{n(0,g=""),i?.focus(),globalThis.requestIdleCallback(()=>{i?.dispatchEvent(new KeyboardEvent("input")),i?.dispatchEvent(new KeyboardEvent("keypress")),i?.dispatchEvent(new KeyboardEvent("change"))})};return t.$$set=R=>{e=Z(Z({},e),tt(R)),n(12,s=he(e,r)),"class"in R&&n(1,u=R.class),"flex"in R&&n(2,c=R.flex),"hidden"in R&&n(3,f=R.hidden),"disabled"in R&&n(4,d=R.disabled),"readonly"in R&&n(5,h=R.readonly),"required"in R&&n(6,m=R.required),"invalid"in R&&n(7,p=R.invalid),"value"in R&&n(0,g=R.value),"$$scope"in R&&n(23,a=R.$$scope)},t.$$.update=()=>{t.$$.dirty&256&&n(9,i=b?.element)},[g,u,c,f,d,h,m,p,b,i,l,v,s,w,o,k,S,E,P,M,I,D,z,a]}class Ap extends ie{constructor(e){super(),ne(this,e,cO,uO,te,{class:1,flex:2,hidden:3,disabled:4,readonly:5,required:6,invalid:7,value:0,focus:13},iO)}get class(){return this.$$.ctx[1]}set class(e){this.$$set({class:e}),Je()}get flex(){return this.$$.ctx[2]}set flex(e){this.$$set({flex:e}),Je()}get hidden(){return this.$$.ctx[3]}set hidden(e){this.$$set({hidden:e}),Je()}get disabled(){return this.$$.ctx[4]}set disabled(e){this.$$set({disabled:e}),Je()}get readonly(){return this.$$.ctx[5]}set readonly(e){this.$$set({readonly:e}),Je()}get required(){return this.$$.ctx[6]}set required(e){this.$$set({required:e}),Je()}get invalid(){return this.$$.ctx[7]}set invalid(e){this.$$set({invalid:e}),Je()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),Je()}get focus(){return this.$$.ctx[13]}}function fO(t){ye(t,"svelte-17h7wm4",'.combobox.svelte-17h7wm4.svelte-17h7wm4{margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5))}.combobox.svelte-17h7wm4 .icon{font-size:var(--sui-font-size-xx-large);opacity:0.5}.combobox.svelte-17h7wm4>.icon{position:absolute;inset:8px auto auto 8px;z-index:1}.combobox.svelte-17h7wm4>button{position:absolute;inset:0 0 auto auto;z-index:1;margin:0 !important;border-top-left-radius:0;border-bottom-left-radius:0}.combobox.svelte-17h7wm4:not(.editable)>button{background-color:transparent !important}.combobox.svelte-17h7wm4>button[tabindex="-1"]{pointer-events:none}.combobox.svelte-17h7wm4 div[role=combobox].svelte-17h7wm4{display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding:0 var(--sui-textbox-height) 0 calc(var(--sui-textbox-height) / 4);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms}.combobox.svelte-17h7wm4 div[role=combobox].svelte-17h7wm4:not(.selected){font-style:italic}.combobox.svelte-17h7wm4 div[role=combobox].svelte-17h7wm4:hover,.combobox.svelte-17h7wm4 div[role=combobox].svelte-17h7wm4:focus{background-color:var(--sui-hover-background-color)}.combobox.svelte-17h7wm4 div[role=combobox] .label.svelte-17h7wm4{display:block;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.combobox.svelte-17h7wm4 .text-input{margin:0 !important;width:100% !important}.combobox.svelte-17h7wm4 input{padding:0 32px 0 8px;width:0}.combobox.svelte-17h7wm4+[role="listbox"]{position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);transition:opacity 100ms 100ms}.combobox.svelte-17h7wm4+[role="listbox"]:not(.open){opacity:0;pointer-events:none}.combobox-inner.svelte-17h7wm4.svelte-17h7wm4{display:flex;flex-direction:column;overflow:hidden}.combobox-inner.svelte-17h7wm4 .sui.search-bar{flex:none}.combobox-inner.svelte-17h7wm4 .sui.listbox{flex:auto;overflow-y:auto}.combobox-inner.svelte-17h7wm4 .no-options.svelte-17h7wm4{flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color)}')}const dO=t=>({}),lb=t=>({slot:"start-icon"});function hO(t){let e,n;const i=[{role:"combobox"},{id:t[19]},{value:t[0]},{hidden:t[2]},{disabled:t[3]},{readonly:t[4]},{required:t[5]},{invalid:t[6]},{"aria-controls":t[19]+"-popup"},{"aria-expanded":t[17]},{"aria-haspopup":"listbox"},{"aria-activedescendant":"selected-option"},t[21]];let r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new Sn({props:r}),t[24](e),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,l){const o=l[0]&2752637?Ge(i,[i[0],l[0]&524288&&{id:s[19]},l[0]&1&&{value:s[0]},l[0]&4&&{hidden:s[2]},l[0]&8&&{disabled:s[3]},l[0]&16&&{readonly:s[4]},l[0]&32&&{required:s[5]},l[0]&64&&{invalid:s[6]},l[0]&524288&&{"aria-controls":s[19]+"-popup"},l[0]&131072&&{"aria-expanded":s[17]},i[10],i[11],l[0]&2097152&&qt(s[21])]):{};e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){t[24](null),L(e,s)}}}function pO(t){let e,n,i=(t[0]!==void 0?t[13]:t[18]("_sui.combobox.select_an_option"))+"",r,s,l,o=[{role:"combobox"},{id:t[19]},{tabindex:s=t[3]?-1:0},{"aria-controls":l=t[19]+"-popup"},{"aria-expanded":t[17]},{"aria-hidden":t[2]},{"aria-disabled":t[3]},{"aria-readonly":t[4]},{"aria-haspopup":"listbox"},{"aria-activedescendant":"selected-option"},t[21]],a={};for(let u=0;u<o.length;u+=1)a=Z(a,o[u]);return{c(){e=F("div"),n=F("div"),r=G(i),C(n,"role","none"),C(n,"class","label svelte-17h7wm4"),je(e,a),re(e,"selected",t[0]!==void 0),re(e,"svelte-17h7wm4",!0)},m(u,c){A(u,e,c),$(e,n),$(n,r),t[23](e)},p(u,c){c[0]&270337&&i!==(i=(u[0]!==void 0?u[13]:u[18]("_sui.combobox.select_an_option"))+"")&&X(r,i),je(e,a=Ge(o,[{role:"combobox"},{id:u[19]},c[0]&8&&s!==(s=u[3]?-1:0)&&{tabindex:s},{"aria-controls":l},c[0]&131072&&{"aria-expanded":u[17]},c[0]&4&&{"aria-hidden":u[2]},c[0]&8&&{"aria-disabled":u[3]},c[0]&16&&{"aria-readonly":u[4]},{"aria-haspopup":"listbox"},{"aria-activedescendant":"selected-option"},c[0]&2097152&&u[21]])),re(e,"selected",u[0]!==void 0),re(e,"svelte-17h7wm4",!0)},i:H,o:H,d(u){u&&T(e),t[23](null)}}}function mO(t){let e,n;return e=new xe({props:{name:"expand_more"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gO(t){let e;const n=t[22]["chevron-icon"],i=ke(n,t,t[33],lb),r=i||mO();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l[1]&4)&&Ee(i,n,s,s[33],e?Se(n,s[33],l,dO):Te(s[33]),lb)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function ob(t){let e,n,i;function r(l){t[26](l)}let s={flex:!0,"aria-label":t[18]("_sui.combobox.filter_options"),"aria-controls":t[19]+"-listbox"};return t[15]!==void 0&&(s.value=t[15]),e=new Ap({props:s}),ae.push(()=>Re(e,"value",r)),e.$on("keydown",t[27]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o[0]&262144&&(a["aria-label"]=l[18]("_sui.combobox.filter_options")),!n&&o[0]&32768&&(n=!0,a.value=l[15],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function _O(t){let e;const n=t[22].default,i=ke(n,t,t[33],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s[1]&4)&&Ee(i,n,r,r[33],e?Se(n,r[33],s,null):Te(r[33]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function ab(t){let e,n=t[18]("_sui.combobox.no_matching_options")+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert"),C(e,"class","no-options svelte-17h7wm4")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&262144&&n!==(n=r[18]("_sui.combobox.no_matching_options")+"")&&X(i,n)},d(r){r&&T(e)}}}function bO(t){let e,n,i,r,s,l=t[14]&&ob(t);i=new Ma({props:{id:t[19]+"-listbox",class:"in-combobox",searchTerms:t[15],$$slots:{default:[_O]},$$scope:{ctx:t}}}),i.$on("click",t[28]),i.$on("filter",t[29]);let o=!t[16]&&ab(t);return{c(){e=F("div"),l&&l.c(),n=j(),O(i.$$.fragment),r=j(),o&&o.c(),C(e,"role","none"),C(e,"class","combobox-inner svelte-17h7wm4")},m(a,u){A(a,e,u),l&&l.m(e,null),$(e,n),N(i,e,null),$(e,r),o&&o.m(e,null),s=!0},p(a,u){a[14]?l?(l.p(a,u),u[0]&16384&&_(l,1)):(l=ob(a),l.c(),_(l,1),l.m(e,n)):l&&(x(),y(l,1,1,()=>{l=null}),V());const c={};u[0]&32768&&(c.searchTerms=a[15]),u[1]&4&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[16]?o&&(o.d(1),o=null):o?o.p(a,u):(o=ab(a),o.c(),o.m(e,null))},i(a){s||(_(l),_(i.$$.fragment,a),s=!0)},o(a){y(l),y(i.$$.fragment,a),s=!1},d(a){a&&T(e),l&&l.d(),L(i),o&&o.d()}}}function vO(t){let e,n,i,r,s,l,o,a,u,c,f;const d=[pO,hO],h=[];function m(w,k){return w[7]?1:0}n=m(t),i=h[n]=d[n](t),s=new et({props:{variant:"ghost",iconic:!0,hidden:t[2],disabled:t[3],tabindex:t[4]||t[3]?-1:0,"aria-label":t[17]?t[18]("_sui.collapse"):t[18]("_sui.expand"),"aria-controls":t[19]+"-popup","aria-expanded":t[17],$$slots:{"start-icon":[gO]},$$scope:{ctx:t}}}),s.$on("click",t[25]);let p=[{role:"none"},{class:l="sui combobox "+t[1]},{hidden:o=t[2]||void 0},t[21]],g={};for(let w=0;w<p.length;w+=1)g=Z(g,p[w]);function v(w){t[30](w)}let b={id:t[19]+"-popup",class:"combobox",anchor:t[10]??t[11]?.element,position:t[8],touchOptimized:!0,$$slots:{default:[bO]},$$scope:{ctx:t}};return t[12]!==void 0&&(b.open=t[12]),u=new Gc({props:b}),ae.push(()=>Re(u,"open",v)),t[31](u),u.$on("open",t[32]),{c(){e=F("div"),i.c(),r=j(),O(s.$$.fragment),a=j(),O(u.$$.fragment),je(e,g),re(e,"editable",t[7]),re(e,"svelte-17h7wm4",!0)},m(w,k){A(w,e,k),h[n].m(e,null),$(e,r),N(s,e,null),A(w,a,k),N(u,w,k),f=!0},p(w,k){let S=n;n=m(w),n===S?h[n].p(w,k):(x(),y(h[S],1,1,()=>{h[S]=null}),V(),i=h[n],i?i.p(w,k):(i=h[n]=d[n](w),i.c()),_(i,1),i.m(e,r));const E={};k[0]&4&&(E.hidden=w[2]),k[0]&8&&(E.disabled=w[3]),k[0]&24&&(E.tabindex=w[4]||w[3]?-1:0),k[0]&393216&&(E["aria-label"]=w[17]?w[18]("_sui.collapse"):w[18]("_sui.expand")),k[0]&131072&&(E["aria-expanded"]=w[17]),k[1]&4&&(E.$$scope={dirty:k,ctx:w}),s.$set(E),je(e,g=Ge(p,[{role:"none"},(!f||k[0]&2&&l!==(l="sui combobox "+w[1]))&&{class:l},(!f||k[0]&4&&o!==(o=w[2]||void 0))&&{hidden:o},k[0]&2097152&&w[21]])),re(e,"editable",w[7]),re(e,"svelte-17h7wm4",!0);const P={};k[0]&3072&&(P.anchor=w[10]??w[11]?.element),k[0]&256&&(P.position=w[8]),k[0]&377344|k[1]&4&&(P.$$scope={dirty:k,ctx:w}),!c&&k[0]&4096&&(c=!0,P.open=w[12],$e(()=>c=!1)),u.$set(P)},i(w){f||(_(i),_(s.$$.fragment,w),_(u.$$.fragment,w),f=!0)},o(w){y(i),y(s.$$.fragment,w),y(u.$$.fragment,w),f=!1},d(w){w&&(T(e),T(a)),h[n].d(),L(s),t[31](null),L(u,w)}}}const ub='[role="option"][aria-selected="true"]';function yO(t,e,n){const i=["class","hidden","disabled","readonly","required","invalid","value","editable","position"];let r=he(e,i),s,l=H,o=()=>(l(),l=Qn(I,de=>n(17,s=de)),I),a;B(t,ue,de=>n(18,a=de)),t.$$.on_destroy.push(()=>l());let{$$slots:u={},$$scope:c}=e,{class:f=""}=e,{hidden:d=void 0}=e,{disabled:h=!1}=e,{readonly:m=!1}=e,{required:p=!1}=e,{invalid:g=!1}=e,{value:v=void 0}=e,{editable:b=!0}=e,{position:w="bottom-left"}=e;const k=sn(),S=ii("combobox");let E,P,M,I=Xe(!1);o();let D="",z=!1,R="",U=!0;const W=()=>{const de=M?.content?.querySelector(ub),ge=M?.content?.querySelector(`[role="option"][value="${v}"]`);ge&&(n(13,D=ge.dataset.label||ge.textContent||ge.value),de!==ge&&(de?.setAttribute("aria-selected","false"),ge.setAttribute("aria-selected","true")))},ee=de=>{n(0,v=de.dataset.type==="number"?Number(de.value):de.value),W(),k("change",{target:P?.element,value:v})};function K(de){ae[de?"unshift":"push"](()=>{E=de,n(10,E)})}function ve(de){ae[de?"unshift":"push"](()=>{P=de,n(11,P)})}const me=de=>{de.preventDefault(),de.stopPropagation(),!h&&!m&&ze(I,s=!s,s)};function se(de){R=de,n(15,R)}const q=de=>{["ArrowUp","ArrowDown","Enter"].includes(de.key)&&(de.preventDefault(),M?.content?.querySelector(".sui.listbox")?.dispatchEvent(new KeyboardEvent("keydown",de)))},J=de=>{de.target.matches('[role="option"]')&&ee(de.target)},Le=de=>{n(16,U=!!de.detail.matched)};function _e(de){I=de,o(n(12,I))}function Be(de){ae[de?"unshift":"push"](()=>{M=de,n(9,M)})}const Ke=()=>{n(14,z=(M?.content?.querySelectorAll('[role="option"]')?.length??0)>5),n(15,R="")};return t.$$set=de=>{e=Z(Z({},e),tt(de)),n(21,r=he(e,i)),"class"in de&&n(1,f=de.class),"hidden"in de&&n(2,d=de.hidden),"disabled"in de&&n(3,h=de.disabled),"readonly"in de&&n(4,m=de.readonly),"required"in de&&n(5,p=de.required),"invalid"in de&&n(6,g=de.invalid),"value"in de&&n(0,v=de.value),"editable"in de&&n(7,b=de.editable),"position"in de&&n(8,w=de.position),"$$scope"in de&&n(33,c=de.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&512&&M?.content&&globalThis.requestAnimationFrame(()=>{const de=M?.content?.querySelector(ub);de&&ee(de)}),t.$$.dirty[0]&1&&W()},[v,f,d,h,m,p,g,b,w,M,E,P,I,D,z,R,U,s,a,S,ee,r,u,K,ve,me,se,q,J,Le,_e,Be,Ke,c]}class wO extends ie{constructor(e){super(),ne(this,e,yO,vO,te,{class:1,hidden:2,disabled:3,readonly:4,required:5,invalid:6,value:0,editable:7,position:8},fO,[-1,-1])}}function kO(t){let e;const n=t[8].default,i=ke(n,t,t[11],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&2048)&&Ee(i,n,r,r[11],e?Se(n,r[11],s,null):Te(r[11]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function SO(t){let e,n,i;const r=[{class:"sui select "+t[1]},{hidden:t[2]},{disabled:t[3]},{readonly:t[4]},{required:t[5]},{invalid:t[6]},t[7],{editable:!1}];function s(o){t[9](o)}let l={$$slots:{default:[kO]},$$scope:{ctx:t}};for(let o=0;o<r.length;o+=1)l=Z(l,r[o]);return t[0]!==void 0&&(l.value=t[0]),e=new wO({props:l}),ae.push(()=>Re(e,"value",s)),e.$on("change",t[10]),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,[a]){const u=a&254?Ge(r,[a&2&&{class:"sui select "+o[1]},a&4&&{hidden:o[2]},a&8&&{disabled:o[3]},a&16&&{readonly:o[4]},a&32&&{required:o[5]},a&64&&{invalid:o[6]},a&128&&qt(o[7]),r[7]]):{};a&2048&&(u.$$scope={dirty:a,ctx:o}),!n&&a&1&&(n=!0,u.value=o[0],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function EO(t,e,n){const i=["class","hidden","disabled","readonly","required","invalid","value"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{readonly:c=!1}=e,{required:f=!1}=e,{invalid:d=!1}=e,{value:h=void 0}=e;function m(g){h=g,n(0,h)}function p(g){fe.call(this,t,g)}return t.$$set=g=>{e=Z(Z({},e),tt(g)),n(7,r=he(e,i)),"class"in g&&n(1,o=g.class),"hidden"in g&&n(2,a=g.hidden),"disabled"in g&&n(3,u=g.disabled),"readonly"in g&&n(4,c=g.readonly),"required"in g&&n(5,f=g.required),"invalid"in g&&n(6,d=g.invalid),"value"in g&&n(0,h=g.value),"$$scope"in g&&n(11,l=g.$$scope)},[h,o,a,u,c,f,d,r,s,m,p,l]}class Cp extends ie{constructor(e){super(),ne(this,e,EO,SO,te,{class:1,hidden:2,disabled:3,readonly:4,required:5,invalid:6,value:0})}}const{document:TO}=vp;function AO(t){ye(t,"svelte-4xmxju",".slider.svelte-4xmxju.svelte-4xmxju{position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:var(--sui-checkbox-height) calc(var(--sui-checkbox-height) / 2);touch-action:none}.slider.svelte-4xmxju:hover .base-bar.svelte-4xmxju{background-color:var(--sui-hover-background-color)}.slider.svelte-4xmxju:active .base-bar.svelte-4xmxju{background-color:var(--sui-active-background-color)}.base.svelte-4xmxju.svelte-4xmxju{position:relative;width:var(--sui-slider-base-width, calc(var(--sui-checkbox-height) * 10));height:calc(var(--sui-checkbox-height) / 2);cursor:pointer}.base-bar.svelte-4xmxju.svelte-4xmxju{border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-button-background-color);transition:all 200ms;width:100%;height:100%}.slider-bar.svelte-4xmxju.svelte-4xmxju{position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light)}[role=slider].svelte-4xmxju.svelte-4xmxju{position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1))}.label.svelte-4xmxju.svelte-4xmxju{position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);transform:translateX(-50%);font-size:var(--sui-font-size-x-small)}")}function cb(t,e,n){const i=t.slice();return i[40]=e[n],i[42]=n,i}function fb(t){let e,n,i,r,s=`${t[14][1]}px`,l,o;return{c(){e=F("div"),C(e,"role","slider"),C(e,"tabindex",n=t[4]?-1:0),C(e,"aria-label",i=t[10]?.[1]||""),C(e,"aria-hidden",t[3]),C(e,"aria-disabled",t[4]),C(e,"aria-readonly",t[5]),C(e,"aria-invalid",t[6]),C(e,"aria-valuemin",t[7]),C(e,"aria-valuemax",t[8]),C(e,"aria-valuenow",r=t[1]?.[1]),C(e,"class","svelte-4xmxju"),jt(e,"left",s)},m(a,u){A(a,e,u),l||(o=[Fe(e,"pointerdown",t[24]),Fe(e,"keydown",t[25])],l=!0)},p(a,u){u[0]&16&&n!==(n=a[4]?-1:0)&&C(e,"tabindex",n),u[0]&1024&&i!==(i=a[10]?.[1]||"")&&C(e,"aria-label",i),u[0]&8&&C(e,"aria-hidden",a[3]),u[0]&16&&C(e,"aria-disabled",a[4]),u[0]&32&&C(e,"aria-readonly",a[5]),u[0]&64&&C(e,"aria-invalid",a[6]),u[0]&128&&C(e,"aria-valuemin",a[7]),u[0]&256&&C(e,"aria-valuemax",a[8]),u[0]&2&&r!==(r=a[1]?.[1])&&C(e,"aria-valuenow",r),u[0]&16384&&s!==(s=`${a[14][1]}px`)&&jt(e,"left",s)},d(a){a&&T(e),l=!1,Gt(o)}}}function db(t){let e,n=be(t[11]),i=[];for(let r=0;r<n.length;r+=1)i[r]=hb(cb(t,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();e=Q()},m(r,s){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(r,s);A(r,e,s)},p(r,s){if(s[0]&10240){n=be(r[11]);let l;for(l=0;l<n.length;l+=1){const o=cb(r,n,l);i[l]?i[l].p(o,s):(i[l]=hb(o),i[l].c(),i[l].m(e.parentNode,e))}for(;l<i.length;l+=1)i[l].d(1);i.length=n.length}},d(r){r&&T(e),ni(i,r)}}}function hb(t){let e,n=t[40]+"",i,r,s=`${t[13]/(t[11].length-1)*t[42]}px`;return{c(){e=F("span"),i=G(n),r=j(),C(e,"role","none"),C(e,"class","label svelte-4xmxju"),jt(e,"left",s)},m(l,o){A(l,e,o),$(e,i),$(e,r)},p(l,o){o[0]&2048&&n!==(n=l[40]+"")&&X(i,n),o[0]&10240&&s!==(s=`${l[13]/(l[11].length-1)*l[42]}px`)&&jt(e,"left",s)},d(l){l&&T(e)}}}function CO(t){let e,n,i,r,s,l,o=`${t[16]?t[14][0]:0}px`,a=`${t[16]?t[14][1]-t[14][0]:t[14][0]}px`,u,c,f,d,h,m=`${t[14][0]}px`,p,g,v,b,w,k,S=t[16]&&fb(t),E=t[11].length&&db(t),P=[{role:"none"},{class:v="sui slider "+t[2]},{hidden:b=t[3]||void 0},t[19]],M={};for(let I=0;I<P.length;I+=1)M=Z(M,P[I]);return{c(){e=j(),n=F("div"),i=F("div"),r=F("div"),s=j(),l=F("div"),u=j(),c=F("div"),p=j(),S&&S.c(),g=j(),E&&E.c(),C(r,"role","none"),C(r,"class","base-bar svelte-4xmxju"),C(l,"class","slider-bar svelte-4xmxju"),jt(l,"left",o),jt(l,"width",a),C(c,"role","slider"),C(c,"tabindex",f=t[4]?-1:0),C(c,"aria-label",d=t[16]?t[10]?.[0]||"":t[9]),C(c,"aria-hidden",t[3]),C(c,"aria-disabled",t[4]),C(c,"aria-readonly",t[5]),C(c,"aria-invalid",t[6]),C(c,"aria-valuemin",t[7]),C(c,"aria-valuemax",t[8]),C(c,"aria-valuenow",h=t[16]?t[1]?.[0]:t[0]),C(c,"class","svelte-4xmxju"),jt(c,"left",m),C(i,"role","none"),C(i,"class","base svelte-4xmxju"),je(n,M),re(n,"disabled",t[4]),re(n,"readonly",t[5]),re(n,"svelte-4xmxju",!0)},m(I,D){A(I,e,D),A(I,n,D),$(n,i),$(i,r),$(i,s),$(i,l),$(i,u),$(i,c),$(i,p),S&&S.m(i,null),$(i,g),E&&E.m(i,null),t[26](i),w||(k=[Fe(TO.body,"click",t[21]),Fe(c,"pointerdown",t[22]),Fe(c,"keydown",t[23]),Fe(i,"pointerdown",t[27])],w=!0)},p(I,D){D[0]&81920&&o!==(o=`${I[16]?I[14][0]:0}px`)&&jt(l,"left",o),D[0]&81920&&a!==(a=`${I[16]?I[14][1]-I[14][0]:I[14][0]}px`)&&jt(l,"width",a),D[0]&16&&f!==(f=I[4]?-1:0)&&C(c,"tabindex",f),D[0]&67072&&d!==(d=I[16]?I[10]?.[0]||"":I[9])&&C(c,"aria-label",d),D[0]&8&&C(c,"aria-hidden",I[3]),D[0]&16&&C(c,"aria-disabled",I[4]),D[0]&32&&C(c,"aria-readonly",I[5]),D[0]&64&&C(c,"aria-invalid",I[6]),D[0]&128&&C(c,"aria-valuemin",I[7]),D[0]&256&&C(c,"aria-valuemax",I[8]),D[0]&65539&&h!==(h=I[16]?I[1]?.[0]:I[0])&&C(c,"aria-valuenow",h),D[0]&16384&&m!==(m=`${I[14][0]}px`)&&jt(c,"left",m),I[16]?S?S.p(I,D):(S=fb(I),S.c(),S.m(i,g)):S&&(S.d(1),S=null),I[11].length?E?E.p(I,D):(E=db(I),E.c(),E.m(i,null)):E&&(E.d(1),E=null),je(n,M=Ge(P,[{role:"none"},D[0]&4&&v!==(v="sui slider "+I[2])&&{class:v},D[0]&8&&b!==(b=I[3]||void 0)&&{hidden:b},D[0]&524288&&I[19]])),re(n,"disabled",I[4]),re(n,"readonly",I[5]),re(n,"svelte-4xmxju",!0)},i:H,o:H,d(I){I&&(T(e),T(n)),S&&S.d(),E&&E.d(),t[26](null),w=!1,Gt(k)}}}function NO(t,e,n){let i;const r=["class","hidden","disabled","readonly","invalid","min","max","value","sliderLabel","values","sliderLabels","step","optionLabels"];let s=he(e,r),{class:l=""}=e,{hidden:o=void 0}=e,{disabled:a=!1}=e,{readonly:u=!1}=e,{invalid:c=!1}=e,{min:f=0}=e,{max:d=100}=e,{value:h=0}=e,{sliderLabel:m=""}=e,{values:p=void 0}=e,{sliderLabels:g=void 0}=e,{step:v=1}=e,{optionLabels:b=[]}=e;const w=sn();let k,S=0,E=[],P=[],M=0,I=0;const D=[0,0];let z=!1,R=0,U=0;const W=pe=>{pe<0?pe=0:pe>S&&(pe=S);const We=E.findLastIndex(Ne=>Ne<=pe),ot=E.findIndex(Ne=>pe<=Ne),oe=Math.abs(E[We]-pe)<Math.abs(E[ot]-pe)?We:ot;D[U]===E[oe]||i&&(U===0&&D[1]<=E[oe]||U===1&&D[0]>=E[oe])||(i?n(1,p[U]=P[oe],p):n(0,h=P[oe]))},ee=(pe,We=0)=>{const{key:ot,ctrlKey:oe,metaKey:Ne,shiftKey:Qe,altKey:rt}=pe;if(a||u||(Qe||rt||oe||Ne))return;const Jt=i?p[We]:h;let Ot=-1;if(["ArrowDown","ArrowLeft"].includes(ot)&&(Jt>f&&(Ot=P.indexOf(Jt)-1),pe.preventDefault(),pe.stopPropagation()),["ArrowUp","ArrowRight"].includes(ot)&&(Jt<d&&(Ot=P.indexOf(Jt)+1),pe.preventDefault(),pe.stopPropagation()),Ot>-1){if(i&&(We===0&&D[1]<=E[Ot]||We===1&&D[0]>=E[Ot]))return;i?n(1,p[We]=P[Ot],p):n(0,h=P[Ot])}},K=pe=>{const{screenX:We,pointerId:ot}=pe;a||u||!z||ot!==R||(pe.stopPropagation(),W(M+(We-I)))},ve=pe=>{const{pointerId:We}=pe;a||u||!z||We!==R||(pe.stopPropagation(),pe.target.matches(".base-bar, .slider-bar")&&W(pe.layerX),n(15,z=!1),M=0,I=0,R=0,U=0,document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ve),document.removeEventListener("pointercancel",ve))},me=(pe,We=0)=>{const{clientX:ot,screenX:oe,pointerId:Ne}=pe;a||u||(pe.stopPropagation(),n(15,z=!0),M=ot-k.getBoundingClientRect().x,I=oe,R=Ne,U=We,document.addEventListener("pointermove",K),document.addEventListener("pointerup",ve),document.addEventListener("pointercancel",ve))},se=()=>{if(i){const[pe,We]=p;n(14,D[0]=E[P.indexOf(pe)],D),n(14,D[1]=E[P.indexOf(We)],D),w("change",{values:p})}else n(14,D[0]=E[P.indexOf(h)],D),w("change",{value:h})},q=()=>{if(!k)return;n(13,S=k.clientWidth);const pe=(d-f)/v+1,We=S/(pe-1);P=new Array(pe).fill(0).map((ot,oe)=>oe*v+f,10),E=new Array(pe).fill(0).map((ot,oe)=>oe*We),se()};Ut(()=>{const pe=new ResizeObserver(()=>q()),We=globalThis.matchMedia("(pointer: coarse)");return pe.observe(k),We.addEventListener("change",q),q(),()=>{pe.disconnect(),We.removeEventListener("change",q)}});const J=()=>{n(15,z=!1)},Le=pe=>me(pe,0),_e=pe=>ee(pe,0),Be=pe=>me(pe,1),Ke=pe=>ee(pe,1);function de(pe){ae[pe?"unshift":"push"](()=>{k=pe,n(12,k)})}const ge=pe=>me(pe);return t.$$set=pe=>{e=Z(Z({},e),tt(pe)),n(19,s=he(e,r)),"class"in pe&&n(2,l=pe.class),"hidden"in pe&&n(3,o=pe.hidden),"disabled"in pe&&n(4,a=pe.disabled),"readonly"in pe&&n(5,u=pe.readonly),"invalid"in pe&&n(6,c=pe.invalid),"min"in pe&&n(7,f=pe.min),"max"in pe&&n(8,d=pe.max),"value"in pe&&n(0,h=pe.value),"sliderLabel"in pe&&n(9,m=pe.sliderLabel),"values"in pe&&n(1,p=pe.values),"sliderLabels"in pe&&n(10,g=pe.sliderLabels),"step"in pe&&n(20,v=pe.step),"optionLabels"in pe&&n(11,b=pe.optionLabels)},t.$$.update=()=>{t.$$.dirty[0]&2&&n(16,i=Array.isArray(p)),t.$$.dirty[0]&3&&se()},[h,p,l,o,a,u,c,f,d,m,g,b,k,S,D,z,i,ee,me,s,v,J,Le,_e,Be,Ke,de,ge]}class LO extends ie{constructor(e){super(),ne(this,e,NO,CO,te,{class:2,hidden:3,disabled:4,readonly:5,invalid:6,min:7,max:8,value:0,sliderLabel:9,values:1,sliderLabels:10,step:20,optionLabels:11},AO,[-1,-1])}}function OO(t){ye(t,"svelte-1kz7h27",'button.svelte-1kz7h27.svelte-1kz7h27{display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none}button:hover[aria-checked=false].svelte-1kz7h27 span.svelte-1kz7h27{background-color:var(--sui-hover-background-color)}button:hover[aria-checked=true].svelte-1kz7h27 span.svelte-1kz7h27{background-color:var(--sui-primary-accent-color-light)}button:active[aria-checked=false].svelte-1kz7h27 span.svelte-1kz7h27{background-color:var(--sui-active-background-color)}button:active[aria-checked=true].svelte-1kz7h27 span.svelte-1kz7h27{background-color:var(--sui-primary-accent-color-dark)}button.svelte-1kz7h27.svelte-1kz7h27:focus-visible{outline:0}button.svelte-1kz7h27:focus-visible span.svelte-1kz7h27::before{outline-offset:1px;outline-width:2px;outline-style:solid;outline-color:var(--sui-primary-accent-color-light)}button[aria-checked=true].svelte-1kz7h27 span.svelte-1kz7h27{background-color:var(--sui-primary-accent-color);border-color:transparent}button[aria-checked=true].svelte-1kz7h27 span.svelte-1kz7h27::before{transform:translateX(calc(var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height)));border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted)}span.svelte-1kz7h27.svelte-1kz7h27{position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms}span.svelte-1kz7h27.svelte-1kz7h27::before{display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:""}')}function PO(t){let e;const n=t[11].default,i=ke(n,t,t[10],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1024)&&Ee(i,n,r,r[10],e?Se(n,r[10],s,null):Te(r[10]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function IO(t){let e;return{c(){e=G(t[7])},m(n,i){A(n,e,i)},p(n,i){i&128&&X(e,n[7])},i:H,o:H,d(n){n&&T(e)}}}function DO(t){let e,n,i,r,s,l,o,a,u,c,f;const d=[IO,PO],h=[];function m(v,b){return v[7]?0:1}r=m(t),s=h[r]=d[r](t);let p=[{role:"switch"},{class:l="sui switch "+t[1]},{type:"button"},{hidden:o=t[2]||void 0},{disabled:a=t[3]||void 0},{"aria-checked":t[0]},{"aria-hidden":t[2]},{"aria-disabled":t[3]},{"aria-readonly":t[4]},{"aria-required":t[5]},{"aria-invalid":t[6]},t[9]],g={};for(let v=0;v<p.length;v+=1)g=Z(g,p[v]);return{c(){e=F("button"),n=F("span"),i=j(),s.c(),C(n,"role","none"),C(n,"class","svelte-1kz7h27"),je(e,g),re(e,"svelte-1kz7h27",!0)},m(v,b){A(v,e,b),$(e,n),$(e,i),h[r].m(e,null),e.autofocus&&e.focus(),u=!0,c||(f=Fe(e,"click",t[12]),c=!0)},p(v,[b]){let w=r;r=m(v),r===w?h[r].p(v,b):(x(),y(h[w],1,1,()=>{h[w]=null}),V(),s=h[r],s?s.p(v,b):(s=h[r]=d[r](v),s.c()),_(s,1),s.m(e,null)),je(e,g=Ge(p,[{role:"switch"},(!u||b&2&&l!==(l="sui switch "+v[1]))&&{class:l},{type:"button"},(!u||b&4&&o!==(o=v[2]||void 0))&&{hidden:o},(!u||b&8&&a!==(a=v[3]||void 0))&&{disabled:a},(!u||b&1)&&{"aria-checked":v[0]},(!u||b&4)&&{"aria-hidden":v[2]},(!u||b&8)&&{"aria-disabled":v[3]},(!u||b&16)&&{"aria-readonly":v[4]},(!u||b&32)&&{"aria-required":v[5]},(!u||b&64)&&{"aria-invalid":v[6]},b&512&&v[9]])),re(e,"svelte-1kz7h27",!0)},i(v){u||(_(s),u=!0)},o(v){y(s),u=!1},d(v){v&&T(e),h[r].d(),c=!1,f()}}}function MO(t,e,n){const i=["class","hidden","disabled","readonly","required","invalid","checked","label"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{readonly:c=!1}=e,{required:f=!1}=e,{invalid:d=!1}=e,{checked:h=!1}=e,{label:m=void 0}=e;const p=sn(),g=()=>{!u&&!c&&(n(0,h=!h),p("change",{checked:h}))};return t.$$set=v=>{e=Z(Z({},e),tt(v)),n(9,r=he(e,i)),"class"in v&&n(1,o=v.class),"hidden"in v&&n(2,a=v.hidden),"disabled"in v&&n(3,u=v.disabled),"readonly"in v&&n(4,c=v.readonly),"required"in v&&n(5,f=v.required),"invalid"in v&&n(6,d=v.invalid),"checked"in v&&n(0,h=v.checked),"label"in v&&n(7,m=v.label),"$$scope"in v&&n(10,l=v.$$scope)},[h,o,a,u,c,f,d,m,p,r,l,s,g]}class Zc extends ie{constructor(e){super(),ne(this,e,MO,DO,te,{class:1,hidden:2,disabled:3,readonly:4,required:5,invalid:6,checked:0,label:7},OO)}}function RO(t){ye(t,"svelte-k4lchu",".table-cell.svelte-k4lchu{display:table-cell}")}function $O(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"cell"},{class:n="sui table-cell "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-k4lchu",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"cell"},(!i||u&1&&n!==(n="sui table-cell "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-k4lchu",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function FO(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class pb extends ie{constructor(e){super(),ne(this,e,FO,$O,te,{class:0},RO)}}function zO(t){ye(t,"svelte-19j4fl9",".table-row.svelte-19j4fl9{display:table-row;height:var(--sui-primary-row-height)}")}function jO(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"row"},{class:n="sui table-row "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-19j4fl9",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"row"},(!i||u&1&&n!==(n="sui table-row "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-19j4fl9",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function BO(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class UO extends ie{constructor(e){super(),ne(this,e,BO,jO,te,{class:0},zO)}}function qO(t){ye(t,"svelte-1fva1yw",".table.svelte-1fva1yw{display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2)}.table.svelte-1fva1yw.data{border-collapse:collapse}.table.svelte-1fva1yw.data .table-col-header,.table.svelte-1fva1yw.data .table-row-header,.table.svelte-1fva1yw.data .table-cell{border:1px solid var(--sui-secondary-border-color);padding:8px 8px}")}function HO(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"table"},{class:n="sui table "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-1fva1yw",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"table"},(!i||u&1&&n!==(n="sui table "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-1fva1yw",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function xO(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class VO extends ie{constructor(e){super(),ne(this,e,xO,HO,te,{class:0},qO)}}function WO(t){ye(t,"svelte-fe1w8u",".tab-list.svelte-fe1w8u.svelte-fe1w8u{flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent)}.tab-list[aria-orientation=horizontal].svelte-fe1w8u.svelte-fe1w8u{gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin:var(--sui-horizontal-tab-list-margin, var(--sui-tab-list-margin, 0 0 32px));border-width:var(--sui-horizontal-tab-list-border-width, var(--sui-tab-list-border-width, 0 0 1px));padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px))}.tab-list[aria-orientation=horizontal].svelte-fe1w8u button{width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center)}.tab-list[aria-orientation=horizontal].svelte-fe1w8u .indicator.svelte-fe1w8u{border-width:var(--sui-horizontal-tab-list-indicator-border-width, var(--sui-tab-list-indicator-border-width, 0 0 2px 0))}.tab-list[aria-orientation=vertical].svelte-fe1w8u.svelte-fe1w8u{gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin:var(--sui-vertical-tab-list-margin, var(--sui-tab-list-margin, 0 32px 0 0));border-width:var(--sui-vertical-tab-list-border-width, var(--sui-tab-list-border-width, 0 1px 0 0));padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, 240px)}.tab-list[aria-orientation=vertical].svelte-fe1w8u button{justify-content:var(--sui-vertical-tab-justify-content, flex-start);width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto))}.tab-list[aria-orientation=vertical].svelte-fe1w8u .indicator.svelte-fe1w8u{border-width:var(--sui-horizontal-tab-list-vertical-border-width, var(--sui-tab-list-indicator-border-width, 0 2px 0 0))}.tab-list.svelte-fe1w8u button{position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, inherit))}.inner.svelte-fe1w8u.svelte-fe1w8u{display:contents}.indicator.svelte-fe1w8u.svelte-fe1w8u{position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms)}")}function YO(t){let e,n,i,r,s,l,o,a,u,c;const f=t[11].default,d=ke(f,t,t[10],null);let h=[{role:"tablist"},{class:s="sui tab-list "+t[0]},{hidden:l=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},{"aria-orientation":t[3]},{"data-name":o=t[4]||void 0},t[9]],m={};for(let p=0;p<h.length;p+=1)m=Z(m,h[p]);return{c(){e=F("div"),n=F("div"),d&&d.c(),i=j(),r=F("div"),C(n,"role","none"),C(n,"class","inner svelte-fe1w8u"),n.inert=t[2],C(r,"role","none"),C(r,"class","indicator svelte-fe1w8u"),C(r,"style",t[6]),je(e,m),re(e,"svelte-fe1w8u",!0)},m(p,g){A(p,e,g),$(e,n),d&&d.m(n,null),$(e,i),$(e,r),t[12](e),a=!0,u||(c=[Ks(Pa.call(null,e)),Fe(e,"initialized",t[13]),Fe(e,"change",t[14])],u=!0)},p(p,[g]){d&&d.p&&(!a||g&1024)&&Ee(d,f,p,p[10],a?Se(f,p[10],g,null):Te(p[10]),null),(!a||g&4)&&(n.inert=p[2]),(!a||g&64)&&C(r,"style",p[6]),je(e,m=Ge(h,[{role:"tablist"},(!a||g&1&&s!==(s="sui tab-list "+p[0]))&&{class:s},(!a||g&2&&l!==(l=p[1]||void 0))&&{hidden:l},(!a||g&2)&&{"aria-hidden":p[1]},(!a||g&4)&&{"aria-disabled":p[2]},(!a||g&8)&&{"aria-orientation":p[3]},(!a||g&16&&o!==(o=p[4]||void 0))&&{"data-name":o},g&512&&p[9]])),re(e,"svelte-fe1w8u",!0)},i(p){a||(_(d,p),a=!0)},o(p){y(d,p),a=!1},d(p){p&&T(e),d&&d.d(p),t[12](null),u=!1,Gt(c)}}}function GO(t,e,n){const i=["class","hidden","disabled","orientation","name"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{orientation:c="horizontal"}=e,{name:f=void 0}=e;const d=sn();let h,m;const p=()=>{globalThis.requestAnimationFrame(()=>{const w=h?.querySelector('[role="tab"][aria-selected="true"]');if(w){const{offsetTop:k,offsetLeft:S,offsetWidth:E,offsetHeight:P}=w;n(6,m=Object.entries({top:k,left:S,width:E,height:P}).map(([M,I])=>`${M}: ${I}px`).join("; "))}else n(6,m=void 0)})};Ut(()=>{const w=new ResizeObserver(()=>{p()});return w.observe(h),()=>{w.disconnect()}});function g(w){ae[w?"unshift":"push"](()=>{h=w,n(5,h)})}const v=()=>{p()},b=w=>{d("change",w.detail),p()};return t.$$set=w=>{e=Z(Z({},e),tt(w)),n(9,r=he(e,i)),"class"in w&&n(0,o=w.class),"hidden"in w&&n(1,a=w.hidden),"disabled"in w&&n(2,u=w.disabled),"orientation"in w&&n(3,c=w.orientation),"name"in w&&n(4,f=w.name),"$$scope"in w&&n(10,l=w.$$scope)},[o,a,u,c,f,h,m,d,p,r,l,s,g,v,b]}class KO extends ie{constructor(e){super(),ne(this,e,GO,YO,te,{class:0,hidden:1,disabled:2,orientation:3,name:4},WO)}}function ZO(t){ye(t,"svelte-1ah6bwn",".tab-panel.svelte-1ah6bwn{flex:auto;transition:all 200ms}.tab-panel[aria-hidden=true].svelte-1ah6bwn,.tab-panel.svelte-1ah6bwn:not([aria-hidden]){display:none}")}function JO(t){let e,n,i;const r=t[3].default,s=ke(r,t,t[2],null);let l=[{role:"tabpanel"},{class:n="sui tab-panel "+t[0]},t[1]],o={};for(let a=0;a<l.length;a+=1)o=Z(o,l[a]);return{c(){e=F("div"),s&&s.c(),je(e,o),re(e,"svelte-1ah6bwn",!0)},m(a,u){A(a,e,u),s&&s.m(e,null),i=!0},p(a,[u]){s&&s.p&&(!i||u&4)&&Ee(s,r,a,a[2],i?Se(r,a[2],u,null):Te(a[2]),null),je(e,o=Ge(l,[{role:"tabpanel"},(!i||u&1&&n!==(n="sui tab-panel "+a[0]))&&{class:n},u&2&&a[1]])),re(e,"svelte-1ah6bwn",!0)},i(a){i||(_(s,a),i=!0)},o(a){y(s,a),i=!1},d(a){a&&T(e),s&&s.d(a)}}}function XO(t,e,n){const i=["class"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e;return t.$$set=a=>{e=Z(Z({},e),tt(a)),n(1,r=he(e,i)),"class"in a&&n(0,o=a.class),"$$scope"in a&&n(2,l=a.$$scope)},[o,r,l,s]}class Jc extends ie{constructor(e){super(),ne(this,e,XO,JO,te,{class:0},ZO)}}const QO=t=>({}),mb=t=>({slot:"start-icon"}),e5=t=>({}),gb=t=>({slot:"end-icon"});function t5(t){let e;const n=t[5].default,i=ke(n,t,t[10],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1024)&&Ee(i,n,r,r[10],e?Se(n,r[10],s,null):Te(r[10]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function n5(t){let e;const n=t[5]["start-icon"],i=ke(n,t,t[10],mb);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1024)&&Ee(i,n,r,r[10],e?Se(n,r[10],s,QO):Te(r[10]),mb)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function i5(t){let e;const n=t[5]["end-icon"],i=ke(n,t,t[10],gb);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&1024)&&Ee(i,n,r,r[10],e?Se(n,r[10],s,e5):Te(r[10]),gb)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function r5(t){let e,n;const i=[{role:"tab"},{class:"sui tab "+t[0]},{hidden:t[2]},{disabled:t[3]},{"aria-selected":t[1]},t[4]];let r={$$slots:{"end-icon":[i5],"start-icon":[n5],default:[t5]},$$scope:{ctx:t}};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new et({props:r}),e.$on("focus",t[6]),e.$on("blur",t[7]),e.$on("select",t[8]),e.$on("change",t[9]),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,[l]){const o=l&31?Ge(i,[i[0],l&1&&{class:"sui tab "+s[0]},l&4&&{hidden:s[2]},l&8&&{disabled:s[3]},l&2&&{"aria-selected":s[1]},l&16&&qt(s[4])]):{};l&1024&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function s5(t,e,n){const i=["class","selected","hidden","disabled"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{selected:a=!1}=e,{hidden:u=void 0}=e,{disabled:c=!1}=e;function f(p){fe.call(this,t,p)}function d(p){fe.call(this,t,p)}function h(p){fe.call(this,t,p)}function m(p){fe.call(this,t,p)}return t.$$set=p=>{e=Z(Z({},e),tt(p)),n(4,r=he(e,i)),"class"in p&&n(0,o=p.class),"selected"in p&&n(1,a=p.selected),"hidden"in p&&n(2,u=p.hidden),"disabled"in p&&n(3,c=p.disabled),"$$scope"in p&&n(10,l=p.$$scope)},[o,a,u,c,r,s,f,d,h,m,l]}class l5 extends ie{constructor(e){super(),ne(this,e,s5,r5,te,{class:0,selected:1,hidden:2,disabled:3})}}const ci={bold:{labelKey:"bold",icon:"format_bold",inline:!0},italic:{labelKey:"italic",icon:"format_italic",inline:!0},code:{labelKey:"code",icon:"code",inline:!0},link:{labelKey:"link",icon:"link",inline:!0},paragraph:{labelKey:"paragraph",icon:"format_paragraph",inline:!1},"heading-1":{labelKey:"heading_1",icon:"format_h1",inline:!1},"heading-2":{labelKey:"heading_2",icon:"format_h2",inline:!1},"heading-3":{labelKey:"heading_3",icon:"format_h3",inline:!1},"heading-4":{labelKey:"heading_4",icon:"format_h4",inline:!1},"heading-5":{labelKey:"heading_5",icon:"format_h5",inline:!1},"heading-6":{labelKey:"heading_6",icon:"format_h6",inline:!1},"bulleted-list":{labelKey:"bulleted_list",icon:"format_list_bulleted",inline:!1},"numbered-list":{labelKey:"numbered_list",icon:"format_list_numbered",inline:!1},blockquote:{labelKey:"blockquote",icon:"format_quote",inline:!1}},R2=["bold","italic","code"],$2=[...R2,"link"],Np=["paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","bulleted-list","numbered-list","blockquote"];var o5={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
6
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
7
|
+
*
|
|
8
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
9
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
10
|
+
* @namespace
|
|
11
|
+
* @public
|
|
12
|
+
*/var n=function(i){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,l={},o={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function b(w){return w instanceof a?new a(w.type,b(w.content),w.alias):Array.isArray(w)?w.map(b):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(b){return Object.prototype.toString.call(b).slice(8,-1)},objId:function(b){return b.__id||Object.defineProperty(b,"__id",{value:++s}),b.__id},clone:function b(w,k){k=k||{};var S,E;switch(o.util.type(w)){case"Object":if(E=o.util.objId(w),k[E])return k[E];S={},k[E]=S;for(var P in w)w.hasOwnProperty(P)&&(S[P]=b(w[P],k));return S;case"Array":return E=o.util.objId(w),k[E]?k[E]:(S=[],k[E]=S,w.forEach(function(M,I){S[I]=b(M,k)}),S);default:return w}},getLanguage:function(b){for(;b;){var w=r.exec(b.className);if(w)return w[1].toLowerCase();b=b.parentElement}return"none"},setLanguage:function(b,w){b.className=b.className.replace(RegExp(r,"gi"),""),b.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(S){var b=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(b){var w=document.getElementsByTagName("script");for(var k in w)if(w[k].src==b)return w[k]}return null}},isActive:function(b,w,k){for(var S="no-"+w;b;){var E=b.classList;if(E.contains(w))return!0;if(E.contains(S))return!1;b=b.parentElement}return!!k}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(b,w){var k=o.util.clone(o.languages[b]);for(var S in w)k[S]=w[S];return k},insertBefore:function(b,w,k,S){S=S||o.languages;var E=S[b],P={};for(var M in E)if(E.hasOwnProperty(M)){if(M==w)for(var I in k)k.hasOwnProperty(I)&&(P[I]=k[I]);k.hasOwnProperty(M)||(P[M]=E[M])}var D=S[b];return S[b]=P,o.languages.DFS(o.languages,function(z,R){R===D&&z!=b&&(this[z]=P)}),P},DFS:function b(w,k,S,E){E=E||{};var P=o.util.objId;for(var M in w)if(w.hasOwnProperty(M)){k.call(w,M,w[M],S||M);var I=w[M],D=o.util.type(I);D==="Object"&&!E[P(I)]?(E[P(I)]=!0,b(I,k,null,E)):D==="Array"&&!E[P(I)]&&(E[P(I)]=!0,b(I,k,M,E))}}},plugins:{},highlightAll:function(b,w){o.highlightAllUnder(document,b,w)},highlightAllUnder:function(b,w,k){var S={callback:k,container:b,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),o.hooks.run("before-all-elements-highlight",S);for(var E=0,P;P=S.elements[E++];)o.highlightElement(P,w===!0,S.callback)},highlightElement:function(b,w,k){var S=o.util.getLanguage(b),E=o.languages[S];o.util.setLanguage(b,S);var P=b.parentElement;P&&P.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(P,S);var M=b.textContent,I={element:b,language:S,grammar:E,code:M};function D(R){I.highlightedCode=R,o.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,o.hooks.run("after-highlight",I),o.hooks.run("complete",I),k&&k.call(I.element)}if(o.hooks.run("before-sanity-check",I),P=I.element.parentElement,P&&P.nodeName.toLowerCase()==="pre"&&!P.hasAttribute("tabindex")&&P.setAttribute("tabindex","0"),!I.code){o.hooks.run("complete",I),k&&k.call(I.element);return}if(o.hooks.run("before-highlight",I),!I.grammar){D(o.util.encode(I.code));return}if(w&&i.Worker){var z=new Worker(o.filename);z.onmessage=function(R){D(R.data)},z.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else D(o.highlight(I.code,I.grammar,I.language))},highlight:function(b,w,k){var S={code:b,grammar:w,language:k};if(o.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=o.tokenize(S.code,S.grammar),o.hooks.run("after-tokenize",S),a.stringify(o.util.encode(S.tokens),S.language)},tokenize:function(b,w){var k=w.rest;if(k){for(var S in k)w[S]=k[S];delete w.rest}var E=new f;return d(E,E.head,b),c(b,E,w,E.head,0),m(E)},hooks:{all:{},add:function(b,w){var k=o.hooks.all;k[b]=k[b]||[],k[b].push(w)},run:function(b,w){var k=o.hooks.all[b];if(!(!k||!k.length))for(var S=0,E;E=k[S++];)E(w)}},Token:a};i.Prism=o;function a(b,w,k,S){this.type=b,this.content=w,this.alias=k,this.length=(S||"").length|0}a.stringify=function b(w,k){if(typeof w=="string")return w;if(Array.isArray(w)){var S="";return w.forEach(function(D){S+=b(D,k)}),S}var E={type:w.type,content:b(w.content,k),tag:"span",classes:["token",w.type],attributes:{},language:k},P=w.alias;P&&(Array.isArray(P)?Array.prototype.push.apply(E.classes,P):E.classes.push(P)),o.hooks.run("wrap",E);var M="";for(var I in E.attributes)M+=" "+I+'="'+(E.attributes[I]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+M+">"+E.content+"</"+E.tag+">"};function u(b,w,k,S){b.lastIndex=w;var E=b.exec(k);if(E&&S&&E[1]){var P=E[1].length;E.index+=P,E[0]=E[0].slice(P)}return E}function c(b,w,k,S,E,P){for(var M in k)if(!(!k.hasOwnProperty(M)||!k[M])){var I=k[M];I=Array.isArray(I)?I:[I];for(var D=0;D<I.length;++D){if(P&&P.cause==M+","+D)return;var z=I[D],R=z.inside,U=!!z.lookbehind,W=!!z.greedy,ee=z.alias;if(W&&!z.pattern.global){var K=z.pattern.toString().match(/[imsuy]*$/)[0];z.pattern=RegExp(z.pattern.source,K+"g")}for(var ve=z.pattern||z,me=S.next,se=E;me!==w.tail&&!(P&&se>=P.reach);se+=me.value.length,me=me.next){var q=me.value;if(w.length>b.length)return;if(!(q instanceof a)){var J=1,Le;if(W){if(Le=u(ve,se,b,U),!Le||Le.index>=b.length)break;var de=Le.index,_e=Le.index+Le[0].length,Be=se;for(Be+=me.value.length;de>=Be;)me=me.next,Be+=me.value.length;if(Be-=me.value.length,se=Be,me.value instanceof a)continue;for(var Ke=me;Ke!==w.tail&&(Be<_e||typeof Ke.value=="string");Ke=Ke.next)J++,Be+=Ke.value.length;J--,q=b.slice(se,Be),Le.index-=se}else if(Le=u(ve,0,q,U),!Le)continue;var de=Le.index,ge=Le[0],pe=q.slice(0,de),We=q.slice(de+ge.length),ot=se+q.length;P&&ot>P.reach&&(P.reach=ot);var oe=me.prev;pe&&(oe=d(w,oe,pe),se+=pe.length),h(w,oe,J);var Ne=new a(M,R?o.tokenize(ge,R):ge,ee,ge);if(me=d(w,oe,Ne),We&&d(w,me,We),J>1){var Qe={cause:M+","+D,reach:ot};c(b,w,k,me.prev,se,Qe),P&&Qe.reach>P.reach&&(P.reach=Qe.reach)}}}}}}function f(){var b={value:null,prev:null,next:null},w={value:null,prev:b,next:null};b.next=w,this.head=b,this.tail=w,this.length=0}function d(b,w,k){var S=w.next,E={value:k,prev:w,next:S};return w.next=E,S.prev=E,b.length++,E}function h(b,w,k){for(var S=w.next,E=0;E<k&&S!==b.tail;E++)S=S.next;w.next=S,S.prev=w,b.length-=E}function m(b){for(var w=[],k=b.head.next;k!==b.tail;)w.push(k.value),k=k.next;return w}if(!i.document)return i.addEventListener&&(o.disableWorkerMessageHandler||i.addEventListener("message",function(b){var w=JSON.parse(b.data),k=w.language,S=w.code,E=w.immediateClose;i.postMessage(o.highlight(S,o.languages[k],k)),E&&i.close()},!1)),o;var p=o.util.currentScript();p&&(o.filename=p.src,p.hasAttribute("data-manual")&&(o.manual=!0));function g(){o.manual||o.highlightAll()}if(!o.manual){var v=document.readyState;v==="loading"||v==="interactive"&&p&&p.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return o}(e);t.exports&&(t.exports=n),typeof ah<"u"&&(ah.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,s){var l={};l["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[s]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};o["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var a={};a[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:o},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(i,r){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:n.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(i){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var s=i.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",r=function(p,g){return"✖ Error "+p+" while fetching file: "+g},s="✖ Error: File does not exist or is empty",l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",a="loading",u="loaded",c="failed",f="pre[data-src]:not(["+o+'="'+u+'"]):not(['+o+'="'+a+'"])';function d(p,g,v){var b=new XMLHttpRequest;b.open("GET",p,!0),b.onreadystatechange=function(){b.readyState==4&&(b.status<400&&b.responseText?g(b.responseText):b.status>=400?v(r(b.status,b.statusText)):v(s))},b.send(null)}function h(p){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(p||"");if(g){var v=Number(g[1]),b=g[2],w=g[3];return b?w?[v,Number(w)]:[v,void 0]:[v,v]}}n.hooks.add("before-highlightall",function(p){p.selector+=", "+f}),n.hooks.add("before-sanity-check",function(p){var g=p.element;if(g.matches(f)){p.code="",g.setAttribute(o,a);var v=g.appendChild(document.createElement("CODE"));v.textContent=i;var b=g.getAttribute("data-src"),w=p.language;if(w==="none"){var k=(/\.(\w+)$/.exec(b)||[,"none"])[1];w=l[k]||k}n.util.setLanguage(v,w),n.util.setLanguage(g,w);var S=n.plugins.autoloader;S&&S.loadLanguages(w),d(b,function(E){g.setAttribute(o,u);var P=h(g.getAttribute("data-range"));if(P){var M=E.split(/\r\n?|\n/g),I=P[0],D=P[1]==null?M.length:P[1];I<0&&(I+=M.length),I=Math.max(0,Math.min(I-1,M.length)),D<0&&(D+=M.length),D=Math.max(0,Math.min(D,M.length)),E=M.slice(I,D).join(`
|
|
13
|
+
`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(I+1))}v.textContent=E,n.highlightElement(v)},function(E){g.setAttribute(o,c),v.textContent=E})}}),n.plugins.fileHighlight={highlight:function(g){for(var v=(g||document).querySelectorAll(f),b=0,w;w=v[b++];)n.highlightElement(w)}};var m=!1;n.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(o5);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var i={};i["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};r["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+s+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+s+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(f){c!==f&&(t.languages.markdown[c].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function f(d){if(!(!d||typeof d=="string"))for(var h=0,m=d.length;h<m;h++){var p=d[h];if(p.type!=="code"){f(p.content);continue}var g=p.content[1],v=p.content[3];if(g&&v&&g.type==="code-language"&&v.type==="code-block"&&typeof g.content=="string"){var b=g.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");b=(/[a-z][\w-]*/i.exec(b)||[""])[0].toLowerCase();var w="language-"+b;v.alias?typeof v.alias=="string"?v.alias=[v.alias,w]:v.alias.push(w):v.alias=[w]}}}f(c.tokens)}),t.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var f="",d=0,h=c.classes.length;d<h;d++){var m=c.classes[d],p=/language-(.+)/.exec(m);if(p){f=p[1];break}}var g=t.languages[f];if(g)c.content=t.highlight(u(c.content),g,f);else if(f&&f!=="none"&&t.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,t.plugins.autoloader.loadLanguages(f,function(){var b=document.getElementById(v);b&&(b.innerHTML=t.highlight(b.textContent,t.languages[f],f))})}}});var l=RegExp(t.languages.markup.tag.pattern.source,"gi"),o={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var f=c.replace(l,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(d,h){if(h=h.toLowerCase(),h[0]==="#"){var m;return h[1]==="x"?m=parseInt(h.slice(2),16):m=Number(h.slice(1)),a(m)}else{var p=o[h];return p||d}}),f}t.languages.md=t.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=Prism.languages.swift});(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[i,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:i.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:i.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:i.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:i.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(Prism);function Xc(t){return{}}const Lp={},a5={},F2={},Is={},Ml={},tc={},Rl={},Op={},vh={},oa={},aa={},Er={},Pp={},Ip={},z2={},j2={},u5={},B2={},c5={},U2={},q2={},nc={},f5={},H2={},x2={},V2={},d5={},h5={},p5={},_b={},W2={},m5={},Y2={},G2={},g5={},Qc={},Dp={},yh={},_5={},b5={},mu={},gu={},v5={},y5={},w5={};var He=function(t){const e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const Ji=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,k5=Ji&&"documentMode"in document?document.documentMode:null,Fi=Ji&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ts=Ji&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ic=!(!Ji||!("InputEvent"in window)||k5)&&"getTargetRanges"in new window.InputEvent("input"),Mp=Ji&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ef=Ji&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,S5=Ji&&/Android/.test(navigator.userAgent),K2=Ji&&/^(?=.*Chrome).*/i.test(navigator.userAgent),E5=Ji&&S5&&K2,Rp=Ji&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!K2,$a=1,ps=3,js=0,Z2=1,Kl=2,T5=0,A5=1,C5=2,rc=4,sc=8,N5=240|(3|rc|sc),$p=1,Fp=2,zp=3,jp=4,Bp=5,Up=6,tf=Mp||ef||Rp?" ":"",Rr=`
|
|
14
|
+
|
|
15
|
+
`,L5=ts?" ":tf,J2="֑-߿יִ-﷽ﹰ-ﻼ",X2="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",O5=new RegExp("^[^"+X2+"]*["+J2+"]"),P5=new RegExp("^[^"+J2+"]*["+X2+"]"),Nr={bold:1,code:16,highlight:128,italic:2,strikethrough:rc,subscript:32,superscript:64,underline:sc},I5={directionless:1,unmergeable:2},bb={center:Fp,end:Up,justify:jp,left:$p,right:zp,start:Bp},D5={[Fp]:"center",[Up]:"end",[jp]:"justify",[$p]:"left",[zp]:"right",[Bp]:"start"},M5={normal:0,segmented:2,token:1},R5={[T5]:"normal",[C5]:"segmented",[A5]:"token"};function lc(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}const $5=100;let wh=!1,qp=0;function F5(t){qp=t.timeStamp}function yd(t,e,n){return e.__lexicalLineBreak===t||t[`__lexicalKey_${n._key}`]!==void 0}function z5(t,e,n){const i=ar(n._window);let r=null,s=null;i!==null&&i.anchorNode===t&&(r=i.anchorOffset,s=i.focusOffset);const l=t.nodeValue;l!==null&&Wp(e,l,r,s,!1)}function j5(t,e,n){if(Ie(t)){const i=t.anchor.getNode();if(i.is(n)&&t.format!==i.getFormat())return!1}return e.nodeType===ps&&n.isAttached()}function Q2(t,e,n){wh=!0;const i=performance.now()-qp>$5;try{ai(t,()=>{const r=Ye()||function(d){return d.getEditorState().read(()=>{const h=Ye();return h!==null?h.clone():null})}(t),s=new Map,l=t.getRootElement(),o=t._editorState,a=t._blockCursorElement;let u=!1,c="";for(let d=0;d<e.length;d++){const h=e[d],m=h.type,p=h.target;let g=$r(p,o);if(!(g===null&&p!==l||It(g))){if(m==="characterData")i&&Ce(g)&&j5(r,p,g)&&z5(p,g,t);else if(m==="childList"){u=!0;const v=h.addedNodes;for(let k=0;k<v.length;k++){const S=v[k],E=r4(S),P=S.parentNode;if(P!=null&&S!==a&&E===null&&(S.nodeName!=="BR"||!yd(S,P,t))){if(ts){const M=S.innerText||S.nodeValue;M&&(c+=M)}P.removeChild(S)}}const b=h.removedNodes,w=b.length;if(w>0){let k=0;for(let S=0;S<w;S++){const E=b[S];(E.nodeName==="BR"&&yd(E,p,t)||a===E)&&(p.appendChild(E),k++)}w!==k&&(p===l&&(g=l4(o)),s.set(p,g))}}}}if(s.size>0)for(const[d,h]of s)if(ce(h)){const m=h.getChildrenKeys();let p=d.firstChild;for(let g=0;g<m.length;g++){const v=m[g],b=t.getElementByKey(v);b!==null&&(p==null?(d.appendChild(b),p=b):p!==b&&d.replaceChild(b,p),p=p.nextSibling)}}else Ce(h)&&h.markDirty();const f=n.takeRecords();if(f.length>0){for(let d=0;d<f.length;d++){const h=f[d],m=h.addedNodes,p=h.target;for(let g=0;g<m.length;g++){const v=m[g],b=v.parentNode;b==null||v.nodeName!=="BR"||yd(v,p,t)||b.removeChild(v)}}n.takeRecords()}r!==null&&(u&&(r.dirty=!0,or(r)),ts&&c4(t)&&r.insertRawText(c))})}finally{wh=!1}}function e4(t){const e=t._observer;e!==null&&Q2(t,e.takeRecords(),e)}function t4(t){(function(e){qp===0&&sf(e).addEventListener("textInput",F5,!0)})(t),t._observer=new MutationObserver((e,n)=>{Q2(t,e,n)})}function vb(t,e){const n=t.__mode,i=t.__format,r=t.__style,s=e.__mode,l=e.__format,o=e.__style;return!(n!==null&&n!==s||i!==null&&i!==l||r!==null&&r!==o)}function yb(t,e){const n=t.mergeWithSibling(e),i=nn()._normalizedNodes;return i.add(t.__key),i.add(e.__key),n}function wb(t){let e,n,i=t;if(i.__text!==""||!i.isSimpleText()||i.isUnmergeable()){for(;(e=i.getPreviousSibling())!==null&&Ce(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(vb(e,i)){i=yb(e,i);break}break}e.remove()}for(;(n=i.getNextSibling())!==null&&Ce(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(vb(i,n)){i=yb(i,n);break}break}n.remove()}}else i.remove()}function n4(t){return kb(t.anchor),kb(t.focus),t}function kb(t){for(;t.type==="element";){const e=t.getNode(),n=t.offset;let i,r;if(n===e.getChildrenSize()?(i=e.getChildAtIndex(n-1),r=!0):(i=e.getChildAtIndex(n),r=!1),Ce(i)){t.set(i.__key,r?i.getTextContentSize():0,"text");break}if(!ce(i))break;t.set(i.__key,r?i.getChildrenSize():0,"element")}}let B5=1;const U5=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function Hp(t){const e=document.activeElement;if(e===null)return!1;const n=e.nodeName;return It($r(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&e.__lexicalEditor==null)}function Fa(t,e,n){const i=t.getRootElement();try{return i!==null&&i.contains(e)&&i.contains(n)&&e!==null&&!Hp(e)&&i4(e)===t}catch{return!1}}function i4(t){let e=t;for(;e!=null;){const n=e.__lexicalEditor;if(n!=null)return n;e=rf(e)}return null}function kh(t){return t.isToken()||t.isSegmented()}function q5(t){return t.nodeType===ps}function oc(t){let e=t;for(;e!=null;){if(q5(e))return e;e=e.firstChild}return null}function Sh(t,e,n){const i=Nr[e];if(n!==null&&(t&i)==(n&i))return t;let r=t^i;return e==="subscript"?r&=~Nr.superscript:e==="superscript"&&(r&=~Nr.subscript),r}function H5(t){return Ce(t)||Lr(t)||It(t)}function x5(t,e){if(e!=null)return void(t.__key=e);Wn(),O4();const n=nn(),i=Ur(),r=""+B5++;i._nodeMap.set(r,t),ce(t)?n._dirtyElements.set(r,!0):n._dirtyLeaves.add(r),n._cloneNotNeeded.add(r),n._dirtyType=Z2,t.__key=r}function Ds(t){const e=t.getParent();if(e!==null){const n=t.getWritable(),i=e.getWritable(),r=t.getPreviousSibling(),s=t.getNextSibling();if(r===null)if(s!==null){const l=s.getWritable();i.__first=s.__key,l.__prev=null}else i.__first=null;else{const l=r.getWritable();if(s!==null){const o=s.getWritable();o.__prev=l.__key,l.__next=o.__key}else l.__next=null;n.__prev=null}if(s===null)if(r!==null){const l=r.getWritable();i.__last=r.__key,l.__next=null}else i.__last=null;else{const l=s.getWritable();if(r!==null){const o=r.getWritable();o.__next=l.__key,l.__prev=o.__key}else l.__prev=null;n.__next=null}i.__size--,n.__parent=null}}function ac(t){O4();const e=t.getLatest(),n=e.__parent,i=Ur(),r=nn(),s=i._nodeMap,l=r._dirtyElements;n!==null&&function(a,u,c){let f=a;for(;f!==null;){if(c.has(f))return;const d=u.get(f);if(d===void 0)break;c.set(f,!1),f=d.__parent}}(n,s,l);const o=e.__key;r._dirtyType=Z2,ce(t)?l.set(o,!0):r._dirtyLeaves.add(o)}function En(t){Wn();const e=nn(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,n!==null){const i=Fn(n);i!==null&&i.getWritable()}if(t!==null){const i=Fn(t);i!==null&&i.getWritable()}}}function Jr(){return Ba()?null:nn()._compositionKey}function Fn(t,e){const n=(e||Ur())._nodeMap.get(t);return n===void 0?null:n}function r4(t,e){const n=t[`__lexicalKey_${nn()._key}`];return n!==void 0?Fn(n,e):null}function $r(t,e){let n=t;for(;n!=null;){const i=r4(n,e);if(i!==null)return i;n=rf(n)}return null}function s4(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function Sb(t){return t.read(()=>hn().getTextContent())}function hn(){return l4(Ur())}function l4(t){return t._nodeMap.get("root")}function or(t){Wn();const e=Ur();t!==null&&(t.dirty=!0,t.setCachedNodes(null)),e._selection=t}function Sl(t){const e=nn(),n=function(i,r){let s=i;for(;s!=null;){const l=s[`__lexicalKey_${r._key}`];if(l!==void 0)return l;s=rf(s)}return null}(t,e);return n===null?t===e.getRootElement()?Fn("root"):null:Fn(n)}function Eb(t,e){return e?t.getTextContentSize():0}function o4(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function xp(t){const e=[];let n=t;for(;n!==null;)e.push(n),n=n._parentEditor;return e}function a4(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function u4(t){return t.nodeType===ps?t.nodeValue:null}function Vp(t,e,n){const i=ar(e._window);if(i===null)return;const r=i.anchorNode;let{anchorOffset:s,focusOffset:l}=i;if(r!==null){let o=u4(r);const a=$r(r);if(o!==null&&Ce(a)){if(o===tf&&n){const u=n.length;o=n,s=u,l=u}o!==null&&Wp(a,o,s,l,t)}}}function Wp(t,e,n,i,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const l=s.isComposing();let o=e;(l||r)&&e[e.length-1]===tf&&(o=e.slice(0,-1));const a=s.getTextContent();if(r||o!==a){if(o===""){if(En(null),Mp||ef||Rp)s.remove();else{const p=nn();setTimeout(()=>{p.update(()=>{s.isAttached()&&s.remove()})},20)}return}const u=s.getParent(),c=ao(),f=s.getTextContentSize(),d=Jr(),h=s.getKey();if(s.isToken()||d!==null&&h===d&&!l||Ie(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===t.__key&&c.anchor.offset===0&&!s.canInsertTextBefore()&&!l||c.focus.key===t.__key&&c.focus.offset===f&&!s.canInsertTextAfter()&&!l))return void s.markDirty();const m=Ye();if(!Ie(m)||n===null||i===null)return void s.setTextContent(o);if(m.setTextNodeRange(s,n,s,i),s.isSegmented()){const p=ln(s.getTextContent());s.replace(p),s=p}s.setTextContent(o)}}}function V5(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,i=e.getParentOrThrow(),r=e.isToken();return n===0?!e.canInsertTextBefore()||!i.canInsertTextBefore()&&!e.isComposing()||r||function(s){const l=s.getPreviousSibling();return(Ce(l)||ce(l)&&l.isInline())&&!l.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!i.canInsertTextAfter()&&!e.isComposing()||r)}function Tb(t){return t===37}function Ab(t){return t===39}function jo(t,e){return Fi?t:e}function Cb(t){return t===13}function Po(t){return t===8}function Io(t){return t===46}function Nb(t,e,n){return t===65&&jo(e,n)}function W5(){const t=hn();or(n4(t.select(0,t.getChildrenSize())))}function xo(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,i=n[e];if(i!==void 0)return i;const r=t[e];if(typeof r=="string"){const s=lc(r);return n[e]=s,s}return r}function Yp(t,e,n,i,r){if(n.size===0)return;const s=i.__type,l=i.__key,o=e.get(s);o===void 0&&He(33,s);const a=o.klass;let u=t.get(a);u===void 0&&(u=new Map,t.set(a,u));const c=u.get(l),f=c==="destroyed"&&r==="created";(c===void 0||f)&&u.set(l,f?"updated":r)}function Lb(t,e,n){const i=t.getParent();let r=n,s=t;return i!==null&&(e&&n===0?(r=s.getIndexWithinParent(),s=i):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=i)),s.getChildAtIndex(e?r-1:r)}function ua(t,e){const n=t.offset;if(t.type==="element")return Lb(t.getNode(),e,n);{const i=t.getNode();if(e&&n===0||!e&&n===i.getTextContentSize()){const r=e?i.getPreviousSibling():i.getNextSibling();return r===null?Lb(i.getParentOrThrow(),e,i.getIndexWithinParent()+(e?0:1)):r}}return null}function c4(t){const e=sf(t).event,n=e&&e.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Ue(t,e,n){return P4(t,e,n)}function nf(t){return!Un(t)&&!t.isLastChild()&&!t.isInline()}function uc(t,e){const n=t._keyToDOMMap.get(e);return n===void 0&&He(75,e),n}function rf(t){const e=t.assignedSlot||t.parentElement;return e!==null&&e.nodeType===11?e.host:e}function Eh(t,e){let n=t.getParent();for(;n!==null;){if(n.is(e))return!0;n=n.getParent()}return!1}function sf(t){const e=t._window;return e===null&&He(78),e}function Y5(t){let e=t.getParentOrThrow();for(;e!==null;){if(ls(e))return e;e=e.getParentOrThrow()}return e}function ls(t){return Un(t)||ce(t)&&t.isShadowRoot()}function si(t){const e=nn(),n=t.constructor.getType(),i=e._nodes.get(n);i===void 0&&He(97);const r=i.replace;if(r!==null){const s=r(t);return s instanceof t.constructor||He(98),s}return t}function wd(t,e){!Un(t.getParent())||ce(e)||It(e)||He(99)}function kd(t){return(It(t)||ce(t)&&!t.canBeEmpty())&&!t.isInline()}function Gp(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const i=t.parentElement;i!==null&&i.removeChild(t)}function G5(t,e,n){let i=t._blockCursorElement;if(Ie(n)&&n.isCollapsed()&&n.anchor.type==="element"&&e.contains(document.activeElement)){const r=n.anchor,s=r.getNode(),l=r.offset;let o=!1,a=null;if(l===s.getChildrenSize())kd(s.getChildAtIndex(l-1))&&(o=!0);else{const u=s.getChildAtIndex(l);if(kd(u)){const c=u.getPreviousSibling();(c===null||kd(c))&&(o=!0,a=t.getElementByKey(u.__key))}}if(o){const u=t.getElementByKey(s.__key);return i===null&&(t._blockCursorElement=i=function(c){const f=c.theme,d=document.createElement("div");d.contentEditable="false",d.setAttribute("data-lexical-cursor","true");let h=f.blockCursor;if(h!==void 0){if(typeof h=="string"){const m=lc(h);h=f.blockCursor=m}h!==void 0&&d.classList.add(...h)}return d}(t._config)),e.style.caretColor="transparent",void(a===null?u.appendChild(i):u.insertBefore(i,a))}}i!==null&&Gp(i,t,e)}function ar(t){return Ji?(t||window).getSelection():null}function K5(t){return Di(t)&&t.tagName==="A"}function Di(t){return t.nodeType===1}function vl(t){if(It(t)&&!t.isInline())return!0;if(!ce(t)||ls(t))return!1;const e=t.getFirstChild(),n=e===null||Lr(e)||Ce(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}function Sd(t,e){let n=t;for(;n!==null&&n.getParent()!==null&&!e(n);)n=n.getParentOrThrow();return e(n)?n:null}function f4(t,e,n,i,r,s){let l=t.getFirstChild();for(;l!==null;){const o=l.__key;l.__parent===e&&(ce(l)&&f4(l,o,n,i,r,s),n.has(o)||s.delete(o),r.push(o)),l=l.getNextSibling()}}let os,jn,ca,lf,Th,Ah,Bs,Hi,Ch,fa,cn="",zn="",zi=null,kr="",d4=!1,Kp=!1,Fu=null;function cc(t,e){const n=Bs.get(t);if(e!==null){const i=Oh(t);i.parentNode===e&&e.removeChild(i)}if(Hi.has(t)||jn._keyToDOMMap.delete(t),ce(n)){const i=dc(n,Bs);Nh(i,0,i.length-1,null)}n!==void 0&&Yp(fa,ca,lf,n,"destroyed")}function Nh(t,e,n,i){let r=e;for(;r<=n;++r){const s=t[r];s!==void 0&&cc(s,i)}}function ws(t,e){t.setProperty("text-align",e)}const Z5="40px";function h4(t,e){const n=os.theme.indent;if(typeof n=="string"){const r=t.classList.contains(n);e>0&&!r?t.classList.add(n):e<1&&r&&t.classList.remove(n)}const i=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||Z5;t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${i})`)}function p4(t,e){const n=t.style;e===0?ws(n,""):e===$p?ws(n,"left"):e===Fp?ws(n,"center"):e===zp?ws(n,"right"):e===jp?ws(n,"justify"):e===Bp?ws(n,"start"):e===Up&&ws(n,"end")}function fc(t,e,n){const i=Hi.get(t);i===void 0&&He(60);const r=i.createDOM(os,jn);if(function(s,l,o){const a=o._keyToDOMMap;l["__lexicalKey_"+o._key]=s,a.set(s,l)}(t,r,jn),Ce(i)?r.setAttribute("data-lexical-text","true"):It(i)&&r.setAttribute("data-lexical-decorator","true"),ce(i)){const s=i.__indent,l=i.__size;if(s!==0&&h4(r,s),l!==0){const a=l-1;(function(u,c,f,d){const h=zn;zn="",Lh(u,f,0,c,d,null),g4(f,d),zn=h})(dc(i,Hi),a,i,r)}const o=i.__format;o!==0&&p4(r,o),i.isInline()||m4(null,i,r),nf(i)&&(cn+=Rr,kr+=Rr)}else{const s=i.getTextContent();if(It(i)){const l=i.decorate(jn,os);l!==null&&_4(t,l),r.contentEditable="false"}else Ce(i)&&(i.isDirectionless()||(zn+=s));cn+=s,kr+=s}if(e!==null)if(n!=null)e.insertBefore(r,n);else{const s=e.__lexicalLineBreak;s!=null?e.insertBefore(r,s):e.appendChild(r)}return Yp(fa,ca,lf,i,"created"),r}function Lh(t,e,n,i,r,s){const l=cn;cn="";let o=n;for(;o<=i;++o){fc(t[o],r,s);const a=Hi.get(t[o]);a!==null&&zi===null&&Ce(a)&&(zi=a.getFormat())}nf(e)&&(cn+=Rr),r.__lexicalTextContent=cn,cn=l+cn}function Ob(t,e){const n=e.get(t);return Lr(n)||It(n)&&n.isInline()}function m4(t,e,n){const i=t!==null&&(t.__size===0||Ob(t.__last,Bs)),r=e.__size===0||Ob(e.__last,Hi);if(i){if(!r){const s=n.__lexicalLineBreak;s!=null&&n.removeChild(s),n.__lexicalLineBreak=null}}else if(r){const s=document.createElement("br");n.__lexicalLineBreak=s,n.appendChild(s)}}function g4(t,e){const n=e.__lexicalDirTextContent,i=e.__lexicalDir;if(n!==zn||i!==Fu){const s=zn==="",l=s?Fu:(r=zn,O5.test(r)?"rtl":P5.test(r)?"ltr":null);if(l!==i){const o=e.classList,a=os.theme;let u=i!==null?a[i]:void 0,c=l!==null?a[l]:void 0;if(u!==void 0){if(typeof u=="string"){const f=lc(u);u=a[i]=f}o.remove(...u)}if(l===null||s&&l==="ltr")e.removeAttribute("dir");else{if(c!==void 0){if(typeof c=="string"){const f=lc(c);c=a[l]=f}c!==void 0&&o.add(...c)}e.dir=l}Kp||(t.getWritable().__dir=l)}Fu=l,e.__lexicalDirTextContent=zn,e.__lexicalDir=l}var r}function J5(t,e,n){const i=zn;var r;zn="",zi=null,function(s,l,o){const a=cn,u=s.__size,c=l.__size;if(cn="",u===1&&c===1){const f=s.__first,d=l.__first;if(f===d)Bo(f,o);else{const m=Oh(f),p=fc(d,null,null);o.replaceChild(p,m),cc(f,null)}const h=Hi.get(d);zi===null&&Ce(h)&&(zi=h.getFormat())}else{const f=dc(s,Bs),d=dc(l,Hi);if(u===0)c!==0&&Lh(d,l,0,c-1,o,null);else if(c===0){if(u!==0){const h=o.__lexicalLineBreak==null;Nh(f,0,u-1,h?null:o),h&&(o.textContent="")}}else(function(h,m,p,g,v,b){const w=g-1,k=v-1;let S,E,P=(D=b,D.firstChild),M=0,I=0;for(var D;M<=w&&I<=k;){const U=m[M],W=p[I];if(U===W)P=Ed(Bo(W,b)),M++,I++;else{S===void 0&&(S=new Set(m)),E===void 0&&(E=new Set(p));const K=E.has(U),ve=S.has(W);if(K)if(ve){const me=uc(jn,W);me===P?P=Ed(Bo(W,b)):(P!=null?b.insertBefore(me,P):b.appendChild(me),Bo(W,b)),M++,I++}else fc(W,b,P),I++;else P=Ed(Oh(U)),cc(U,b),M++}const ee=Hi.get(W);ee!==null&&zi===null&&Ce(ee)&&(zi=ee.getFormat())}const z=M>w,R=I>k;if(z&&!R){const U=p[k+1];Lh(p,h,I,k,b,U===void 0?null:jn.getElementByKey(U))}else R&&!z&&Nh(m,M,w,b)})(l,f,d,u,c,o)}nf(l)&&(cn+=Rr),o.__lexicalTextContent=cn,cn=a+cn}(t,e,n),g4(e,n),as(r=e)&&zi!=null&&zi!==r.__textFormat&&r.setTextFormat(zi),zn=i,zi=null}function dc(t,e){const n=[];let i=t.__first;for(;i!==null;){const r=e.get(i);r===void 0&&He(101),n.push(i),i=r.__next}return n}function Bo(t,e){const n=Bs.get(t);let i=Hi.get(t);n!==void 0&&i!==void 0||He(61);const r=d4||Ah.has(t)||Th.has(t),s=uc(jn,t);if(n===i&&!r){if(ce(n)){const l=s.__lexicalTextContent;l!==void 0&&(cn+=l,kr+=l);const o=s.__lexicalDirTextContent;o!==void 0&&(zn+=o)}else{const l=n.getTextContent();Ce(n)&&!n.isDirectionless()&&(zn+=l),kr+=l,cn+=l}return s}if(n!==i&&r&&Yp(fa,ca,lf,i,"updated"),i.updateDOM(n,s,os)){const l=fc(t,null,null);return e===null&&He(62),e.replaceChild(l,s),cc(t,null),l}if(ce(n)&&ce(i)){const l=i.__indent;l!==n.__indent&&h4(s,l);const o=i.__format;o!==n.__format&&p4(s,o),r&&(J5(n,i,s),Un(i)||i.isInline()||m4(n,i,s)),nf(i)&&(cn+=Rr,kr+=Rr)}else{const l=i.getTextContent();if(It(i)){const o=i.decorate(jn,os);o!==null&&_4(t,o)}else Ce(i)&&!i.isDirectionless()&&(zn+=l);cn+=l,kr+=l}if(!Kp&&Un(i)&&i.__cachedText!==kr){const l=i.getWritable();l.__cachedText=kr,i=l}return s}function _4(t,e){let n=jn._pendingDecorators;const i=jn._decorators;if(n===null){if(i[t]===e)return;n=s4(jn)}n[t]=e}function Ed(t){let e=t.nextSibling;return e!==null&&e===jn._blockCursorElement&&(e=e.nextSibling),e}function X5(t,e,n,i,r,s){cn="",kr="",zn="",d4=i===Kl,Fu=null,jn=n,os=n._config,ca=n._nodes,lf=jn._listeners.mutation,Th=r,Ah=s,Bs=t._nodeMap,Hi=e._nodeMap,Kp=e._readOnly,Ch=new Map(n._keyToDOMMap);const l=new Map;return fa=l,Bo("root",null),jn=void 0,ca=void 0,Th=void 0,Ah=void 0,Bs=void 0,Hi=void 0,os=void 0,Ch=void 0,fa=void 0,l}function Oh(t){const e=Ch.get(t);return e===void 0&&He(75,t),e}const vr=Object.freeze({}),Ph=30,Ih=[["keydown",function(t,e){if(Vo=t.timeStamp,b4=t.keyCode,e.isComposing())return;const{keyCode:n,shiftKey:i,ctrlKey:r,metaKey:s,altKey:l}=t;Ue(e,z2,t)||(function(o,a,u,c){return Ab(o)&&!a&&!c&&!u}(n,r,l,s)?Ue(e,j2,t):function(o,a,u,c,f){return Ab(o)&&!c&&!u&&(a||f)}(n,r,i,l,s)?Ue(e,u5,t):function(o,a,u,c){return Tb(o)&&!a&&!c&&!u}(n,r,l,s)?Ue(e,B2,t):function(o,a,u,c,f){return Tb(o)&&!c&&!u&&(a||f)}(n,r,i,l,s)?Ue(e,c5,t):function(o,a,u){return function(c){return c===38}(o)&&!a&&!u}(n,r,s)?Ue(e,U2,t):function(o,a,u){return function(c){return c===40}(o)&&!a&&!u}(n,r,s)?Ue(e,q2,t):function(o,a){return Cb(o)&&a}(n,i)?(Yo=!0,Ue(e,nc,t)):function(o){return o===32}(n)?Ue(e,f5,t):function(o,a){return Fi&&a&&o===79}(n,r)?(t.preventDefault(),Yo=!0,Ue(e,Ml,!0)):function(o,a){return Cb(o)&&!a}(n,i)?(Yo=!1,Ue(e,nc,t)):function(o,a,u,c){return Fi?!a&&!u&&(Po(o)||o===72&&c):!(c||a||u)&&Po(o)}(n,l,s,r)?Po(n)?Ue(e,H2,t):(t.preventDefault(),Ue(e,Is,!0)):function(o){return o===27}(n)?Ue(e,x2,t):function(o,a,u,c,f){return Fi?!(u||c||f)&&(Io(o)||o===68&&a):!(a||c||f)&&Io(o)}(n,r,i,l,s)?Io(n)?Ue(e,V2,t):(t.preventDefault(),Ue(e,Is,!1)):function(o,a,u){return Po(o)&&(Fi?a:u)}(n,l,r)?(t.preventDefault(),Ue(e,oa,!0)):function(o,a,u){return Io(o)&&(Fi?a:u)}(n,l,r)?(t.preventDefault(),Ue(e,oa,!1)):function(o,a){return Fi&&a&&Po(o)}(n,s)?(t.preventDefault(),Ue(e,aa,!0)):function(o,a){return Fi&&a&&Io(o)}(n,s)?(t.preventDefault(),Ue(e,aa,!1)):function(o,a,u,c){return o===66&&!a&&jo(u,c)}(n,l,s,r)?(t.preventDefault(),Ue(e,Er,"bold")):function(o,a,u,c){return o===85&&!a&&jo(u,c)}(n,l,s,r)?(t.preventDefault(),Ue(e,Er,"underline")):function(o,a,u,c){return o===73&&!a&&jo(u,c)}(n,l,s,r)?(t.preventDefault(),Ue(e,Er,"italic")):function(o,a,u,c){return o===9&&!a&&!u&&!c}(n,l,r,s)?Ue(e,d5,t):function(o,a,u,c){return o===90&&!a&&jo(u,c)}(n,i,s,r)?(t.preventDefault(),Ue(e,Pp,void 0)):function(o,a,u,c){return Fi?o===90&&u&&a:o===89&&c||o===90&&c&&a}(n,i,s,r)?(t.preventDefault(),Ue(e,Ip,void 0)):Ui(e._editorState._selection)?function(o,a,u,c){return!a&&o===67&&(Fi?u:c)}(n,i,s,r)?(t.preventDefault(),Ue(e,Qc,t)):function(o,a,u,c){return!a&&o===88&&(Fi?u:c)}(n,i,s,r)?(t.preventDefault(),Ue(e,Dp,t)):Nb(n,s,r)&&(t.preventDefault(),Ue(e,yh,t)):!ts&&Nb(n,s,r)&&(t.preventDefault(),Ue(e,yh,t)),function(o,a,u,c){return o||a||u||c}(r,i,l,s)&&Ue(e,w5,t))}],["pointerdown",function(t,e){const n=t.target,i=t.pointerType;n instanceof Node&&i!=="touch"&&ai(e,()=>{It($r(n))||(Mh=!0)})}],["compositionstart",function(t,e){ai(e,()=>{const n=Ye();if(Ie(n)&&!e.isComposing()){const i=n.anchor,r=n.anchor.getNode();En(i.key),(t.timeStamp<Vo+Ph||i.type==="element"||!n.isCollapsed()||r.getFormat()!==n.format||Ce(r)&&r.getStyle()!==n.style)&&Ue(e,Rl,L5)}})}],["compositionend",function(t,e){ts?Do=!0:ai(e,()=>{Td(e,t.data)})}],["input",function(t,e){t.stopPropagation(),ai(e,()=>{const n=Ye(),i=t.data,r=k4(t);if(i!=null&&Ie(n)&&w4(n,r,i,t.timeStamp,!1)){Do&&(Td(e,i),Do=!1);const s=n.anchor,l=s.getNode(),o=ar(e._window);if(o===null)return;const a=s.offset;ic&&!n.isCollapsed()&&Ce(l)&&o.anchorNode!==null&&l.getTextContent().slice(0,a)+i+l.getTextContent().slice(a+n.focus.offset)===u4(o.anchorNode)||Ue(e,Rl,i);const u=i.length;ts&&u>1&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=u),Mp||ef||Rp||!e.isComposing()||(Vo=0,En(null))}else Vp(!1,e,i!==null?i:void 0),Do&&(Td(e,i||void 0),Do=!1);Wn(),e4(nn())}),yl=null}],["click",function(t,e){ai(e,()=>{const n=Ye(),i=ar(e._window),r=ao();if(i){if(Ie(n)){const s=n.anchor,l=s.getNode();s.type==="element"&&s.offset===0&&n.isCollapsed()&&!Un(l)&&hn().getChildrenSize()===1&&l.getTopLevelElementOrThrow().isEmpty()&&r!==null&&n.is(r)?(i.removeAllRanges(),n.dirty=!0):t.detail===3&&!n.isCollapsed()&&l!==n.focus.getNode()&&(ce(l)?l.select(0):l.getParentOrThrow().select(0))}else if(t.pointerType==="touch"){const s=i.anchorNode;if(s!==null){const l=s.nodeType;(l===$a||l===ps)&&or(Jp(r,i,e,t))}}}Ue(e,F2,t)})}],["cut",vr],["copy",vr],["dragstart",vr],["dragover",vr],["dragend",vr],["paste",vr],["focus",vr],["blur",vr],["drop",vr]];ic&&Ih.push(["beforeinput",(t,e)=>function(n,i){const r=n.inputType,s=k4(n);r==="deleteCompositionText"||ts&&c4(i)||r!=="insertCompositionText"&&ai(i,()=>{const l=Ye();if(r==="deleteContentBackward"){if(l===null){const h=ao();if(!Ie(h))return;or(h.clone())}if(Ie(l)){const h=l.anchor.key===l.focus.key;if(o=n.timeStamp,b4===229&&o<Vo+Ph&&i.isComposing()&&h){if(En(null),Vo=0,setTimeout(()=>{ai(i,()=>{En(null)})},Ph),Ie(l)){const m=l.anchor.getNode();m.markDirty(),l.format=m.getFormat(),Ce(m)||He(142),l.style=m.getStyle()}}else{En(null),n.preventDefault();const m=l.anchor.getNode().getTextContent(),p=l.anchor.offset===0&&l.focus.offset===m.length;E5&&h&&!p||Ue(i,Is,!0)}return}}var o;if(!Ie(l))return;const a=n.data;yl!==null&&Vp(!1,i,yl),l.dirty&&yl===null||!l.isCollapsed()||Un(l.anchor.getNode())||s===null||l.applyDOMRange(s),yl=null;const u=l.anchor,c=l.focus,f=u.getNode(),d=c.getNode();if(r!=="insertText"&&r!=="insertTranspose")switch(n.preventDefault(),r){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Ue(i,Rl,n);break;case"insertFromComposition":En(null),Ue(i,Rl,n);break;case"insertLineBreak":En(null),Ue(i,Ml,!1);break;case"insertParagraph":En(null),Yo&&!ef?(Yo=!1,Ue(i,Ml,!1)):Ue(i,tc,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Ue(i,Op,n);break;case"deleteByComposition":(function(h,m){return h!==m||ce(h)||ce(m)||!h.isToken()||!m.isToken()})(f,d)&&Ue(i,vh,n);break;case"deleteByDrag":case"deleteByCut":Ue(i,vh,n);break;case"deleteContent":Ue(i,Is,!1);break;case"deleteWordBackward":Ue(i,oa,!0);break;case"deleteWordForward":Ue(i,oa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Ue(i,aa,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Ue(i,aa,!1);break;case"formatStrikeThrough":Ue(i,Er,"strikethrough");break;case"formatBold":Ue(i,Er,"bold");break;case"formatItalic":Ue(i,Er,"italic");break;case"formatUnderline":Ue(i,Er,"underline");break;case"historyUndo":Ue(i,Pp,void 0);break;case"historyRedo":Ue(i,Ip,void 0)}else{if(a===`
|
|
16
|
+
`)n.preventDefault(),Ue(i,Ml,!1);else if(a===Rr)n.preventDefault(),Ue(i,tc,void 0);else if(a==null&&n.dataTransfer){const h=n.dataTransfer.getData("text/plain");n.preventDefault(),l.insertRawText(h)}else a!=null&&w4(l,s,a,n.timeStamp,!0)?(n.preventDefault(),Ue(i,Rl,a)):yl=a;v4=n.timeStamp}})}(t,e)]);let Vo=0,b4=0,v4=0,yl=null;const Wo=new WeakMap;let Dh=!1,Mh=!1,Yo=!1,Do=!1,y4=[0,"",0,"root",0];function w4(t,e,n,i,r){const s=t.anchor,l=t.focus,o=s.getNode(),a=nn(),u=ar(a._window),c=u!==null?u.anchorNode:null,f=s.key,d=a.getElementByKey(f),h=n.length;return f!==l.key||!Ce(o)||(!r&&(!ic||v4<i+50)||o.isDirty()&&h<2||o4(n))&&s.offset!==l.offset&&!o.isComposing()||kh(o)||o.isDirty()&&h>1||(r||!ic)&&d!==null&&!o.isComposing()&&c!==oc(d)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||o.getFormat()!==t.format||o.getStyle()!==t.style||V5(t,o)}function Pb(t,e){return t!==null&&t.nodeValue!==null&&t.nodeType===ps&&e!==0&&e!==t.nodeValue.length}function Ib(t,e,n){const{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:l}=t;Dh&&(Dh=!1,Pb(i,r)&&Pb(s,l))||ai(e,()=>{if(!n)return void or(null);if(!Fa(e,i,s))return;const o=Ye();if(Ie(o)){const a=o.anchor,u=a.getNode();if(o.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(o.dirty=!0);const c=sf(e).event,f=c?c.timeStamp:performance.now(),[d,h,m,p,g]=y4,v=hn(),b=e.isComposing()===!1&&v.getTextContent()==="";if(f<g+200&&a.offset===m&&a.key===p)o.format=d,o.style=h;else if(a.type==="text")Ce(u)||He(141),o.format=u.getFormat(),o.style=u.getStyle();else if(a.type==="element"&&!b){const w=a.getNode();w instanceof uo&&w.getChildrenSize()===0?o.format=w.getTextFormat():o.format=0,o.style=""}}else{const c=a.key,f=o.focus.key,d=o.getNodes(),h=d.length,m=o.isBackward(),p=m?l:r,g=m?r:l,v=m?f:c,b=m?c:f;let w=N5,k=!1;for(let S=0;S<h;S++){const E=d[S],P=E.getTextContentSize();if(Ce(E)&&P!==0&&!(S===0&&E.__key===v&&p===P||S===h-1&&E.__key===b&&g===0)&&(k=!0,w&=E.getFormat(),w===0))break}o.format=k?w:0}}Ue(e,Lp,void 0)})}function k4(t){if(!t.getTargetRanges)return null;const e=t.getTargetRanges();return e.length===0?null:e[0]}function Td(t,e){const n=t._compositionKey;if(En(null),n!==null&&e!=null){if(e===""){const i=Fn(n),r=oc(t.getElementByKey(n));return void(r!==null&&r.nodeValue!==null&&Ce(i)&&Wp(i,r.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
17
|
+
`){const i=Ye();if(Ie(i)){const r=i.focus;return i.anchor.set(r.key,r.offset,r.type),void Ue(t,nc,null)}}}Vp(!0,t,e)}function S4(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}const $l=new Map;function E4(t){const e=t.target,n=ar(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(n===null)return;const i=i4(n.anchorNode);if(i===null)return;Mh&&(Mh=!1,ai(i,()=>{const u=ao(),c=n.anchorNode;if(c===null)return;const f=c.nodeType;f!==$a&&f!==ps||or(Jp(u,n,i,t))}));const r=xp(i),s=r[r.length-1],l=s._key,o=$l.get(l),a=o||s;a!==i&&Ib(n,a,!1),Ib(n,i,!0),i!==s?$l.set(l,i):o&&$l.delete(l)}function Db(t){t._lexicalHandled=!0}function Mb(t){return t._lexicalHandled===!0}function Q5(t){const e=t.ownerDocument,n=Wo.get(e);if(n===void 0)throw Error("Root element not registered");Wo.set(e,n-1),Wo.get(e)===0&&e.removeEventListener("selectionchange",E4);const i=t.__lexicalEditor;i!=null&&(function(s){if(s._parentEditor!==null){const l=xp(s),o=l[l.length-1]._key;$l.get(o)===s&&$l.delete(o)}else $l.delete(s._key)}(i),t.__lexicalEditor=null);const r=S4(t);for(let s=0;s<r.length;s++)r[s]();t.__lexicalEventHandles=[]}function Rh(t,e,n){Wn();const i=t.__key,r=t.getParent();if(r===null)return;const s=function(o){const a=Ye();if(!Ie(a)||!ce(o))return a;const{anchor:u,focus:c}=a,f=u.getNode(),d=c.getNode();return Eh(f,o)&&u.set(o.__key,0,"element"),Eh(d,o)&&c.set(o.__key,0,"element"),a}(t);let l=!1;if(Ie(s)&&e){const o=s.anchor,a=s.focus;o.key===i&&(pc(o,t,r,t.getPreviousSibling(),t.getNextSibling()),l=!0),a.key===i&&(pc(a,t,r,t.getPreviousSibling(),t.getNextSibling()),l=!0)}else Ui(s)&&e&&t.isSelected()&&t.selectPrevious();if(Ie(s)&&e&&!l){const o=t.getIndexWithinParent();Ds(t),hc(s,r,o,-1)}else Ds(t);n||ls(r)||r.canBeEmpty()||!r.isEmpty()||Rh(r,e),e&&Un(r)&&r.isEmpty()&&r.selectEnd()}class of{static getType(){He(64,this.name)}static clone(e){He(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,x5(this,e)}getType(){return this.__type}isInline(){He(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const n=Fn(e);if(n===null)break;e=n.__parent}return!1}isSelected(e){const n=e||Ye();if(n==null)return!1;const i=n.getNodes().some(r=>r.__key===this.__key);return(Ce(this)||!Ie(n)||n.anchor.type!=="element"||n.focus.type!=="element"||n.anchor.key!==n.focus.key||n.anchor.offset!==n.focus.offset)&&i}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let n=e.getFirstChild(),i=0;for(;n!==null;){if(this.is(n))return i;i++,n=n.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Fn(e)}getParentOrThrow(){const e=this.getParent();return e===null&&He(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const n=e.getParent();if(ls(n))return ce(e)||He(138),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&He(67,this.__key),e}getParents(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){const e=[];let n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Fn(e)}getPreviousSiblings(){const e=[],n=this.getParent();if(n===null)return e;let i=n.getFirstChild();for(;i!==null&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Fn(e)}getNextSiblings(){const e=[];let n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){const n=this.getParents(),i=e.getParents();ce(this)&&n.unshift(this),ce(e)&&i.unshift(e);const r=n.length,s=i.length;if(r===0||s===0||n[r-1]!==i[s-1])return null;const l=new Set(i);for(let o=0;o<r;o++){const a=n[o];if(l.has(a))return a}return null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const n=this.getCommonAncestor(e);let i=0,r=0,s=this;for(;;){const l=s.getParentOrThrow();if(l===n){i=s.getIndexWithinParent();break}s=l}for(s=e;;){const l=s.getParentOrThrow();if(l===n){r=s.getIndexWithinParent();break}s=l}return i<r}isParentOf(e){const n=this.__key;if(n===e.__key)return!1;let i=e;for(;i!==null;){if(i.__key===n)return!0;i=i.getParent()}return!1}getNodesBetween(e){const n=this.isBefore(e),i=[],r=new Set;let s=this;for(;s!==null;){const l=s.__key;if(r.has(l)||(r.add(l),i.push(s)),s===e)break;const o=ce(s)?n?s.getFirstChild():s.getLastChild():null;if(o!==null){s=o;continue}const a=n?s.getNextSibling():s.getPreviousSibling();if(a!==null){s=a;continue}const u=s.getParentOrThrow();if(r.has(u.__key)||i.push(u),u===e)break;let c=null,f=u;do{if(f===null&&He(68),c=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;c!==null||r.has(f.__key)||i.push(f)}while(c===null);s=c}return n||i.reverse(),i}isDirty(){const e=nn()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=Fn(this.__key);return e===null&&He(113),e}getWritable(){Wn();const e=Ur(),n=nn(),i=e._nodeMap,r=this.__key,s=this.getLatest(),l=s.__parent,o=n._cloneNotNeeded,a=Ye();if(a!==null&&a.setCachedNodes(null),o.has(r))return ac(s),s;const u=s.constructor.clone(s);return u.__parent=l,u.__next=s.__next,u.__prev=s.__prev,ce(s)&&ce(u)?(as(s)&&as(u)&&(u.__textFormat=s.__textFormat),u.__first=s.__first,u.__last=s.__last,u.__size=s.__size,u.__indent=s.__indent,u.__format=s.__format,u.__dir=s.__dir):Ce(s)&&Ce(u)&&(u.__format=s.__format,u.__style=s.__style,u.__mode=s.__mode,u.__detail=s.__detail),o.add(r),u.__key=r,ac(u),i.set(r,u),u}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){He(70)}updateDOM(e,n,i){He(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){He(72)}static importJSON(e){He(18,this.name)}static transform(){return null}remove(e){Rh(this,!0,e)}replace(e,n){Wn();let i=Ye();i!==null&&(i=i.clone()),wd(this,e);const r=this.getLatest(),s=this.__key,l=e.__key,o=e.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;Ds(o);const c=r.getPreviousSibling(),f=r.getNextSibling(),d=r.__prev,h=r.__next,m=r.__parent;if(Rh(r,!1,!0),c===null?a.__first=l:c.getWritable().__next=l,o.__prev=d,f===null?a.__last=l:f.getWritable().__prev=l,o.__next=h,o.__parent=m,a.__size=u,n&&(ce(this)&&ce(o)||He(139),this.getChildren().forEach(p=>{o.append(p)})),Ie(i)){or(i);const p=i.anchor,g=i.focus;p.key===s&&jb(p,o),g.key===s&&jb(g,o)}return Jr()===s&&En(l),o}insertAfter(e,n=!0){Wn(),wd(this,e);const i=this.getWritable(),r=e.getWritable(),s=r.getParent(),l=Ye();let o=!1,a=!1;if(s!==null){const h=e.getIndexWithinParent();if(Ds(r),Ie(l)){const m=s.__key,p=l.anchor,g=l.focus;o=p.type==="element"&&p.key===m&&p.offset===h+1,a=g.type==="element"&&g.key===m&&g.offset===h+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),f=r.__key,d=i.__next;if(u===null?c.__last=f:u.getWritable().__prev=f,c.__size++,i.__next=f,r.__next=d,r.__prev=i.__key,r.__parent=i.__parent,n&&Ie(l)){const h=this.getIndexWithinParent();hc(l,c,h+1);const m=c.__key;o&&l.anchor.set(m,h+2,"element"),a&&l.focus.set(m,h+2,"element")}return e}insertBefore(e,n=!0){Wn(),wd(this,e);const i=this.getWritable(),r=e.getWritable(),s=r.__key;Ds(r);const l=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),a=i.__prev,u=this.getIndexWithinParent();l===null?o.__first=s:l.getWritable().__next=s,o.__size++,i.__prev=s,r.__prev=a,r.__next=i.__key,r.__parent=i.__parent;const c=Ye();return n&&Ie(c)&&hc(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return on()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,n){Wn();const i=this.getPreviousSibling(),r=this.getParentOrThrow();if(i===null)return r.select(0,0);if(ce(i))return i.select();if(!Ce(i)){const s=i.getIndexWithinParent()+1;return r.select(s,s)}return i.select(e,n)}selectNext(e,n){Wn();const i=this.getNextSibling(),r=this.getParentOrThrow();if(i===null)return r.select();if(ce(i))return i.select(0,0);if(!Ce(i)){const s=i.getIndexWithinParent();return r.select(s,s)}return i.select(e,n)}markDirty(){this.getWritable()}}class za extends of{static getType(){return"linebreak"}static clone(e){return new za(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
18
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(n){const i=n.parentElement;if(i!==null){const r=i.firstChild;if(r===n||r.nextSibling===n&&Rb(r)){const s=i.lastChild;if(s===n||s.previousSibling===n&&Rb(s))return!0}}return!1}(e)?null:{conversion:e8,priority:0}}}static importJSON(e){return Vi()}exportJSON(){return{type:"linebreak",version:1}}}function e8(t){return{node:Vi()}}function Vi(){return si(new za)}function Lr(t){return t instanceof za}function Rb(t){return t.nodeType===ps&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}function Ad(t,e){return 16&e?"code":128&e?"mark":32&e?"sub":64&e?"sup":null}function Cd(t,e){return 1&e?"strong":2&e?"em":"span"}function T4(t,e,n,i,r){const s=i.classList;let l=xo(r,"base");l!==void 0&&s.add(...l),l=xo(r,"underlineStrikethrough");let o=!1;const a=e&sc&&e&rc;l!==void 0&&(n&sc&&n&rc?(o=!0,a||s.add(...l)):a&&s.remove(...l));for(const u in Nr){const c=Nr[u];if(l=xo(r,u),l!==void 0)if(n&c){if(o&&(u==="underline"||u==="strikethrough")){e&c&&s.remove(...l);continue}e&c&&(!a||u!=="underline")&&u!=="strikethrough"||s.add(...l)}else e&c&&s.remove(...l)}}function A4(t,e,n){const i=e.firstChild,r=n.isComposing(),s=t+(r?tf:"");if(i==null)e.textContent=s;else{const l=i.nodeValue;if(l!==s)if(r||ts){const[o,a,u]=function(c,f){const d=c.length,h=f.length;let m=0,p=0;for(;m<d&&m<h&&c[m]===f[m];)m++;for(;p+m<d&&p+m<h&&c[d-p-1]===f[h-p-1];)p++;return[m,d-m-p,f.slice(m,h-p)]}(l,s);a!==0&&i.deleteData(o,a),i.insertData(o,u)}else i.nodeValue=s}}function $b(t,e,n,i,r,s){A4(r,t,e);const l=s.theme.text;l!==void 0&&T4(0,0,i,t,l)}function _u(t,e){const n=document.createElement(e);return n.appendChild(t),n}class Zs extends of{static getType(){return"text"}static clone(e){return new Zs(e.__text,e.__key)}constructor(e,n){super(n),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return R5[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Jr()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const n=Nr[e];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){return Sh(this.getLatest().__format,e,n)}canHaveFormat(){return!0}createDOM(e,n){const i=this.__format,r=Ad(0,i),s=Cd(0,i),l=r===null?s:r,o=document.createElement(l);let a=o;this.hasFormat("code")&&o.setAttribute("spellcheck","false"),r!==null&&(a=document.createElement(s),o.appendChild(a)),$b(a,this,0,i,this.__text,e);const u=this.__style;return u!==""&&(o.style.cssText=u),o}updateDOM(e,n,i){const r=this.__text,s=e.__format,l=this.__format,o=Ad(0,s),a=Ad(0,l),u=Cd(0,s),c=Cd(0,l);if((o===null?u:o)!==(a===null?c:a))return!0;if(o===a&&u!==c){const p=n.firstChild;p==null&&He(48);const g=document.createElement(c);return $b(g,this,0,l,r,i),n.replaceChild(g,p),!1}let f=n;a!==null&&o!==null&&(f=n.firstChild,f==null&&He(49)),A4(r,f,this);const d=i.theme.text;d!==void 0&&s!==l&&T4(0,s,l,f,d);const h=e.__style,m=this.__style;return h!==m&&(n.style.cssText=m),!1}static importDOM(){return{"#text":()=>({conversion:r8,priority:0}),b:()=>({conversion:n8,priority:0}),code:()=>({conversion:Yr,priority:0}),em:()=>({conversion:Yr,priority:0}),i:()=>({conversion:Yr,priority:0}),s:()=>({conversion:Yr,priority:0}),span:()=>({conversion:t8,priority:0}),strong:()=>({conversion:Yr,priority:0}),sub:()=>({conversion:Yr,priority:0}),sup:()=>({conversion:Yr,priority:0}),u:()=>({conversion:Yr,priority:0})}}static importJSON(e){const n=ln(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){let{element:n}=super.exportDOM(e);return n!==null&&Di(n)||He(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=_u(n,"b")),this.hasFormat("italic")&&(n=_u(n,"i")),this.hasFormat("strikethrough")&&(n=_u(n,"s")),this.hasFormat("underline")&&(n=_u(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,n){}setFormat(e){const n=this.getWritable();return n.__format=typeof e=="string"?Nr[e]:e,n}setDetail(e){const n=this.getWritable();return n.__detail=typeof e=="string"?I5[e]:e,n}setStyle(e){const n=this.getWritable();return n.__style=e,n}toggleFormat(e){const n=Sh(this.getFormat(),e,null);return this.setFormat(n)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const n=M5[e];if(this.__mode===n)return this;const i=this.getWritable();return i.__mode=n,i}setTextContent(e){if(this.__text===e)return this;const n=this.getWritable();return n.__text=e,n}select(e,n){Wn();let i=e,r=n;const s=Ye(),l=this.getTextContent(),o=this.__key;if(typeof l=="string"){const a=l.length;i===void 0&&(i=a),r===void 0&&(r=a)}else i=0,r=0;if(!Ie(s))return L4(o,i,o,r,"text","text");{const a=Jr();a!==s.anchor.key&&a!==s.focus.key||En(o),s.setTextNodeRange(this,i,this,r)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,i,r){const s=this.getWritable(),l=s.__text,o=i.length;let a=e;a<0&&(a=o+a,a<0&&(a=0));const u=Ye();if(r&&Ie(u)){const f=e+o;u.setTextNodeRange(s,f,s,f)}const c=l.slice(0,a)+i+l.slice(a+n);return s.__text=c,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Wn();const n=this.getLatest(),i=n.getTextContent(),r=n.__key,s=Jr(),l=new Set(e),o=[],a=i.length;let u="";for(let P=0;P<a;P++)u!==""&&l.has(P)&&(o.push(u),u=""),u+=i[P];u!==""&&o.push(u);const c=o.length;if(c===0)return[];if(o[0]===i)return[n];const f=o[0],d=n.getParentOrThrow();let h;const m=n.getFormat(),p=n.getStyle(),g=n.__detail;let v=!1;n.isSegmented()?(h=ln(f),h.__format=m,h.__style=p,h.__detail=g,v=!0):(h=n.getWritable(),h.__text=f);const b=Ye(),w=[h];let k=f.length;for(let P=1;P<c;P++){const M=o[P],I=M.length,D=ln(M).getWritable();D.__format=m,D.__style=p,D.__detail=g;const z=D.__key,R=k+I;if(Ie(b)){const U=b.anchor,W=b.focus;U.key===r&&U.type==="text"&&U.offset>k&&U.offset<=R&&(U.key=z,U.offset-=k,b.dirty=!0),W.key===r&&W.type==="text"&&W.offset>k&&W.offset<=R&&(W.key=z,W.offset-=k,b.dirty=!0)}s===r&&En(z),k=R,w.push(D)}(function(P){const M=P.getPreviousSibling(),I=P.getNextSibling();M!==null&&ac(M),I!==null&&ac(I)})(this);const S=d.getWritable(),E=this.getIndexWithinParent();return v?(S.splice(E,0,w),this.remove()):S.splice(E,1,w),Ie(b)&&hc(b,d,E,c-1),w}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||He(50);const i=this.__key,r=e.__key,s=this.__text,l=s.length;Jr()===r&&En(i);const o=Ye();if(Ie(o)){const f=o.anchor,d=o.focus;f!==null&&f.key===r&&(Yb(f,n,i,e,l),o.dirty=!0),d!==null&&d.key===r&&(Yb(d,n,i,e,l),o.dirty=!0)}const a=e.__text,u=n?a+s:s+a;this.setTextContent(u);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function t8(t){const e=t.style,n=e.fontWeight,i=n==="700"||n==="bold",r=e.textDecoration==="line-through",s=e.fontStyle==="italic",l=e.textDecoration==="underline",o=e.verticalAlign;return{forChild:a=>(Ce(a)&&(i&&a.toggleFormat("bold"),r&&a.toggleFormat("strikethrough"),s&&a.toggleFormat("italic"),l&&a.toggleFormat("underline"),o==="sub"&&a.toggleFormat("subscript"),o==="super"&&a.toggleFormat("superscript")),a),node:null}}function n8(t){const e=t.style.fontWeight==="normal";return{forChild:n=>(Ce(n)&&!e&&n.toggleFormat("bold"),n),node:null}}const Fb=new WeakMap;function i8(t){return t.nodeName==="PRE"||t.nodeType===$a&&t.style!==void 0&&t.style.whiteSpace!==void 0&&t.style.whiteSpace.startsWith("pre")}function r8(t){const e=t;t.parentElement===null&&He(129);let n=e.textContent||"";if(function(i){let r,s=i.parentNode;const l=[i];for(;s!==null&&(r=Fb.get(s))===void 0&&!i8(s);)l.push(s),s=s.parentNode;const o=r===void 0?s:r;for(let a=0;a<l.length;a++)Fb.set(l[a],o);return o}(e)!==null){const i=n.split(/(\r?\n|\t)/),r=[],s=i.length;for(let l=0;l<s;l++){const o=i[l];o===`
|
|
19
|
+
`||o===`\r
|
|
20
|
+
`?r.push(Vi()):o===" "?r.push(oo()):o!==""&&r.push(ln(o))}return{node:r}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let i=e,r=!0;for(;i!==null&&(i=zb(i,!1))!==null;){const s=i.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===" "){let i=e,r=!0;for(;i!==null&&(i=zb(i,!0))!==null;)if((i.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:ln(n)}}const s8=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function zb(t,e){let n=t;for(;;){let i;for(;(i=e?n.nextSibling:n.previousSibling)===null;){const s=n.parentElement;if(s===null)return null;n=s}if(n=i,n.nodeType===$a){const s=n.style.display;if(s===""&&n.nodeName.match(s8)===null||s!==""&&!s.startsWith("inline"))return null}let r=n;for(;(r=e?n.firstChild:n.lastChild)!==null;)n=r;if(n.nodeType===ps)return n;if(n.nodeName==="BR")return null}}const l8={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yr(t){const e=l8[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:n=>(Ce(n)&&!n.hasFormat(e)&&n.toggleFormat(e),n),node:null}}function ln(t=""){return si(new Zs(t))}function Ce(t){return t instanceof Zs}class ja extends Zs{static getType(){return"tab"}static clone(e){const n=new ja(e.__key);return n.__text=e.__text,n.__format=e.__format,n.__style=e.__style,n}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const n=oo();return n.setFormat(e.format),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){He(126)}setDetail(e){He(127)}setMode(e){He(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function oo(){return si(new ja)}function Zp(t){return t instanceof ja}class o8{constructor(e,n,i){this._selection=null,this.key=e,this.offset=n,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let n=this.getNode(),i=e.getNode();const r=this.offset,s=e.offset;if(ce(n)){const l=n.getDescendantByIndex(r);n=l??n}if(ce(i)){const l=i.getDescendantByIndex(s);i=l??i}return n===i?r<s:n.isBefore(i)}getNode(){const e=Fn(this.key);return e===null&&He(20),e}set(e,n,i){const r=this._selection,s=this.key;this.key=e,this.offset=n,this.type=i,Ba()||(Jr()===s&&En(e),r!==null&&(r.setCachedNodes(null),r.dirty=!0))}}function ur(t,e,n){return new o8(t,e,n)}function Nd(t,e){let n=e.__key,i=t.offset,r="element";if(Ce(e)){r="text";const s=e.getTextContentSize();i>s&&(i=s)}else if(!ce(e)){const s=e.getNextSibling();if(Ce(s))n=s.__key,i=0,r="text";else{const l=e.getParent();l&&(n=l.__key,i=e.getIndexWithinParent()+1)}}t.set(n,i,r)}function jb(t,e){if(ce(e)){const n=e.getLastDescendant();ce(n)||Ce(n)?Nd(t,n):Nd(t,e)}else Nd(t,e)}function Bb(t,e,n,i){const r=t.getNode(),s=r.getChildAtIndex(t.offset),l=ln(),o=Un(r)?on().append(l):l;l.setFormat(n),l.setStyle(i),s===null?r.append(o):s.insertBefore(o),t.is(e)&&e.set(l.__key,0,"text"),t.set(l.__key,0,"text")}function Gr(t,e,n,i){t.key=e,t.offset=n,t.type=i}class af{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Ui(e))return!1;const n=this._nodes,i=e._nodes;return n.size===i.size&&Array.from(n).every(r=>i.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new af(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const n=this.getNodes(),i=n.length,r=n[i-1];let s;if(Ce(r))s=r.select();else{const l=r.getIndexWithinParent()+1;s=r.getParentOrThrow().select(l,l)}s.insertNodes(e);for(let l=0;l<i;l++)n[l].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this._nodes,i=[];for(const r of n){const s=Fn(r);s!==null&&i.push(s)}return Ba()||(this._cachedNodes=i),i}getTextContent(){const e=this.getNodes();let n="";for(let i=0;i<e.length;i++)n+=e[i].getTextContent();return n}}function Ie(t){return t instanceof ms}class ms{constructor(e,n,i,r){this.anchor=e,this.focus=n,e._selection=this,n._selection=this,this._cachedNodes=null,this.format=i,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Ie(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const n=this.anchor,i=this.focus,r=n.isBefore(i),s=r?n:i,l=r?i:n;let o=s.getNode(),a=l.getNode();const u=s.offset,c=l.offset;if(ce(o)){const d=o.getDescendantByIndex(u);o=d??o}if(ce(a)){let d=a.getDescendantByIndex(c);d!==null&&d!==o&&a.getChildAtIndex(c)===d&&(d=d.getPreviousSibling()),a=d??a}let f;return f=o.is(a)?ce(o)&&o.getChildrenSize()>0?[]:[o]:o.getNodesBetween(a),Ba()||(this._cachedNodes=f),f}setTextNodeRange(e,n,i,r){Gr(this.anchor,e.__key,n,"text"),Gr(this.focus,i.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const n=e[0],i=e[e.length-1],r=this.anchor,s=this.focus,l=r.isBefore(s),[o,a]=$h(this);let u="",c=!0;for(let f=0;f<e.length;f++){const d=e[f];if(ce(d)&&!d.isInline())c||(u+=`
|
|
21
|
+
`),c=!d.isEmpty();else if(c=!1,Ce(d)){let h=d.getTextContent();d===n?d===i?r.type==="element"&&s.type==="element"&&s.offset!==r.offset||(h=o<a?h.slice(o,a):h.slice(a,o)):h=l?h.slice(o):h.slice(a):d===i&&(h=l?h.slice(0,a):h.slice(0,o)),u+=h}else!It(d)&&!Lr(d)||d===i&&this.isCollapsed()||(u+=d.getTextContent())}return u}applyDOMRange(e){const n=nn(),i=n.getEditorState()._selection,r=N4(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,i);if(r===null)return;const[s,l]=r;Gr(this.anchor,s.key,s.offset,s.type),Gr(this.focus,l.key,l.offset,l.type),this._cachedNodes=null}clone(){const e=this.anchor,n=this.focus;return new ms(ur(e.key,e.offset,e.type),ur(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=Sh(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const n=Nr[e];return!!(this.format&n)}insertRawText(e){const n=e.split(/(\r?\n|\t)/),i=[],r=n.length;for(let s=0;s<r;s++){const l=n[s];l===`
|
|
22
|
+
`||l===`\r
|
|
23
|
+
`?i.push(Vi()):l===" "?i.push(oo()):i.push(ln(l))}this.insertNodes(i)}insertText(e){const n=this.anchor,i=this.focus,r=this.isCollapsed()||n.isBefore(i),s=this.format,l=this.style;r&&n.type==="element"?Bb(n,i,s,l):r||i.type!=="element"||Bb(i,n,s,l);const o=this.getNodes(),a=o.length,u=r?i:n,c=(r?n:i).offset,f=u.offset;let d=o[0];Ce(d)||He(26);const h=d.getTextContent().length,m=d.getParentOrThrow();let p=o[a-1];if(this.isCollapsed()&&c===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!m.canInsertTextAfter()&&d.getNextSibling()===null)){let g=d.getNextSibling();if(Ce(g)&&g.canInsertTextBefore()&&!kh(g)||(g=ln(),g.setFormat(s),m.canInsertTextAfter()?d.insertAfter(g):m.insertAfter(g)),g.select(0,0),d=g,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&c===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!m.canInsertTextBefore()&&d.getPreviousSibling()===null)){let g=d.getPreviousSibling();if(Ce(g)&&!kh(g)||(g=ln(),g.setFormat(s),m.canInsertTextBefore()?d.insertBefore(g):m.insertBefore(g)),g.select(),d=g,e!=="")return void this.insertText(e)}else if(d.isSegmented()&&c!==h){const g=ln(d.getTextContent());g.setFormat(s),d.replace(g),d=g}else if(!this.isCollapsed()&&e!==""){const g=p.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||ce(g)&&(!g.canInsertTextBefore()||!g.canInsertTextAfter()))return this.insertText(""),C4(this.anchor,this.focus,null),void this.insertText(e)}if(a===1){if(d.isToken()){const w=ln(e);return w.select(),void d.replace(w)}const g=d.getFormat(),v=d.getStyle();if(c!==f||g===s&&v===l){if(Zp(d)){const w=ln(e);return w.setFormat(s),w.setStyle(l),w.select(),void d.replace(w)}}else{if(d.getTextContent()!==""){const w=ln(e);if(w.setFormat(s),w.setStyle(l),w.select(),c===0)d.insertBefore(w,!1);else{const[k]=d.splitText(c);k.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}d.setFormat(s),d.setStyle(l)}const b=f-c;d=d.spliceText(c,b,e,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=g,this.style=v))}else{const g=new Set([...d.getParentKeys(),...p.getParentKeys()]),v=ce(d)?d:d.getParentOrThrow();let b=ce(p)?p:p.getParentOrThrow(),w=p;if(!v.is(b)&&b.isInline())do w=b,b=b.getParentOrThrow();while(b.isInline());if(u.type==="text"&&(f!==0||p.getTextContent()==="")||u.type==="element"&&p.getIndexWithinParent()<f)if(Ce(p)&&!p.isToken()&&f!==p.getTextContentSize()){if(p.isSegmented()){const M=ln(p.getTextContent());p.replace(M),p=M}Un(u.getNode())||u.type!=="text"||(p=p.spliceText(0,f,"")),g.add(p.__key)}else{const M=p.getParentOrThrow();M.canBeEmpty()||M.getChildrenSize()!==1?p.remove():M.remove()}else g.add(p.__key);const k=b.getChildren(),S=new Set(o),E=v.is(b),P=v.isInline()&&d.getNextSibling()===null?v:d;for(let M=k.length-1;M>=0;M--){const I=k[M];if(I.is(d)||ce(I)&&I.isParentOf(d))break;I.isAttached()&&(!S.has(I)||I.is(w)?E||P.insertAfter(I,!1):I.remove())}if(!E){let M=b,I=null;for(;M!==null;){const D=M.getChildren(),z=D.length;(z===0||D[z-1].is(I))&&(g.delete(M.__key),I=M),M=M.getParent()}}if(d.isToken())if(c===h)d.select();else{const M=ln(e);M.select(),d.replace(M)}else d=d.spliceText(c,h-c,e,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let M=1;M<a;M++){const I=o[M],D=I.__key;g.has(D)||I.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void En(null);const n=this.getNodes(),i=[];for(const b of n)Ce(b)&&i.push(b);const r=i.length;if(r===0)return this.toggleFormat(e),void En(null);const s=this.anchor,l=this.focus,o=this.isBackward(),a=o?l:s,u=o?s:l;let c=0,f=i[0],d=a.type==="element"?0:a.offset;if(a.type==="text"&&d===f.getTextContentSize()&&(c=1,f=i[1],d=0),f==null)return;const h=f.getFormatFlags(e,null),m=r-1;let p=i[m];const g=u.type==="text"?u.offset:p.getTextContentSize();if(f.is(p)){if(d===g)return;if(d===0&&g===f.getTextContentSize())f.setFormat(h);else{const b=f.splitText(d,g),w=d===0?b[0]:b[1];w.setFormat(h),a.type==="text"&&a.set(w.__key,0,"text"),u.type==="text"&&u.set(w.__key,g-d,"text")}return void(this.format=h)}d!==0&&([,f]=f.splitText(d),d=0),f.setFormat(h);const v=p.getFormatFlags(e,h);g>0&&(g!==p.getTextContentSize()&&([p]=p.splitText(g)),p.setFormat(v));for(let b=c+1;b<m;b++){const w=i[b];if(!w.isToken()){const k=w.getFormatFlags(e,v);w.setFormat(k)}}a.type==="text"&&a.set(f.__key,d,"text"),u.type==="text"&&u.set(p.__key,g,"text"),this.format=h|v}insertNodes(e){if(e.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const m=Ye();return Ie(m)||He(134),m.insertNodes(e)}const n=Sd((this.isBackward()?this.focus:this.anchor).getNode(),vl),i=e[e.length-1];if("__language"in n&&ce(n)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const m=Ld(this);n.splice(m,0,e),i.selectEnd()}return}if(!e.some(m=>(ce(m)||It(m))&&!m.isInline())){ce(n)||He(135);const m=Ld(this);return n.splice(m,0,e),void i.selectEnd()}const r=function(m){const p=on();let g=null;for(let v=0;v<m.length;v++){const b=m[v],w=Lr(b);if(w||It(b)&&b.isInline()||ce(b)&&b.isInline()||Ce(b)||b.isParentRequired()){if(g===null&&(g=b.createParentElementNode(),p.append(g),w))continue;g!==null&&g.append(b)}else p.append(b),g=null}return p}(e),s=r.getLastDescendant(),l=r.getChildren(),o=m=>"__value"in m&&"__checked"in m,a=!ce(n)||!n.isEmpty()?this.insertParagraph():null,u=l[l.length-1];let c=l[0];var f;ce(f=c)&&vl(f)&&!f.isEmpty()&&ce(n)&&(!n.isEmpty()||o(n))&&(ce(n)||He(135),n.append(...c.getChildren()),c=l[1]),c&&function(m,p,g){const v=g||p.getParentOrThrow().getLastChild();let b=p;const w=[p];for(;b!==v;)b.getNextSibling()||He(140),b=b.getNextSibling(),w.push(b);let k=m;for(const S of w)k=k.insertAfter(S)}(n,c);const d=Sd(s,vl);a&&ce(d)&&(o(a)||vl(u))&&(d.append(...a.getChildren()),a.remove()),ce(n)&&n.isEmpty()&&n.remove(),s.selectEnd();const h=ce(n)?n.getLastChild():null;Lr(h)&&d!==n&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const l=on();return hn().splice(this.anchor.offset,0,[l]),l.select(),l}const e=Ld(this),n=Sd(this.anchor.getNode(),vl);ce(n)||He(136);const i=n.getChildAtIndex(e),r=i?[i,...i.getNextSiblings()]:[],s=n.insertNewAfter(this,!1);return s?(s.append(...r),s.selectStart(),s):null}insertLineBreak(e){const n=Vi();if(this.insertNodes([n]),e){const i=n.getParentOrThrow(),r=n.getIndexWithinParent();i.select(r,r)}}extract(){const e=this.getNodes(),n=e.length,i=n-1,r=this.anchor,s=this.focus;let l=e[0],o=e[i];const[a,u]=$h(this);if(n===0)return[];if(n===1){if(Ce(l)&&!this.isCollapsed()){const f=a>u?u:a,d=a>u?a:u,h=l.splitText(f,d),m=f===0?h[0]:h[1];return m!=null?[m]:[]}return[l]}const c=r.isBefore(s);if(Ce(l)){const f=c?a:u;f===l.getTextContentSize()?e.shift():f!==0&&([,l]=l.splitText(f),e[0]=l)}if(Ce(o)){const f=o.getTextContent().length,d=c?u:a;d===0?e.pop():d!==f&&([o]=o.splitText(d),e[i]=o)}return e}modify(e,n,i){const r=this.focus,s=this.anchor,l=e==="move",o=ua(r,n);if(It(o)&&!o.isIsolated()){if(l&&o.isKeyboardSelectable()){const h=Vb();return h.add(o.__key),void or(h)}const d=n?o.getPreviousSibling():o.getNextSibling();if(Ce(d)){const h=d.__key,m=n?d.getTextContent().length:0;return r.set(h,m,"text"),void(l&&s.set(h,m,"text"))}{const h=o.getParentOrThrow();let m,p;return ce(d)?(p=d.__key,m=n?d.getChildrenSize():0):(m=o.getIndexWithinParent(),p=h.__key,n||m++),r.set(p,m,"element"),void(l&&s.set(p,m,"element"))}}const a=nn(),u=ar(a._window);if(!u)return;const c=a._blockCursorElement,f=a._rootElement;if(f===null||c===null||!ce(o)||o.isInline()||o.canBeEmpty()||Gp(c,a,f),function(d,h,m,p){d.modify(h,m,p)}(u,e,n?"backward":"forward",i),u.rangeCount>0){const d=u.getRangeAt(0),h=this.anchor.getNode(),m=Un(h)?h:Y5(h);if(this.applyDOMRange(d),this.dirty=!0,!l){const p=this.getNodes(),g=[];let v=!1;for(let b=0;b<p.length;b++){const w=p[b];Eh(w,m)?g.push(w):v=!0}if(v&&g.length>0)if(n){const b=g[0];ce(b)?b.selectStart():b.getParentOrThrow().selectStart()}else{const b=g[g.length-1];ce(b)?b.selectEnd():b.getParentOrThrow().selectEnd()}u.anchorNode===d.startContainer&&u.anchorOffset===d.startOffset||function(b){const w=b.focus,k=b.anchor,S=k.key,E=k.offset,P=k.type;Gr(k,w.key,w.offset,w.type),Gr(w,S,E,P),b._cachedNodes=null}(this)}}}forwardDeletion(e,n,i){if(!i&&(e.type==="element"&&ce(n)&&e.offset===n.getChildrenSize()||e.type==="text"&&e.offset===n.getTextContentSize())){const r=n.getParent(),s=n.getNextSibling()||(r===null?null:r.getNextSibling());if(ce(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const n=this.isCollapsed();if(this.isCollapsed()){const i=this.anchor;let r=i.getNode();if(this.forwardDeletion(i,r,e))return;const s=this.focus,l=ua(s,e);if(It(l)&&!l.isIsolated()){if(l.isKeyboardSelectable()&&ce(r)&&r.getChildrenSize()===0){r.remove();const o=Vb();o.add(l.__key),or(o)}else l.remove(),nn().dispatchCommand(Lp,void 0);return}if(!e&&ce(l)&&ce(r)&&r.isEmpty())return r.remove(),void l.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&i.offset===0&&(i.type==="element"?i.getNode():i.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o=s.type==="text"?s.getNode():null;if(r=i.type==="text"?i.getNode():null,o!==null&&o.isSegmented()){const a=s.offset,u=o.getTextContentSize();if(o.is(r)||e&&a!==u||!e&&a!==0)return void qb(o,e,a)}else if(r!==null&&r.isSegmented()){const a=i.offset,u=r.getTextContentSize();if(r.is(o)||e&&a!==0||!e&&a!==u)return void qb(r,e,a)}(function(a,u){const c=a.anchor,f=a.focus,d=c.getNode(),h=f.getNode();if(d===h&&c.type==="text"&&f.type==="text"){const m=c.offset,p=f.offset,g=m<p,v=g?m:p,b=g?p:m,w=b-1;v!==w&&(o4(d.getTextContent().slice(v,b))||(u?f.offset=w:c.offset=w))}})(this,e)}}if(this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const i=this.anchor.getNode();i.isEmpty()&&Un(i.getParent())&&i.getIndexWithinParent()===0&&i.collapseAtStart(this)}}deleteLine(e){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",e,"lineboundary"),(e?this.focus:this.anchor).offset===0&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){if(this.isCollapsed()){const n=this.anchor,i=n.getNode();if(this.forwardDeletion(n,i,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Ui(t){return t instanceof af}function Ub(t){const e=t.offset;if(t.type==="text")return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function $h(t){const e=t.getStartEndPoints();if(e===null)return[0,0];const[n,i]=e;return n.type==="element"&&i.type==="element"&&n.key===i.key&&n.offset===i.offset?[0,0]:[Ub(n),Ub(i)]}function qb(t,e,n){const i=t,r=i.getTextContent().split(/(?=\s)/g),s=r.length;let l=0,o=0;for(let u=0;u<s;u++){const c=u===s-1;if(o=l,l+=r[u].length,e&&l===n||l>n||c){r.splice(u,1),c&&(o=void 0);break}}const a=r.join("").trim();a===""?i.remove():(i.setTextContent(a),i.select(o,o))}function Hb(t,e,n,i){let r,s=e;if(t.nodeType===$a){let l=!1;const o=t.childNodes,a=o.length;s===a&&(l=!0,s=a-1);let u=o[s],c=!1;if(u===i._blockCursorElement?(u=o[s+1],c=!0):i._blockCursorElement!==null&&s--,r=Sl(u),Ce(r))s=Eb(r,l);else{let f=Sl(t);if(f===null)return null;if(ce(f)){s=Math.min(f.getChildrenSize(),s);let d=f.getChildAtIndex(s);if(ce(d)&&function(h,m,p){const g=h.getParent();return p===null||g===null||!g.canBeEmpty()||g!==p.getNode()}(d,0,n)){const h=l?d.getLastDescendant():d.getFirstDescendant();h===null?(f=d,s=0):(d=h,f=ce(d)?d:d.getParentOrThrow())}Ce(d)?(r=d,f=null,s=Eb(d,l)):d!==f&&l&&!c&&s++}else{const d=f.getIndexWithinParent();s=e===0&&It(f)&&Sl(t)===f?d:d+1,f=f.getParentOrThrow()}if(ce(f))return ur(f.__key,s,"element")}}else r=Sl(t);return Ce(r)?ur(r.__key,s,"text"):null}function xb(t,e,n){const i=t.offset,r=t.getNode();if(i===0){const s=r.getPreviousSibling(),l=r.getParent();if(e){if((n||!e)&&s===null&&ce(l)&&l.isInline()){const o=l.getPreviousSibling();Ce(o)&&(t.key=o.__key,t.offset=o.getTextContent().length)}}else ce(s)&&!n&&s.isInline()?(t.key=s.__key,t.offset=s.getChildrenSize(),t.type="element"):Ce(s)&&(t.key=s.__key,t.offset=s.getTextContent().length)}else if(i===r.getTextContent().length){const s=r.getNextSibling(),l=r.getParent();if(e&&ce(s)&&s.isInline())t.key=s.__key,t.offset=0,t.type="element";else if((n||e)&&s===null&&ce(l)&&l.isInline()&&!l.canInsertTextAfter()){const o=l.getNextSibling();Ce(o)&&(t.key=o.__key,t.offset=0)}}}function C4(t,e,n){if(t.type==="text"&&e.type==="text"){const i=t.isBefore(e),r=t.is(e);xb(t,i,r),xb(e,!i,r),r&&(e.key=t.key,e.offset=t.offset,e.type=t.type);const s=nn();if(s.isComposing()&&s._compositionKey!==t.key&&Ie(n)){const l=n.anchor,o=n.focus;Gr(t,l.key,l.offset,l.type),Gr(e,o.key,o.offset,o.type)}}}function N4(t,e,n,i,r,s){if(t===null||n===null||!Fa(r,t,n))return null;const l=Hb(t,e,Ie(s)?s.anchor:null,r);if(l===null)return null;const o=Hb(n,i,Ie(s)?s.focus:null,r);if(o===null)return null;if(l.type==="element"&&o.type==="element"){const a=Sl(t),u=Sl(n);if(It(a)&&It(u))return null}return C4(l,o,s),[l,o]}function L4(t,e,n,i,r,s){const l=Ur(),o=new ms(ur(t,e,r),ur(n,i,s),0,"");return o.dirty=!0,l._selection=o,o}function a8(){const t=ur("root",0,"element"),e=ur("root",0,"element");return new ms(t,e,0,"")}function Vb(){return new af(new Set)}function Jp(t,e,n,i){const r=n._window;if(r===null)return null;const s=i||r.event,l=s?s.type:void 0,o=l==="selectionchange",a=!wh&&(o||l==="beforeinput"||l==="compositionstart"||l==="compositionend"||l==="click"&&s&&s.detail===3||l==="drop"||l===void 0);let u,c,f,d;if(Ie(t)&&!a)return t.clone();if(e===null)return null;if(u=e.anchorNode,c=e.focusNode,f=e.anchorOffset,d=e.focusOffset,o&&Ie(t)&&!Fa(n,u,c))return t.clone();const h=N4(u,f,c,d,n,t);if(h===null)return null;const[m,p]=h;return new ms(m,p,Ie(t)?t.format:0,Ie(t)?t.style:"")}function Ye(){return Ur()._selection}function ao(){return nn()._editorState._selection}function hc(t,e,n,i=1){const r=t.anchor,s=t.focus,l=r.getNode(),o=s.getNode();if(!e.is(l)&&!e.is(o))return;const a=e.__key;if(t.isCollapsed()){const u=r.offset;if(n<=u&&i>0||n<u&&i<0){const c=Math.max(0,u+i);r.set(a,c,"element"),s.set(a,c,"element"),Wb(t)}}else{const u=t.isBackward(),c=u?s:r,f=c.getNode(),d=u?r:s,h=d.getNode();if(e.is(f)){const m=c.offset;(n<=m&&i>0||n<m&&i<0)&&c.set(a,Math.max(0,m+i),"element")}if(e.is(h)){const m=d.offset;(n<=m&&i>0||n<m&&i<0)&&d.set(a,Math.max(0,m+i),"element")}}Wb(t)}function Wb(t){const e=t.anchor,n=e.offset,i=t.focus,r=i.offset,s=e.getNode(),l=i.getNode();if(t.isCollapsed()){if(!ce(s))return;const o=s.getChildrenSize(),a=n>=o,u=a?s.getChildAtIndex(o-1):s.getChildAtIndex(n);if(Ce(u)){let c=0;a&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),i.set(u.__key,c,"text")}}else{if(ce(s)){const o=s.getChildrenSize(),a=n>=o,u=a?s.getChildAtIndex(o-1):s.getChildAtIndex(n);if(Ce(u)){let c=0;a&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(ce(l)){const o=l.getChildrenSize(),a=r>=o,u=a?l.getChildAtIndex(o-1):l.getChildAtIndex(r);if(Ce(u)){let c=0;a&&(c=u.getTextContentSize()),i.set(u.__key,c,"text")}}}}function pc(t,e,n,i,r){let s=null,l=0,o=null;i!==null?(s=i.__key,Ce(i)?(l=i.getTextContentSize(),o="text"):ce(i)&&(l=i.getChildrenSize(),o="element")):r!==null&&(s=r.__key,Ce(r)?o="text":ce(r)&&(o="element")),s!==null&&o!==null?t.set(s,l,o):(l=e.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),t.set(n.__key,l,"element"))}function Yb(t,e,n,i,r){t.type==="text"?(t.key=n,e||(t.offset+=r)):t.offset>i.getIndexWithinParent()&&(t.offset-=1)}function u8(t,e,n,i,r,s,l){const o=i.anchorNode,a=i.focusNode,u=i.anchorOffset,c=i.focusOffset,f=document.activeElement;if(r.has("collaboration")&&f!==s||f!==null&&Hp(f))return;if(!Ie(e))return void(t!==null&&Fa(n,o,a)&&i.removeAllRanges());const d=e.anchor,h=e.focus,m=d.key,p=h.key,g=uc(n,m),v=uc(n,p),b=d.offset,w=h.offset,k=e.format,S=e.style,E=e.isCollapsed();let P=g,M=v,I=!1;if(d.type==="text"){P=oc(g);const ee=d.getNode();I=ee.getFormat()!==k||ee.getStyle()!==S}else Ie(t)&&t.anchor.type==="text"&&(I=!0);var D,z,R,U,W;if(h.type==="text"&&(M=oc(v)),P!==null&&M!==null&&(E&&(t===null||I||Ie(t)&&(t.format!==k||t.style!==S))&&(D=k,z=S,R=b,U=m,W=performance.now(),y4=[D,z,R,U,W]),u!==b||c!==w||o!==P||a!==M||i.type==="Range"&&E||(f!==null&&s.contains(f)||s.focus({preventScroll:!0}),d.type==="element"))){try{i.setBaseAndExtent(P,b,M,w)}catch{}if(!r.has("skip-scroll-into-view")&&e.isCollapsed()&&s!==null&&s===document.activeElement){const ee=e instanceof ms&&e.anchor.type==="element"?P.childNodes[b]||null:i.rangeCount>0?i.getRangeAt(0):null;if(ee!==null){let K;if(ee instanceof Text){const ve=document.createRange();ve.selectNode(ee),K=ve.getBoundingClientRect()}else K=ee.getBoundingClientRect();(function(ve,me,se){const q=se.ownerDocument,J=q.defaultView;if(J===null)return;let{top:Le,bottom:_e}=me,Be=0,Ke=0,de=se;for(;de!==null;){const ge=de===q.body;if(ge)Be=0,Ke=sf(ve).innerHeight;else{const We=de.getBoundingClientRect();Be=We.top,Ke=We.bottom}let pe=0;if(Le<Be?pe=-(Be-Le):_e>Ke&&(pe=_e-Ke),pe!==0)if(ge)J.scrollBy(0,pe);else{const We=de.scrollTop;de.scrollTop+=pe;const ot=de.scrollTop-We;Le-=ot,_e-=ot}if(ge)break;de=rf(de)}})(n,K,s)}}Dh=!0}}function c8(t){let e=Ye()||ao();e===null&&(e=hn().selectEnd()),e.insertNodes(t)}function f8(){const t=Ye();return t===null?"":t.getTextContent()}function Ld(t){t.isCollapsed()||t.removeText();const e=t.anchor;let n=e.getNode(),i=e.offset;for(;!vl(n);)[n,i]=d8(n,i);return i}function d8(t,e){const n=t.getParent();if(!n){const r=on();return hn().append(r),r.select(),[hn(),0]}if(Ce(t)){const r=t.splitText(e);if(r.length===0)return[n,t.getIndexWithinParent()];const s=e===0?0:1;return[n,r[0].getIndexWithinParent()+s]}if(!ce(t)||e===0)return[n,t.getIndexWithinParent()];const i=t.getChildAtIndex(e);if(i){const r=new ms(ur(t.__key,e,"element"),ur(t.__key,e,"element"),0,""),s=t.insertNewAfter(r);s&&s.append(i,...i.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}let vn=null,yn=null,Kn=!1,Od=!1,zu=0;const Gb={characterData:!0,childList:!0,subtree:!0};function Ba(){return Kn||vn!==null&&vn._readOnly}function Wn(){Kn&&He(13)}function O4(){zu>99&&He(14)}function Ur(){return vn===null&&He(15),vn}function nn(){return yn===null&&He(16),yn}function h8(){return yn}function Kb(t,e,n){const i=e.__type,r=function(o,a){const u=o._nodes.get(a);return u===void 0&&He(30,a),u}(t,i);let s=n.get(i);s===void 0&&(s=Array.from(r.transforms),n.set(i,s));const l=s.length;for(let o=0;o<l&&(s[o](e),e.isAttached());o++);}function Zb(t,e){return t!==void 0&&t.__key!==e&&t.isAttached()}function p8(t){return Xp(t,nn()._nodes)}function Xp(t,e){const n=t.type,i=e.get(n);i===void 0&&He(17,n);const r=i.klass;t.type!==r.getType()&&He(18,r.name);const s=r.importJSON(t),l=t.children;if(ce(s)&&Array.isArray(l))for(let o=0;o<l.length;o++){const a=Xp(l[o],e);s.append(a)}return s}function Jb(t,e){const n=vn,i=Kn,r=yn;vn=t,Kn=!0,yn=null;try{return e()}finally{vn=n,Kn=i,yn=r}}function Ms(t,e){const n=t._pendingEditorState,i=t._rootElement,r=t._headless||i===null;if(n===null)return;const s=t._editorState,l=s._selection,o=n._selection,a=t._dirtyType!==js,u=vn,c=Kn,f=yn,d=t._updating,h=t._observer;let m=null;if(t._pendingEditorState=null,t._editorState=n,!r&&a&&h!==null){yn=t,vn=n,Kn=!1,t._updating=!0;try{const E=t._dirtyType,P=t._dirtyElements,M=t._dirtyLeaves;h.disconnect(),m=X5(s,n,t,E,P,M)}catch(E){if(E instanceof Error&&t._onError(E),Od)throw E;return M4(t,null,i,n),t4(t),t._dirtyType=Kl,Od=!0,Ms(t,s),void(Od=!1)}finally{h.observe(i,Gb),t._updating=d,vn=u,Kn=c,yn=f}}n._readOnly||(n._readOnly=!0);const p=t._dirtyLeaves,g=t._dirtyElements,v=t._normalizedNodes,b=t._updateTags,w=t._deferred;a&&(t._dirtyType=js,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set),function(E,P){const M=E._decorators;let I=E._pendingDecorators||M;const D=P._nodeMap;let z;for(z in I)D.has(z)||(I===M&&(I=s4(E)),delete I[z])}(t,n);const k=r?null:ar(t._window);if(t._editable&&k!==null&&(a||o===null||o.dirty)){yn=t,vn=n;try{if(h!==null&&h.disconnect(),a||o===null||o.dirty){const E=t._blockCursorElement;E!==null&&Gp(E,t,i),u8(l,o,t,k,b,i)}G5(t,i,o),h!==null&&h.observe(i,Gb)}finally{yn=f,vn=u}}m!==null&&function(E,P,M,I,D){const z=Array.from(E._listeners.mutation),R=z.length;for(let U=0;U<R;U++){const[W,ee]=z[U],K=P.get(ee);K!==void 0&&W(K,{dirtyLeaves:I,prevEditorState:D,updateTags:M})}}(t,m,b,p,s),Ie(o)||o===null||l!==null&&l.is(o)||t.dispatchCommand(Lp,void 0);const S=t._pendingDecorators;S!==null&&(t._decorators=S,t._pendingDecorators=null,Go("decorator",t,!0,S)),function(E,P,M){const I=Sb(P),D=Sb(M);I!==D&&Go("textcontent",E,!0,D)}(t,e||s,n),Go("update",t,!0,{dirtyElements:g,dirtyLeaves:p,editorState:n,normalizedNodes:v,prevEditorState:e||s,tags:b}),function(E,P){if(E._deferred=[],P.length!==0){const M=E._updating;E._updating=!0;try{for(let I=0;I<P.length;I++)P[I]()}finally{E._updating=M}}}(t,w),function(E){const P=E._updates;if(P.length!==0){const M=P.shift();if(M){const[I,D]=M;I4(E,I,D)}}}(t)}function Go(t,e,n,...i){const r=e._updating;e._updating=n;try{const s=Array.from(e._listeners[t]);for(let l=0;l<s.length;l++)s[l].apply(null,i)}finally{e._updating=r}}function P4(t,e,n){if(t._updating===!1||yn!==t){let r=!1;return t.update(()=>{r=P4(t,e,n)}),r}const i=xp(t);for(let r=4;r>=0;r--)for(let s=0;s<i.length;s++){const l=i[s]._commands.get(e);if(l!==void 0){const o=l[r];if(o!==void 0){const a=Array.from(o),u=a.length;for(let c=0;c<u;c++)if(a[c](n,t)===!0)return!0}}}return!1}function Xb(t,e){const n=t._updates;let i=e||!1;for(;n.length!==0;){const r=n.shift();if(r){const[s,l]=r;let o,a;l!==void 0&&(o=l.onUpdate,a=l.tag,l.skipTransforms&&(i=!0),o&&t._deferred.push(o),a&&t._updateTags.add(a)),s()}}return i}function I4(t,e,n){const i=t._updateTags;let r,s,l=!1,o=!1;n!==void 0&&(r=n.onUpdate,s=n.tag,s!=null&&i.add(s),l=n.skipTransforms||!1,o=n.discrete||!1),r&&t._deferred.push(r);const a=t._editorState;let u=t._pendingEditorState,c=!1;(u===null||u._readOnly)&&(u=t._pendingEditorState=new uf(new Map((u||a)._nodeMap)),c=!0),u._flushSync=o;const f=vn,d=Kn,h=yn,m=t._updating;vn=u,Kn=!1,t._updating=!0,yn=t;try{c&&(t._headless?a._selection!==null&&(u._selection=a._selection.clone()):u._selection=function(b){const w=b.getEditorState()._selection,k=ar(b._window);return Ie(w)||w==null?Jp(w,k,b,null):w.clone()}(t));const g=t._compositionKey;e(),l=Xb(t,l),function(b,w){const k=w.getEditorState()._selection,S=b._selection;if(Ie(S)){const E=S.anchor,P=S.focus;let M;if(E.type==="text"&&(M=E.getNode(),M.selectionTransform(k,S)),P.type==="text"){const I=P.getNode();M!==I&&I.selectionTransform(k,S)}}}(u,t),t._dirtyType!==js&&(l?function(b,w){const k=w._dirtyLeaves,S=b._nodeMap;for(const E of k){const P=S.get(E);Ce(P)&&P.isAttached()&&P.isSimpleText()&&!P.isUnmergeable()&&wb(P)}}(u,t):function(b,w){const k=w._dirtyLeaves,S=w._dirtyElements,E=b._nodeMap,P=Jr(),M=new Map;let I=k,D=I.size,z=S,R=z.size;for(;D>0||R>0;){if(D>0){w._dirtyLeaves=new Set;for(const U of I){const W=E.get(U);Ce(W)&&W.isAttached()&&W.isSimpleText()&&!W.isUnmergeable()&&wb(W),W!==void 0&&Zb(W,P)&&Kb(w,W,M),k.add(U)}if(I=w._dirtyLeaves,D=I.size,D>0){zu++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map;for(const U of z){const W=U[0],ee=U[1];if(W!=="root"&&!ee)continue;const K=E.get(W);K!==void 0&&Zb(K,P)&&Kb(w,K,M),S.set(W,ee)}I=w._dirtyLeaves,D=I.size,z=w._dirtyElements,R=z.size,zu++}w._dirtyLeaves=k,w._dirtyElements=S}(u,t),Xb(t),function(b,w,k,S){const E=b._nodeMap,P=w._nodeMap,M=[];for(const[I]of S){const D=P.get(I);D!==void 0&&(D.isAttached()||(ce(D)&&f4(D,I,E,P,M,S),E.has(I)||S.delete(I),M.push(I)))}for(const I of M)P.delete(I);for(const I of k){const D=P.get(I);D===void 0||D.isAttached()||(E.has(I)||k.delete(I),P.delete(I))}}(a,u,t._dirtyLeaves,t._dirtyElements)),g!==t._compositionKey&&(u._flushSync=!0);const v=u._selection;if(Ie(v)){const b=u._nodeMap,w=v.anchor.key,k=v.focus.key;b.get(w)!==void 0&&b.get(k)!==void 0||He(19)}else Ui(v)&&v._nodes.size===0&&(u._selection=null)}catch(g){return g instanceof Error&&t._onError(g),t._pendingEditorState=a,t._dirtyType=Kl,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),void Ms(t)}finally{vn=f,Kn=d,yn=h,t._updating=m,zu=0}t._dirtyType!==js||function(g,v){const b=v.getEditorState()._selection,w=g._selection;if(w!==null){if(w.dirty||!w.is(b))return!0}else if(b!==null)return!0;return!1}(u,t)?u._flushSync?(u._flushSync=!1,Ms(t)):c&&U5(()=>{Ms(t)}):(u._flushSync=!1,c&&(i.clear(),t._deferred=[],t._pendingEditorState=null))}function ai(t,e,n){t._updating?t._updates.push([e,n]):I4(t,e,n)}class m8 extends of{constructor(e){super(e)}decorate(e,n){He(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function It(t){return t instanceof m8}class Bn extends of{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return D5[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){const e=[];let n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=nn()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){const e=[];let n=this.getFirstChild();for(;n!==null;){if(Ce(n)&&e.push(n),ce(n)){const i=n.getAllTextNodes();e.push(...i)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;ce(e);){const n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;ce(e);){const n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){const n=this.getChildren(),i=n.length;if(e>=i){const s=n[i-1];return ce(s)&&s.getLastDescendant()||s||null}const r=n[e];return ce(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Fn(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&He(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Fn(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&He(96,this.__key),e}getChildAtIndex(e){const n=this.getChildrenSize();let i,r;if(e<n/2){for(i=this.getFirstChild(),r=0;i!==null&&r<=e;){if(r===e)return i;i=i.getNextSibling(),r++}return null}for(i=this.getLastChild(),r=n-1;i!==null&&r>=e;){if(r===e)return i;i=i.getPreviousSibling(),r--}return null}getTextContent(){let e="";const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const s=n[r];e+=s.getTextContent(),ce(s)&&r!==i-1&&!s.isInline()&&(e+=Rr)}return e}getTextContentSize(){let e=0;const n=this.getChildren(),i=n.length;for(let r=0;r<i;r++){const s=n[r];e+=s.getTextContentSize(),ce(s)&&r!==i-1&&!s.isInline()&&(e+=Rr.length)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(e!==""){const n=bb[e];return!!(this.getFormat()&n)}return!1}select(e,n){Wn();const i=Ye();let r=e,s=n;const l=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){const a=this.getFirstChild();if(Ce(a)||ce(a))return a.select(0,0)}else if(!(e!==void 0&&e!==l||n!==void 0&&n!==l)){const a=this.getLastChild();if(Ce(a)||ce(a))return a.select()}}r===void 0&&(r=l),s===void 0&&(s=l);const o=this.__key;return Ie(i)?(i.anchor.set(o,r,"element"),i.focus.set(o,s,"element"),i.dirty=!0,i):L4(o,r,o,s,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?bb[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,i){const r=i.length,s=this.getChildrenSize(),l=this.getWritable(),o=l.__key,a=[],u=[],c=this.getChildAtIndex(e+n);let f=null,d=s-n+r;if(e!==0)if(e===s)f=this.getLastChild();else{const m=this.getChildAtIndex(e);m!==null&&(f=m.getPreviousSibling())}if(n>0){let m=f===null?this.getFirstChild():f.getNextSibling();for(let p=0;p<n;p++){m===null&&He(100);const g=m.getNextSibling(),v=m.__key;Ds(m.getWritable()),u.push(v),m=g}}let h=f;for(let m=0;m<r;m++){const p=i[m];h!==null&&p.is(h)&&(f=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===o&&d--,Ds(g);const v=p.__key;if(h===null)l.__first=v,g.__prev=null;else{const b=h.getWritable();b.__next=v,g.__prev=b.__key}p.__key===o&&He(76),g.__parent=o,a.push(v),h=p}if(e+n===s)h!==null&&(h.getWritable().__next=null,l.__last=h.__key);else if(c!==null){const m=c.getWritable();if(h!==null){const p=h.getWritable();m.__prev=h.__key,p.__next=c.__key}else m.__prev=null}if(l.__size=d,u.length){const m=Ye();if(Ie(m)){const p=new Set(u),g=new Set(a),{anchor:v,focus:b}=m;Qb(v,p,g)&&pc(v,v.getNode(),this,f,c),Qb(b,p,g)&&pc(b,b.getNode(),this,f,c),d!==0||this.canBeEmpty()||ls(this)||this.remove()}}return l}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,n){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,n,i){return!1}}function ce(t){return t instanceof Bn}function Qb(t,e,n){let i=t.getNode();for(;i;){const r=i.__key;if(e.has(r)&&!n.has(r))return!0;i=i.getParent()}return!1}class Ua extends Bn{static getType(){return"root"}static clone(){return new Ua}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){He(51)}getTextContent(){const e=this.__cachedText;return!Ba()&&nn()._dirtyType!==js||e===null?super.getTextContent():e}remove(){He(52)}replace(e){He(53)}insertBefore(e){He(54)}insertAfter(e){He(55)}updateDOM(e,n){return!1}append(...e){for(let n=0;n<e.length;n++){const i=e[n];ce(i)||It(i)||He(56)}return super.append(...e)}static importJSON(e){const n=hn();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Un(t){return t instanceof Ua}function Qp(){return new uf(new Map([["root",new Ua]]))}function D4(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&He(130,n.name),ce(t)){const i=e.children;Array.isArray(i)||He(59,n.name);const r=t.getChildren();for(let s=0;s<r.length;s++){const l=D4(r[s]);i.push(l)}}return e}class uf{constructor(e,n){this._nodeMap=e,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e){return Jb(this,e)}clone(e){const n=new uf(this._nodeMap,e===void 0?this._selection:e);return n._readOnly=!0,n}toJSON(){return Jb(this,()=>({root:D4(hn())}))}}class uo extends Bn{constructor(e){super(e),this.__textFormat=0}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const n=this.getWritable();return n.__textFormat=e,n}hasTextFormat(e){const n=Nr[e];return!!(this.getTextFormat()&n)}static clone(e){return new uo(e.__key)}createDOM(e){const n=document.createElement("p"),i=xo(e.theme,"paragraph");return i!==void 0&&n.classList.add(...i),n}updateDOM(e,n,i){return!1}static importDOM(){return{p:e=>({conversion:g8,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&Di(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r);const s=this.getIndent();s>0&&(n.style.textIndent=20*s+"px")}return{element:n}}static importJSON(e){const n=on();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n.setTextFormat(e.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),type:"paragraph",version:1}}insertNewAfter(e,n){const i=on();i.setTextFormat(e.format);const r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),this.insertAfter(i,n),i}collapseAtStart(){const e=this.getChildren();if(e.length===0||Ce(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function g8(t){const e=on();if(t.style){e.setFormat(t.style.textAlign);const n=parseInt(t.style.textIndent,10)/20;n>0&&e.setIndent(n)}return{node:e}}function on(){return si(new uo)}function as(t){return t instanceof uo}const Nt=0,ju=2,_8=4;function M4(t,e,n,i){const r=t._keyToDOMMap;r.clear(),t._editorState=Qp(),t._pendingEditorState=i,t._compositionKey=null,t._dirtyType=js,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null;const s=t._observer;s!==null&&(s.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",r.set("root",n))}function b8(t){const e=t||{},n=h8(),i=e.theme||{},r=t===void 0?n:e.parentEditor||null,s=e.disableEvents||!1,l=Qp(),o=e.namespace||(r!==null?r._config.namespace:a4()),a=e.editorState,u=[Ua,Zs,za,ja,uo,...e.nodes||[]],{onError:c,html:f}=e,d=e.editable===void 0||e.editable;let h;if(t===void 0&&n!==null)h=n._nodes;else{h=new Map;for(let p=0;p<u.length;p++){let g=u[p],v=null,b=null;if(typeof g!="function"){const E=g;g=E.replace,v=E.with,b=E.withKlass||null}const w=g.getType(),k=g.transform(),S=new Set;k!==null&&S.add(k),h.set(w,{exportDOM:f&&f.export?f.export.get(g):void 0,klass:g,replace:v,replaceWithKlass:b,transforms:S})}}const m=new v8(l,r,h,{disableEvents:s,namespace:o,theme:i},c||console.error,function(p,g){const v=new Map,b=new Set,w=k=>{Object.keys(k).forEach(S=>{let E=v.get(S);E===void 0&&(E=[],v.set(S,E)),E.push(k[S])})};return p.forEach(k=>{const S=k.klass.importDOM;if(S==null||b.has(S))return;b.add(S);const E=S.call(k.klass);E!==null&&w(E)}),g&&w(g),v}(h,f?f.import:void 0),d);return a!==void 0&&(m._pendingEditorState=a,m._dirtyType=Kl),m}class v8{constructor(e,n,i,r,s,l,o){this._parentEditor=n,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=js,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=a4(),this._onError=s,this._htmlConversions=l,this._editable=o,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){const n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){const n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){const n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){const n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,i){i===void 0&&He(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=r.get(e);s===void 0&&He(36,String(e));const l=s[i];return l.add(n),()=>{l.delete(n),s.every(o=>o.size===0)&&r.delete(e)}}registerMutationListener(e,n){this._nodes.get(e.getType())===void 0&&He(37,e.name);const i=this._listeners.mutation;return i.set(n,e),()=>{i.delete(n)}}registerNodeTransformToKlass(e,n){const i=e.getType(),r=this._nodes.get(i);return r===void 0&&He(37,e.name),r.transforms.add(n),r}registerNodeTransform(e,n){const i=this.registerNodeTransformToKlass(e,n),r=[i],s=i.replaceWithKlass;if(s!=null){const a=this.registerNodeTransformToKlass(s,n);r.push(a)}var l,o;return l=this,o=e.getType(),ai(l,()=>{const a=Ur();if(a.isEmpty())return;if(o==="root")return void hn().markDirty();const u=a._nodeMap;for(const[,c]of u)c.markDirty()},l._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{r.forEach(a=>a.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return Ue(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const n=this._rootElement;if(e!==n){const i=xo(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,M4(this,n,e,r),n!==null&&(this._config.disableEvents||Q5(n),i!=null&&n.classList.remove(...i)),e!==null){const s=function(o){const a=o.ownerDocument;return a&&a.defaultView||null}(e),l=e.style;l.userSelect="text",l.whiteSpace="pre-wrap",l.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=Kl,t4(this),this._updateTags.add("history-merge"),Ms(this),this._config.disableEvents||function(o,a){const u=o.ownerDocument,c=Wo.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",E4),Wo.set(u,c||1),o.__lexicalEditor=a;const f=S4(o);for(let d=0;d<Ih.length;d++){const[h,m]=Ih[d],p=typeof m=="function"?g=>{Mb(g)||(Db(g),(a.isEditable()||h==="click")&&m(g,a))}:g=>{if(!Mb(g)&&(Db(g),a.isEditable()))switch(h){case"cut":return Ue(a,Dp,g);case"copy":return Ue(a,Qc,g);case"paste":return Ue(a,Op,g);case"dragstart":return Ue(a,Y2,g);case"dragover":return Ue(a,G2,g);case"dragend":return Ue(a,g5,g);case"focus":return Ue(a,v5,g);case"blur":return Ue(a,y5,g);case"drop":return Ue(a,W2,g)}};o.addEventListener(h,p),f.push(()=>{o.removeEventListener(h,p)})}}(e,this),i!=null&&e.classList.add(...i)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Go("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&He(38),e4(this);const i=this._pendingEditorState,r=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&r.add(s),Ms(this)),this._pendingEditorState=e,this._dirtyType=Kl,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&r.add(s),Ms(this)}parseEditorState(e,n){return function(i,r,s){const l=Qp(),o=vn,a=Kn,u=yn,c=r._dirtyElements,f=r._dirtyLeaves,d=r._cloneNotNeeded,h=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,vn=l,Kn=!1,yn=r;try{const m=r._nodes;Xp(i.root,m),s&&s(),l._readOnly=!0}catch(m){m instanceof Error&&r._onError(m)}finally{r._dirtyElements=c,r._dirtyLeaves=f,r._cloneNotNeeded=d,r._dirtyType=h,vn=o,Kn=a,yn=u}return l}(typeof e=="string"?JSON.parse(e):e,this,n)}update(e,n){ai(this,e,n)}focus(e,n={}){const i=this._rootElement;i!==null&&(i.setAttribute("autocapitalize","off"),ai(this,()=>{const r=Ye(),s=hn();r!==null?r.dirty=!0:s.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?s.selectStart():s.selectEnd())},{onUpdate:()=>{i.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&i.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const n=ar(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Go("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}const y8=new Map;function w8(t){const e={},n=t.split(";");for(const i of n)if(i!==""){const[r,s]=i.split(/:([^]+)/);r&&s&&(e[r.trim()]=s.trim())}return e}function R4(t){const e=t.constructor.clone(t);return e.__parent=t.__parent,e.__next=t.__next,e.__prev=t.__prev,ce(t)&&ce(e)?(i=t,(n=e).__first=i.__first,n.__last=i.__last,n.__size=i.__size,n.__format=i.__format,n.__indent=i.__indent,n.__dir=i.__dir,n):Ce(t)&&Ce(e)?function(r,s){return r.__format=s.__format,r.__style=s.__style,r.__mode=s.__mode,r.__detail=s.__detail,r}(e,t):as(t)&&as(e)?function(r,s){return r.__textFormat=s.__textFormat,r}(e,t):e;var n,i}function $4(t,e){const n=t.getStartEndPoints();if(e.isSelected(t)&&!e.isSegmented()&&!e.isToken()&&n!==null){const[i,r]=n,s=t.isBackward(),l=i.getNode(),o=r.getNode(),a=e.is(l),u=e.is(o);if(a||u){const[c,f]=$h(t),d=l.is(o),h=e.is(s?o:l),m=e.is(s?l:o);let p,g=0;return d?(g=c>f?f:c,p=c>f?c:f):h?(g=s?f:c,p=void 0):m&&(g=0,p=s?c:f),e.__text=e.__text.slice(g,p),e}}return e}function k8(t){const e=t.getStyle(),n=w8(e);y8.set(e,n)}function Pd(t,e){if(t===null)return;const n=t.getStartEndPoints(),i=n?n[0]:null;if(i!==null&&i.key==="root"){const l=e(),o=hn(),a=o.getFirstChild();return void(a?a.replace(l,!0):o.append(l))}const r=t.getNodes(),s=i!==null&&function(l,o){let a=l;for(;a!==null&&a.getParent()!==null&&!o(a);)a=a.getParentOrThrow();return o(a)?a:null}(i.getNode(),n1);s&&r.indexOf(s)===-1&&r.push(s);for(let l=0;l<r.length;l++){const o=r[l];if(!n1(o))continue;if(!ce(o))throw Error("Expected block node to be an ElementNode");const a=e();a.setFormat(o.getFormatType()),a.setIndent(o.getIndent()),o.replace(a,!0)}}function e1(t,e){const n=ua(t.focus,e);return It(n)&&!n.isIsolated()||ce(n)&&!n.isInline()&&!n.canBeEmpty()}function S8(t,e,n,i){t.modify(e?"extend":"move",n,i)}function E8(t){const e=t.anchor.getNode();return(Un(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}function t1(t,e,n){const i=E8(t);S8(t,e,n?!i:i,"character")}function n1(t){if(It(t)||!ce(t)||ls(t))return!1;const e=t.getFirstChild(),n=e===null||Lr(e)||Ce(e)||e.isInline();return!t.isInline()&&t.canBeEmpty()!==!1&&n}var T8=function(t){const e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const F4=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,A8=F4&&"documentMode"in document?document.documentMode:null;!(!F4||!("InputEvent"in window)||A8)&&"getTargetRanges"in new window.InputEvent("input");function z4(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}function j4(...t){return()=>{t.forEach(e=>e())}}function Li(t,...e){const n=z4(...e);n.length>0&&t.classList.add(...n)}function em(t,...e){const n=z4(...e);n.length>0&&t.classList.remove(...n)}function Bu(t,e){let n=t;for(;n!=null;){if(n instanceof e)return n;n=n.getParent()}return null}function B4(t){const e=tm(t,n=>ce(n)&&!n.isInline());return ce(e)||T8(4,t.__key),e}const tm=(t,e)=>{let n=t;for(;n!==hn()&&n!=null;){if(e(n))return n;n=n.getParent()}return null};function As(t,e){return t!==null&&Object.getPrototypeOf(t).constructor.name===e.name}const i1=t=>t!=null&&window.Prism.languages.hasOwnProperty(t)?t:void 0;function U4(t,e){for(const n of t.childNodes){if(Di(n)&&n.tagName===e)return!0;U4(n,e)}return!1}const Uo="data-highlight-language";let cf=class q4 extends Bn{static getType(){return"code"}static clone(e){return new q4(e.__language,e.__key)}constructor(e,n){super(n),this.__language=i1(e)}createDOM(e){const n=document.createElement("code");Li(n,e.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();return i&&n.setAttribute(Uo,i),n}updateDOM(e,n,i){const r=this.__language,s=e.__language;return r?r!==s&&n.setAttribute(Uo,r):s&&n.removeAttribute(Uo),!1}exportDOM(e){const n=document.createElement("pre");Li(n,e._config.theme.code),n.setAttribute("spellcheck","false");const i=this.getLanguage();return i&&n.setAttribute(Uo,i),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||U4(e,"BR"))?{conversion:r1,priority:1}:null,div:e=>({conversion:C8,priority:1}),pre:e=>({conversion:r1,priority:0}),table:e=>Id(e)?{conversion:N8,priority:3}:null,td:e=>{const n=e,i=n.closest("table");return n.classList.contains("js-file-line")?{conversion:L8,priority:3}:i&&Id(i)?{conversion:s1,priority:3}:null},tr:e=>{const n=e.closest("table");return n&&Id(n)?{conversion:s1,priority:3}:null}}}static importJSON(e){const n=Js(e.language);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,n=!0){const i=this.getChildren(),r=i.length;if(r>=2&&i[r-1].getTextContent()===`
|
|
24
|
+
`&&i[r-2].getTextContent()===`
|
|
25
|
+
`&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){i[r-1].remove(),i[r-2].remove();const a=on();return this.insertAfter(a,n),a}const{anchor:s,focus:l}=e,o=(s.isBefore(l)?s:l).getNode();if(Ce(o)){let a=O8(o);const u=[];for(;;)if(Zp(a))u.push(oo()),a=a.getNextSibling();else{if(!W4(a))break;{let g=0;const v=a.getTextContent(),b=a.getTextContentSize();for(;g<b&&v[g]===" ";)g++;if(g!==0&&u.push(V4(" ".repeat(g))),g!==b)break;a=a.getNextSibling()}}const c=o.splitText(s.offset)[0],f=s.offset===0?0:1,d=c.getIndexWithinParent()+f,h=o.getParentOrThrow(),m=[Vi(),...u];h.splice(d,0,m);const p=u[u.length-1];p?p.select():s.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(H4(o)){const{offset:a}=e.anchor;o.splice(a,0,[Vi()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const e=on();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}setLanguage(e){this.getWritable().__language=i1(e)}getLanguage(){return this.getLatest().__language}};function Js(t){return si(new cf(t))}function H4(t){return t instanceof cf}function r1(t){let e;return Di(t)&&(e=t.getAttribute(Uo)),{node:Js(e)}}function C8(t){const e=t,n=l1(e);return n||function(i){let r=i.parentElement;for(;r!==null;){if(l1(r))return!0;r=r.parentElement}return!1}(e)?{after:i=>{const r=t.parentNode;return r!=null&&t!==r.lastChild&&i.push(Vi()),i},node:n?Js():null}:{node:null}}function N8(){return{node:Js()}}function s1(){return{node:null}}function L8(t){const e=t;return{after:n=>(e.parentNode&&e.parentNode.nextSibling&&n.push(Vi()),n),node:null}}function l1(t){return t.style.fontFamily.match("monospace")!==null}function Id(t){return t.classList.contains("js-file-line-container")}let nm=class x4 extends Zs{constructor(e,n,i){super(e,i),this.__highlightType=n}static getType(){return"code-highlight"}static clone(e){return new x4(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}canHaveFormat(){return!1}createDOM(e){const n=super.createDOM(e),i=Dd(e.theme,this.__highlightType);return Li(n,i),n}updateDOM(e,n,i){const r=super.updateDOM(e,n,i),s=Dd(i.theme,e.__highlightType),l=Dd(i.theme,this.__highlightType);return s!==l&&(s&&em(n,s),l&&Li(n,l)),r}static importJSON(e){const n=V4(e.text,e.highlightType);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return Js()}};function Dd(t,e){return e&&t&&t.codeHighlight&&t.codeHighlight[e]}function V4(t,e){return si(new nm(t,e))}function W4(t){return t instanceof nm}function O8(t){let e=t,n=t;for(;W4(n)||Zp(n);)e=n,n=n.getPreviousSibling();return e}const bu=0,Fh=1,zh=2,Bi=0,P8=1,o1=2,I8=3,D8=4;function M8(t,e,n,i,r){if(t===null||n.size===0&&i.size===0&&!r)return Bi;const s=e._selection,l=t._selection;if(r)return P8;if(!(Ie(s)&&Ie(l)&&l.isCollapsed()&&s.isCollapsed()))return Bi;const o=function(v,b,w){const k=v._nodeMap,S=[];for(const E of b){const P=k.get(E);P!==void 0&&S.push(P)}for(const[E,P]of w){if(!P)continue;const M=k.get(E);M===void 0||Un(M)||S.push(M)}return S}(e,n,i);if(o.length===0)return Bi;if(o.length>1){const v=e._nodeMap,b=v.get(s.anchor.key),w=v.get(l.anchor.key);return b&&w&&!t._nodeMap.has(b.__key)&&Ce(b)&&b.__text.length===1&&s.anchor.offset===1?o1:Bi}const a=o[0],u=t._nodeMap.get(a.__key);if(!Ce(u)||!Ce(a)||u.__mode!==a.__mode)return Bi;const c=u.__text,f=a.__text;if(c===f)return Bi;const d=s.anchor,h=l.anchor;if(d.key!==h.key||d.type!=="text")return Bi;const m=d.offset,p=h.offset,g=f.length-c.length;return g===1&&p===m-1?o1:g===-1&&p===m+1?I8:g===-1&&p===m?D8:Bi}function R8(t,e){let n=Date.now(),i=Bi;return(r,s,l,o,a,u)=>{const c=Date.now();if(u.has("historic"))return i=Bi,n=c,zh;const f=M8(r,s,o,a,t.isComposing()),d=(()=>{const h=l===null||l.editor===t,m=u.has("history-push");if(!m&&h&&u.has("history-merge"))return bu;if(r===null)return Fh;const p=s._selection;return o.size>0||a.size>0?m===!1&&f!==Bi&&f===i&&c<n+e&&h||o.size===1&&function(g,v,b){const w=v._nodeMap.get(g),k=b._nodeMap.get(g),S=v._selection,E=b._selection;let P=!1;return Ie(S)&&Ie(E)&&(P=S.anchor.type==="element"&&S.focus.type==="element"&&E.anchor.type==="text"&&E.focus.type==="text"),!(P||!Ce(w)||!Ce(k))&&w.__type===k.__type&&w.__text===k.__text&&w.__mode===k.__mode&&w.__detail===k.__detail&&w.__style===k.__style&&w.__format===k.__format&&w.__parent===k.__parent}(Array.from(o)[0],r,s)?bu:Fh:p!==null?bu:zh})();return n=c,i=f,d}}function a1(t){t.undoStack=[],t.redoStack=[],t.current=null}function $8(t,e,n){const i=R8(t,n),r=({editorState:o,prevEditorState:a,dirtyLeaves:u,dirtyElements:c,tags:f})=>{const d=e.current,h=e.redoStack,m=e.undoStack,p=d===null?null:d.editorState;if(d!==null&&o===p)return;const g=i(a,o,d,u,c,f);if(g===Fh)h.length!==0&&(e.redoStack=[],t.dispatchCommand(mu,!1)),d!==null&&(m.push({...d}),t.dispatchCommand(gu,!0));else if(g===zh)return;e.current={editor:t,editorState:o}},s=j4(t.registerCommand(Pp,()=>(function(o,a){const u=a.redoStack,c=a.undoStack;if(c.length!==0){const f=a.current,d=c.pop();f!==null&&(u.push(f),o.dispatchCommand(mu,!0)),c.length===0&&o.dispatchCommand(gu,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:"historic"})}}(t,e),!0),Nt),t.registerCommand(Ip,()=>(function(o,a){const u=a.redoStack,c=a.undoStack;if(u.length!==0){const f=a.current;f!==null&&(c.push(f),o.dispatchCommand(gu,!0));const d=u.pop();u.length===0&&o.dispatchCommand(mu,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:"historic"})}}(t,e),!0),Nt),t.registerCommand(_5,()=>(a1(e),!1),Nt),t.registerCommand(b5,()=>(a1(e),t.dispatchCommand(mu,!1),t.dispatchCommand(gu,!1),!0),Nt),t.registerUpdateListener(r)),l=t.registerUpdateListener(r);return()=>{s(),l()}}function F8(){return{current:null,redoStack:[],undoStack:[]}}const z8=new Set(["http:","https:","mailto:","sms:","tel:"]);let Zl=class Y4 extends Bn{static getType(){return"link"}static clone(e){return new Y4(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,n={},i){super(i);const{target:r=null,rel:s=null,title:l=null}=n;this.__url=e,this.__target=r,this.__rel=s,this.__title=l}createDOM(e){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),Li(n,e.theme.link),n}updateDOM(e,n,i){const r=this.__url,s=this.__target,l=this.__rel,o=this.__title;return r!==e.__url&&(n.href=r),s!==e.__target&&(s?n.target=s:n.removeAttribute("target")),l!==e.__rel&&(l?n.rel=l:n.removeAttribute("rel")),o!==e.__title&&(o?n.title=o:n.removeAttribute("title")),!1}static importDOM(){return{a:e=>({conversion:j8,priority:1})}}static importJSON(e){const n=da(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}sanitizeUrl(e){try{const n=new URL(e);if(!z8.has(n.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){const i=da(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,n),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,i){if(!Ie(n))return!1;const r=n.anchor.getNode(),s=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(s)&&n.getTextContent().length>0}};function j8(t){let e=null;if(K5(t)){const n=t.textContent;(n!==null&&n!==""||t.children.length>0)&&(e=da(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function da(t,e){return si(new Zl(t,e))}function Es(t){return t instanceof Zl}const jh=Xc();function B8(t,e={}){const{target:n,title:i}=e,r=e.rel===void 0?"noreferrer":e.rel,s=Ye();if(!Ie(s))return;const l=s.extract();if(t===null)l.forEach(o=>{const a=o.getParent();if(Es(a)){const u=a.getChildren();for(let c=0;c<u.length;c++)a.insertBefore(u[c]);a.remove()}});else{if(l.length===1){const u=function(c,f){let d=c;for(;d!==null&&d.getParent()!==null&&!f(d);)d=d.getParentOrThrow();return f(d)?d:null}(l[0],Es);if(u!==null)return u.setURL(t),n!==void 0&&u.setTarget(n),r!==null&&u.setRel(r),void(i!==void 0&&u.setTitle(i))}let o=null,a=null;l.forEach(u=>{const c=u.getParent();if(c!==a&&c!==null&&(!ce(u)||u.isInline())){if(Es(c))return a=c,c.setURL(t),n!==void 0&&c.setTarget(n),r!==null&&a.setRel(r),void(i!==void 0&&a.setTitle(i));if(c.is(o)||(o=c,a=da(t,{rel:r,target:n,title:i}),Es(c)?u.getPreviousSibling()===null?c.insertBefore(a):c.insertAfter(a):u.insertBefore(a)),Es(u)){if(u.is(a))return;if(a!==null){const f=u.getChildren();for(let d=0;d<f.length;d++)a.append(f[d])}u.remove()}else a!==null&&a.append(u)}})}}var El=function(t){const e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};function U8(t){let e=1,n=t.getParent();for(;n!=null;){if(tn(n)){const i=n.getParent();if(yt(i)){e++,n=i.getParent();continue}El(40)}return e}return e}function tr(t){return tn(t)&&yt(t.getFirstChild())}function u1(t){return Wi().append(t)}function q8(t,e){return tn(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function c1(t,e){t.update(()=>{const n=Ye();if(n!==null){const i=n.getNodes();if(Ie(n)){const s=n.getStartEndPoints();s===null&&El(143);const[l]=s,o=l.getNode(),a=o.getParent();if(q8(o,i)){const u=Zn(e);if(ls(a)){o.replace(u);const c=Wi();ce(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),u.append(c)}else if(tn(o)){const c=o.getParentOrThrow();Jl(u,c.getChildren()),c.replace(u)}return}}const r=new Set;for(let s=0;s<i.length;s++){const l=i[s];if(!ce(l)||!l.isEmpty()||tn(l)||r.has(l.getKey())){if(H5(l)){let o=l.getParent();for(;o!=null;){const a=o.getKey();if(yt(o)){if(!r.has(a)){const u=Zn(e);Jl(u,o.getChildren()),o.replace(u),r.add(a)}break}{const u=o.getParent();if(ls(u)&&!r.has(a)){r.add(a),f1(o,e);break}o=u}}}}else f1(l,e)}}})}function Jl(t,e){t.splice(t.getChildrenSize(),0,e)}function f1(t,e){if(yt(t))return t;const n=t.getPreviousSibling(),i=t.getNextSibling(),r=Wi();if(r.setFormat(t.getFormatType()),r.setIndent(t.getIndent()),Jl(r,t.getChildren()),yt(n)&&e===n.getListType())return n.append(r),t.remove(),yt(i)&&e===i.getListType()&&(Jl(n,i.getChildren()),i.remove()),n;if(yt(i)&&e===i.getListType())return i.getFirstChildOrThrow().insertBefore(r),t.remove(),i;{const s=Zn(e);return s.append(r),t.replace(s),s}}function im(t,e){const n=t.getLastChild(),i=e.getFirstChild();n&&i&&tr(n)&&tr(i)&&(im(n.getFirstChild(),i.getFirstChild()),i.remove());const r=e.getChildren();r.length>0&&t.append(...r),e.remove()}function H8(t){const e=new Set;if(tr(t)||e.has(t.getKey()))return;const n=t.getParent(),i=t.getNextSibling(),r=t.getPreviousSibling();if(tr(i)&&tr(r)){const s=r.getFirstChild();if(yt(s)){s.append(t);const l=i.getFirstChild();yt(l)&&(Jl(s,l.getChildren()),i.remove(),e.add(i.getKey()))}}else if(tr(i)){const s=i.getFirstChild();if(yt(s)){const l=s.getFirstChild();l!==null&&l.insertBefore(t)}}else if(tr(r)){const s=r.getFirstChild();yt(s)&&s.append(t)}else if(yt(n)){const s=Wi(),l=Zn(n.getListType());s.append(l),l.append(t),r?r.insertAfter(s):i?i.insertBefore(s):n.append(s)}}function x8(t){if(tr(t))return;const e=t.getParent(),n=e?e.getParent():void 0;if(yt(n?n.getParent():void 0)&&tn(n)&&yt(e)){const i=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(t.is(i))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(r))n.insertAfter(t),e.isEmpty()&&n.remove();else{const s=e.getListType(),l=Wi(),o=Zn(s);l.append(o),t.getPreviousSiblings().forEach(c=>o.append(c));const a=Wi(),u=Zn(s);a.append(u),Jl(u,t.getNextSiblings()),n.insertBefore(l),n.insertAfter(a),n.replace(t)}}}function mc(...t){const e=[];for(const n of t)if(n&&typeof n=="string")for(const[i]of n.matchAll(/\S+/g))e.push(i);return e}let qa=class G4 extends Bn{static getType(){return"listitem"}static clone(e){return new G4(e.__value,e.__checked,e.__key)}constructor(e,n,i){super(i),this.__value=e===void 0?1:e,this.__checked=n}createDOM(e){const n=document.createElement("li"),i=this.getParent();return yt(i)&&i.getListType()==="check"&&h1(n,this,null),n.value=this.__value,d1(n,e.theme,this),n}updateDOM(e,n,i){const r=this.getParent();return yt(r)&&r.getListType()==="check"&&h1(n,this,e),n.value=this.__value,d1(n,i.theme,this),!1}static transform(){return e=>{if(tn(e)||El(144),e.__checked==null)return;const n=e.getParent();yt(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)}}static importDOM(){return{li:e=>({conversion:V8,priority:0})}}static importJSON(e){const n=Wi();return n.setChecked(e.checked),n.setValue(e.value),n.setFormat(e.format),n.setDirection(e.direction),n}exportDOM(e){const n=this.createDOM(e._config);return n.style.textAlign=this.getFormatType(),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(ce(i)&&this.canMergeWith(i)){const r=i.getChildren();this.append(...r),i.remove()}else super.append(i)}return this}replace(e,n){if(tn(e))return super.replace(e);this.setIndent(0);const i=this.getParentOrThrow();if(!yt(i))return e;if(i.__first===this.getKey())i.insertBefore(e);else if(i.__last===this.getKey())i.insertAfter(e);else{const r=Zn(i.getListType());let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),r.append(l)}i.insertAfter(e),e.insertAfter(r)}return n&&(ce(e)||El(139),this.getChildren().forEach(r=>{e.append(r)})),this.remove(),i.getChildrenSize()===0&&i.remove(),e}insertAfter(e,n=!0){const i=this.getParentOrThrow();if(yt(i)||El(39),tn(e))return super.insertAfter(e,n);const r=this.getNextSiblings();if(i.insertAfter(e,n),r.length!==0){const s=Zn(i.getListType());r.forEach(l=>s.append(l)),e.insertAfter(s,n)}return e}remove(e){const n=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),n&&i&&tr(n)&&tr(i)&&(im(n.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(e,n=!0){const i=Wi(this.__checked==null&&void 0);return this.insertAfter(i,n),i}collapseAtStart(e){const n=on();this.getChildren().forEach(l=>n.append(l));const i=this.getParentOrThrow(),r=i.getParentOrThrow(),s=tn(r);if(i.getChildrenSize()===1)if(s)i.remove(),r.select();else{i.insertBefore(n),i.remove();const l=e.anchor,o=e.focus,a=n.getKey();l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element"),o.type==="element"&&o.getNode().is(this)&&o.set(a,o.offset,"element")}else i.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const e=this.getParent();if(e===null)return this.getLatest().__indent;let n=e.getParentOrThrow(),i=0;for(;tn(n);)n=n.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){typeof e=="number"&&e>-1||El(117);let n=this.getIndent();for(;n!==e;)n<e?(H8(this),n++):(x8(this),n--);return this}canInsertAfter(e){return tn(e)}canReplaceWith(e){return tn(e)}canMergeWith(e){return as(e)||tn(e)}extractWithChild(e,n){if(!Ie(n))return!1;const i=n.anchor.getNode(),r=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Zn("bullet")}};function d1(t,e,n){const i=[],r=[],s=e.list,l=s?s.listitem:void 0;let o;if(s&&s.nested&&(o=s.nested.listitem),l!==void 0&&i.push(...mc(l)),s){const a=n.getParent(),u=yt(a)&&a.getListType()==="check",c=n.getChecked();u&&!c||r.push(s.listitemUnchecked),u&&c||r.push(s.listitemChecked),u&&i.push(c?s.listitemChecked:s.listitemUnchecked)}if(o!==void 0){const a=mc(o);n.getChildren().some(u=>yt(u))?i.push(...a):r.push(...a)}r.length>0&&em(t,...r),i.length>0&&Li(t,...i)}function h1(t,e,n,i){yt(e.getFirstChild())?(t.removeAttribute("role"),t.removeAttribute("tabIndex"),t.removeAttribute("aria-checked")):(t.setAttribute("role","checkbox"),t.setAttribute("tabIndex","-1"),n&&e.__checked===n.__checked||t.setAttribute("aria-checked",e.getChecked()?"true":"false"))}function V8(t){return{node:Wi(Di(t)&&t.getAttribute("aria-checked")==="true")}}function Wi(t){return si(new qa(void 0,t))}function tn(t){return t instanceof qa}let co=class K4 extends Bn{static getType(){return"list"}static clone(e){const n=e.__listType||g1[e.__tag];return new K4(n,e.__start,e.__key)}constructor(e,n,i){super(i);const r=g1[e]||e;this.__listType=r,this.__tag=r==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(e){const n=this.getWritable();n.__listType=e,n.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,n){const i=this.__tag,r=document.createElement(i);return this.__start!==1&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,p1(r,e.theme,this),r}updateDOM(e,n,i){return e.__tag!==this.__tag||(p1(n,i.theme,this),!1)}static transform(){return e=>{if(!yt(e))throw Error("node is not a ListNode");(function(n){const i=n.getNextSibling();yt(i)&&n.getListType()===i.getListType()&&im(n,i)})(e),function(n){const i=n.getListType()!=="check";let r=n.getStart();for(const s of n.getChildren())tn(s)&&(s.getValue()!==r&&s.setValue(r),i&&s.getChecked()!=null&&s.setChecked(void 0),yt(s.getFirstChild())||r++)}(e)}}static importDOM(){return{ol:e=>({conversion:m1,priority:0}),ul:e=>({conversion:m1,priority:0})}}static importJSON(e){const n=Zn(e.listType,e.start);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportDOM(e){const{element:n}=super.exportDOM(e);return n&&Di(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let n=0;n<e.length;n++){const i=e[n];if(tn(i))super.append(i);else{const r=Wi();if(yt(i))r.append(i);else if(ce(i)){const s=ln(i.getTextContent());r.append(s)}else r.append(i);super.append(r)}}return this}extractWithChild(e){return tn(e)}};function p1(t,e,n){const i=[],r=[],s=e.list;if(s!==void 0){const l=s[`${n.__tag}Depth`]||[],o=U8(n)-1,a=o%l.length,u=l[a],c=s[n.__tag];let f;const d=s.nested,h=s.checklist;if(d!==void 0&&d.list&&(f=d.list),c!==void 0&&i.push(c),h!==void 0&&n.__listType==="check"&&i.push(h),u!==void 0){i.push(...mc(u));for(let m=0;m<l.length;m++)m!==a&&r.push(n.__tag+m)}if(f!==void 0){const m=mc(f);o>1?i.push(...m):r.push(...m)}}r.length>0&&em(t,...r),i.length>0&&Li(t,...i)}function W8(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n];if(tn(i)){e.push(i);const r=i.getChildren();r.length>1&&r.forEach(s=>{yt(s)&&e.push(u1(s))})}else e.push(u1(i))}return e}function m1(t){const e=t.nodeName.toLowerCase();let n=null;return e==="ol"?n=Zn("number",t.start):e==="ul"&&(n=Di(t)&&t.getAttribute("__lexicallisttype")==="check"?Zn("check"):Zn("bullet")),{after:W8,node:n}}const g1={ol:"number",ul:"bullet"};function Zn(t,e=1){return si(new co(t,e))}function yt(t){return t instanceof co}const Z4=Xc(),J4=Xc();function Y8(t,e){const n=e.body?e.body.childNodes:[];let i=[];for(let r=0;r<n.length;r++){const s=n[r];if(!Q4.has(s.nodeName)){const l=eS(s,t);l!==null&&(i=i.concat(l))}}return i}function G8(t,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),i=hn().getChildren();for(let r=0;r<i.length;r++)X4(t,i[r],n,e);return n.innerHTML}function X4(t,e,n,i=null){let r=i===null||e.isSelected(i);const s=ce(e)&&e.excludeFromCopy("html");let l=e;if(i!==null){let h=R4(e);h=Ce(h)&&i!==null?$4(i,h):h,l=h}const o=ce(l)?l.getChildren():[],a=t._nodes.get(l.getType());let u;u=a&&a.exportDOM!==void 0?a.exportDOM(t,l):l.exportDOM(t);const{element:c,after:f}=u;if(!c)return!1;const d=document.createDocumentFragment();for(let h=0;h<o.length;h++){const m=o[h],p=X4(t,m,d,i);!r&&ce(e)&&p&&e.extractWithChild(m,i,"html")&&(r=!0)}if(r&&!s){if(Di(c)&&c.append(d),n.append(c),f){const h=f.call(l,c);h&&c.replaceWith(h)}}else n.append(d);return r}const Q4=new Set(["STYLE","SCRIPT"]);function eS(t,e,n=new Map,i){let r=[];if(Q4.has(t.nodeName))return r;let s=null;const l=function(f,d){const{nodeName:h}=f,m=d._htmlConversions.get(h.toLowerCase());let p=null;if(m!==void 0)for(const g of m){const v=g(f);v!==null&&(p===null||(p.priority||0)<(v.priority||0))&&(p=v)}return p!==null?p.conversion:null}(t,e),o=l?l(t):null;let a=null;if(o!==null){a=o.after;const f=o.node;if(s=Array.isArray(f)?f[f.length-1]:f,s!==null){for(const[,d]of n)if(s=d(s,i),!s)break;s&&r.push(...Array.isArray(f)?f:[s])}o.forChild!=null&&n.set(t.nodeName,o.forChild)}const u=t.childNodes;let c=[];for(let f=0;f<u.length;f++)c.push(...eS(u[f],e,new Map(n),s));return a!=null&&(c=a(c)),s==null?r=r.concat(c):ce(s)&&s.append(...c),r}var _1=function(t){const e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const K8=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,tS=t=>K8?(t||window).getSelection():null;function Z8(t){const e=Ye();if(e==null)throw Error("Expected valid LexicalSelection");return Ie(e)&&e.isCollapsed()||e.getNodes().length===0?"":G8(t,e)}function J8(t){const e=Ye();if(e==null)throw Error("Expected valid LexicalSelection");return Ie(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(X8(t,e))}function b1(t,e,n){const i=t.getData("application/x-lexical-editor");if(i)try{const l=JSON.parse(i);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes))return v1(n,Q8(l.nodes),e)}catch{}const r=t.getData("text/html");if(r)try{const l=new DOMParser().parseFromString(r,"text/html");return v1(n,Y8(n,l),e)}catch{}const s=t.getData("text/plain")||t.getData("text/uri-list");if(s!=null)if(Ie(e)){const l=s.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let o=0;o<l.length;o++){const a=l[o];a===`
|
|
26
|
+
`||a===`\r
|
|
27
|
+
`?e.insertParagraph():a===" "?e.insertNodes([oo()]):e.insertText(a)}}else e.insertRawText(s)}function v1(t,e,n){t.dispatchCommand(a5,{nodes:e,selection:n})||n.insertNodes(e)}function nS(t,e,n,i=[]){let r=e===null||n.isSelected(e);const s=ce(n)&&n.excludeFromCopy("html");let l=n;if(e!==null){let u=R4(n);u=Ce(u)&&e!==null?$4(e,u):u,l=u}const o=ce(l)?l.getChildren():[],a=function(u){const c=u.exportJSON(),f=u.constructor;if(c.type!==f.getType()&&_1(58,f.name),ce(u)){const d=c.children;Array.isArray(d)||_1(59,f.name)}return c}(l);if(Ce(l)){const u=l.__text;u.length>0?a.text=u:r=!1}for(let u=0;u<o.length;u++){const c=o[u],f=nS(t,e,c,a.children);!r&&ce(n)&&f&&n.extractWithChild(c,e,"clone")&&(r=!0)}if(r&&!s)i.push(a);else if(Array.isArray(a.children))for(let u=0;u<a.children.length;u++){const c=a.children[u];i.push(c)}return r}function X8(t,e){const n=[],i=hn().getChildren();for(let r=0;r<i.length;r++)nS(t,e,i[r],n);return{namespace:t._config.namespace,nodes:n}}function Q8(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=p8(i);Ce(r)&&k8(r),e.push(r)}return e}let dl=null;async function y1(t,e){if(dl!==null)return!1;if(e!==null)return new Promise((o,a)=>{t.update(()=>{o(w1(t,e))})});const n=t.getRootElement(),i=t._window==null?window.document:t._window.document,r=tS(t._window);if(n===null||r===null)return!1;const s=i.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(i.createTextNode("#")),n.append(s);const l=new Range;return l.setStart(s,0),l.setEnd(s,1),r.removeAllRanges(),r.addRange(l),new Promise((o,a)=>{const u=t.registerCommand(Qc,c=>(As(c,ClipboardEvent)&&(u(),dl!==null&&(window.clearTimeout(dl),dl=null),o(w1(t,c))),!0),_8);dl=window.setTimeout(()=>{u(),dl=null,o(!1)},50),i.execCommand("copy"),s.remove()})}function w1(t,e){const n=tS(t._window);if(!n)return!1;const i=n.anchorNode,r=n.focusNode;if(i!==null&&r!==null&&!Fa(t,i,r))return!1;e.preventDefault();const s=e.clipboardData,l=Ye();if(s===null||l===null)return!1;const o=Z8(t),a=J8(t);let u="";return l!==null&&(u=l.getTextContent()),o!==null&&s.setData("text/html",o),a!==null&&s.setData("application/x-lexical-editor",a),s.setData("text/plain",u),!0}function k1(t,e){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(t,e);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(t,e);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const fo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,eP=fo&&"documentMode"in document?document.documentMode:null,tP=!(!fo||!("InputEvent"in window)||eP)&&"getTargetRanges"in new window.InputEvent("input"),nP=fo&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),iP=fo&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rP=fo&&/^(?=.*Chrome).*/i.test(navigator.userAgent),sP=fo&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!rP,S1=Xc();let ff=class iS extends Bn{static getType(){return"quote"}static clone(e){return new iS(e.__key)}constructor(e){super(e)}createDOM(e){const n=document.createElement("blockquote");return Li(n,e.theme.quote),n}updateDOM(e,n){return!1}static importDOM(){return{blockquote:e=>({conversion:lP,priority:0})}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&Di(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){const n=df();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,n){const i=on(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,n),i}collapseAtStart(){const e=on();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}};function df(){return si(new ff)}function gc(t){return t instanceof ff}let hf=class rS extends Bn{static getType(){return"heading"}static clone(e){return new rS(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}createDOM(e){const n=this.__tag,i=document.createElement(n),r=e.theme.heading;if(r!==void 0){const s=r[n];Li(i,s)}return i}updateDOM(e,n){return!1}static importDOM(){return{h1:e=>({conversion:hl,priority:0}),h2:e=>({conversion:hl,priority:0}),h3:e=>({conversion:hl,priority:0}),h4:e=>({conversion:hl,priority:0}),h5:e=>({conversion:hl,priority:0}),h6:e=>({conversion:hl,priority:0}),p:e=>{const n=e.firstChild;return n!==null&&E1(n)?{conversion:()=>({node:null}),priority:3}:null},span:e=>E1(e)?{conversion:n=>({node:Cs("h1")}),priority:3}:null}}exportDOM(e){const{element:n}=super.exportDOM(e);if(n&&Di(n)){this.isEmpty()&&n.append(document.createElement("br"));const i=this.getFormatType();n.style.textAlign=i;const r=this.getDirection();r&&(n.dir=r)}return{element:n}}static importJSON(e){const n=Cs(e.tag);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,n=!0){const i=e?e.anchor.offset:0,r=i!==this.getTextContentSize()&&e?Cs(this.getTag()):on(),s=this.getDirection();if(r.setDirection(s),this.insertAfter(r,n),i===0&&!this.isEmpty()&&e){const l=on();l.select(),this.replace(l,!0)}return r}collapseAtStart(){const e=this.isEmpty()?on():Cs(this.getTag());return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}extractWithChild(){return!0}};function E1(t){return t.nodeName.toLowerCase()==="span"&&t.style.fontSize==="26pt"}function hl(t){const e=t.nodeName.toLowerCase();let n=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(n=Cs(e),t.style!==null&&n.setFormat(t.style.textAlign)),{node:n}}function lP(t){const e=df();return t.style!==null&&e.setFormat(t.style.textAlign),{node:e}}function Cs(t){return si(new hf(t))}function sS(t){return t instanceof hf}function vu(t){let e=null;if(As(t,DragEvent)?e=t.dataTransfer:As(t,ClipboardEvent)&&(e=t.clipboardData),e===null)return[!1,[],!1];const n=e.types,i=n.includes("Files"),r=n.includes("text/html")||n.includes("text/plain");return[i,Array.from(e.files),r]}function T1(t){const e=Ye();if(!Ie(e))return!1;const n=new Set,i=e.getNodes();for(let r=0;r<i.length;r++){const s=i[r],l=s.getKey();if(n.has(l))continue;const o=B4(s),a=o.getKey();o.canIndent()&&!n.has(a)&&(n.add(a),t(o))}return n.size>0}function yu(t){const e=$r(t);return It(e)}function oP(t){return j4(t.registerCommand(F2,e=>{const n=Ye();return!!Ui(n)&&(n.clear(),!0)},0),t.registerCommand(Is,e=>{const n=Ye();return!!Ie(n)&&(n.deleteCharacter(e),!0)},Nt),t.registerCommand(oa,e=>{const n=Ye();return!!Ie(n)&&(n.deleteWord(e),!0)},Nt),t.registerCommand(aa,e=>{const n=Ye();return!!Ie(n)&&(n.deleteLine(e),!0)},Nt),t.registerCommand(Rl,e=>{const n=Ye();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;const i=e.dataTransfer;if(i!=null)b1(i,n,t);else if(Ie(n)){const r=e.data;return r&&n.insertText(r),!0}}return!0},Nt),t.registerCommand(vh,()=>{const e=Ye();return!!Ie(e)&&(e.removeText(),!0)},Nt),t.registerCommand(Er,e=>{const n=Ye();return!!Ie(n)&&(n.formatText(e),!0)},Nt),t.registerCommand(m5,e=>{const n=Ye();if(!Ie(n)&&!Ui(n))return!1;const i=n.getNodes();for(const r of i){const s=tm(r,l=>ce(l)&&!l.isInline());s!==null&&s.setFormat(e)}return!0},Nt),t.registerCommand(Ml,e=>{const n=Ye();return!!Ie(n)&&(n.insertLineBreak(e),!0)},Nt),t.registerCommand(tc,()=>{const e=Ye();return!!Ie(e)&&(e.insertParagraph(),!0)},Nt),t.registerCommand(h5,()=>(c8([oo()]),!0),Nt),t.registerCommand(p5,()=>T1(e=>{const n=e.getIndent();e.setIndent(n+1)}),Nt),t.registerCommand(_b,()=>T1(e=>{const n=e.getIndent();n>0&&e.setIndent(n-1)}),Nt),t.registerCommand(U2,e=>{const n=Ye();if(Ui(n)&&!yu(e.target)){const i=n.getNodes();if(i.length>0)return i[0].selectPrevious(),!0}else if(Ie(n)){const i=ua(n.focus,!0);if(!e.shiftKey&&It(i)&&!i.isIsolated()&&!i.isInline())return i.selectPrevious(),e.preventDefault(),!0}return!1},Nt),t.registerCommand(q2,e=>{const n=Ye();if(Ui(n)){const i=n.getNodes();if(i.length>0)return i[0].selectNext(0,0),!0}else if(Ie(n)){if(function(r){const s=r.focus;return s.key==="root"&&s.offset===hn().getChildrenSize()}(n))return e.preventDefault(),!0;const i=ua(n.focus,!1);if(!e.shiftKey&&It(i)&&!i.isIsolated()&&!i.isInline())return i.selectNext(),e.preventDefault(),!0}return!1},Nt),t.registerCommand(B2,e=>{const n=Ye();if(Ui(n)){const i=n.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectPrevious(),!0}if(!Ie(n))return!1;if(e1(n,!0)){const i=e.shiftKey;return e.preventDefault(),t1(n,i,!0),!0}return!1},Nt),t.registerCommand(j2,e=>{const n=Ye();if(Ui(n)&&!yu(e.target)){const r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}if(!Ie(n))return!1;const i=e.shiftKey;return!!e1(n,!1)&&(e.preventDefault(),t1(n,i,!1),!0)},Nt),t.registerCommand(H2,e=>{if(yu(e.target))return!1;const n=Ye();if(!Ie(n))return!1;e.preventDefault();const{anchor:i}=n,r=i.getNode();return n.isCollapsed()&&i.offset===0&&!Un(r)&&B4(r).getIndent()>0?t.dispatchCommand(_b,void 0):t.dispatchCommand(Is,!0)},Nt),t.registerCommand(V2,e=>{if(yu(e.target))return!1;const n=Ye();return!!Ie(n)&&(e.preventDefault(),t.dispatchCommand(Is,!1))},Nt),t.registerCommand(nc,e=>{const n=Ye();if(!Ie(n))return!1;if(e!==null){if((iP||nP||sP)&&tP)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(Ml,!1)}return t.dispatchCommand(tc,void 0)},Nt),t.registerCommand(x2,()=>{const e=Ye();return!!Ie(e)&&(t.blur(),!0)},Nt),t.registerCommand(W2,e=>{const[,n]=vu(e);if(n.length>0){const r=k1(e.clientX,e.clientY);if(r!==null){const{offset:s,node:l}=r,o=$r(l);if(o!==null){const a=a8();if(Ce(o))a.anchor.set(o.getKey(),s,"text"),a.focus.set(o.getKey(),s,"text");else{const c=o.getParentOrThrow().getKey(),f=o.getIndexWithinParent()+1;a.anchor.set(c,f,"element"),a.focus.set(c,f,"element")}const u=n4(a);or(u)}t.dispatchCommand(S1,n)}return e.preventDefault(),!0}const i=Ye();return!!Ie(i)},Nt),t.registerCommand(Y2,e=>{const[n]=vu(e),i=Ye();return!(n&&!Ie(i))},Nt),t.registerCommand(G2,e=>{const[n]=vu(e),i=Ye();if(n&&!Ie(i))return!1;const r=k1(e.clientX,e.clientY);if(r!==null){const s=$r(r.node);It(s)&&e.preventDefault()}return!0},Nt),t.registerCommand(yh,()=>(W5(),!0),Nt),t.registerCommand(Qc,e=>(y1(t,As(e,ClipboardEvent)?e:null),!0),Nt),t.registerCommand(Dp,e=>(async function(n,i){await y1(i,As(n,ClipboardEvent)?n:null),i.update(()=>{const r=Ye();Ie(r)?r.removeText():Ui(r)&&r.getNodes().forEach(s=>s.remove())})}(e,t),!0),Nt),t.registerCommand(Op,e=>{const[,n,i]=vu(e);return n.length>0&&!i?(t.dispatchCommand(S1,n),!0):Hp(e.target)?!1:Ye()!==null&&(function(r,s){r.preventDefault(),s.update(()=>{const l=Ye(),o=As(r,InputEvent)||As(r,KeyboardEvent)?null:r.clipboardData;o!=null&&l!==null&&b1(o,l,s)},{tag:"paste"})}(e,t),!0)},Nt))}function aP(t,e){const n={};for(const i of t){const r=e(i);n[r]?n[r].push(i):n[r]=[i]}return n}function lS(t){const e=aP(t,n=>n.type);return{element:e.element||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const A1=/[!-/:-@[-`{-~\s]/;function uP(t,e,n,i){for(const r of e){const s=r.export(t,l=>_c(l,n,i));if(s!=null)return s}return ce(t)?_c(t,n,i):It(t)?t.getTextContent():null}function _c(t,e,n){const i=[],r=t.getChildren();e:for(const s of r){for(const l of n){const o=l.export(s,a=>_c(a,e,n),(a,u)=>C1(a,u,e));if(o!=null){i.push(o);continue e}}Lr(s)?i.push(`
|
|
28
|
+
`):Ce(s)?i.push(C1(s,s.getTextContent(),e)):ce(s)?i.push(_c(s,e,n)):It(s)&&i.push(s.getTextContent())}return i.join("")}function C1(t,e,n){const i=e.trim();let r=i;const s=new Set;for(const l of n){const o=l.format[0],a=l.tag;Md(t,o)&&!s.has(o)&&(s.add(o),Md(N1(t,!0),o)||(r=a+r),Md(N1(t,!1),o)||(r+=a))}return e.replace(i,()=>r)}function N1(t,e){let n=e?t.getPreviousSibling():t.getNextSibling();if(!n){const i=t.getParentOrThrow();i.isInline()&&(n=e?i.getPreviousSibling():i.getNextSibling())}for(;n;){if(ce(n)){if(!n.isInline())break;const i=e?n.getLastDescendant():n.getFirstDescendant();if(Ce(i))return i;n=e?n.getPreviousSibling():n.getNextSibling()}if(Ce(n))return n;if(!ce(n))return null}return null}function Md(t,e){return Ce(t)&&t.hasFormat(e)}const ho=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,cP=ho&&"documentMode"in document?document.documentMode:null;ho&&"InputEvent"in window&&!cP&&new window.InputEvent("input");const L1=ho&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),O1=ho&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,fP=ho&&/^(?=.*Chrome).*/i.test(navigator.userAgent),P1=ho&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!fP,dP=/^\s{0,3}$/,I1=/^```(\w{1,10})?\s?$/;function hP(t){const e=lS(t),n=function(i){const r={},s={},l=[],o="(?<![\\\\])";for(const a of i){const{tag:u}=a;r[u]=a;const c=u.replace(/(\*|\^|\+)/g,"\\$1");l.push(c),s[u]=L1||O1||P1?new RegExp(`(${c})(?![${c}\\s])(.*?[^${c}\\s])${c}(?!${c})`):new RegExp(`(?<![\\\\${c}])(${c})((\\\\${c})?.*?[^${c}\\s](\\\\${c})?)((?<!\\\\)|(?<=\\\\\\\\))(${c})(?![\\\\${c}])`)}return{fullMatchRegExpByTag:s,openTagsRegExp:new RegExp((L1||O1||P1?"":`${o}`)+"("+l.join("|")+")","g"),transformersByTag:r}}(e.textFormat);return(i,r)=>{const s=i.split(`
|
|
29
|
+
`),l=s.length,o=r||hn();o.clear();for(let u=0;u<l;u++){const c=s[u],[f,d]=gP(s,u,o);f==null?mP(c,o,e.element,n,e.textMatch):u=d}const a=o.getChildren();for(const u of a)pP(u)&&o.getChildrenSize()>1&&u.remove();Ye()!==null&&o.selectEnd()}}function pP(t){if(!as(t))return!1;const e=t.getFirstChild();return e==null||t.getChildrenSize()===1&&Ce(e)&&dP.test(e.getTextContent())}function mP(t,e,n,i,r){const s=t.trim(),l=ln(s),o=on();o.append(l),e.append(o);for(const{regExp:a,replace:u}of n){const c=t.match(a);if(c){l.setTextContent(t.slice(c[0].length)),u(o,[l],c,!0);break}}if(Uu(l,i,r),o.isAttached()&&s.length>0){const a=o.getPreviousSibling();if(as(a)||gc(a)||yt(a)){let u=a;if(yt(a)){const c=a.getLastDescendant();u=c==null?null:tm(c,tn)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[Vi(),...o.getChildren()]),o.remove())}}}function gP(t,e,n){const i=t[e].match(I1);if(i){let r=e;const s=t.length;for(;++r<s;)if(t[r].match(I1)){const l=Js(i[1]),o=ln(t.slice(e+1,r).join(`
|
|
30
|
+
`));return l.append(o),n.append(l),[l,r]}}return[null,e]}function Uu(t,e,n){const i=t.getTextContent(),r=function(u,c){const f=u.match(c.openTagsRegExp);if(f==null)return null;for(const d of f){const h=d.replace(/^\s/,""),m=c.fullMatchRegExpByTag[h];if(m==null)continue;const p=u.match(m),g=c.transformersByTag[h];if(p!=null&&g!=null){if(g.intraword!==!1)return p;const{index:v=0}=p,b=u[v-1],w=u[v+p[0].length];if((!b||A1.test(b))&&(!w||A1.test(w)))return p}}return null}(i,e);if(!r)return void oS(t,n);let s,l,o;if(r[0]===i)s=t;else{const u=r.index||0,c=u+r[0].length;u===0?[s,l]=t.splitText(c):[o,s,l]=t.splitText(u,c)}s.setTextContent(r[2]);const a=e.transformersByTag[r[1]];if(a)for(const u of a.format)s.hasFormat(u)||s.toggleFormat(u);s.hasFormat("code")||Uu(s,e,n),o&&Uu(o,e,n),l&&Uu(l,e,n)}function oS(t,e){let n=t;e:for(;n;){for(const i of e){const r=n.getTextContent().match(i.importRegExp);if(!r)continue;const s=r.index||0,l=s+r[0].length;let o,a;s===0?[o,n]=n.splitText(l):[,o,a]=n.splitText(s,l),a&&oS(a,e),i.replace(o,r);continue e}break}}const aS=t=>(e,n,i)=>{const r=t(i);r.append(...n),e.replace(r),r.select(0,0)},uS=t=>(e,n,i)=>{const r=e.getPreviousSibling(),s=e.getNextSibling(),l=Wi(t==="check"?i[3]==="x":void 0);if(yt(s)&&s.getListType()===t){const a=s.getFirstChild();a!==null?a.insertBefore(l):s.append(l),e.remove()}else if(yt(r)&&r.getListType()===t)r.append(l),e.remove();else{const a=Zn(t,t==="number"?Number(i[2]):void 0);a.append(l),e.replace(a)}l.append(...n),l.select(0,0);const o=function(a){const u=a.match(/\t/g),c=a.match(/ /g);let f=0;return u&&(f+=u.length),c&&(f+=Math.floor(c.length/4)),f}(i[1]);o&&l.setIndent(o)},rm=(t,e,n)=>{const i=[],r=t.getChildren();let s=0;for(const l of r)if(tn(l)){if(l.getChildrenSize()===1){const c=l.getFirstChild();if(yt(c)){i.push(rm(c,e,n+1));continue}}const o=" ".repeat(4*n),a=t.getListType(),u=a==="number"?`${t.getStart()+s}. `:a==="check"?`- [${l.getChecked()?"x":" "}] `:"- ";i.push(o+u+e(l)),s++}return i.join(`
|
|
31
|
+
`)},_P={dependencies:[hf],export:(t,e)=>{if(!sS(t))return null;const n=Number(t.getTag().slice(1));return"#".repeat(n)+" "+e(t)},regExp:/^(#{1,6})\s/,replace:aS(t=>{const e="h"+t[1].length;return Cs(e)}),type:"element"},bP={dependencies:[ff],export:(t,e)=>{if(!gc(t))return null;const n=e(t).split(`
|
|
32
|
+
`),i=[];for(const r of n)i.push("> "+r);return i.join(`
|
|
33
|
+
`)},regExp:/^>\s/,replace:(t,e,n,i)=>{if(i){const s=t.getPreviousSibling();if(gc(s))return s.splice(s.getChildrenSize(),0,[Vi(),...e]),s.select(0,0),void t.remove()}const r=df();r.append(...e),t.replace(r),r.select(0,0)},type:"element"},vP={dependencies:[cf],export:t=>{if(!H4(t))return null;const e=t.getTextContent();return"```"+(t.getLanguage()||"")+(e?`
|
|
34
|
+
`+e:"")+"\n```"},regExp:/^```(\w{1,10})?\s/,replace:aS(t=>Js(t?t[1]:void 0)),type:"element"},yP={dependencies:[co,qa],export:(t,e)=>yt(t)?rm(t,e,0):null,regExp:/^(\s*)[-*+]\s/,replace:uS("bullet"),type:"element"},wP={dependencies:[co,qa],export:(t,e)=>yt(t)?rm(t,e,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:uS("number"),type:"element"},kP={format:["code"],tag:"`",type:"text-format"},SP={format:["highlight"],tag:"==",type:"text-format"},EP={format:["bold","italic"],tag:"***",type:"text-format"},TP={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},AP={format:["bold"],tag:"**",type:"text-format"},CP={format:["bold"],intraword:!1,tag:"__",type:"text-format"},NP={format:["strikethrough"],tag:"~~",type:"text-format"},LP={format:["italic"],tag:"*",type:"text-format"},OP={format:["italic"],intraword:!1,tag:"_",type:"text-format"},PP={dependencies:[Zl],export:(t,e,n)=>{if(!Es(t))return null;const i=t.getTitle(),r=i?`[${t.getTextContent()}](${t.getURL()} "${i}")`:`[${t.getTextContent()}](${t.getURL()})`,s=t.getFirstChild();return t.getChildrenSize()===1&&Ce(s)?n(s,r):r},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(t,e)=>{const[,n,i,r]=e,s=da(i,{title:r}),l=ln(n);l.setFormat(t.getFormat()),s.append(l),t.replace(s)},trigger:")",type:"text-match"},IP=[_P,bP,vP,yP,wP],DP=[kP,EP,TP,AP,CP,SP,LP,OP,NP],MP=[PP],pf=[...IP,...DP,...MP];function RP(t,e=pf,n){return hP(e)(t,n)}function $P(t=pf,e){return function(i){const r=lS(i),s=r.textFormat.filter(l=>l.format.length===1);return l=>{const o=[],a=(l||hn()).getChildren();for(const u of a){const c=uP(u,r.element,s,r.textMatch);c!=null&&o.push(c)}return o.join(`
|
|
35
|
+
|
|
36
|
+
`)}}(t)(e)}const cS=/^(\d+(?:\.\d+)?)px$/,bc={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class Ha extends Bn{static getType(){return"tablecell"}static clone(e){const n=new Ha(e.__headerState,e.__colSpan,e.__width,e.__key);return n.__rowSpan=e.__rowSpan,n.__backgroundColor=e.__backgroundColor,n}static importDOM(){return{td:e=>({conversion:D1,priority:0}),th:e=>({conversion:D1,priority:0})}}static importJSON(e){const n=e.colSpan||1,i=e.rowSpan||1,r=fS(e.headerState,n,e.width||void 0);return r.__rowSpan=i,r.__backgroundColor=e.backgroundColor||null,r}constructor(e=bc.NO_STATUS,n=1,i,r){super(r),this.__colSpan=n,this.__rowSpan=1,this.__headerState=e,this.__width=i,this.__backgroundColor=null}createDOM(e){const n=document.createElement(this.getTag());return this.__width&&(n.style.width=`${this.__width}px`),this.__colSpan>1&&(n.colSpan=this.__colSpan),this.__rowSpan>1&&(n.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(n.style.backgroundColor=this.__backgroundColor),Li(n,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),n}exportDOM(e){const{element:n}=super.exportDOM(e);if(n){const i=n,r=700,s=this.getParentOrThrow().getChildrenSize();i.style.border="1px solid black",this.__colSpan>1&&(i.colSpan=this.__colSpan),this.__rowSpan>1&&(i.rowSpan=this.__rowSpan),i.style.width=`${this.getWidth()||Math.max(90,r/s)}px`,i.style.verticalAlign="top",i.style.textAlign="start";const l=this.getBackgroundColor();l!==null?i.style.backgroundColor=l:this.hasHeader()&&(i.style.backgroundColor="#f2f3f5")}return{element:n}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth()}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e){return this.getWritable().__headerState=e,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){return this.getWritable().__width=e,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){this.getWritable().__backgroundColor=e}toggleHeaderStyle(e){const n=this.getWritable();return(n.__headerState&e)===e?n.__headerState-=e:n.__headerState+=e,n}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==bc.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function D1(t){const e=t,n=t.nodeName.toLowerCase();let i;cS.test(e.style.width)&&(i=parseFloat(e.style.width));const r=fS(n==="th"?bc.ROW:bc.NO_STATUS,e.colSpan,i);r.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(r.__backgroundColor=s);const l=e.style,o=l.fontWeight==="700"||l.fontWeight==="bold",a=l.textDecoration==="line-through",u=l.fontStyle==="italic",c=l.textDecoration==="underline";return{after:f=>(f.length===0&&f.push(on()),f),forChild:(f,d)=>{if(dS(d)&&!ce(f)){const h=on();return Lr(f)&&f.getTextContent()===`
|
|
37
|
+
`?null:(Ce(f)&&(o&&f.toggleFormat("bold"),a&&f.toggleFormat("strikethrough"),u&&f.toggleFormat("italic"),c&&f.toggleFormat("underline")),h.append(f),h)}return f},node:r}}function fS(t,e=1,n){return si(new Ha(t,e,n))}function dS(t){return t instanceof Ha}class xa extends Bn{static getType(){return"tablerow"}static clone(e){return new xa(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:FP,priority:0})}}static importJSON(e){return hS(e.height)}constructor(e,n){super(n),this.__height=e}exportJSON(){return{...super.exportJSON(),...this.getHeight()&&{height:this.getHeight()},type:"tablerow",version:1}}createDOM(e){const n=document.createElement("tr");return this.__height&&(n.style.height=`${this.__height}px`),Li(n,e.theme.tableRow),n}isShadowRoot(){return!0}setHeight(e){return this.getWritable().__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function FP(t){const e=t;let n;return cS.test(e.style.height)&&(n=parseFloat(e.style.height)),{node:hS(n)}}function hS(t){return si(new xa(t))}function zP(t){return t instanceof xa}class mf extends Bn{static getType(){return"table"}static clone(e){return new mf(e.__key)}static importDOM(){return{table:e=>({conversion:jP,priority:1})}}static importJSON(e){return pS()}constructor(e){super(e)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(e,n){const i=document.createElement("table");return Li(i,e.theme.table),i}updateDOM(){return!1}exportDOM(e){return{...super.exportDOM(e),after:n=>{if(n){const i=n.cloneNode(),r=document.createElement("colgroup"),s=document.createElement("tbody");Di(n)&&s.append(...n.children);const l=this.getFirstChildOrThrow();if(!zP(l))throw new Error("Expected to find row node.");const o=l.getChildrenSize();for(let a=0;a<o;a++){const u=document.createElement("col");r.append(u)}return i.replaceChildren(r,s),i}}}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,n){const{rows:i,domRows:r}=n;for(let s=0;s<i;s++){const l=r[s];if(l==null)continue;const o=l.findIndex(a=>{if(!a)return;const{elem:u}=a;return $r(u)===e});if(o!==-1)return{x:o,y:s}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,n,i){const{domRows:r}=i,s=r[n];if(s==null)return null;const l=s[e];return l??null}getDOMCellFromCordsOrThrow(e,n,i){const r=this.getDOMCellFromCords(e,n,i);if(!r)throw new Error("Cell not found at cords.");return r}getCellNodeFromCords(e,n,i){const r=this.getDOMCellFromCords(e,n,i);if(r==null)return null;const s=$r(r.elem);return dS(s)?s:null}getCellNodeFromCordsOrThrow(e,n,i){const r=this.getCellNodeFromCords(e,n,i);if(!r)throw new Error("Node at cords not TableCellNode.");return r}canSelectBefore(){return!0}canIndent(){return!1}}function jP(t){return{node:pS()}}function pS(){return si(new mf)}const BP={namespace:"editor",nodes:[hf,ff,Zl,co,qa,cf,nm,mf,Ha,xa],theme:{text:{italic:"italic"}}},UP=t=>{const e=Ye();if(!Ie(e))return;const n=e.anchor.getNode();let i=null;const r=R2.filter(l=>e.hasFormat(l));n.getType()!=="root"&&(i=n instanceof Bn?n:Bu(n,Bn),Es(i)&&(r.push("link"),i=Bu(i,Bn)),tn(i)&&(i=Bu(i,co)));const s=(()=>{if(!i)return"paragraph";if(sS(i))return`heading-${i.getTag().match(/\d/)?.[0]}`;if(yt(i))return i.getListType()==="bullet"?"bulleted-list":"numbered-list";if(gc(i))return"blockquote";const l=i.getType();return Np.includes(l)?l:"paragraph"})();t.getRootElement()?.dispatchEvent(new CustomEvent("Update",{detail:{value:$P(pf),selectionBlockType:s,selectionInlineTypes:r}}))},qP=()=>{const t=b8(BP);return oP(t),$8(t,F8(),1e3),t.registerCommand(jh,e=>(B8(typeof e=="string"?e:null),!0),ju),t.registerCommand(Z4,()=>(c1(t,"bullet"),!0),ju),t.registerCommand(J4,()=>(c1(t,"number"),!0),ju),t.registerUpdateListener(({editorState:e})=>{t?.isComposing()||e.read(()=>{UP(t)})}),t},HP=async(t,e)=>new Promise((n,i)=>{t.update(()=>{try{RP(e,pf),n(void 0)}catch{i(new Error("Failed to convert Markdown"))}})});function xP(t){ye(t,"svelte-1qnbzy9",'.lexical-root.svelte-1qnbzy9{border:1px solid var(--sui-textbox-border-color);border-radius:0 0 var(--sui-textbox-border-radius) var(--sui-textbox-border-radius) !important;padding:16px;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height)}.lexical-root.svelte-1qnbzy9:focus-visible{outline:0}.lexical-root.svelte-1qnbzy9>:first-child{margin-top:0}.lexical-root.svelte-1qnbzy9>:last-child{margin-bottom:0}.lexical-root.svelte-1qnbzy9 strong.italic{font-style:italic}.lexical-root.svelte-1qnbzy9 [data-lexical-text="true"]{cursor:text}')}function VP(t){let e,n,i;return{c(){e=F("div"),C(e,"role","textbox"),C(e,"aria-multiline","true"),C(e,"aria-disabled",t[0]),C(e,"aria-readonly",t[1]),C(e,"class","lexical-root svelte-1qnbzy9"),C(e,"id",n=t[4]+"-lexical-root"),C(e,"contenteditable",t[2]),e.hidden=i=!t[5]},m(r,s){A(r,e,s),t[14](e)},p(r,[s]){s&1&&C(e,"aria-disabled",r[0]),s&2&&C(e,"aria-readonly",r[1]),s&16&&n!==(n=r[4]+"-lexical-root")&&C(e,"id",n),s&4&&C(e,"contenteditable",r[2]),s&32&&i!==(i=!r[5])&&(e.hidden=i)},i:H,o:H,d(r){r&&T(e),t[14](null)}}}function WP(t,e,n){let i,r,s,l,o,a,u,{disabled:c=!1}=e,{readonly:f=!1}=e,{value:d=void 0}=e;const{editor:h,editorId:m,selectionBlockType:p,selectionInlineTypes:g,useRichText:v,hasConverterError:b}=Na("state");B(t,h,P=>n(13,r=P)),B(t,m,P=>n(4,a=P)),B(t,p,P=>n(16,l=P)),B(t,g,P=>n(15,s=P)),B(t,v,P=>n(5,u=P)),B(t,b,P=>n(17,o=P));let w;const k=P=>{if(o)return;const{detail:M}=P,I=M.value;d!==I&&n(12,d=I),ze(p,l=M.selectionBlockType,l),ze(g,s=M.selectionInlineTypes,s)},S=P=>{P.target?.matches("a")&&P.preventDefault()};Ut(()=>(w&&(r.setRootElement(w),w.addEventListener("Update",k),w.addEventListener("click",S)),()=>{w?.removeEventListener("Update",k),w?.removeEventListener("click",S)}));function E(P){ae[P?"unshift":"push"](()=>{w=P,n(3,w)})}return t.$$set=P=>{"disabled"in P&&n(0,c=P.disabled),"readonly"in P&&n(1,f=P.readonly),"value"in P&&n(12,d=P.value)},t.$$.update=()=>{t.$$.dirty&3&&n(2,i=!(c||f)),t.$$.dirty&8196&&r.setEditable(i)},[c,f,i,w,a,u,h,m,p,g,v,b,d,r,E]}class YP extends ie{constructor(e){super(),ne(this,e,WP,VP,te,{disabled:0,readonly:1,value:12},xP)}}function GP(t){let e,n;return e=new xe({props:{slot:"start-icon",name:ci[t[0]].icon}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.name=ci[i[0]].icon),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function KP(t){let e,n;return e=new et({props:{iconic:!0,"aria-label":t[1](`_sui.text_editor.${ci[t[0]].labelKey}`),"aria-controls":t[2]+"-lexical-root",disabled:!t[3],pressed:t[4].includes(t[0]),$$slots:{"start-icon":[GP]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&3&&(s["aria-label"]=i[1](`_sui.text_editor.${ci[i[0]].labelKey}`)),r&4&&(s["aria-controls"]=i[2]+"-lexical-root"),r&8&&(s.disabled=!i[3]),r&17&&(s.pressed=i[4].includes(i[0])),r&2049&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ZP(t,e,n){let i,r,s,l,o;B(t,ue,m=>n(1,i=m));let{type:a}=e;const{editor:u,editorId:c,selectionInlineTypes:f,useRichText:d}=Na("state");B(t,u,m=>n(5,o=m)),B(t,c,m=>n(2,r=m)),B(t,f,m=>n(4,l=m)),B(t,d,m=>n(3,s=m));const h=()=>{o.dispatchCommand(Er,a)};return t.$$set=m=>{"type"in m&&n(0,a=m.type)},[a,i,r,s,l,o,u,c,f,d,h]}class JP extends ie{constructor(e){super(),ne(this,e,ZP,KP,te,{type:0})}}const dn=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vc=(t,e,{ellipsis:n="…"}={})=>{const i=[...t];return`${i.slice(0,e).join("").trim()}${i.length>e?n:""}`},Ln=t=>t.replace(/^\/+/,"").replace(/\/+$/,""),XP=t=>new DOMParser().parseFromString(t,"text/html").body.textContent??"",ha=t=>{if(typeof URL.canParse=="function")return URL.canParse(t);try{return new URL(t),!0}catch{return!1}};function QP(t){let e,n;return e=new xe({props:{slot:"start-icon",name:ci[Tl].icon}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function M1(t){let e,n,i=t[6]("_sui.text_editor.text")+"",r,s,l,o,a,u;function c(d){t[19](d)}let f={autofocus:!0,flex:!0};return t[4]!==void 0&&(f.value=t[4]),o=new Sn({props:f}),ae.push(()=>Re(o,"value",c)),o.$on("keydown",t[20]),{c(){e=F("div"),n=F("label"),r=G(i),s=F("br"),l=j(),O(o.$$.fragment),C(e,"role","none")},m(d,h){A(d,e,h),$(e,n),$(n,r),$(n,s),$(n,l),N(o,n,null),u=!0},p(d,h){(!u||h&64)&&i!==(i=d[6]("_sui.text_editor.text")+"")&&X(r,i);const m={};!a&&h&16&&(a=!0,m.value=d[4],$e(()=>a=!1)),o.$set(m)},i(d){u||(_(o.$$.fragment,d),u=!0)},o(d){y(o.$$.fragment,d),u=!1},d(d){d&&T(e),L(o)}}}function eI(t){let e,n,i,r=t[6]("_sui.text_editor.url")+"",s,l,o,a,u,c,f=!t[2]&&M1(t);function d(m){t[21](m)}let h={autofocus:t[2]||void 0,flex:!0,"aria-label":"URL"};return t[3]!==void 0&&(h.value=t[3]),a=new Sn({props:h}),ae.push(()=>Re(a,"value",d)),a.$on("keydown",t[22]),{c(){f&&f.c(),e=j(),n=F("div"),i=F("label"),s=G(r),l=F("br"),o=j(),O(a.$$.fragment),C(n,"role","none")},m(m,p){f&&f.m(m,p),A(m,e,p),A(m,n,p),$(n,i),$(i,s),$(i,l),$(i,o),N(a,i,null),c=!0},p(m,p){m[2]?f&&(x(),y(f,1,1,()=>{f=null}),V()):f?(f.p(m,p),p&4&&_(f,1)):(f=M1(m),f.c(),_(f,1),f.m(e.parentNode,e)),(!c||p&64)&&r!==(r=m[6]("_sui.text_editor.url")+"")&&X(s,r);const g={};p&4&&(g.autofocus=m[2]||void 0),!u&&p&8&&(u=!0,g.value=m[3],$e(()=>u=!1)),a.$set(g)},i(m){c||(_(f),_(a.$$.fragment,m),c=!0)},o(m){y(f),y(a.$$.fragment,m),c=!1},d(m){m&&(T(e),T(n)),f&&f.d(m),L(a)}}}function R1(t){let e,n;return e=new et({props:{variant:"secondary",label:t[6]("_sui.remove")}}),e.$on("click",t[18]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s.label=i[6]("_sui.remove")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function tI(t){let e,n,i=t[1]!=="create"&&R1(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[1]!=="create"?i?(i.p(r,s),s&2&&_(i,1)):(i=R1(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function nI(t){let e,n,i,r,s,l;e=new et({props:{iconic:!0,"aria-label":t[6](`_sui.text_editor.${ci[Tl].labelKey}`),"aria-controls":t[7]+"-lexical-root",disabled:!t[8],pressed:t[5].includes(Tl),$$slots:{"start-icon":[QP]},$$scope:{ctx:t}}}),e.$on("click",t[17]);function o(c){t[23](c)}function a(c){t[24](c)}let u={title:t[1]==="create"?t[6]("_sui.text_editor.insert_link"):t[6]("_sui.text_editor.update_link"),okDisabled:!ha(t[3]),okLabel:t[1]==="create"?t[6]("_sui.insert"):t[6]("_sui.update"),$$slots:{"footer-extra":[tI],default:[eI]},$$scope:{ctx:t}};return t[0]!==void 0&&(u.open=t[0]),t[3]!==void 0&&(u.value=t[3]),i=new Br({props:u}),ae.push(()=>Re(i,"open",o)),ae.push(()=>Re(i,"value",a)),i.$on("close",t[25]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(c,f){N(e,c,f),A(c,n,f),N(i,c,f),l=!0},p(c,[f]){const d={};f&64&&(d["aria-label"]=c[6](`_sui.text_editor.${ci[Tl].labelKey}`)),f&128&&(d["aria-controls"]=c[7]+"-lexical-root"),f&256&&(d.disabled=!c[8]),f&32&&(d.pressed=c[5].includes(Tl)),f&536870912&&(d.$$scope={dirty:f,ctx:c}),e.$set(d);const h={};f&66&&(h.title=c[1]==="create"?c[6]("_sui.text_editor.insert_link"):c[6]("_sui.text_editor.update_link")),f&8&&(h.okDisabled=!ha(c[3])),f&66&&(h.okLabel=c[1]==="create"?c[6]("_sui.insert"):c[6]("_sui.update")),f&536871007&&(h.$$scope={dirty:f,ctx:c}),!r&&f&1&&(r=!0,h.open=c[0],$e(()=>r=!1)),!s&&f&8&&(s=!0,h.value=c[3],$e(()=>s=!1)),i.$set(h)},i(c){l||(_(e.$$.fragment,c),_(i.$$.fragment,c),l=!0)},o(c){y(e.$$.fragment,c),y(i.$$.fragment,c),l=!1},d(c){c&&T(n),L(e,c),L(i,c)}}}const Tl="link";function iI(t,e,n){let i,r,s,l,o;B(t,ue,K=>n(6,s=K));const{editor:a,editorId:u,selectionInlineTypes:c,useRichText:f}=Na("state");B(t,a,K=>n(26,i=K)),B(t,u,K=>n(7,l=K)),B(t,c,K=>n(5,r=K)),B(t,f,K=>n(8,o=K));let d=!1,h="create",m=!1,p="",g="";const v=()=>{i.getEditorState().read(()=>{const K=f8().trim();n(3,p=ha(K)?K:""),n(2,m=!!K),n(1,h="create"),n(0,d=!0)})},b=()=>{i.dispatchCommand(jh,null)},w=()=>{i.getEditorState().read(()=>{const K=Ye();if(Ie(K)){const ve=K.anchor.getNode(),se=(ve instanceof Zl?ve:Bu(ve,Zl))?.getURL();if(se){n(2,m=!0),n(3,p=se),n(1,h="update"),n(0,d=!0);return}}b()})},k=()=>{r.includes(Tl)?w():v()},S=K=>{bh(K,"Enter")&&ha(p)&&n(0,d=!1)},E=async K=>{K.detail!=="cancel"&&h!=="remove"&&(m||(n(4,g=g.trim()),n(4,g||=p),await new Promise(ve=>{i.update(()=>{const me=Ye()??ao()?.clone();if(Ie(me)){const{anchor:se,focus:q}=me;me.insertText(g),se.offset-=g.length,q.offset=se.offset+g.length,ve(void 0)}})})),i.dispatchCommand(jh,p)),n(3,p=""),n(4,g="")};Ut(()=>{i.registerCommand(z2,K=>(bh(K,O2()?"Meta+K":"Ctrl+K")&&(K.preventDefault(),k()),!0),ju)});const P=()=>{k()},M=()=>{b(),n(1,h="remove"),n(0,d=!1)};function I(K){g=K,n(4,g)}const D=K=>{S(K)};function z(K){p=K,n(3,p)}const R=K=>{S(K)};function U(K){d=K,n(0,d)}function W(K){p=K,n(3,p)}return[d,h,m,p,g,r,s,l,o,a,u,c,f,b,k,S,E,P,M,I,D,z,R,U,W,K=>{E(K)}]}class rI extends ie{constructor(e){super(),ne(this,e,iI,nI,te,{})}}function $1(t){let e,n;return e=new ec({props:{iconName:ci[t[0]].icon,label:t[2](`_sui.text_editor.${ci[t[0]].labelKey}`),checked:t[1]}}),e.$on("click",t[7]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.iconName=ci[i[0]].icon),r&5&&(s.label=i[2](`_sui.text_editor.${ci[i[0]].labelKey}`)),r&2&&(s.checked=i[1]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sI(t){let e=t[1],n,i,r=$1(t);return{c(){r.c(),n=Q()},m(s,l){r.m(s,l),A(s,n,l),i=!0},p(s,[l]){l&2&&te(e,e=s[1])?(x(),y(r,1,1,H),V(),r=$1(s),r.c(),_(r,1),r.m(n.parentNode,n)):r.p(s,l)},i(s){i||(_(r),i=!0)},o(s){y(r),i=!1},d(s){s&&T(n),r.d(s)}}}function lI(t,e,n){let i,r,s,l;B(t,ue,d=>n(2,l=d));let{type:o}=e;const{editor:a,selectionBlockType:u}=Na("state");B(t,a,d=>n(8,r=d)),B(t,u,d=>n(6,s=d));const c=()=>{const[,d]=o.match(/^heading-(\d)$/)??[];d&&r.update(()=>{Pd(Ye(),()=>Cs(`h${d}`))}),o==="paragraph"&&r.update(()=>{Pd(Ye(),()=>on())}),o==="bulleted-list"&&r.dispatchCommand(Z4,void 0),o==="numbered-list"&&r.dispatchCommand(J4,void 0),o==="blockquote"&&r.update(()=>{Pd(Ye(),()=>df())})},f=()=>{i||c()};return t.$$set=d=>{"type"in d&&n(0,o=d.type)},t.$$.update=()=>{t.$$.dirty&65&&n(1,i=s===o)},[o,i,l,a,u,c,s,f]}class oI extends ie{constructor(e){super(),ne(this,e,lI,sI,te,{type:0})}}function aI(t){ye(t,"svelte-1s575tu",'[role=toolbar].svelte-1s575tu{--toolbar-size:var(--sui-secondary-toolbar-size);flex:none !important;display:flex;align-items:center;padding:0 4px}[role=toolbar].primary.svelte-1s575tu{--toolbar-size:var(--sui-primary-toolbar-size);border-color:var(--sui-primary-border-color);background-color:var(--sui-secondary-background-color)}[role=toolbar].secondary.svelte-1s575tu{background-color:var(--sui-tertiary-background-color)}[role=toolbar][aria-orientation=horizontal].svelte-1s575tu{height:var(--toolbar-size)}[role=toolbar][aria-orientation=vertical].svelte-1s575tu{flex-direction:column;width:var(--toolbar-size)}[role=toolbar].svelte-1s575tu:not(:last-child){border-width:0 0 1px;border-color:var(--sui-primary-border-color)}[role=toolbar].svelte-1s575tu button[role="button"][aria-pressed="true"],[role=toolbar].svelte-1s575tu button[role="button"][aria-checked="true"]{background-color:var(--sui-selected-background-color)}[role=toolbar].svelte-1s575tu h2{flex:auto;display:flex;align-items:center;gap:8px;margin:0;padding:0 8px;min-width:0;font-size:var(--sui-font-size-large)}[role=toolbar].svelte-1s575tu h2 strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[role=toolbar].svelte-1s575tu h2 span{font-size:var(--sui-font-size-small);font-weight:normal;opacity:0.8}[role=toolbar].svelte-1s575tu .divider[aria-orientation="horizontal"]{margin:0 4px;width:calc(100% - 8px)}[role=toolbar].svelte-1s575tu .divider[aria-orientation="vertical"]{margin:4px 0;height:calc(100% - 8px)}.inner.svelte-1s575tu{display:contents}')}function uI(t){let e,n,i,r,s;const l=t[7].default,o=ke(l,t,t[6],null);let a=[{role:"toolbar"},{class:i="sui toolbar "+t[3]+" "+(t[4]??"")+" "+t[0]},{hidden:r=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},{"aria-orientation":t[3]},t[5]],u={};for(let c=0;c<a.length;c+=1)u=Z(u,a[c]);return{c(){e=F("div"),n=F("div"),o&&o.c(),C(n,"role","none"),C(n,"class","inner svelte-1s575tu"),n.inert=t[2],je(e,u),re(e,"svelte-1s575tu",!0)},m(c,f){A(c,e,f),$(e,n),o&&o.m(n,null),s=!0},p(c,[f]){o&&o.p&&(!s||f&64)&&Ee(o,l,c,c[6],s?Se(l,c[6],f,null):Te(c[6]),null),(!s||f&4)&&(n.inert=c[2]),je(e,u=Ge(a,[{role:"toolbar"},(!s||f&25&&i!==(i="sui toolbar "+c[3]+" "+(c[4]??"")+" "+c[0]))&&{class:i},(!s||f&2&&r!==(r=c[1]||void 0))&&{hidden:r},(!s||f&2)&&{"aria-hidden":c[1]},(!s||f&4)&&{"aria-disabled":c[2]},(!s||f&8)&&{"aria-orientation":c[3]},f&32&&c[5]])),re(e,"svelte-1s575tu",!0)},i(c){s||(_(o,c),s=!0)},o(c){y(o,c),s=!1},d(c){c&&T(e),o&&o.d(c)}}}function cI(t,e,n){const i=["class","hidden","disabled","orientation","variant"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e,{orientation:c="horizontal"}=e,{variant:f=void 0}=e;return t.$$set=d=>{e=Z(Z({},e),tt(d)),n(5,r=he(e,i)),"class"in d&&n(0,o=d.class),"hidden"in d&&n(1,a=d.hidden),"disabled"in d&&n(2,u=d.disabled),"orientation"in d&&n(3,c=d.orientation),"variant"in d&&n(4,f=d.variant),"$$scope"in d&&n(6,l=d.$$scope)},[o,a,u,c,f,r,l,s]}class qr extends ie{constructor(e){super(),ne(this,e,cI,uI,te,{class:0,hidden:1,disabled:2,orientation:3,variant:4},aI)}}function fI(t){ye(t,"svelte-17u09sd",'.wrapper.svelte-17u09sd{display:contents}.wrapper.svelte-17u09sd [role="toolbar"]{position:sticky;top:0;display:flex;gap:8px;border-width:1px 1px 0;border-style:solid;border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius) var(--sui-textbox-border-radius) 0 0;padding:8px;background-color:var(--sui-tertiary-background-color)}.wrapper.svelte-17u09sd .sui.menu-button{padding:0 4px}.wrapper.svelte-17u09sd .sui.button{flex:none;margin:0 !important}.wrapper.svelte-17u09sd .sui.button-group{gap:4px}')}function F1(t,e,n){const i=t.slice();return i[18]=e[n],i}function z1(t,e,n){const i=t.slice();return i[18]=e[n],i}function dI(t){let e,n;return e=new xe({props:{slot:"start-icon",name:ci[t[7]]?.icon??"format_paragraph"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&128&&(s.name=ci[i[7]]?.icon??"format_paragraph"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function hI(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"arrow_drop_down",class:"small-arrow"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function j1(t,e){let n,i,r;return i=new oI({props:{type:e[18]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&8&&(o.type=e[18]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function pI(t){let e=[],n=new Map,i,r,s=be(t[3]);const l=o=>o[18];for(let o=0;o<s.length;o+=1){let a=z1(t,s,o),u=l(a);n.set(u,e[o]=j1(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&8&&(s=be(o[3]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,j1,i,z1),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function mI(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[4]("_sui.text_editor.text_style_options"),$$slots:{default:[pI]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16&&(s["aria-label"]=i[4]("_sui.text_editor.text_style_options")),r&8388616&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function B1(t){let e,n,i,r;return e=new $n({props:{orientation:"vertical"}}),i=new eC({props:{$$slots:{default:[bI]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l&8388612&&(o.$$scope={dirty:l,ctx:s}),i.$set(o)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function gI(t){let e,n;return e=new JP({props:{type:t[18]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.type=i[18]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function _I(t){let e,n;return e=new rI({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function U1(t,e){let n,i,r,s,l;const o=[_I,gI],a=[];function u(c,f){return c[18]==="link"?0:1}return i=u(e),r=a[i]=o[i](e),{key:t,first:null,c(){n=Q(),r.c(),s=Q(),this.first=n},m(c,f){A(c,n,f),a[i].m(c,f),A(c,s,f),l=!0},p(c,f){e=c;let d=i;i=u(e),i===d?a[i].p(e,f):(x(),y(a[d],1,1,()=>{a[d]=null}),V(),r=a[i],r?r.p(e,f):(r=a[i]=o[i](e),r.c()),_(r,1),r.m(s.parentNode,s))},i(c){l||(_(r),l=!0)},o(c){y(r),l=!1},d(c){c&&(T(n),T(s)),a[i].d(c)}}}function bI(t){let e=[],n=new Map,i,r,s=be(t[2]);const l=o=>o[18];for(let o=0;o<s.length;o+=1){let a=F1(t,s,o),u=l(a);n.set(u,e[o]=U1(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&4&&(s=be(o[2]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,U1,i,F1),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function vI(t){let e,n,i;function r(l){t[15](l)}let s={disabled:t[8],label:t[4]("_sui.text_editor.rich_text"),"aria-label":t[4]("_sui.text_editor.use_rich_text_mode")};return t[5]!==void 0&&(s.checked=t[5]),e=new Zc({props:s}),ae.push(()=>Re(e,"checked",r)),e.$on("change",t[16]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&256&&(a.disabled=l[8]),o&16&&(a.label=l[4]("_sui.text_editor.rich_text")),o&16&&(a["aria-label"]=l[4]("_sui.text_editor.use_rich_text_mode")),!n&&o&32&&(n=!0,a.checked=l[5],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function yI(t){let e,n,i,r,s,l,o;e=new pi({props:{disabled:!t[5],"aria-label":t[4]("_sui.text_editor.show_text_style_options"),"aria-controls":t[6]+"-lexical-root",$$slots:{popup:[mI],"end-icon":[hI],"start-icon":[dI]},$$scope:{ctx:t}}});let a=t[2].length&&B1(t);r=new In({props:{flex:!0}});let u=t[11].length>1&&vI(t);return{c(){O(e.$$.fragment),n=j(),a&&a.c(),i=j(),O(r.$$.fragment),s=j(),u&&u.c(),l=Q()},m(c,f){N(e,c,f),A(c,n,f),a&&a.m(c,f),A(c,i,f),N(r,c,f),A(c,s,f),u&&u.m(c,f),A(c,l,f),o=!0},p(c,f){const d={};f&32&&(d.disabled=!c[5]),f&16&&(d["aria-label"]=c[4]("_sui.text_editor.show_text_style_options")),f&64&&(d["aria-controls"]=c[6]+"-lexical-root"),f&8388760&&(d.$$scope={dirty:f,ctx:c}),e.$set(d),c[2].length?a?(a.p(c,f),f&4&&_(a,1)):(a=B1(c),a.c(),_(a,1),a.m(i.parentNode,i)):a&&(x(),y(a,1,1,()=>{a=null}),V()),c[11].length>1&&u.p(c,f)},i(c){o||(_(e.$$.fragment,c),_(a),_(r.$$.fragment,c),_(u),o=!0)},o(c){y(e.$$.fragment,c),y(a),y(r.$$.fragment,c),y(u),o=!1},d(c){c&&(T(n),T(i),T(s),T(l)),L(e,c),a&&a.d(c),L(r,c),u&&u.d(c)}}}function wI(t){let e,n,i;return n=new qr({props:{disabled:t[0]||t[1],"aria-label":t[4]("_sui.text_editor.text_editor"),$$slots:{default:[yI]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-17u09sd")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&3&&(l.disabled=r[0]||r[1]),s&16&&(l["aria-label"]=r[4]("_sui.text_editor.text_editor")),s&8389116&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function kI(t,e,n){let i,r,s,l,o,a,u;B(t,ue,S=>n(4,s=S));let{disabled:c=!1}=e,{readonly:f=!1}=e;const{editorId:d,selectionBlockType:h,modes:m,useRichText:p,hasConverterError:g,enabledButtons:v,convertMarkdown:b}=Na("state");B(t,d,S=>n(6,o=S)),B(t,h,S=>n(7,a=S)),B(t,p,S=>n(5,l=S)),B(t,g,S=>n(8,u=S));function w(S){l=S,p.set(l)}const k=async()=>{await e2(),l&&b()};return t.$$set=S=>{"disabled"in S&&n(0,c=S.disabled),"readonly"in S&&n(1,f=S.readonly)},n(3,i=Array.from(new Set(["paragraph",...v.filter(S=>Np.includes(S))]))),n(2,r=Array.from(new Set([...v.filter(S=>$2.includes(S))]))),[c,f,r,i,s,l,o,a,u,d,h,m,p,g,b,w,k]}class SI extends ie{constructor(e){super(),ne(this,e,kI,wI,te,{disabled:0,readonly:1},fI)}}function EI(t){ye(t,"svelte-11vrueq",".text-area.svelte-11vrueq{display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width)}.text-area[hidden].svelte-11vrueq{display:none}.text-area.flex.svelte-11vrueq{width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0}textarea.svelte-11vrueq,.clone.svelte-11vrueq{grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:8px;width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);transition:all 200ms}textarea.resizing.svelte-11vrueq,.clone.resizing.svelte-11vrueq{transition-duration:0ms}textarea.svelte-11vrueq:focus,.clone.svelte-11vrueq:focus{border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color))}textarea.svelte-11vrueq:disabled,textarea.svelte-11vrueq:read-only,.clone.svelte-11vrueq:disabled,.clone.svelte-11vrueq:read-only{background-color:var(--sui-disabled-background-color)}textarea.svelte-11vrueq{resize:vertical}textarea.auto-resize.svelte-11vrueq{overflow:hidden;resize:none}textarea[aria-invalid=true].svelte-11vrueq{border-color:var(--sui-error-foreground-color)}.clone.svelte-11vrueq{overflow:hidden;visibility:hidden;white-space:pre-wrap}")}function q1(t){let e,n=(t[0]??"")+"",i;return{c(){e=F("div"),i=G(n),C(e,"class","clone svelte-11vrueq"),C(e,"aria-hidden","true")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=(r[0]??"")+"")&&X(i,n)},d(r){r&&T(e)}}}function TI(t){let e,n,i,r,s,l,o,a,u,c=[{name:t[8]},{disabled:i=t[4]||void 0},{readOnly:r=t[5]||void 0},{"aria-hidden":t[3]},{"aria-disabled":t[4]},{"aria-readonly":t[5]},{"aria-required":t[6]},{"aria-invalid":t[7]},t[10]],f={};for(let h=0;h<c.length;h+=1)f=Z(f,c[h]);let d=t[9]&&q1(t);return{c(){e=F("div"),n=F("textarea"),s=j(),d&&d.c(),je(n,f),re(n,"auto-resize",t[9]),re(n,"svelte-11vrueq",!0),C(e,"role","none"),C(e,"class",l="sui text-area "+t[1]+" svelte-11vrueq"),e.hidden=o=t[3]||void 0,re(e,"flex",t[2]),re(e,"disabled",t[4]),re(e,"readonly",t[5])},m(h,m){A(h,e,m),$(e,n),n.autofocus&&n.focus(),ss(n,t[0]),$(e,s),d&&d.m(e,null),a||(u=[Fe(n,"input",t[16]),Fe(n,"keydown",t[11]),Fe(n,"keyup",t[12]),Fe(n,"keypress",t[13]),Fe(n,"input",t[14]),Fe(n,"change",t[15])],a=!0)},p(h,[m]){je(n,f=Ge(c,[m&256&&{name:h[8]},m&16&&i!==(i=h[4]||void 0)&&{disabled:i},m&32&&r!==(r=h[5]||void 0)&&{readOnly:r},m&8&&{"aria-hidden":h[3]},m&16&&{"aria-disabled":h[4]},m&32&&{"aria-readonly":h[5]},m&64&&{"aria-required":h[6]},m&128&&{"aria-invalid":h[7]},m&1024&&h[10]])),m&1&&ss(n,h[0]),re(n,"auto-resize",h[9]),re(n,"svelte-11vrueq",!0),h[9]?d?d.p(h,m):(d=q1(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null),m&2&&l!==(l="sui text-area "+h[1]+" svelte-11vrueq")&&C(e,"class",l),m&8&&o!==(o=h[3]||void 0)&&(e.hidden=o),m&6&&re(e,"flex",h[2]),m&18&&re(e,"disabled",h[4]),m&34&&re(e,"readonly",h[5])},i:H,o:H,d(h){h&&T(e),d&&d.d(),a=!1,Gt(u)}}}function AI(t,e,n){const i=["class","flex","hidden","disabled","readonly","required","invalid","name","value","autoResize"];let r=he(e,i),{class:s=""}=e,{flex:l=!1}=e,{hidden:o=void 0}=e,{disabled:a=!1}=e,{readonly:u=!1}=e,{required:c=!1}=e,{invalid:f=!1}=e,{name:d=void 0}=e,{value:h=void 0}=e,{autoResize:m=!1}=e;function p(S){fe.call(this,t,S)}function g(S){fe.call(this,t,S)}function v(S){fe.call(this,t,S)}function b(S){fe.call(this,t,S)}function w(S){fe.call(this,t,S)}function k(){h=this.value,n(0,h)}return t.$$set=S=>{e=Z(Z({},e),tt(S)),n(10,r=he(e,i)),"class"in S&&n(1,s=S.class),"flex"in S&&n(2,l=S.flex),"hidden"in S&&n(3,o=S.hidden),"disabled"in S&&n(4,a=S.disabled),"readonly"in S&&n(5,u=S.readonly),"required"in S&&n(6,c=S.required),"invalid"in S&&n(7,f=S.invalid),"name"in S&&n(8,d=S.name),"value"in S&&n(0,h=S.value),"autoResize"in S&&n(9,m=S.autoResize)},[h,s,l,o,a,u,c,f,d,m,r,p,g,v,b,w,k]}class gf extends ie{constructor(e){super(),ne(this,e,AI,TI,te,{class:1,flex:2,hidden:3,disabled:4,readonly:5,required:6,invalid:7,name:8,value:0,autoResize:9},EI)}}function CI(t){ye(t,"svelte-n4lrq6",".toast-base.svelte-n4lrq6{position:fixed;inset:0;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:16px;width:100dvw;height:100dvh;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal);pointer-events:none;-webkit-user-select:none;user-select:none}.toast.svelte-n4lrq6{position:absolute;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity}.toast[aria-hidden=true].svelte-n4lrq6{display:block;opacity:0}.toast.top-left.svelte-n4lrq6{inset:16px auto auto 16px}.toast.top-center.svelte-n4lrq6{inset:16px auto auto 50%;transform:translateX(-50%)}.toast.top-right.svelte-n4lrq6{inset:16px 16px auto auto}.toast.bottom-left.svelte-n4lrq6{inset:auto auto 16px 16px}.toast.bottom-center.svelte-n4lrq6{inset:auto auto 16px 50%;transform:translateX(-50%)}.toast.bottom-right.svelte-n4lrq6{inset:auto 16px 16px auto}")}function NI(t){let e,n,i,r,s,l;const o=t[10].default,a=ke(o,t,t[9],null);let u=[{class:r="sui toast "+t[1]},{"aria-hidden":s=!t[0]},t[4]],c={};for(let f=0;f<u.length;f+=1)c=Z(c,u[f]);return{c(){e=F("div"),n=j(),i=F("div"),a&&a.c(),C(e,"role","none"),C(e,"class","sui toast-base svelte-n4lrq6"),je(i,c),re(i,"svelte-n4lrq6",!0)},m(f,d){A(f,e,d),t[11](e),A(f,n,d),A(f,i,d),a&&a.m(i,null),t[12](i),l=!0},p(f,[d]){a&&a.p&&(!l||d&512)&&Ee(a,o,f,f[9],l?Se(o,f[9],d,null):Te(f[9]),null),je(i,c=Ge(u,[(!l||d&2&&r!==(r="sui toast "+f[1]))&&{class:r},(!l||d&1&&s!==(s=!f[0]))&&{"aria-hidden":s},d&16&&f[4]])),re(i,"svelte-n4lrq6",!0)},i(f){l||(_(a,f),l=!0)},o(f){y(a,f),l=!1},d(f){f&&(T(e),T(n),T(i)),t[11](null),a&&a.d(f),t[12](null)}}}function LI(t,e,n){const i=["id","show","duration","position"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{id:o=void 0}=e,{show:a=!1}=e,{duration:u=5e3}=e,{position:c="bottom-right"}=e,f,d,h,m=0;Ut(()=>(n(7,d=document.querySelector(".sui.toast-base.enabled")??void 0),d?f?.remove():(n(7,d=f),d&&(d.classList.add("enabled"),(document.querySelector(".sui.app-shell")??document.body).appendChild(d),d.showPopover&&(n(7,d.popover="manual",d),d.showPopover()))),()=>{h?.remove()}));function p(v){ae[v?"unshift":"push"](()=>{f=v,n(3,f)})}function g(v){ae[v?"unshift":"push"](()=>{h=v,n(2,h)})}return t.$$set=v=>{e=Z(Z({},e),tt(v)),n(4,r=he(e,i)),"id"in v&&n(5,o=v.id),"show"in v&&n(0,a=v.show),"duration"in v&&n(6,u=v.duration),"position"in v&&n(1,c=v.position),"$$scope"in v&&n(9,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&132&&d&&h&&d.appendChild(h),t.$$.dirty&353&&(globalThis.clearTimeout(m),a&&u&&n(8,m=globalThis.setTimeout(()=>{n(0,a=!1)},u)))},[a,c,h,f,r,o,u,d,m,l,s,p,g]}class Si extends ie{constructor(e){super(),ne(this,e,LI,NI,te,{id:5,show:0,duration:6,position:1},CI)}}function OI(t){ye(t,"svelte-1yhr7c5",".text-editor.svelte-1yhr7c5{margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2)}.text-editor.svelte-1yhr7c5 .sui.text-area{margin:0 !important;width:100% !important;min-width:auto}.text-editor.svelte-1yhr7c5 .sui.text-area textarea{border-radius:0 0 var(--sui-textbox-border-radius) var(--sui-textbox-border-radius) !important}")}function H1(t){let e,n,i;function r(l){t[19](l)}let s={$$slots:{default:[II]},$$scope:{ctx:t}};return t[7]!==void 0&&(s.show=t[7]),e=new Si({props:s}),ae.push(()=>Re(e,"show",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&33554944&&(a.$$scope={dirty:o,ctx:l}),!n&&o&128&&(n=!0,a.show=l[7],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function PI(t){let e=t[9]("_sui.text_editor.converter_error")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&512&&e!==(e=i[9]("_sui.text_editor.converter_error")+"")&&X(n,e)},d(i){i&&T(n)}}}function II(t){let e,n;return e=new Ii({props:{status:"error",$$slots:{default:[PI]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&33554944&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function DI(t){let e,n,i,r,s,l,o,a,u,c,f,d;n=new SI({props:{disabled:t[3],readonly:t[4]}});function h(k){t[17](k)}let m={disabled:t[3],readonly:t[4]};t[0]!==void 0&&(m.value=t[0]),r=new YP({props:m}),ae.push(()=>Re(r,"value",h));function p(k){t[18](k)}let g={autoResize:!0,flex:t[1],hidden:t[8]||t[2],disabled:t[3],readonly:t[4],required:t[5],invalid:t[6]};t[0]!==void 0&&(g.value=t[0]),o=new gf({props:g}),ae.push(()=>Re(o,"value",p));let v=[{role:"none"},{class:"sui text-editor"},{hidden:u=t[2]||void 0},t[13]],b={};for(let k=0;k<v.length;k+=1)b=Z(b,v[k]);let w=t[7]&&H1(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),l=j(),O(o.$$.fragment),c=j(),w&&w.c(),f=Q(),je(e,b),re(e,"svelte-1yhr7c5",!0)},m(k,S){A(k,e,S),N(n,e,null),$(e,i),N(r,e,null),$(e,l),N(o,e,null),A(k,c,S),w&&w.m(k,S),A(k,f,S),d=!0},p(k,[S]){const E={};S&8&&(E.disabled=k[3]),S&16&&(E.readonly=k[4]),n.$set(E);const P={};S&8&&(P.disabled=k[3]),S&16&&(P.readonly=k[4]),!s&&S&1&&(s=!0,P.value=k[0],$e(()=>s=!1)),r.$set(P);const M={};S&2&&(M.flex=k[1]),S&260&&(M.hidden=k[8]||k[2]),S&8&&(M.disabled=k[3]),S&16&&(M.readonly=k[4]),S&32&&(M.required=k[5]),S&64&&(M.invalid=k[6]),!a&&S&1&&(a=!0,M.value=k[0],$e(()=>a=!1)),o.$set(M),je(e,b=Ge(v,[{role:"none"},{class:"sui text-editor"},(!d||S&4&&u!==(u=k[2]||void 0))&&{hidden:u},S&8192&&k[13]])),re(e,"svelte-1yhr7c5",!0),k[7]?w?(w.p(k,S),S&128&&_(w,1)):(w=H1(k),w.c(),_(w,1),w.m(f.parentNode,f)):w&&(x(),y(w,1,1,()=>{w=null}),V())},i(k){d||(_(n.$$.fragment,k),_(r.$$.fragment,k),_(o.$$.fragment,k),_(w),d=!0)},o(k){y(n.$$.fragment,k),y(r.$$.fragment,k),y(o.$$.fragment,k),y(w),d=!1},d(k){k&&(T(e),T(c),T(f)),L(n),L(r),L(o),w&&w.d(k)}}}function MI(t,e,n){const i=["flex","hidden","disabled","readonly","required","invalid","value","modes","buttons"];let r=he(e,i),s,l,o,a;B(t,ue,U=>n(9,a=U));let{flex:u=!1}=e,{hidden:c=void 0}=e,{disabled:f=!1}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e,{value:p=void 0}=e,{modes:g=["rich-text","plain-text"]}=e,{buttons:v=[...$2,...Np]}=e;const b=Xe(qP());B(t,b,U=>n(20,o=U));const w=Xe("paragraph"),k=Xe([]),S=Xe(ii("editor")),E=Xe(g[0]==="rich-text");B(t,E,U=>n(8,s=U));const P=Xe(!1);B(t,P,U=>n(16,l=U));let M=!1;const I=async()=>{const U=p;try{await HP(o,p??"")}catch{ze(P,l=!0,l),n(0,p=U)}};xT("state",{editor:b,editorId:S,selectionBlockType:w,selectionInlineTypes:k,modes:g,useRichText:E,hasConverterError:P,enabledButtons:v,convertMarkdown:I}),Ut(()=>{s&&I()});function D(U){p=U,n(0,p)}function z(U){p=U,n(0,p)}function R(U){M=U,n(7,M),n(16,l)}return t.$$set=U=>{e=Z(Z({},e),tt(U)),n(13,r=he(e,i)),"flex"in U&&n(1,u=U.flex),"hidden"in U&&n(2,c=U.hidden),"disabled"in U&&n(3,f=U.disabled),"readonly"in U&&n(4,d=U.readonly),"required"in U&&n(5,h=U.required),"invalid"in U&&n(6,m=U.invalid),"value"in U&&n(0,p=U.value),"modes"in U&&n(14,g=U.modes),"buttons"in U&&n(15,v=U.buttons)},t.$$.update=()=>{t.$$.dirty&65536&&l&&(ze(E,s=!1,s),n(7,M=!0))},[p,u,c,f,d,h,m,M,s,a,b,E,P,r,g,v,l,D,z,R]}let RI=class extends ie{constructor(e){super(),ne(this,e,MI,DI,te,{flex:1,hidden:2,disabled:3,readonly:4,required:5,invalid:6,value:0,modes:14,buttons:15},OI)}};function $I(t){ye(t,"svelte-ocpvsq",'.number-input.svelte-ocpvsq{display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width)}.number-input.flex.svelte-ocpvsq{width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0}.number-input.svelte-ocpvsq :not(:first-child) input{border-top-left-radius:0;border-bottom-left-radius:0}.number-input.svelte-ocpvsq :not(:last-child) input{border-top-right-radius:0;border-bottom-right-radius:0}.number-input.svelte-ocpvsq:not(.disabled) button[aria-disabled="true"]{filter:grayscale(0) opacity(1)}.number-input.svelte-ocpvsq:not(.disabled) button[aria-disabled="true"] *{filter:grayscale(1) opacity(0.35)}.number-input.svelte-ocpvsq .text-input{flex:auto;margin:0 !important;width:0;min-width:0 !important}.buttons.svelte-ocpvsq{display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height)}.buttons.svelte-ocpvsq button{flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%}.buttons.svelte-ocpvsq button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-width:1px 0 0 1px}.buttons.svelte-ocpvsq button:last-of-type{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-width:0 0 1px 1px}.buttons.svelte-ocpvsq button .icon{font-size:20px}')}const FI=t=>({}),x1=t=>({slot:"start-icon"}),zI=t=>({}),V1=t=>({slot:"start-icon"});function jI(t){let e,n;return e=new xe({props:{name:"expand_less"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function BI(t){let e;const n=t[21]["increase-icon"],i=ke(n,t,t[32],V1),r=i||jI();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l[1]&2)&&Ee(i,n,s,s[32],e?Se(n,s[32],l,zI):Te(s[32]),V1)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function UI(t){let e,n;return e=new xe({props:{name:"expand_more"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qI(t){let e;const n=t[21]["decrease-icon"],i=ke(n,t,t[32],x1),r=i||UI();return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l[1]&2)&&Ee(i,n,s,s[32],e?Se(n,s[32],l,FI):Te(s[32]),x1)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function HI(t){let e,n,i,r,s,l,o,a,u,c,f;i=new et({props:{iconic:!0,disabled:t[5]||t[6]||Number.isNaN(Number(t[0]))||t[13],"aria-label":t[15]("_sui.number_input.increase"),"aria-controls":t[16],$$slots:{"start-icon":[BI]},$$scope:{ctx:t}}}),i.$on("click",t[22]),s=new et({props:{iconic:!0,disabled:t[5]||t[6]||Number.isNaN(Number(t[0]))||t[14],"aria-label":t[15]("_sui.number_input.decrease"),"aria-controls":t[16],$$slots:{"start-icon":[qI]},$$scope:{ctx:t}}}),s.$on("click",t[23]);const d=[{role:"spinbutton"},{id:t[16]},{spellcheck:"false"},{flex:t[3]},{hidden:t[4]},{disabled:t[5]},{readonly:t[6]},{required:t[7]},{invalid:t[1]},{"aria-valuenow":Number(t[0]||0)},{"aria-valuemin":t[8]},{"aria-valuemax":t[9]},{inputmode:t[12]>0?"decimal":"numeric"},t[19]];function h(p){t[24](p)}let m={};for(let p=0;p<d.length;p+=1)m=Z(m,d[p]);return t[0]!==void 0&&(m.value=t[0]),o=new Sn({props:m}),ae.push(()=>Re(o,"value",h)),t[25](o),o.$on("keydown",t[26]),o.$on("keydown",t[27]),o.$on("keyup",t[28]),o.$on("keypress",t[29]),o.$on("input",t[30]),o.$on("change",t[31]),{c(){e=F("div"),n=F("div"),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),C(n,"role","none"),C(n,"class","buttons svelte-ocpvsq"),C(e,"role","none"),C(e,"class",u="sui number-input "+t[2]+" svelte-ocpvsq"),e.hidden=c=t[4]||void 0,re(e,"flex",t[3]),re(e,"disabled",t[5]),re(e,"readonly",t[6])},m(p,g){A(p,e,g),$(e,n),N(i,n,null),$(n,r),N(s,n,null),$(e,l),N(o,e,null),f=!0},p(p,g){const v={};g[0]&8289&&(v.disabled=p[5]||p[6]||Number.isNaN(Number(p[0]))||p[13]),g[0]&32768&&(v["aria-label"]=p[15]("_sui.number_input.increase")),g[1]&2&&(v.$$scope={dirty:g,ctx:p}),i.$set(v);const b={};g[0]&16481&&(b.disabled=p[5]||p[6]||Number.isNaN(Number(p[0]))||p[14]),g[0]&32768&&(b["aria-label"]=p[15]("_sui.number_input.decrease")),g[1]&2&&(b.$$scope={dirty:g,ctx:p}),s.$set(b);const w=g[0]&594939?Ge(d,[d[0],g[0]&65536&&{id:p[16]},d[2],g[0]&8&&{flex:p[3]},g[0]&16&&{hidden:p[4]},g[0]&32&&{disabled:p[5]},g[0]&64&&{readonly:p[6]},g[0]&128&&{required:p[7]},g[0]&2&&{invalid:p[1]},g[0]&1&&{"aria-valuenow":Number(p[0]||0)},g[0]&256&&{"aria-valuemin":p[8]},g[0]&512&&{"aria-valuemax":p[9]},g[0]&4096&&{inputmode:p[12]>0?"decimal":"numeric"},g[0]&524288&&qt(p[19])]):{};!a&&g[0]&1&&(a=!0,w.value=p[0],$e(()=>a=!1)),o.$set(w),(!f||g[0]&4&&u!==(u="sui number-input "+p[2]+" svelte-ocpvsq"))&&C(e,"class",u),(!f||g[0]&16&&c!==(c=p[4]||void 0))&&(e.hidden=c),(!f||g[0]&12)&&re(e,"flex",p[3]),(!f||g[0]&36)&&re(e,"disabled",p[5]),(!f||g[0]&68)&&re(e,"readonly",p[6])},i(p){f||(_(i.$$.fragment,p),_(s.$$.fragment,p),_(o.$$.fragment,p),f=!0)},o(p){y(i.$$.fragment,p),y(s.$$.fragment,p),y(o.$$.fragment,p),f=!1},d(p){p&&T(e),L(i),L(s),t[25](null),L(o)}}}function xI(t,e,n){let i,r,s;const l=["class","flex","hidden","disabled","readonly","required","invalid","value","min","max","step"];let o=he(e,l),a;B(t,ue,J=>n(15,a=J));let{$$slots:u={},$$scope:c}=e,{class:f=""}=e,{flex:d=!1}=e,{hidden:h=void 0}=e,{disabled:m=!1}=e,{readonly:p=!1}=e,{required:g=!1}=e,{invalid:v=!1}=e,{value:b=void 0}=e,{min:w=void 0}=e,{max:k=void 0}=e,{step:S=1}=e;const E=ii("input");let P=!1,M;const I=()=>{r||n(0,b=Number(Number(b||0)-S).toFixed(i))},D=()=>{s||n(0,b=Number(Number(b||0)+S).toFixed(i))},z=()=>{D()},R=()=>{I()};function U(J){b=J,n(0,b)}function W(J){ae[J?"unshift":"push"](()=>{M=J,n(11,M)})}const ee=J=>{const{key:Le,ctrlKey:_e,metaKey:Be,altKey:Ke,shiftKey:de}=J,ge=de||Ke||_e||Be;Le==="ArrowDown"&&!ge&&(J.preventDefault(),I()),Le==="ArrowUp"&&!ge&&(J.preventDefault(),D()),P||n(10,P=!0)};function K(J){fe.call(this,t,J)}function ve(J){fe.call(this,t,J)}function me(J){fe.call(this,t,J)}function se(J){fe.call(this,t,J)}function q(J){fe.call(this,t,J)}return t.$$set=J=>{e=Z(Z({},e),tt(J)),n(19,o=he(e,l)),"class"in J&&n(2,f=J.class),"flex"in J&&n(3,d=J.flex),"hidden"in J&&n(4,h=J.hidden),"disabled"in J&&n(5,m=J.disabled),"readonly"in J&&n(6,p=J.readonly),"required"in J&&n(7,g=J.required),"invalid"in J&&n(1,v=J.invalid),"value"in J&&n(0,b=J.value),"min"in J&&n(8,w=J.min),"max"in J&&n(9,k=J.max),"step"in J&&n(20,S=J.step),"$$scope"in J&&n(32,c=J.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&1048576&&n(12,i=String(S).split(".")[1]?.length||0),t.$$.dirty[0]&257&&n(14,r=typeof w=="number"&&Number(b||0)<=w),t.$$.dirty[0]&513&&n(13,s=typeof k=="number"&&Number(b||0)>=k),t.$$.dirty[0]&1921&&n(1,v=g&&P&&(b===void 0||b==="")||b!==void 0&&b!==""&&(Number.isNaN(Number(b))||typeof w=="number"&&Number(b||0)<w||typeof k=="number"&&Number(b||0)>k))},[b,v,f,d,h,m,p,g,w,k,P,M,i,s,r,a,E,I,D,o,S,u,z,R,U,W,ee,K,ve,me,se,q,c]}class VI extends ie{constructor(e){super(),ne(this,e,xI,HI,te,{class:2,flex:3,hidden:4,disabled:5,readonly:6,required:7,invalid:1,value:0,min:8,max:9,step:20},$I,[-1,-1])}}function WI(t){ye(t,"svelte-1a0p7ik",".password-input.svelte-1a0p7ik{display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width)}.password-input.flex.svelte-1a0p7ik{width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0}.password-input.svelte-1a0p7ik .text-input{flex:auto;margin:0 !important;width:0;min-width:0 !important}.password-input.svelte-1a0p7ik input{border-top-right-radius:0;border-bottom-right-radius:0}.password-input.svelte-1a0p7ik button{flex:none;margin:0 0 0 -1px;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1}.password-input.svelte-1a0p7ik button:last-child{border-radius:0 4px 4px 0}.password-input.svelte-1a0p7ik button .icon{font-size:var(--sui-font-size-xx-large)}")}const YI=t=>({}),W1=t=>({slot:"start-icon"});function GI(t){let e,n;return e=new xe({props:{name:t[9]?"visibility_off":"visibility"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&512&&(s.name=i[9]?"visibility_off":"visibility"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function KI(t){let e;const n=t[13]["visibility-icon"],i=ke(n,t,t[22],W1),r=i||GI(t);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&4194304)&&Ee(i,n,s,s[22],e?Se(n,s[22],l,YI):Te(s[22]),W1):r&&r.p&&(!e||l&512)&&r.p(s,e?l:-1)},i(s){e||(_(r,s),e=!0)},o(s){y(r,s),e=!1},d(s){r&&r.d(s)}}}function ZI(t){let e,n,i,r,s,l,o,a;const u=[{id:t[11]},{type:"password"},{spellcheck:"false"},{flex:t[2]},{hidden:t[3]},{disabled:t[4]},{readonly:t[5]},{required:t[6]},{invalid:t[7]},t[12]];function c(d){t[14](d)}let f={};for(let d=0;d<u.length;d+=1)f=Z(f,u[d]);return t[0]!==void 0&&(f.value=t[0]),n=new Sn({props:f}),ae.push(()=>Re(n,"value",c)),t[15](n),n.$on("keydown",t[16]),n.$on("keyup",t[17]),n.$on("keypress",t[18]),n.$on("input",t[19]),n.$on("change",t[20]),s=new et({props:{iconic:!0,disabled:t[4]||t[5],pressed:t[9],"aria-label":t[10](t[9]?"_sui.password_input.hide_password":"_sui.password_input.show_password"),"aria-controls":t[11],$$slots:{"start-icon":[KI]},$$scope:{ctx:t}}}),s.$on("click",t[21]),{c(){e=F("div"),O(n.$$.fragment),r=j(),O(s.$$.fragment),C(e,"role","none"),C(e,"class",l="sui password-input "+t[1]+" svelte-1a0p7ik"),e.hidden=o=t[3]||void 0,re(e,"flex",t[2]),re(e,"disabled",t[4]),re(e,"readonly",t[5])},m(d,h){A(d,e,h),N(n,e,null),$(e,r),N(s,e,null),a=!0},p(d,[h]){const m=h&6396?Ge(u,[h&2048&&{id:d[11]},u[1],u[2],h&4&&{flex:d[2]},h&8&&{hidden:d[3]},h&16&&{disabled:d[4]},h&32&&{readonly:d[5]},h&64&&{required:d[6]},h&128&&{invalid:d[7]},h&4096&&qt(d[12])]):{};!i&&h&1&&(i=!0,m.value=d[0],$e(()=>i=!1)),n.$set(m);const p={};h&48&&(p.disabled=d[4]||d[5]),h&512&&(p.pressed=d[9]),h&1536&&(p["aria-label"]=d[10](d[9]?"_sui.password_input.hide_password":"_sui.password_input.show_password")),h&4194816&&(p.$$scope={dirty:h,ctx:d}),s.$set(p),(!a||h&2&&l!==(l="sui password-input "+d[1]+" svelte-1a0p7ik"))&&C(e,"class",l),(!a||h&8&&o!==(o=d[3]||void 0))&&(e.hidden=o),(!a||h&6)&&re(e,"flex",d[2]),(!a||h&18)&&re(e,"disabled",d[4]),(!a||h&34)&&re(e,"readonly",d[5])},i(d){a||(_(n.$$.fragment,d),_(s.$$.fragment,d),a=!0)},o(d){y(n.$$.fragment,d),y(s.$$.fragment,d),a=!1},d(d){d&&T(e),t[15](null),L(n),L(s)}}}function JI(t,e,n){const i=["class","flex","hidden","disabled","readonly","required","invalid","value"];let r=he(e,i),s;B(t,ue,z=>n(10,s=z));let{$$slots:l={},$$scope:o}=e,{class:a=""}=e,{flex:u=!1}=e,{hidden:c=void 0}=e,{disabled:f=!1}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e,{value:p=void 0}=e;const g=ii("input");let v,b=!1;function w(z){p=z,n(0,p)}function k(z){ae[z?"unshift":"push"](()=>{v=z,n(8,v)})}function S(z){fe.call(this,t,z)}function E(z){fe.call(this,t,z)}function P(z){fe.call(this,t,z)}function M(z){fe.call(this,t,z)}function I(z){fe.call(this,t,z)}const D=()=>{n(9,b=!b)};return t.$$set=z=>{e=Z(Z({},e),tt(z)),n(12,r=he(e,i)),"class"in z&&n(1,a=z.class),"flex"in z&&n(2,u=z.flex),"hidden"in z&&n(3,c=z.hidden),"disabled"in z&&n(4,f=z.disabled),"readonly"in z&&n(5,d=z.readonly),"required"in z&&n(6,h=z.required),"invalid"in z&&n(7,m=z.invalid),"value"in z&&n(0,p=z.value),"$$scope"in z&&n(22,o=z.$$scope)},t.$$.update=()=>{t.$$.dirty&768&&v&&v.element?.setAttribute("type",b?"text":"password")},[p,a,u,c,f,d,h,m,v,b,s,g,r,l,w,k,S,E,P,M,I,D,o]}class XI extends ie{constructor(e){super(),ne(this,e,JI,ZI,te,{class:1,flex:2,hidden:3,disabled:4,readonly:5,required:6,invalid:7,value:0},WI)}}const{document:pl}=vp;function QI(t){ye(t,"svelte-pte4hi",`@import url("https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300;0,600;1,300;1,600&family=Noto+Sans+Mono&display=swap");@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block");:root,:host{--sui-base-hue:210;--sui-highlight-foreground-color:hsl(var(--sui-foreground-color-1-hsl));--sui-primary-foreground-color:hsl(var(--sui-foreground-color-2-hsl));--sui-secondary-foreground-color:hsl(var(--sui-foreground-color-3-hsl));--sui-tertiary-foreground-color:hsl(var(--sui-foreground-color-4-hsl));--sui-disabled-foreground-color:hsl(var(--sui-foreground-color-5-hsl));--sui-error-foreground-color:hsl(
|
|
38
|
+
var(--sui-error-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
39
|
+
var(--sui-alert-foreground-color-lightness)
|
|
40
|
+
);--sui-warning-foreground-color:hsl(
|
|
41
|
+
var(--sui-warning-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
42
|
+
var(--sui-alert-foreground-color-lightness)
|
|
43
|
+
);--sui-info-foreground-color:hsl(
|
|
44
|
+
var(--sui-info-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
45
|
+
var(--sui-alert-foreground-color-lightness)
|
|
46
|
+
);--sui-success-foreground-color:hsl(
|
|
47
|
+
var(--sui-success-color-hue) var(--sui-alert-foreground-color-saturation)
|
|
48
|
+
var(--sui-alert-foreground-color-lightness)
|
|
49
|
+
);--sui-hover-background-color:hsl(var(--sui-background-color-5-hsl) / 35%);--sui-selected-background-color:hsl(var(--sui-background-color-5-hsl) / 75%);--sui-active-background-color:hsl(var(--sui-background-color-5-hsl) / 100%);--sui-content-background-color:hsl(var(--sui-background-color-1-hsl));--sui-code-background-color:hsl(var(--sui-background-color-4-hsl));--sui-primary-background-color:hsl(var(--sui-background-color-2-hsl));--sui-primary-background-color-translucent:hsl(var(--sui-background-color-2-hsl) / 80%);--sui-secondary-background-color:hsl(var(--sui-background-color-3-hsl));--sui-secondary-background-color-translucent:hsl(var(--sui-background-color-3-hsl) / 80%);--sui-tertiary-background-color:hsl(var(--sui-background-color-4-hsl));--sui-tertiary-background-color-translucent:hsl(var(--sui-background-color-4-hsl) / 80%);--sui-disabled-background-color:hsl(var(--sui-background-color-4-hsl));--sui-error-background-color:hsl(
|
|
50
|
+
var(--sui-error-color-hue) var(--sui-alert-background-color-saturation)
|
|
51
|
+
var(--sui-alert-background-color-lightness)
|
|
52
|
+
);--sui-warning-background-color:hsl(
|
|
53
|
+
var(--sui-warning-color-hue) var(--sui-alert-background-color-saturation)
|
|
54
|
+
var(--sui-alert-background-color-lightness)
|
|
55
|
+
);--sui-info-background-color:hsl(
|
|
56
|
+
var(--sui-info-color-hue) var(--sui-alert-background-color-saturation)
|
|
57
|
+
var(--sui-alert-background-color-lightness)
|
|
58
|
+
);--sui-success-background-color:hsl(
|
|
59
|
+
var(--sui-success-color-hue) var(--sui-alert-background-color-saturation)
|
|
60
|
+
var(--sui-alert-background-color-lightness)
|
|
61
|
+
);--sui-focus-ring-width:4px;--sui-primary-border-color:hsl(var(--sui-border-color-2-hsl));--sui-secondary-border-color:hsl(var(--sui-border-color-3-hsl));--sui-error-border-color:hsl(
|
|
62
|
+
var(--sui-error-color-hue) var(--sui-alert-border-color-saturation)
|
|
63
|
+
var(--sui-alert-border-color-lightness)
|
|
64
|
+
);--sui-warning-border-color:hsl(
|
|
65
|
+
var(--sui-warning-color-hue) var(--sui-alert-border-color-saturation)
|
|
66
|
+
var(--sui-alert-border-color-lightness)
|
|
67
|
+
);--sui-info-border-color:hsl(
|
|
68
|
+
var(--sui-info-color-hue) var(--sui-alert-border-color-saturation)
|
|
69
|
+
var(--sui-alert-border-color-lightness)
|
|
70
|
+
);--sui-success-border-color:hsl(
|
|
71
|
+
var(--sui-success-color-hue) var(--sui-alert-border-color-saturation)
|
|
72
|
+
var(--sui-alert-border-color-lightness)
|
|
73
|
+
);--sui-popup-shadow-color:hsl(var(--sui-shadow-color) / 40%);--sui-popup-backdrop-color:hsl(var(--sui-shadow-color) / 40%);--sui-font-family-default:"Merriweather Sans", sans-serif;--sui-font-size-xxx-large:24px;--sui-font-size-xx-large:20px;--sui-font-size-x-large:18px;--sui-font-size-large:16px;--sui-font-size-default:14px;--sui-font-size-small:12px;--sui-font-size-x-small:10px;--sui-font-weight-normal:300;--sui-font-weight-bold:600;--sui-font-family-monospace:"Noto Sans Mono", monospace;--sui-font-size-monospace:0.9em;--sui-line-height-default:1.25;--sui-line-height-compact:1.5;--sui-line-height-comfortable:1.75;--sui-word-spacing-normal:0.1ex;--sui-control-small-border-width:1px;--sui-control-small-border-radius:calc(var(--sui-control-small-height) / 8);--sui-control-small-padding:0 calc((var(--sui-control-small-height) / 5));--sui-control-small-height:24px;--sui-control-medium-border-width:1px;--sui-control-medium-border-radius:calc(var(--sui-control-medium-height) / 8);--sui-control-medium-padding:0 calc((var(--sui-control-medium-height) / 4));--sui-control-medium-height:32px;--sui-control-large-border-width:1px;--sui-control-large-border-radius:calc(var(--sui-control-large-height) / 8);--sui-control-large-padding:0 calc((var(--sui-control-large-height) / 3));--sui-control-large-height:48px;--sui-control-border-color:hsl(var(--sui-border-color-2-hsl));--sui-control-foreground-color:var(--sui-primary-foreground-color);--sui-control-background-color:hsl(var(--sui-background-color-4-hsl));--sui-control-font-family:var(--sui-font-family-default);--sui-control-font-size:var(--sui-font-size-default);--sui-control-line-height:var(--sui-line-height-default);--sui-button-small-border-radius:var(--sui-control-small-border-radius);--sui-button-small-padding:var(--sui-control-small-padding);--sui-button-small-height:var(--sui-control-small-height);--sui-button-medium-border-radius:var(--sui-control-medium-border-radius);--sui-button-medium-padding:var(--sui-control-medium-padding);--sui-button-medium-height:var(--sui-control-medium-height);--sui-button-large-border-radius:var(--sui-control-large-border-radius);--sui-button-large-padding:var(--sui-control-large-padding);--sui-button-large-height:var(--sui-control-large-height);--sui-button-border-color:var(--sui-control-border-color);--sui-button-background-color:var(--sui-control-background-color);--sui-checkbox-border-radius:var(--sui-control-medium-border-radius);--sui-checkbox-height:20px;--sui-checkbox-border-color:hsl(var(--sui-border-color-1-hsl));--sui-checkbox-background-color:var(--sui-control-background-color);--sui-option-border-radius:var(--sui-control-medium-border-radius);--sui-option-padding:var(--sui-control-medium-padding);--sui-option-height:var(--sui-control-medium-height);--sui-listbox-border-radius:var(--sui-control-medium-border-radius);--sui-listbox-border-color:var(--sui-control-border-color);--sui-listbox-foreground-color:var(--sui-control-foreground-color);--sui-listbox-background-color:hsl(var(--sui-background-color-1-hsl));--sui-textbox-border-radius:var(--sui-control-medium-border-radius);--sui-textbox-height:var(--sui-control-medium-height);--sui-textbox-border-color:var(--sui-control-border-color);--sui-textbox-foreground-color:var(--sui-control-foreground-color);--sui-textbox-background-color:hsl(var(--sui-background-color-1-hsl));--sui-textbox-font-family:var(--sui-font-family-default);--sui-textbox-font-size:var(--sui-font-size-default);--sui-textbox-singleline-min-width:240px;--sui-textbox-singleline-line-height:var(--sui-line-height-compact);--sui-textbox-multiline-min-width:480px;--sui-textbox-multiline-line-height:var(--sui-line-height-comfortable);--sui-tab-height:var(--sui-control-medium-height);--sui-tab-small-height:var(--sui-control-small-height);--sui-tab-medium-height:var(--sui-control-medium-height);--sui-tab-large-height:var(--sui-control-large-height);--sui-primary-toolbar-size:48px;--sui-secondary-toolbar-size:40px;--sui-primary-row-height:48px;--sui-secondary-row-height:40px}@media(pointer: coarse){:root,:host{--sui-control-small-height:30px;--sui-control-medium-height:40px;--sui-control-large-height:60px;--sui-checkbox-height:24px;--sui-primary-toolbar-size:56px;--sui-secondary-toolbar-size:48px;--sui-primary-row-height:56px;--sui-secondary-row-height:48px}}@media(prefers-reduced-transparency){:root,:host{--sui-primary-background-color-translucent:hsl(var(--sui-background-color-2-hsl));--sui-secondary-background-color-translucent:hsl(var(--sui-background-color-3-hsl));--sui-tertiary-background-color-translucent:hsl(var(--sui-background-color-4-hsl))}}:root[data-theme=light],:host[data-theme=light]{color-scheme:light;--sui-foreground-color-1-hsl:var(--sui-base-hue) 5% 5%;--sui-foreground-color-2-hsl:var(--sui-base-hue) 5% 25%;--sui-foreground-color-3-hsl:var(--sui-base-hue) 5% 35%;--sui-foreground-color-4-hsl:var(--sui-base-hue) 5% 45%;--sui-foreground-color-5-hsl:var(--sui-base-hue) 5% 65%;--sui-background-color-1-hsl:var(--sui-base-hue) 5% 100%;--sui-background-color-2-hsl:var(--sui-base-hue) 5% 98%;--sui-background-color-3-hsl:var(--sui-base-hue) 5% 96%;--sui-background-color-4-hsl:var(--sui-base-hue) 5% 94%;--sui-background-color-5-hsl:var(--sui-base-hue) 5% 84%;--sui-border-color-1-hsl:var(--sui-base-hue) 5% 65%;--sui-border-color-2-hsl:var(--sui-base-hue) 5% 84%;--sui-border-color-3-hsl:var(--sui-base-hue) 5% 88%;--sui-shadow-color:var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text:hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-light:hsl(var(--sui-base-hue) 80% 45%);--sui-primary-accent-color:hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-dark:hsl(var(--sui-base-hue) 80% 35%);--sui-primary-accent-color-inverted:hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent:hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue:0;--sui-warning-color-hue:40;--sui-info-color-hue:210;--sui-success-color-hue:100;--sui-alert-foreground-color-saturation:85%;--sui-alert-foreground-color-lightness:25%;--sui-alert-background-color-saturation:65%;--sui-alert-background-color-lightness:90%;--sui-alert-border-color-saturation:48%;--sui-alert-border-color-lightness:68%}:root[data-theme=dark],:host[data-theme=dark]{color-scheme:dark;--sui-foreground-color-1-hsl:var(--sui-base-hue) 10% 95%;--sui-foreground-color-2-hsl:var(--sui-base-hue) 10% 75%;--sui-foreground-color-3-hsl:var(--sui-base-hue) 10% 65%;--sui-foreground-color-4-hsl:var(--sui-base-hue) 10% 55%;--sui-foreground-color-5-hsl:var(--sui-base-hue) 10% 35%;--sui-background-color-1-hsl:var(--sui-base-hue) 10% 10%;--sui-background-color-2-hsl:var(--sui-base-hue) 10% 12%;--sui-background-color-3-hsl:var(--sui-base-hue) 10% 14%;--sui-background-color-4-hsl:var(--sui-base-hue) 10% 16%;--sui-background-color-5-hsl:var(--sui-base-hue) 10% 26%;--sui-border-color-1-hsl:var(--sui-base-hue) 10% 45%;--sui-border-color-2-hsl:var(--sui-base-hue) 10% 26%;--sui-border-color-3-hsl:var(--sui-base-hue) 10% 22%;--sui-shadow-color:var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text:hsl(var(--sui-base-hue) 100% 60%);--sui-primary-accent-color-light:hsl(var(--sui-base-hue) 100% 45%);--sui-primary-accent-color:hsl(var(--sui-base-hue) 100% 40%);--sui-primary-accent-color-dark:hsl(var(--sui-base-hue) 100% 35%);--sui-primary-accent-color-inverted:hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent:hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue:0;--sui-warning-color-hue:40;--sui-info-color-hue:210;--sui-success-color-hue:100;--sui-alert-foreground-color-saturation:85%;--sui-alert-foreground-color-lightness:75%;--sui-alert-background-color-saturation:40%;--sui-alert-background-color-lightness:10%;--sui-alert-border-color-saturation:38%;--sui-alert-border-color-lightness:18%}@media(prefers-color-scheme: light){:root:not([data-theme]),:host:not([data-theme]){color-scheme:light;--sui-foreground-color-1-hsl:var(--sui-base-hue) 5% 5%;--sui-foreground-color-2-hsl:var(--sui-base-hue) 5% 25%;--sui-foreground-color-3-hsl:var(--sui-base-hue) 5% 35%;--sui-foreground-color-4-hsl:var(--sui-base-hue) 5% 45%;--sui-foreground-color-5-hsl:var(--sui-base-hue) 5% 65%;--sui-background-color-1-hsl:var(--sui-base-hue) 5% 100%;--sui-background-color-2-hsl:var(--sui-base-hue) 5% 98%;--sui-background-color-3-hsl:var(--sui-base-hue) 5% 96%;--sui-background-color-4-hsl:var(--sui-base-hue) 5% 94%;--sui-background-color-5-hsl:var(--sui-base-hue) 5% 84%;--sui-border-color-1-hsl:var(--sui-base-hue) 5% 65%;--sui-border-color-2-hsl:var(--sui-base-hue) 5% 84%;--sui-border-color-3-hsl:var(--sui-base-hue) 5% 88%;--sui-shadow-color:var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text:hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-light:hsl(var(--sui-base-hue) 80% 45%);--sui-primary-accent-color:hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-dark:hsl(var(--sui-base-hue) 80% 35%);--sui-primary-accent-color-inverted:hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent:hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue:0;--sui-warning-color-hue:40;--sui-info-color-hue:210;--sui-success-color-hue:100;--sui-alert-foreground-color-saturation:85%;--sui-alert-foreground-color-lightness:25%;--sui-alert-background-color-saturation:65%;--sui-alert-background-color-lightness:90%;--sui-alert-border-color-saturation:48%;--sui-alert-border-color-lightness:68%}}@media(prefers-color-scheme: dark){:root:not([data-theme]),:host:not([data-theme]){color-scheme:dark;--sui-foreground-color-1-hsl:var(--sui-base-hue) 10% 95%;--sui-foreground-color-2-hsl:var(--sui-base-hue) 10% 75%;--sui-foreground-color-3-hsl:var(--sui-base-hue) 10% 65%;--sui-foreground-color-4-hsl:var(--sui-base-hue) 10% 55%;--sui-foreground-color-5-hsl:var(--sui-base-hue) 10% 35%;--sui-background-color-1-hsl:var(--sui-base-hue) 10% 10%;--sui-background-color-2-hsl:var(--sui-base-hue) 10% 12%;--sui-background-color-3-hsl:var(--sui-base-hue) 10% 14%;--sui-background-color-4-hsl:var(--sui-base-hue) 10% 16%;--sui-background-color-5-hsl:var(--sui-base-hue) 10% 26%;--sui-border-color-1-hsl:var(--sui-base-hue) 10% 45%;--sui-border-color-2-hsl:var(--sui-base-hue) 10% 26%;--sui-border-color-3-hsl:var(--sui-base-hue) 10% 22%;--sui-shadow-color:var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text:hsl(var(--sui-base-hue) 100% 60%);--sui-primary-accent-color-light:hsl(var(--sui-base-hue) 100% 45%);--sui-primary-accent-color:hsl(var(--sui-base-hue) 100% 40%);--sui-primary-accent-color-dark:hsl(var(--sui-base-hue) 100% 35%);--sui-primary-accent-color-inverted:hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent:hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue:0;--sui-warning-color-hue:40;--sui-info-color-hue:210;--sui-success-color-hue:100;--sui-alert-foreground-color-saturation:85%;--sui-alert-foreground-color-lightness:75%;--sui-alert-background-color-saturation:40%;--sui-alert-background-color-lightness:10%;--sui-alert-border-color-saturation:38%;--sui-alert-border-color-lightness:18%}}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24}*,::before,::after{overflow-anchor:none;scroll-behavior:smooth;box-sizing:border-box;outline-offset:0px;outline-width:var(--sui-focus-ring-width) !important;outline-style:solid;outline-color:transparent;border-width:0;border-style:solid;vertical-align:top}@media(prefers-reduced-motion){*,::before,::after{scroll-behavior:auto;transition-duration:1ms !important}}::selection{background-color:var(--sui-primary-accent-color-translucent)}*{-webkit-tap-highlight-color:transparent}:focus{z-index:1;outline-width:0}:focus-visible{outline-color:var(--sui-primary-accent-color-translucent);z-index:2}h1,h2,h3,h4,h5,h6{margin:0;font-weight:var(--sui-font-weight-bold);line-height:var(--sui-line-height-default)}h1{font-size:32px}h2{font-size:28px}h3{font-size:24px}h4{font-size:20px}h5{font-size:16px}h6{font-size:12px}strong{font-weight:var(--sui-font-weight-bold)}a{color:var(--sui-primary-accent-color-text);text-decoration:none}p,li{line-height:var(--sui-line-height-comfortable)}code,pre{border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em}pre{padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text}code{padding:2px 4px}table{border-collapse:collapse}th,td{border:1px solid var(--sui-textbox-border-color);padding:8px}blockquote{margin-left:16px;border-left:4px solid var(--sui-textbox-border-color);padding-left:12px}.disabled,.readonly,[aria-disabled=true],[aria-readonly=true],[inert]{cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35)}.disabled *,.readonly *,[aria-disabled=true] *,[aria-readonly=true] *,[inert] *{filter:grayscale(0) opacity(1)}.disabled *,.readonly *,[aria-disabled=true] *,[aria-readonly=true] *,[inert] *{cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none}.font-loader{position:absolute;left:-99999px;font-family:var(--sui-font-family-default)}.app-shell{position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default}.app-shell.horizontal{display:flex;flex-direction:row;overflow:hidden}.app-shell.vertical{display:flex;flex-direction:column;overflow:hidden}`)}function Y1(t,e,n){const i=t.slice();return i[10]=e[n],i}function G1(t){let e,n,i;return{c(){e=F("link"),n=j(),i=F("link"),C(e,"rel","preload"),C(e,"href",t[10]),C(e,"as","style"),C(i,"rel","stylesheet"),C(i,"href",t[10])},m(r,s){A(r,e,s),A(r,n,s),A(r,i,s)},p:H,d(r){r&&(T(e),T(n),T(i))}}}function eD(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m=be(t[2]),p=[];for(let k=0;k<m.length;k+=1)p[k]=G1(Y1(t,m,k));const g=t[5].default,v=ke(g,t,t[4],null);let b=[{role:"none"},{class:c="sui app-shell "+(t[0]??"")},t[3]],w={};for(let k=0;k<b.length;k+=1)w=Z(w,b[k]);return{c(){e=F("meta"),n=F("meta"),i=F("link"),r=F("link");for(let k=0;k<p.length;k+=1)p[k].c();s=Q(),l=j(),o=F("div"),o.innerHTML='Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span>',a=j(),u=F("div"),v&&v.c(),C(e,"name","viewport"),C(e,"content","width=device-width, initial-scale=1.0"),C(n,"name","google"),C(n,"content","notranslate"),C(i,"rel","preconnect"),C(i,"href","https://fonts.googleapis.com"),C(r,"rel","preconnect"),C(r,"href","https://fonts.gstatic.com"),C(r,"crossorigin","anonymous"),C(o,"class","font-loader"),C(o,"aria-hidden","true"),jt(o,"opacity","0"),je(u,w)},m(k,S){$(pl.head,e),$(pl.head,n),$(pl.head,i),$(pl.head,r);for(let E=0;E<p.length;E+=1)p[E]&&p[E].m(pl.head,null);$(pl.head,s),A(k,l,S),A(k,o,S),t[8](o),A(k,a,S),A(k,u,S),v&&v.m(u,null),f=!0,d||(h=[Fe(u,"dragover",Kr(t[6])),Fe(u,"drop",Kr(t[7])),Fe(u,"contextmenu",t[9])],d=!0)},p(k,[S]){if(S&4){m=be(k[2]);let E;for(E=0;E<m.length;E+=1){const P=Y1(k,m,E);p[E]?p[E].p(P,S):(p[E]=G1(P),p[E].c(),p[E].m(s.parentNode,s))}for(;E<p.length;E+=1)p[E].d(1);p.length=m.length}v&&v.p&&(!f||S&16)&&Ee(v,g,k,k[4],f?Se(g,k[4],S,null):Te(k[4]),null),je(u,w=Ge(b,[{role:"none"},(!f||S&1&&c!==(c="sui app-shell "+(k[0]??"")))&&{class:c},S&8&&k[3]]))},i(k){f||(_(v,k),f=!0)},o(k){y(v,k),f=!1},d(k){k&&(T(l),T(o),T(a),T(u)),T(e),T(n),T(i),T(r),ni(p,k),T(s),t[8](null),v&&v.d(k),d=!1,Gt(h)}}}function tD(t,e,n){const i=["orientation"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{orientation:o=void 0}=e;const a=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300;0,600;1,300&family=Noto+Sans+Mono&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let u;Ut(()=>{const m=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:p}=document.documentElement,g=()=>{p.autoTheming!=="false"&&(p.theme=m.matches?"dark":"light")};g(),m.onchange=()=>{g()},globalThis.setTimeout(()=>{u?.remove()},1e3)});function c(m){fe.call(this,t,m)}function f(m){fe.call(this,t,m)}function d(m){ae[m?"unshift":"push"](()=>{u=m,n(1,u)})}const h=m=>{!document.documentElement.matches('[data-env="dev"]')&&!m.target?.matches('input[type="text"], textarea')&&m.preventDefault()};return t.$$set=m=>{e=Z(Z({},e),tt(m)),n(3,r=he(e,i)),"orientation"in m&&n(0,o=m.orientation),"$$scope"in m&&n(4,l=m.$$scope)},[o,u,a,r,l,s,c,f,d,h]}class nD extends ie{constructor(e){super(),ne(this,e,tD,eD,te,{orientation:0},QI)}}function iD(t){ye(t,"svelte-3h03g8",".inner.svelte-3h03g8{display:contents}")}function rD(t){let e,n,i,r,s;const l=t[5].default,o=ke(l,t,t[4],null);let a=[{role:"group"},{class:i="sui group "+t[0]},{hidden:r=t[1]||void 0},{"aria-hidden":t[1]},{"aria-disabled":t[2]},t[3]],u={};for(let c=0;c<a.length;c+=1)u=Z(u,a[c]);return{c(){e=F("div"),n=F("div"),o&&o.c(),C(n,"role","none"),C(n,"class","inner svelte-3h03g8"),n.inert=t[2],je(e,u),re(e,"svelte-3h03g8",!0)},m(c,f){A(c,e,f),$(e,n),o&&o.m(n,null),s=!0},p(c,[f]){o&&o.p&&(!s||f&16)&&Ee(o,l,c,c[4],s?Se(l,c[4],f,null):Te(c[4]),null),(!s||f&4)&&(n.inert=c[2]),je(e,u=Ge(a,[{role:"group"},(!s||f&1&&i!==(i="sui group "+c[0]))&&{class:i},(!s||f&2&&r!==(r=c[1]||void 0))&&{hidden:r},(!s||f&2)&&{"aria-hidden":c[1]},(!s||f&4)&&{"aria-disabled":c[2]},f&8&&c[3]])),re(e,"svelte-3h03g8",!0)},i(c){s||(_(o,c),s=!0)},o(c){y(o,c),s=!1},d(c){c&&T(e),o&&o.d(c)}}}function sD(t,e,n){const i=["class","hidden","disabled"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{class:o=""}=e,{hidden:a=void 0}=e,{disabled:u=!1}=e;return t.$$set=c=>{e=Z(Z({},e),tt(c)),n(3,r=he(e,i)),"class"in c&&n(0,o=c.class),"hidden"in c&&n(1,a=c.hidden),"disabled"in c&&n(2,u=c.disabled),"$$scope"in c&&n(4,l=c.$$scope)},[o,a,u,r,l,s]}class Tn extends ie{constructor(e){super(),ne(this,e,sD,rD,te,{class:0,hidden:1,disabled:2},iD)}}const mS=({fallbackLocale:t="en",initialLocale:e="en"}={})=>{let n=Object.assign({"./locales/en.js":ZT,"./locales/ja.js":XT});Object.keys(n).length||(n=Object.assign({"/src/lib/locales/en.js":t2,"/src/lib/locales/ja.js":n2})),Object.entries(n).forEach(([i,{strings:r}])=>{const[,s]=i.match(/([a-zA-Z-]+)\.js/);Ep(s,{_sui:r})}),yA({fallbackLocale:t,initialLocale:e})};mS();const Bh='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>';var Rd={exports:{}};/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */var K1;function Z1(){return K1||(K1=1,function(t,e){(function(n,i){t.exports=i()})(ah,function(){const{entries:n,setPrototypeOf:i,isFrozen:r,getPrototypeOf:s,getOwnPropertyDescriptor:l}=Object;let{freeze:o,seal:a,create:u}=Object,{apply:c,construct:f}=typeof Reflect<"u"&&Reflect;o||(o=function(Me){return Me}),a||(a=function(Me){return Me}),c||(c=function(Me,Oe,ut){return Me.apply(Oe,ut)}),f||(f=function(Me,Oe){return new Me(...Oe)});const d=M(Array.prototype.forEach),h=M(Array.prototype.pop),m=M(Array.prototype.push),p=M(String.prototype.toLowerCase),g=M(String.prototype.toString),v=M(String.prototype.match),b=M(String.prototype.replace),w=M(String.prototype.indexOf),k=M(String.prototype.trim),S=M(Object.prototype.hasOwnProperty),E=M(RegExp.prototype.test),P=I(TypeError);function M(lt){return function(Me){for(var Oe=arguments.length,ut=new Array(Oe>1?Oe-1:0),Xt=1;Xt<Oe;Xt++)ut[Xt-1]=arguments[Xt];return c(lt,Me,ut)}}function I(lt){return function(){for(var Me=arguments.length,Oe=new Array(Me),ut=0;ut<Me;ut++)Oe[ut]=arguments[ut];return f(lt,Oe)}}function D(lt,Me){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;i&&i(lt,null);let ut=Me.length;for(;ut--;){let Xt=Me[ut];if(typeof Xt=="string"){const Rt=Oe(Xt);Rt!==Xt&&(r(Me)||(Me[ut]=Rt),Xt=Rt)}lt[Xt]=!0}return lt}function z(lt){for(let Me=0;Me<lt.length;Me++)S(lt,Me)||(lt[Me]=null);return lt}function R(lt){const Me=u(null);for(const[Oe,ut]of n(lt))S(lt,Oe)&&(Array.isArray(ut)?Me[Oe]=z(ut):ut&&typeof ut=="object"&&ut.constructor===Object?Me[Oe]=R(ut):Me[Oe]=ut);return Me}function U(lt,Me){for(;lt!==null;){const ut=l(lt,Me);if(ut){if(ut.get)return M(ut.get);if(typeof ut.value=="function")return M(ut.value)}lt=s(lt)}function Oe(){return null}return Oe}const W=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ee=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),K=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ve=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),me=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),se=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=o(["#text"]),J=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Le=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_e=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Be=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ke=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),de=a(/<%[\w\W]*|[\w\W]*%>/gm),ge=a(/\${[\w\W]*}/gm),pe=a(/^data-[\-\w.\u00B7-\uFFFF]/),We=a(/^aria-[\-\w]+$/),ot=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oe=a(/^(?:\w+script|data):/i),Ne=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qe=a(/^html$/i),rt=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var pt=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ke,ERB_EXPR:de,TMPLIT_EXPR:ge,DATA_ATTR:pe,ARIA_ATTR:We,IS_ALLOWED_URI:ot,IS_SCRIPT_OR_DATA:oe,ATTR_WHITESPACE:Ne,DOCTYPE_NAME:Qe,CUSTOM_ELEMENT:rt});const Jt=function(){return typeof window>"u"?null:window},Ot=function(Me,Oe){if(typeof Me!="object"||typeof Me.createPolicy!="function")return null;let ut=null;const Xt="data-tt-policy-suffix";Oe&&Oe.hasAttribute(Xt)&&(ut=Oe.getAttribute(Xt));const Rt="dompurify"+(ut?"#"+ut:"");try{return Me.createPolicy(Rt,{createHTML(qe){return qe},createScriptURL(qe){return qe}})}catch{return console.warn("TrustedTypes policy "+Rt+" could not be created."),null}};function st(){let lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt();const Me=nt=>st(nt);if(Me.version="3.1.0",Me.removed=[],!lt||!lt.document||lt.document.nodeType!==9)return Me.isSupported=!1,Me;let{document:Oe}=lt;const ut=Oe,Xt=ut.currentScript,{DocumentFragment:Rt,HTMLTemplateElement:qe,Node:ct,Element:bi,NodeFilter:bs,NamedNodeMap:Jf=lt.NamedNodeMap||lt.MozNamedAttrMap,HTMLFormElement:Pe,DOMParser:dt,trustedTypes:$t}=lt,pr=bi.prototype,il=U(pr,"cloneNode"),mr=U(pr,"nextSibling"),Xf=U(pr,"childNodes"),Qf=U(pr,"parentNode");if(typeof qe=="function"){const nt=Oe.createElement("template");nt.content&&nt.content.ownerDocument&&(Oe=nt.content.ownerDocument)}let Dn,To="";const{implementation:ed,createNodeIterator:pT,createDocumentFragment:mT,getElementsByTagName:gT}=Oe,{importNode:_T}=ut;let er={};Me.isSupported=typeof n=="function"&&typeof Qf=="function"&&ed&&ed.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:td,ERB_EXPR:nd,TMPLIT_EXPR:id,DATA_ATTR:bT,ARIA_ATTR:vT,IS_SCRIPT_OR_DATA:yT,ATTR_WHITESPACE:wg,CUSTOM_ELEMENT:wT}=pt;let{IS_ALLOWED_URI:kg}=pt,gn=null;const Sg=D({},[...W,...ee,...K,...me,...q]);let _n=null;const Eg=D({},[...J,...Le,..._e,...Be]);let Qt=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ao=null,rd=null,Tg=!0,sd=!0,Ag=!1,Cg=!0,rl=!1,Ng=!0,vs=!1,ld=!1,od=!1,sl=!1,uu=!1,cu=!1,Lg=!0,Og=!1;const kT="user-content-";let ad=!0,Co=!1,ll={},ol=null;const Pg=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ig=null;const Dg=D({},["audio","video","img","source","image","track"]);let ud=null;const Mg=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fu="http://www.w3.org/1998/Math/MathML",du="http://www.w3.org/2000/svg",gr="http://www.w3.org/1999/xhtml";let al=gr,cd=!1,fd=null;const ST=D({},[fu,du,gr],g);let No=null;const ET=["application/xhtml+xml","text/html"],TT="text/html";let bn=null,ul=null;const AT=Oe.createElement("form"),Rg=function(Y){return Y instanceof RegExp||Y instanceof Function},dd=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ul&&ul===Y)){if((!Y||typeof Y!="object")&&(Y={}),Y=R(Y),No=ET.indexOf(Y.PARSER_MEDIA_TYPE)===-1?TT:Y.PARSER_MEDIA_TYPE,bn=No==="application/xhtml+xml"?g:p,gn=S(Y,"ALLOWED_TAGS")?D({},Y.ALLOWED_TAGS,bn):Sg,_n=S(Y,"ALLOWED_ATTR")?D({},Y.ALLOWED_ATTR,bn):Eg,fd=S(Y,"ALLOWED_NAMESPACES")?D({},Y.ALLOWED_NAMESPACES,g):ST,ud=S(Y,"ADD_URI_SAFE_ATTR")?D(R(Mg),Y.ADD_URI_SAFE_ATTR,bn):Mg,Ig=S(Y,"ADD_DATA_URI_TAGS")?D(R(Dg),Y.ADD_DATA_URI_TAGS,bn):Dg,ol=S(Y,"FORBID_CONTENTS")?D({},Y.FORBID_CONTENTS,bn):Pg,Ao=S(Y,"FORBID_TAGS")?D({},Y.FORBID_TAGS,bn):{},rd=S(Y,"FORBID_ATTR")?D({},Y.FORBID_ATTR,bn):{},ll=S(Y,"USE_PROFILES")?Y.USE_PROFILES:!1,Tg=Y.ALLOW_ARIA_ATTR!==!1,sd=Y.ALLOW_DATA_ATTR!==!1,Ag=Y.ALLOW_UNKNOWN_PROTOCOLS||!1,Cg=Y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rl=Y.SAFE_FOR_TEMPLATES||!1,Ng=Y.SAFE_FOR_XML!==!1,vs=Y.WHOLE_DOCUMENT||!1,sl=Y.RETURN_DOM||!1,uu=Y.RETURN_DOM_FRAGMENT||!1,cu=Y.RETURN_TRUSTED_TYPE||!1,od=Y.FORCE_BODY||!1,Lg=Y.SANITIZE_DOM!==!1,Og=Y.SANITIZE_NAMED_PROPS||!1,ad=Y.KEEP_CONTENT!==!1,Co=Y.IN_PLACE||!1,kg=Y.ALLOWED_URI_REGEXP||ot,al=Y.NAMESPACE||gr,Qt=Y.CUSTOM_ELEMENT_HANDLING||{},Y.CUSTOM_ELEMENT_HANDLING&&Rg(Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Qt.tagNameCheck=Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&Rg(Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Qt.attributeNameCheck=Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Y.CUSTOM_ELEMENT_HANDLING&&typeof Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Qt.allowCustomizedBuiltInElements=Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),rl&&(sd=!1),uu&&(sl=!0),ll&&(gn=D({},q),_n=[],ll.html===!0&&(D(gn,W),D(_n,J)),ll.svg===!0&&(D(gn,ee),D(_n,Le),D(_n,Be)),ll.svgFilters===!0&&(D(gn,K),D(_n,Le),D(_n,Be)),ll.mathMl===!0&&(D(gn,me),D(_n,_e),D(_n,Be))),Y.ADD_TAGS&&(gn===Sg&&(gn=R(gn)),D(gn,Y.ADD_TAGS,bn)),Y.ADD_ATTR&&(_n===Eg&&(_n=R(_n)),D(_n,Y.ADD_ATTR,bn)),Y.ADD_URI_SAFE_ATTR&&D(ud,Y.ADD_URI_SAFE_ATTR,bn),Y.FORBID_CONTENTS&&(ol===Pg&&(ol=R(ol)),D(ol,Y.FORBID_CONTENTS,bn)),ad&&(gn["#text"]=!0),vs&&D(gn,["html","head","body"]),gn.table&&(D(gn,["tbody"]),delete Ao.tbody),Y.TRUSTED_TYPES_POLICY){if(typeof Y.TRUSTED_TYPES_POLICY.createHTML!="function")throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Dn=Y.TRUSTED_TYPES_POLICY,To=Dn.createHTML("")}else Dn===void 0&&(Dn=Ot($t,Xt)),Dn!==null&&typeof To=="string"&&(To=Dn.createHTML(""));o&&o(Y),ul=Y}},$g=D({},["mi","mo","mn","ms","mtext"]),Fg=D({},["foreignobject","desc","title","annotation-xml"]),CT=D({},["title","style","font","a","script"]),zg=D({},[...ee,...K,...ve]),jg=D({},[...me,...se]),NT=function(Y){let Ae=Qf(Y);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:al,tagName:"template"});const Ze=p(Y.tagName),Ft=p(Ae.tagName);return fd[Y.namespaceURI]?Y.namespaceURI===du?Ae.namespaceURI===gr?Ze==="svg":Ae.namespaceURI===fu?Ze==="svg"&&(Ft==="annotation-xml"||$g[Ft]):!!zg[Ze]:Y.namespaceURI===fu?Ae.namespaceURI===gr?Ze==="math":Ae.namespaceURI===du?Ze==="math"&&Fg[Ft]:!!jg[Ze]:Y.namespaceURI===gr?Ae.namespaceURI===du&&!Fg[Ft]||Ae.namespaceURI===fu&&!$g[Ft]?!1:!jg[Ze]&&(CT[Ze]||!zg[Ze]):!!(No==="application/xhtml+xml"&&fd[Y.namespaceURI]):!1},_r=function(Y){m(Me.removed,{element:Y});try{Y.parentNode.removeChild(Y)}catch{Y.remove()}},hd=function(Y,Ae){try{m(Me.removed,{attribute:Ae.getAttributeNode(Y),from:Ae})}catch{m(Me.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(Y),Y==="is"&&!_n[Y])if(sl||uu)try{_r(Ae)}catch{}else try{Ae.setAttribute(Y,"")}catch{}},Bg=function(Y){let Ae=null,Ze=null;if(od)Y="<remove></remove>"+Y;else{const Nn=v(Y,/^[\r\n\t ]+/);Ze=Nn&&Nn[0]}No==="application/xhtml+xml"&&al===gr&&(Y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Y+"</body></html>");const Ft=Dn?Dn.createHTML(Y):Y;if(al===gr)try{Ae=new dt().parseFromString(Ft,No)}catch{}if(!Ae||!Ae.documentElement){Ae=ed.createDocument(al,"template",null);try{Ae.documentElement.innerHTML=cd?To:Ft}catch{}}const Cn=Ae.body||Ae.documentElement;return Y&&Ze&&Cn.insertBefore(Oe.createTextNode(Ze),Cn.childNodes[0]||null),al===gr?gT.call(Ae,vs?"html":"body")[0]:vs?Ae.documentElement:Cn},Ug=function(Y){return pT.call(Y.ownerDocument||Y,Y,bs.SHOW_ELEMENT|bs.SHOW_COMMENT|bs.SHOW_TEXT|bs.SHOW_PROCESSING_INSTRUCTION|bs.SHOW_CDATA_SECTION,null)},LT=function(Y){return Y instanceof Pe&&(typeof Y.nodeName!="string"||typeof Y.textContent!="string"||typeof Y.removeChild!="function"||!(Y.attributes instanceof Jf)||typeof Y.removeAttribute!="function"||typeof Y.setAttribute!="function"||typeof Y.namespaceURI!="string"||typeof Y.insertBefore!="function"||typeof Y.hasChildNodes!="function")},qg=function(Y){return typeof ct=="function"&&Y instanceof ct},br=function(Y,Ae,Ze){er[Y]&&d(er[Y],Ft=>{Ft.call(Me,Ae,Ze,ul)})},Hg=function(Y){let Ae=null;if(br("beforeSanitizeElements",Y,null),LT(Y))return _r(Y),!0;const Ze=bn(Y.nodeName);if(br("uponSanitizeElement",Y,{tagName:Ze,allowedTags:gn}),Y.hasChildNodes()&&!qg(Y.firstElementChild)&&E(/<[/\w]/g,Y.innerHTML)&&E(/<[/\w]/g,Y.textContent)||Y.nodeType===7||Ng&&Y.nodeType===8&&E(/<[/\w]/g,Y.data))return _r(Y),!0;if(!gn[Ze]||Ao[Ze]){if(!Ao[Ze]&&Vg(Ze)&&(Qt.tagNameCheck instanceof RegExp&&E(Qt.tagNameCheck,Ze)||Qt.tagNameCheck instanceof Function&&Qt.tagNameCheck(Ze)))return!1;if(ad&&!ol[Ze]){const Ft=Qf(Y)||Y.parentNode,Cn=Xf(Y)||Y.childNodes;if(Cn&&Ft){const Nn=Cn.length;for(let Hn=Nn-1;Hn>=0;--Hn)Ft.insertBefore(il(Cn[Hn],!0),mr(Y))}}return _r(Y),!0}return Y instanceof bi&&!NT(Y)||(Ze==="noscript"||Ze==="noembed"||Ze==="noframes")&&E(/<\/no(script|embed|frames)/i,Y.innerHTML)?(_r(Y),!0):(rl&&Y.nodeType===3&&(Ae=Y.textContent,d([td,nd,id],Ft=>{Ae=b(Ae,Ft," ")}),Y.textContent!==Ae&&(m(Me.removed,{element:Y.cloneNode()}),Y.textContent=Ae)),br("afterSanitizeElements",Y,null),!1)},xg=function(Y,Ae,Ze){if(Lg&&(Ae==="id"||Ae==="name")&&(Ze in Oe||Ze in AT))return!1;if(!(sd&&!rd[Ae]&&E(bT,Ae))){if(!(Tg&&E(vT,Ae))){if(!_n[Ae]||rd[Ae]){if(!(Vg(Y)&&(Qt.tagNameCheck instanceof RegExp&&E(Qt.tagNameCheck,Y)||Qt.tagNameCheck instanceof Function&&Qt.tagNameCheck(Y))&&(Qt.attributeNameCheck instanceof RegExp&&E(Qt.attributeNameCheck,Ae)||Qt.attributeNameCheck instanceof Function&&Qt.attributeNameCheck(Ae))||Ae==="is"&&Qt.allowCustomizedBuiltInElements&&(Qt.tagNameCheck instanceof RegExp&&E(Qt.tagNameCheck,Ze)||Qt.tagNameCheck instanceof Function&&Qt.tagNameCheck(Ze))))return!1}else if(!ud[Ae]){if(!E(kg,b(Ze,wg,""))){if(!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&Y!=="script"&&w(Ze,"data:")===0&&Ig[Y])){if(!(Ag&&!E(yT,b(Ze,wg,"")))){if(Ze)return!1}}}}}}return!0},Vg=function(Y){return Y!=="annotation-xml"&&v(Y,wT)},Wg=function(Y){br("beforeSanitizeAttributes",Y,null);const{attributes:Ae}=Y;if(!Ae)return;const Ze={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_n};let Ft=Ae.length;for(;Ft--;){const Cn=Ae[Ft],{name:Nn,namespaceURI:Hn,value:ys}=Cn,Lo=bn(Nn);let xn=Nn==="value"?ys:k(ys);if(Ze.attrName=Lo,Ze.attrValue=xn,Ze.keepAttr=!0,Ze.forceKeepAttr=void 0,br("uponSanitizeAttribute",Y,Ze),xn=Ze.attrValue,Ze.forceKeepAttr||(hd(Nn,Y),!Ze.keepAttr))continue;if(!Cg&&E(/\/>/i,xn)){hd(Nn,Y);continue}rl&&d([td,nd,id],Gg=>{xn=b(xn,Gg," ")});const Yg=bn(Y.nodeName);if(xg(Yg,Lo,xn)){if(Og&&(Lo==="id"||Lo==="name")&&(hd(Nn,Y),xn=kT+xn),Dn&&typeof $t=="object"&&typeof $t.getAttributeType=="function"&&!Hn)switch($t.getAttributeType(Yg,Lo)){case"TrustedHTML":{xn=Dn.createHTML(xn);break}case"TrustedScriptURL":{xn=Dn.createScriptURL(xn);break}}try{Hn?Y.setAttributeNS(Hn,Nn,xn):Y.setAttribute(Nn,xn),h(Me.removed)}catch{}}}br("afterSanitizeAttributes",Y,null)},OT=function nt(Y){let Ae=null;const Ze=Ug(Y);for(br("beforeSanitizeShadowDOM",Y,null);Ae=Ze.nextNode();)br("uponSanitizeShadowNode",Ae,null),!Hg(Ae)&&(Ae.content instanceof Rt&&nt(Ae.content),Wg(Ae));br("afterSanitizeShadowDOM",Y,null)};return Me.sanitize=function(nt){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=null,Ze=null,Ft=null,Cn=null;if(cd=!nt,cd&&(nt="<!-->"),typeof nt!="string"&&!qg(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw P("dirty is not a string, aborting")}else throw P("toString is not a function");if(!Me.isSupported)return nt;if(ld||dd(Y),Me.removed=[],typeof nt=="string"&&(Co=!1),Co){if(nt.nodeName){const ys=bn(nt.nodeName);if(!gn[ys]||Ao[ys])throw P("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof ct)Ae=Bg("<!---->"),Ze=Ae.ownerDocument.importNode(nt,!0),Ze.nodeType===1&&Ze.nodeName==="BODY"||Ze.nodeName==="HTML"?Ae=Ze:Ae.appendChild(Ze);else{if(!sl&&!rl&&!vs&&nt.indexOf("<")===-1)return Dn&&cu?Dn.createHTML(nt):nt;if(Ae=Bg(nt),!Ae)return sl?null:cu?To:""}Ae&&od&&_r(Ae.firstChild);const Nn=Ug(Co?nt:Ae);for(;Ft=Nn.nextNode();)Hg(Ft)||(Ft.content instanceof Rt&&OT(Ft.content),Wg(Ft));if(Co)return nt;if(sl){if(uu)for(Cn=mT.call(Ae.ownerDocument);Ae.firstChild;)Cn.appendChild(Ae.firstChild);else Cn=Ae;return(_n.shadowroot||_n.shadowrootmode)&&(Cn=_T.call(ut,Cn,!0)),Cn}let Hn=vs?Ae.outerHTML:Ae.innerHTML;return vs&&gn["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&E(Qe,Ae.ownerDocument.doctype.name)&&(Hn="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
|
|
74
|
+
`+Hn),rl&&d([td,nd,id],ys=>{Hn=b(Hn,ys," ")}),Dn&&cu?Dn.createHTML(Hn):Hn},Me.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dd(nt),ld=!0},Me.clearConfig=function(){ul=null,ld=!1},Me.isValidAttribute=function(nt,Y,Ae){ul||dd({});const Ze=bn(nt),Ft=bn(Y);return xg(Ze,Ft,Ae)},Me.addHook=function(nt,Y){typeof Y=="function"&&(er[nt]=er[nt]||[],m(er[nt],Y))},Me.removeHook=function(nt){if(er[nt])return h(er[nt])},Me.removeHooks=function(nt){er[nt]&&(er[nt]=[])},Me.removeAllHooks=function(){er={}},Me}var mn=st();return mn})}(Rd)),Rd.exports}var lD=window.DOMPurify||(window.DOMPurify=Z1().default||Z1());const kn=yp(lD);function sm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Xs=sm();function gS(t){Xs=t}const _S=/[&<>"']/,oD=new RegExp(_S.source,"g"),bS=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,aD=new RegExp(bS.source,"g"),uD={"&":"&","<":"<",">":">",'"':""","'":"'"},J1=t=>uD[t];function oi(t,e){if(e){if(_S.test(t))return t.replace(oD,J1)}else if(bS.test(t))return t.replace(aD,J1);return t}const cD=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function fD(t){return t.replace(cD,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const dD=/(^|[^\[])\^/g;function Dt(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const i={replace:(r,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(dD,"$1"),n=n.replace(r,l),i},getRegex:()=>new RegExp(n,e)};return i}function X1(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Ko={exec:()=>null};function Q1(t,e){const n=t.replace(/\|/g,(s,l,o)=>{let a=!1,u=l;for(;--u>=0&&o[u]==="\\";)a=!a;return a?"|":" |"}),i=n.split(/ \|/);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(/\\\|/g,"|");return i}function wu(t,e,n){const i=t.length;if(i===0)return"";let r=0;for(;r<i;){const s=t.charAt(i-r-1);if(s===e&&!n)r++;else if(s!==e&&n)r++;else break}return t.slice(0,i-r)}function hD(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return-1}function e0(t,e,n,i){const r=e.href,s=e.title?oi(e.title):null,l=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){i.state.inLink=!0;const o={type:"link",raw:n,href:r,title:s,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,o}return{type:"image",raw:n,href:r,title:s,text:oi(l)}}function pD(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const i=n[1];return e.split(`
|
|
75
|
+
`).map(r=>{const s=r.match(/^\s+/);if(s===null)return r;const[l]=s;return l.length>=i.length?r.slice(i.length):r}).join(`
|
|
76
|
+
`)}class yc{options;rules;lexer;constructor(e){this.options=e||Xs}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const i=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:wu(i,`
|
|
77
|
+
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const i=n[0],r=pD(i,n[3]||"");return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let i=n[2].trim();if(/#$/.test(i)){const r=wu(i,"#");(this.options.pedantic||!r||/ $/.test(r))&&(i=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let i=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
78
|
+
$1`);i=wu(i.replace(/^ *>[ \t]?/gm,""),`
|
|
79
|
+
`);const r=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(i);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:s,text:i}}}list(e){let n=this.rules.block.list.exec(e);if(n){let i=n[1].trim();const r=i.length>1,s={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");const l=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let o="",a="",u=!1;for(;e;){let c=!1;if(!(n=l.exec(e))||this.rules.block.hr.test(e))break;o=n[0],e=e.substring(o.length);let f=n[2].split(`
|
|
80
|
+
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),d=e.split(`
|
|
81
|
+
`,1)[0],h=0;this.options.pedantic?(h=2,a=f.trimStart()):(h=n[2].search(/[^ ]/),h=h>4?1:h,a=f.slice(h),h+=n[1].length);let m=!1;if(!f&&/^ *$/.test(d)&&(o+=d+`
|
|
82
|
+
`,e=e.substring(d.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const S=e.split(`
|
|
83
|
+
`,1)[0];if(d=S,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(d)||k.test(d)||v.test(d)||b.test(e))break;if(d.search(/[^ ]/)>=h||!d.trim())a+=`
|
|
84
|
+
`+d.slice(h);else{if(m||f.search(/[^ ]/)>=4||w.test(f)||k.test(f)||b.test(f))break;a+=`
|
|
85
|
+
`+d}!m&&!d.trim()&&(m=!0),o+=S+`
|
|
86
|
+
`,e=e.substring(S.length+1),f=d.slice(h)}}s.loose||(u?s.loose=!0:/\n *\n *$/.test(o)&&(u=!0));let p=null,g;this.options.gfm&&(p=/^\[[ xX]\] /.exec(a),p&&(g=p[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:o,task:!!p,checked:g,loose:!1,text:a,tokens:[]}),s.raw+=o}s.items[s.items.length-1].raw=o.trimEnd(),s.items[s.items.length-1].text=a.trimEnd(),s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){const f=s.items[c].tokens.filter(h=>h.type==="space"),d=f.length>0&&f.some(h=>/\n.*\n/.test(h.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(e){const n=this.rules.block.def.exec(e);if(n){const i=n[1].toLowerCase().replace(/\s+/g," "),r=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:r,title:s}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;const i=Q1(n[1]),r=n[2].replace(/^\||\| *$/g,"").split("|"),s=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
87
|
+
`):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===r.length){for(const o of r)/^ *-+: *$/.test(o)?l.align.push("right"):/^ *:-+: *$/.test(o)?l.align.push("center"):/^ *:-+ *$/.test(o)?l.align.push("left"):l.align.push(null);for(const o of i)l.header.push({text:o,tokens:this.lexer.inline(o)});for(const o of s)l.rows.push(Q1(o,l.header.length).map(a=>({text:a,tokens:this.lexer.inline(a)})));return l}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const i=n[1].charAt(n[1].length-1)===`
|
|
88
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:oi(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const i=n[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const l=wu(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{const l=hD(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let r=n[2],s="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],s=l[3])}else s=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(i)?r=r.slice(1):r=r.slice(1,-1)),e0(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const r=(i[2]||i[1]).replace(/\s+/g," "),s=n[r.toLowerCase()];if(!s){const l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return e0(i,s,i[0],this.lexer)}}emStrong(e,n,i=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const l=[...r[0]].length-1;let o,a,u=l,c=0;const f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,n=n.slice(-1*e.length+l);(r=f.exec(n))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){u+=a;continue}else if((r[5]||r[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const d=[...r[0]][0].length,h=e.slice(0,l+r.index+d+a);if(Math.min(l,a)%2){const p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}const m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let i=n[2].replace(/\n/g," ");const r=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return r&&s&&(i=i.substring(1,i.length-1)),i=oi(i,!0),{type:"codespan",raw:n[0],text:i}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let i,r;return n[2]==="@"?(i=oi(n[1]),r="mailto:"+i):(i=oi(n[1]),r=i),{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let i,r;if(n[2]==="@")i=oi(n[0]),r="mailto:"+i;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(s!==n[0]);i=oi(n[0]),n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let i;return this.lexer.state.inRawBlock?i=n[0]:i=oi(n[0]),{type:"text",raw:n[0],text:i}}}}const mD=/^(?: *(?:\n|$))+/,gD=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,_D=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Va=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bD=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vS=/(?:[*+-]|\d{1,9}[.)])/,yS=Dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,vS).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),lm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vD=/^[^\n]+/,om=/(?!\s*\])(?:\\.|[^\[\]\\])+/,yD=Dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",om).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wD=Dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vS).getRegex(),_f="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",am=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kD=Dt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",am).replace("tag",_f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wS=Dt(lm).replace("hr",Va).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_f).getRegex(),SD=Dt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wS).getRegex(),um={blockquote:SD,code:gD,def:yD,fences:_D,heading:bD,hr:Va,html:kD,lheading:yS,list:wD,newline:mD,paragraph:wS,table:Ko,text:vD},t0=Dt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Va).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_f).getRegex(),ED={...um,table:t0,paragraph:Dt(lm).replace("hr",Va).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",t0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_f).getRegex()},TD={...um,html:Dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",am).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ko,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Dt(lm).replace("hr",Va).replace("heading",` *#{1,6} *[^
|
|
89
|
+
]`).replace("lheading",yS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,AD=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,SS=/^( {2,}|\\)\n(?!\s*$)/,CD=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wa="\\p{P}\\p{S}",ND=Dt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Wa).getRegex(),LD=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,OD=Dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Wa).getRegex(),PD=Dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Wa).getRegex(),ID=Dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Wa).getRegex(),DD=Dt(/\\([punct])/,"gu").replace(/punct/g,Wa).getRegex(),MD=Dt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),RD=Dt(am).replace("(?:-->|$)","-->").getRegex(),$D=Dt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",RD).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,FD=Dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",wc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ES=Dt(/^!?\[(label)\]\[(ref)\]/).replace("label",wc).replace("ref",om).getRegex(),TS=Dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",om).getRegex(),zD=Dt("reflink|nolink(?!\\()","g").replace("reflink",ES).replace("nolink",TS).getRegex(),cm={_backpedal:Ko,anyPunctuation:DD,autolink:MD,blockSkip:LD,br:SS,code:AD,del:Ko,emStrongLDelim:OD,emStrongRDelimAst:PD,emStrongRDelimUnd:ID,escape:kS,link:FD,nolink:TS,punctuation:ND,reflink:ES,reflinkSearch:zD,tag:$D,text:CD,url:Ko},jD={...cm,link:Dt(/^!?\[(label)\]\((.*?)\)/).replace("label",wc).getRegex(),reflink:Dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wc).getRegex()},Uh={...cm,escape:Dt(kS).replace("])","~|])").getRegex(),url:Dt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},BD={...Uh,br:Dt(SS).replace("{2,}","*").getRegex(),text:Dt(Uh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ku={normal:um,gfm:ED,pedantic:TD},Mo={normal:cm,gfm:Uh,breaks:BD,pedantic:jD};class ir{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Xs,this.options.tokenizer=this.options.tokenizer||new yc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:ku.normal,inline:Mo.normal};this.options.pedantic?(n.block=ku.pedantic,n.inline=Mo.pedantic):this.options.gfm&&(n.block=ku.gfm,this.options.breaks?n.inline=Mo.breaks:n.inline=Mo.gfm),this.tokenizer.rules=n}static get rules(){return{block:ku,inline:Mo}}static lex(e,n){return new ir(n).lex(e)}static lexInline(e,n){return new ir(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
|
|
90
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(o,a,u)=>a+" ".repeat(u.length));let i,r,s,l;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
91
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
92
|
+
`+i.raw,r.text+=`
|
|
93
|
+
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
94
|
+
`+i.raw,r.text+=`
|
|
95
|
+
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const a=e.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){r=n[n.length-1],l&&r.type==="paragraph"?(r.raw+=`
|
|
96
|
+
`+i.raw,r.text+=`
|
|
97
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i),l=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),r=n[n.length-1],r&&r.type==="text"?(r.raw+=`
|
|
98
|
+
`+i.raw,r.text+=`
|
|
99
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let i,r,s,l=e,o,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(i=c.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.emStrong(e,l,u)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),n.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),n.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const f=e.slice(1);let d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},f),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(s=e.substring(0,c+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(u=i.raw.slice(-1)),a=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class kc{options;constructor(e){this.options=e||Xs}code(e,n,i){const r=(n||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+`
|
|
100
|
+
`,r?'<pre><code class="language-'+oi(r)+'">'+(i?e:oi(e,!0))+`</code></pre>
|
|
101
|
+
`:"<pre><code>"+(i?e:oi(e,!0))+`</code></pre>
|
|
102
|
+
`}blockquote(e){return`<blockquote>
|
|
103
|
+
${e}</blockquote>
|
|
104
|
+
`}html(e,n){return e}heading(e,n,i){return`<h${n}>${e}</h${n}>
|
|
105
|
+
`}hr(){return`<hr>
|
|
106
|
+
`}list(e,n,i){const r=n?"ol":"ul",s=n&&i!==1?' start="'+i+'"':"";return"<"+r+s+`>
|
|
107
|
+
`+e+"</"+r+`>
|
|
108
|
+
`}listitem(e,n,i){return`<li>${e}</li>
|
|
109
|
+
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
|
|
110
|
+
`}table(e,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
111
|
+
<thead>
|
|
112
|
+
`+e+`</thead>
|
|
113
|
+
`+n+`</table>
|
|
114
|
+
`}tablerow(e){return`<tr>
|
|
115
|
+
${e}</tr>
|
|
116
|
+
`}tablecell(e,n){const i=n.header?"th":"td";return(n.align?`<${i} align="${n.align}">`:`<${i}>`)+e+`</${i}>
|
|
117
|
+
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,n,i){const r=X1(e);if(r===null)return i;e=r;let s='<a href="'+e+'"';return n&&(s+=' title="'+n+'"'),s+=">"+i+"</a>",s}image(e,n,i){const r=X1(e);if(r===null)return i;e=r;let s=`<img src="${e}" alt="${i}"`;return n&&(s+=` title="${n}"`),s+=">",s}text(e){return e}}class fm{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,i){return""+i}image(e,n,i){return""+i}br(){return""}}class rr{options;renderer;textRenderer;constructor(e){this.options=e||Xs,this.options.renderer=this.options.renderer||new kc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new fm}static parse(e,n){return new rr(n).parse(e)}static parseInline(e,n){return new rr(n).parseInline(e)}parse(e,n=!0){let i="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const l=s,o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){i+=o||"";continue}}switch(s.type){case"space":continue;case"hr":{i+=this.renderer.hr();continue}case"heading":{const l=s;i+=this.renderer.heading(this.parseInline(l.tokens),l.depth,fD(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=s;i+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=s;let o="",a="";for(let c=0;c<l.header.length;c++)a+=this.renderer.tablecell(this.parseInline(l.header[c].tokens),{header:!0,align:l.align[c]});o+=this.renderer.tablerow(a);let u="";for(let c=0;c<l.rows.length;c++){const f=l.rows[c];a="";for(let d=0;d<f.length;d++)a+=this.renderer.tablecell(this.parseInline(f[d].tokens),{header:!1,align:l.align[d]});u+=this.renderer.tablerow(a)}i+=this.renderer.table(o,u);continue}case"blockquote":{const l=s,o=this.parse(l.tokens);i+=this.renderer.blockquote(o);continue}case"list":{const l=s,o=l.ordered,a=l.start,u=l.loose;let c="";for(let f=0;f<l.items.length;f++){const d=l.items[f],h=d.checked,m=d.task;let p="";if(d.task){const g=this.renderer.checkbox(!!h);u?d.tokens.length>0&&d.tokens[0].type==="paragraph"?(d.tokens[0].text=g+" "+d.tokens[0].text,d.tokens[0].tokens&&d.tokens[0].tokens.length>0&&d.tokens[0].tokens[0].type==="text"&&(d.tokens[0].tokens[0].text=g+" "+d.tokens[0].tokens[0].text)):d.tokens.unshift({type:"text",text:g+" "}):p+=g+" "}p+=this.parse(d.tokens,u),c+=this.renderer.listitem(p,m,!!h)}i+=this.renderer.list(c,o,a);continue}case"html":{const l=s;i+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=s;i+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=s,o=l.tokens?this.parseInline(l.tokens):l.text;for(;r+1<e.length&&e[r+1].type==="text";)l=e[++r],o+=`
|
|
118
|
+
`+(l.tokens?this.parseInline(l.tokens):l.text);i+=n?this.renderer.paragraph(o):o;continue}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(e,n){n=n||this.renderer;let i="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}switch(s.type){case"escape":{const l=s;i+=n.text(l.text);break}case"html":{const l=s;i+=n.html(l.text);break}case"link":{const l=s;i+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=s;i+=n.image(l.href,l.title,l.text);break}case"strong":{const l=s;i+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=s;i+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=s;i+=n.codespan(l.text);break}case"br":{i+=n.br();break}case"del":{const l=s;i+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=s;i+=n.text(l.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}}class qu{options;constructor(e){this.options=e||Xs}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class UD{defaults=sm();options=this.setOptions;parse=this.#t(ir.lex,rr.parse);parseInline=this.#t(ir.lexInline,rr.parseInline);Parser=rr;Renderer=kc;TextRenderer=fm;Lexer=ir;Tokenizer=yc;Hooks=qu;constructor(...e){this.use(...e)}walkTokens(e,n){let i=[];for(const r of e)switch(i=i.concat(n.call(this,r)),r.type){case"table":{const s=r;for(const l of s.header)i=i.concat(this.walkTokens(l.tokens,n));for(const l of s.rows)for(const o of l)i=i.concat(this.walkTokens(o.tokens,n));break}case"list":{const s=r;i=i.concat(this.walkTokens(s.items,n));break}default:{const s=r;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{const o=s[l].flat(1/0);i=i.concat(this.walkTokens(o,n))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,n)))}}return i}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{const r={...i};if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const l=n.renderers[s.name];l?n.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=l.apply(this,o)),a}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[s.level];l?l.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),r.extensions=n),i.renderer){const s=this.defaults.renderer||new kc(this.defaults);for(const l in i.renderer){if(!(l in s))throw new Error(`renderer '${l}' does not exist`);if(l==="options")continue;const o=l,a=i.renderer[o],u=s[o];s[o]=(...c)=>{let f=a.apply(s,c);return f===!1&&(f=u.apply(s,c)),f||""}}r.renderer=s}if(i.tokenizer){const s=this.defaults.tokenizer||new yc(this.defaults);for(const l in i.tokenizer){if(!(l in s))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;const o=l,a=i.tokenizer[o],u=s[o];s[o]=(...c)=>{let f=a.apply(s,c);return f===!1&&(f=u.apply(s,c)),f}}r.tokenizer=s}if(i.hooks){const s=this.defaults.hooks||new qu;for(const l in i.hooks){if(!(l in s))throw new Error(`hook '${l}' does not exist`);if(l==="options")continue;const o=l,a=i.hooks[o],u=s[o];qu.passThroughHooks.has(l)?s[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(s,c)).then(d=>u.call(s,d));const f=a.call(s,c);return u.call(s,f)}:s[o]=(...c)=>{let f=a.apply(s,c);return f===!1&&(f=u.apply(s,c)),f}}r.hooks=s}if(i.walkTokens){const s=this.defaults.walkTokens,l=i.walkTokens;r.walkTokens=function(o){let a=[];return a.push(l.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return ir.lex(e,n??this.defaults)}parser(e,n){return rr.parse(e,n??this.defaults)}#t(e,n){return(i,r)=>{const s={...r},l={...this.defaults,...s};this.defaults.async===!0&&s.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const o=this.#n(!!l.silent,!!l.async);if(typeof i>"u"||i===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(i):i).then(a=>e(a,l)).then(a=>l.hooks?l.hooks.processAllTokens(a):a).then(a=>l.walkTokens?Promise.all(this.walkTokens(a,l.walkTokens)).then(()=>a):a).then(a=>n(a,l)).then(a=>l.hooks?l.hooks.postprocess(a):a).catch(o);try{l.hooks&&(i=l.hooks.preprocess(i));let a=e(i,l);l.hooks&&(a=l.hooks.processAllTokens(a)),l.walkTokens&&this.walkTokens(a,l.walkTokens);let u=n(a,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(a){return o(a)}}}#n(e,n){return i=>{if(i.message+=`
|
|
119
|
+
Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An error occurred:</p><pre>"+oi(i.message+"",!0)+"</pre>";return n?Promise.resolve(r):r}if(n)return Promise.reject(i);throw i}}}const Us=new UD;function Tt(t,e){return Us.parse(t,e)}Tt.options=Tt.setOptions=function(t){return Us.setOptions(t),Tt.defaults=Us.defaults,gS(Tt.defaults),Tt};Tt.getDefaults=sm;Tt.defaults=Xs;Tt.use=function(...t){return Us.use(...t),Tt.defaults=Us.defaults,gS(Tt.defaults),Tt};Tt.walkTokens=function(t,e){return Us.walkTokens(t,e)};Tt.parseInline=Us.parseInline;Tt.Parser=rr;Tt.parser=rr.parse;Tt.Renderer=kc;Tt.TextRenderer=fm;Tt.Lexer=ir;Tt.lexer=ir.lex;Tt.Tokenizer=yc;Tt.Hooks=qu;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;rr.parse;ir.lex;const qD=["application/atom+xml","application/javascript","application/json","application/ld+json","application/rss+xml","application/xhtml+xml","application/xml","image/svg+xml"],pa=t=>t.startsWith("text/")||qD.includes(t),HD=async({items:t},{accept:e}={})=>{const n=e?e.trim().split(/,\s*/g):[],i=r=>new Promise(s=>{r.name.startsWith(".")?s(null):r.isFile?r.file(l=>{const o=!n.length||n.some(a=>{const[u,c]=a.split("/");return c==="*"?l.type.split("/")[0]===u:l.type===a});s(o?l:null)},()=>{s(null)}):r.createReader().readEntries(l=>{s(Promise.all(l.map(i)))})});return(await Promise.all([...t].map(r=>{const s=r.webkitGetAsEntry();return s?i(s):null}))).flat(1e5).filter(Boolean).sort((r,s)=>r.name.localeCompare(s.name))},xD=async t=>(await t.text()).replace(/\r\n/g,`
|
|
120
|
+
`),AS=async t=>{const e=typeof t=="string"?new Blob([t],{type:"text/plain"}):t,n=new FileReader;return new Promise(i=>{n.onload=()=>{i(n.result)},n.readAsDataURL(e)})},CS=async t=>(await AS(t)).split(",")[1],VD=(t,e)=>{const n=document.createElement("a"),i=URL.createObjectURL(t);n.download=e??t.name??`${Date.now()}.${t.type.split("/")[1]}`,n.href=i,n.click(),URL.revokeObjectURL(i)},NS={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(NS);const LS={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(LS);var vi=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},wl,qo,Ss;class WD{constructor(...e){wl.set(this,new Map),qo.set(this,new Map),Ss.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[i,r]of Object.entries(e)){i=i.toLowerCase(),r=r.map(o=>o.toLowerCase()),vi(this,Ss,"f").has(i)||vi(this,Ss,"f").set(i,new Set);const s=vi(this,Ss,"f").get(i);let l=!0;for(let o of r){const a=o.startsWith("*");if(o=a?o.slice(1):o,s?.add(o),l&&vi(this,qo,"f").set(i,o),l=!1,a)continue;const u=vi(this,wl,"f").get(o);if(u&&u!=i&&!n)throw new Error(`"${i} -> ${o}" conflicts with "${u} -> ${o}". Pass \`force=true\` to override this definition.`);vi(this,wl,"f").set(o,i)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/,"").toLowerCase(),i=n.replace(/^.*\./,"").toLowerCase(),r=n.length<e.length;return!(i.length<n.length-1)&&r?null:vi(this,wl,"f").get(i)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&vi(this,qo,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:vi(this,Ss,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of vi(this,Ss,"f").values())Object.freeze(e);return this}_getTestState(){return{types:vi(this,wl,"f"),extensions:vi(this,qo,"f")}}}wl=new WeakMap,qo=new WeakMap,Ss=new WeakMap;const qs=new WD(LS,NS)._freeze();class Sc{#t;#n="";#e="";constructor(e,n){this.#t=void 0,this.#n=e,this.#e=n}async#r(e){return new Promise(n=>{const i=window.indexedDB.open(this.#n,e);i.onupgradeneeded=()=>{i.result.createObjectStore(this.#e)},i.onsuccess=()=>{n(i.result)}})}async#s(){let e=await this.#r();const{version:n,objectStoreNames:i}=e;return[...i].includes(this.#e)||(e.close(),e=await this.#r(n+1)),e.onversionchange=()=>{e.close(),this.#t=void 0},e}async#i(e){this.#t??=await this.#s();const n=this.#t.transaction([this.#e],"readwrite"),i=n.objectStore(this.#e),r=e(i);return r?new Promise(s=>{r.onsuccess=()=>{s(r.result)}}):new Promise(s=>{n.oncomplete=()=>{s(void 0)}})}async set(e,n){return this.#i(i=>i.put(n,e))}async saveEntries(e){return this.#i(n=>{e.forEach(([i,r])=>{n.put(r,i)})})}async get(e){return this.#i(n=>n.get(e))}async keys(){return this.#i(e=>e.getAllKeys())}async values(){return this.#i(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((i,r)=>[i,n[r]])}async delete(e){return this.#i(n=>n.delete(e))}async deleteEntries(e){return this.#i(n=>{e.forEach(i=>{n.delete(i)})})}async clear(){return this.#i(e=>e.clear())}}class Zt{static async set(e,n){window.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=window.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){window.localStorage.removeItem(e)}static async clear(){window.localStorage.clear()}static async keys(){return Object.keys(window.localStorage)}static async values(){return Object.values(window.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(window.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const OS=Xe(!1),PS=async({backendName:t,authURL:e})=>{const{availHeight:r,availWidth:s}=window.screen,l=r/2-800/2,o=s/2-600/2,a=window.open(e,"auth",`width=600,height=800,top=${l},left=${o}`);return new Promise((u,c)=>{const f=t==="github"?setInterval(()=>{a?.closed&&(clearInterval(f),c(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,d=({origin:h,data:m})=>{if(h!==new URL(e).origin||typeof m!="string")return;const p=t;if(m===`authorizing:${p}`){a?.postMessage(m,h);return}const[,,g]=m.match(`^authorization:${p}:(success|error):(.+)`)??[];let v;try{v=g?JSON.parse(g):{error:"No data"}}catch{v={error:"Malformed data"}}typeof v?.token=="string"?u(v.token):c(new Error("Authentication failed",{cause:new Error(v?.errorCode?le(ue)(`sign_in_error.${v.errorCode}`,{default:v?.error}):v?.error)})),window.removeEventListener("message",d),clearInterval(f),a?.close()};window.addEventListener("message",d)})},IS=async({backendName:t,siteDomain:e,authURL:n,scope:i})=>{const r=new URLSearchParams({provider:t,site_id:e,scope:i});return PS({backendName:t,authURL:`${n}?${r.toString()}`})},YD=async()=>{const t=`${_h()}${_h()}`,e=btoa(await la(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:ki().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},GD=async({backendName:t,clientId:e,authURL:n,scope:i})=>{const{csrfToken:r,codeVerifier:s,codeChallenge:l}=await YD(),{origin:o,pathname:a}=window.location,u=`${o}${a}`,c=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:r,scope:i,code_challenge:l,code_challenge_method:"S256"});return await Zt.set("sveltia-cms.auth",{csrfToken:r,codeVerifier:s,realAuthURL:`${n}?${c.toString()}`}),await Zt.set("sveltia-cms.user",{backendName:t}),PS({backendName:t,authURL:u})},Su=({provider:t="unknown",token:e,error:n,errorCode:i})=>{const r=n?"error":"success",s=n?{provider:t,error:n,errorCode:i}:{provider:t,token:e};window.addEventListener("message",({data:l,origin:o})=>{l===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${r}:${JSON.stringify(s)}`,o)}),window.opener?.postMessage(`authorizing:${t}`,"*")},KD=async({backendName:t,clientId:e,authURL:n,code:i,state:r})=>{const{origin:s,pathname:l}=new URL(window.location.href),{csrfToken:o,codeVerifier:a}=await Zt.get("sveltia-cms.auth")??{},u=t,c=`${s}${l}`;if(await Zt.delete("sveltia-cms.auth"),!o||!a||r!==o)return Su({provider:u,error:le(ue)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,d="",h="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({client_id:e,code:i,grant_type:"authorization_code",redirect_uri:c,code_verifier:a})})}catch{}if(!f)return Su({provider:u,error:le(ue)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:d,error:h}=await f.json())}catch{return Su({provider:u,error:le(ue)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return Su({provider:u,token:d,error:h})},ZD=async({backendName:t,clientId:e,authURL:n})=>{OS.set(!0);const{search:i}=window.location,{code:r,state:s}=Object.fromEntries(new URLSearchParams(i));if(r&&s)await KD({backendName:t,clientId:e,authURL:n,code:r,state:s});else{const{realAuthURL:l}=await Zt.get("sveltia-cms.auth")??{};l&&(window.location.href=l)}},Ei=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),DS=t=>Array.isArray(t)&&t.every(e=>Ei(e)),dm=Symbol.for("yaml.alias"),qh=Symbol.for("yaml.document"),ns=Symbol.for("yaml.map"),MS=Symbol.for("yaml.pair"),Fr=Symbol.for("yaml.scalar"),po=Symbol.for("yaml.seq"),Oi=Symbol.for("yaml.node.type"),Qs=t=>!!t&&typeof t=="object"&&t[Oi]===dm,mo=t=>!!t&&typeof t=="object"&&t[Oi]===qh,go=t=>!!t&&typeof t=="object"&&t[Oi]===ns,Wt=t=>!!t&&typeof t=="object"&&t[Oi]===MS,zt=t=>!!t&&typeof t=="object"&&t[Oi]===Fr,_o=t=>!!t&&typeof t=="object"&&t[Oi]===po;function Kt(t){if(t&&typeof t=="object")switch(t[Oi]){case ns:case po:return!0}return!1}function rn(t){if(t&&typeof t=="object")switch(t[Oi]){case dm:case ns:case Fr:case po:return!0}return!1}const JD=t=>(zt(t)||Kt(t))&&!!t.anchor,Yn=Symbol("break visit"),RS=Symbol("skip children"),sr=Symbol("remove node");function us(t,e){const n=$S(e);mo(t)?Al(null,t.contents,n,Object.freeze([t]))===sr&&(t.contents=null):Al(null,t,n,Object.freeze([]))}us.BREAK=Yn;us.SKIP=RS;us.REMOVE=sr;function Al(t,e,n,i){const r=FS(t,e,n,i);if(rn(r)||Wt(r))return zS(t,i,r),Al(t,r,n,i);if(typeof r!="symbol"){if(Kt(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){const l=Al(s,e.items[s],n,i);if(typeof l=="number")s=l-1;else{if(l===Yn)return Yn;l===sr&&(e.items.splice(s,1),s-=1)}}}else if(Wt(e)){i=Object.freeze(i.concat(e));const s=Al("key",e.key,n,i);if(s===Yn)return Yn;s===sr&&(e.key=null);const l=Al("value",e.value,n,i);if(l===Yn)return Yn;l===sr&&(e.value=null)}}return r}async function bf(t,e){const n=$S(e);mo(t)?await Cl(null,t.contents,n,Object.freeze([t]))===sr&&(t.contents=null):await Cl(null,t,n,Object.freeze([]))}bf.BREAK=Yn;bf.SKIP=RS;bf.REMOVE=sr;async function Cl(t,e,n,i){const r=await FS(t,e,n,i);if(rn(r)||Wt(r))return zS(t,i,r),Cl(t,r,n,i);if(typeof r!="symbol"){if(Kt(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){const l=await Cl(s,e.items[s],n,i);if(typeof l=="number")s=l-1;else{if(l===Yn)return Yn;l===sr&&(e.items.splice(s,1),s-=1)}}}else if(Wt(e)){i=Object.freeze(i.concat(e));const s=await Cl("key",e.key,n,i);if(s===Yn)return Yn;s===sr&&(e.key=null);const l=await Cl("value",e.value,n,i);if(l===Yn)return Yn;l===sr&&(e.value=null)}}return r}function $S(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function FS(t,e,n,i){if(typeof n=="function")return n(t,e,i);if(go(e))return n.Map?.(t,e,i);if(_o(e))return n.Seq?.(t,e,i);if(Wt(e))return n.Pair?.(t,e,i);if(zt(e))return n.Scalar?.(t,e,i);if(Qs(e))return n.Alias?.(t,e,i)}function zS(t,e,n){const i=e[e.length-1];if(Kt(i))i.items[t]=n;else if(Wt(i))t==="key"?i.key=n:i.value=n;else if(mo(i))i.contents=n;else{const r=Qs(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}const XD={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},QD=t=>t.replace(/[!,[\]{}]/g,e=>XD[e]);class Rn{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Rn.defaultYaml,e),this.tags=Object.assign({},Rn.defaultTags,n)}clone(){const e=new Rn(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Rn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Rn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Rn.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Rn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Rn.defaultTags),this.atNextDocument=!1);const i=e.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[s,l]=i;return this.tags[s]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const l=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,l),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const l=e.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,i,r]=e.match(/^(.*!)([^!]*)$/s);r||n(`The ${e} tag has no suffix`);const s=this.tags[i];if(s)try{return s+decodeURIComponent(r)}catch(l){return n(String(l)),null}return i==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,i]of Object.entries(this.tags))if(e.startsWith(i))return n+QD(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let r;if(e&&i.length>0&&rn(e.contents)){const s={};us(e.contents,(l,o)=>{rn(o)&&o.tag&&(s[o.tag]=!0)}),r=Object.keys(s)}else r=[];for(const[s,l]of i)s==="!!"&&l==="tag:yaml.org,2002:"||(!e||r.some(o=>o.startsWith(l)))&&n.push(`%TAG ${s} ${l}`);return n.join(`
|
|
121
|
+
`)}}Rn.defaultYaml={explicit:!1,version:"1.2"};Rn.defaultTags={"!!":"tag:yaml.org,2002:"};function jS(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function BS(t){const e=new Set;return us(t,{Value(n,i){i.anchor&&e.add(i.anchor)}}),e}function US(t,e){for(let n=1;;++n){const i=`${t}${n}`;if(!e.has(i))return i}}function e7(t,e){const n=[],i=new Map;let r=null;return{onAnchor:s=>{n.push(s),r||(r=BS(t));const l=US(e,r);return r.add(l),l},setAnchors:()=>{for(const s of n){const l=i.get(s);if(typeof l=="object"&&l.anchor&&(zt(l.node)||Kt(l.node)))l.node.anchor=l.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:i}}function Nl(t,e,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r){const l=i[r],o=Nl(t,i,String(r),l);o===void 0?delete i[r]:o!==l&&(i[r]=o)}else if(i instanceof Map)for(const r of Array.from(i.keys())){const s=i.get(r),l=Nl(t,i,r,s);l===void 0?i.delete(r):l!==s&&i.set(r,l)}else if(i instanceof Set)for(const r of Array.from(i)){const s=Nl(t,i,r,r);s===void 0?i.delete(r):s!==r&&(i.delete(r),i.add(s))}else for(const[r,s]of Object.entries(i)){const l=Nl(t,i,r,s);l===void 0?delete i[r]:l!==s&&(i[r]=l)}return t.call(e,n,i)}function Ti(t,e,n){if(Array.isArray(t))return t.map((i,r)=>Ti(i,String(r),n));if(t&&typeof t.toJSON=="function"){if(!n||!JD(t))return t.toJSON(e,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(t,i),n.onCreate=s=>{i.res=s,delete n.onCreate};const r=t.toJSON(e,n);return n.onCreate&&n.onCreate(r),r}return typeof t=="bigint"&&!n?.keep?Number(t):t}class hm{constructor(e){Object.defineProperty(this,Oi,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!mo(e))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=Ti(this,"",l);if(typeof r=="function")for(const{count:a,res:u}of l.anchors.values())r(u,a);return typeof s=="function"?Nl(s,{"":o},"",o):o}}class vf extends hm{constructor(e){super(dm),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return us(e,{Node:(i,r)=>{if(r===this)return us.BREAK;r.anchor===this.source&&(n=r)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:i,doc:r,maxAliasCount:s}=n,l=this.resolve(r);if(!l){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=i.get(l);if(o||(Ti(l,null,n),o=i.get(l)),!o||o.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Hu(r,l,i)),o.count*o.aliasCount>s)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return o.res}toString(e,n,i){const r=`*${this.source}`;if(e){if(jS(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${r} `}return r}}function Hu(t,e,n){if(Qs(e)){const i=e.resolve(t),r=n&&i&&n.get(i);return r?r.count*r.aliasCount:0}else if(Kt(e)){let i=0;for(const r of e.items){const s=Hu(t,r,n);s>i&&(i=s)}return i}else if(Wt(e)){const i=Hu(t,e.key,n),r=Hu(t,e.value,n);return Math.max(i,r)}return 1}const qS=t=>!t||typeof t!="function"&&typeof t!="object";class ft extends hm{constructor(e){super(Fr),this.value=e}toJSON(e,n){return n?.keep?this.value:Ti(this.value,e,n)}toString(){return String(this.value)}}ft.BLOCK_FOLDED="BLOCK_FOLDED";ft.BLOCK_LITERAL="BLOCK_LITERAL";ft.PLAIN="PLAIN";ft.QUOTE_DOUBLE="QUOTE_DOUBLE";ft.QUOTE_SINGLE="QUOTE_SINGLE";const t7="tag:yaml.org,2002:";function n7(t,e,n){if(e){const i=n.filter(s=>s.tag===e),r=i.find(s=>!s.format)??i[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return n.find(i=>i.identify?.(t)&&!i.format)}function ma(t,e,n){if(mo(t)&&(t=t.contents),rn(t))return t;if(Wt(t)){const f=n.schema[ns].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:i,onAnchor:r,onTagObj:s,schema:l,sourceObjects:o}=n;let a;if(i&&t&&typeof t=="object"){if(a=o.get(t),a)return a.anchor||(a.anchor=r(t)),new vf(a.anchor);a={anchor:null,node:null},o.set(t,a)}e?.startsWith("!!")&&(e=t7+e.slice(2));let u=n7(t,e,l.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new ft(t);return a&&(a.node=f),f}u=t instanceof Map?l[ns]:Symbol.iterator in Object(t)?l[po]:l[ns]}s&&(s(u),delete n.onTagObj);const c=u?.createNode?u.createNode(n.schema,t,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,t,n):new ft(t);return e?c.tag=e:u.default||(c.tag=u.tag),a&&(a.node=c),c}function Ec(t,e,n){let i=n;for(let r=e.length-1;r>=0;--r){const s=e[r];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const l=[];l[s]=i,i=l}else i=new Map([[s,i]])}return ma(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Ho=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class pm extends hm{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(i=>rn(i)||Wt(i)?i.clone(e):i),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Ho(e))this.add(n);else{const[i,...r]=e,s=this.get(i,!0);if(Kt(s))s.addIn(r,n);else if(s===void 0&&this.schema)this.set(i,Ec(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(e){const[n,...i]=e;if(i.length===0)return this.delete(n);const r=this.get(n,!0);if(Kt(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(e,n){const[i,...r]=e,s=this.get(i,!0);return r.length===0?!n&&zt(s)?s.value:s:Kt(s)?s.getIn(r,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Wt(n))return!1;const i=n.value;return i==null||e&&zt(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){const[n,...i]=e;if(i.length===0)return this.has(n);const r=this.get(n,!0);return Kt(r)?r.hasIn(i):!1}setIn(e,n){const[i,...r]=e;if(r.length===0)this.set(i,n);else{const s=this.get(i,!0);if(Kt(s))s.setIn(r,n);else if(s===void 0&&this.schema)this.set(i,Ec(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}}pm.maxFlowStringSingleLineLength=60;const i7=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Tr(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Ns=(t,e,n)=>t.endsWith(`
|
|
122
|
+
`)?Tr(n,e):n.includes(`
|
|
123
|
+
`)?`
|
|
124
|
+
`+Tr(n,e):(t.endsWith(" ")?"":" ")+n,HS="flow",Hh="block",xu="quoted";function yf(t,e,n="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:l,onOverflow:o}={}){if(!r||r<0)return t;const a=Math.max(1+s,1+r-e.length);if(t.length<=a)return t;const u=[],c={};let f=r-e.length;typeof i=="number"&&(i>r-Math.max(2,s)?u.push(0):f=r-i);let d,h,m=!1,p=-1,g=-1,v=-1;n===Hh&&(p=n0(t,p,e.length),p!==-1&&(f=p+a));for(let w;w=t[p+=1];){if(n===xu&&w==="\\"){switch(g=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}v=p}if(w===`
|
|
125
|
+
`)n===Hh&&(p=n0(t,p,e.length)),f=p+e.length+a,d=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
|
|
126
|
+
`&&h!==" "){const k=t[p+1];k&&k!==" "&&k!==`
|
|
127
|
+
`&&k!==" "&&(d=p)}if(p>=f)if(d)u.push(d),f=d+a,d=void 0;else if(n===xu){for(;h===" "||h===" ";)h=w,w=t[p+=1],m=!0;const k=p>v+1?p-2:g-1;if(c[k])return t;u.push(k),c[k]=!0,f=k+a,d=void 0}else m=!0}h=w}if(m&&o&&o(),u.length===0)return t;l&&l();let b=t.slice(0,u[0]);for(let w=0;w<u.length;++w){const k=u[w],S=u[w+1]||t.length;k===0?b=`
|
|
128
|
+
${e}${t.slice(0,S)}`:(n===xu&&c[k]&&(b+=`${t[k]}\\`),b+=`
|
|
129
|
+
${e}${t.slice(k+1,S)}`)}return b}function n0(t,e,n){let i=e,r=e+1,s=t[r];for(;s===" "||s===" ";)if(e<r+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
|
|
130
|
+
`);i=e,r=e+1,s=t[r]}return i}const wf=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),kf=t=>/^(%|---|\.\.\.)/m.test(t);function r7(t,e,n){if(!e||e<0)return!1;const i=e-n,r=t.length;if(r<=i)return!1;for(let s=0,l=0;s<r;++s)if(t[s]===`
|
|
131
|
+
`){if(s-l>i)return!0;if(l=s+1,r-l<=i)return!1}return!0}function Zo(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:i}=e,r=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(kf(t)?" ":"");let l="",o=0;for(let a=0,u=n[a];u;u=n[++a])if(u===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(l+=n.slice(o,a)+"\\ ",a+=1,o=a,u="\\"),u==="\\")switch(n[a+1]){case"u":{l+=n.slice(o,a);const c=n.substr(a+2,4);switch(c){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:c.substr(0,2)==="00"?l+="\\x"+c.substr(2):l+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(i||n[a+2]==='"'||n.length<r)a+=1;else{for(l+=n.slice(o,a)+`
|
|
132
|
+
|
|
133
|
+
`;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)l+=`
|
|
134
|
+
`,a+=2;l+=s,n[a+2]===" "&&(l+="\\"),a+=1,o=a+1}break;default:a+=1}return l=o?l+n.slice(o):n,i?l:yf(l,s,xu,wf(e,!1))}function xh(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
135
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return Zo(t,e);const n=e.indent||(kf(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
136
|
+
${n}`)+"'";return e.implicitKey?i:yf(i,n,HS,wf(e,!1))}function Ll(t,e){const{singleQuote:n}=e.options;let i;if(n===!1)i=Zo;else{const r=t.includes('"'),s=t.includes("'");r&&!s?i=xh:s&&!r?i=Zo:i=n?xh:Zo}return i(t,e)}let Vh;try{Vh=new RegExp(`(^|(?<!
|
|
137
|
+
))
|
|
138
|
+
+(?!
|
|
139
|
+
|$)`,"g")}catch{Vh=/\n+(?!\n|$)/g}function Vu({comment:t,type:e,value:n},i,r,s){const{blockQuote:l,commentString:o,lineWidth:a}=i.options;if(!l||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Ll(n,i);const u=i.indent||(i.forceBlockIndent||kf(n)?" ":""),c=l==="literal"?!0:l==="folded"||e===ft.BLOCK_FOLDED?!1:e===ft.BLOCK_LITERAL?!0:!r7(n,a,u.length);if(!n)return c?`|
|
|
140
|
+
`:`>
|
|
141
|
+
`;let f,d;for(d=n.length;d>0;--d){const E=n[d-1];if(E!==`
|
|
142
|
+
`&&E!==" "&&E!==" ")break}let h=n.substring(d);const m=h.indexOf(`
|
|
143
|
+
`);m===-1?f="-":n===h||m!==h.length-1?(f="+",s&&s()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
144
|
+
`&&(h=h.slice(0,-1)),h=h.replace(Vh,`$&${u}`));let p=!1,g,v=-1;for(g=0;g<n.length;++g){const E=n[g];if(E===" ")p=!0;else if(E===`
|
|
145
|
+
`)v=g;else break}let b=n.substring(0,v<g?v+1:g);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${u}`));let k=(c?"|":">")+(p?u?"2":"1":"")+f;if(t&&(k+=" "+o(t.replace(/ ?[\r\n]+/g," ")),r&&r()),c)return n=n.replace(/\n+/g,`$&${u}`),`${k}
|
|
146
|
+
${u}${b}${n}${h}`;n=n.replace(/\n+/g,`
|
|
147
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);const S=yf(`${b}${n}${h}`,u,Hh,wf(i,!0));return`${k}
|
|
148
|
+
${u}${S}`}function s7(t,e,n,i){const{type:r,value:s}=t,{actualString:l,implicitKey:o,indent:a,indentStep:u,inFlow:c}=e;if(o&&s.includes(`
|
|
149
|
+
`)||c&&/[[\]{},]/.test(s))return Ll(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||c||!s.includes(`
|
|
150
|
+
`)?Ll(s,e):Vu(t,e,n,i);if(!o&&!c&&r!==ft.PLAIN&&s.includes(`
|
|
151
|
+
`))return Vu(t,e,n,i);if(kf(s)){if(a==="")return e.forceBlockIndent=!0,Vu(t,e,n,i);if(o&&a===u)return Ll(s,e)}const f=s.replace(/\n+/g,`$&
|
|
152
|
+
${a}`);if(l){const d=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(f),{compat:h,tags:m}=e.doc.schema;if(m.some(d)||h?.some(d))return Ll(s,e)}return o?f:yf(f,a,HS,wf(e,!1))}function Ya(t,e,n,i){const{implicitKey:r,inFlow:s}=e,l=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:o}=t;o!==ft.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(o=ft.QUOTE_DOUBLE);const a=c=>{switch(c){case ft.BLOCK_FOLDED:case ft.BLOCK_LITERAL:return r||s?Ll(l.value,e):Vu(l,e,n,i);case ft.QUOTE_DOUBLE:return Zo(l.value,e);case ft.QUOTE_SINGLE:return xh(l.value,e);case ft.PLAIN:return s7(l,e,n,i);default:return null}};let u=a(o);if(u===null){const{defaultKeyType:c,defaultStringType:f}=e.options,d=r&&c||f;if(u=a(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function xS(t,e){const n=Object.assign({blockQuote:!0,commentString:i7,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function l7(t,e){if(e.tag){const r=t.filter(s=>s.tag===e.tag);if(r.length>0)return r.find(s=>s.format===e.format)??r[0]}let n,i;if(zt(e)){i=e.value;const r=t.filter(s=>s.identify?.(i));n=r.find(s=>s.format===e.format)??r.find(s=>!s.format)}else i=e,n=t.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!n){const r=i?.constructor?.name??typeof i;throw new Error(`Tag not resolved for ${r} value`)}return n}function o7(t,e,{anchors:n,doc:i}){if(!i.directives)return"";const r=[],s=(zt(t)||Kt(t))&&t.anchor;s&&jS(s)&&(n.add(s),r.push(`&${s}`));const l=t.tag?t.tag:e.default?null:e.tag;return l&&r.push(i.directives.tagString(l)),r.join(" ")}function Xl(t,e,n,i){if(Wt(t))return t.toString(e,n,i);if(Qs(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let r;const s=rn(t)?t:e.doc.createNode(t,{onTagObj:a=>r=a});r||(r=l7(e.doc.schema.tags,s));const l=o7(s,r,e);l.length>0&&(e.indentAtStart=(e.indentAtStart??0)+l.length+1);const o=typeof r.stringify=="function"?r.stringify(s,e,n,i):zt(s)?Ya(s,e,n,i):s.toString(e,n,i);return l?zt(s)||o[0]==="{"||o[0]==="["?`${l} ${o}`:`${l}
|
|
153
|
+
${e.indent}${o}`:o}function a7({key:t,value:e},n,i,r){const{allNullValues:s,doc:l,indent:o,indentStep:a,options:{commentString:u,indentSeq:c,simpleKeys:f}}=n;let d=rn(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Kt(t)){const P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||Kt(t)||(zt(t)?t.type===ft.BLOCK_FOLDED||t.type===ft.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!s),indent:o+a});let m=!1,p=!1,g=Xl(t,n,()=>m=!0,()=>p=!0);if(!h&&!n.inFlow&&g.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(s||e==null)return m&&i&&i(),g===""?"?":h?`? ${g}`:g}else if(s&&!f||e==null&&h)return g=`? ${g}`,d&&!m?g+=Ns(g,n.indent,u(d)):p&&r&&r(),g;m&&(d=null),h?(d&&(g+=Ns(g,n.indent,u(d))),g=`? ${g}
|
|
154
|
+
${o}:`):(g=`${g}:`,d&&(g+=Ns(g,n.indent,u(d))));let v,b,w;rn(e)?(v=!!e.spaceBefore,b=e.commentBefore,w=e.comment):(v=!1,b=null,w=null,e&&typeof e=="object"&&(e=l.createNode(e))),n.implicitKey=!1,!h&&!d&&zt(e)&&(n.indentAtStart=g.length+1),p=!1,!c&&a.length>=2&&!n.inFlow&&!h&&_o(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let k=!1;const S=Xl(e,n,()=>k=!0,()=>p=!0);let E=" ";if(d||v||b){if(E=v?`
|
|
155
|
+
`:"",b){const P=u(b);E+=`
|
|
156
|
+
${Tr(P,n.indent)}`}S===""&&!n.inFlow?E===`
|
|
157
|
+
`&&(E=`
|
|
158
|
+
|
|
159
|
+
`):E+=`
|
|
160
|
+
${n.indent}`}else if(!h&&Kt(e)){const P=S[0],M=S.indexOf(`
|
|
161
|
+
`),I=M!==-1,D=n.inFlow??e.flow??e.items.length===0;if(I||!D){let z=!1;if(I&&(P==="&"||P==="!")){let R=S.indexOf(" ");P==="&"&&R!==-1&&R<M&&S[R+1]==="!"&&(R=S.indexOf(" ",R+1)),(R===-1||M<R)&&(z=!0)}z||(E=`
|
|
162
|
+
${n.indent}`)}}else(S===""||S[0]===`
|
|
163
|
+
`)&&(E="");return g+=E+S,n.inFlow?k&&i&&i():w&&!k?g+=Ns(g,n.indent,u(w)):p&&r&&r(),g}function VS(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const i0="<<";function WS(t,e,{key:n,value:i}){if(t?.doc.schema.merge&&u7(n))if(i=Qs(i)?i.resolve(t.doc):i,_o(i))for(const r of i.items)$d(t,e,r);else if(Array.isArray(i))for(const r of i)$d(t,e,r);else $d(t,e,i);else{const r=Ti(n,"",t);if(e instanceof Map)e.set(r,Ti(i,r,t));else if(e instanceof Set)e.add(r);else{const s=c7(n,r,t),l=Ti(i,s,t);s in e?Object.defineProperty(e,s,{value:l,writable:!0,enumerable:!0,configurable:!0}):e[s]=l}}return e}const u7=t=>t===i0||zt(t)&&t.value===i0&&(!t.type||t.type===ft.PLAIN);function $d(t,e,n){const i=t&&Qs(n)?n.resolve(t.doc):n;if(!go(i))throw new Error("Merge sources must be maps or map aliases");const r=i.toJSON(null,t,Map);for(const[s,l]of r)e instanceof Map?e.has(s)||e.set(s,l):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:l,writable:!0,enumerable:!0,configurable:!0});return e}function c7(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(rn(t)&&n?.doc){const i=xS(n.doc,{});i.anchors=new Set;for(const s of n.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;const r=t.toString(i);if(!n.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),VS(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(e)}function mm(t,e,n){const i=ma(t,void 0,n),r=ma(e,void 0,n);return new On(i,r)}class On{constructor(e,n=null){Object.defineProperty(this,Oi,{value:MS}),this.key=e,this.value=n}clone(e){let{key:n,value:i}=this;return rn(n)&&(n=n.clone(e)),rn(i)&&(i=i.clone(e)),new On(n,i)}toJSON(e,n){const i=n?.mapAsMap?new Map:{};return WS(n,i,this)}toString(e,n,i){return e?.doc?a7(this,e,n,i):JSON.stringify(this)}}function YS(t,e,n){return(e.inFlow??t.flow?d7:f7)(t,e,n)}function f7({comment:t,items:e},n,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:l,onComment:o}){const{indent:a,options:{commentString:u}}=n,c=Object.assign({},n,{indent:s,type:null});let f=!1;const d=[];for(let m=0;m<e.length;++m){const p=e[m];let g=null;if(rn(p))!f&&p.spaceBefore&&d.push(""),Tc(n,d,p.commentBefore,f),p.comment&&(g=p.comment);else if(Wt(p)){const b=rn(p.key)?p.key:null;b&&(!f&&b.spaceBefore&&d.push(""),Tc(n,d,b.commentBefore,f))}f=!1;let v=Xl(p,c,()=>g=null,()=>f=!0);g&&(v+=Ns(v,s,u(g))),f&&g&&(f=!1),d.push(i+v)}let h;if(d.length===0)h=r.start+r.end;else{h=d[0];for(let m=1;m<d.length;++m){const p=d[m];h+=p?`
|
|
164
|
+
${a}${p}`:`
|
|
165
|
+
`}}return t?(h+=`
|
|
166
|
+
`+Tr(u(t),a),o&&o()):f&&l&&l(),h}function d7({items:t},e,{flowChars:n,itemIndent:i}){const{indent:r,indentStep:s,flowCollectionPadding:l,options:{commentString:o}}=e;i+=s;const a=Object.assign({},e,{indent:i,inFlow:!0,type:null});let u=!1,c=0;const f=[];for(let m=0;m<t.length;++m){const p=t[m];let g=null;if(rn(p))p.spaceBefore&&f.push(""),Tc(e,f,p.commentBefore,!1),p.comment&&(g=p.comment);else if(Wt(p)){const b=rn(p.key)?p.key:null;b&&(b.spaceBefore&&f.push(""),Tc(e,f,b.commentBefore,!1),b.comment&&(u=!0));const w=rn(p.value)?p.value:null;w?(w.comment&&(g=w.comment),w.commentBefore&&(u=!0)):p.value==null&&b?.comment&&(g=b.comment)}g&&(u=!0);let v=Xl(p,a,()=>g=null);m<t.length-1&&(v+=","),g&&(v+=Ns(v,i,o(g))),!u&&(f.length>c||v.includes(`
|
|
167
|
+
`))&&(u=!0),f.push(v),c=f.length}const{start:d,end:h}=n;if(f.length===0)return d+h;if(!u){const m=f.reduce((p,g)=>p+g.length+2,2);u=e.options.lineWidth>0&&m>e.options.lineWidth}if(u){let m=d;for(const p of f)m+=p?`
|
|
168
|
+
${s}${r}${p}`:`
|
|
169
|
+
`;return`${m}
|
|
170
|
+
${r}${h}`}else return`${d}${l}${f.join(" ")}${l}${h}`}function Tc({indent:t,options:{commentString:e}},n,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){const s=Tr(e(i),t);n.push(s.trimStart())}}function Ls(t,e){const n=zt(e)?e.value:e;for(const i of t)if(Wt(i)&&(i.key===e||i.key===n||zt(i.key)&&i.key.value===n))return i}class ui extends pm{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ns,e),this.items=[]}static from(e,n,i){const{keepUndefined:r,replacer:s}=i,l=new this(e),o=(a,u)=>{if(typeof s=="function")u=s.call(n,a,u);else if(Array.isArray(s)&&!s.includes(a))return;(u!==void 0||r)&&l.items.push(mm(a,u,i))};if(n instanceof Map)for(const[a,u]of n)o(a,u);else if(n&&typeof n=="object")for(const a of Object.keys(n))o(a,n[a]);return typeof e.sortMapEntries=="function"&&l.items.sort(e.sortMapEntries),l}add(e,n){let i;Wt(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new On(e,e?.value):i=new On(e.key,e.value);const r=Ls(this.items,i.key),s=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${i.key} already set`);zt(r.value)&&qS(i.value)?r.value.value=i.value:r.value=i.value}else if(s){const l=this.items.findIndex(o=>s(i,o)<0);l===-1?this.items.push(i):this.items.splice(l,0,i)}else this.items.push(i)}delete(e){const n=Ls(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Ls(this.items,e)?.value;return(!n&&zt(r)?r.value:r)??void 0}has(e){return!!Ls(this.items,e)}set(e,n){this.add(new On(e,n),!0)}toJSON(e,n,i){const r=i?new i:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(const s of this.items)WS(n,r,s);return r}toString(e,n,i){if(!e)return JSON.stringify(this);for(const r of this.items)if(!Wt(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),YS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:n})}}const bo={collection:"map",default:!0,nodeClass:ui,tag:"tag:yaml.org,2002:map",resolve(t,e){return go(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ui.from(t,e,n)};class cs extends pm{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(po,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Eu(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const i=Eu(e);if(typeof i!="number")return;const r=this.items[i];return!n&&zt(r)?r.value:r}has(e){const n=Eu(e);return typeof n=="number"&&n<this.items.length}set(e,n){const i=Eu(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[i];zt(r)&&qS(n)?r.value=n:this.items[i]=n}toJSON(e,n){const i=[];n?.onCreate&&n.onCreate(i);let r=0;for(const s of this.items)i.push(Ti(s,String(r++),n));return i}toString(e,n,i){return e?YS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:n}):JSON.stringify(this)}static from(e,n,i){const{replacer:r}=i,s=new this(e);if(n&&Symbol.iterator in Object(n)){let l=0;for(let o of n){if(typeof r=="function"){const a=n instanceof Set?o:String(l++);o=r.call(n,a,o)}s.items.push(ma(o,void 0,i))}}return s}}function Eu(t){let e=zt(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const vo={collection:"seq",default:!0,nodeClass:cs,tag:"tag:yaml.org,2002:seq",resolve(t,e){return _o(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>cs.from(t,e,n)},Sf={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,i){return e=Object.assign({actualString:!0},e),Ya(t,e,n,i)}},Ef={identify:t=>t==null,createNode:()=>new ft(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ft(null),stringify:({source:t},e)=>typeof t=="string"&&Ef.test.test(t)?t:e.options.nullStr},gm={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ft(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&gm.test.test(t)){const i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?n.options.trueStr:n.options.falseStr}};function Xi({format:t,minFractionDigits:e,tag:n,value:i}){if(typeof i=="bigint")return String(i);const r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(i);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let l=s.indexOf(".");l<0&&(l=s.length,s+=".");let o=e-(s.length-l-1);for(;o-- >0;)s+="0"}return s}const GS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Xi},KS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Xi(t)}},ZS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ft(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Xi},Tf=t=>typeof t=="bigint"||Number.isInteger(t),_m=(t,e,n,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),n);function JS(t,e,n){const{value:i}=t;return Tf(i)&&i>=0?n+i.toString(e):Xi(t)}const XS={identify:t=>Tf(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>_m(t,2,8,n),stringify:t=>JS(t,8,"0o")},QS={identify:Tf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>_m(t,0,10,n),stringify:Xi},e3={identify:t=>Tf(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>_m(t,2,16,n),stringify:t=>JS(t,16,"0x")},h7=[bo,vo,Sf,Ef,gm,XS,QS,e3,GS,KS,ZS];function r0(t){return typeof t=="bigint"||Number.isInteger(t)}const Tu=({value:t})=>JSON.stringify(t),p7=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Tu},{identify:t=>t==null,createNode:()=>new ft(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Tu},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Tu},{identify:r0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>r0(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Tu}],m7={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},g7=[bo,vo].concat(p7,m7),bm={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let r=0;r<n.length;++r)i[r]=n.charCodeAt(r);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},i,r,s){const l=n;let o;if(typeof Buffer=="function")o=l instanceof Buffer?l.toString("base64"):Buffer.from(l.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let u=0;u<l.length;++u)a+=String.fromCharCode(l[u]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=ft.BLOCK_LITERAL),e!==ft.QUOTE_DOUBLE){const a=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),u=Math.ceil(o.length/a),c=new Array(u);for(let f=0,d=0;f<u;++f,d+=a)c[f]=o.substr(d,a);o=c.join(e===ft.BLOCK_LITERAL?`
|
|
171
|
+
`:" ")}return Ya({comment:t,type:e,value:o},i,r,s)}};function t3(t,e){if(_o(t))for(let n=0;n<t.items.length;++n){let i=t.items[n];if(!Wt(i)){if(go(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");const r=i.items[0]||new On(new ft(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
|
|
172
|
+
${r.key.commentBefore}`:i.commentBefore),i.comment){const s=r.value??r.key;s.comment=s.comment?`${i.comment}
|
|
173
|
+
${s.comment}`:i.comment}i=r}t.items[n]=Wt(i)?i:new On(i)}}else e("Expected a sequence for this tag");return t}function n3(t,e,n){const{replacer:i}=n,r=new cs(t);r.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let l of e){typeof i=="function"&&(l=i.call(e,String(s++),l));let o,a;if(Array.isArray(l))if(l.length===2)o=l[0],a=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const u=Object.keys(l);if(u.length===1)o=u[0],a=l[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=l;r.items.push(mm(o,a,n))}return r}const vm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:t3,createNode:n3};class Fl extends cs{constructor(){super(),this.add=ui.prototype.add.bind(this),this.delete=ui.prototype.delete.bind(this),this.get=ui.prototype.get.bind(this),this.has=ui.prototype.has.bind(this),this.set=ui.prototype.set.bind(this),this.tag=Fl.tag}toJSON(e,n){if(!n)return super.toJSON(e);const i=new Map;n?.onCreate&&n.onCreate(i);for(const r of this.items){let s,l;if(Wt(r)?(s=Ti(r.key,"",n),l=Ti(r.value,s,n)):s=Ti(r,"",n),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,l)}return i}static from(e,n,i){const r=n3(e,n,i),s=new this;return s.items=r.items,s}}Fl.tag="tag:yaml.org,2002:omap";const ym={collection:"seq",identify:t=>t instanceof Map,nodeClass:Fl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=t3(t,e),i=[];for(const{key:r}of n.items)zt(r)&&(i.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new Fl,n)},createNode:(t,e,n)=>Fl.from(t,e,n)};function i3({value:t,source:e},n){return e&&(t?r3:s3).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const r3={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ft(!0),stringify:i3},s3={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new ft(!1),stringify:i3},_7={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Xi},b7={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Xi(t)}},v7={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ft(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const i=t.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:Xi},Ga=t=>typeof t=="bigint"||Number.isInteger(t);function Af(t,e,n,{intAsBigInt:i}){const r=t[0];if((r==="-"||r==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const l=BigInt(t);return r==="-"?BigInt(-1)*l:l}const s=parseInt(t,n);return r==="-"?-1*s:s}function wm(t,e,n){const{value:i}=t;if(Ga(i)){const r=i.toString(e);return i<0?"-"+n+r.substr(1):n+r}return Xi(t)}const y7={identify:Ga,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Af(t,2,2,n),stringify:t=>wm(t,2,"0b")},w7={identify:Ga,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Af(t,1,8,n),stringify:t=>wm(t,8,"0")},k7={identify:Ga,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Af(t,0,10,n),stringify:Xi},S7={identify:Ga,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Af(t,2,16,n),stringify:t=>wm(t,16,"0x")};class zl extends ui{constructor(e){super(e),this.tag=zl.tag}add(e){let n;Wt(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new On(e.key,null):n=new On(e,null),Ls(this.items,n.key)||this.items.push(n)}get(e,n){const i=Ls(this.items,e);return!n&&Wt(i)?zt(i.key)?i.key.value:i.key:i}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const i=Ls(this.items,e);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new On(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(e,n,i){const{replacer:r}=i,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof r=="function"&&(l=r.call(n,l,l)),s.items.push(mm(l,null,i));return s}}zl.tag="tag:yaml.org,2002:set";const km={collection:"map",identify:t=>t instanceof Set,nodeClass:zl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>zl.from(t,e,n),resolve(t,e){if(go(t)){if(t.hasAllNullValues(!0))return Object.assign(new zl,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Sm(t,e){const n=t[0],i=n==="-"||n==="+"?t.substring(1):t,r=l=>e?BigInt(l):Number(l),s=i.replace(/_/g,"").split(":").reduce((l,o)=>l*r(60)+r(o),r(0));return n==="-"?r(-1)*s:s}function l3(t){let{value:e}=t,n=l=>l;if(typeof e=="bigint")n=l=>BigInt(l);else if(isNaN(e)||!isFinite(e))return Xi(t);let i="";e<0&&(i="-",e*=n(-1));const r=n(60),s=[e%r];return e<60?s.unshift(0):(e=(e-s[0])/r,s.unshift(e%r),e>=60&&(e=(e-s[0])/r,s.unshift(e))),i+s.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const o3={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Sm(t,n),stringify:l3},a3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Sm(t,!1),stringify:l3},Cf={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Cf.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,i,r,s,l,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,i-1,r,s||0,l||0,o||0,a);const c=e[8];if(c&&c!=="Z"){let f=Sm(c,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},s0=[bo,vo,Sf,Ef,r3,s3,y7,w7,k7,S7,_7,b7,v7,bm,ym,vm,km,o3,a3,Cf],l0=new Map([["core",h7],["failsafe",[bo,vo,Sf]],["json",g7],["yaml11",s0],["yaml-1.1",s0]]),o0={binary:bm,bool:gm,float:ZS,floatExp:KS,floatNaN:GS,floatTime:a3,int:QS,intHex:e3,intOct:XS,intTime:o3,map:bo,null:Ef,omap:ym,pairs:vm,seq:vo,set:km,timestamp:Cf},E7={"tag:yaml.org,2002:binary":bm,"tag:yaml.org,2002:omap":ym,"tag:yaml.org,2002:pairs":vm,"tag:yaml.org,2002:set":km,"tag:yaml.org,2002:timestamp":Cf};function Fd(t,e){let n=l0.get(e);if(!n)if(Array.isArray(t))n=[];else{const i=Array.from(l0.keys()).filter(r=>r!=="yaml11").map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(const i of t)n=n.concat(i);else typeof t=="function"&&(n=t(n.slice()));return n.map(i=>{if(typeof i!="string")return i;const r=o0[i];if(r)return r;const s=Object.keys(o0).map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${i}"; use one of ${s}`)})}const T7=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class Nf{constructor({compat:e,customTags:n,merge:i,resolveKnownTags:r,schema:s,sortMapEntries:l,toStringDefaults:o}){this.compat=Array.isArray(e)?Fd(e,"compat"):e?Fd(null,e):null,this.merge=!!i,this.name=typeof s=="string"&&s||"core",this.knownTags=r?E7:{},this.tags=Fd(n,this.name),this.toStringOptions=o??null,Object.defineProperty(this,ns,{value:bo}),Object.defineProperty(this,Fr,{value:Sf}),Object.defineProperty(this,po,{value:vo}),this.sortMapEntries=typeof l=="function"?l:l===!0?T7:null}clone(){const e=Object.create(Nf.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function A7(t,e){const n=[];let i=e.directives===!0;if(e.directives!==!1&&t.directives){const a=t.directives.toString(t);a?(n.push(a),i=!0):t.directives.docStart&&(i=!0)}i&&n.push("---");const r=xS(t,e),{commentString:s}=r.options;if(t.commentBefore){n.length!==1&&n.unshift("");const a=s(t.commentBefore);n.unshift(Tr(a,""))}let l=!1,o=null;if(t.contents){if(rn(t.contents)){if(t.contents.spaceBefore&&i&&n.push(""),t.contents.commentBefore){const c=s(t.contents.commentBefore);n.push(Tr(c,""))}r.forceBlockIndent=!!t.comment,o=t.contents.comment}const a=o?void 0:()=>l=!0;let u=Xl(t.contents,r,()=>o=null,a);o&&(u+=Ns(u,"",s(o))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(Xl(t.contents,r));if(t.directives?.docEnd)if(t.comment){const a=s(t.comment);a.includes(`
|
|
174
|
+
`)?(n.push("..."),n.push(Tr(a,""))):n.push(`... ${a}`)}else n.push("...");else{let a=t.comment;a&&l&&(a=a.replace(/^\n+/,"")),a&&((!l||o)&&n[n.length-1]!==""&&n.push(""),n.push(Tr(s(a),"")))}return n.join(`
|
|
175
|
+
`)+`
|
|
176
|
+
`}class yo{constructor(e,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Oi,{value:qh});let r=null;typeof n=="function"||Array.isArray(n)?r=n:i===void 0&&n&&(i=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:l}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new Rn({version:l}),this.setSchema(l,i),this.contents=e===void 0?null:this.createNode(e,r,i)}clone(){const e=Object.create(yo.prototype,{[Oi]:{value:qh}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=rn(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ml(this.contents)&&this.contents.add(e)}addIn(e,n){ml(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const i=BS(this);e.anchor=!n||i.has(n)?US(n||"a",i):n}return new vf(e.anchor)}createNode(e,n,i){let r;if(typeof n=="function")e=n.call({"":e},"",e),r=n;else if(Array.isArray(n)){const g=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=n.filter(g).map(String);v.length>0&&(n=n.concat(v)),r=n}else i===void 0&&n&&(i=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:l,flow:o,keepUndefined:a,onTagObj:u,tag:c}=i??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=e7(this,l||"a"),m={aliasDuplicateObjects:s??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:u,replacer:r,schema:this.schema,sourceObjects:h},p=ma(e,c,m);return o&&Kt(p)&&(p.flow=!0),d(),p}createPair(e,n,i={}){const r=this.createNode(e,null,i),s=this.createNode(n,null,i);return new On(r,s)}delete(e){return ml(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ho(e)?this.contents==null?!1:(this.contents=null,!0):ml(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Kt(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ho(e)?!n&&zt(this.contents)?this.contents.value:this.contents:Kt(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Kt(this.contents)?this.contents.has(e):!1}hasIn(e){return Ho(e)?this.contents!==void 0:Kt(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ec(this.schema,[e],n):ml(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ho(e)?this.contents=n:this.contents==null?this.contents=Ec(this.schema,Array.from(e),n):ml(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Rn({version:"1.1"}),i={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Rn({version:e}),i={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new Nf(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:l}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Ti(this.contents,n??"",o);if(typeof s=="function")for(const{count:u,res:c}of o.anchors.values())s(c,u);return typeof l=="function"?Nl(l,{"":a},"",a):a}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return A7(this,e)}}function ml(t){if(Kt(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Em extends Error{constructor(e,n,i,r){super(),this.name=e,this.code=i,this.message=r,this.pos=n}}class Os extends Em{constructor(e,n,i){super("YAMLParseError",e,n,i)}}class u3 extends Em{constructor(e,n,i){super("YAMLWarning",e,n,i)}}const Ac=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>e.linePos(o));const{line:i,col:r}=n.linePos[0];n.message+=` at line ${i}, column ${r}`;let s=r-1,l=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&l.length>80){const o=Math.min(s-39,l.length-79);l="…"+l.substring(o),s-=o-1}if(l.length>80&&(l=l.substring(0,79)+"…"),i>1&&/^ *$/.test(l.substring(0,s))){let o=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`…
|
|
177
|
+
`),l=o+l}if(/[^ ]/.test(l)){let o=1;const a=n.linePos[1];a&&a.line===i&&a.col>r&&(o=Math.max(1,Math.min(a.col-r,80-s)));const u=" ".repeat(s)+"^".repeat(o);n.message+=`:
|
|
178
|
+
|
|
179
|
+
${l}
|
|
180
|
+
${u}
|
|
181
|
+
`}};function Ql(t,{flow:e,indicator:n,next:i,offset:r,onError:s,startOnNewline:l}){let o=!1,a=l,u=l,c="",f="",d=!1,h=!1,m=!1,p=null,g=null,v=null,b=null,w=null;for(const E of t)switch(m&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&s(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),E.type){case"space":!e&&a&&n!=="doc-start"&&E.source[0]===" "&&s(E,"TAB_AS_INDENT","Tabs are not allowed as indentation"),u=!0;break;case"comment":{u||s(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=E.source.substring(1)||" ";c?c+=f+P:c=P,f="",a=!1;break}case"newline":a?c?c+=E.source:o=!0:f+=E.source,a=!0,d=!0,(p||g)&&(h=!0),u=!0;break;case"anchor":p&&s(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&s(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=E,w===null&&(w=E.offset),a=!1,u=!1,m=!0;break;case"tag":{g&&s(E,"MULTIPLE_TAGS","A node can have at most one tag"),g=E,w===null&&(w=E.offset),a=!1,u=!1,m=!0;break}case n:(p||g)&&s(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),b&&s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),b=E,a=!1,u=!1;break;case"comma":if(e){v&&s(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=E,a=!1,u=!1;break}default:s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),a=!1,u=!1}const k=t[t.length-1],S=k?k.offset+k.source.length:r;return m&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:v,found:b,spaceBefore:o,comment:c,hasNewline:d,hasNewlineAfterProp:h,anchor:p,tag:g,end:S,start:w??S}}function ga(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
182
|
+
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(ga(e.key)||ga(e.value))return!0}return!1;default:return!0}}function Wh(t,e,n){if(e?.type==="flow-collection"){const i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&ga(e)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function c3(t,e,n){const{uniqueKeys:i}=t.options;if(i===!1)return!1;const r=typeof i=="function"?i:(s,l)=>s===l||zt(s)&&zt(l)&&s.value===l.value&&!(s.value==="<<"&&t.schema.merge);return e.some(s=>r(s.key,n))}const a0="All mapping items must start at the same column";function C7({composeNode:t,composeEmptyNode:e},n,i,r,s){const l=s?.nodeClass??ui,o=new l(n.schema);n.atRoot&&(n.atRoot=!1);let a=i.offset,u=null;for(const c of i.items){const{start:f,key:d,sep:h,value:m}=c,p=Ql(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:a,onError:r,startOnNewline:!0}),g=!p.found;if(g){if(d&&(d.type==="block-seq"?r(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&r(a,"BAD_INDENT",a0)),!p.anchor&&!p.tag&&!h){u=p.end,p.comment&&(o.comment?o.comment+=`
|
|
183
|
+
`+p.comment:o.comment=p.comment);continue}(p.hasNewlineAfterProp||ga(d))&&r(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==i.indent&&r(a,"BAD_INDENT",a0);const v=p.end,b=d?t(n,d,p,r):e(n,v,f,null,p,r);n.schema.compat&&Wh(i.indent,d,r),c3(n,o.items,b)&&r(v,"DUPLICATE_KEY","Map keys must be unique");const w=Ql(h??[],{indicator:"map-value-ind",next:m,offset:b.range[2],onError:r,startOnNewline:!d||d.type==="block-scalar"});if(a=w.end,w.found){g&&(m?.type==="block-map"&&!w.hasNewline&&r(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&p.start<w.found.offset-1024&&r(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const k=m?t(n,m,w,r):e(n,a,h,null,w,r);n.schema.compat&&Wh(i.indent,m,r),a=k.range[2];const S=new On(b,k);n.options.keepSourceTokens&&(S.srcToken=c),o.items.push(S)}else{g&&r(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
|
|
184
|
+
`+w.comment:b.comment=w.comment);const k=new On(b);n.options.keepSourceTokens&&(k.srcToken=c),o.items.push(k)}}return u&&u<a&&r(u,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,a,u??a],o}function N7({composeNode:t,composeEmptyNode:e},n,i,r,s){const l=s?.nodeClass??cs,o=new l(n.schema);n.atRoot&&(n.atRoot=!1);let a=i.offset,u=null;for(const{start:c,value:f}of i.items){const d=Ql(c,{indicator:"seq-item-ind",next:f,offset:a,onError:r,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f&&f.type==="block-seq"?r(d.end,"BAD_INDENT","All sequence items must start at the same column"):r(a,"MISSING_CHAR","Sequence item without - indicator");else{u=d.end,d.comment&&(o.comment=d.comment);continue}const h=f?t(n,f,d,r):e(n,d.end,c,null,d,r);n.schema.compat&&Wh(i.indent,f,r),a=h.range[2],o.items.push(h)}return o.range=[i.offset,a,u??a],o}function Ka(t,e,n,i){let r="";if(t){let s=!1,l="";for(const o of t){const{source:a,type:u}=o;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=a.substring(1)||" ";r?r+=l+c:r=c,l="";break}case"newline":r&&(l+=a),s=!0;break;default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=a.length}}return{comment:r,offset:e}}const zd="Block collections are not allowed within flow collections",jd=t=>t&&(t.type==="block-map"||t.type==="block-seq");function L7({composeNode:t,composeEmptyNode:e},n,i,r,s){const l=i.start.source==="{",o=l?"flow map":"flow sequence",a=s?.nodeClass??(l?ui:cs),u=new a(n.schema);u.flow=!0;const c=n.atRoot;c&&(n.atRoot=!1);let f=i.offset+i.start.source.length;for(let g=0;g<i.items.length;++g){const v=i.items[g],{start:b,key:w,sep:k,value:S}=v,E=Ql(b,{flow:o,indicator:"explicit-key-ind",next:w??k?.[0],offset:f,onError:r,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!k&&!S){g===0&&E.comma?r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):g<i.items.length-1&&r(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),E.comment&&(u.comment?u.comment+=`
|
|
185
|
+
`+E.comment:u.comment=E.comment),f=E.end;continue}!l&&n.options.strict&&ga(w)&&r(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)E.comma&&r(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(E.comma||r(E.start,"MISSING_CHAR",`Missing , between ${o} items`),E.comment){let P="";e:for(const M of b)switch(M.type){case"comma":case"space":break;case"comment":P=M.source.substring(1);break e;default:break e}if(P){let M=u.items[u.items.length-1];Wt(M)&&(M=M.value??M.key),M.comment?M.comment+=`
|
|
186
|
+
`+P:M.comment=P,E.comment=E.comment.substring(P.length+1)}}if(!l&&!k&&!E.found){const P=S?t(n,S,E,r):e(n,E.end,k,null,E,r);u.items.push(P),f=P.range[2],jd(S)&&r(P.range,"BLOCK_IN_FLOW",zd)}else{const P=E.end,M=w?t(n,w,E,r):e(n,P,b,null,E,r);jd(w)&&r(M.range,"BLOCK_IN_FLOW",zd);const I=Ql(k??[],{flow:o,indicator:"map-value-ind",next:S,offset:M.range[2],onError:r,startOnNewline:!1});if(I.found){if(!l&&!E.found&&n.options.strict){if(k)for(const R of k){if(R===I.found)break;if(R.type==="newline"){r(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<I.found.offset-1024&&r(I.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source&&S.source[0]===":"?r(S,"MISSING_CHAR",`Missing space after : in ${o}`):r(I.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const D=S?t(n,S,I,r):I.found?e(n,I.end,k,null,I,r):null;D?jd(S)&&r(D.range,"BLOCK_IN_FLOW",zd):I.comment&&(M.comment?M.comment+=`
|
|
187
|
+
`+I.comment:M.comment=I.comment);const z=new On(M,D);if(n.options.keepSourceTokens&&(z.srcToken=v),l){const R=u;c3(n,R.items,M)&&r(P,"DUPLICATE_KEY","Map keys must be unique"),R.items.push(z)}else{const R=new ui(n.schema);R.flow=!0,R.items.push(z),u.items.push(R)}f=D?D.range[2]:I.end}}const d=l?"}":"]",[h,...m]=i.end;let p=f;if(h&&h.source===d)p=h.offset+h.source.length;else{const g=o[0].toUpperCase()+o.substring(1),v=c?`${g} must end with a ${d}`:`${g} in block collection must be sufficiently indented and end with a ${d}`;r(f,c?"MISSING_CHAR":"BAD_INDENT",v),h&&h.source.length!==1&&m.unshift(h)}if(m.length>0){const g=Ka(m,p,n.options.strict,r);g.comment&&(u.comment?u.comment+=`
|
|
188
|
+
`+g.comment:u.comment=g.comment),u.range=[i.offset,p,g.offset]}else u.range=[i.offset,p,p];return u}function Bd(t,e,n,i,r,s){const l=n.type==="block-map"?C7(t,e,n,i,s):n.type==="block-seq"?N7(t,e,n,i,s):L7(t,e,n,i,s),o=l.constructor;return r==="!"||r===o.tagName?(l.tag=o.tagName,l):(r&&(l.tag=r),l)}function O7(t,e,n,i,r){const s=i?e.directives.tagName(i.source,f=>r(i,"TAG_RESOLVE_FAILED",f)):null,l=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!s||s==="!"||s===ui.tagName&&l==="map"||s===cs.tagName&&l==="seq"||!l)return Bd(t,e,n,r,s);let o=e.schema.tags.find(f=>f.tag===s&&f.collection===l);if(!o){const f=e.schema.knownTags[s];if(f&&f.collection===l)e.schema.tags.push(Object.assign({},f,{default:!1})),o=f;else return f?.collection?r(i,"BAD_COLLECTION_TYPE",`${f.tag} used for ${l} collection, but expects ${f.collection}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Bd(t,e,n,r,s)}const a=Bd(t,e,n,r,s,o),u=o.resolve?.(a,f=>r(i,"TAG_RESOLVE_FAILED",f),e.options)??a,c=rn(u)?u:new ft(u);return c.range=a.range,c.tag=s,o?.format&&(c.format=o.format),c}function f3(t,e,n){const i=t.offset,r=P7(t,e,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const s=r.mode===">"?ft.BLOCK_FOLDED:ft.BLOCK_LITERAL,l=t.source?I7(t.source):[];let o=l.length;for(let p=l.length-1;p>=0;--p){const g=l[p][1];if(g===""||g==="\r")o=p;else break}if(o===0){const p=r.chomp==="+"&&l.length>0?`
|
|
189
|
+
`.repeat(Math.max(1,l.length-1)):"";let g=i+r.length;return t.source&&(g+=t.source.length),{value:p,type:s,comment:r.comment,range:[i,g,g]}}let a=t.indent+r.indent,u=t.offset+r.length,c=0;for(let p=0;p<o;++p){const[g,v]=l[p];if(v===""||v==="\r")r.indent===0&&g.length>a&&(a=g.length);else{g.length<a&&n(u+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(a=g.length),c=p;break}u+=g.length+v.length+1}for(let p=l.length-1;p>=o;--p)l[p][0].length>a&&(o=p+1);let f="",d="",h=!1;for(let p=0;p<c;++p)f+=l[p][0].slice(a)+`
|
|
190
|
+
`;for(let p=c;p<o;++p){let[g,v]=l[p];u+=g.length+v.length+1;const b=v[v.length-1]==="\r";if(b&&(v=v.slice(0,-1)),v&&g.length<a){const k=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(u-v.length-(b?2:1),"BAD_INDENT",k),g=""}s===ft.BLOCK_LITERAL?(f+=d+g.slice(a)+v,d=`
|
|
191
|
+
`):g.length>a||v[0]===" "?(d===" "?d=`
|
|
192
|
+
`:!h&&d===`
|
|
193
|
+
`&&(d=`
|
|
194
|
+
|
|
195
|
+
`),f+=d+g.slice(a)+v,d=`
|
|
196
|
+
`,h=!0):v===""?d===`
|
|
197
|
+
`?f+=`
|
|
198
|
+
`:d=`
|
|
199
|
+
`:(f+=d+v,d=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let p=o;p<l.length;++p)f+=`
|
|
200
|
+
`+l[p][0].slice(a);f[f.length-1]!==`
|
|
201
|
+
`&&(f+=`
|
|
202
|
+
`);break;default:f+=`
|
|
203
|
+
`}const m=i+r.length+t.source.length;return{value:f,type:s,comment:r.comment,range:[i,m,m]}}function P7({offset:t,props:e},n,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=e[0],s=r[0];let l=0,o="",a=-1;for(let d=1;d<r.length;++d){const h=r[d];if(!o&&(h==="-"||h==="+"))o=h;else{const m=Number(h);!l&&m?l=m:a===-1&&(a=t+d)}}a!==-1&&i(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let u=!1,c="",f=r.length;for(let d=1;d<e.length;++d){const h=e[d];switch(h.type){case"space":u=!0;case"newline":f+=h.source.length;break;case"comment":n&&!u&&i(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,c=h.source.substring(1);break;case"error":i(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{const m=`Unexpected token in block scalar header: ${h.type}`;i(h,"UNEXPECTED_TOKEN",m);const p=h.source;p&&typeof p=="string"&&(f+=p.length)}}}return{mode:s,indent:l,chomp:o,comment:c,length:f}}function I7(t){const e=t.split(/\n( *)/),n=e[0],i=n.match(/^( *)/),s=[i?.[1]?[i[1],n.slice(i[1].length)]:["",n]];for(let l=1;l<e.length;l+=2)s.push([e[l],e[l+1]]);return s}function d3(t,e,n){const{offset:i,type:r,source:s,end:l}=t;let o,a;const u=(d,h,m)=>n(i+d,h,m);switch(r){case"scalar":o=ft.PLAIN,a=D7(s,u);break;case"single-quoted-scalar":o=ft.QUOTE_SINGLE,a=M7(s,u);break;case"double-quoted-scalar":o=ft.QUOTE_DOUBLE,a=R7(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}const c=i+s.length,f=Ka(l,c,e,n);return{value:a,type:o,comment:f.comment,range:[i,c,f.offset]}}function D7(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),h3(t)}function M7(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),h3(t.slice(1,-1)).replace(/''/g,"'")}function h3(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
204
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
205
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let r=i[1],s=" ",l=e.lastIndex;for(n.lastIndex=l;i=n.exec(t);)i[1]===""?s===`
|
|
206
|
+
`?r+=s:s=`
|
|
207
|
+
`:(r+=s+i[1],s=" "),l=n.lastIndex;const o=/[ \t]*(.*)/sy;return o.lastIndex=l,i=o.exec(t),r+s+(i?.[1]??"")}function R7(t,e){let n="";for(let i=1;i<t.length-1;++i){const r=t[i];if(!(r==="\r"&&t[i+1]===`
|
|
208
|
+
`))if(r===`
|
|
209
|
+
`){const{fold:s,offset:l}=$7(t,i);n+=s,i=l}else if(r==="\\"){let s=t[++i];const l=F7[s];if(l)n+=l;else if(s===`
|
|
210
|
+
`)for(s=t[i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="\r"&&t[i+1]===`
|
|
211
|
+
`)for(s=t[++i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="x"||s==="u"||s==="U"){const o={x:2,u:4,U:8}[s];n+=z7(t,i+1,o,e),i+=o}else{const o=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(r===" "||r===" "){const s=i;let l=t[i+1];for(;l===" "||l===" ";)l=t[++i+1];l!==`
|
|
212
|
+
`&&!(l==="\r"&&t[i+2]===`
|
|
213
|
+
`)&&(n+=i>s?t.slice(s,i+1):r)}else n+=r}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function $7(t,e){let n="",i=t[e+1];for(;(i===" "||i===" "||i===`
|
|
214
|
+
`||i==="\r")&&!(i==="\r"&&t[e+2]!==`
|
|
215
|
+
`);)i===`
|
|
216
|
+
`&&(n+=`
|
|
217
|
+
`),e+=1,i=t[e+1];return n||(n=" "),{fold:n,offset:e}}const F7={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
218
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function z7(t,e,n,i){const r=t.substr(e,n),l=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(l)){const o=t.substr(e-2,n+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(l)}function p3(t,e,n,i){const{value:r,type:s,comment:l,range:o}=e.type==="block-scalar"?f3(e,t.options.strict,i):d3(e,t.options.strict,i),a=n?t.directives.tagName(n.source,f=>i(n,"TAG_RESOLVE_FAILED",f)):null,u=n&&a?j7(t.schema,r,a,n,i):e.type==="scalar"?B7(t,r,e,i):t.schema[Fr];let c;try{const f=u.resolve(r,d=>i(n??e,"TAG_RESOLVE_FAILED",d),t.options);c=zt(f)?f:new ft(f)}catch(f){const d=f instanceof Error?f.message:String(f);i(n??e,"TAG_RESOLVE_FAILED",d),c=new ft(r)}return c.range=o,c.source=r,s&&(c.type=s),a&&(c.tag=a),u.format&&(c.format=u.format),l&&(c.comment=l),c}function j7(t,e,n,i,r){if(n==="!")return t[Fr];const s=[];for(const o of t.tags)if(!o.collection&&o.tag===n)if(o.default&&o.test)s.push(o);else return o;for(const o of s)if(o.test?.test(e))return o;const l=t.knownTags[n];return l&&!l.collection?(t.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Fr])}function B7({directives:t,schema:e},n,i,r){const s=e.tags.find(l=>l.default&&l.test?.test(n))||e[Fr];if(e.compat){const l=e.compat.find(o=>o.default&&o.test?.test(n))??e[Fr];if(s.tag!==l.tag){const o=t.tagString(s.tag),a=t.tagString(l.tag),u=`Value may be parsed as either ${o} or ${a}`;r(i,"TAG_RESOLVE_FAILED",u,!0)}}return s}function U7(t,e,n){if(e){n===null&&(n=e.length);for(let i=n-1;i>=0;--i){let r=e[i];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=e[++i];r?.type==="space";)t+=r.source.length,r=e[++i];break}}return t}const q7={composeNode:m3,composeEmptyNode:Tm};function m3(t,e,n,i){const{spaceBefore:r,comment:s,anchor:l,tag:o}=n;let a,u=!0;switch(e.type){case"alias":a=H7(t,e,i),(l||o)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":a=p3(t,e,o,i),l&&(a.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":a=O7(q7,t,e,o,i),l&&(a.anchor=l.source.substring(1));break;default:{const c=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",c),a=Tm(t,e.offset,void 0,null,n,i),u=!1}}return l&&a.anchor===""&&i(l,"BAD_ALIAS","Anchor cannot be an empty string"),r&&(a.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?a.comment=s:a.commentBefore=s),t.options.keepSourceTokens&&u&&(a.srcToken=e),a}function Tm(t,e,n,i,{spaceBefore:r,comment:s,anchor:l,tag:o,end:a},u){const c={type:"scalar",offset:U7(e,n,i),indent:-1,source:""},f=p3(t,c,o,u);return l&&(f.anchor=l.source.substring(1),f.anchor===""&&u(l,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=a),f}function H7({options:t},{offset:e,source:n,end:i},r){const s=new vf(n.substring(1));s.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=e+n.length,o=Ka(i,l,t.strict,r);return s.range=[e,l,o.offset],o.comment&&(s.comment=o.comment),s}function x7(t,e,{offset:n,start:i,value:r,end:s},l){const o=Object.assign({_directives:e},t),a=new yo(void 0,o),u={atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},c=Ql(i,{indicator:"doc-start",next:r??s?.[0],offset:n,onError:l,startOnNewline:!0});c.found&&(a.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!c.hasNewline&&l(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=r?m3(u,r,c,l):Tm(u,c.end,i,null,c,l);const f=a.contents.range[2],d=Ka(s,f,!1,l);return d.comment&&(a.comment=d.comment),a.range=[n,f,d.offset],a}function Ro(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function u0(t){let e="",n=!1,i=!1;for(let r=0;r<t.length;++r){const s=t[r];switch(s[0]){case"#":e+=(e===""?"":i?`
|
|
219
|
+
|
|
220
|
+
`:`
|
|
221
|
+
`)+(s.substring(1)||" "),n=!0,i=!1;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:e,afterEmptyLine:i}}class Am{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,r,s)=>{const l=Ro(n);s?this.warnings.push(new u3(l,i,r)):this.errors.push(new Os(l,i,r))},this.directives=new Rn({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:i,afterEmptyLine:r}=u0(this.prelude);if(i){const s=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
222
|
+
${i}`:i;else if(r||e.directives.docStart||!s)e.commentBefore=i;else if(Kt(s)&&!s.flow&&s.items.length>0){let l=s.items[0];Wt(l)&&(l=l.key);const o=l.commentBefore;l.commentBefore=o?`${i}
|
|
223
|
+
${o}`:i}else{const l=s.commentBefore;s.commentBefore=l?`${i}
|
|
224
|
+
${l}`:i}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,i=-1){for(const r of e)yield*this.next(r);yield*this.end(n,i)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,i,r)=>{const s=Ro(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=x7(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Os(Ro(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new Os(Ro(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const n=Ka(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const i=this.doc.comment;this.doc.comment=i?`${i}
|
|
225
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Os(Ro(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const i=Object.assign({_directives:this.directives},this.options),r=new yo(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}}function V7(t,e=!0,n){if(t){const i=(r,s,l)=>{const o=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(o,s,l);else throw new Os([o,o+1],s,l)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return d3(t,e,i);case"block-scalar":return f3(t,e,i)}}return null}function W7(t,e){const{implicitKey:n=!1,indent:i,inFlow:r=!1,offset:s=-1,type:l="PLAIN"}=e,o=Ya({type:l,value:t},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
226
|
+
`}];switch(o[0]){case"|":case">":{const u=o.indexOf(`
|
|
227
|
+
`),c=o.substring(0,u),f=o.substring(u+1)+`
|
|
228
|
+
`,d=[{type:"block-scalar-header",offset:s,indent:i,source:c}];return g3(d,a)||d.push({type:"newline",offset:-1,indent:i,source:`
|
|
229
|
+
`}),{type:"block-scalar",offset:s,indent:i,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:o,end:a};default:return{type:"scalar",offset:s,indent:i,source:o,end:a}}}function Y7(t,e,n={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:s=!1,type:l}=n,o="indent"in t?t.indent:null;if(i&&typeof o=="number"&&(o+=2),!l)switch(t.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const a=Ya({type:l,value:e},{implicitKey:r||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":G7(t,a);break;case'"':Ud(t,a,"double-quoted-scalar");break;case"'":Ud(t,a,"single-quoted-scalar");break;default:Ud(t,a,"scalar")}}function G7(t,e){const n=e.indexOf(`
|
|
230
|
+
`),i=e.substring(0,n),r=e.substring(n+1)+`
|
|
231
|
+
`;if(t.type==="block-scalar"){const s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,t.source=r}else{const{offset:s}=t,l="indent"in t?t.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:l,source:i}];g3(o,"end"in t?t.end:void 0)||o.push({type:"newline",offset:-1,indent:l,source:`
|
|
232
|
+
`});for(const a of Object.keys(t))a!=="type"&&a!=="offset"&&delete t[a];Object.assign(t,{type:"block-scalar",indent:l,props:o,source:r})}}function g3(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Ud(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const i=t.props.slice(1);let r=e.length;t.props[0].type==="block-scalar-header"&&(r-=t.props[0].source.length);for(const s of i)s.offset+=r;delete t.props,Object.assign(t,{type:n,source:e,end:i});break}case"block-map":case"block-seq":{const r={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
233
|
+
`};delete t.items,Object.assign(t,{type:n,source:e,end:[r]});break}default:{const i="indent"in t?t.indent:-1,r="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:i,source:e,end:r})}}}const K7=t=>"type"in t?Cc(t):Wu(t);function Cc(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=Cc(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Wu(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Wu(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Wu(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Wu({start:t,key:e,sep:n,value:i}){let r="";for(const s of t)r+=s.source;if(e&&(r+=Cc(e)),n)for(const s of n)r+=s.source;return i&&(r+=Cc(i)),r}const Yh=Symbol("break visit"),Z7=Symbol("skip children"),_3=Symbol("remove item");function Hs(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),b3(Object.freeze([]),t,e)}Hs.BREAK=Yh;Hs.SKIP=Z7;Hs.REMOVE=_3;Hs.itemAtPath=(t,e)=>{let n=t;for(const[i,r]of e){const s=n?.[i];if(s&&"items"in s)n=s.items[r];else return}return n};Hs.parentCollection=(t,e)=>{const n=Hs.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],r=n?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function b3(t,e,n){let i=n(e,t);if(typeof i=="symbol")return i;for(const r of["key","value"]){const s=e[r];if(s&&"items"in s){for(let l=0;l<s.items.length;++l){const o=b3(Object.freeze(t.concat([[r,l]])),s.items[l],n);if(typeof o=="number")l=o-1;else{if(o===Yh)return Yh;o===_3&&(s.items.splice(l,1),l-=1)}}typeof i=="function"&&r==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}const Lf="\uFEFF",Of="",Pf="",_a="",J7=t=>!!t&&"items"in t,X7=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Q7(t){switch(t){case Lf:return"<BOM>";case Of:return"<DOC>";case Pf:return"<FLOW_END>";case _a:return"<SCALAR>";default:return JSON.stringify(t)}}function v3(t){switch(t){case Lf:return"byte-order-mark";case Of:return"doc-mode";case Pf:return"flow-error-end";case _a:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
234
|
+
`:case`\r
|
|
235
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const eM=Object.freeze(Object.defineProperty({__proto__:null,BOM:Lf,DOCUMENT:Of,FLOW_END:Pf,SCALAR:_a,createScalarToken:W7,isCollection:J7,isScalar:X7,prettyToken:Q7,resolveAsScalar:V7,setScalarValue:Y7,stringify:K7,tokenType:v3,visit:Hs},Symbol.toStringTag,{value:"Module"}));function yi(t){switch(t){case void 0:case" ":case`
|
|
236
|
+
`:case"\r":case" ":return!0;default:return!1}}const c0="0123456789ABCDEFabcdef".split(""),tM="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),qd=",[]{}".split(""),nM=` ,[]{}
|
|
237
|
+
\r `.split(""),Hd=t=>!t||nM.includes(t);class y3{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
238
|
+
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
239
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let i=0;for(;n===" ";)n=this.buffer[++i+e];if(n==="\r"){const r=this.buffer[i+e+1];if(r===`
|
|
240
|
+
`||!r&&!this.atEnd)return e+i+1}return n===`
|
|
241
|
+
`||i>=this.indentNext||!n&&!this.atEnd?e+i:-1}if(n==="-"||n==="."){const i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&yi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
242
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Lf&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length;const i=e.indexOf("#");if(i!==-1){const s=e[i-1];(s===" "||s===" ")&&(n=i-1)}for(;;){const s=e[n-1];if(s===" "||s===" ")n-=1;else break}const r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Of,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if(n==="---"&&yi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(n==="..."&&yi(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!yi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&yi(n)){const i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Hd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,i=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&yi(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Pf,yield*this.parseLineStart();let s=0;for(;r[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),r[s]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Hd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const l=this.charAt(1);if(this.flowKey||yi(l)||l===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}const i=this.buffer.substring(0,n);let r=i.indexOf(`
|
|
243
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){const s=this.continueScalar(r+1);if(s===-1)break;r=i.indexOf(`
|
|
244
|
+
`,s)}r!==-1&&(n=r-(i[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>yi(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,i;e:for(let r=this.pos;i=this.buffer[r];++r)switch(i){case" ":n+=1;break;case`
|
|
245
|
+
`:e=r,n=0;break;case"\r":{const s=this.buffer[r+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
246
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
247
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep)do{let r=e-1,s=this.buffer[r];s==="\r"&&(s=this.buffer[--r]);const l=r;for(;s===" "||s===" ";)s=this.buffer[--r];if(s===`
|
|
248
|
+
`&&r>=this.pos&&r+1+n>l)e=r;else break}while(!0);return yield _a,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){const s=this.buffer[i+1];if(yi(s)||e&&s===",")break;n=i}else if(yi(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===`
|
|
249
|
+
`?(i+=1,r=`
|
|
250
|
+
`,s=this.buffer[i+1]):n=i),s==="#"||e&&qd.includes(s))break;if(r===`
|
|
251
|
+
`){const l=this.continueScalar(i+1);if(l===-1)break;i=Math.max(i,l-2)}}else{if(e&&qd.includes(r))break;n=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield _a,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Hd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(yi(n)||e&&qd.includes(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!yi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(tM.includes(n))n=this.buffer[++e];else if(n==="%"&&c0.includes(this.buffer[e+1])&&c0.includes(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
252
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
253
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||e&&i===" ");const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let n=this.pos,i=this.buffer[n];for(;!e(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class w3{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,i=this.lineStarts.length;for(;n<i;){const s=n+i>>1;this.lineStarts[s]<e?n=s+1:i=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const r=this.lineStarts[n-1];return{line:n,col:e-r+1}}}}function ji(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function f0(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function k3(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Au(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function gl(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function d0(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!ji(e.start,"explicit-key-ind")&&!ji(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,k3(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Cm{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new y3,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const i of this.lexer.lex(e,n))yield*this.next(i);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=v3(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&d0(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{const r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!ji(r.start,"explicit-key-ind");return}break}case"block-seq":{const r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{const r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&f0(r.start)===-1&&(n.indent===0||r.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(i.type==="document"?i.end=r.start:i.items.push({start:r.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{f0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=Au(this.peek(2)),i=gl(n);let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
254
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
255
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&n.sep&&this.type!=="seq-item-ind";let r=[];if(i&&n.sep&&!n.value){const s=[];for(let l=0;l<n.sep.length;++l){const o=n.sep[l];switch(o.type){case"newline":s.push(l);break;case"space":break;case"comment":o.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(r=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!ji(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(r.push(this.sourceToken),e.items.push({start:r})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(ji(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ji(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(k3(n.key)&&!ji(n.sep,"newline")){const s=gl(n.start),l=n.key,o=n.sep;o.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:l,sep:o}]})}else r.length>0?n.sep=n.sep.concat(r,this.sourceToken):n.sep.push(this.sourceToken);else if(ji(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const s=gl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):ji(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);i||n.value?(e.items.push({start:r,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(e);if(s){i&&s.type!=="block-seq"&&ji(n.start,"explicit-key-ind")&&e.items.push({start:r}),this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||ji(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const r=Au(i),s=gl(r);d0(e);const l=e.end.splice(1,e.end.length);l.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
256
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
257
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Au(e),i=gl(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Au(e),i=gl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function S3(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new w3||null,prettyErrors:e}}function iM(t,e={}){const{lineCounter:n,prettyErrors:i}=S3(e),r=new Cm(n?.addNewLine),s=new Am(e),l=Array.from(s.compose(r.parse(t)));if(i&&n)for(const o of l)o.errors.forEach(Ac(t,n)),o.warnings.forEach(Ac(t,n));return l.length>0?l:Object.assign([],{empty:!0},s.streamInfo())}function E3(t,e={}){const{lineCounter:n,prettyErrors:i}=S3(e),r=new Cm(n?.addNewLine),s=new Am(e);let l=null;for(const o of s.compose(r.parse(t),!0,t.length))if(!l)l=o;else if(l.options.logLevel!=="silent"){l.errors.push(new Os(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(l.errors.forEach(Ac(t,n)),l.warnings.forEach(Ac(t,n))),l}function rM(t,e,n){let i;typeof e=="function"?i=e:n===void 0&&e&&typeof e=="object"&&(n=e);const r=E3(t,n);if(!r)return null;if(r.warnings.forEach(s=>VS(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},n))}function sM(t,e,n){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(t===void 0){const{keepUndefined:r}=n??e??{};if(!r)return}return new yo(t,i,n).toString(n)}const eo=Object.freeze(Object.defineProperty({__proto__:null,Alias:vf,CST:eM,Composer:Am,Document:yo,Lexer:y3,LineCounter:w3,Pair:On,Parser:Cm,Scalar:ft,Schema:Nf,YAMLError:Em,YAMLMap:ui,YAMLParseError:Os,YAMLSeq:cs,YAMLWarning:u3,isAlias:Qs,isCollection:Kt,isDocument:mo,isMap:go,isNode:rn,isPair:Wt,isScalar:zt,isSeq:_o,parse:rM,parseAllDocuments:iM,parseDocument:E3,stringify:sM,visit:us,visitAsync:bf},Symbol.toStringTag,{value:"Module"}));var lM=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),i=s.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var l=s[r];if(!t(e[l],n[l]))return!1}return!0}return e!==e&&n!==n};const ei=yp(lM),Gh="sveltia-cms.prefs",Kh=Xe(),Lt=Xe({},t=>{Kh.set(void 0),(async()=>{try{const e=await Zt.get(Gh)??{};e.apiKeys??={},t(e)}catch{Kh.set({type:"permission_denied"})}})()});Lt.subscribe(async t=>{if(!t||!Object.keys(t).length)return;try{ei(t,await Zt.get(Gh))||await Zt.set(Gh,t)}catch{}const{locale:e,theme:n,devModeEnabled:i=!1}=t;e&&le(E2).includes(e)&&un.set(e);const r=!n||n==="auto",s=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:r?s:n,autoTheming:r,env:i?"dev":"prod"})});function T3(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function A3(t){return t}function zr(t,e){e=e||{};const n=e.delimiter||".",i=e.maxDepth,r=e.transformKey||A3,s={};function l(o,a,u){u=u||1,Object.keys(o).forEach(function(c){const f=o[c],d=e.safe&&Array.isArray(f),h=Object.prototype.toString.call(f),m=T3(f),p=h==="[object Object]"||h==="[object Array]",g=a?a+n+r(c):r(c);if(!d&&!m&&p&&Object.keys(f).length&&(!e.maxDepth||u<i))return l(f,g,u+1);s[g]=f})}return l(t),s}function xs(t,e){e=e||{};const n=e.delimiter||".",i=e.overwrite||!1,r=e.transformKey||A3,s={};if(T3(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function o(c){const f=Number(c);return isNaN(f)||c.indexOf(".")!==-1||e.object?c:f}function a(c,f,d){return Object.keys(d).reduce(function(h,m){return h[c+n+m]=d[m],h},f)}function u(c){const f=Object.prototype.toString.call(c),d=f==="[object Array]",h=f==="[object Object]";if(c){if(d)return!c.length;if(h)return!Object.keys(c).length}else return!0}return t=Object.keys(t).reduce(function(c,f){const d=Object.prototype.toString.call(t[f]);return!(d==="[object Object]"||d==="[object Array]")||u(t[f])?(c[f]=t[f],c):a(f,c,zr(t[f],e))},{}),Object.keys(t).forEach(function(c){const f=c.split(n).map(r);let d=o(f.shift()),h=o(f[0]),m=s;for(;h!==void 0;){if(d==="__proto__")return;const p=Object.prototype.toString.call(m[d]),g=p==="[object Object]"||p==="[object Array]";if(!i&&!g&&typeof m[d]<"u")return;(i&&!g||!i&&m[d]==null)&&(m[d]=typeof h=="number"&&!e.object?[]:{}),m=m[d],f.length>0&&(d=o(f.shift()),h=o(f[0]))}m[d]=xs(t[c],e)}),s}const to=t=>{const e=new Intl.NumberFormat(le(un),{maximumFractionDigits:1}),n=1e3,i=n*1e3,r=i*1e3,s=r*1e3;return t<n?le(ue)("file_size_units.b",{values:{size:e.format(t)}}):t<i?le(ue)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<r?le(ue)("file_size_units.mb",{values:{size:e.format(t/i)}}):t<s?le(ue)("file_size_units.gb",{values:{size:e.format(t/r)}}):le(ue)("file_size_units.tb",{values:{size:e.format(t/s)}})},Nm=(t,e)=>{if(!e.length)return t;const[,n,i]=t.match(/(.+?)(?:\.([a-zA-Z0-9]+?))?$/)??[],r=new RegExp(`^${dn(n)}(?:-(\\d+?))?${i?`\\.${i}`:""}$`),s=e.sort((o,a)=>o.split(".")[0].localeCompare(a.split(".")[0])).findLast(o=>o.match(r));if(!s)return t;const l=Number((s.match(r)??[])[1]??0)+1;return`${n}-${l}${i?`.${i}`:""}`},Zh=t=>t.filter(Boolean).join("/"),Jh=t=>{const e=t.split("/");let n=!1;return e.forEach((i,r)=>{if(i==="."||i===".."){if(n&&(e[r]=null,i==="..")){const s=e.findLastIndex((l,o)=>!!l&&o<r);s>-1&&(e[s]=null)}}else n=!0}),Zh(e)},oM="modulepreload",aM=function(t){return"/"+t},h0={},uM=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),o=l?.nonce||l?.getAttribute("nonce");r=Promise.all(n.map(a=>{if(a=aM(a),a in h0)return;h0[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!i)for(let h=s.length-1;h>=0;h--){const m=s[h];if(m.href===a&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":oM,u||(d.as="script",d.crossOrigin=""),d.href=a,o&&d.setAttribute("nonce",o),document.head.appendChild(d),u)return new Promise((h,m)=>{d.addEventListener("load",h),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})}))}return r.then(()=>e()).catch(s=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s})},p0="https://unpkg.com/pdfjs-dist/build";let Cu;const cM=(t,e)=>{const n=e==="image",i=n?new Image:document.createElement(e);return new Promise(r=>{const s=()=>{r({dimensions:e==="audio"?void 0:{width:n?i.naturalWidth:i.videoWidth,height:n?i.naturalHeight:i.videoHeight},duration:n?void 0:i.duration})};i.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),i.src=t})},m0=t=>new Date(t*1e3).toISOString().substr(11,8),C3=(t,e,n,i)=>{let r=1;return i?e>n?(r=i/e,t.width=i,t.height=n*r):(r=i/n,t.width=e*r,t.height=i):(t.width=e,t.height=n),r},N3=async(t,{format:e="png",quality:n=1,dimension:i=void 0}={})=>{let r,s=0,l=0;try{r=await createImageBitmap(t),{width:s,height:l}=r}catch{r=await new Promise(u=>{const c=new Image,f=URL.createObjectURL(t);c.addEventListener("load",()=>{({naturalWidth:s,naturalHeight:l}=c),u(c),URL.revokeObjectURL(f)}),c.src=f})}const o=new OffscreenCanvas(512,512),a=o.getContext("2d");return C3(o,s,l,i),a.drawImage(r,0,0,o.width,o.height),o.convertToBlob({type:`image/${e}`,quality:n})},fM=async(t,{format:e="png",quality:n=1,dimension:i=void 0}={})=>{if(!Cu)try{Cu=await uM(()=>import(`${p0}/pdf.min.mjs`),[]),Cu.GlobalWorkerOptions.workerSrc=`${p0}/pdf.worker.min.mjs`}catch{throw new Error("Failed to load PDF.js library")}const r=new OffscreenCanvas(512,512),s=r.getContext("2d");try{const o=await(await Cu.getDocument({url:URL.createObjectURL(t),isEvalSupported:!1,disableAutoFetch:!0}).promise).getPage(1),a=o.getViewport({scale:1}),{width:u,height:c}=a,f=C3(r,u,c,i);await o.render({canvasContext:s,viewport:f===1?a:o.getViewport({scale:f})}).promise}catch{throw new Error("Failed to render PDF")}return r.convertToBlob({type:`image/${e}`,quality:n})},g0=["image","video","audio","document","other"],Xh={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},wn=Xe([]),gi=Xe([]),L3=An([gi],([t],e)=>{e(t.find(({collectionName:n})=>!n))}),Jn=Xe(),Rs=Xe([]),Vs=Xe(),Or=Xe(),Ai=Xe({folder:void 0,files:[]}),Nc=Xe(),Qh=t=>{const e=qs.getType(t.path);return["image","audio","video"].includes(t.kind)||e==="application/pdf"||!!e&&pa(e)},_0=t=>{const e=qs.getType(t.path);return!!e&&pa(e)},Lm=t=>Object.entries(Xh).find(([,e])=>t.match(e))?.[0]??"other",wo=async t=>{const{file:e,blobURL:n,name:i}=t;if(n)return fetch(n).then(s=>s.blob());let r;if(e)r=e;else{const s=await le(ti)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");r=new Blob([s],{type:qs.getType(i)??s.type})}return t.blobURL=URL.createObjectURL(r),r},Om=async t=>(t.blobURL||await wo(t),t.blobURL);let Nu;const O3=async t=>{if(t.thumbnailURL)return t.thumbnailURL;if(Nu===void 0){const{repository:{service:i,owner:r,repo:s}={}}=le(ti)??{};Nu=s?new Sc(`${i}:${r}/${s}`,"asset-thumbnails"):null}let e=await Nu?.get(t.sha);if(!e){const i=await wo(t),r={format:"webp",quality:.85,dimension:512};e=t.name.endsWith(".pdf")?await fM(i,r):await N3(i,r),await Nu?.set(t.sha,e)}const n=URL.createObjectURL(e);return t.thumbnailURL=n,n},P3=(t,e)=>{if(!t.match(/^[/@]/)){if(!e)return;const{collectionName:s,fileName:l,locales:o}=e,a=Mi(s);if(!a)return;const u=l?a._fileMap?.[l]:void 0,{defaultLocale:c}=(u??a)._i18n,f=c in o?c:Object.keys(o)[0],{path:d,content:h}=o[f];if(!d||!h)return;const[,m]=d.match(/(.+?)(?:\/[^/]+)?$/)??[],p=Jh(`${m}/${t}`);return le(wn).find(g=>g.path===p)}const[,n,i]=t.match(/(.+?)\/([^/]+)$/)??[];if(!n)return;const{internalPath:r}=le(gi).findLast(s=>s.publicPath===n)??{};if(r)return le(wn).find(s=>s.path===`${r}/${i}`)},Pm=(t,{pathOnly:e=!1,allowSpecial:n=!1}={})=>{const i=le(gi),{publicPath:r,entryRelative:s}=i.find(({collectionName:a})=>a===t.collectionName)??i.find(({collectionName:a})=>a===null)??{};if(s)return;const l=t.path.replace(t.folder,r??"");return!l.startsWith("/")&&!n?void 0:e?l:`${le(wt)?.site_url??""}${l}`},Ws=async(t,e,{thumbnail:n=!1}={})=>{if(!t)return;if(t.match(/^(?:https?|data):/))return t;const i=P3(t,e);if(i)return(n?await O3(i):await Om(i))??Pm(i)},I3=async t=>{const{kind:e}=t,n=await Om(t),i=Pm(t),r=n??i;let s,l;return["image","video","audio"].includes(e)&&n&&({dimensions:s,duration:l}=await cM(n,e)),{publicURL:i,dimensions:s,duration:l,usedEntries:r?await pM(r):[]}};Jn.subscribe(()=>{Vs.set(void 0)});const xd=t=>t.match(/{{.+?}}/)?t:`{{${t}}}`,b0=new Map,Im=(t,e,n)=>{const i=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),r=b0.get(i);if(r)return r;const s=e.value_field,l=e.display_fields??[s],o=e.search_fields??l,a=xd(s),u=l.map(xd).join(" "),c=o.map(xd).join(" "),f=e.filters??[],d=n.map(h=>{const{content:m}=h?.locales[t]??h?.locales._default??{};return{refEntry:h,hasContent:!!m,flattenedContent:m?zr(m):{}}}).filter(({hasContent:h,flattenedContent:m})=>h&&f.every(({field:p,values:g})=>g.includes(m[p]))).map(({refEntry:h,flattenedContent:m})=>{const p=Object.fromEntries([...new Set([...[...u.matchAll(/{{(.+?)}}/g)].map(k=>k[1]),...[...a.matchAll(/{{(.+?)}}/g)].map(k=>k[1]),...[...c.matchAll(/{{(.+?)}}/g)].map(k=>k[1])].map(k=>k.includes(".")?k.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):k))].map(k=>{if(k.endsWith(".*")){const M=new RegExp(`^${dn(k).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),I=xs(Object.fromEntries(Object.entries(m).filter(([D])=>!!D.match(M))));return[k,I[Object.keys(I)[0]]??""]}if(k==="slug")return[k,h.slug];const S=li({collectionName:e.collection,keyPath:k}),E=k.replace(/^fields\./,""),P=m[E];return S?.widget==="relation"?[k,Dm({fieldConfig:S,valueMap:m,keyPath:E,locale:t})??""]:[k,P??""]})),g=Math.max(...Object.values(p).map(k=>Array.isArray(k)?k.length:1));let v=new Array(g).fill(u),b=new Array(g).fill(a),w=new Array(g).fill(c);return Object.entries(p).forEach(([k,S])=>{Array.isArray(S)?S.forEach((E,P)=>{Object.entries(E).forEach(([M,I])=>{v.forEach((D,z)=>{P%z===0&&(v[P]=v[P].replaceAll(`{{${k}.${M}}}`,I),b[P]=b[P].replaceAll(`{{${k}.${M}}}`,I),w[P]=w[P].replaceAll(`{{${k}.${M}}}`,I))})})}):(v=v.map(E=>E.replaceAll(`{{${k}}}`,S)),b=b.map(E=>E.replaceAll(`{{${k}}}`,S)),w=w.map(E=>E.replaceAll(`{{${k}}}`,S)))}),v.map((k,S)=>({label:k,value:b[S],searchValue:w[S]}))}).flat(1).sort((h,m)=>h.label.localeCompare(m.label));return b0.set(i,d),d},Dm=({fieldConfig:t,valueMap:e,keyPath:n,locale:i})=>{const{multiple:r,collection:s}=t,l=Za(s),o=Im(i,t,l),a=u=>o.find(c=>c.value===u)?.label||u;return r?Object.entries(e).filter(([c])=>c.match(`^${dn(n)}\\.\\d+$`)).map(([,c])=>c).map(a):a(e[n])},Vd=new Map,dM=({fieldConfig:t,valueMap:e,keyPath:n})=>{const i=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),r=Vd.get(i);if(r)return r;const{multiple:s,options:l}=t,o=DS(l),a=f=>l.find(d=>d.value===f)?.label||f;if(s){const f=Object.entries(e).filter(([h])=>h.match(`^${dn(n)}\\.\\d+$`)).map(([,h])=>h),d=o?f.map(a):f;return Vd.set(i,d),d}const u=e[n],c=o?a(u):u;return Vd.set(i,c),c},Wd=new Map,li=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:i})=>{const r=JSON.stringify({collectionName:t,fileName:e,valueMap:n,keyPath:i}),s=Wd.get(r);if(s)return s;const l=Mi(t);if(!l){Wd.set(r,void 0);return}const o=e?l._fileMap?.[e]:void 0,{fields:a=[]}=o??l,u=i.split(".");let c;return u.forEach((f,d)=>{if(d===0)c=a.find(({name:h})=>h===f);else if(c){const h=f.match(/^\d+$/),m=u.slice(0,d),{field:p,fields:g,types:v,typeKey:b="type"}=c;p?c=p:g&&!h?c=g.find(({name:w})=>w===f):v&&h?c=v.find(({name:w})=>w===n[[...m,f,b].join(".")]):v&&f!==b&&(c=v.find(({name:w})=>w===n[[...m,b].join(".")])?.fields?.find(({name:w})=>w===f))}}),Wd.set(r,c),c},If=({collectionName:t,fileName:e,valueMap:n,keyPath:i,locale:r})=>{const s=li({collectionName:t,fileName:e,valueMap:n,keyPath:i});let l=n[i];return s?.widget==="relation"&&(l=Dm({fieldConfig:s,valueMap:n,keyPath:i,locale:r})),s?.widget==="select"&&(l=dM({fieldConfig:s,valueMap:n,keyPath:i})),l??""},no=(t,e,n,{resolveRef:i=!0}={})=>{const{slug:r,locales:s,commitAuthor:{name:l,login:o,email:a}={},commitDate:u}=t;if(n==="slug")return r;if(n==="commit_author")return l||o||a;if(n==="commit_date")return u;const c=s[e]?.content;if(c===void 0)return;const f=n.includes(".")?zr(c):c;if(i){const d=li({collectionName:t.collectionName,keyPath:n});if(d?.widget==="relation")return Dm({fieldConfig:d,valueMap:f,keyPath:n,locale:e})}return f[n]},D3=(t,{relative:e=!1}={})=>{const{collectionName:n,locales:i}=t;return Object.values(i).map(({content:r})=>Object.entries(r).map(([s,l])=>{if(typeof l=="string"&&(!e||!l.match(/^[/@]/))&&["image","file"].includes(li({collectionName:n,keyPath:s})?.widget??"string")){const o=P3(l,t);if(o?.collectionName===n)return o}})).flat(1).filter((r,s,l)=>!!r&&l.indexOf(r)===s)},gs={i18nEnabled:!1,saveAllLocales:!0,locales:["_default"],defaultLocale:"_default",structure:"single_file"},v0=(t,e)=>{const n=le(wt);let i;Ei(n?.i18n)&&(i=n.i18n,t?.i18n?(Ei(t.i18n)&&Object.assign(i,t.i18n),e&&(e.i18n?Ei(e.i18n)&&Object.assign(i,e.i18n):i=void 0)):i=void 0);const{structure:r="single_file",locales:s=[],default_locale:l=void 0,save_all_locales:o=!0}=i??{},a=!!s.length;return{i18nEnabled:a,saveAllLocales:o,locales:a?s:["_default"],defaultLocale:a?l&&s.includes(l)?l:s[0]:"_default",structure:e?"single_file":r}},Hr=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch(n){console.error(n)}return e},di=t=>{const e=Hr(t);if(!e)return t;const n=new Intl.DisplayNames(le(un),{type:"language"});try{return n.of(e)??t}catch(i){return console.error(i),t}},hM=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,ba=Xe(!1),Mm=Xe([]),Pi=Xe([]),Yt=Xe(),is=Xe([]),Yd=new Map,Mi=t=>{const e=Yd.get(t);if(e)return e;const n=le(wt)?.collections.find(r=>r.name===t);if(n?.folder)n.folder=Ln(n.folder);else if(n?.files)n.files.forEach(r=>{r.file=Ln(r.file)});else{Yd.set(t,void 0);return}const i={...n,_fileMap:n.files?.length?Object.fromEntries(n.files.map(r=>[r.name,{...r,_i18n:v0(n,r)}])):void 0,_i18n:v0(n),_assetFolder:le(gi).find(({collectionName:r})=>r===t)};return Yd.set(t,i),i},Rm=(t,e)=>le(Pi).find(n=>n.collectionName===t&&n.fileName===e),Za=t=>{const e=Mi(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:i}}=e;return le(Pi).filter(r=>r.collectionName===t&&(!n||no(r,i,n.field)===n.value))},pM=async t=>{const e=le(wt)?.site_url,n=e&&!t.startsWith("blob:")?t.replace(e,""):t,i=le(Pi),r=await Promise.all(i.map(async s=>{const{locales:l,collectionName:o,fileName:a}=s;return(await Promise.all(Object.values(l).map(async({content:c})=>{const f=zr(c);return(await Promise.all(Object.entries(f).map(async([h,m])=>{if(typeof m!="string"||!m)return!1;const p=li({collectionName:o,fileName:a,valueMap:f,keyPath:h});if(!p)return!1;const{widget:g="string"}=p;if(["image","file"].includes(g))return await Ws(m,s)===n;if(g==="markdown"){const v=[...m.matchAll(hM)];if(v.length)return(await Promise.all(v.map(([,b])=>Ws(b,s)))).includes(n)}return!1}))).includes(!0)}))).includes(!0)}));return i.filter((s,l)=>r[l])};var mM={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{DEV:M3,VITE_SITE_URL:gM}=mM,$m=M3?gM||"http://localhost:5174":void 0,wt=Xe(),ep=Xe(),_M=async()=>{const{href:t="./config.yml"}=document.querySelector('link[type="text/yaml"][rel="cms-config-url"]')??{};let e;try{e=await fetch(t)}catch(r){throw new Error(le(ue)("config.error.fetch_failed"),{cause:r})}const{ok:n,status:i}=e;if(!n)throw new Error(le(ue)("config.error.fetch_failed"),{cause:new Error(le(ue)("config.error.fetch_failed_not_ok",{values:{status:i}}))});try{return eo.parse(await e.text())}catch(r){throw new Error(le(ue)("config.error.parse_failed"),{cause:r})}},bM=t=>{if(!Ei(t))throw new Error(le(ue)("config.error.parse_failed"),{cause:new Error(le(ue)("config.error.parse_failed_invalid_object"))});if(!t.collections?.length)throw new Error(le(ue)("config.error.no_collection"));if(!t.backend?.name)throw new Error(le(ue)("config.error.no_backend"));if(!(t.backend.name in zE))throw new Error(le(ue)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(typeof t.backend.repo!="string"||t.backend.repo.split("/").length!==2)throw new Error(le(ue)("config.error.no_repository"));if(t.backend.auth_type==="implicit")throw new Error(le(ue)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(le(ue)("config.error.oauth_no_app_id"));if(!t.media_folder)throw new Error(le(ue)("config.error.no_media_folder"))},vM=async(t={})=>{wt.set(void 0),ep.set(void 0);let e;try{if(t&&!Ei(t))throw new Error(le(ue)("config.error.parse_failed"));t?.load_config_file===!1?e=t:(e=await _M(),Object.entries(t).length&&(e=r2(e,t))),bM(e),M3&&!e.site_url&&(e.site_url=$m),wt.set(e)}catch(n){ep.set({message:n.name==="Error"?n.message:le(ue)("config.error.unexpected")}),console.error(n,n.cause)}};wt.subscribe(t=>{if(le(Lt).devModeEnabled&&console.info("siteConfig",t),!t)return;const{media_folder:e,public_folder:n,collections:i}=t;Yt.set(Mi(i[0].name));const r=[...i.filter(({folder:c})=>!!c).map(({name:c,folder:f,extension:d,format:h,frontmatter_delimiter:m,yaml_quote:p})=>({collectionName:c,folderPath:Ln(f),extension:d,format:h,frontmatterDelimiter:m,yamlQuote:p})).sort((c,f)=>(c.folderPath??"").localeCompare(f.folderPath??"")),...i.filter(({files:c})=>!!c).map(({name:c,files:f,extension:d,format:h,frontmatter_delimiter:m,yaml_quote:p})=>(f??[]).map(({name:g,file:v})=>({collectionName:c,fileName:g,filePath:Ln(v),extension:d,format:h,frontmatterDelimiter:m,yamlQuote:p}))).flat(1).sort((c,f)=>c.filePath.localeCompare(f.filePath))],s=Ln(e),l=n?`/${Ln(n)}`.replace(/^\/@/,"@"):`/${s}`,o={collectionName:void 0,internalPath:s,publicPath:l,entryRelative:!1},a=i.map(c=>{const{name:f,folder:d,path:h,public_folder:m}=c;let{media_folder:p}=c;if(p===void 0){if(h===void 0)return null;p=""}p=p.replace("{{media_folder}}",s);const g=!p.startsWith("/");return{collectionName:f,internalPath:Ln(g?d??"":p),publicPath:(m??p).replace("{{public_folder}}",l),entryRelative:g}}).filter(Boolean).sort((c,f)=>c.internalPath.localeCompare(f.internalPath)),u=[o,...a];Mm.set(r),gi.set(u),le(Lt).devModeEnabled&&(console.info("allEntryFolders",r),console.info("allAssetFolders",u))});const Yi=Xe();Yi.subscribe(t=>{(async()=>{try{t?await Zt.set("sveltia-cms.user",t):t===null&&await Zt.delete("sveltia-cms.user")}catch{}})()});const Ja=Xe({message:"",canRetry:!1}),Jo=Xe(!1),tp=t=>{let e=t.cause?.message||le(ue)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=le(ue)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=le(ue)(le(Wr)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),Ja.set({message:e,canRetry:n}),console.error(t.message,t.cause)},yM=async()=>{const t=await Zt.get("sveltia-cms.user")||await Zt.get("decap-cms-user")||await Zt.get("netlify-cms-user");let e=Ei(t)&&t.backendName?t:void 0;const n=!!window.location.hostname.match(/^(?:.+\.)?localhost$/),i=e?.backendName?.replace("proxy","local")??(n?"local":le(wt)?.backend?.name);Wr.set(i);const r=le(ti);if(!(!e||!r)){try{e=await r.signIn({token:e.token,auto:!0})}catch{Jo.set(!0)}if(!(!e||le(Jo))){Yi.set(e);try{await r.fetchFiles(),Ja.set({message:"",canRetry:!1})}catch(s){[401,403,404].includes(s.cause?.status)?Jo.set(!0):tp(s)}}}},y0=async(t="")=>{let e;try{e=await le(ti)?.signIn({token:t,auto:!1})}catch(n){tp(n);return}if(e){Yi.set(e);try{await le(ti)?.fetchFiles(),Ja.set({message:"",canRetry:!1})}catch(n){tp(n)}}},wM={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},R3=(t,{commitType:e="update",collection:n,skipCI:i=void 0})=>{const{backend:{commit_messages:r={},automatic_deployments:s}}=le(wt),{login:l="",name:o=""}=le(Yi),[a=""]=t.map(h=>h.slug).filter(Boolean),[u,...c]=t.map(({path:h})=>h),f=n?.label_singular||n?.label||n?.name||"";let d=r[e]||wM[e]||"";return["create","update","delete"].includes(e)&&(d=d.replaceAll("{{slug}}",a).replaceAll("{{collection}}",f).replaceAll("{{path}}",u).replaceAll("{{author-login}}",l).replaceAll("{{author-name}}",o)),["uploadMedia","deleteMedia"].includes(e)&&(d=d.replaceAll("{{path}}",u).replaceAll("{{author-login}}",l).replaceAll("{{author-name}}",o),c.length&&(d+=` +${c.length}`)),["openAuthoring"].includes(e)&&(d=d.replaceAll("{{message}}",e).replaceAll("{{author-login}}",l).replaceAll("{{author-name}}",o)),!["delete","deleteMedia"].includes(e)&&(i===void 0?s===!1:i===!0)&&(d=`[skip ci] ${d}`),d},Df=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:i})=>i in n).map(({type:i,value:r})=>[i,i==="hour"&&r==="24"?"00":r]))};//! moment.js
|
|
258
|
+
//! version : 2.30.1
|
|
259
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
260
|
+
//! license : MIT
|
|
261
|
+
//! momentjs.com
|
|
262
|
+
var $3;function De(){return $3.apply(null,arguments)}function kM(t){$3=t}function Gi(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function $s(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function At(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Fm(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(At(t,e))return!1;return!0}function Vn(t){return t===void 0}function jr(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Xa(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function F3(t,e){var n=[],i,r=t.length;for(i=0;i<r;++i)n.push(e(t[i],i));return n}function Xr(t,e){for(var n in e)At(e,n)&&(t[n]=e[n]);return At(e,"toString")&&(t.toString=e.toString),At(e,"valueOf")&&(t.valueOf=e.valueOf),t}function dr(t,e,n,i){return lE(t,e,n,i,!0).utc()}function SM(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ht(t){return t._pf==null&&(t._pf=SM()),t._pf}var np;Array.prototype.some?np=Array.prototype.some:np=function(t){var e=Object(this),n=e.length>>>0,i;for(i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};function zm(t){var e=null,n=!1,i=t._d&&!isNaN(t._d.getTime());if(i&&(e=ht(t),n=np.call(e.parsedDateParts,function(r){return r!=null}),i=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=i;else return i;return t._isValid}function Mf(t){var e=dr(NaN);return t!=null?Xr(ht(e),t):ht(e).userInvalidated=!0,e}var w0=De.momentProperties=[],Gd=!1;function jm(t,e){var n,i,r,s=w0.length;if(Vn(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),Vn(e._i)||(t._i=e._i),Vn(e._f)||(t._f=e._f),Vn(e._l)||(t._l=e._l),Vn(e._strict)||(t._strict=e._strict),Vn(e._tzm)||(t._tzm=e._tzm),Vn(e._isUTC)||(t._isUTC=e._isUTC),Vn(e._offset)||(t._offset=e._offset),Vn(e._pf)||(t._pf=ht(e)),Vn(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)i=w0[n],r=e[i],Vn(r)||(t[i]=r);return t}function Qa(t){jm(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Gd===!1&&(Gd=!0,De.updateOffset(this),Gd=!1)}function Ki(t){return t instanceof Qa||t!=null&&t._isAMomentObject!=null}function z3(t){De.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Ri(t,e){var n=!0;return Xr(function(){if(De.deprecationHandler!=null&&De.deprecationHandler(null,t),n){var i=[],r,s,l,o=arguments.length;for(s=0;s<o;s++){if(r="",typeof arguments[s]=="object"){r+=`
|
|
263
|
+
[`+s+"] ";for(l in arguments[0])At(arguments[0],l)&&(r+=l+": "+arguments[0][l]+", ");r=r.slice(0,-2)}else r=arguments[s];i.push(r)}z3(t+`
|
|
264
|
+
Arguments: `+Array.prototype.slice.call(i).join("")+`
|
|
265
|
+
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var k0={};function j3(t,e){De.deprecationHandler!=null&&De.deprecationHandler(t,e),k0[t]||(z3(e),k0[t]=!0)}De.suppressDeprecationWarnings=!1;De.deprecationHandler=null;function hr(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function EM(t){var e,n;for(n in t)At(t,n)&&(e=t[n],hr(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ip(t,e){var n=Xr({},t),i;for(i in e)At(e,i)&&($s(t[i])&&$s(e[i])?(n[i]={},Xr(n[i],t[i]),Xr(n[i],e[i])):e[i]!=null?n[i]=e[i]:delete n[i]);for(i in t)At(t,i)&&!At(e,i)&&$s(t[i])&&(n[i]=Xr({},n[i]));return n}function Bm(t){t!=null&&this.set(t)}var rp;Object.keys?rp=Object.keys:rp=function(t){var e,n=[];for(e in t)At(t,e)&&n.push(e);return n};var TM={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function AM(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return hr(i)?i.call(e,n):i}function cr(t,e,n){var i=""+Math.abs(t),r=e-i.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var Um=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Lu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Kd={},jl={};function it(t,e,n,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),t&&(jl[t]=r),e&&(jl[e[0]]=function(){return cr(r.apply(this,arguments),e[1],e[2])}),n&&(jl[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function CM(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function NM(t){var e=t.match(Um),n,i;for(n=0,i=e.length;n<i;n++)jl[e[n]]?e[n]=jl[e[n]]:e[n]=CM(e[n]);return function(r){var s="",l;for(l=0;l<i;l++)s+=hr(e[l])?e[l].call(r,t):e[l];return s}}function Yu(t,e){return t.isValid()?(e=B3(e,t.localeData()),Kd[e]=Kd[e]||NM(e),Kd[e](t)):t.localeData().invalidDate()}function B3(t,e){var n=5;function i(r){return e.longDateFormat(r)||r}for(Lu.lastIndex=0;n>=0&&Lu.test(t);)t=t.replace(Lu,i),Lu.lastIndex=0,n-=1;return t}var LM={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function OM(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Um).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[t])}var PM="Invalid date";function IM(){return this._invalidDate}var DM="%d",MM=/\d{1,2}/;function RM(t){return this._ordinal.replace("%d",t)}var $M={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function FM(t,e,n,i){var r=this._relativeTime[n];return hr(r)?r(t,e,n,i):r.replace(/%d/i,t)}function zM(t,e){var n=this._relativeTime[t>0?"future":"past"];return hr(n)?n(e):n.replace(/%s/i,e)}var S0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function $i(t){return typeof t=="string"?S0[t]||S0[t.toLowerCase()]:void 0}function qm(t){var e={},n,i;for(i in t)At(t,i)&&(n=$i(i),n&&(e[n]=t[i]));return e}var jM={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function BM(t){var e=[],n;for(n in t)At(t,n)&&e.push({unit:n,priority:jM[n]});return e.sort(function(i,r){return i.priority-r.priority}),e}var U3=/\d/,_i=/\d\d/,q3=/\d{3}/,Hm=/\d{4}/,Rf=/[+-]?\d{6}/,Ht=/\d\d?/,H3=/\d\d\d\d?/,x3=/\d\d\d\d\d\d?/,$f=/\d{1,3}/,xm=/\d{1,4}/,Ff=/[+-]?\d{1,6}/,ko=/\d+/,zf=/[+-]?\d+/,UM=/Z|[+-]\d\d:?\d\d/gi,jf=/Z|[+-]\d\d(?::?\d\d)?/gi,qM=/[+-]?\d+(\.\d{1,3})?/,eu=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,So=/^[1-9]\d?/,Vm=/^([1-9]\d|\d)/,Lc;Lc={};function Ve(t,e,n){Lc[t]=hr(e)?e:function(i,r){return i&&n?n:e}}function HM(t,e){return At(Lc,t)?Lc[t](e._strict,e._locale):new RegExp(xM(t))}function xM(t){return Pr(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,i,r,s){return n||i||r||s}))}function Pr(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function wi(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function gt(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=wi(e)),n}var sp={};function Mt(t,e){var n,i=e,r;for(typeof t=="string"&&(t=[t]),jr(e)&&(i=function(s,l){l[e]=gt(s)}),r=t.length,n=0;n<r;n++)sp[t[n]]=i}function tu(t,e){Mt(t,function(n,i,r,s){r._w=r._w||{},e(n,r._w,r,s)})}function VM(t,e,n){e!=null&&At(sp,t)&&sp[t](e,n._a,n,t)}function Bf(t){return t%4===0&&t%100!==0||t%400===0}var Pn=0,Ar=1,nr=2,fn=3,qi=4,Cr=5,Ps=6,WM=7,YM=8;it("Y",0,0,function(){var t=this.year();return t<=9999?cr(t,4):"+"+t});it(0,["YY",2],0,function(){return this.year()%100});it(0,["YYYY",4],0,"year");it(0,["YYYYY",5],0,"year");it(0,["YYYYYY",6,!0],0,"year");Ve("Y",zf);Ve("YY",Ht,_i);Ve("YYYY",xm,Hm);Ve("YYYYY",Ff,Rf);Ve("YYYYYY",Ff,Rf);Mt(["YYYYY","YYYYYY"],Pn);Mt("YYYY",function(t,e){e[Pn]=t.length===2?De.parseTwoDigitYear(t):gt(t)});Mt("YY",function(t,e){e[Pn]=De.parseTwoDigitYear(t)});Mt("Y",function(t,e){e[Pn]=parseInt(t,10)});function Xo(t){return Bf(t)?366:365}De.parseTwoDigitYear=function(t){return gt(t)+(gt(t)>68?1900:2e3)};var V3=Eo("FullYear",!0);function GM(){return Bf(this.year())}function Eo(t,e){return function(n){return n!=null?(W3(this,t,n),De.updateOffset(this,e),this):va(this,t)}}function va(t,e){if(!t.isValid())return NaN;var n=t._d,i=t._isUTC;switch(e){case"Milliseconds":return i?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return i?n.getUTCSeconds():n.getSeconds();case"Minutes":return i?n.getUTCMinutes():n.getMinutes();case"Hours":return i?n.getUTCHours():n.getHours();case"Date":return i?n.getUTCDate():n.getDate();case"Day":return i?n.getUTCDay():n.getDay();case"Month":return i?n.getUTCMonth():n.getMonth();case"FullYear":return i?n.getUTCFullYear():n.getFullYear();default:return NaN}}function W3(t,e,n){var i,r,s,l,o;if(!(!t.isValid()||isNaN(n))){switch(i=t._d,r=t._isUTC,e){case"Milliseconds":return void(r?i.setUTCMilliseconds(n):i.setMilliseconds(n));case"Seconds":return void(r?i.setUTCSeconds(n):i.setSeconds(n));case"Minutes":return void(r?i.setUTCMinutes(n):i.setMinutes(n));case"Hours":return void(r?i.setUTCHours(n):i.setHours(n));case"Date":return void(r?i.setUTCDate(n):i.setDate(n));case"FullYear":break;default:return}s=n,l=t.month(),o=t.date(),o=o===29&&l===1&&!Bf(s)?28:o,r?i.setUTCFullYear(s,l,o):i.setFullYear(s,l,o)}}function KM(t){return t=$i(t),hr(this[t])?this[t]():this}function ZM(t,e){if(typeof t=="object"){t=qm(t);var n=BM(t),i,r=n.length;for(i=0;i<r;i++)this[n[i].unit](t[n[i].unit])}else if(t=$i(t),hr(this[t]))return this[t](e);return this}function JM(t,e){return(t%e+e)%e}var en;Array.prototype.indexOf?en=Array.prototype.indexOf:en=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function Wm(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=JM(e,12);return t+=(e-n)/12,n===1?Bf(t)?29:28:31-n%7%2}it("M",["MM",2],"Mo",function(){return this.month()+1});it("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});it("MMMM",0,0,function(t){return this.localeData().months(this,t)});Ve("M",Ht,So);Ve("MM",Ht,_i);Ve("MMM",function(t,e){return e.monthsShortRegex(t)});Ve("MMMM",function(t,e){return e.monthsRegex(t)});Mt(["M","MM"],function(t,e){e[Ar]=gt(t)-1});Mt(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);r!=null?e[Ar]=r:ht(n).invalidMonth=t});var XM="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Y3="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),G3=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,QM=eu,eR=eu;function tR(t,e){return t?Gi(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||G3).test(e)?"format":"standalone"][t.month()]:Gi(this._months)?this._months:this._months.standalone}function nR(t,e){return t?Gi(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[G3.test(e)?"format":"standalone"][t.month()]:Gi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function iR(t,e,n){var i,r,s,l=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=dr([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(r=en.call(this._shortMonthsParse,l),r!==-1?r:null):(r=en.call(this._longMonthsParse,l),r!==-1?r:null):e==="MMM"?(r=en.call(this._shortMonthsParse,l),r!==-1?r:(r=en.call(this._longMonthsParse,l),r!==-1?r:null)):(r=en.call(this._longMonthsParse,l),r!==-1?r:(r=en.call(this._shortMonthsParse,l),r!==-1?r:null))}function rR(t,e,n){var i,r,s;if(this._monthsParseExact)return iR.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=dr([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[i]&&(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[i].test(t))return i;if(n&&e==="MMM"&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function K3(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=gt(e);else if(e=t.localeData().monthsParse(e),!jr(e))return t}var n=e,i=t.date();return i=i<29?i:Math.min(i,Wm(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,i):t._d.setMonth(n,i),t}function Z3(t){return t!=null?(K3(this,t),De.updateOffset(this,!0),this):va(this,"Month")}function sR(){return Wm(this.year(),this.month())}function lR(t){return this._monthsParseExact?(At(this,"_monthsRegex")||J3.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(At(this,"_monthsShortRegex")||(this._monthsShortRegex=QM),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function oR(t){return this._monthsParseExact?(At(this,"_monthsRegex")||J3.call(this),t?this._monthsStrictRegex:this._monthsRegex):(At(this,"_monthsRegex")||(this._monthsRegex=eR),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function J3(){function t(a,u){return u.length-a.length}var e=[],n=[],i=[],r,s,l,o;for(r=0;r<12;r++)s=dr([2e3,r]),l=Pr(this.monthsShort(s,"")),o=Pr(this.months(s,"")),e.push(l),n.push(o),i.push(o),i.push(l);e.sort(t),n.sort(t),i.sort(t),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function aR(t,e,n,i,r,s,l){var o;return t<100&&t>=0?(o=new Date(t+400,e,n,i,r,s,l),isFinite(o.getFullYear())&&o.setFullYear(t)):o=new Date(t,e,n,i,r,s,l),o}function ya(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Oc(t,e,n){var i=7+e-n,r=(7+ya(t,0,i).getUTCDay()-e)%7;return-r+i-1}function X3(t,e,n,i,r){var s=(7+n-i)%7,l=Oc(t,i,r),o=1+7*(e-1)+s+l,a,u;return o<=0?(a=t-1,u=Xo(a)+o):o>Xo(t)?(a=t+1,u=o-Xo(t)):(a=t,u=o),{year:a,dayOfYear:u}}function wa(t,e,n){var i=Oc(t.year(),e,n),r=Math.floor((t.dayOfYear()-i-1)/7)+1,s,l;return r<1?(l=t.year()-1,s=r+Ir(l,e,n)):r>Ir(t.year(),e,n)?(s=r-Ir(t.year(),e,n),l=t.year()+1):(l=t.year(),s=r),{week:s,year:l}}function Ir(t,e,n){var i=Oc(t,e,n),r=Oc(t+1,e,n);return(Xo(t)-i+r)/7}it("w",["ww",2],"wo","week");it("W",["WW",2],"Wo","isoWeek");Ve("w",Ht,So);Ve("ww",Ht,_i);Ve("W",Ht,So);Ve("WW",Ht,_i);tu(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=gt(t)});function uR(t){return wa(t,this._week.dow,this._week.doy).week}var cR={dow:0,doy:6};function fR(){return this._week.dow}function dR(){return this._week.doy}function hR(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function pR(t){var e=wa(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}it("d",0,"do","day");it("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});it("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});it("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});it("e",0,0,"weekday");it("E",0,0,"isoWeekday");Ve("d",Ht);Ve("e",Ht);Ve("E",Ht);Ve("dd",function(t,e){return e.weekdaysMinRegex(t)});Ve("ddd",function(t,e){return e.weekdaysShortRegex(t)});Ve("dddd",function(t,e){return e.weekdaysRegex(t)});tu(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);r!=null?e.d=r:ht(n).invalidWeekday=t});tu(["d","e","E"],function(t,e,n,i){e[i]=gt(t)});function mR(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function gR(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ym(t,e){return t.slice(e,7).concat(t.slice(0,e))}var _R="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Q3="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),bR="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),vR=eu,yR=eu,wR=eu;function kR(t,e){var n=Gi(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Ym(n,this._week.dow):t?n[t.day()]:n}function SR(t){return t===!0?Ym(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function ER(t){return t===!0?Ym(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function TR(t,e,n){var i,r,s,l=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=dr([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(r=en.call(this._weekdaysParse,l),r!==-1?r:null):e==="ddd"?(r=en.call(this._shortWeekdaysParse,l),r!==-1?r:null):(r=en.call(this._minWeekdaysParse,l),r!==-1?r:null):e==="dddd"?(r=en.call(this._weekdaysParse,l),r!==-1||(r=en.call(this._shortWeekdaysParse,l),r!==-1)?r:(r=en.call(this._minWeekdaysParse,l),r!==-1?r:null)):e==="ddd"?(r=en.call(this._shortWeekdaysParse,l),r!==-1||(r=en.call(this._weekdaysParse,l),r!==-1)?r:(r=en.call(this._minWeekdaysParse,l),r!==-1?r:null)):(r=en.call(this._minWeekdaysParse,l),r!==-1||(r=en.call(this._weekdaysParse,l),r!==-1)?r:(r=en.call(this._shortWeekdaysParse,l),r!==-1?r:null))}function AR(t,e,n){var i,r,s;if(this._weekdaysParseExact)return TR.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=dr([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[i].test(t))return i;if(n&&e==="ddd"&&this._shortWeekdaysParse[i].test(t))return i;if(n&&e==="dd"&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function CR(t){if(!this.isValid())return t!=null?this:NaN;var e=va(this,"Day");return t!=null?(t=mR(t,this.localeData()),this.add(t-e,"d")):e}function NR(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function LR(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=gR(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function OR(t){return this._weekdaysParseExact?(At(this,"_weekdaysRegex")||Gm.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(At(this,"_weekdaysRegex")||(this._weekdaysRegex=vR),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function PR(t){return this._weekdaysParseExact?(At(this,"_weekdaysRegex")||Gm.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(At(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yR),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function IR(t){return this._weekdaysParseExact?(At(this,"_weekdaysRegex")||Gm.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(At(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=wR),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Gm(){function t(c,f){return f.length-c.length}var e=[],n=[],i=[],r=[],s,l,o,a,u;for(s=0;s<7;s++)l=dr([2e3,1]).day(s),o=Pr(this.weekdaysMin(l,"")),a=Pr(this.weekdaysShort(l,"")),u=Pr(this.weekdays(l,"")),e.push(o),n.push(a),i.push(u),r.push(o),r.push(a),r.push(u);e.sort(t),n.sort(t),i.sort(t),r.sort(t),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Km(){return this.hours()%12||12}function DR(){return this.hours()||24}it("H",["HH",2],0,"hour");it("h",["hh",2],0,Km);it("k",["kk",2],0,DR);it("hmm",0,0,function(){return""+Km.apply(this)+cr(this.minutes(),2)});it("hmmss",0,0,function(){return""+Km.apply(this)+cr(this.minutes(),2)+cr(this.seconds(),2)});it("Hmm",0,0,function(){return""+this.hours()+cr(this.minutes(),2)});it("Hmmss",0,0,function(){return""+this.hours()+cr(this.minutes(),2)+cr(this.seconds(),2)});function eE(t,e){it(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}eE("a",!0);eE("A",!1);function tE(t,e){return e._meridiemParse}Ve("a",tE);Ve("A",tE);Ve("H",Ht,Vm);Ve("h",Ht,So);Ve("k",Ht,So);Ve("HH",Ht,_i);Ve("hh",Ht,_i);Ve("kk",Ht,_i);Ve("hmm",H3);Ve("hmmss",x3);Ve("Hmm",H3);Ve("Hmmss",x3);Mt(["H","HH"],fn);Mt(["k","kk"],function(t,e,n){var i=gt(t);e[fn]=i===24?0:i});Mt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});Mt(["h","hh"],function(t,e,n){e[fn]=gt(t),ht(n).bigHour=!0});Mt("hmm",function(t,e,n){var i=t.length-2;e[fn]=gt(t.substr(0,i)),e[qi]=gt(t.substr(i)),ht(n).bigHour=!0});Mt("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[fn]=gt(t.substr(0,i)),e[qi]=gt(t.substr(i,2)),e[Cr]=gt(t.substr(r)),ht(n).bigHour=!0});Mt("Hmm",function(t,e,n){var i=t.length-2;e[fn]=gt(t.substr(0,i)),e[qi]=gt(t.substr(i))});Mt("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[fn]=gt(t.substr(0,i)),e[qi]=gt(t.substr(i,2)),e[Cr]=gt(t.substr(r))});function MR(t){return(t+"").toLowerCase().charAt(0)==="p"}var RR=/[ap]\.?m?\.?/i,$R=Eo("Hours",!0);function FR(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var nE={calendar:TM,longDateFormat:LM,invalidDate:PM,ordinal:DM,dayOfMonthOrdinalParse:MM,relativeTime:$M,months:XM,monthsShort:Y3,week:cR,weekdays:_R,weekdaysMin:bR,weekdaysShort:Q3,meridiemParse:RR},Vt={},$o={},ka;function zR(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n+=1)if(t[n]!==e[n])return n;return i}function E0(t){return t&&t.toLowerCase().replace("_","-")}function jR(t){for(var e=0,n,i,r,s;e<t.length;){for(s=E0(t[e]).split("-"),n=s.length,i=E0(t[e+1]),i=i?i.split("-"):null;n>0;){if(r=Uf(s.slice(0,n).join("-")),r)return r;if(i&&i.length>=n&&zR(s,i)>=n-1)break;n--}e++}return ka}function BR(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Uf(t){var e=null,n;if(Vt[t]===void 0&&typeof module<"u"&&module&&module.exports&&BR(t))try{e=ka._abbr,n=require,n("./locale/"+t),rs(e)}catch{Vt[t]=null}return Vt[t]}function rs(t,e){var n;return t&&(Vn(e)?n=xr(t):n=Zm(t,e),n?ka=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ka._abbr}function Zm(t,e){if(e!==null){var n,i=nE;if(e.abbr=t,Vt[t]!=null)j3("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Vt[t]._config;else if(e.parentLocale!=null)if(Vt[e.parentLocale]!=null)i=Vt[e.parentLocale]._config;else if(n=Uf(e.parentLocale),n!=null)i=n._config;else return $o[e.parentLocale]||($o[e.parentLocale]=[]),$o[e.parentLocale].push({name:t,config:e}),null;return Vt[t]=new Bm(ip(i,e)),$o[t]&&$o[t].forEach(function(r){Zm(r.name,r.config)}),rs(t),Vt[t]}else return delete Vt[t],null}function UR(t,e){if(e!=null){var n,i,r=nE;Vt[t]!=null&&Vt[t].parentLocale!=null?Vt[t].set(ip(Vt[t]._config,e)):(i=Uf(t),i!=null&&(r=i._config),e=ip(r,e),i==null&&(e.abbr=t),n=new Bm(e),n.parentLocale=Vt[t],Vt[t]=n),rs(t)}else Vt[t]!=null&&(Vt[t].parentLocale!=null?(Vt[t]=Vt[t].parentLocale,t===rs()&&rs(t)):Vt[t]!=null&&delete Vt[t]);return Vt[t]}function xr(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ka;if(!Gi(t)){if(e=Uf(t),e)return e;t=[t]}return jR(t)}function qR(){return rp(Vt)}function Jm(t){var e,n=t._a;return n&&ht(t).overflow===-2&&(e=n[Ar]<0||n[Ar]>11?Ar:n[nr]<1||n[nr]>Wm(n[Pn],n[Ar])?nr:n[fn]<0||n[fn]>24||n[fn]===24&&(n[qi]!==0||n[Cr]!==0||n[Ps]!==0)?fn:n[qi]<0||n[qi]>59?qi:n[Cr]<0||n[Cr]>59?Cr:n[Ps]<0||n[Ps]>999?Ps:-1,ht(t)._overflowDayOfYear&&(e<Pn||e>nr)&&(e=nr),ht(t)._overflowWeeks&&e===-1&&(e=WM),ht(t)._overflowWeekday&&e===-1&&(e=YM),ht(t).overflow=e),t}var HR=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xR=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,VR=/Z|[+-]\d\d(?::?\d\d)?/,Ou=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Zd=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],WR=/^\/?Date\((-?\d+)/i,YR=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,GR={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function iE(t){var e,n,i=t._i,r=HR.exec(i)||xR.exec(i),s,l,o,a,u=Ou.length,c=Zd.length;if(r){for(ht(t).iso=!0,e=0,n=u;e<n;e++)if(Ou[e][1].exec(r[1])){l=Ou[e][0],s=Ou[e][2]!==!1;break}if(l==null){t._isValid=!1;return}if(r[3]){for(e=0,n=c;e<n;e++)if(Zd[e][1].exec(r[3])){o=(r[2]||" ")+Zd[e][0];break}if(o==null){t._isValid=!1;return}}if(!s&&o!=null){t._isValid=!1;return}if(r[4])if(VR.exec(r[4]))a="Z";else{t._isValid=!1;return}t._f=l+(o||"")+(a||""),Qm(t)}else t._isValid=!1}function KR(t,e,n,i,r,s){var l=[ZR(t),Y3.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return s&&l.push(parseInt(s,10)),l}function ZR(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function JR(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function XR(t,e,n){if(t){var i=Q3.indexOf(t),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r)return ht(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function QR(t,e,n){if(t)return GR[t];if(e)return 0;var i=parseInt(n,10),r=i%100,s=(i-r)/100;return s*60+r}function rE(t){var e=YR.exec(JR(t._i)),n;if(e){if(n=KR(e[4],e[3],e[2],e[5],e[6],e[7]),!XR(e[1],n,t))return;t._a=n,t._tzm=QR(e[8],e[9],e[10]),t._d=ya.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),ht(t).rfc2822=!0}else t._isValid=!1}function e$(t){var e=WR.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(iE(t),t._isValid===!1)delete t._isValid;else return;if(rE(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:De.createFromInputFallback(t)}De.createFromInputFallback=Ri("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function kl(t,e,n){return t??e??n}function t$(t){var e=new Date(De.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Xm(t){var e,n,i=[],r,s,l;if(!t._d){for(r=t$(t),t._w&&t._a[nr]==null&&t._a[Ar]==null&&n$(t),t._dayOfYear!=null&&(l=kl(t._a[Pn],r[Pn]),(t._dayOfYear>Xo(l)||t._dayOfYear===0)&&(ht(t)._overflowDayOfYear=!0),n=ya(l,0,t._dayOfYear),t._a[Ar]=n.getUTCMonth(),t._a[nr]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=i[e]=r[e];for(;e<7;e++)t._a[e]=i[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[fn]===24&&t._a[qi]===0&&t._a[Cr]===0&&t._a[Ps]===0&&(t._nextDay=!0,t._a[fn]=0),t._d=(t._useUTC?ya:aR).apply(null,i),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[fn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(ht(t).weekdayMismatch=!0)}}function n$(t){var e,n,i,r,s,l,o,a,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,l=4,n=kl(e.GG,t._a[Pn],wa(Bt(),1,4).year),i=kl(e.W,1),r=kl(e.E,1),(r<1||r>7)&&(a=!0)):(s=t._locale._week.dow,l=t._locale._week.doy,u=wa(Bt(),s,l),n=kl(e.gg,t._a[Pn],u.year),i=kl(e.w,u.week),e.d!=null?(r=e.d,(r<0||r>6)&&(a=!0)):e.e!=null?(r=e.e+s,(e.e<0||e.e>6)&&(a=!0)):r=s),i<1||i>Ir(n,s,l)?ht(t)._overflowWeeks=!0:a!=null?ht(t)._overflowWeekday=!0:(o=X3(n,i,r,s,l),t._a[Pn]=o.year,t._dayOfYear=o.dayOfYear)}De.ISO_8601=function(){};De.RFC_2822=function(){};function Qm(t){if(t._f===De.ISO_8601){iE(t);return}if(t._f===De.RFC_2822){rE(t);return}t._a=[],ht(t).empty=!0;var e=""+t._i,n,i,r,s,l,o=e.length,a=0,u,c;for(r=B3(t._f,t._locale).match(Um)||[],c=r.length,n=0;n<c;n++)s=r[n],i=(e.match(HM(s,t))||[])[0],i&&(l=e.substr(0,e.indexOf(i)),l.length>0&&ht(t).unusedInput.push(l),e=e.slice(e.indexOf(i)+i.length),a+=i.length),jl[s]?(i?ht(t).empty=!1:ht(t).unusedTokens.push(s),VM(s,i,t)):t._strict&&!i&&ht(t).unusedTokens.push(s);ht(t).charsLeftOver=o-a,e.length>0&&ht(t).unusedInput.push(e),t._a[fn]<=12&&ht(t).bigHour===!0&&t._a[fn]>0&&(ht(t).bigHour=void 0),ht(t).parsedDateParts=t._a.slice(0),ht(t).meridiem=t._meridiem,t._a[fn]=i$(t._locale,t._a[fn],t._meridiem),u=ht(t).era,u!==null&&(t._a[Pn]=t._locale.erasConvertYear(u,t._a[Pn])),Xm(t),Jm(t)}function i$(t,e,n){var i;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(i=t.isPM(n),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function r$(t){var e,n,i,r,s,l,o=!1,a=t._f.length;if(a===0){ht(t).invalidFormat=!0,t._d=new Date(NaN);return}for(r=0;r<a;r++)s=0,l=!1,e=jm({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[r],Qm(e),zm(e)&&(l=!0),s+=ht(e).charsLeftOver,s+=ht(e).unusedTokens.length*10,ht(e).score=s,o?s<i&&(i=s,n=e):(i==null||s<i||l)&&(i=s,n=e,l&&(o=!0));Xr(t,n||e)}function s$(t){if(!t._d){var e=qm(t._i),n=e.day===void 0?e.date:e.day;t._a=F3([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),Xm(t)}}function l$(t){var e=new Qa(Jm(sE(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function sE(t){var e=t._i,n=t._f;return t._locale=t._locale||xr(t._l),e===null||n===void 0&&e===""?Mf({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),Ki(e)?new Qa(Jm(e)):(Xa(e)?t._d=e:Gi(n)?r$(t):n?Qm(t):o$(t),zm(t)||(t._d=null),t))}function o$(t){var e=t._i;Vn(e)?t._d=new Date(De.now()):Xa(e)?t._d=new Date(e.valueOf()):typeof e=="string"?e$(t):Gi(e)?(t._a=F3(e.slice(0),function(n){return parseInt(n,10)}),Xm(t)):$s(e)?s$(t):jr(e)?t._d=new Date(e):De.createFromInputFallback(t)}function lE(t,e,n,i,r){var s={};return(e===!0||e===!1)&&(i=e,e=void 0),(n===!0||n===!1)&&(i=n,n=void 0),($s(t)&&Fm(t)||Gi(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=n,s._i=t,s._f=e,s._strict=i,l$(s)}function Bt(t,e,n,i){return lE(t,e,n,i,!1)}var a$=Ri("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Bt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Mf()}),u$=Ri("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Bt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Mf()});function oE(t,e){var n,i;if(e.length===1&&Gi(e[0])&&(e=e[0]),!e.length)return Bt();for(n=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][t](n))&&(n=e[i]);return n}function c$(){var t=[].slice.call(arguments,0);return oE("isBefore",t)}function f$(){var t=[].slice.call(arguments,0);return oE("isAfter",t)}var d$=function(){return Date.now?Date.now():+new Date},Fo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function h$(t){var e,n=!1,i,r=Fo.length;for(e in t)if(At(t,e)&&!(en.call(Fo,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(i=0;i<r;++i)if(t[Fo[i]]){if(n)return!1;parseFloat(t[Fo[i]])!==gt(t[Fo[i]])&&(n=!0)}return!0}function p$(){return this._isValid}function m$(){return Qi(NaN)}function qf(t){var e=qm(t),n=e.year||0,i=e.quarter||0,r=e.month||0,s=e.week||e.isoWeek||0,l=e.day||0,o=e.hour||0,a=e.minute||0,u=e.second||0,c=e.millisecond||0;this._isValid=h$(e),this._milliseconds=+c+u*1e3+a*6e4+o*1e3*60*60,this._days=+l+s*7,this._months=+r+i*3+n*12,this._data={},this._locale=xr(),this._bubble()}function Gu(t){return t instanceof qf}function lp(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function g$(t,e,n){var i=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),s=0,l;for(l=0;l<i;l++)(n&&t[l]!==e[l]||!n&>(t[l])!==gt(e[l]))&&s++;return s+r}function aE(t,e){it(t,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+cr(~~(n/60),2)+e+cr(~~n%60,2)})}aE("Z",":");aE("ZZ","");Ve("Z",jf);Ve("ZZ",jf);Mt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=eg(jf,t)});var _$=/([\+\-]|\d\d)/gi;function eg(t,e){var n=(e||"").match(t),i,r,s;return n===null?null:(i=n[n.length-1]||[],r=(i+"").match(_$)||["-",0,0],s=+(r[1]*60)+gt(r[2]),s===0?0:r[0]==="+"?s:-s)}function tg(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(Ki(t)||Xa(t)?t.valueOf():Bt(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),De.updateOffset(n,!1),n):Bt(t).local()}function op(t){return-Math.round(t._d.getTimezoneOffset())}De.updateOffset=function(){};function b$(t,e,n){var i=this._offset||0,r;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=eg(jf,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(r=op(this)),this._offset=t,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?fE(this,Qi(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,De.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:op(this)}function v$(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function y$(t){return this.utcOffset(0,t)}function w$(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(op(this),"m")),this}function k$(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=eg(UM,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function S$(t){return this.isValid()?(t=t?Bt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function E$(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function T$(){if(!Vn(this._isDSTShifted))return this._isDSTShifted;var t={},e;return jm(t,this),t=sE(t),t._a?(e=t._isUTC?dr(t._a):Bt(t._a),this._isDSTShifted=this.isValid()&&g$(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function A$(){return this.isValid()?!this._isUTC:!1}function C$(){return this.isValid()?this._isUTC:!1}function uE(){return this.isValid()?this._isUTC&&this._offset===0:!1}var N$=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,L$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Qi(t,e){var n=t,i=null,r,s,l;return Gu(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:jr(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(i=N$.exec(t))?(r=i[1]==="-"?-1:1,n={y:0,d:gt(i[nr])*r,h:gt(i[fn])*r,m:gt(i[qi])*r,s:gt(i[Cr])*r,ms:gt(lp(i[Ps]*1e3))*r}):(i=L$.exec(t))?(r=i[1]==="-"?-1:1,n={y:ks(i[2],r),M:ks(i[3],r),w:ks(i[4],r),d:ks(i[5],r),h:ks(i[6],r),m:ks(i[7],r),s:ks(i[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(l=O$(Bt(n.from),Bt(n.to)),n={},n.ms=l.milliseconds,n.M=l.months),s=new qf(n),Gu(t)&&At(t,"_locale")&&(s._locale=t._locale),Gu(t)&&At(t,"_isValid")&&(s._isValid=t._isValid),s}Qi.fn=qf.prototype;Qi.invalid=m$;function ks(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function T0(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function O$(t,e){var n;return t.isValid()&&e.isValid()?(e=tg(e,t),t.isBefore(e)?n=T0(t,e):(n=T0(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function cE(t,e){return function(n,i){var r,s;return i!==null&&!isNaN(+i)&&(j3(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=i,i=s),r=Qi(n,i),fE(this,r,t),this}}function fE(t,e,n,i){var r=e._milliseconds,s=lp(e._days),l=lp(e._months);t.isValid()&&(i=i??!0,l&&K3(t,va(t,"Month")+l*n),s&&W3(t,"Date",va(t,"Date")+s*n),r&&t._d.setTime(t._d.valueOf()+r*n),i&&De.updateOffset(t,s||l))}var P$=cE(1,"add"),I$=cE(-1,"subtract");function dE(t){return typeof t=="string"||t instanceof String}function D$(t){return Ki(t)||Xa(t)||dE(t)||jr(t)||R$(t)||M$(t)||t===null||t===void 0}function M$(t){var e=$s(t)&&!Fm(t),n=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,s,l=i.length;for(r=0;r<l;r+=1)s=i[r],n=n||At(t,s);return e&&n}function R$(t){var e=Gi(t),n=!1;return e&&(n=t.filter(function(i){return!jr(i)&&dE(t)}).length===0),e&&n}function $$(t){var e=$s(t)&&!Fm(t),n=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,s;for(r=0;r<i.length;r+=1)s=i[r],n=n||At(t,s);return e&&n}function F$(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function z$(t,e){arguments.length===1&&(arguments[0]?D$(arguments[0])?(t=arguments[0],e=void 0):$$(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Bt(),i=tg(n,this).startOf("day"),r=De.calendarFormat(this,i)||"sameElse",s=e&&(hr(e[r])?e[r].call(this,n):e[r]);return this.format(s||this.localeData().calendar(r,this,Bt(n)))}function j$(){return new Qa(this)}function B$(t,e){var n=Ki(t)?t:Bt(t);return this.isValid()&&n.isValid()?(e=$i(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function U$(t,e){var n=Ki(t)?t:Bt(t);return this.isValid()&&n.isValid()?(e=$i(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function q$(t,e,n,i){var r=Ki(t)?t:Bt(t),s=Ki(e)?e:Bt(e);return this.isValid()&&r.isValid()&&s.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(i[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function H$(t,e){var n=Ki(t)?t:Bt(t),i;return this.isValid()&&n.isValid()?(e=$i(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function x$(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function V$(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function W$(t,e,n){var i,r,s;if(!this.isValid())return NaN;if(i=tg(t,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,e=$i(e),e){case"year":s=Ku(this,i)/12;break;case"month":s=Ku(this,i);break;case"quarter":s=Ku(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return n?s:wi(s)}function Ku(t,e){if(t.date()<e.date())return-Ku(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),i=t.clone().add(n,"months"),r,s;return e-i<0?(r=t.clone().add(n-1,"months"),s=(e-i)/(i-r)):(r=t.clone().add(n+1,"months"),s=(e-i)/(r-i)),-(n+s)||0}De.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";De.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Y$(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function G$(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?Yu(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):hr(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Yu(n,"Z")):Yu(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function K$(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,i,r,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+i+r+s)}function Z$(t){t||(t=this.isUtc()?De.defaultFormatUtc:De.defaultFormat);var e=Yu(this,t);return this.localeData().postformat(e)}function J$(t,e){return this.isValid()&&(Ki(t)&&t.isValid()||Bt(t).isValid())?Qi({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function X$(t){return this.from(Bt(),t)}function Q$(t,e){return this.isValid()&&(Ki(t)&&t.isValid()||Bt(t).isValid())?Qi({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function eF(t){return this.to(Bt(),t)}function hE(t){var e;return t===void 0?this._locale._abbr:(e=xr(t),e!=null&&(this._locale=e),this)}var pE=Ri("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function mE(){return this._locale}var Pc=1e3,Bl=60*Pc,Ic=60*Bl,gE=(365*400+97)*24*Ic;function Ul(t,e){return(t%e+e)%e}function _E(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-gE:new Date(t,e,n).valueOf()}function bE(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-gE:Date.UTC(t,e,n)}function tF(t){var e,n;if(t=$i(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?bE:_E,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ul(e+(this._isUTC?0:this.utcOffset()*Bl),Ic);break;case"minute":e=this._d.valueOf(),e-=Ul(e,Bl);break;case"second":e=this._d.valueOf(),e-=Ul(e,Pc);break}return this._d.setTime(e),De.updateOffset(this,!0),this}function nF(t){var e,n;if(t=$i(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?bE:_E,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ic-Ul(e+(this._isUTC?0:this.utcOffset()*Bl),Ic)-1;break;case"minute":e=this._d.valueOf(),e+=Bl-Ul(e,Bl)-1;break;case"second":e=this._d.valueOf(),e+=Pc-Ul(e,Pc)-1;break}return this._d.setTime(e),De.updateOffset(this,!0),this}function iF(){return this._d.valueOf()-(this._offset||0)*6e4}function rF(){return Math.floor(this.valueOf()/1e3)}function sF(){return new Date(this.valueOf())}function lF(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function oF(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function aF(){return this.isValid()?this.toISOString():null}function uF(){return zm(this)}function cF(){return Xr({},ht(this))}function fF(){return ht(this).overflow}function dF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}it("N",0,0,"eraAbbr");it("NN",0,0,"eraAbbr");it("NNN",0,0,"eraAbbr");it("NNNN",0,0,"eraName");it("NNNNN",0,0,"eraNarrow");it("y",["y",1],"yo","eraYear");it("y",["yy",2],0,"eraYear");it("y",["yyy",3],0,"eraYear");it("y",["yyyy",4],0,"eraYear");Ve("N",ng);Ve("NN",ng);Ve("NNN",ng);Ve("NNNN",SF);Ve("NNNNN",EF);Mt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,i){var r=n._locale.erasParse(t,i,n._strict);r?ht(n).era=r:ht(n).invalidEra=t});Ve("y",ko);Ve("yy",ko);Ve("yyy",ko);Ve("yyyy",ko);Ve("yo",TF);Mt(["y","yy","yyy","yyyy"],Pn);Mt(["yo"],function(t,e,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Pn]=n._locale.eraYearOrdinalParse(t,r):e[Pn]=parseInt(t,10)});function hF(t,e){var n,i,r,s=this._eras||xr("en")._eras;for(n=0,i=s.length;n<i;++n){switch(typeof s[n].since){case"string":r=De(s[n].since).startOf("day"),s[n].since=r.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":r=De(s[n].until).startOf("day").valueOf(),s[n].until=r.valueOf();break}}return s}function pF(t,e,n){var i,r,s=this.eras(),l,o,a;for(t=t.toUpperCase(),i=0,r=s.length;i<r;++i)if(l=s[i].name.toUpperCase(),o=s[i].abbr.toUpperCase(),a=s[i].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(o===t)return s[i];break;case"NNNN":if(l===t)return s[i];break;case"NNNNN":if(a===t)return s[i];break}else if([l,o,a].indexOf(t)>=0)return s[i]}function mF(t,e){var n=t.since<=t.until?1:-1;return e===void 0?De(t.since).year():De(t.since).year()+(e-t.offset)*n}function gF(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].name;return""}function _F(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].narrow;return""}function bF(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until||i[t].until<=n&&n<=i[t].since)return i[t].abbr;return""}function vF(){var t,e,n,i,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=r[t].since<=r[t].until?1:-1,i=this.clone().startOf("day").valueOf(),r[t].since<=i&&i<=r[t].until||r[t].until<=i&&i<=r[t].since)return(this.year()-De(r[t].since).year())*n+r[t].offset;return this.year()}function yF(t){return At(this,"_erasNameRegex")||ig.call(this),t?this._erasNameRegex:this._erasRegex}function wF(t){return At(this,"_erasAbbrRegex")||ig.call(this),t?this._erasAbbrRegex:this._erasRegex}function kF(t){return At(this,"_erasNarrowRegex")||ig.call(this),t?this._erasNarrowRegex:this._erasRegex}function ng(t,e){return e.erasAbbrRegex(t)}function SF(t,e){return e.erasNameRegex(t)}function EF(t,e){return e.erasNarrowRegex(t)}function TF(t,e){return e._eraYearOrdinalRegex||ko}function ig(){var t=[],e=[],n=[],i=[],r,s,l,o,a,u=this.eras();for(r=0,s=u.length;r<s;++r)l=Pr(u[r].name),o=Pr(u[r].abbr),a=Pr(u[r].narrow),e.push(l),t.push(o),n.push(a),i.push(l),i.push(o),i.push(a);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}it(0,["gg",2],0,function(){return this.weekYear()%100});it(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Hf(t,e){it(0,[t,t.length],0,e)}Hf("gggg","weekYear");Hf("ggggg","weekYear");Hf("GGGG","isoWeekYear");Hf("GGGGG","isoWeekYear");Ve("G",zf);Ve("g",zf);Ve("GG",Ht,_i);Ve("gg",Ht,_i);Ve("GGGG",xm,Hm);Ve("gggg",xm,Hm);Ve("GGGGG",Ff,Rf);Ve("ggggg",Ff,Rf);tu(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=gt(t)});tu(["gg","GG"],function(t,e,n,i){e[i]=De.parseTwoDigitYear(t)});function AF(t){return vE.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function CF(t){return vE.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function NF(){return Ir(this.year(),1,4)}function LF(){return Ir(this.isoWeekYear(),1,4)}function OF(){var t=this.localeData()._week;return Ir(this.year(),t.dow,t.doy)}function PF(){var t=this.localeData()._week;return Ir(this.weekYear(),t.dow,t.doy)}function vE(t,e,n,i,r){var s;return t==null?wa(this,i,r).year:(s=Ir(t,i,r),e>s&&(e=s),IF.call(this,t,e,n,i,r))}function IF(t,e,n,i,r){var s=X3(t,e,n,i,r),l=ya(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}it("Q",0,"Qo","quarter");Ve("Q",U3);Mt("Q",function(t,e){e[Ar]=(gt(t)-1)*3});function DF(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}it("D",["DD",2],"Do","date");Ve("D",Ht,So);Ve("DD",Ht,_i);Ve("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Mt(["D","DD"],nr);Mt("Do",function(t,e){e[nr]=gt(t.match(Ht)[0])});var yE=Eo("Date",!0);it("DDD",["DDDD",3],"DDDo","dayOfYear");Ve("DDD",$f);Ve("DDDD",q3);Mt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=gt(t)});function MF(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}it("m",["mm",2],0,"minute");Ve("m",Ht,Vm);Ve("mm",Ht,_i);Mt(["m","mm"],qi);var RF=Eo("Minutes",!1);it("s",["ss",2],0,"second");Ve("s",Ht,Vm);Ve("ss",Ht,_i);Mt(["s","ss"],Cr);var $F=Eo("Seconds",!1);it("S",0,0,function(){return~~(this.millisecond()/100)});it(0,["SS",2],0,function(){return~~(this.millisecond()/10)});it(0,["SSS",3],0,"millisecond");it(0,["SSSS",4],0,function(){return this.millisecond()*10});it(0,["SSSSS",5],0,function(){return this.millisecond()*100});it(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});it(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});it(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});it(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ve("S",$f,U3);Ve("SS",$f,_i);Ve("SSS",$f,q3);var Qr,wE;for(Qr="SSSS";Qr.length<=9;Qr+="S")Ve(Qr,ko);function FF(t,e){e[Ps]=gt(("0."+t)*1e3)}for(Qr="S";Qr.length<=9;Qr+="S")Mt(Qr,FF);wE=Eo("Milliseconds",!1);it("z",0,0,"zoneAbbr");it("zz",0,0,"zoneName");function zF(){return this._isUTC?"UTC":""}function jF(){return this._isUTC?"Coordinated Universal Time":""}var we=Qa.prototype;we.add=P$;we.calendar=z$;we.clone=j$;we.diff=W$;we.endOf=nF;we.format=Z$;we.from=J$;we.fromNow=X$;we.to=Q$;we.toNow=eF;we.get=KM;we.invalidAt=fF;we.isAfter=B$;we.isBefore=U$;we.isBetween=q$;we.isSame=H$;we.isSameOrAfter=x$;we.isSameOrBefore=V$;we.isValid=uF;we.lang=pE;we.locale=hE;we.localeData=mE;we.max=u$;we.min=a$;we.parsingFlags=cF;we.set=ZM;we.startOf=tF;we.subtract=I$;we.toArray=lF;we.toObject=oF;we.toDate=sF;we.toISOString=G$;we.inspect=K$;typeof Symbol<"u"&&Symbol.for!=null&&(we[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});we.toJSON=aF;we.toString=Y$;we.unix=rF;we.valueOf=iF;we.creationData=dF;we.eraName=gF;we.eraNarrow=_F;we.eraAbbr=bF;we.eraYear=vF;we.year=V3;we.isLeapYear=GM;we.weekYear=AF;we.isoWeekYear=CF;we.quarter=we.quarters=DF;we.month=Z3;we.daysInMonth=sR;we.week=we.weeks=hR;we.isoWeek=we.isoWeeks=pR;we.weeksInYear=OF;we.weeksInWeekYear=PF;we.isoWeeksInYear=NF;we.isoWeeksInISOWeekYear=LF;we.date=yE;we.day=we.days=CR;we.weekday=NR;we.isoWeekday=LR;we.dayOfYear=MF;we.hour=we.hours=$R;we.minute=we.minutes=RF;we.second=we.seconds=$F;we.millisecond=we.milliseconds=wE;we.utcOffset=b$;we.utc=y$;we.local=w$;we.parseZone=k$;we.hasAlignedHourOffset=S$;we.isDST=E$;we.isLocal=A$;we.isUtcOffset=C$;we.isUtc=uE;we.isUTC=uE;we.zoneAbbr=zF;we.zoneName=jF;we.dates=Ri("dates accessor is deprecated. Use date instead.",yE);we.months=Ri("months accessor is deprecated. Use month instead",Z3);we.years=Ri("years accessor is deprecated. Use year instead",V3);we.zone=Ri("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",v$);we.isDSTShifted=Ri("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",T$);function BF(t){return Bt(t*1e3)}function UF(){return Bt.apply(null,arguments).parseZone()}function kE(t){return t}var Ct=Bm.prototype;Ct.calendar=AM;Ct.longDateFormat=OM;Ct.invalidDate=IM;Ct.ordinal=RM;Ct.preparse=kE;Ct.postformat=kE;Ct.relativeTime=FM;Ct.pastFuture=zM;Ct.set=EM;Ct.eras=hF;Ct.erasParse=pF;Ct.erasConvertYear=mF;Ct.erasAbbrRegex=wF;Ct.erasNameRegex=yF;Ct.erasNarrowRegex=kF;Ct.months=tR;Ct.monthsShort=nR;Ct.monthsParse=rR;Ct.monthsRegex=oR;Ct.monthsShortRegex=lR;Ct.week=uR;Ct.firstDayOfYear=dR;Ct.firstDayOfWeek=fR;Ct.weekdays=kR;Ct.weekdaysMin=ER;Ct.weekdaysShort=SR;Ct.weekdaysParse=AR;Ct.weekdaysRegex=OR;Ct.weekdaysShortRegex=PR;Ct.weekdaysMinRegex=IR;Ct.isPM=MR;Ct.meridiem=FR;function Dc(t,e,n,i){var r=xr(),s=dr().set(i,e);return r[n](s,t)}function SE(t,e,n){if(jr(t)&&(e=t,t=void 0),t=t||"",e!=null)return Dc(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Dc(t,i,n,"month");return r}function rg(t,e,n,i){typeof t=="boolean"?(jr(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,jr(e)&&(n=e,e=void 0),e=e||"");var r=xr(),s=t?r._week.dow:0,l,o=[];if(n!=null)return Dc(e,(n+s)%7,i,"day");for(l=0;l<7;l++)o[l]=Dc(e,(l+s)%7,i,"day");return o}function qF(t,e){return SE(t,e,"months")}function HF(t,e){return SE(t,e,"monthsShort")}function xF(t,e,n){return rg(t,e,n,"weekdays")}function VF(t,e,n){return rg(t,e,n,"weekdaysShort")}function WF(t,e,n){return rg(t,e,n,"weekdaysMin")}rs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=gt(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});De.lang=Ri("moment.lang is deprecated. Use moment.locale instead.",rs);De.langData=Ri("moment.langData is deprecated. Use moment.localeData instead.",xr);var yr=Math.abs;function YF(){var t=this._data;return this._milliseconds=yr(this._milliseconds),this._days=yr(this._days),this._months=yr(this._months),t.milliseconds=yr(t.milliseconds),t.seconds=yr(t.seconds),t.minutes=yr(t.minutes),t.hours=yr(t.hours),t.months=yr(t.months),t.years=yr(t.years),this}function EE(t,e,n,i){var r=Qi(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function GF(t,e){return EE(this,t,e,1)}function KF(t,e){return EE(this,t,e,-1)}function A0(t){return t<0?Math.floor(t):Math.ceil(t)}function ZF(){var t=this._milliseconds,e=this._days,n=this._months,i=this._data,r,s,l,o,a;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=A0(ap(n)+e)*864e5,e=0,n=0),i.milliseconds=t%1e3,r=wi(t/1e3),i.seconds=r%60,s=wi(r/60),i.minutes=s%60,l=wi(s/60),i.hours=l%24,e+=wi(l/24),a=wi(TE(e)),n+=a,e-=A0(ap(a)),o=wi(n/12),n%=12,i.days=e,i.months=n,i.years=o,this}function TE(t){return t*4800/146097}function ap(t){return t*146097/4800}function JF(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=$i(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+i/864e5,n=this._months+TE(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(ap(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+t)}}function Vr(t){return function(){return this.as(t)}}var AE=Vr("ms"),XF=Vr("s"),QF=Vr("m"),e9=Vr("h"),t9=Vr("d"),n9=Vr("w"),i9=Vr("M"),r9=Vr("Q"),s9=Vr("y"),l9=AE;function o9(){return Qi(this)}function a9(t){return t=$i(t),this.isValid()?this[t+"s"]():NaN}function el(t){return function(){return this.isValid()?this._data[t]:NaN}}var u9=el("milliseconds"),c9=el("seconds"),f9=el("minutes"),d9=el("hours"),h9=el("days"),p9=el("months"),m9=el("years");function g9(){return wi(this.days()/7)}var wr=Math.round,Ol={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function _9(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function b9(t,e,n,i){var r=Qi(t).abs(),s=wr(r.as("s")),l=wr(r.as("m")),o=wr(r.as("h")),a=wr(r.as("d")),u=wr(r.as("M")),c=wr(r.as("w")),f=wr(r.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||l<=1&&["m"]||l<n.m&&["mm",l]||o<=1&&["h"]||o<n.h&&["hh",o]||a<=1&&["d"]||a<n.d&&["dd",a];return n.w!=null&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),d=d||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],d[2]=e,d[3]=+t>0,d[4]=i,_9.apply(null,d)}function v9(t){return t===void 0?wr:typeof t=="function"?(wr=t,!0):!1}function y9(t,e){return Ol[t]===void 0?!1:e===void 0?Ol[t]:(Ol[t]=e,t==="s"&&(Ol.ss=e-1),!0)}function w9(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,i=Ol,r,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(i=Object.assign({},Ol,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),r=this.localeData(),s=b9(this,!n,i,r),n&&(s=r.pastFuture(+this,s)),r.postformat(s)}var Jd=Math.abs;function _l(t){return(t>0)-(t<0)||+t}function xf(){if(!this.isValid())return this.localeData().invalidDate();var t=Jd(this._milliseconds)/1e3,e=Jd(this._days),n=Jd(this._months),i,r,s,l,o=this.asSeconds(),a,u,c,f;return o?(i=wi(t/60),r=wi(i/60),t%=60,i%=60,s=wi(n/12),n%=12,l=t?t.toFixed(3).replace(/\.?0+$/,""):"",a=o<0?"-":"",u=_l(this._months)!==_l(o)?"-":"",c=_l(this._days)!==_l(o)?"-":"",f=_l(this._milliseconds)!==_l(o)?"-":"",a+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?c+e+"D":"")+(r||i||t?"T":"")+(r?f+r+"H":"")+(i?f+i+"M":"")+(t?f+l+"S":"")):"P0D"}var St=qf.prototype;St.isValid=p$;St.abs=YF;St.add=GF;St.subtract=KF;St.as=JF;St.asMilliseconds=AE;St.asSeconds=XF;St.asMinutes=QF;St.asHours=e9;St.asDays=t9;St.asWeeks=n9;St.asMonths=i9;St.asQuarters=r9;St.asYears=s9;St.valueOf=l9;St._bubble=ZF;St.clone=o9;St.get=a9;St.milliseconds=u9;St.seconds=c9;St.minutes=f9;St.hours=d9;St.days=h9;St.weeks=g9;St.months=p9;St.years=m9;St.humanize=w9;St.toISOString=xf;St.toString=xf;St.toJSON=xf;St.locale=hE;St.localeData=mE;St.toIsoString=Ri("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xf);St.lang=pE;it("X",0,0,"unix");it("x",0,0,"valueOf");Ve("x",zf);Ve("X",qM);Mt("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});Mt("x",function(t,e,n){n._d=new Date(gt(t))});//! moment.js
|
|
266
|
+
De.version="2.30.1";kM(Bt);De.fn=we;De.min=c$;De.max=f$;De.now=d$;De.utc=dr;De.unix=BF;De.months=qF;De.isDate=Xa;De.locale=rs;De.invalid=Mf;De.duration=Qi;De.isMoment=Ki;De.weekdays=xF;De.parseZone=UF;De.localeData=xr;De.isDuration=Gu;De.monthsShort=HF;De.weekdaysMin=WF;De.defineLocale=Zm;De.updateLocale=UR;De.locales=qR;De.weekdaysShort=VF;De.normalizeUnits=$i;De.relativeTimeRounding=v9;De.relativeTimeThreshold=y9;De.calendarFormat=F$;De.prototype=we;De.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const CE=(t,e,n)=>{const i=String(t);if(e==="upper")return i.toUpperCase();if(e==="lower")return i.toLowerCase();const r=e.match(/^date\('(.*?)'\)$/);if(r){const[,a]=r,{time_format:u=void 0,picker_utc:c=!1}=n??{},f=u===!1;return(c||f&&i?.match(/^\d{4}-[01]\d-[0-3]\d$/)||f&&i.match(/T00:00(?::00)?(?:\.000)?Z$/)?De.utc(i):De(i)).format(a)}const s=e.match(/^default\('?(.*?)'?\)$/);if(s){const[,a]=s;return t?i:a}const l=e.match(/^ternary\('?(.*?)'?,\s*'?(.*?)'?\)$/);if(l){const[,a,u]=l;return t?a:u}const o=e.match(/^truncate\((\d+)(?:,\s*'?(.*?)'?)?\)$/);if(o){const[,a,u=""]=o;return vc(i,Number(a),{ellipsis:u})}return i},NE=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:i="-"}={}}=le(wt)??{};let r=t;return n&&(r=r.normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?r=r.replaceAll(/[^\w-~]/g," "):r=r.replaceAll(/[^\p{L}\p{N}]/gu," "),r.toLocaleLowerCase().trim().replaceAll(/\s+/g,i)},Mc=(t,{collection:e,content:n,currentSlug:i="",isMediaFolder:r=!1,entryFilePath:s=""})=>{const{name:l,identifier_field:o="title",folder:a,slug_length:u=void 0}=e,c=Df(),f=m=>{if(["year","month","day","hour","minute","second"].includes(m))return c[m];if(m==="slug"&&i)return i;if(m==="uuid")return ki();if(m==="uuid_short")return ki("short");if(m==="uuid_shorter")return ki("shorter");if(r){if(!s)return"";if(m==="dirname")return(s.replace(a??"","").match(/(.+?)(?:\/[^/]+)?$/)??[])[1]??"";if(m==="filename")return s.split("/").pop().split(".").shift();if(m==="extension")return s.split("/").pop().split(".").pop()}let p;return m.startsWith("fields.")?p=n[m.replace(/^fields\./,"")]:m==="slug"?p=n[o]||n.title||n.name||n.label:p=n[m],p},d=m=>{const[p,...g]=m.split(/\s*\|\s*/);let v=f(p);if(v===void 0)return ki("short");if(g.length){const b=li({collectionName:l,valueMap:n,keyPath:p});g.forEach(w=>{v=CE(v,w,b)})}return v!==void 0&&(v=NE(String(v))),v?String(v):ki("short")};let h=t.replace(/{{(.+?)}}/g,(m,p)=>d(p)).trim();return typeof u=="number"&&(h=vc(h,u,{ellipsis:""}).replace(/-$/,"")),i?h:Nm(h,Za(l).map(m=>m.slug))};/*!
|
|
267
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
268
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
269
|
+
*
|
|
270
|
+
* Redistribution and use in source and binary forms, with or without
|
|
271
|
+
* modification, are permitted provided that the following conditions are met:
|
|
272
|
+
*
|
|
273
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
274
|
+
* list of conditions and the following disclaimer.
|
|
275
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
276
|
+
* this list of conditions and the following disclaimer in the
|
|
277
|
+
* documentation and/or other materials provided with the distribution.
|
|
278
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
279
|
+
* may be used to endorse or promote products derived from this software without
|
|
280
|
+
* specific prior written permission.
|
|
281
|
+
*
|
|
282
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
283
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
284
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
285
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
286
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
287
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
288
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
289
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
290
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
291
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
292
|
+
*/function k9(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function S9(t,e,n){let i=t.split(/\r\n|\n|\r/g),r="",s=(Math.log10(e+1)|0)+1;for(let l=e-1;l<=e+1;l++){let o=i[l-1];o&&(r+=l.toString().padEnd(s," "),r+=": ",r+=o,r+=`
|
|
293
|
+
`,l===e&&(r+=" ".repeat(s+n+2),r+=`^
|
|
294
|
+
`))}return r}class mt extends Error{line;column;codeblock;constructor(e,n){const[i,r]=k9(n.toml,n.ptr),s=S9(n.toml,i,r);super(`Invalid TOML document: ${e}
|
|
295
|
+
|
|
296
|
+
${s}`,n),this.line=i,this.column=r,this.codeblock=s}}/*!
|
|
297
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
298
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
299
|
+
*
|
|
300
|
+
* Redistribution and use in source and binary forms, with or without
|
|
301
|
+
* modification, are permitted provided that the following conditions are met:
|
|
302
|
+
*
|
|
303
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
304
|
+
* list of conditions and the following disclaimer.
|
|
305
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
306
|
+
* this list of conditions and the following disclaimer in the
|
|
307
|
+
* documentation and/or other materials provided with the distribution.
|
|
308
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
309
|
+
* may be used to endorse or promote products derived from this software without
|
|
310
|
+
* specific prior written permission.
|
|
311
|
+
*
|
|
312
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
313
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
314
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
315
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
316
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
317
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
318
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
319
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
320
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
321
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
322
|
+
*/let E9=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class Pl extends Date{#t=!1;#n=!1;#e=null;constructor(e){let n=!0,i=!0,r="Z";if(typeof e=="string"){let s=e.match(E9);s?(s[1]||(n=!1,e=`0000-01-01T${e}`),i=!!s[2],s[2]&&+s[2]>23?e="":(r=s[3]||null,e=e.toUpperCase(),r||(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#n=i,this.#e=r)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,n="Z"){let i=new Pl(e);return i.#e=n,i}static wrapAsLocalDateTime(e){let n=new Pl(e);return n.#e=null,n}static wrapAsLocalDate(e){let n=new Pl(e);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(e){let n=new Pl(e);return n.#t=!1,n.#e=null,n}}/*!
|
|
323
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
324
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
325
|
+
*
|
|
326
|
+
* Redistribution and use in source and binary forms, with or without
|
|
327
|
+
* modification, are permitted provided that the following conditions are met:
|
|
328
|
+
*
|
|
329
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
330
|
+
* list of conditions and the following disclaimer.
|
|
331
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
332
|
+
* this list of conditions and the following disclaimer in the
|
|
333
|
+
* documentation and/or other materials provided with the distribution.
|
|
334
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
335
|
+
* may be used to endorse or promote products derived from this software without
|
|
336
|
+
* specific prior written permission.
|
|
337
|
+
*
|
|
338
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
339
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
340
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
341
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
342
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
343
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
344
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
345
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
346
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
347
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
348
|
+
*/function Rc(t,e=0,n=t.length){let i=t.indexOf(`
|
|
349
|
+
`,e);return t[i-1]==="\r"&&i--,i<=n?i:-1}function sg(t,e){for(let n=e;n<t.length;n++){let i=t[n];if(i===`
|
|
350
|
+
`)return n;if(i==="\r"&&t[n+1]===`
|
|
351
|
+
`)return n+1;if(i<" "&&i!==" "||i==="")throw new mt("control characters are not allowed in comments",{toml:t,ptr:e})}return t.length}function Dr(t,e,n,i){let r;for(;(r=t[e])===" "||r===" "||!n&&(r===`
|
|
352
|
+
`||r==="\r"&&t[e+1]===`
|
|
353
|
+
`);)e++;return i||r!=="#"?e:Dr(t,sg(t,e),n)}function C0(t,e,n,i,r=!1){if(!i)return e=Rc(t,e),e<0?t.length:e;for(let s=e;s<t.length;s++){let l=t[s];if(l==="#")s=Rc(t,s);else{if(l===n)return s+1;if(l===i)return s;if(r&&(l===`
|
|
354
|
+
`||l==="\r"&&t[s+1]===`
|
|
355
|
+
`))return s}}throw new mt("cannot find end of structure",{toml:t,ptr:e})}function LE(t,e){let n=t[e],i=n===t[e+1]&&t[e+1]===t[e+2]?t.slice(e,e+3):n;e+=i.length-1;do e=t.indexOf(i,++e);while(e>-1&&n!=="'"&&t[e-1]==="\\"&&t[e-2]!=="\\");return e>-1&&(e+=i.length,i.length>1&&(t[e]===n&&e++,t[e]===n&&e++)),e}/*!
|
|
356
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
357
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
358
|
+
*
|
|
359
|
+
* Redistribution and use in source and binary forms, with or without
|
|
360
|
+
* modification, are permitted provided that the following conditions are met:
|
|
361
|
+
*
|
|
362
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
363
|
+
* list of conditions and the following disclaimer.
|
|
364
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
365
|
+
* this list of conditions and the following disclaimer in the
|
|
366
|
+
* documentation and/or other materials provided with the distribution.
|
|
367
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
368
|
+
* may be used to endorse or promote products derived from this software without
|
|
369
|
+
* specific prior written permission.
|
|
370
|
+
*
|
|
371
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
372
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
373
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
374
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
375
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
376
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
377
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
378
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
379
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
380
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
381
|
+
*/let T9=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,A9=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,C9=/^[+-]?0[0-9_]/,N9=/^[0-9a-f]{4,8}$/i,N0={b:"\b",t:" ",n:`
|
|
382
|
+
`,f:"\f",r:"\r",'"':'"',"\\":"\\"};function OE(t,e=0,n=t.length){let i=t[e]==="'",r=t[e++]===t[e]&&t[e]===t[e+1];r&&(n-=2,t[e+=2]==="\r"&&e++,t[e]===`
|
|
383
|
+
`&&e++);let s=0,l,o="",a=e;for(;e<n-1;){let u=t[e++];if(u===`
|
|
384
|
+
`||u==="\r"&&t[e]===`
|
|
385
|
+
`){if(!r)throw new mt("newlines are not allowed in strings",{toml:t,ptr:e-1})}else if(u<" "&&u!==" "||u==="")throw new mt("control characters are not allowed in strings",{toml:t,ptr:e-1});if(l){if(l=!1,u==="u"||u==="U"){let c=t.slice(e,e+=u==="u"?4:8);if(!N9.test(c))throw new mt("invalid unicode escape",{toml:t,ptr:s});try{o+=String.fromCodePoint(parseInt(c,16))}catch{throw new mt("invalid unicode escape",{toml:t,ptr:s})}}else if(r&&(u===`
|
|
386
|
+
`||u===" "||u===" "||u==="\r")){if(e=Dr(t,e-1,!0),t[e]!==`
|
|
387
|
+
`&&t[e]!=="\r")throw new mt("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:s});e=Dr(t,e)}else if(u in N0)o+=N0[u];else throw new mt("unrecognized escape sequence",{toml:t,ptr:s});a=e}else!i&&u==="\\"&&(s=e-1,l=!0,o+=t.slice(a,s))}return o+t.slice(a,n-1)}function L9(t,e,n){if(t==="true")return!0;if(t==="false")return!1;if(t==="-inf")return-1/0;if(t==="inf"||t==="+inf")return 1/0;if(t==="nan"||t==="+nan"||t==="-nan")return NaN;if(t==="-0")return 0;let i;if((i=T9.test(t))||A9.test(t)){if(C9.test(t))throw new mt("leading zeroes are not allowed",{toml:e,ptr:n});let s=+t.replace(/_/g,"");if(isNaN(s))throw new mt("invalid number",{toml:e,ptr:n});if(i&&!Number.isSafeInteger(s))throw new mt("integer value cannot be represented losslessly",{toml:e,ptr:n});return s}let r=new Pl(t);if(!r.isValid())throw new mt("invalid value",{toml:e,ptr:n});return r}/*!
|
|
388
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
389
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
390
|
+
*
|
|
391
|
+
* Redistribution and use in source and binary forms, with or without
|
|
392
|
+
* modification, are permitted provided that the following conditions are met:
|
|
393
|
+
*
|
|
394
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
395
|
+
* list of conditions and the following disclaimer.
|
|
396
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
397
|
+
* this list of conditions and the following disclaimer in the
|
|
398
|
+
* documentation and/or other materials provided with the distribution.
|
|
399
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
400
|
+
* may be used to endorse or promote products derived from this software without
|
|
401
|
+
* specific prior written permission.
|
|
402
|
+
*
|
|
403
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
404
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
405
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
406
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
407
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
408
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
409
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
410
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
411
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
412
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
413
|
+
*/function O9(t,e,n,i){let r=t.slice(e,n),s=r.indexOf("#");s>-1&&(sg(t,s),r=r.slice(0,s));let l=r.trimEnd();if(!i){let o=r.indexOf(`
|
|
414
|
+
`,l.length);if(o>-1)throw new mt("newlines are not allowed in inline tables",{toml:t,ptr:e+o})}return[l,s]}function lg(t,e,n){let i=t[e];if(i==="["||i==="{"){let[l,o]=i==="["?D9(t,e):I9(t,e),a=C0(t,o,",",n);if(n==="}"){let u=Rc(t,o,a);if(u>-1)throw new mt("newlines are not allowed in inline tables",{toml:t,ptr:u})}return[l,a]}let r;if(i==='"'||i==="'"){r=LE(t,e);let l=OE(t,e,r);if(n){if(r=Dr(t,r,n!=="]"),t[r]&&t[r]!==","&&t[r]!==n&&t[r]!==`
|
|
415
|
+
`&&t[r]!=="\r")throw new mt("unexpected character encountered",{toml:t,ptr:r});r+=+(t[r]===",")}return[l,r]}r=C0(t,e,",",n);let s=O9(t,e,r-+(t[r-1]===","),n==="]");if(!s[0])throw new mt("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&s[1]>-1&&(r=Dr(t,e+s[1]),r+=+(t[r]===",")),[L9(s[0],t,e),r]}/*!
|
|
416
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
417
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
418
|
+
*
|
|
419
|
+
* Redistribution and use in source and binary forms, with or without
|
|
420
|
+
* modification, are permitted provided that the following conditions are met:
|
|
421
|
+
*
|
|
422
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
423
|
+
* list of conditions and the following disclaimer.
|
|
424
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
425
|
+
* this list of conditions and the following disclaimer in the
|
|
426
|
+
* documentation and/or other materials provided with the distribution.
|
|
427
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
428
|
+
* may be used to endorse or promote products derived from this software without
|
|
429
|
+
* specific prior written permission.
|
|
430
|
+
*
|
|
431
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
432
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
433
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
434
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
435
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
436
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
437
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
438
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
439
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
440
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
441
|
+
*/let P9=/^[a-zA-Z0-9-_]+[ \t]*$/;function up(t,e,n="="){let i=e-1,r=[],s=t.indexOf(n,e);if(s<0)throw new mt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let l=t[e=++i];if(l!==" "&&l!==" ")if(l==='"'||l==="'"){if(l===t[e+1]&&l===t[e+2])throw new mt("multiline strings are not allowed in keys",{toml:t,ptr:e});let o=LE(t,e);if(o<0)throw new mt("unfinished string encountered",{toml:t,ptr:e});i=t.indexOf(".",o);let a=t.slice(o,i<0||i>s?s:i),u=Rc(a);if(u>-1)throw new mt("newlines are not allowed in keys",{toml:t,ptr:e+i+u});if(a.trimStart())throw new mt("found extra tokens after the string part",{toml:t,ptr:o});if(s<o&&(s=t.indexOf(n,o),s<0))throw new mt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});r.push(OE(t,e,o))}else{i=t.indexOf(".",e);let o=t.slice(e,i<0||i>s?s:i);if(!P9.test(o))throw new mt("only letter, numbers, dashes and underscores are allowed in keys",{toml:t,ptr:e});r.push(o.trimEnd())}}while(i+1&&i<s);return[r,Dr(t,s+1,!0,!0)]}function I9(t,e){let n={},i=new Set,r,s=0;for(e++;(r=t[e++])!=="}"&&r;){if(r===`
|
|
442
|
+
`)throw new mt("newlines are not allowed in inline tables",{toml:t,ptr:e-1});if(r==="#")throw new mt("inline tables cannot contain comments",{toml:t,ptr:e-1});if(r===",")throw new mt("expected key-value, found comma",{toml:t,ptr:e-1});if(r!==" "&&r!==" "){let l,o=n,a=!1,[u,c]=up(t,e-1);for(let h=0;h<u.length;h++){if(h&&(o=a?o[l]:o[l]={}),l=u[h],(a=Object.hasOwn(o,l))&&(typeof o[l]!="object"||i.has(o[l])))throw new mt("trying to redefine an already defined value",{toml:t,ptr:e});!a&&l==="__proto__"&&Object.defineProperty(o,l,{enumerable:!0,configurable:!0,writable:!0})}if(a)throw new mt("trying to redefine an already defined value",{toml:t,ptr:e});let[f,d]=lg(t,c,"}");i.add(f),o[l]=f,e=d,s=t[e-1]===","?e-1:0}}if(s)throw new mt("trailing commas are not allowed in inline tables",{toml:t,ptr:s});if(!r)throw new mt("unfinished table encountered",{toml:t,ptr:e});return[n,e]}function D9(t,e){let n=[],i;for(e++;(i=t[e++])!=="]"&&i;){if(i===",")throw new mt("expected value, found comma",{toml:t,ptr:e-1});if(i==="#")e=sg(t,e);else if(i!==" "&&i!==" "&&i!==`
|
|
443
|
+
`&&i!=="\r"){let r=lg(t,e-1,"]");n.push(r[0]),e=r[1]}}if(!i)throw new mt("unfinished array encountered",{toml:t,ptr:e});return[n,e]}/*!
|
|
444
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
445
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
446
|
+
*
|
|
447
|
+
* Redistribution and use in source and binary forms, with or without
|
|
448
|
+
* modification, are permitted provided that the following conditions are met:
|
|
449
|
+
*
|
|
450
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
451
|
+
* list of conditions and the following disclaimer.
|
|
452
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
453
|
+
* this list of conditions and the following disclaimer in the
|
|
454
|
+
* documentation and/or other materials provided with the distribution.
|
|
455
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
456
|
+
* may be used to endorse or promote products derived from this software without
|
|
457
|
+
* specific prior written permission.
|
|
458
|
+
*
|
|
459
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
460
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
461
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
462
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
463
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
464
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
465
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
466
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
467
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
468
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
469
|
+
*/function L0(t,e,n,i){let r=e,s=n,l,o=!1,a;for(let u=0;u<t.length;u++){if(u){if(r=o?r[l]:r[l]={},s=(a=s[l]).c,i===0&&(a.t===1||a.t===2))return null;if(a.t===2){let c=r.length-1;r=r[c],s=s[c].c}}if(l=t[u],(o=Object.hasOwn(r,l))&&s[l]?.t===0&&s[l]?.d)return null;o||(l==="__proto__"&&(Object.defineProperty(r,l,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,l,{enumerable:!0,configurable:!0,writable:!0})),s[l]={t:u<t.length-1&&i===2?3:i,d:!1,i:0,c:{}})}if(a=s[l],a.t!==i&&!(i===1&&a.t===3)||(i===2&&(a.d||(a.d=!0,r[l]=[]),r[l].push(r={}),a.c[a.i++]=a={t:1,d:!1,i:0,c:{}}),a.d))return null;if(a.d=!0,i===1)r=o?r[l]:r[l]={};else if(i===0&&o)return null;return[l,r,a.c]}function M9(t){let e={},n={},i=e,r=n;for(let s=Dr(t,0);s<t.length;){if(t[s]==="["){let l=t[++s]==="[",o=up(t,s+=+l,"]");if(l){if(t[o[1]-1]!=="]")throw new mt("expected end of table declaration",{toml:t,ptr:o[1]-1});o[1]++}let a=L0(o[0],e,n,l?2:1);if(!a)throw new mt("trying to redefine an already defined table or value",{toml:t,ptr:s});r=a[2],i=a[1],s=o[1]}else{let l=up(t,s),o=L0(l[0],i,r,0);if(!o)throw new mt("trying to redefine an already defined table or value",{toml:t,ptr:s});let a=lg(t,l[1]);o[1][o[0]]=a[0],s=a[1]}if(s=Dr(t,s,!0),t[s]&&t[s]!==`
|
|
470
|
+
`&&t[s]!=="\r")throw new mt("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:s});s=Dr(t,s)}return e}/*!
|
|
471
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
472
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
473
|
+
*
|
|
474
|
+
* Redistribution and use in source and binary forms, with or without
|
|
475
|
+
* modification, are permitted provided that the following conditions are met:
|
|
476
|
+
*
|
|
477
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
478
|
+
* list of conditions and the following disclaimer.
|
|
479
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
480
|
+
* this list of conditions and the following disclaimer in the
|
|
481
|
+
* documentation and/or other materials provided with the distribution.
|
|
482
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
483
|
+
* may be used to endorse or promote products derived from this software without
|
|
484
|
+
* specific prior written permission.
|
|
485
|
+
*
|
|
486
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
487
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
488
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
489
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
490
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
491
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
492
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
493
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
494
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
495
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
496
|
+
*/const PE=/^[a-z0-9-_]+$/i;function Vf(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(t instanceof Date)return"date"}return e}function R9(t){for(let e=0;e<t.length;e++)if(Vf(t[e])!=="object")return!1;return t.length!=0}function og(t){return JSON.stringify(t).replace(/\x7f/g,"\\u007f")}function ag(t,e=Vf(t)){if(e==="number")return isNaN(t)?"nan":t===1/0?"inf":t===-1/0?"-inf":t.toString();if(e==="bigint"||e==="boolean")return t.toString();if(e==="string")return og(t);if(e==="date"){if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString()}if(e==="object")return $9(t);if(e==="array")return F9(t)}function $9(t){let e=Object.keys(t);if(e.length===0)return"{}";let n="{ ";for(let i=0;i<e.length;i++){let r=e[i];i&&(n+=", "),n+=PE.test(r)?r:og(r),n+=" = ",n+=ag(t[r])}return n+" }"}function F9(t){if(t.length===0)return"[]";let e="[ ";for(let n=0;n<t.length;n++){if(n&&(e+=", "),t[n]===null||t[n]===void 0)throw new TypeError("arrays cannot contain null or undefined values");e+=ag(t[n])}return e+" ]"}function z9(t,e){let n="";for(let i=0;i<t.length;i++)n+=`[[${e}]]
|
|
497
|
+
`,n+=ug(t[i],e),n+=`
|
|
498
|
+
|
|
499
|
+
`;return n}function ug(t,e=""){let n="",i="",r=Object.keys(t);for(let s=0;s<r.length;s++){let l=r[s];if(t[l]!==null&&t[l]!==void 0){let o=Vf(t[l]);if(o==="symbol"||o==="function")throw new TypeError(`cannot serialize values of type '${o}'`);let a=PE.test(l)?l:og(l);if(o==="array"&&R9(t[l]))i+=z9(t[l],e?`${e}.${a}`:a);else if(o==="object"){let u=e?`${e}.${a}`:a;i+=`[${u}]
|
|
500
|
+
`,i+=ug(t[l],u),i+=`
|
|
501
|
+
|
|
502
|
+
`}else n+=a,n+=" = ",n+=ag(t[l],o),n+=`
|
|
503
|
+
`}}return`${n}
|
|
504
|
+
${i}`.trim()}function j9(t){if(Vf(t)!=="object")throw new TypeError("stringify can only be called with an object");return ug(t)}const cp={parse:M9,stringify:j9},cg=({file:t,format:e,extension:n})=>n||(t?(t.match(/[^.]+$/)??[])[0]??"md":e==="yml"||e==="yaml"?"yml":e==="toml"?"toml":e==="json"?"json":"md"),fp=t=>{const e=[],n=[];t.forEach(r=>{const{path:s}=r,l=s.split("/").pop(),o=l.split(".").pop(),a=le(Mm).findLast(({filePath:c,folderPath:f})=>f?s.startsWith(f):s===c),u=le(gi).findLast(({internalPath:c,entryRelative:f})=>f?s.startsWith(`${c}/`):s.match(/^(.+)\//)?.[1]===c);a&&(s===a.filePath||o===cg(a))&&e.push({...r,type:"entry",config:a}),u&&!l.startsWith("+")&&!e.find(c=>c.path===s)&&n.push({...r,type:"asset",config:u})});const i=[...e,...n];return{entryFiles:e,assetFiles:n,allFiles:i,count:i.length}},IE=(t,e)=>typeof e=="string"&&e.trim()?[e,e]:Array.isArray(e)&&e.length===2?e:t==="json-frontmatter"?["{","}"]:t==="toml-frontmatter"?["+++","+++"]:["---","---"],B9=({text:t="",path:e,config:{filePath:n,extension:i,format:r,frontmatterDelimiter:s}})=>{if(r||=i==="md"||e.endsWith(".md")?"yaml-frontmatter":i||(n?.match(/\.([^.]+)$/)??[])[1],!r)return null;try{if(r.match(/^ya?ml$/)&&e.match(/\.ya?ml$/))return eo.parse(t);if(r==="toml"&&e.match(/\.toml$/))return cp.parse(t);if(r==="json"&&e.match(/\.json$/))return JSON.parse(t)}catch(l){return console.error(l),null}if(r.match(/^(?:(?:yaml|toml|json)-)?frontmatter$/)&&e.match(/\.(?:md|markdown)$/)){const[l,o]=IE(r,s),[,a,u=""]=t.match(new RegExp(`^${dn(l)}\\n(.+?)\\n${dn(o)}(?:\\n(.+))?`,"ms"))??[];if(a&&(r==="frontmatter"||r==="yaml-frontmatter"))try{return{...eo.parse(a),body:u}}catch(c){console.error(c)}if(a&&(r==="frontmatter"||r==="toml-frontmatter"))try{return{...cp.parse(a),body:u}}catch(c){console.error(c)}if(a&&(r==="frontmatter"||r==="json-frontmatter"))try{return{...JSON.parse(a),body:u}}catch(c){console.error(c)}}return null},O0=({content:t,path:e,config:{extension:n,format:i,frontmatterDelimiter:r,yamlQuote:s=!1}})=>{t=JSON.parse(JSON.stringify(t)),i||=n==="md"||e.endsWith(".md")?"yaml-frontmatter":n||(e.match(/\.([^.]+)$/)??[])[1];const l=()=>eo.stringify(t,null,{lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s?"QUOTE_DOUBLE":"PLAIN"}).trim(),o=()=>cp.stringify(t).trim(),a=()=>JSON.stringify(t,null,2).trim();try{if(i.match(/^ya?ml$/))return`${l()}
|
|
505
|
+
`;if(i==="toml")return`${o()}
|
|
506
|
+
`;if(i==="json")return`${a()}
|
|
507
|
+
`}catch(u){return console.error(u),""}if(i.match(/^(?:(?:yaml|toml|json)-)?frontmatter$/)){const[u,c]=IE(i,r),f=t.body?`${t.body}
|
|
508
|
+
`:"";delete t.body;try{if(i==="frontmatter"||i==="yaml-frontmatter")return`${u}
|
|
509
|
+
${l()}
|
|
510
|
+
${c}
|
|
511
|
+
${f}`;if(i==="toml-frontmatter")return`${u}
|
|
512
|
+
${o()}
|
|
513
|
+
${c}
|
|
514
|
+
${f}`;if(i==="json-frontmatter")return`${u}
|
|
515
|
+
${a()}
|
|
516
|
+
${c}
|
|
517
|
+
${f}`}catch(d){console.error(d)}}return""},Xd=(t,e,n)=>{const i=Mi(t);if(!i)return"";const{path:r,identifier_field:s="title"}=i;if(!r)return e;if(r.includes("{{slug}}")){const[,l]=e.match(new RegExp(`^${dn(r).replace("\\{\\{slug\\}\\}","(.+)")}$`))??[];if(l)return l}return NE(n[s]||n.title||n.name||n.label||"")},DE=t=>{const e=[];return t.forEach(n=>{const i=B9(n);if(!i||!Ei(i))return;const{path:r,sha:s,meta:l={},config:{folderPath:o="",collectionName:a,fileName:u}}=n,c=Mi(a);if(!c)return;const f=u?c._fileMap?.[u]:void 0,{i18nEnabled:d,locales:h,defaultLocale:m,structure:p}=(f??c)._i18n,g=cg({format:c.format,extension:c.extension,file:u}),[,v]=u?[]:r.match(new RegExp(`^${dn(Ln(o))}\\/(.+)\\.${g}$`))??[];if(!u&&!v)return;const b={sha:s,collectionName:a,fileName:u,locales:{},...l};if(d||(b.slug=u||Xd(a,v,i),b.locales._default={content:i,path:r,sha:s}),d&&(p==="single_file"||u)){const w=i[m]??Object.values(i)[0];b.slug=u||Xd(a,v,w),b.locales=Object.fromEntries(h.filter(k=>k in i).map(k=>[k,{content:i[k],path:r,sha:s}]))}if(d&&(p==="multiple_folders"||p==="multiple_files")){let w,k;if(p==="multiple_folders"?[,k,w]=v.match(`^(${h.join("|")})\\/(.+)$`)??[]:[,w,k]=v.match(`^(.+)\\.(${h.join("|")})$`)??[],!w||!k)return;const S=u||Xd(a,w,i),E=e.findIndex(P=>P.id===`${a}/${S}`);if(E>-1){e[E].locales[k]={content:i,path:r,sha:s};return}b.slug=S,b.locales[k]={content:i,path:r,sha:s}}!b.slug||!Object.keys(b.locales).length||(b.id=`${a}/${b.slug}`,e.push(b))}),e},ME=t=>t.map(e=>{const{file:n,path:i,name:r=i.split("/").pop(),sha:s,size:l,text:o=void 0,meta:a={},config:{collectionName:u,internalPath:c}}=e;return{file:n,blobURL:void 0,path:i,name:r,sha:s,size:l,kind:Lm(r),text:o,collectionName:u,folder:c,...a}}),fg={service:"",owner:"",repo:"",branch:""},RE=async({repository:t,fetchDefaultBranchName:e,fetchLastCommitHash:n,fetchFileList:i,fetchFileContents:r})=>{const{service:s,owner:l,repo:o,branch:a}=t,u=new Sc(`${s}:${l}/${o}`,"meta"),c=new Sc(`${s}:${l}/${o}`,"file-cache"),f=await u.get("last_commit_hash"),d=await c.entries();let h=a,m;h||(h=await e(),t.branch=h);const p=await n();if(f&&f===p&&d.length?m=fp(d.map(([M,I])=>({path:M,...I}))):(m=fp(await i()),u.set("last_commit_hash",p)),!m.count){Pi.set([]),wn.set([]),ba.set(!0);return}const{entryFiles:g,assetFiles:v,allFiles:b}=m,w=Object.fromEntries(d);b.forEach(({sha:M,path:I},D)=>{w[I]?.sha===M&&Object.assign(b[D],w[I])});const k=b.filter(({meta:M})=>!M),S=k.length?await r(k):{};Pi.set(DE(g.map(M=>({...M,text:M.text??S[M.path].text,meta:M.meta??S[M.path].meta})))),wn.set(ME(v.map(M=>({...M,name:M.path.split("/").pop(),meta:M.meta??S[M.path].meta})))),ba.set(!0);const E=b.map(({path:M})=>M),P=Object.keys(w).filter(M=>!E.includes(M));k.length&&await c.saveEntries(Object.entries(S)),P.length&&c.deleteEntries(P)},Wf=async(t,e={},{responseType:n="json"}={})=>{let i;e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Ei(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{i=await fetch(t,e)}catch(l){throw new Error("Failed to send the request",{cause:l})}const{ok:r,status:s}=i;if(!r){let l,o="";try{l=await i.json()}catch{}throw Ei(l)&&(typeof l.error=="string"&&(o=l.error),typeof l.message=="string"&&(o=l.message),Array.isArray(l.errors)&&(typeof l.errors[0]=="string"&&(o=l.errors.join(", ")),Ei(l.errors[0])&&typeof l.errors[0].message=="string"&&(o=l.errors.map(a=>a.message).join(", ")))),new Error("Server responded with an error",{cause:{status:s,message:o}})}if(n==="raw")return i;try{return n==="blob"?i.blob():n==="text"?i.text():i.json()}catch(l){throw new Error("Failed to parse the response",{cause:l})}},$c="github",U9="GitHub",Zi={...fg},q9="https://www.githubstatus.com/",H9="https://www.githubstatus.com/api/v2/status.json",x9=async()=>{try{const{status:{indicator:t}}=await Wf(H9);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},nu=async(t,e={},{token:n=le(Yi).token,responseType:i="json"}={})=>{let{api_root:r}=le(wt).backend;return r?(r=`${new URL(r).origin}/api`,t!=="/graphql"&&(r=`${r}/v3`)):r="https://api.github.com",e.headers=new Headers(e.headers),e.headers.set("Authorization",`token ${n}`),Wf(`${r}${t}`,e,{responseType:i})},Yf=async(t,e={})=>{const{data:n}=await nu("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},V9=()=>{const{repo:t,branch:e,api_root:n}=le(wt).backend,[i,r]=t.split("/");if(!Zi.owner){const l=`${n?new URL(n).origin:"https://github.com"}/${i}/${r}`,o=e?`${l}/tree/${e}`:l;Object.assign(Zi,{service:$c,owner:i,repo:r,branch:e,baseURL:l,branchURL:o})}},W9=async({token:t,auto:e=!1})=>{if(e&&!t)return;const{hostname:n}=window.location,{site_domain:i=n,base_url:r="https://api.netlify.com",auth_endpoint:s="auth"}=le(wt).backend,l=t||await IS({backendName:$c,siteDomain:i,authURL:`${Ln(r)}/${Ln(s)}`,scope:"repo,user"}),{name:o,login:a,email:u,avatar_url:c,html_url:f}=await nu("/user",{},{token:l});return{backendName:$c,token:l,name:o,login:a,email:u,avatarURL:c,profileURL:f}},Y9=async()=>{},G9=async()=>{const{owner:t,repo:e}=Zi,n=await Yf(`
|
|
518
|
+
query {
|
|
519
|
+
repository(owner: "${t}", name: "${e}") {
|
|
520
|
+
defaultBranchRef {
|
|
521
|
+
name
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
`);if(!n.repository)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(le(ue)("repository_not_found",{values:{repo:e}}))});if(!n.repository.defaultBranchRef)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(le(ue)("repository_empty",{values:{repo:e}}))});return n.repository.defaultBranchRef.name},$E=async()=>{const{owner:t,repo:e,branch:n}=Zi,i=await Yf(`
|
|
526
|
+
query {
|
|
527
|
+
repository(owner: "${t}", name: "${e}") {
|
|
528
|
+
ref(qualifiedName: "${n}") {
|
|
529
|
+
target {
|
|
530
|
+
oid
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
`);if(!i.repository.ref)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(le(ue)("branch_not_found",{values:{repo:e,branch:n}}))});return i.repository.ref.target.oid},K9=async()=>{const{owner:t,repo:e,branch:n}=Zi;return(await nu(`/repos/${t}/${e}/git/trees/${n}?recursive=1`)).tree.filter(({type:r})=>r==="blob").map(({path:r,sha:s,size:l})=>({path:r,sha:s,size:l}))},Z9=async t=>{const{owner:e,repo:n,branch:i,baseURL:r}=Zi,s=t.map(({type:o,path:a,sha:u},c)=>{const f=[];return o==="entry"&&f.push(`
|
|
536
|
+
content_${c}: object(oid: "${u}") {
|
|
537
|
+
... on Blob { text }
|
|
538
|
+
}
|
|
539
|
+
`),f.push(`
|
|
540
|
+
commit_${c}: ref(qualifiedName: "${i}") {
|
|
541
|
+
target {
|
|
542
|
+
... on Commit {
|
|
543
|
+
history(first: 1, path: "${a}") {
|
|
544
|
+
nodes {
|
|
545
|
+
author {
|
|
546
|
+
name
|
|
547
|
+
email
|
|
548
|
+
user {
|
|
549
|
+
id: databaseId
|
|
550
|
+
login
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
committedDate
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
`),f.join("")}).join(""),l=await Yf(`
|
|
560
|
+
query {
|
|
561
|
+
repository(owner: "${e}", name: "${n}") {
|
|
562
|
+
${s}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
`);return Object.fromEntries(t.map(({path:o,sha:a,size:u},c)=>{const{author:{name:f,email:d,user:h},committedDate:m}=l.repository[`commit_${c}`].target.history.nodes[0],p={sha:a,size:u,text:l.repository[`content_${c}`]?.text,meta:{repoFileURL:`${r}/blob/${i}/${o}`,commitAuthor:{name:f,email:d,id:h?.id,login:h?.login},commitDate:new Date(m)}};return[o,p]}))},J9=async()=>{await RE({repository:Zi,fetchDefaultBranchName:G9,fetchLastCommitHash:$E,fetchFileList:K9,fetchFileContents:Z9})},X9=async t=>{const{owner:e,repo:n}=Zi,{sha:i,path:r}=t,s=await nu(`/repos/${e}/${n}/git/blobs/${i}`,{headers:{Accept:"application/vnd.github.raw"}},{responseType:"raw"});return s.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await s.text()],{type:qs.getType(r)??"text/plain"}):s.blob()},Q9=async(t,e)=>{const{owner:n,repo:i,branch:r}=Zi,s=await Promise.all(t.filter(({action:a})=>["create","update"].includes(a)).map(async({path:a,data:u,base64:c})=>({path:a,contents:c??await CS(u??"")}))),l=t.filter(({action:a})=>a==="delete").map(({path:a})=>({path:a}));return(await Yf(`
|
|
566
|
+
mutation ($input: CreateCommitOnBranchInput!) {
|
|
567
|
+
createCommitOnBranch(input: $input) {
|
|
568
|
+
commit {
|
|
569
|
+
url
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
`,{input:{branch:{repositoryNameWithOwner:`${n}/${i}`,branchName:r},expectedHeadOid:await $E(),fileChanges:{additions:s,deletions:l},message:{headline:R3(t,e)}}})).createCommitOnBranch.commit.url},ez=async()=>{const{owner:t,repo:e}=Zi;return nu(`/repos/${t}/${e}/dispatches`,{method:"POST",body:{event_type:"sveltia-cms-publish"}},{responseType:"raw"})},tz={name:$c,label:U9,repository:Zi,statusDashboardURL:q9,checkStatus:x9,init:V9,signIn:W9,signOut:Y9,fetchFiles:J9,fetchBlob:X9,commitChanges:Q9,triggerDeployment:ez},Il="gitlab",nz="GitLab",fr={...fg},iz="https://status.gitlab.com/",rz="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",sz=async()=>{try{const{result:{status_overall:{status_code:t}}}=await Wf(rz);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},Gf=async(t,e={},{token:n=le(Yi)?.token,responseType:i="json"}={})=>{let{api_root:r}=le(wt).backend;return r?r=`${new URL(r).origin}/api`:r="https://gitlab.com/api",t!=="/graphql"&&(r=`${r}/v4`),e.headers=new Headers(e.headers),e.headers.set("Authorization",`Bearer ${n}`),Wf(`${r}${t}`,e,{responseType:i})},Kf=async(t,e={})=>{const{data:n}=await Gf("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},lz=()=>{const{repo:t,branch:e,api_root:n}=le(wt).backend,[i,r]=t.split("/");if(!fr.owner){const l=`${n?new URL(n).origin:"https://gitlab.com"}/${i}/${r}`,o=e?`${l}/-/tree/${e}`:l;Object.assign(fr,{service:Il,owner:i,repo:r,branch:e,baseURL:l,branchURL:o})}},oz=async({token:t,auto:e=!1})=>{const{origin:n,hostname:i}=window.location,{site_domain:r=i,base_url:s="https://gitlab.com",auth_endpoint:l="oauth/authorize",auth_type:o,app_id:a=""}=le(wt).backend,u=`${Ln(s)}/${Ln(l)}`,c="api";let f="";if(t)f=t;else if(o==="pkce"){if(window.opener?.origin===n&&window.name==="auth"){await ZD({backendName:Il,clientId:a,authURL:u.replace("/authorize","/token")});return}if(e)return;f=await GD({backendName:Il,clientId:a,authURL:u,scope:c})}else{if(e)return;f=await IS({backendName:Il,siteDomain:r,authURL:u,scope:c})}const{name:d,username:h,email:m,avatar_url:p,web_url:g}=await Gf("/user",{},{token:f});return{backendName:Il,token:f,name:d,login:h,email:m,avatarURL:p,profileURL:g}},az=async()=>{},uz=async()=>{const{owner:t,repo:e}=fr,n=await Kf(`
|
|
574
|
+
query {
|
|
575
|
+
project(fullPath: "${t}/${e}") {
|
|
576
|
+
repository {
|
|
577
|
+
rootRef
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
`);if(!n.project)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(le(ue)("repository_not_found",{values:{repo:e}}))});const{rootRef:i}=n.project.repository;if(!i)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(le(ue)("repository_empty",{values:{repo:e}}))});return i},cz=async()=>{const{owner:t,repo:e,branch:n}=fr,i=await Kf(`
|
|
582
|
+
query {
|
|
583
|
+
project(fullPath: "${t}/${e}") {
|
|
584
|
+
repository {
|
|
585
|
+
tree(ref: "${n}") {
|
|
586
|
+
lastCommit {
|
|
587
|
+
sha
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
`),{lastCommit:r}=i.project.repository.tree;if(!r)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(le(ue)("branch_not_found",{values:{repo:e,branch:n}}))});return r.sha},fz=async()=>{const{owner:t,repo:e,branch:n}=fr;return(await Kf(`
|
|
594
|
+
query {
|
|
595
|
+
project(fullPath: "${t}/${e}") {
|
|
596
|
+
repository {
|
|
597
|
+
tree(ref: "${n}", recursive: true) {
|
|
598
|
+
blobs {
|
|
599
|
+
nodes {
|
|
600
|
+
type
|
|
601
|
+
path
|
|
602
|
+
sha
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
`)).project.repository.tree.blobs.nodes.filter(({type:r})=>r==="blob").map(({path:r,sha:s})=>({path:r,sha:s,size:0}))},dz=async t=>{const{owner:e,repo:n,branch:i,baseURL:r}=fr,s=await Kf(`
|
|
610
|
+
query ($paths: [String!]!) {
|
|
611
|
+
project(fullPath: "${e}/${n}") {
|
|
612
|
+
repository {
|
|
613
|
+
blobs(ref: "${i}", paths: $paths) {
|
|
614
|
+
nodes {
|
|
615
|
+
size
|
|
616
|
+
rawTextBlob
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
`,{paths:t.map(({path:l})=>l)});return Object.fromEntries(t.map(({path:l,sha:o},a)=>{const{size:u,rawTextBlob:c}=s.project.repository.blobs.nodes[a],f={sha:o,size:u,text:c,meta:{repoFileURL:`${r}/-/blob/${i}/${l}`}};return[l,f]}))},hz=async()=>{await RE({repository:fr,fetchDefaultBranchName:uz,fetchLastCommitHash:cz,fetchFileList:fz,fetchFileContents:dz})},pz=async t=>{const{owner:e,repo:n,branch:i}=fr,{path:r}=t;return Gf(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(r)}/raw?ref=${i}`,{},{responseType:"blob"})},mz=async(t,e)=>{const{owner:n,repo:i,branch:r}=fr;return(await Gf(`/projects/${encodeURIComponent(`${n}/${i}`)}/repository/commits`,{method:"POST",body:{branch:r,commit_message:R3(t,e),actions:await Promise.all(t.map(async({action:l,path:o,data:a="",base64:u})=>({action:l,content:u??(typeof a!="string"?await CS(a):a),encoding:u||typeof a!="string"?"base64":"text",file_path:o})))}})).web_url},gz={name:Il,label:nz,repository:fr,statusDashboardURL:iz,checkStatus:sz,init:lz,signIn:oz,signOut:az,fetchFiles:hz,fetchBlob:pz,commitChanges:mz},FE="local",_z="Local Repository",dp={...fg},dg=Xe(null),hp="root_dir_handle";let Fc;const bz=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Fc.get(hp)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(i){n=null,console.error(i)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Fc.set(hp,n))),n},vz=async()=>{await Fc.delete(hp)},yz=()=>{const{name:t,repo:e,branch:n}=le(wt).backend,[i,r]=e.split("/");dp.owner||Object.assign(dp,{service:t,owner:i,repo:r,branch:n}),Fc=new Sc(`${t}:${e}`,"file-system-handles")},wz=async({auto:t=!1})=>{const e=await bz({showPicker:!t});if(e)dg.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:FE}},kz=async()=>{vz()},P0=async t=>{const e=Ln(t).split("/"),n=!0;let i=le(dg);for(const r of e)i=await(r.includes(".")?i.getFileHandle(r,{create:n}):i.getDirectoryHandle(r,{create:n}));return i},Sz=async()=>{const t=le(dg),e=[],n=[...le(Mm).map(({filePath:l,folderPath:o})=>l||o),...le(gi).map(({internalPath:l})=>l)].map(l=>Ln(l??"")),i=l=>new RegExp(`^${dn(l)}\\b`),r=n.map(i),s=async l=>{for await(const[o,a]of l.entries()){if(o.startsWith("."))continue;const u=(await t?.resolve(a))?.join("/")??"",c=r.some(f=>u.match(f));if(a.kind==="file"){if(!c)continue;try{e.push({file:await a.getFile(),path:u})}catch(f){console.error(f)}}if(a.kind==="directory"){const f=i(u);if(!c&&!n.some(d=>d.match(f)))continue;await s(a)}}};return await s(t),Promise.all(e.map(async({file:l,path:o})=>{const{name:a,size:u}=l,[c,f]=await Promise.all([la(l),a.match(/\.(?:json|markdown|md|toml|ya?ml)$/i)?xD(l):void 0]);return{file:l,path:o,name:a,sha:c,size:u,text:f}}))},Ez=async()=>{const{entryFiles:t,assetFiles:e}=fp(await Sz());Pi.set(DE(t)),wn.set(ME(e)),ba.set(!0)},Tz=async t=>{await Promise.all(t.map(async({action:e,path:n,data:i})=>{try{if(["create","update"].includes(e)&&i){const s=await(await P0(n)).createWritable();await s.write(i),await s.close()}if(e==="delete"){const[,r,s]=Ln(n).match(/(.+)\/([^/]+)$/)??[];await(await P0(r)).removeEntry(s)}}catch(r){console.error(r)}}))},Az={name:FE,label:_z,repository:dp,init:yz,signIn:wz,signOut:kz,fetchFiles:Ez,commitChanges:Tz},zE={github:tz,gitlab:gz,local:Az},Wr=Xe(),ti=An([Wr],([t],e,n)=>{n(i=>{const r=t?zE[t]:void 0;return r&&r!==i&&r?.init(),r})});function Cz(t){ye(t,"svelte-8a6wia",".buttons.svelte-8a6wia{display:flex;flex-direction:column;align-items:center;gap:16px}.buttons.svelte-8a6wia button{width:240px}")}function Nz(t){let e,n=t[2]("config.error.unsupported_backend",{values:{name:t[1]}})+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&6&&n!==(n=r[2]("config.error.unsupported_backend",{values:{name:r[1]}})+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function Lz(t){let e,n;return e=new et({props:{variant:"primary",label:t[2]("sign_in_with_x",{values:{service:t[4]?.label}})}}),e.$on("click",t[8]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&20&&(s.label=i[2]("sign_in_with_x",{values:{service:i[4]?.label}})),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Oz(t){let e,n,i,r;const s=[Iz,Pz],l=[];function o(a,u){return"showDirectoryPicker"in window?1:0}return e=o(),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){n.p(a,u)},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function Pz(t){let e,n,i,r;e=new et({props:{variant:"primary",label:t[2]("work_with_local_repo")}}),e.$on("click",t[7]);let s=!t[3].message&&I0(t);return{c(){O(e.$$.fragment),n=j(),s&&s.c(),i=Q()},m(l,o){N(e,l,o),A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){const a={};o&4&&(a.label=l[2]("work_with_local_repo")),e.$set(a),l[3].message?s&&(s.d(1),s=null):s?s.p(l,o):(s=I0(l),s.c(),s.m(i.parentNode,i))},i(l){r||(_(e.$$.fragment,l),r=!0)},o(l){y(e.$$.fragment,l),r=!1},d(l){l&&(T(n),T(i)),L(e,l),s&&s.d(l)}}}function Iz(t){let e,n=t[2]("unsupported.browser")+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&4&&n!==(n=r[2]("unsupported.browser")+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function I0(t){let e;function n(s,l){return s[0]?Mz:Dz}let i=n(t),r=i(t);return{c(){e=F("div"),r.c(),C(e,"role","none")},m(s,l){A(s,e,l),r.m(e,null)},p(s,l){i===(i=n(s))&&r?r.p(s,l):(r.d(1),r=i(s),r&&(r.c(),r.m(e,null)))},d(s){s&&T(e),r.d()}}}function Dz(t){let e=t[2]("work_with_local_repo_description_no_repo")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&4&&e!==(e=i[2]("work_with_local_repo_description_no_repo")+"")&&X(n,e)},d(i){i&&T(n)}}}function Mz(t){let e=t[2]("work_with_local_repo_description",{values:{repo:t[0]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&5&&e!==(e=i[2]("work_with_local_repo_description",{values:{repo:i[0]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function D0(t){let e,n=t[3].message+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&8&&n!==(n=r[3].message+"")&&X(i,n)},d(r){r&&T(e)}}}function Rz(t){let e,n,i,r,s;const l=[Oz,Lz,Nz],o=[];function a(c,f){return c[1]==="local"?0:c[4]||c[5]?1:2}n=a(t),i=o[n]=l[n](t);let u=t[3].message&&t[3].canRetry&&D0(t);return{c(){e=F("div"),i.c(),r=j(),u&&u.c(),C(e,"role","none"),C(e,"class","buttons svelte-8a6wia")},m(c,f){A(c,e,f),o[n].m(e,null),$(e,r),u&&u.m(e,null),s=!0},p(c,[f]){let d=n;n=a(c),n===d?o[n].p(c,f):(x(),y(o[d],1,1,()=>{o[d]=null}),V(),i=o[n],i?i.p(c,f):(i=o[n]=l[n](c),i.c()),_(i,1),i.m(e,r)),c[3].message&&c[3].canRetry?u?u.p(c,f):(u=D0(c),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(c){s||(_(i),s=!0)},o(c){y(i),s=!1},d(c){c&&T(e),o[n].d(),u&&u.d()}}}function $z(t,e,n){let i,r,s,l,o,a,u;B(t,wt,d=>n(6,r=d)),B(t,Wr,d=>n(1,s=d)),B(t,ue,d=>n(2,l=d)),B(t,Ja,d=>n(3,o=d)),B(t,ti,d=>n(4,a=d)),B(t,Jo,d=>n(5,u=d)),Ut(()=>{yM()});const c=async()=>{await y0()},f=async()=>{await y0()};return t.$$.update=()=>{t.$$.dirty&64&&n(0,i=r?.backend?.repo?.split("/")?.[1])},[i,s,l,o,a,u,r,c,f]}class Fz extends ie{constructor(e){super(),ne(this,e,$z,Rz,te,{},Cz)}}const Qo=Xe({count:1,saved:!1,deleted:!1,published:!1}),jE=async(t,e=[])=>{const n=le(Pi),i=t.map(r=>{const{locales:s,slug:l}=n.find(o=>o.id===r)??{};if(s)return Object.values(s).map(({path:o})=>({action:"delete",slug:l,path:o}))}).flat(1).filter((r,s,l)=>r&&l.findIndex(o=>o?.path===r.path)===s);e.length&&i.push(...e.map(r=>({action:"delete",path:r}))),await le(ti)?.commitChanges(i,{commitType:"delete",collection:le(Yt)}),Pi.set(n.filter(r=>!t.includes(r.id))),Qo.set({deleted:!0,count:t.length})},zz="deepl",jz="DeepL",Bz="https://www.deepl.com/pro-api",Uz="https://www.deepl.com/account/summary",qz=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,Hz=["AR","BG","CS","DA","DE","EL","EN","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","RO","RU","SK","SL","SV","TR","UK","ZH"],xz=["AR","BG","CS","DA","DE","EL","EN","EN-GB","EN-US","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","PT-BR","PT-PT","RO","RU","SK","SL","SV","TR","UK","ZH"],Vz=async(t,{sourceLocale:e="",targetLocale:n,apiKey:i})=>{const r=new URLSearchParams([...t.map(a=>["text",a]),["source_lang",e.toUpperCase()],["target_lang",n.toUpperCase()],["tag_handling","html"],["split_sentences","1"],["auth_key",i]]),l=`https://${i.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${r.toString()}`,{translations:o}=await fetch(l).then(a=>a.json());return o.map(a=>a.text)},BE={serviceId:zz,serviceLabel:jz,developerURL:Bz,apiKeyURL:Uz,apiKeyPattern:qz,sourceLanguages:Hz,targetLanguages:xz,translate:Vz},M0={deepl:BE},zc=Xe(BE),ql=Xe(!1),ea=Xe(),pp="sveltia-cms.entry-view",Fs=Xe(null),es=Xe(null),iu=Xe({}),lr=Xe({},t=>{(async()=>{try{const e={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await Zt.get(pp)??{}};t(e),iu.set(e.selectAssetsView)}catch{}})()}),at=Xe(),Wz=({fieldConfig:t,keyPath:e,newContent:n,value:i})=>{const{widget:r="string"}=t,s=()=>{n[e]=[],i.split(/,\s*/).forEach((l,o)=>{n[`${e}.${o}`]=l})};if(r==="boolean"){n[e]=i==="true";return}if(r==="list"){const{field:l,fields:o,types:a}=t;if(!(!!l||!!o||!!a)){s();return}}if(r==="markdown"){n[e]=XP(i);return}if(r==="number"){const{value_type:l="int"}=t;n[e]=l==="int"?Number.parseInt(i,10):l==="float"?Number.parseFloat(i):i;return}if(r==="relation"||r==="select"){const{multiple:l=!1}=t;if(l){s();return}}n[e]=i},Zf=(t,e={})=>{const n={},i=({fieldConfig:r,keyPath:s})=>{if(s in e){Wz({fieldConfig:r,keyPath:s,newContent:n,value:e[s]});return}const{widget:l="string",default:o,required:a=!0}=r,u=Array.isArray(o)&&!!o.length;if(l==="list"){const{fields:c}=r;if(!u){n[s]=[];return}if(c){o.forEach((f,d)=>{Object.entries(f).forEach(([h,m])=>{n[[s,d,h].join(".")]=m})});return}o.forEach((f,d)=>{n[[s,d].join(".")]=f});return}if(l==="object"){const{fields:c,types:f}=r;!a||Array.isArray(f)?n[s]=null:c?.forEach(d=>{i({keyPath:[s,d.name].join("."),fieldConfig:d})});return}if(l==="boolean"){n[s]=typeof o=="boolean"?o:!1;return}if(l==="relation"||l==="select"){const{multiple:c=!1}=r;if(c){u?o.forEach((f,d)=>{n[[s,d].join(".")]=f}):n[s]=[];return}}if(l==="datetime"){if(typeof o=="string")n[s]=o;else{const{date_format:c,time_format:f,picker_utc:d=!1}=r,{year:h,month:m,day:p,hour:g,minute:v}=Df({timeZone:d?"UTC":void 0}),b=`${h}-${m}-${p}`,w=`${g}:${v}`;f===!1?n[s]=b:c===!1?n[s]=w:n[s]=`${b}T${w}:00.000Z`}return}if(l==="uuid"){const{prefix:c,use_b32_encoding:f}=r,d=f?_h():ki();n[s]=c?`${c}${d}`:d;return}n[s]=o!==void 0?o:""};return t.forEach(r=>{i({keyPath:r.name,fieldConfig:r})}),n},io=({draft:{collectionName:t,fileName:e},prop:n="currentValues",locale:i,target:r={},getValueMap:s=void 0})=>{const l=Mi(t);if(!l)return;const o=e?l._fileMap?.[e]:void 0,{defaultLocale:a}=(o??l)._i18n;return new Proxy(r,{set:(u,c,f)=>{const d=typeof s=="function"?s():u,h=li({collectionName:t,fileName:e,valueMap:d,keyPath:c});return h?(h.i18n==="duplicate"&&i===a&&Object.entries(le(at)[n]).forEach(([m,p])=>{if(c.includes(".")){const[,g]=c.match(/(.+)\.[^.]+$/)??[];if(!Object.keys(p).some(v=>v.startsWith(`${g}.`)))return}m!==i&&p[c]!==f&&(p[c]=f)}),Reflect.set(u,c,f)):!0}})},Pu=(t,e)=>{const{id:n,collectionName:i,fileName:r,locales:s}=t,l=n===void 0,o=Mi(i);if(!o)return;const a=r?o._fileMap?.[r]:void 0,{fields:u=[],_i18n:c}=a??o,{i18nEnabled:f,locales:d}=c,h=Zf(u,e),m=l?d:d.filter(v=>!!s?.[v]?.content),p=Object.fromEntries(d.map(v=>[v,l||m.includes(v)])),g=Object.fromEntries(m.map(v=>[v,l?h:zr(s?.[v].content)]));at.set({isNew:l&&!r,collectionName:i,collection:o,fileName:r,collectionFile:a,originalEntry:l?void 0:t,originalLocales:p,currentLocales:structuredClone(p),originalValues:g,currentValues:Object.fromEntries(m.map(v=>[v,f?io({draft:{collectionName:i,fileName:r},locale:v,target:structuredClone(g[v])}):structuredClone(g[v])])),files:Object.fromEntries(m.map(v=>[v,f?io({draft:{collectionName:i,fileName:r},prop:"files",locale:v,getValueMap:()=>le(at).currentValues[v]}):{}])),validities:Object.fromEntries(d.map(v=>[v,{}])),expanderStates:{_:{}}})},R0=t=>xs(JSON.parse(JSON.stringify(t))),$0=(t,e)=>e.split(".").reduce((n,i)=>{const r=i.match(/^\d+$/)?Number(i):i;return n[r]??=[],n[r]},t),UE=(t,e,n)=>{const i=le(at),{collection:r,collectionFile:s}=i,{defaultLocale:l}=(s??r)._i18n,o=R0(i.currentValues[t]),a=R0(i.expanderStates._);n({valueList:$0(o,e),expanderStateList:t===l?$0(a,e):[]}),at.update(u=>({...u,currentValues:{...u.currentValues,[t]:io({draft:u,locale:t,target:zr(o)})},expanderStates:{...u.expanderStates,_:zr(a)}}))},mp=(t,{prop:e="currentValues"}={})=>{const n=le(at),{collectionName:i,fileName:r,collection:s,collectionFile:l}=n,{defaultLocale:o}=(l??s)._i18n,a=n[e][o],u=[...new Set([...Object.keys(t),...Object.keys(a)])],c={};return u.forEach(f=>{const d=li({collectionName:i,fileName:r,keyPath:f})?.i18n==="duplicate";c[f]=(d?a[f]:void 0)??t[f]}),c},qE=t=>{at.update(e=>{const{currentLocales:n,currentValues:i}=e,r=!n[t];if(r&&!i[t]){const{collection:s,collectionName:l,collectionFile:o,fileName:a,originalValues:u,files:c}=e,{fields:f=[],_i18n:d}=o??s,{defaultLocale:h}=d,m=Zf(f);return{...e,currentLocales:{...n,[t]:r},originalValues:{...u,[t]:m},currentValues:{...i,[t]:io({draft:{collectionName:l,fileName:a},locale:t,target:mp(m)})},files:{...c,[t]:io({draft:{collectionName:l,fileName:a},prop:"files",locale:t,target:mp(Object.fromEntries(Object.keys(c[h]).map(p=>[p,void 0])),{prop:"files"}),getValueMap:()=>le(at).currentValues[t]})}}}return{...e,currentLocales:{...n,[t]:r}}})},gp=Xe({id:void 0,show:!1,status:void 0,message:void 0,count:1,sourceLocale:void 0}),HE=async(t,e,n="",i=!1)=>{const{collectionName:r,fileName:s,currentValues:l}=le(at),o=l[t],a=Object.fromEntries(Object.entries(o).filter(([h,m])=>{const p=li({collectionName:r,fileName:s,valueMap:o,keyPath:h});return!(n&&!h.startsWith(n)||typeof m!="string"||!["markdown","text","string","list"].includes(p?.widget??"string")||p?.widget==="list"&&(p.field??p.fields)||!i&&m===l[e][h])})),u=Object.keys(a).length,c=u===1?"one":"many",f=i?"translation":"copy",d=(h,m)=>{gp.set({id:Date.now(),show:!0,status:h,message:m,count:u,sourceLocale:t})};if(!u){d("info",`${f}.none`);return}if(i){const h=le(Lt).apiKeys?.[le(zc)?.serviceId];if(!h)return;d("info","translation.started");try{const m=await le(zc).translate(Object.values(a),{apiKey:h,sourceLocale:t,targetLocale:e});Object.keys(a).forEach((p,g)=>{l[e][p]=m[g]}),d("success",`translation.complete.${c}`)}catch(m){d("error","translation.error"),console.error(m)}}else Object.entries(a).forEach(([h,m])=>{l[e][h]=m}),d("success",`copy.complete.${c}`);at.update(h=>({...h,currentValues:l}))},hg=(t="",e="")=>{const{collection:n,collectionFile:i,fileName:r,currentValues:s,originalValues:l}=le(at),{locales:o,defaultLocale:a}=(i??n)._i18n,u=t?[t]:o,c=(f,d,h=!1)=>{Object.entries(d).forEach(([m,p])=>{if(!e||m.startsWith(e)){const g=li({collectionName:n.name,fileName:r,valueMap:d,keyPath:m});(f===a||[!0,"translate"].includes(g?.i18n??!1))&&(h?delete s[f][m]:s[f][m]=p)}})};u.forEach(f=>{c(f,s[f],!0),c(f,l[f],!1)}),at.update(f=>({...f,currentValues:s}))},Yz=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:i,currentValues:r,validities:s}=le(at),{i18nEnabled:l,defaultLocale:o}=(e??t)._i18n;let a=!0;return Object.entries(r).forEach(([u,c])=>{const f=Object.entries(c);if(!i[u]){s[u]=Object.fromEntries(f.map(([d])=>[d,{valid:!0}]));return}s[u]={},f.forEach(([d,h])=>{const m=li({collectionName:t.name,fileName:n,valueMap:c,keyPath:d});if(!m)return;const p=d.match(/\.(\d+)$/),{widget:g="string",required:v=!0,i18n:b=!1,pattern:w}=m,{multiple:k=!1}=m,{min:S,max:E}=m,M=v!==!1&&(u===o||l&&(b===!0||b==="translate"));let I=!1,D=!1,z=!1,R=!1,U=!1;if(g==="list"||p){if(p&&(d=d.replace(/\.\d+$/,"")),d in s[u])return;const K=new RegExp(`^${dn(d)}\\.\\d+$`),ve=Array.isArray(h)&&h.length?h:f.filter(([me])=>me.match(K)).map(([,me])=>me).filter(me=>me!==void 0)??[];M&&!ve.length?I=!0:typeof S=="number"&&ve.length<S?D=!0:typeof E=="number"&&ve.length>E&&(z=!0)}if(g==="object"&&M&&!h&&(I=!0),!["object","list","hidden","compute"].includes(g)&&(typeof h=="string"&&(h=h.trim()),M&&(h===void 0||h===""||k&&!h.length)&&(I=!0),M&&Array.isArray(w)&&w.length===2&&!String(h).match(w[0])&&(R=!0),g==="string"&&h)){const{type:K="text"}=m;if(K!=="text"){const ve=document.createElement("input");ve.type=K,ve.value=h,{typeMismatch:U}=ve.validity}K==="email"&&!U&&!h.split("@")[1]?.includes(".")&&(U=!0)}const W={valueMissing:I,rangeUnderflow:D,rangeOverflow:z,patternMismatch:R,typeMismatch:U},ee=!Object.values(W).some(Boolean);s[u][d]={...W,valid:ee},ee||(a=!1)})}),at.update(u=>({...u,validities:s})),a},Gz=t=>{const{collection:{path:e,_i18n:{structure:n},_assetFolder:i}}=t,r=e?.match(/(.+?)(?:\/[^/]+)?$/)[1],s=n==="multiple_folders",{entryRelative:l,internalPath:o,publicPath:a}=i??le(gi)[0];return l?{internalAssetFolder:Jh(Mc(Zh([o,s||e.includes("/")?r:void 0]),t)),publicAssetFolder:!s&&a.match(/^\.?$/)?a:Jh(Mc(s?Zh([...Array((e?.match(/\//g)??[]).length+1).fill(".."),a,r]):a,t))}:{internalAssetFolder:o,publicAssetFolder:a}},F0=(t,e,n)=>{const{collection:i,collectionFile:r,originalEntry:s,currentValues:l}=t;if(r)return r.file;if(s?.locales[e])return s?.locales[e].path;const{defaultLocale:o,structure:a}=i._i18n,u=i.folder,c=i.path?Mc(i.path,{collection:i,content:l[o],currentSlug:n}):n,f=cg({format:i.format,extension:i.extension}),d=`${u}/${c}.${f}`,h={multiple_folders:`${u}/${e}/${c}.${f}`,multiple_files:`${u}/${c}.${e}.${f}`,single_file:d};return h[a]||h.single_file},zs=t=>{at.update(e=>(e&&Object.entries(t).forEach(([n,i])=>{e.expanderStates._[n]!==i&&(e.expanderStates._[n]=i)}),e))},xE=(t,e)=>t.slice(0,e).map(n=>`${n}#`).join(".").replaceAll(/#\.(\d+)#/g,".$1"),Kz=()=>{const t={};Object.values(le(at)?.validities??{}).forEach(e=>{Object.entries(e).forEach(([n,{valid:i}])=>{i||n.split(".").forEach((r,s,l)=>{t[xE(l,s+1)]=!0})})}),zs(t)},Zz=async({skipCI:t=void 0}={})=>{if(!Yz())throw Kz(),new Error("validation_failed");const e=le(Yi),n=le(at),{collection:i,isNew:r,originalLocales:s,currentLocales:l,originalEntry:o,collectionName:a,collectionFile:u,fileName:c,currentValues:f,files:d}=n,{identifier_field:h="title",slug:m=`{{${h}}}`}=i,{i18nEnabled:p,locales:g,defaultLocale:v,structure:b}=(u??i)._i18n,w={collection:i,content:f[v]},k=c||o?.slug||Mc(m,w),{internalAssetFolder:S,publicAssetFolder:E}=Gz({...w,currentSlug:k,isMediaFolder:!0,entryFilePath:F0(n,v,k)}),P=le(wn).map(J=>J.path).filter(J=>J.match(`^\\/${dn(S)}\\/[^\\/]+$`)),M=[],I=[],D={text:void 0,collectionName:a,folder:S,commitAuthor:e.email?{name:e.name,email:e.email}:void 0,commitDate:new Date},z=Object.fromEntries(await Promise.all(Object.entries(f).map(async([J,Le])=>{const _e=F0(n,J,k);if(!l[J])return[J,{path:_e}];for(const[de,ge]of Object.entries(Le)){if(ge===void 0){delete Le[de];continue}if(typeof ge!="string")continue;Le[de]=ge.trim();const[,pe,We]=ge.match(/^data:(.+?\/.+?);base64,(.+)/)??[];if(pe){const ot=d[J][de]||await(async()=>{const Jt=await(await fetch(ge)).blob(),[Ot,st]=pe.split("/"),[mn]=st.split("+");return new File([Jt],`${Ot}-${Date.now()}.${mn}`,{type:pe})})(),oe=await la(ot),Ne=I.find(pt=>pt.sha===oe);if(Ne){Le[de]=E?`${E}/${Ne.name}`:Ne.name;continue}const Qe=Nm(ot.name,[...P,...I.map(pt=>pt.name)]),rt=`${S}/${Qe}`;M.push({action:"create",path:rt,data:ot,base64:We}),I.push({...D,blobURL:URL.createObjectURL(ot),name:Qe,path:rt,sha:oe,size:ot.size,kind:Lm(Qe)}),Le[de]=E?`${E}/${Qe}`:Qe}}const Be=xs(Le),Ke=await la(new Blob([Be],{type:"text/plain"}));return[J,{content:Be,sha:Ke,path:_e}]}))),R={id:`${a}/${k}`,collectionName:a,fileName:c,slug:k,sha:z[v].sha,locales:Object.fromEntries(Object.entries(z).filter(([,{content:J}])=>!!J))},{extension:U,format:W,frontmatter_delimiter:ee,yaml_quote:K}=i,ve={extension:U,format:W,frontmatterDelimiter:ee,yamlQuote:K};if(u||!p||b==="single_file"){const{path:J,content:Le}=z[v];M.push({action:r?"create":"update",slug:k,path:J,data:O0({content:p?Object.fromEntries(Object.entries(z).map(([_e,Be])=>[_e,Be.content])):Le,path:J,config:ve})})}else g.forEach(J=>{const{path:Le,content:_e}=z[J];l[J]?M.push({action:r||!s[J]?"create":"update",slug:k,path:Le,data:O0({content:_e,path:Le,config:ve})}):s[J]&&M.push({action:"delete",slug:k,path:Le})});try{await le(ti).commitChanges(M,{commitType:r?"create":"update",collection:i,skipCI:t})}catch(J){throw console.error(J),new Error("saving_failed",{cause:J})}const me=I.map(J=>J.path);Pi.update(J=>[...J.filter(Le=>Le.id!==R.id),R]),wn.update(J=>[...J.filter(Le=>!me.includes(Le.path)),...I]),at.set(null);const se=le(Wr)==="local",{backend:{automatic_deployments:q=void 0}={}}=le(wt)??{};Qo.set({count:1,saved:!0,published:!se&&(t===void 0?q===!0:t===!1)})};at.subscribe(t=>{le(Lt).devModeEnabled&&console.info("entryDraft",t)});iu.subscribe(t=>{const e=le(lr).selectAssetsView??{};ei(t,e)||lr.update(n=>({...n,selectAssetsView:t}))});lr.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{ei(t,await Zt.get(pp))||await Zt.set(pp,t)}catch{}})()});const VE=An([at,Or],([t,e],n)=>{n(!!(t||e))}),Zu=Xe(""),Gn=Xe(""),ru=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},pn=(t,{state:e={},replaceState:n=!1,notifyChange:i=!0}={})=>{const r=window.location.hash,s=`#${t}`,l=[{...e,from:r},"",s];n?window.history.replaceState(...l):window.history.pushState(...l),i&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:r,newURL:s}))},Hl=(t,e={})=>{window.history.state?.from?window.history.back():pn(t,e)},WE=()=>{const{display_url:t,site_url:e}=le(wt);window.open(t||e||"/","_blank")};function Jz(t){ye(t,"svelte-14y9vny",".container.svelte-14y9vny.svelte-14y9vny.svelte-14y9vny{flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px}.container.svelte-14y9vny .inner.svelte-14y9vny.svelte-14y9vny{display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;height:240px}.container.svelte-14y9vny .logo.svelte-14y9vny.svelte-14y9vny{max-width:160px;height:auto}.container.svelte-14y9vny h1.svelte-14y9vny.svelte-14y9vny{font-size:48px}.container.svelte-14y9vny .logo.svelte-14y9vny~h1.svelte-14y9vny{font-size:var(--sui-font-size-xxx-large)}.container.svelte-14y9vny .message.svelte-14y9vny.svelte-14y9vny{margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:normal;text-align:center}.container.svelte-14y9vny .error.svelte-14y9vny.svelte-14y9vny{border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;text-align:center}")}function Xz(t){let e,n=t[0]("loading_site_data")+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert"),C(e,"class","message svelte-14y9vny")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=r[0]("loading_site_data")+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function Qz(t){let e,n;return e=new Fz({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ej(t){let e,n=t[0]("authorizing")+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert"),C(e,"class","message svelte-14y9vny")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=r[0]("authorizing")+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function tj(t){let e,n,i=t[0]("loading_site_data_error")+"",r,s,l,o=kn.sanitize(Tt.parseInline(t[5].message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})+"";return{c(){e=F("div"),n=F("div"),r=G(i),s=j(),l=F("div"),C(n,"role","none"),C(n,"class","message svelte-14y9vny"),C(l,"role","none"),C(l,"class","error svelte-14y9vny"),C(e,"role","alert")},m(a,u){A(a,e,u),$(e,n),$(n,r),$(e,s),$(e,l),l.innerHTML=o},p(a,u){u&1&&i!==(i=a[0]("loading_site_data_error")+"")&&X(r,i),u&32&&o!==(o=kn.sanitize(Tt.parseInline(a[5].message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})+"")&&(l.innerHTML=o)},i:H,o:H,d(a){a&&T(e)}}}function nj(t){let e,n=t[0]("loading_site_config")+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert"),C(e,"class","message svelte-14y9vny")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=r[0]("loading_site_config")+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function ij(t){let e,n=t[0](`prefs.error.${t[3].type}`)+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert"),C(e,"class","message svelte-14y9vny")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&9&&n!==(n=r[0](`prefs.error.${r[3].type}`)+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function rj(t){let e,n=t[2].message+"",i,r,s=t[0]("config.error.try_again")+"",l;return{c(){e=F("div"),i=G(n),r=j(),l=G(s),C(e,"role","alert"),C(e,"class","message svelte-14y9vny")},m(o,a){A(o,e,a),$(e,i),$(e,r),$(e,l)},p(o,a){a&4&&n!==(n=o[2].message+"")&&X(i,n),a&1&&s!==(s=o[0]("config.error.try_again")+"")&&X(l,s)},i:H,o:H,d(o){o&&T(e)}}}function sj(t){let e,n,i,r,s,l,o,a,u,c;const f=[rj,ij,nj,tj,ej,Qz,Xz],d=[];function h(m,p){return m[2]?0:m[3]?1:!m[1]||!m[4]?2:m[5].message&&!m[5].canRetry?3:m[6]?4:!m[7]||m[8]?5:m[9]?-1:6}return~(a=h(t))&&(u=d[a]=f[a](t)),{c(){e=F("div"),n=F("div"),i=F("img"),s=j(),l=F("h1"),l.textContent="Sveltia CMS",o=j(),u&&u.c(),C(i,"loading","lazy"),Xn(i.src,r=t[1]?.logo_url||`data:image/svg+xml;base64,${btoa(Bh)}`)||C(i,"src",r),C(i,"alt",""),C(i,"class","logo svelte-14y9vny"),C(l,"class","svelte-14y9vny"),C(n,"role","none"),C(n,"class","inner svelte-14y9vny"),C(e,"role","none"),C(e,"class","container svelte-14y9vny")},m(m,p){A(m,e,p),$(e,n),$(n,i),$(n,s),$(n,l),$(n,o),~a&&d[a].m(n,null),c=!0},p(m,[p]){(!c||p&2&&!Xn(i.src,r=m[1]?.logo_url||`data:image/svg+xml;base64,${btoa(Bh)}`))&&C(i,"src",r);let g=a;a=h(m),a===g?~a&&d[a].p(m,p):(u&&(x(),y(d[g],1,1,()=>{d[g]=null}),V()),~a?(u=d[a],u?u.p(m,p):(u=d[a]=f[a](m),u.c()),_(u,1),u.m(n,null)):u=null)},i(m){c||(_(u),c=!0)},o(m){y(u),c=!1},d(m){m&&T(e),~a&&d[a].d()}}}function lj(t,e,n){let i,r,s,l,o,a,u,c,f,d,h;return B(t,ue,m=>n(0,i=m)),B(t,Gn,m=>n(10,r=m)),B(t,wt,m=>n(1,s=m)),B(t,ep,m=>n(2,l=m)),B(t,Kh,m=>n(3,o=m)),B(t,Lt,m=>n(4,a=m)),B(t,Ja,m=>n(5,u=m)),B(t,OS,m=>n(6,c=m)),B(t,Yi,m=>n(7,f=m)),B(t,Jo,m=>n(8,d=m)),B(t,ba,m=>n(9,h=m)),t.$$.update=()=>{t.$$.dirty&1&&ze(Gn,r=i("welcome_to_sveltia_cms"),r)},[i,s,l,o,a,u,c,f,d,h]}class oj extends ie{constructor(e){super(),ne(this,e,lj,sj,te,{},Jz)}}function aj(t){ye(t,"svelte-1tew8xu",".wrapper.svelte-1tew8xu{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid transparent;font-size:var(--sui-font-size-small)}.wrapper.minor.svelte-1tew8xu{border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color)}.wrapper.major.svelte-1tew8xu{border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color)}.wrapper.svelte-1tew8xu button{font-size:inherit !important}")}function z0(t){let e,n=t[2](`backend_status.${t[0]}_incident`,{values:{service:t[1]?.label}})+"",i,r,s,l,o;return s=new et({props:{variant:"link",label:t[2]("details")}}),s.$on("click",t[3]),{c(){e=F("div"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","alert"),C(e,"class",l="wrapper "+t[0]+" svelte-1tew8xu")},m(a,u){A(a,e,u),$(e,i),$(e,r),N(s,e,null),o=!0},p(a,u){(!o||u&7)&&n!==(n=a[2](`backend_status.${a[0]}_incident`,{values:{service:a[1]?.label}})+"")&&X(i,n);const c={};u&4&&(c.label=a[2]("details")),s.$set(c),(!o||u&1&&l!==(l="wrapper "+a[0]+" svelte-1tew8xu"))&&C(e,"class",l)},i(a){o||(_(s.$$.fragment,a),o=!0)},o(a){y(s.$$.fragment,a),o=!1},d(a){a&&T(e),L(s)}}}function uj(t){let e=["minor","major"].includes(t[0]),n,i,r=e&&z0(t);return{c(){r&&r.c(),n=Q()},m(s,l){r&&r.m(s,l),A(s,n,l),i=!0},p(s,[l]){l&1&&(e=["minor","major"].includes(s[0])),e?r?(r.p(s,l),l&1&&_(r,1)):(r=z0(s),r.c(),_(r,1),r.m(n.parentNode,n)):r&&(x(),y(r,1,1,()=>{r=null}),V())},i(s){i||(_(r),i=!0)},o(s){y(r),i=!1},d(s){s&&T(n),r&&r.d(s)}}}function cj(t,e,n){let i,r,s;B(t,wt,f=>n(5,i=f)),B(t,ti,f=>n(1,r=f)),B(t,ue,f=>n(2,s=f));const l=5*60*1e3;let o=0,a="none";const u=async()=>{r?.checkStatus&&n(0,a=await r.checkStatus())};return Ut(()=>{if(!(!r?.checkStatus||i?.backend.api_root))return u(),o=window.setInterval(()=>{u()},l),()=>{window.clearInterval(o)}}),[a,r,s,()=>{window.open(r?.statusDashboardURL,"_blank")}]}class fj extends ie{constructor(e){super(),ne(this,e,cj,uj,te,{},aj)}}const _p="0.21.1";function dj(t){ye(t,"svelte-1f4bf93",".wrapper.svelte-1f4bf93{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid var(--sui-secondary-border-color);font-size:var(--sui-font-size-small)}.wrapper.svelte-1f4bf93 button{font-size:inherit !important}")}function j0(t){let e,n=t[1]("update_available")+"",i,r,s,l;return s=new et({props:{variant:"link",label:t[1]("update_now")}}),s.$on("click",t[2]),{c(){e=F("div"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","alert"),C(e,"class","wrapper svelte-1f4bf93")},m(o,a){A(o,e,a),$(e,i),$(e,r),N(s,e,null),l=!0},p(o,a){(!l||a&2)&&n!==(n=o[1]("update_available")+"")&&X(i,n);const u={};a&2&&(u.label=o[1]("update_now")),s.$set(u)},i(o){l||(_(s.$$.fragment,o),l=!0)},o(o){y(s.$$.fragment,o),l=!1},d(o){o&&T(e),L(s)}}}function hj(t){let e,n,i=t[0]&&j0(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&_(i,1)):(i=j0(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function pj(t,e,n){let i;B(t,ue,u=>n(1,i=u));const r=60*60*1e3;let s=0,l=!1;const o=async()=>{try{const u=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!u.ok)return;const{version:c}=await u.json();c&&c!==_p&&n(0,l=!0)}catch{}};return Ut(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return o(),s=window.setInterval(()=>{o()},r),()=>{window.clearInterval(s)}}),[l,i,()=>{window.location.reload()}]}class mj extends ie{constructor(e){super(),ne(this,e,pj,hj,te,{},dj)}}function gj(t){let e,n,i,r,s,l;return e=new Pt({props:{label:t[3]?t[5]("public_url"):t[5]("public_urls"),disabled:!t[4].length}}),e.$on("click",t[11]),i=new Pt({props:{label:t[3]?t[5]("file_path"):t[5]("file_paths")}}),i.$on("click",t[12]),s=new Pt({props:{label:t[5]("file_data"),disabled:!t[1]}}),s.$on("click",t[13]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment)},m(o,a){N(e,o,a),A(o,n,a),N(i,o,a),A(o,r,a),N(s,o,a),l=!0},p(o,a){const u={};a&40&&(u.label=o[3]?o[5]("public_url"):o[5]("public_urls")),a&16&&(u.disabled=!o[4].length),e.$set(u);const c={};a&40&&(c.label=o[3]?o[5]("file_path"):o[5]("file_paths")),i.$set(c);const f={};a&32&&(f.label=o[5]("file_data")),a&2&&(f.disabled=!o[1]),s.$set(f)},i(o){l||(_(e.$$.fragment,o),_(i.$$.fragment,o),_(s.$$.fragment,o),l=!0)},o(o){y(e.$$.fragment,o),y(i.$$.fragment,o),y(s.$$.fragment,o),l=!1},d(o){o&&(T(n),T(r)),L(e,o),L(i,o),L(s,o)}}}function _j(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[5]("copy_options"),$$slots:{default:[gj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s["aria-label"]=i[5]("copy_options")),r&131130&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function bj(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function vj(t){let e=t[2].text+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&4&&e!==(e=i[2].text+"")&&X(n,e)},d(i){i&&T(n)}}}function yj(t){let e,n;return e=new Ii({props:{status:t[2].status,$$slots:{default:[vj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.status=i[2].status),r&131076&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function wj(t){let e,n,i,r,s;e=new pi({props:{variant:"ghost",disabled:!t[0].length,label:t[5]("copy"),$$slots:{"end-icon":[bj],popup:[_j]},$$scope:{ctx:t}}});function l(a){t[14](a)}let o={$$slots:{default:[yj]},$$scope:{ctx:t}};return t[2].show!==void 0&&(o.show=t[2].show),i=new Si({props:o}),ae.push(()=>Re(i,"show",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,[u]){const c={};u&1&&(c.disabled=!a[0].length),u&32&&(c.label=a[5]("copy")),u&131130&&(c.$$scope={dirty:u,ctx:a}),e.$set(c);const f={};u&131076&&(f.$$scope={dirty:u,ctx:a}),!r&&u&4&&(r=!0,f.show=a[2].show,$e(()=>r=!1)),i.$set(f)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function kj(t,e,n){let i,r,s;B(t,ue,k=>n(5,s=k));let{assets:l=[]}=e,o=[],a,u=!1;const c={show:!1,text:"",status:"success"},f=async()=>{if(a=void 0,!i)return!1;const k=await wo(l[0]);return a=k,pa(k.type)?!0:k.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},d=async()=>{await navigator.clipboard.writeText(r.join(`
|
|
623
|
+
`))},h=async()=>{await navigator.clipboard.writeText(l.map(({path:k})=>`/${k}`).join(`
|
|
624
|
+
`))},m=async()=>{let k=a;if(pa(k.type)){await navigator.clipboard.writeText(await k.text());return}if(!k.type.startsWith("image/"))throw new Error("Unsupported type");k.type!=="image/png"&&(k=await N3(k)),await navigator.clipboard.write([new ClipboardItem({"image/png":k})])},p=async(k,S,E)=>{try{await k(),n(2,c.status="success",c),n(2,c.text=i?S:E,c)}catch{n(2,c.status="error",c),n(2,c.text=s("clipboard_error"),c)}finally{n(2,c.show=!0,c)}},g=()=>{p(d,s("asset_url_copied"),s("asset_urls_copied"))},v=()=>{p(h,s("asset_path_copied"),s("asset_paths_copied"))},b=()=>{p(m,s("asset_data_copied"),s("asset_data_copied"))};function w(k){t.$$.not_equal(c.show,k)&&(c.show=k,n(2,c))}return t.$$set=k=>{"assets"in k&&n(0,l=k.assets)},t.$$.update=()=>{t.$$.dirty&1&&n(3,i=l.length===1),t.$$.dirty&1&&(async()=>(n(10,o=await Promise.all(l.map(I3))),n(1,u=await f())))(),t.$$.dirty&1024&&n(4,r=o.filter(({publicURL:k})=>!!k).map(({publicURL:k})=>k))},[l,u,c,i,r,s,d,h,m,p,o,g,v,b,w]}class YE extends ie{constructor(e){super(),ne(this,e,kj,wj,te,{assets:0})}}const ta=Xe({count:1,saved:!1,deleted:!1,published:!1}),GE=async(t,e)=>{const{files:n,folder:i,originalAsset:r}=t,s=le(wn).map(h=>h.path).filter(h=>h.match(`^${dn(i)}\\/[^\\/]+$`)).map(h=>h.split("/").pop()),l=n.map(h=>{const m=r?.name??Nm(h.name,s);return s.includes(m)||s.push(m),{action:r?"update":"create",name:m,path:[i,m].join("/"),file:h}});await le(ti)?.commitChanges(l.map(({action:h,path:m,file:p})=>({action:h,path:m,data:p})),e);const{collectionName:o}=le(gi).findLast(({internalPath:h})=>i===h)??{},a=await Promise.all(l.map(async({name:h,path:m,file:p})=>({blobURL:URL.createObjectURL(p),name:h,path:m,sha:await la(p),size:p.size,kind:Lm(h),text:void 0,collectionName:o,folder:i})));wn.update(h=>[...h.filter(m=>!a.some(p=>p.path===m.path)),...a]);const u=le(Vs),c=le(Or);u&&Vs.set(le(wn).find(h=>h.path===u.path)),c&&Or.set(le(wn).find(h=>h.path===c.path));const f=le(Wr)==="local",{backend:{automatic_deployments:d=void 0}={}}=le(wt)??{};ta.set({count:n.length,saved:!0,published:!f&&d===!0})},Sj=async t=>{await le(ti)?.commitChanges(t.map(({path:e})=>({action:"delete",path:e})),{commitType:"deleteMedia"}),wn.update(e=>e.filter(n=>!t.includes(n))),ta.set({deleted:!0,count:t.length})};function Ej(t){let e;return{c(){e=G(t[2])},m(n,i){A(n,e,i)},p(n,i){i&4&&X(e,n[2])},d(n){n&&T(e)}}}function Tj(t){let e,n,i,r,s;e=new et({props:{variant:"ghost",disabled:!t[0].length,label:t[4]("delete"),"aria-label":t[1]}}),e.$on("click",t[6]);function l(a){t[7](a)}let o={title:t[0].length===1?t[4]("delete_asset"):t[4]("delete_assets"),okLabel:t[4]("delete"),$$slots:{default:[Ej]},$$scope:{ctx:t}};return t[3]!==void 0&&(o.open=t[3]),i=new Ia({props:o}),ae.push(()=>Re(i,"open",l)),i.$on("ok",t[8]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,[u]){const c={};u&1&&(c.disabled=!a[0].length),u&16&&(c.label=a[4]("delete")),u&2&&(c["aria-label"]=a[1]),e.$set(c);const f={};u&17&&(f.title=a[0].length===1?a[4]("delete_asset"):a[4]("delete_assets")),u&16&&(f.okLabel=a[4]("delete")),u&516&&(f.$$scope={dirty:u,ctx:a}),!r&&u&8&&(r=!0,f.open=a[3],$e(()=>r=!1)),i.$set(f)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function Aj(t,e,n){let i;B(t,ue,d=>n(4,i=d));let{assets:r=[]}=e,{buttonDescription:s=""}=e,{dialogDescription:l=""}=e;const o=sn();let a=!1;const u=()=>{n(3,a=!0)};function c(d){a=d,n(3,a)}const f=()=>{Sj(r),o("delete")};return t.$$set=d=>{"assets"in d&&n(0,r=d.assets),"buttonDescription"in d&&n(1,s=d.buttonDescription),"dialogDescription"in d&&n(2,l=d.dialogDescription)},[r,s,l,a,i,o,u,c,f]}class KE extends ie{constructor(e){super(),ne(this,e,Aj,Tj,te,{assets:0,buttonDescription:1,dialogDescription:2})}}function Cj(t){let e=(t[0].length===1?t[2]("asset_downloaded"):t[2]("assets_downloaded"))+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&5&&e!==(e=(i[0].length===1?i[2]("asset_downloaded"):i[2]("assets_downloaded"))+"")&&X(n,e)},d(i){i&&T(n)}}}function Nj(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[Cj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&69&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Lj(t){let e,n,i,r,s;e=new et({props:{variant:"ghost",disabled:!t[0].length,label:t[2]("download")}}),e.$on("click",t[4]);function l(a){t[5](a)}let o={$$slots:{default:[Nj]},$$scope:{ctx:t}};return t[1]!==void 0&&(o.show=t[1]),i=new Si({props:o}),ae.push(()=>Re(i,"show",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,[u]){const c={};u&1&&(c.disabled=!a[0].length),u&4&&(c.label=a[2]("download")),e.$set(c);const f={};u&69&&(f.$$scope={dirty:u,ctx:a}),!r&&u&2&&(r=!0,f.show=a[1],$e(()=>r=!1)),i.$set(f)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function Oj(t,e,n){let i;B(t,ue,u=>n(2,i=u));let{assets:r=[]}=e,s=!1;const l=async()=>{for(const u of r)VD(await wo(u),u.name),await hs(300);n(1,s=!0)},o=()=>{l()};function a(u){s=u,n(1,s)}return t.$$set=u=>{"assets"in u&&n(0,r=u.assets)},[r,s,i,l,o,a]}class ZE extends ie{constructor(e){super(),ne(this,e,Oj,Lj,te,{assets:0})}}const bp="sveltia-cms.assets-view",Mr=Xe(!1),Pj=An([Ai],([t],e)=>{e(!!t.files?.length)}),na=t=>t==="*"?le(ue)("all_assets"):t?le(wt)?.collections.find(({name:e})=>e===t)?.label??"":le(ue)("uncategorized"),Sa=t=>{const{media_folder:e}=le(wt);if(!t)return na("*");if(t===e)return na(void 0);const n=le(gi).find(({internalPath:i})=>i===t);return n?na(n.collectionName):""},Ij=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const i=[...t],r={commit_author:String,commit_date:Date}[e]||i[0]?.[e]?.constructor||String,s=l=>{const{commitAuthor:{name:o,login:a,email:u}={},commitDate:c}=l;return e==="commit_author"?o||a||u:e==="commit_date"?c:e==="name"?l.name.split(".")[0]:l[e]??""};return i.sort((l,o)=>{const a=s(l),u=s(o);return r===String?a.localeCompare(u):r===Date?Number(a)-Number(u):a-u}),n==="descending"&&i.reverse(),i},Dj=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:r})=>n==="other"?!Object.values(Xh).some(s=>r.match(s)):r.match(Xh[n]));const i=typeof n=="string"?new RegExp(n):void 0;return t.filter(r=>{const s=r[e];return i?String(s??"").match(i):s===n})},Mj=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const i=typeof n=="string"?new RegExp(n):void 0,r={},s=le(ue)("other");return t.forEach(l=>{const o=l[e];let a;i?[a=s]=String(o??"").match(i)??[]:a=o,a in r||(r[a]=[]),r[a].push(l)}),Object.fromEntries(Object.entries(r).sort(([l],[o])=>l.localeCompare(o)))},Rj={type:"grid",showInfo:!0,sort:{key:"name",order:"ascending"}},xi=Xe({type:"grid",showInfo:!0}),jc=Xe({},t=>{(async()=>{try{t(await Zt.get(bp)??{}),Jn.subscribe(e=>{const n=le(jc)[e?.internalPath||"*"]??structuredClone(Rj);ei(n,le(xi))||xi.set(n)})}catch{}})()}),$j=An([wn,un],([t],e)=>{const{commitAuthor:n,commitDate:i}=t?.[0]??{},r=["name"];n&&r.push("commit_author"),i&&r.push("commit_date"),e(r.map(s=>({key:s,label:le(ue)(`sort_keys.${s}`)})))}),tl=An([wn,Jn],([t,e],n)=>{n(t&&e?t.filter(({folder:i})=>e.internalPath===i):t?[...t]:[])}),JE=An([tl,xi],([t,e],n)=>{let i=[...t];i=Ij(i,e?.sort),i=Dj(i,e?.filter),n(Mj(i,e?.group))});tl.subscribe(t=>{Rs.set([]),le(Lt).devModeEnabled&&console.info("listedAssets",t)});xi.subscribe(t=>{const e=le(Jn)?.internalPath||"*",n=le(jc)[e]??{};ei(t,n)||jc.update(i=>({...i,[e]:t}))});jc.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{ei(t,await Zt.get(bp))||await Zt.set(bp,t)}catch{}})()});function Fj(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"more_vert"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function zj(t){let e,n,i,r;return e=new Pt({props:{variant:"ghost",label:t[1]("edit"),"aria-label":t[1]("edit_asset"),disabled:!t[0]||!_0(t[0])}}),e.$on("click",t[5]),i=new Pt({props:{variant:"ghost",label:t[1]("replace"),"aria-label":t[1]("replace_asset"),disabled:!t[0]}}),i.$on("click",t[6]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l&2&&(o.label=s[1]("edit")),l&2&&(o["aria-label"]=s[1]("edit_asset")),l&1&&(o.disabled=!s[0]||!_0(s[0])),e.$set(o);const a={};l&2&&(a.label=s[1]("replace")),l&2&&(a["aria-label"]=s[1]("replace_asset")),l&1&&(a.disabled=!s[0]),i.$set(a)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function jj(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[1]("edit_options"),$$slots:{default:[zj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s["aria-label"]=i[1]("edit_options")),r&159&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Bj(t){let e,n;return e=new pi({props:{variant:"ghost",iconic:!0,popupPosition:"bottom-right","aria-label":t[1]("show_edit_options"),$$slots:{popup:[jj],"start-icon":[Fj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s["aria-label"]=i[1]("show_edit_options")),r&159&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Uj(t,e,n){let i,r,s,l;B(t,ue,c=>n(1,i=c)),B(t,Nc,c=>n(2,r=c)),B(t,Ai,c=>n(3,s=c)),B(t,Mr,c=>n(4,l=c));let{asset:o}=e;const a=()=>{ze(Nc,r=o,r)},u=()=>{ze(Ai,s={folder:void 0,files:[],originalAsset:o},s),ze(Mr,l=!0,l)};return t.$$set=c=>{"asset"in c&&n(0,o=c.asset)},[o,i,r,s,l,a,u]}class XE extends ie{constructor(e){super(),ne(this,e,Uj,Bj,te,{asset:0})}}function qj(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"arrow_back_ios_new"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Hj(t){let e,n,i,r,s=t[0]?.name+"",l,o,a,u,c,f,d,h,m,p,g,v;return e=new et({props:{variant:"ghost",iconic:!0,"aria-label":t[2]("cancel_editing"),keyShortcuts:"Escape",$$slots:{"start-icon":[qj]},$$scope:{ctx:t}}}),e.$on("click",t[4]),a=new In({props:{flex:!0}}),c=new YE({props:{assets:t[1]}}),d=new ZE({props:{assets:t[1]}}),m=new KE({props:{assets:t[1],buttonDescription:t[2]("delete_asset"),dialogDescription:t[2]("confirm_deleting_this_asset")}}),m.$on("delete",t[5]),g=new XE({props:{asset:t[0]}}),{c(){O(e.$$.fragment),n=j(),i=F("h2"),r=F("strong"),l=G(s),o=j(),O(a.$$.fragment),u=j(),O(c.$$.fragment),f=j(),O(d.$$.fragment),h=j(),O(m.$$.fragment),p=j(),O(g.$$.fragment),C(r,"role","none"),C(i,"role","none")},m(b,w){N(e,b,w),A(b,n,w),A(b,i,w),$(i,r),$(r,l),A(b,o,w),N(a,b,w),A(b,u,w),N(c,b,w),A(b,f,w),N(d,b,w),A(b,h,w),N(m,b,w),A(b,p,w),N(g,b,w),v=!0},p(b,w){const k={};w&4&&(k["aria-label"]=b[2]("cancel_editing")),w&64&&(k.$$scope={dirty:w,ctx:b}),e.$set(k),(!v||w&1)&&s!==(s=b[0]?.name+"")&&X(l,s);const S={};w&2&&(S.assets=b[1]),c.$set(S);const E={};w&2&&(E.assets=b[1]),d.$set(E);const P={};w&2&&(P.assets=b[1]),w&4&&(P.buttonDescription=b[2]("delete_asset")),w&4&&(P.dialogDescription=b[2]("confirm_deleting_this_asset")),m.$set(P);const M={};w&1&&(M.asset=b[0]),g.$set(M)},i(b){v||(_(e.$$.fragment,b),_(a.$$.fragment,b),_(c.$$.fragment,b),_(d.$$.fragment,b),_(m.$$.fragment,b),_(g.$$.fragment,b),v=!0)},o(b){y(e.$$.fragment,b),y(a.$$.fragment,b),y(c.$$.fragment,b),y(d.$$.fragment,b),y(m.$$.fragment,b),y(g.$$.fragment,b),v=!1},d(b){b&&(T(n),T(i),T(o),T(u),T(f),T(h),T(p)),L(e,b),L(a,b),L(c,b),L(d,b),L(m,b),L(g,b)}}}function xj(t){let e,n;return e=new qr({props:{variant:"primary","aria-label":t[2]("primary"),$$slots:{default:[Hj]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&4&&(s["aria-label"]=i[2]("primary")),r&79&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Vj(t,e,n){let i,r,s,l;B(t,Or,u=>n(0,r=u)),B(t,ue,u=>n(2,s=u)),B(t,Jn,u=>n(3,l=u));const o=()=>{Hl(l?`/assets/${l.internalPath}`:"/assets")},a=()=>{Hl(l?`/assets/${l.internalPath}`:"/assets")};return t.$$.update=()=>{t.$$.dirty&1&&n(1,i=r?[r]:[])},[r,i,s,l,o,a]}let Wj=class extends ie{constructor(e){super(),ne(this,e,Vj,xj,te,{})}};function Yj(t){ye(t,"svelte-p8ixed",".preview.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed{display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%}.preview.tile.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed{border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 8px);background-color:var(--sui-secondary-background-color)}.preview.tile.svelte-p8ixed .sui.icon{font-size:48px}.preview.icon.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed{width:40px;height:40px}.preview.tile.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed,.preview.icon.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed{overflow:hidden;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1}.preview.svelte-p8ixed .blur.svelte-p8ixed.svelte-p8ixed{display:contents}.preview.svelte-p8ixed .blur.svelte-p8ixed>.svelte-p8ixed{position:absolute;inset:0;pointer-events:none}.preview.svelte-p8ixed .blur.svelte-p8ixed .overlay{z-index:-1;backdrop-filter:blur(32px) brightness(0.8)}.preview.svelte-p8ixed .blur .svelte-p8ixed.svelte-p8ixed:is(img, video){width:100%;height:100%;z-index:-2;object-fit:contain;transform:scale(1.2)}.preview.cover.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed{padding:0}.preview.svelte-p8ixed>.svelte-p8ixed.svelte-p8ixed:is(img, video){max-width:100%;max-height:100%}.preview.dissolve.svelte-p8ixed .svelte-p8ixed.svelte-p8ixed:is(img, video){opacity:0;transition:opacity 250ms}.preview.dissolve.loaded.svelte-p8ixed .svelte-p8ixed.svelte-p8ixed:is(img, video){opacity:1}.checkerboard.svelte-p8ixed img.svelte-p8ixed.svelte-p8ixed{background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px}.svelte-p8ixed:not(.checkerboard) img.svelte-p8ixed.svelte-p8ixed{background-color:#e5e5e5}.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed:is(img, video){object-fit:contain}.svelte-p8ixed.svelte-p8ixed.svelte-p8ixed:is(img, video):not([src]){visibility:hidden}.cover.svelte-p8ixed .svelte-p8ixed.svelte-p8ixed:is(img, video){object-fit:cover;aspect-ratio:1/1}")}function Gj(t){let e,n;return e=new xe({props:{name:"draft"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Kj(t){let e,n,i,r;const s=[eB,Qj],l=[];function o(a,u){return a[9]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function Zj(t){let e,n,i,r=[{src:n=t[0]},{controls:i=t[9]||void 0},{playsInline:!0},t[14]],s={};for(let l=0;l<r.length;l+=1)s=Z(s,r[l]);return{c(){e=F("video"),je(e,s),re(e,"svelte-p8ixed",!0)},m(l,o){A(l,e,o),t[17](e)},p(l,o){je(e,s=Ge(r,[o&1&&!Xn(e.src,n=l[0])&&{src:n},o&512&&i!==(i=l[9]||void 0)&&{controls:i},{playsInline:!0},o&16384&&l[14]])),re(e,"svelte-p8ixed",!0)},i:H,o:H,d(l){l&&T(e),t[17](null)}}}function Jj(t){let e,n,i=[{loading:t[2]},{src:n=t[0]},{alt:t[8]},t[14]],r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return{c(){e=F("img"),je(e,r),re(e,"svelte-p8ixed",!0)},m(s,l){A(s,e,l),t[16](e)},p(s,l){je(e,r=Ge(i,[l&4&&{loading:s[2]},l&1&&!Xn(e.src,n=s[0])&&{src:n},l&256&&{alt:s[8]},l&16384&&s[14]])),re(e,"svelte-p8ixed",!0)},i:H,o:H,d(s){s&&T(e),t[16](null)}}}function Xj(t){let e,n;return e=new xe({props:{name:"draft"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Qj(t){let e,n;return e=new xe({props:{name:"audio_file"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function eB(t){let e,n,i=[{src:n=t[0]},{controls:!0},{playsinline:""},t[14]],r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return{c(){e=F("audio"),je(e,r),re(e,"svelte-p8ixed",!0)},m(s,l){A(s,e,l),t[18](e)},p(s,l){je(e,r=Ge(i,[l&1&&!Xn(e.src,n=s[0])&&{src:n},{controls:!0},{playsinline:""},l&16384&&s[14]])),re(e,"svelte-p8ixed",!0)},i:H,o:H,d(s){s&&T(e),t[18](null)}}}function B0(t){let e,n,i;function r(o,a){return o[1]==="video"?nB:tB}let s=r(t),l=s(t);return{c(){e=F("div"),n=F("div"),i=j(),l.c(),C(n,"role","none"),C(n,"class","overlay svelte-p8ixed"),C(e,"role","none"),C(e,"class","blur svelte-p8ixed")},m(o,a){A(o,e,a),$(e,n),$(e,i),l.m(e,null)},p(o,a){s===(s=r(o))&&l?l.p(o,a):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&T(e),l.d()}}}function tB(t){let e,n;return{c(){e=F("img"),C(e,"loading",t[2]),Xn(e.src,n=t[0])||C(e,"src",n),C(e,"alt",""),C(e,"class","svelte-p8ixed")},m(i,r){A(i,e,r)},p(i,r){r&4&&C(e,"loading",i[2]),r&1&&!Xn(e.src,n=i[0])&&C(e,"src",n)},d(i){i&&T(e)}}}function nB(t){let e,n;return{c(){e=F("video"),Xn(e.src,n=t[0])||C(e,"src",n),e.playsInline=!0,C(e,"class","svelte-p8ixed")},m(i,r){A(i,e,r)},p(i,r){r&1&&!Xn(e.src,n=i[0])&&C(e,"src",n)},d(i){i&&T(e)}}}function iB(t){let e,n,i,r,s,l;const o=[Xj,Jj,Zj,Kj,Gj],a=[];function u(f,d){return f[11]?0:f[13]?1:f[1]==="video"?2:f[1]==="audio"?3:4}n=u(t),i=a[n]=o[n](t);let c=t[4]&&B0(t);return{c(){e=F("div"),i.c(),r=j(),c&&c.c(),C(e,"role","none"),C(e,"class",s="preview "+(t[3]??"")+" svelte-p8ixed"),re(e,"cover",t[5]),re(e,"checkerboard",t[6]),re(e,"dissolve",t[7]),re(e,"loaded",t[12])},m(f,d){A(f,e,d),a[n].m(e,null),$(e,r),c&&c.m(e,null),l=!0},p(f,[d]){let h=n;n=u(f),n===h?a[n].p(f,d):(x(),y(a[h],1,1,()=>{a[h]=null}),V(),i=a[n],i?i.p(f,d):(i=a[n]=o[n](f),i.c()),_(i,1),i.m(e,r)),f[4]?c?c.p(f,d):(c=B0(f),c.c(),c.m(e,null)):c&&(c.d(1),c=null),(!l||d&8&&s!==(s="preview "+(f[3]??"")+" svelte-p8ixed"))&&C(e,"class",s),(!l||d&40)&&re(e,"cover",f[5]),(!l||d&72)&&re(e,"checkerboard",f[6]),(!l||d&136)&&re(e,"dissolve",f[7]),(!l||d&4104)&&re(e,"loaded",f[12])},i(f){l||(_(i),l=!0)},o(f){y(i),l=!1},d(f){f&&T(e),a[n].d(),c&&c.d()}}}function rB(t,e,n){let i;const r=["kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"];let s=he(e,r),{kind:l}=e,{loading:o="lazy"}=e,{asset:a=void 0}=e,{src:u=void 0}=e,{variant:c=void 0}=e,{blurBackground:f=!1}=e,{cover:d=!1}=e,{checkerboard:h=!1}=e,{dissolve:m=!0}=e,{alt:p=""}=e,{controls:g=!1}=e,v,b=!1,w=!1,k=!1;const S=async()=>{if(!(!a||!v||b)){b=!0,n(11,w=!1),o==="lazy"&&await Ni(v);try{n(0,u=c?await O3(a):await Om(a))}catch{n(11,w=!0)}b=!1}},E=async()=>{v&&((i?!v.complete:!v.readyState)&&await new Promise(D=>{v.addEventListener(i?"load":"loadedmetadata",()=>{D(void 0)},{once:!0})}),m&&await Ni(v),n(12,k=!0))};function P(D){ae[D?"unshift":"push"](()=>{v=D,n(10,v)})}function M(D){ae[D?"unshift":"push"](()=>{v=D,n(10,v)})}function I(D){ae[D?"unshift":"push"](()=>{v=D,n(10,v)})}return t.$$set=D=>{e=Z(Z({},e),tt(D)),n(14,s=he(e,r)),"kind"in D&&n(1,l=D.kind),"loading"in D&&n(2,o=D.loading),"asset"in D&&n(15,a=D.asset),"src"in D&&n(0,u=D.src),"variant"in D&&n(3,c=D.variant),"blurBackground"in D&&n(4,f=D.blurBackground),"cover"in D&&n(5,d=D.cover),"checkerboard"in D&&n(6,h=D.checkerboard),"dissolve"in D&&n(7,m=D.dissolve),"alt"in D&&n(8,p=D.alt),"controls"in D&&n(9,g=D.controls)},t.$$.update=()=>{t.$$.dirty&32770&&n(13,i=l==="image"||a?.name.endsWith(".pdf")),t.$$.dirty&33792&&S(),t.$$.dirty&1024&&E()},[u,l,o,c,f,d,h,m,p,g,v,w,k,i,s,a,P,M,I]}class _s extends ie{constructor(e){super(),ne(this,e,rB,iB,te,{kind:1,loading:2,asset:15,src:0,variant:3,blurBackground:4,cover:5,checkerboard:6,dissolve:7,alt:8,controls:9},Yj)}}function sB(t){ye(t,"svelte-qwt9km",".detail.svelte-qwt9km.svelte-qwt9km{flex:none;overflow-x:hidden;overflow-y:auto;width:320px;padding:16px}.detail.svelte-qwt9km .preview.svelte-qwt9km{overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1}.detail.svelte-qwt9km section.svelte-qwt9km{margin:0 0 16px}.detail.svelte-qwt9km h4.svelte-qwt9km{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}.detail.svelte-qwt9km h4.svelte-qwt9km,.detail.svelte-qwt9km p.svelte-qwt9km{margin:0 0 4px;word-break:break-all}")}function U0(t,e,n){const i=t.slice();i[18]=e[n].sha,i[19]=e[n].slug,i[20]=e[n].locales,i[21]=e[n].collectionName,i[22]=e[n].fileName;const r=Mi(i[21]);i[23]=r;const s=i[22]?i[23]._fileMap?.[i[22]]:void 0;i[24]=s;const l=(i[24]??i[23])._i18n;i[25]=l.defaultLocale;const o=i[25]in i[20]?i[25]:Object.keys(i[20])[0];i[26]=o;const a=i[20][i[26]];return i[27]=a.content,i}function q0(t){let e,n,i;return n=new _s({props:{kind:t[3],asset:t[0],variant:"tile",checkerboard:t[3]==="image",controls:t[3]==="audio"||t[3]==="video"}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","preview svelte-qwt9km")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s&8&&(l.kind=r[3]),s&1&&(l.asset=r[0]),s&8&&(l.checkerboard=r[3]==="image"),s&8&&(l.controls=r[3]==="audio"||r[3]==="video"),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function H0(t){let e,n,i=t[14]("dimensions")+"",r,s,l,o=t[5]?`${t[5].width}×${t[5].height}`:"–",a;return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("p"),a=G(o),C(n,"class","svelte-qwt9km"),C(l,"class","svelte-qwt9km"),C(e,"class","svelte-qwt9km")},m(u,c){A(u,e,c),$(e,n),$(n,r),$(e,s),$(e,l),$(l,a)},p(u,c){c&16384&&i!==(i=u[14]("dimensions")+"")&&X(r,i),c&32&&o!==(o=u[5]?`${u[5].width}×${u[5].height}`:"–")&&X(a,o)},d(u){u&&T(e)}}}function x0(t){let e,n,i=t[14]("duration")+"",r,s,l,o=(t[6]?m0(t[6]):"–")+"",a;return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("p"),a=G(o),C(n,"class","svelte-qwt9km"),C(l,"class","svelte-qwt9km"),C(e,"class","svelte-qwt9km")},m(u,c){A(u,e,c),$(e,n),$(n,r),$(e,s),$(e,l),$(l,a)},p(u,c){c&16384&&i!==(i=u[14]("duration")+"")&&X(r,i),c&64&&o!==(o=(u[6]?m0(u[6]):"–")+"")&&X(a,o)},d(u){u&&T(e)}}}function lB(t){let e;return{c(){e=G("–")},m(n,i){A(n,e,i)},p:H,d(n){n&&T(e)}}}function oB(t){let e,n;return{c(){e=F("a"),n=G(t[4]),C(e,"href",t[4])},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&16&&X(n,i[4]),r&16&&C(e,"href",i[4])},d(i){i&&T(e)}}}function aB(t){let e,n;return{c(){e=G("/"),n=G(t[2])},m(i,r){A(i,e,r),A(i,n,r)},p(i,r){r&4&&X(n,i[2])},d(i){i&&(T(e),T(n))}}}function uB(t){let e,n,i;return{c(){e=F("a"),n=G("/"),i=G(t[2]),C(e,"href",t[10])},m(r,s){A(r,e,s),$(e,n),$(e,i)},p(r,s){s&4&&X(i,r[2]),s&1024&&C(e,"href",r[10])},d(r){r&&T(e)}}}function V0(t){let e,n,i=t[14]("sort_keys.commit_author")+"",r,s,l,o=(t[12].name||t[12].login||t[12].email)+"",a;return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("p"),a=G(o),C(n,"class","svelte-qwt9km"),C(l,"class","svelte-qwt9km"),C(e,"class","svelte-qwt9km")},m(u,c){A(u,e,c),$(e,n),$(n,r),$(e,s),$(e,l),$(l,a)},p(u,c){c&16384&&i!==(i=u[14]("sort_keys.commit_author")+"")&&X(r,i),c&4096&&o!==(o=(u[12].name||u[12].login||u[12].email)+"")&&X(a,o)},d(u){u&&T(e)}}}function W0(t){let e,n,i=t[14]("sort_keys.commit_date")+"",r,s,l,o=t[11].toLocaleString(t[15]??void 0)+"",a;return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("p"),a=G(o),C(n,"class","svelte-qwt9km"),C(l,"class","svelte-qwt9km"),C(e,"class","svelte-qwt9km")},m(u,c){A(u,e,c),$(e,n),$(n,r),$(e,s),$(e,l),$(l,a)},p(u,c){c&16384&&i!==(i=u[14]("sort_keys.commit_date")+"")&&X(r,i),c&34816&&o!==(o=u[11].toLocaleString(u[15]??void 0)+"")&&X(a,o)},d(u){u&&T(e)}}}function Y0(t){let e,n=t[14]("sort_keys.none")+"",i;return{c(){e=F("p"),i=G(n),C(e,"class","svelte-qwt9km")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&16384&&n!==(n=r[14]("sort_keys.none")+"")&&X(i,n)},d(r){r&&T(e)}}}function cB(t){let e=(t[27][t[23].identifier_field??""]||t[27].title||t[27].name||t[27].label)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&128&&e!==(e=(i[27][i[23].identifier_field??""]||i[27].title||i[27].name||i[27].label)+"")&&X(n,e)},d(i){i&&T(n)}}}function fB(t){let e=(t[24].label||t[24].name)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&128&&e!==(e=(i[24].label||i[24].name)+"")&&X(n,e)},d(i){i&&T(n)}}}function dB(t){let e,n=(t[23].label||t[23].name)+"",i,r;function s(a,u){if(a[24])return fB;if(a[27])return cB}let l=s(t),o=l&&l(t);return{c(){e=F("span"),i=G(n),r=G(` »
|
|
625
|
+
`),o&&o.c(),C(e,"role","none")},m(a,u){A(a,e,u),$(e,i),$(e,r),o&&o.m(e,null)},p(a,u){u&128&&n!==(n=(a[23].label||a[23].name)+"")&&X(i,n),l===(l=s(a))&&o?o.p(a,u):(o&&o.d(1),o=l&&l(a),o&&(o.c(),o.m(e,null)))},d(a){a&&T(e),o&&o.d()}}}function G0(t,e){let n,i,r,s;function l(){return e[16](e[21],e[22],e[19])}return i=new et({props:{role:"link",variant:"link",$$slots:{default:[dB]},$$scope:{ctx:e}}}),i.$on("click",l),{key:t,first:null,c(){n=F("p"),O(i.$$.fragment),r=j(),C(n,"class","svelte-qwt9km"),this.first=n},m(o,a){A(o,n,a),N(i,n,null),$(n,r),s=!0},p(o,a){e=o;const u={};a&1073741952&&(u.$$scope={dirty:a,ctx:e}),i.$set(u)},i(o){s||(_(i.$$.fragment,o),s=!0)},o(o){y(i.$$.fragment,o),s=!1},d(o){o&&T(n),L(i)}}}function hB(t){let e,n,i,r,s=t[14]("kind")+"",l,o,a,u=t[14](`file_type_labels.${t[9]}`,{default:qs.getType(t[2])??t[9].toUpperCase()})+"",c,f,d,h,m=t[14]("size")+"",p,g,v,b=(t[15]?to(t[13]):"")+"",w,k,S,E=["audio","video"].includes(t[3]),P,M,I,D=t[14]("public_url")+"",z,R,U,W,ee,K,ve=t[14]("file_path")+"",me,se,q,J,Le,_e,Be,Ke,de=t[14]("used_in")+"",ge,pe,We=[],ot=new Map,oe,Ne=t[1]&&t[8]&&q0(t),Qe=t[8]&&H0(t),rt=E&&x0(t);function pt(qe,ct){return qe[4]?oB:lB}let Jt=pt(t),Ot=Jt(t);function st(qe,ct){return qe[10]?uB:aB}let mn=st(t),lt=mn(t),Me=t[12]&&V0(t),Oe=t[11]&&W0(t),ut=be(t[7]);const Xt=qe=>qe[18];for(let qe=0;qe<ut.length;qe+=1){let ct=U0(t,ut,qe),bi=Xt(ct);ot.set(bi,We[qe]=G0(bi,ct))}let Rt=null;return ut.length||(Rt=Y0(t)),{c(){e=F("div"),Ne&&Ne.c(),n=j(),i=F("section"),r=F("h4"),l=G(s),o=j(),a=F("p"),c=G(u),f=j(),d=F("section"),h=F("h4"),p=G(m),g=j(),v=F("p"),w=G(b),k=j(),Qe&&Qe.c(),S=j(),rt&&rt.c(),P=j(),M=F("section"),I=F("h4"),z=G(D),R=j(),U=F("p"),Ot.c(),W=j(),ee=F("section"),K=F("h4"),me=G(ve),se=j(),q=F("p"),lt.c(),J=j(),Me&&Me.c(),Le=j(),Oe&&Oe.c(),_e=j(),Be=F("section"),Ke=F("h4"),ge=G(de),pe=j();for(let qe=0;qe<We.length;qe+=1)We[qe].c();Rt&&Rt.c(),C(r,"class","svelte-qwt9km"),C(a,"class","svelte-qwt9km"),C(i,"class","svelte-qwt9km"),C(h,"class","svelte-qwt9km"),C(v,"class","svelte-qwt9km"),C(d,"class","svelte-qwt9km"),C(I,"class","svelte-qwt9km"),C(U,"class","svelte-qwt9km"),C(M,"class","svelte-qwt9km"),C(K,"class","svelte-qwt9km"),C(q,"class","svelte-qwt9km"),C(ee,"class","svelte-qwt9km"),C(Ke,"class","svelte-qwt9km"),C(Be,"class","svelte-qwt9km"),C(e,"role","none"),C(e,"class","detail svelte-qwt9km")},m(qe,ct){A(qe,e,ct),Ne&&Ne.m(e,null),$(e,n),$(e,i),$(i,r),$(r,l),$(i,o),$(i,a),$(a,c),$(e,f),$(e,d),$(d,h),$(h,p),$(d,g),$(d,v),$(v,w),$(e,k),Qe&&Qe.m(e,null),$(e,S),rt&&rt.m(e,null),$(e,P),$(e,M),$(M,I),$(I,z),$(M,R),$(M,U),Ot.m(U,null),$(e,W),$(e,ee),$(ee,K),$(K,me),$(ee,se),$(ee,q),lt.m(q,null),$(e,J),Me&&Me.m(e,null),$(e,Le),Oe&&Oe.m(e,null),$(e,_e),$(e,Be),$(Be,Ke),$(Ke,ge),$(Be,pe);for(let bi=0;bi<We.length;bi+=1)We[bi]&&We[bi].m(Be,null);Rt&&Rt.m(Be,null),oe=!0},p(qe,[ct]){qe[1]&&qe[8]?Ne?(Ne.p(qe,ct),ct&258&&_(Ne,1)):(Ne=q0(qe),Ne.c(),_(Ne,1),Ne.m(e,n)):Ne&&(x(),y(Ne,1,1,()=>{Ne=null}),V()),(!oe||ct&16384)&&s!==(s=qe[14]("kind")+"")&&X(l,s),(!oe||ct&16900)&&u!==(u=qe[14](`file_type_labels.${qe[9]}`,{default:qs.getType(qe[2])??qe[9].toUpperCase()})+"")&&X(c,u),(!oe||ct&16384)&&m!==(m=qe[14]("size")+"")&&X(p,m),(!oe||ct&40960)&&b!==(b=(qe[15]?to(qe[13]):"")+"")&&X(w,b),qe[8]?Qe?Qe.p(qe,ct):(Qe=H0(qe),Qe.c(),Qe.m(e,S)):Qe&&(Qe.d(1),Qe=null),ct&8&&(E=["audio","video"].includes(qe[3])),E?rt?rt.p(qe,ct):(rt=x0(qe),rt.c(),rt.m(e,P)):rt&&(rt.d(1),rt=null),(!oe||ct&16384)&&D!==(D=qe[14]("public_url")+"")&&X(z,D),Jt===(Jt=pt(qe))&&Ot?Ot.p(qe,ct):(Ot.d(1),Ot=Jt(qe),Ot&&(Ot.c(),Ot.m(U,null))),(!oe||ct&16384)&&ve!==(ve=qe[14]("file_path")+"")&&X(me,ve),mn===(mn=st(qe))&<?lt.p(qe,ct):(lt.d(1),lt=mn(qe),lt&&(lt.c(),lt.m(q,null))),qe[12]?Me?Me.p(qe,ct):(Me=V0(qe),Me.c(),Me.m(e,Le)):Me&&(Me.d(1),Me=null),qe[11]?Oe?Oe.p(qe,ct):(Oe=W0(qe),Oe.c(),Oe.m(e,_e)):Oe&&(Oe.d(1),Oe=null),(!oe||ct&16384)&&de!==(de=qe[14]("used_in")+"")&&X(ge,de),ct&16512&&(ut=be(qe[7]),x(),We=bt(We,ct,Xt,1,qe,ut,ot,Be,_t,G0,null,U0),V(),!ut.length&&Rt?Rt.p(qe,ct):ut.length?Rt&&(Rt.d(1),Rt=null):(Rt=Y0(qe),Rt.c(),Rt.m(Be,null)))},i(qe){if(!oe){_(Ne);for(let ct=0;ct<ut.length;ct+=1)_(We[ct]);oe=!0}},o(qe){y(Ne);for(let ct=0;ct<We.length;ct+=1)y(We[ct]);oe=!1},d(qe){qe&&T(e),Ne&&Ne.d(),Qe&&Qe.d(),rt&&rt.d(),Ot.d(),lt.d(),Me&&Me.d(),Oe&&Oe.d();for(let ct=0;ct<We.length;ct+=1)We[ct].d();Rt&&Rt.d()}}}function pB(t,e,n){let i,r,s,l,o,a,u,c,f,d;B(t,ue,S=>n(14,f=S)),B(t,un,S=>n(15,d=S));let{asset:h}=e,{showPreview:m=!1}=e,p,g,v,b=[];const w=async()=>{n(4,{publicURL:p,dimensions:g,duration:v,usedEntries:b}=await I3(h),p,n(5,g),n(6,v),n(7,b))},k=(S,E,P)=>{pn(`/collections/${S}/entries/${E||P}`)};return t.$$set=S=>{"asset"in S&&n(0,h=S.asset),"showPreview"in S&&n(1,m=S.showPreview)},t.$$.update=()=>{t.$$.dirty&1&&n(2,{path:i,size:r,kind:s,commitAuthor:l,commitDate:o,repoFileURL:a}=h,i,(n(13,r),n(0,h)),(n(3,s),n(0,h)),(n(12,l),n(0,h)),(n(11,o),n(0,h)),(n(10,a),n(0,h))),t.$$.dirty&4&&n(9,[,u=""]=i.match(/\.([^.]+)$/)??[],u),t.$$.dirty&12&&n(8,c=["image","audio","video"].includes(s)||i.endsWith(".pdf")),t.$$.dirty&1&&w()},[h,m,i,s,p,g,v,b,c,u,a,o,l,r,f,d,k]}class QE extends ie{constructor(e){super(),ne(this,e,pB,hB,te,{asset:0,showPreview:1},sB)}}function mB(t){ye(t,"svelte-17yv21",".empty.svelte-17yv21{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center}")}function gB(t){let e,n;const i=t[1].default,r=ke(i,t,t[0],null);return{c(){e=F("div"),r&&r.c(),C(e,"role","none"),C(e,"class","empty svelte-17yv21")},m(s,l){A(s,e,l),r&&r.m(e,null),n=!0},p(s,[l]){r&&r.p&&(!n||l&1)&&Ee(r,i,s,s[0],n?Se(i,s[0],l,null):Te(s[0]),null)},i(s){n||(_(r,s),n=!0)},o(s){y(r,s),n=!1},d(s){s&&T(e),r&&r.d(s)}}}function _B(t,e,n){let{$$slots:i={},$$scope:r}=e;return t.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class qn extends ie{constructor(e){super(),ne(this,e,_B,gB,te,{},mB)}}function bB(t){ye(t,"svelte-1a08lir",".wrapper.svelte-1a08lir.svelte-1a08lir{position:fixed;inset:0;display:flex;flex-direction:column;background-color:var(--sui-primary-background-color)}.wrapper.svelte-1a08lir .row.svelte-1a08lir{flex:auto;display:flex;overflow:hidden}.wrapper.svelte-1a08lir .row .preview.svelte-1a08lir{flex:auto;overflow:hidden;border-right:1px solid var(--sui-primary-border-color)}.wrapper.svelte-1a08lir .row .preview iframe.svelte-1a08lir,.wrapper.svelte-1a08lir .row .preview pre.svelte-1a08lir{display:block;width:100%;height:100%}.wrapper.svelte-1a08lir .row .preview pre.svelte-1a08lir{margin:0;padding:16px;overflow:auto}")}function vB(t){let e,n;return e=new qn({props:{$$slots:{default:[SB]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&576&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function yB(t){let e,n,i={ctx:t,current:null,token:null,hasCatch:!1,pending:AB,then:TB,catch:EB,value:8};return Ci(n=t[0]?.text??t[2]?.text(),i),{c(){e=Q(),i.block.c()},m(r,s){A(r,e,s),i.block.m(r,i.anchor=s),i.mount=()=>e.parentNode,i.anchor=e},p(r,s){t=r,i.ctx=t,s&5&&n!==(n=t[0]?.text??t[2]?.text())&&Ci(n,i)||so(i,t,s)},i:H,o:H,d(r){r&&T(e),i.block.d(r),i.token=null,i=null}}}function wB(t){let e,n;return{c(){e=F("iframe"),Xn(e.src,n=t[4])||C(e,"src",n),C(e,"title",t[3]),C(e,"class","svelte-1a08lir")},m(i,r){A(i,e,r)},p(i,r){r&16&&!Xn(e.src,n=i[4])&&C(e,"src",n),r&8&&C(e,"title",i[3])},i:H,o:H,d(i){i&&T(e)}}}function kB(t){let e,n;return e=new _s({props:{kind:t[5],asset:t[0],blurBackground:t[5]==="image"||t[5]==="video",checkerboard:t[5]==="image",alt:t[5]==="image"?t[3]:void 0,controls:t[5]==="audio"||t[5]==="video"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s.kind=i[5]),r&1&&(s.asset=i[0]),r&32&&(s.blurBackground=i[5]==="image"||i[5]==="video"),r&32&&(s.checkerboard=i[5]==="image"),r&40&&(s.alt=i[5]==="image"?i[3]:void 0),r&32&&(s.controls=i[5]==="audio"||i[5]==="video"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function SB(t){let e,n=t[6]("preview_unavailable")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&64&&n!==(n=r[6]("preview_unavailable")+"")&&X(i,n)},d(r){r&&T(e)}}}function EB(t){return{c:H,m:H,p:H,d:H}}function TB(t){let e,n=t[8]+"",i;return{c(){e=F("pre"),i=G(n),C(e,"role","figure"),C(e,"class","svelte-1a08lir")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&5&&n!==(n=r[8]+"")&&X(i,n)},d(r){r&&T(e)}}}function AB(t){return{c:H,m:H,p:H,d:H}}function K0(t){let e,n;return e=new QE({props:{asset:t[0]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.asset=i[0]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function CB(t){let e,n,i,r,s,l,o,a,u,c,f;n=new Wj({});const d=[kB,wB,yB,vB],h=[];function m(g,v){return v&32&&(l=null),v&4&&(o=null),l==null&&(l=!!["image","audio","video"].includes(g[5])),l?0:g[2]?.type==="application/pdf"?1:(o==null&&(o=!!(g[2]?.type&&pa(g[2]?.type))),o?2:3)}a=m(t,-1),u=h[a]=d[a](t);let p=t[0]&&K0(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),r=F("div"),s=F("div"),u.c(),c=j(),p&&p.c(),C(s,"role","none"),C(s,"class","preview svelte-1a08lir"),C(r,"role","none"),C(r,"class","row svelte-1a08lir"),C(e,"role","none"),C(e,"class","wrapper svelte-1a08lir")},m(g,v){A(g,e,v),N(n,e,null),$(e,i),$(e,r),$(r,s),h[a].m(s,null),$(r,c),p&&p.m(r,null),t[7](e),f=!0},p(g,v){let b=a;a=m(g,v),a===b?h[a].p(g,v):(x(),y(h[b],1,1,()=>{h[b]=null}),V(),u=h[a],u?u.p(g,v):(u=h[a]=d[a](g),u.c()),_(u,1),u.m(s,null)),g[0]?p?(p.p(g,v),v&1&&_(p,1)):(p=K0(g),p.c(),_(p,1),p.m(r,null)):p&&(x(),y(p,1,1,()=>{p=null}),V())},i(g){f||(_(n.$$.fragment,g),_(u),_(p),f=!0)},o(g){y(n.$$.fragment,g),y(u),y(p),f=!1},d(g){g&&T(e),L(n),h[a].d(),p&&p.d(),t[7](null)}}}function NB(t){let e,n;return e=new Tn({props:{"aria-label":t[6]("asset_editor"),$$slots:{default:[CB]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&64&&(s["aria-label"]=i[6]("asset_editor")),r&639&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function LB(t,e,n){let i,r,s,l,o;B(t,Or,f=>n(0,l=f)),B(t,ue,f=>n(6,o=f));let a,u;Ut(()=>{const f=a.closest('[role="group"]');return f.tabIndex=0,f.focus(),()=>{ze(Or,l=void 0,l)}});function c(f){ae[f?"unshift":"push"](()=>{a=f,n(1,a)})}return t.$$.update=()=>{t.$$.dirty&1&&n(5,{kind:i,blobURL:r,name:s}=l||{},i,(n(4,r),n(0,l)),(n(3,s),n(0,l))),t.$$.dirty&1&&(async()=>l&&n(2,u=await wo(l)))()},[l,a,u,s,r,i,o,c]}class OB extends ie{constructor(e){super(),ne(this,e,LB,NB,te,{},bB)}}function PB(t){ye(t,"svelte-1wzrlmj",".wrapper.svelte-1wzrlmj{display:contents}.wrapper.svelte-1wzrlmj textarea{min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical}.wrapper.wrap.svelte-1wzrlmj textarea{text-wrap:wrap}")}function Z0(t){let e,n;return e=new Br({props:{size:"x-large",title:t[4]("edit_x",{values:{name:t[0].name}}),open:!0,okLabel:t[4]("save"),okDisabled:t[2]===t[1],$$slots:{"footer-extra":[DB],default:[IB]},$$scope:{ctx:t}}}),e.$on("ok",t[11]),e.$on("close",t[12]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&17&&(s.title=i[4]("edit_x",{values:{name:i[0].name}})),r&16&&(s.okLabel=i[4]("save")),r&6&&(s.okDisabled=i[2]===i[1]),r&16412&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function IB(t){let e,n,i,r;function s(o){t[10](o)}let l={flex:!0};return t[2]!==void 0&&(l.value=t[2]),n=new gf({props:l}),ae.push(()=>Re(n,"value",s)),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-1wzrlmj"),re(e,"wrap",t[3])},m(o,a){A(o,e,a),N(n,e,null),r=!0},p(o,a){const u={};!i&&a&4&&(i=!0,u.value=o[2],$e(()=>i=!1)),n.$set(u),(!r||a&8)&&re(e,"wrap",o[3])},i(o){r||(_(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&T(e),L(n)}}}function DB(t){let e,n,i;function r(l){t[9](l)}let s={label:t[4]("wrap_long_lines")};return t[3]!==void 0&&(s.checked=t[3]),e=new Zc({props:s}),ae.push(()=>Re(e,"checked",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&16&&(a.label=l[4]("wrap_long_lines")),!n&&o&8&&(n=!0,a.checked=l[3],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function MB(t){let e,n,i=t[0]&&Z0(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&_(i,1)):(i=Z0(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function RB(t,e,n){let i,r,s;B(t,Nc,v=>n(8,r=v)),B(t,ue,v=>n(4,s=v));let l,o,a,u=!1;const c=async()=>{n(7,l=await wo(i)),n(1,o=await l.text()),n(2,a=o)},f=()=>{ze(Nc,r=void 0,r),n(7,l=void 0),n(1,o=void 0),n(2,a=void 0)},d=async()=>{i&&l&&typeof a=="string"&&await GE({folder:i.folder,files:[new File([a],i.name,{type:l.type})],originalAsset:i},{commitType:"uploadMedia"})};function h(v){u=v,n(3,u)}function m(v){a=v,n(2,a)}const p=()=>{d()},g=()=>{f()};return t.$$.update=()=>{t.$$.dirty&256&&n(0,i=r),t.$$.dirty&129&&i&&l===void 0&&c()},[i,o,a,u,s,f,d,l,r,h,m,p,g]}class $B extends ie{constructor(e){super(),ne(this,e,RB,MB,te,{},PB)}}function FB(t){let e,n;return e=new I2({props:{role:"none",tabindex:"-1",checked:t[6].includes(t[0])}}),e.$on("change",t[8]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&65&&(s.checked=i[6].includes(i[0])),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function zB(t){let e,n;return e=new _s({props:{kind:t[2],asset:t[0],variant:t[1]==="list"?"icon":"tile",checkerboard:t[2]==="image"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.kind=i[2]),r&1&&(s.asset=i[0]),r&2&&(s.variant=i[1]==="list"?"icon":"tile"),r&4&&(s.checkerboard=i[2]==="image"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function jB(t){let e,n;return{c(){e=F("span"),n=G(t[3]),C(e,"role","none")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&8&&X(n,i[3])},d(i){i&&T(e)}}}function BB(t){let e,n,i,r,s,l;return e=new fi({props:{class:"checkbox",$$slots:{default:[FB]},$$scope:{ctx:t}}}),i=new fi({props:{class:"image",$$slots:{default:[zB]},$$scope:{ctx:t}}}),s=new fi({props:{class:"title",$$slots:{default:[jB]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment)},m(o,a){N(e,o,a),A(o,n,a),N(i,o,a),A(o,r,a),N(s,o,a),l=!0},p(o,a){const u={};a&4161&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&4103&&(c.$$scope={dirty:a,ctx:o}),i.$set(c);const f={};a&4104&&(f.$$scope={dirty:a,ctx:o}),s.$set(f)},i(o){l||(_(e.$$.fragment,o),_(i.$$.fragment,o),_(s.$$.fragment,o),l=!0)},o(o){y(e.$$.fragment,o),y(i.$$.fragment,o),y(s.$$.fragment,o),l=!1},d(o){o&&(T(n),T(r)),L(e,o),L(i,o),L(s,o)}}}function UB(t){let e,n;return e=new Da({props:{"aria-rowindex":t[4].indexOf(t[0]),$$slots:{default:[BB]},$$scope:{ctx:t}}}),e.$on("change",t[9]),e.$on("focus",t[10]),e.$on("dblclick",t[11]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&17&&(s["aria-rowindex"]=i[4].indexOf(i[0])),r&4175&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qB(t,e,n){let i,r,s,l,o;B(t,tl,p=>n(4,s=p)),B(t,Vs,p=>n(5,l=p)),B(t,Rs,p=>n(6,o=p));let{asset:a}=e,{viewType:u}=e;const c=p=>{Rs.update(g=>{const v=g.indexOf(a);return p&&v===-1&&g.push(a),!p&&v>-1&&g.splice(v,1),g})},f=({detail:{checked:p}})=>{c(p)},d=p=>{c(p.detail.selected)},h=()=>{ze(Vs,l=a,l)},m=()=>{l&&Qh(l)&&pn(`/assets/${l?.path}`)};return t.$$set=p=>{"asset"in p&&n(0,a=p.asset),"viewType"in p&&n(1,u=p.viewType)},t.$$.update=()=>{t.$$.dirty&1&&n(3,{name:i,kind:r}=a,i,(n(2,r),n(0,a)))},[a,u,r,i,s,l,o,c,f,d,h,m]}class HB extends ie{constructor(e){super(),ne(this,e,qB,UB,te,{asset:0,viewType:1})}}function xB(t){let e,n;const i=[{kind:"image"},{loading:t[0]},{asset:t[1]},{src:t[2]},{variant:t[3]},{blurBackground:t[4]},{cover:t[5]},{checkerboard:t[6]},{alt:t[7]},t[8]];let r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new _s({props:r}),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,[l]){const o=l&511?Ge(i,[i[0],l&1&&{loading:s[0]},l&2&&{asset:s[1]},l&4&&{src:s[2]},l&8&&{variant:s[3]},l&16&&{blurBackground:s[4]},l&32&&{cover:s[5]},l&64&&{checkerboard:s[6]},l&128&&{alt:s[7]},l&256&&qt(s[8])]):{};e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function VB(t,e,n){const i=["loading","asset","src","variant","blurBackground","cover","checkerboard","alt"];let r=he(e,i),{loading:s="lazy"}=e,{asset:l=void 0}=e,{src:o=void 0}=e,{variant:a=void 0}=e,{blurBackground:u=!1}=e,{cover:c=!1}=e,{checkerboard:f=!1}=e,{alt:d=""}=e;return t.$$set=h=>{e=Z(Z({},e),tt(h)),n(8,r=he(e,i)),"loading"in h&&n(0,s=h.loading),"asset"in h&&n(1,l=h.asset),"src"in h&&n(2,o=h.src),"variant"in h&&n(3,a=h.variant),"blurBackground"in h&&n(4,u=h.blurBackground),"cover"in h&&n(5,c=h.cover),"checkerboard"in h&&n(6,f=h.checkerboard),"alt"in h&&n(7,d=h.alt)},[s,l,o,a,u,c,f,d,r]}let su=class extends ie{constructor(e){super(),ne(this,e,VB,xB,te,{loading:0,asset:1,src:2,variant:3,blurBackground:4,cover:5,checkerboard:6,alt:7})}};function WB(t){ye(t,"svelte-zswg2f",".files.svelte-zswg2f.svelte-zswg2f{display:flex;flex-direction:column;gap:16px;padding:16px 0 0}.file.svelte-zswg2f.svelte-zswg2f{display:flex;align-items:center;gap:16px}.file.svelte-zswg2f .image.svelte-zswg2f{display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color)}.file.svelte-zswg2f .meta.svelte-zswg2f{flex:auto;display:flex;flex-direction:column;gap:4px}.file.svelte-zswg2f .meta .size.svelte-zswg2f{font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color)}")}function J0(t,e,n){const i=t.slice();i[4]=e[n],i[10]=n;const r=i[4];i[5]=r.name,i[6]=r.type,i[7]=r.size;const s=i[5].match(/\.([^.]+)$/)??[];return i[8]=s[1]!==void 0?s[1]:"",i}function YB(t){let e,n,i;return n=new xe({props:{name:"draft"}}),{c(){e=F("span"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","image svelte-zswg2f")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p:H,i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function GB(t){let e,n;return e=new su({props:{src:URL.createObjectURL(t[4]),variant:"icon",checkerboard:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.src=URL.createObjectURL(i[4])),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function KB(t){let e,n;return e=new xe({props:{name:"close"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function X0(t){let e,n,i,r,s,l,o,a=t[5]+"",u,c,f,d=(t[1]?to(t[7]):"")+"",h,m,p=t[2](`file_type_labels.${t[8]}`,{default:t[8].toUpperCase()})+"",g,v,b,w,k;const S=[GB,YB],E=[];function P(I,D){return D&1&&(n=null),n==null&&(n=!!I[6].startsWith("image/")),n?0:1}i=P(t,-1),r=E[i]=S[i](t);function M(...I){return t[3](t[10],...I)}return b=new et({props:{variant:"ghost",iconic:!0,"aria-label":t[2]("remove"),hidden:t[0].length===1,$$slots:{default:[KB]},$$scope:{ctx:t}}}),b.$on("click",M),{c(){e=F("div"),r.c(),s=j(),l=F("div"),o=F("div"),u=G(a),c=j(),f=F("div"),h=G(d),m=G(`
|
|
626
|
+
·
|
|
627
|
+
`),g=G(p),v=j(),O(b.$$.fragment),w=j(),C(o,"role","none"),C(o,"class","name"),C(f,"role","none"),C(f,"class","size svelte-zswg2f"),C(l,"role","none"),C(l,"class","meta svelte-zswg2f"),C(e,"role","none"),C(e,"class","file svelte-zswg2f")},m(I,D){A(I,e,D),E[i].m(e,null),$(e,s),$(e,l),$(l,o),$(o,u),$(l,c),$(l,f),$(f,h),$(f,m),$(f,g),$(e,v),N(b,e,null),$(e,w),k=!0},p(I,D){t=I;let z=i;i=P(t,D),i===z?E[i].p(t,D):(x(),y(E[z],1,1,()=>{E[z]=null}),V(),r=E[i],r?r.p(t,D):(r=E[i]=S[i](t),r.c()),_(r,1),r.m(e,s)),(!k||D&1)&&a!==(a=t[5]+"")&&X(u,a),(!k||D&3)&&d!==(d=(t[1]?to(t[7]):"")+"")&&X(h,d),(!k||D&5)&&p!==(p=t[2](`file_type_labels.${t[8]}`,{default:t[8].toUpperCase()})+"")&&X(g,p);const R={};D&4&&(R["aria-label"]=t[2]("remove")),D&1&&(R.hidden=t[0].length===1),D&2048&&(R.$$scope={dirty:D,ctx:t}),b.$set(R)},i(I){k||(_(r),_(b.$$.fragment,I),k=!0)},o(I){y(r),y(b.$$.fragment,I),k=!1},d(I){I&&T(e),E[i].d(),L(b)}}}function ZB(t){let e,n,i=be(t[0]),r=[];for(let l=0;l<i.length;l+=1)r[l]=X0(J0(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){e=F("div");for(let l=0;l<r.length;l+=1)r[l].c();C(e,"role","none"),C(e,"class","files svelte-zswg2f")},m(l,o){A(l,e,o);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(e,null);n=!0},p(l,[o]){if(o&7){i=be(l[0]);let a;for(a=0;a<i.length;a+=1){const u=J0(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=X0(u),r[a].c(),_(r[a],1),r[a].m(e,null))}for(x(),a=i.length;a<r.length;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<i.length;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function JB(t,e,n){let i,r;B(t,un,o=>n(1,i=o)),B(t,ue,o=>n(2,r=o));let{files:s=[]}=e;const l=(o,a)=>{a.stopPropagation(),s.splice(o,1),n(0,s)};return t.$$set=o=>{"files"in o&&n(0,s=o.files)},[s,i,r,l]}class eT extends ie{constructor(e){super(),ne(this,e,JB,ZB,te,{files:0},WB)}}function XB(t){let e,n,i;return{c(){e=F("input"),C(e,"type","file"),e.hidden=!0,C(e,"accept",t[0]),e.multiple=t[1]},m(r,s){A(r,e,s),t[6](e),n||(i=[Fe(e,"change",t[7]),Fe(e,"cancel",Jk(t[5]))],n=!0)},p(r,[s]){s&1&&C(e,"accept",r[0]),s&2&&(e.multiple=r[1])},i:H,o:H,d(r){r&&T(e),t[6](null),n=!1,Gt(i)}}}function QB(t,e,n){const i=sn();let r,{accept:s=void 0}=e,{multiple:l=!1}=e;const o=()=>{r?.click()};function a(f){fe.call(this,t,f)}function u(f){ae[f?"unshift":"push"](()=>{r=f,n(2,r)})}const c=({target:f})=>{const d=[...f.files];i("select",{files:d,file:d[0]})};return t.$$set=f=>{"accept"in f&&n(0,s=f.accept),"multiple"in f&&n(1,l=f.multiple)},[s,l,r,i,o,a,u,c]}class tT extends ie{constructor(e){super(),ne(this,e,QB,XB,te,{accept:0,multiple:1,open:4})}get open(){return this.$$.ctx[4]}}function eU(t){ye(t,"svelte-93a15v",".drop-target.svelte-93a15v.svelte-93a15v{display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto}.drop-target.svelte-93a15v>.group{overflow-y:auto;padding:16px;width:100%;height:100%}.drop-target.svelte-93a15v>.svelte-93a15v{pointer-events:none}.drop-target.svelte-93a15v button{pointer-events:auto}.drop-indicator.svelte-93a15v.svelte-93a15v{position:absolute;inset:0;z-index:10;background-color:hsl(var(--sui-background-color-4-hsl)/80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none}.drop-indicator.svelte-93a15v div.svelte-93a15v{position:absolute;inset:32px;display:flex;justify-content:center;align-items:center;font-size:var(--sui-font-size-xxx-large);border-width:8px;border-style:dashed;border-color:var(--sui-primary-accent-color-inverted);border-radius:8px}.content.svelte-93a15v.svelte-93a15v{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center}")}function tU(t){let e;const n=t[13].default,i=ke(n,t,t[22],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&4194304)&&Ee(i,n,r,r[22],e?Se(n,r[22],s,null):Te(r[22]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function nU(t){let e,n,i,r=t[3]&&Q0(t),s=t[4]&&t[6].length&&tv(t);return{c(){e=F("div"),r&&r.c(),n=j(),s&&s.c(),C(e,"role","none"),C(e,"class","content svelte-93a15v")},m(l,o){A(l,e,o),r&&r.m(e,null),$(e,n),s&&s.m(e,null),i=!0},p(l,o){l[3]?r?(r.p(l,o),o&8&&_(r,1)):(r=Q0(l),r.c(),_(r,1),r.m(e,n)):r&&(x(),y(r,1,1,()=>{r=null}),V()),l[4]&&l[6].length?s?(s.p(l,o),o&80&&_(s,1)):(s=tv(l),s.c(),_(s,1),s.m(e,null)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){i||(_(r),_(s),i=!0)},o(l){y(r),y(s),i=!1},d(l){l&&T(e),r&&r.d(),s&&s.d()}}}function Q0(t){let e,n=t[10](t[2]?"drop_files_or_browse":"drop_file_or_browse")+"",i,r,s,l,o,a,u;l=new et({props:{variant:"primary",label:t[10](t[2]?"choose_files":"choose_file"),disabled:t[1],$$slots:{"start-icon":[iU]},$$scope:{ctx:t}}}),l.$on("click",t[14]);let c=t[8]&&ev(t);return{c(){e=F("div"),i=G(n),r=j(),s=F("div"),O(l.$$.fragment),o=j(),c&&c.c(),a=Q(),C(e,"role","none"),C(s,"role","none")},m(f,d){A(f,e,d),$(e,i),A(f,r,d),A(f,s,d),N(l,s,null),A(f,o,d),c&&c.m(f,d),A(f,a,d),u=!0},p(f,d){(!u||d&1028)&&n!==(n=f[10](f[2]?"drop_files_or_browse":"drop_file_or_browse")+"")&&X(i,n);const h={};d&1028&&(h.label=f[10](f[2]?"choose_files":"choose_file")),d&2&&(h.disabled=f[1]),d&4194304&&(h.$$scope={dirty:d,ctx:f}),l.$set(h),f[8]?c?c.p(f,d):(c=ev(f),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},i(f){u||(_(l.$$.fragment,f),u=!0)},o(f){y(l.$$.fragment,f),u=!1},d(f){f&&(T(e),T(r),T(s),T(o),T(a)),L(l),c&&c.d(f)}}}function iU(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ev(t){let e,n=t[10]("drop_files_type_mismatch",{values:{type:t[0]}})+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1025&&n!==(n=r[10]("drop_files_type_mismatch",{values:{type:r[0]}})+"")&&X(i,n)},d(r){r&&T(e)}}}function tv(t){let e,n,i;function r(l){t[15](l)}let s={};return t[6]!==void 0&&(s.files=t[6]),e=new eT({props:s}),ae.push(()=>Re(e,"files",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};!n&&o&64&&(n=!0,a.files=l[6],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function nv(t){let e,n,i=t[10]("drop_files_here")+"",r;return{c(){e=F("div"),n=F("div"),r=G(i),C(n,"role","none"),C(n,"class","svelte-93a15v"),C(e,"role","none"),C(e,"class","drop-indicator svelte-93a15v")},m(s,l){A(s,e,l),$(e,n),$(n,r)},p(s,l){l&1024&&i!==(i=s[10]("drop_files_here")+"")&&X(r,i)},d(s){s&&T(e)}}}function rU(t){let e,n,i,r,s,l,o,a,u;const c=[nU,tU],f=[];function d(p,g){return p[3]||p[4]&&p[6].length?0:1}n=d(t),i=f[n]=c[n](t);let h=t[7]&&nv(t),m={accept:t[0],multiple:t[2]};return l=new tT({props:m}),t[20](l),l.$on("select",t[21]),{c(){e=F("div"),i.c(),r=j(),h&&h.c(),s=j(),O(l.$$.fragment),C(e,"role","none"),C(e,"class","drop-target svelte-93a15v")},m(p,g){A(p,e,g),f[n].m(e,null),$(e,r),h&&h.m(e,null),A(p,s,g),N(l,p,g),o=!0,a||(u=[Fe(e,"dragover",Kr(t[16])),Fe(e,"dragleave",Kr(t[17])),Fe(e,"dragend",Kr(t[18])),Fe(e,"drop",Kr(t[19]))],a=!0)},p(p,[g]){let v=n;n=d(p),n===v?f[n].p(p,g):(x(),y(f[v],1,1,()=>{f[v]=null}),V(),i=f[n],i?i.p(p,g):(i=f[n]=c[n](p),i.c()),_(i,1),i.m(e,r)),p[7]?h?h.p(p,g):(h=nv(p),h.c(),h.m(e,null)):h&&(h.d(1),h=null);const b={};g&1&&(b.accept=p[0]),g&4&&(b.multiple=p[2]),l.$set(b)},i(p){o||(_(i),_(l.$$.fragment,p),o=!0)},o(p){y(i),y(l.$$.fragment,p),o=!1},d(p){p&&(T(e),T(s)),f[n].d(),h&&h.d(),t[20](null),L(l,p),a=!1,Gt(u)}}}function sU(t,e,n){let i;B(t,ue,z=>n(10,i=z));let{$$slots:r={},$$scope:s}=e,{accept:l=void 0}=e,{disabled:o=!1}=e,{multiple:a=!1}=e,{showUploadButton:u=!1}=e,{showFilePreview:c=!1}=e;const f=sn();let d=!1,h=!1,m,p=[];const g=()=>{m.open()},v=()=>{n(6,p=[])},b=z=>{n(6,p=a?z:z.slice(0,1))},w=()=>{g()};function k(z){p=z,n(6,p)}const S=({dataTransfer:z})=>{o||(z.dropEffect="copy",n(7,d=!0),n(8,h=!1))},E=()=>{o||n(7,d=!1)},P=()=>{o||n(7,d=!1)},M=async({dataTransfer:z})=>{if(o||!z)return;n(7,d=!1);const R=await HD(z,{accept:l});R.length?b(R):n(8,h=!0)};function I(z){ae[z?"unshift":"push"](()=>{m=z,n(9,m)})}const D=({detail:z})=>{b(z.files)};return t.$$set=z=>{"accept"in z&&n(0,l=z.accept),"disabled"in z&&n(1,o=z.disabled),"multiple"in z&&n(2,a=z.multiple),"showUploadButton"in z&&n(3,u=z.showUploadButton),"showFilePreview"in z&&n(4,c=z.showFilePreview),"$$scope"in z&&n(22,s=z.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f("select",{files:p})},[l,o,a,u,c,g,p,d,h,m,i,b,v,r,w,k,S,E,P,M,I,D,s]}class lu extends ie{constructor(e){super(),ne(this,e,sU,rU,te,{accept:0,disabled:1,multiple:2,showUploadButton:3,showFilePreview:4,openFilePicker:5,reset:12},eU)}get openFilePicker(){return this.$$.ctx[5]}get reset(){return this.$$.ctx[12]}}function lU(t){ye(t,"svelte-rxnld6",".list-container.svelte-rxnld6{flex:auto;position:relative;height:100%;overflow:hidden}.list-container.svelte-rxnld6>.group{height:100%;overflow-y:auto;overscroll-behavior-y:contain}.list-container.svelte-rxnld6>.group :is(.grid-view, .list-view){display:block;padding:12px;height:100%;overflow-y:auto}")}function oU(t){let e;const n=t[1].default,i=ke(n,t,t[2],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&4)&&Ee(i,n,r,r[2],e?Se(n,r[2],s,null):Te(r[2]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function aU(t){let e,n,i;const r=[t[0]];let s={$$slots:{default:[oU]},$$scope:{ctx:t}};for(let l=0;l<r.length;l+=1)s=Z(s,r[l]);return n=new Tn({props:s}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","list-container svelte-rxnld6")},m(l,o){A(l,e,o),N(n,e,null),i=!0},p(l,[o]){const a=o&1?Ge(r,[qt(l[0])]):{};o&4&&(a.$$scope={dirty:o,ctx:l}),n.$set(a)},i(l){i||(_(n.$$.fragment,l),i=!0)},o(l){y(n.$$.fragment,l),i=!1},d(l){l&&T(e),L(n)}}}function uU(t,e,n){const i=[];let r=he(e,i),{$$slots:s={},$$scope:l}=e;return t.$$set=o=>{e=Z(Z({},e),tt(o)),n(0,r=he(e,i)),"$$scope"in o&&n(2,l=o.$$scope)},[r,s,l]}class pg extends ie{constructor(e){super(),ne(this,e,uU,aU,te,{},lU)}}function cU(t){ye(t,"svelte-139ftnd",'.grid-view.svelte-139ftnd .row-group-caption{display:block;grid-column:1/-1}.grid-view.svelte-139ftnd .row-group-caption th{display:block}.grid-view.svelte-139ftnd .row-group:not(:first-child){margin:16px 0 0}.grid-view.svelte-139ftnd .grid-body{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0}.grid-view.svelte-139ftnd [role="row"]{display:block;position:relative;overflow:hidden;padding:0;height:auto;text-align:left;cursor:pointer}.grid-view.svelte-139ftnd [role="row"]:focus{outline-color:transparent}.grid-view.svelte-139ftnd [role="row"]:focus .preview{outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light)}.grid-view.svelte-139ftnd [role="row"] .grid-cell{display:block}.grid-view.svelte-139ftnd [role="row"] .grid-cell.image:empty{border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);aspect-ratio:1/1}.grid-view.svelte-139ftnd [role="row"] .checkbox{position:absolute;inset:8px auto auto 8px;z-index:2}.grid-view.svelte-139ftnd [role="row"] .title span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:12px 8px 0;height:40px;line-height:1.5}.list-view.svelte-139ftnd [role="grid"] .row-group .row-group-caption ~ .grid-row:first-of-type .grid-cell{border-top-width:0 !important}.list-view.svelte-139ftnd [role="grid"] .row-group .row-group-caption ~ .grid-row:last-of-type .grid-cell{border-bottom-width:0 !important}.list-view.svelte-139ftnd [role="grid"] [role="row"]{outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:transparent;cursor:pointer;transition-property:background-color, outline-color;transition-duration:200ms}.list-view.svelte-139ftnd [role="grid"] [role="row"]:focus{outline-color:var(--sui-primary-accent-color-light)}.list-view.svelte-139ftnd [role="grid"] [role="row"]:hover{background-color:var(--sui-hover-background-color)}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"]{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;height:40px;padding:0 8px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"] .label{overflow:hidden;text-overflow:ellipsis}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"]:first-child{padding-left:16px}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"]:last-child{padding-right:16px}.list-view.svelte-139ftnd [role="grid"] [role="row"] [role="gridcell"]{border-width:1px 0 0;border-color:var(--sui-secondary-border-color)}.list-view.svelte-139ftnd [role="grid"] [role="row"]:last-child [role="gridcell"]{border-width:1px 0}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"].checkbox{width:16px}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"].title{width:100%;color:var(--sui-primary-foreground-color)}.list-view.svelte-139ftnd [role="grid"] [role="gridcell"].image{padding:8px}')}function fU(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function dU(t){let e,n;const i=[{multiple:!0},t[2]];let r={$$slots:{default:[hU]},$$scope:{ctx:t}};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return e=new hL({props:r}),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0},p(s,l){const o=l&4?Ge(i,[i[0],qt(s[2])]):{};l&32&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s)}}}function hU(t){let e;const n=t[3].default,i=ke(n,t,t[5],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&32)&&Ee(i,n,r,r[5],e?Se(n,r[5],s,null):Te(r[5]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function pU(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function mU(t){let e,n,i,r,s={ctx:t,current:null,token:null,hasCatch:!1,pending:pU,then:dU,catch:fU,blocks:[,,,]};return Ci(n=Ni(t[1]),s),{c(){e=F("div"),s.block.c(),C(e,"role","none"),C(e,"class",i=t[0]+"-view svelte-139ftnd")},m(l,o){A(l,e,o),s.block.m(e,s.anchor=null),s.mount=()=>e,s.anchor=null,t[4](e),r=!0},p(l,[o]){t=l,s.ctx=t,o&2&&n!==(n=Ni(t[1]))&&Ci(n,s)||so(s,t,o),(!r||o&1&&i!==(i=t[0]+"-view svelte-139ftnd"))&&C(e,"class",i)},i(l){r||(_(s.block),r=!0)},o(l){for(let o=0;o<3;o+=1){const a=s.blocks[o];y(a)}r=!1},d(l){l&&T(e),s.block.d(),s.token=null,s=null,t[4](null)}}}function gU(t,e,n){const i=["viewType"];let r=he(e,i),{$$slots:s={},$$scope:l}=e,{viewType:o}=e,a;function u(c){ae[c?"unshift":"push"](()=>{a=c,n(1,a)})}return t.$$set=c=>{e=Z(Z({},e),tt(c)),n(2,r=he(e,i)),"viewType"in c&&n(0,o=c.viewType),"$$scope"in c&&n(5,l=c.$$scope)},[o,a,r,s,u,l]}class ou extends ie{constructor(e){super(),ne(this,e,gU,mU,te,{viewType:0},cU)}}function iv(t,e,n){const i=t.slice();return i[9]=e[n][0],i[10]=e[n][1],i}function rv(t,e,n){const i=t.slice();return i[13]=e[n],i}function _U(t){let e,n;return e=new qn({props:{$$slots:{default:[vU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&65540&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function bU(t){let e,n;return e=new lu({props:{disabled:t[1],multiple:!0,$$slots:{default:[kU]},$$scope:{ctx:t}}}),e.$on("select",t[8]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.disabled=i[1]),r&65740&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function vU(t){let e,n=t[2]("no_files_found")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&4&&n!==(n=r[2]("no_files_found")+"")&&X(i,n)},d(r){r&&T(e)}}}function sv(t){let e,n;return e=new HB({props:{asset:t[13],viewType:t[6].type}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.asset=i[13]),r&64&&(s.viewType=i[6].type),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function lv(t,e){let n,i=e[13].sha,r,s,l=sv(e);return{key:t,first:null,c(){n=Q(),l.c(),r=Q(),this.first=n},m(o,a){A(o,n,a),l.m(o,a),A(o,r,a),s=!0},p(o,a){e=o,a&8&&te(i,i=e[13].sha)?(x(),y(l,1,1,H),V(),l=sv(e),l.c(),_(l,1),l.m(r.parentNode,r)):l.p(e,a)},i(o){s||(_(l),s=!0)},o(o){y(l),s=!1},d(o){o&&(T(n),T(r)),l.d(o)}}}function yU(t){let e=[],n=new Map,i,r,s=be(t[10]);const l=o=>o[13].path;for(let o=0;o<s.length;o+=1){let a=rv(t,s,o),u=l(a);n.set(u,e[o]=lv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=j()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&72&&(s=be(o[10]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,lv,i,rv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ov(t,e){let n,i,r;return i=new M2({props:{label:e[9]!=="*"?e[9]:void 0,$$slots:{default:[yU]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&8&&(o.label=e[9]!=="*"?e[9]:void 0),l&65608&&(o.$$scope={dirty:l,ctx:e}),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function wU(t){let e=[],n=new Map,i,r,s=be(Object.entries(t[3]));const l=o=>o[9];for(let o=0;o<s.length;o+=1){let a=iv(t,s,o),u=l(a);n.set(u,e[o]=ov(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&72&&(s=be(Object.entries(o[3])),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,ov,i,iv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function kU(t){let e,n;return e=new ou({props:{id:"asset-list",viewType:t[6].type,"aria-label":t[2]("assets"),"aria-rowcount":t[7].length,$$slots:{default:[wU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s.viewType=i[6].type),r&4&&(s["aria-label"]=i[2]("assets")),r&128&&(s["aria-rowcount"]=i[7].length),r&65608&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function SU(t){let e,n,i,r,s;const l=[bU,_U],o=[];function a(u,c){return c&8&&(e=null),e==null&&(e=!!Object.values(u[3]).flat(1).length),e?0:1}return n=a(t,-1),i=o[n]=l[n](t),{c(){i.c(),r=Q()},m(u,c){o[n].m(u,c),A(u,r,c),s=!0},p(u,c){let f=n;n=a(u,c),n===f?o[n].p(u,c):(x(),y(o[f],1,1,()=>{o[f]=null}),V(),i=o[n],i?i.p(u,c):(i=o[n]=l[n](u),i.c()),_(i,1),i.m(r.parentNode,r))},i(u){s||(_(i),s=!0)},o(u){y(i),s=!1},d(u){u&&T(r),o[n].d(u)}}}function EU(t){let e,n;return e=new pg({props:{"aria-label":t[2]("asset_list"),$$slots:{default:[SU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&4&&(s["aria-label"]=i[2]("asset_list")),r&65791&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TU(t,e,n){let i,r,s,l,o,a,u,c;B(t,Jn,d=>n(0,r=d)),B(t,ue,d=>n(2,s=d)),B(t,JE,d=>n(3,l=d)),B(t,Ai,d=>n(4,o=d)),B(t,L3,d=>n(5,a=d)),B(t,xi,d=>n(6,u=d)),B(t,tl,d=>n(7,c=d));const f=({detail:{files:d}})=>{ze(Ai,o={folder:r?.internalPath||a?.internalPath,files:d},o)};return t.$$.update=()=>{t.$$.dirty&1&&n(1,i=!!r?.entryRelative)},[r,i,s,l,o,a,u,c,f]}class AU extends ie{constructor(e){super(),ne(this,e,TU,EU,te,{})}}function av(t,e,n){const i=t.slice();i[10]=e[n].collectionName,i[11]=e[n].internalPath,i[12]=e[n].entryRelative;const r=i[10]?Mi(i[10]):void 0;i[13]=r;const s=i[12];i[14]=s;const l=!i[11]&&!i[2]||i[11]===i[2]?.internalPath;return i[15]=l,i}function CU(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[13]?.icon||"folder"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.name=i[13]?.icon||"folder"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function uv(t,e){let n,i,r;function s(){return e[5](e[11])}function l(...c){return e[6](e[14],e[11],e[15],...c)}function o(...c){return e[7](e[14],...c)}function a(...c){return e[8](e[14],...c)}function u(...c){return e[9](e[14],...c)}return i=new mi({props:{selected:e[15],label:e[3]?na(e[10]):"",$$slots:{"start-icon":[CU]},$$scope:{ctx:e}}}),i.$on("select",s),i.$on("dragover",l),i.$on("dragleave",o),i.$on("dragend",a),i.$on("drop",u),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(c,f){A(c,n,f),N(i,c,f),r=!0},p(c,f){e=c;const d={};f&5&&(d.selected=e[15]),f&9&&(d.label=e[3]?na(e[10]):""),f&262145&&(d.$$scope={dirty:f,ctx:e}),i.$set(d)},i(c){r||(_(i.$$.fragment,c),r=!0)},o(c){y(i.$$.fragment,c),r=!1},d(c){c&&T(n),L(i,c)}}}function NU(t){let e=[],n=new Map,i,r,s=be(t[0]);const l=o=>o[10];for(let o=0;o<s.length;o+=1){let a=av(t,s,o),u=l(a);n.set(u,e[o]=uv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&13&&(s=be(o[0]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,uv,i,av),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function LU(t){let e,n,i;return n=new Ma({props:{"aria-label":t[1]("asset_folders"),"aria-controls":"assets-container",$$slots:{default:[NU]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","primary-sidebar")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&2&&(l["aria-label"]=r[1]("asset_folders")),s&262157&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function OU(t,e,n){let i,r,s,l,o;B(t,gi,h=>n(4,r=h)),B(t,ue,h=>n(1,s=h)),B(t,Jn,h=>n(2,l=h)),B(t,un,h=>n(3,o=h));const a=h=>{pn(h?`/assets/${h}`:"/assets")},u=(h,m,p,g)=>{g.preventDefault(),!h&&(!m||p?g.dataTransfer.dropEffect="none":(g.dataTransfer.dropEffect="move",g.target.classList.add("dragover")))},c=(h,m)=>{m.preventDefault(),!h&&m.target.classList.remove("dragover")},f=(h,m)=>{m.preventDefault(),!h&&m.target.classList.remove("dragover")},d=(h,m)=>{m.preventDefault(),!h&&m.target.classList.remove("dragover")};return t.$$.update=()=>{t.$$.dirty&16&&n(0,i=[{collectionName:"*",internalPath:void 0,publicPath:void 0,entryRelative:!1},...r])},[i,s,l,o,r,a,u,c,f,d]}let PU=class extends ie{constructor(e){super(),ne(this,e,OU,LU,te,{})}};function IU(t){let e,n;return e=new et({props:{variant:"ghost",disabled:!t[0]||!Qh(t[0]),label:t[1]("preview"),"aria-label":t[1]("show_preview")}}),e.$on("click",t[2]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.disabled=!i[0]||!Qh(i[0])),r&2&&(s.label=i[1]("preview")),r&2&&(s["aria-label"]=i[1]("show_preview")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function DU(t,e,n){let i;B(t,ue,l=>n(1,i=l));let{asset:r}=e;const s=()=>{pn(`/assets/${r?.path}`)};return t.$$set=l=>{"asset"in l&&n(0,r=l.asset)},[r,i,s]}class MU extends ie{constructor(e){super(),ne(this,e,DU,IU,te,{asset:0})}}function RU(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function $U(t){let e,n;return e=new et({props:{variant:"primary",label:t[1]("upload"),disabled:t[0],"aria-label":t[1]("upload_assets"),$$slots:{"start-icon":[RU]},$$scope:{ctx:t}}}),e.$on("click",t[4]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s.label=i[1]("upload")),r&1&&(s.disabled=i[0]),r&2&&(s["aria-label"]=i[1]("upload_assets")),r&32&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function FU(t,e,n){let i,r,s,l;B(t,Jn,a=>n(3,r=a)),B(t,ue,a=>n(1,s=a)),B(t,Mr,a=>n(2,l=a));const o=()=>{ze(Mr,l=!0,l)};return t.$$.update=()=>{t.$$.dirty&8&&n(0,i=!!r?.entryRelative)},[i,s,l,r,o]}class zU extends ie{constructor(e){super(),ne(this,e,FU,$U,te,{})}}function cv(t){let e,n,i=t[3].internalPath+"",r;return{c(){e=F("span"),n=G("/"),r=G(i),C(e,"role","none")},m(s,l){A(s,e,l),$(e,n),$(e,r)},p(s,l){l&8&&i!==(i=s[3].internalPath+"")&&X(r,i)},d(s){s&&T(e)}}}function jU(t){let e,n=(t[2]?Sa(t[3]?.internalPath):"")+"",i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k=t[3]&&cv(t);return l=new In({props:{flex:!0}}),a=new MU({props:{asset:t[4]}}),c=new YE({props:{assets:t[4]?[t[4]]:[]}}),d=new ZE({props:{assets:t[0]}}),m=new KE({props:{assets:t[0],buttonDescription:t[1](t[0].length===1?"delete_selected_asset":"delete_selected_assets"),dialogDescription:t[1](t[0].length===1?"confirm_deleting_selected_asset":t[0].length===t[5].length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:t[0].length}})}}),g=new XE({props:{asset:t[4]}}),b=new zU({}),{c(){e=F("h2"),i=G(n),r=j(),k&&k.c(),s=j(),O(l.$$.fragment),o=j(),O(a.$$.fragment),u=j(),O(c.$$.fragment),f=j(),O(d.$$.fragment),h=j(),O(m.$$.fragment),p=j(),O(g.$$.fragment),v=j(),O(b.$$.fragment),C(e,"role","none")},m(S,E){A(S,e,E),$(e,i),$(e,r),k&&k.m(e,null),A(S,s,E),N(l,S,E),A(S,o,E),N(a,S,E),A(S,u,E),N(c,S,E),A(S,f,E),N(d,S,E),A(S,h,E),N(m,S,E),A(S,p,E),N(g,S,E),A(S,v,E),N(b,S,E),w=!0},p(S,E){(!w||E&12)&&n!==(n=(S[2]?Sa(S[3]?.internalPath):"")+"")&&X(i,n),S[3]?k?k.p(S,E):(k=cv(S),k.c(),k.m(e,null)):k&&(k.d(1),k=null);const P={};E&16&&(P.asset=S[4]),a.$set(P);const M={};E&16&&(M.assets=S[4]?[S[4]]:[]),c.$set(M);const I={};E&1&&(I.assets=S[0]),d.$set(I);const D={};E&1&&(D.assets=S[0]),E&3&&(D.buttonDescription=S[1](S[0].length===1?"delete_selected_asset":"delete_selected_assets")),E&35&&(D.dialogDescription=S[1](S[0].length===1?"confirm_deleting_selected_asset":S[0].length===S[5].length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:S[0].length}})),m.$set(D);const z={};E&16&&(z.asset=S[4]),g.$set(z)},i(S){w||(_(l.$$.fragment,S),_(a.$$.fragment,S),_(c.$$.fragment,S),_(d.$$.fragment,S),_(m.$$.fragment,S),_(g.$$.fragment,S),_(b.$$.fragment,S),w=!0)},o(S){y(l.$$.fragment,S),y(a.$$.fragment,S),y(c.$$.fragment,S),y(d.$$.fragment,S),y(m.$$.fragment,S),y(g.$$.fragment,S),y(b.$$.fragment,S),w=!1},d(S){S&&(T(e),T(s),T(o),T(u),T(f),T(h),T(p),T(v)),k&&k.d(),L(l,S),L(a,S),L(c,S),L(d,S),L(m,S),L(g,S),L(b,S)}}}function BU(t){let e,n;return e=new qr({props:{variant:"primary","aria-label":t[1]("folder"),$$slots:{default:[jU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&2&&(s["aria-label"]=i[1]("folder")),r&191&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function UU(t,e,n){let i,r,s,l,o,a,u;return B(t,Rs,c=>n(6,r=c)),B(t,ue,c=>n(1,s=c)),B(t,un,c=>n(2,l=c)),B(t,Jn,c=>n(3,o=c)),B(t,Vs,c=>n(4,a=c)),B(t,tl,c=>n(5,u=c)),t.$$.update=()=>{t.$$.dirty&64&&n(0,i=r)},[i,s,l,o,a,u,r]}let qU=class extends ie{constructor(e){super(),ne(this,e,UU,BU,te,{})}};function HU(t){let e,n;return e=new qn({props:{$$slots:{default:[VU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&10&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function xU(t){let e,n;return e=new QE({props:{asset:t[2],showPreview:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.asset=i[2]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function VU(t){let e,n=t[1]("select_asset_show_info")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&2&&n!==(n=r[1]("select_asset_show_info")+"")&&X(i,n)},d(r){r&&T(e)}}}function WU(t){let e,n,i,r;const s=[xU,HU],l=[];function o(a,u){return a[2]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function YU(t){let e,n;return e=new Tn({props:{id:"asset-info",class:"secondary-sidebar",hidden:!t[0]?.showInfo,"aria-label":t[1]("asset_info"),$$slots:{default:[WU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.hidden=!i[0]?.showInfo),r&2&&(s["aria-label"]=i[1]("asset_info")),r&14&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function GU(t,e,n){let i,r,s;return B(t,xi,l=>n(0,i=l)),B(t,ue,l=>n(1,r=l)),B(t,Vs,l=>n(2,s=l)),[i,r,s]}let KU=class extends ie{constructor(e){super(),ne(this,e,GU,YU,te,{})}};function fv(t,e,n){const i=t.slice();return i[13]=e[n].label,i[14]=e[n].field,i[15]=e[n].pattern,i}function dv(t,e,n){const i=t.slice();i[13]=e[n].label,i[14]=e[n].field,i[15]=e[n].pattern;const r=(i[7].filters||[]).findIndex(function(...l){return t[10](i[14],i[15],...l)});return i[16]=r,i}function ZU(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function JU(t){let e,n,i,r;e=new Ra({props:{label:t[3]||t[6]("sort_keys.none"),checked:!t[7].filter}}),e.$on("select",t[11]);let s=be(t[5]),l=[];for(let a=0;a<s.length;a+=1)l[a]=hv(fv(t,s,a));const o=a=>y(l[a],1,1,()=>{l[a]=null});return{c(){O(e.$$.fragment),n=j();for(let a=0;a<l.length;a+=1)l[a].c();i=Q()},m(a,u){N(e,a,u),A(a,n,u);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(a,u);A(a,i,u),r=!0},p(a,u){const c={};if(u&72&&(c.label=a[3]||a[6]("sort_keys.none")),u&128&&(c.checked=!a[7].filter),e.$set(c),u&176){s=be(a[5]);let f;for(f=0;f<s.length;f+=1){const d=fv(a,s,f);l[f]?(l[f].p(d,u),_(l[f],1)):(l[f]=hv(d),l[f].c(),_(l[f],1),l[f].m(i.parentNode,i))}for(x(),f=s.length;f<l.length;f+=1)o(f);V()}},i(a){if(!r){_(e.$$.fragment,a);for(let u=0;u<s.length;u+=1)_(l[u]);r=!0}},o(a){y(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)y(l[u]);r=!1},d(a){a&&(T(n),T(i)),L(e,a),ni(l,a)}}}function XU(t){let e,n,i=be(t[5]),r=[];for(let l=0;l<i.length;l+=1)r[l]=pv(dv(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Q()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);A(l,e,o),n=!0},p(l,o){if(o&176){i=be(l[5]);let a;for(a=0;a<i.length;a+=1){const u=dv(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=pv(u),r[a].c(),_(r[a],1),r[a].m(e.parentNode,e))}for(x(),a=i.length;a<r.length;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<i.length;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function hv(t){let e,n;function i(){return t[12](t[14],t[15])}return e=new Ra({props:{label:t[13],checked:t[7].filter?.field===t[14]&&t[7].filter?.pattern===t[15]}}),e.$on("select",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&32&&(l.label=t[13]),s&160&&(l.checked=t[7].filter?.field===t[14]&&t[7].filter?.pattern===t[15]),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function pv(t){let e,n;function i(){return t[9](t[16],t[14],t[15])}return e=new ec({props:{label:t[13],checked:t[16]>-1}}),e.$on("change",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&32&&(l.label=t[13]),s&160&&(l.checked=t[16]>-1),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function QU(t){let e,n,i,r;const s=[XU,JU],l=[];function o(a,u){return a[2]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function eq(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[6]("filtering_options"),"aria-controls":t[8]["aria-controls"],$$slots:{default:[QU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s["aria-label"]=i[6]("filtering_options")),r&256&&(s["aria-controls"]=i[8]["aria-controls"]),r&2097404&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function tq(t){let e,n;return e=new pi({props:{variant:"ghost",label:t[0]||t[6]("filter"),disabled:t[1],$$slots:{popup:[eq],"end-icon":[ZU]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&65&&(s.label=i[0]||i[6]("filter")),r&2&&(s.disabled=i[1]),r&2097660&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function nq(t,e,n){const i=["label","disabled","multiple","noneLabel","currentView","filters"];let r=he(e,i),s,l,o=H,a=()=>(o(),o=Qn(h,w=>n(7,l=w)),h);B(t,ue,w=>n(6,s=w)),t.$$.on_destroy.push(()=>o());let{label:u=""}=e,{disabled:c=!1}=e,{multiple:f=!1}=e,{noneLabel:d=""}=e,{currentView:h}=e;a();let{filters:m=[]}=e;const p=(w,k,S)=>{h.update(E=>{const P=E.filters?[...E.filters]:[];return w>-1?P.splice(w,1):P.push({field:k,pattern:S}),{...E,filters:P}})},g=(w,k,S)=>S.field===w&&S.pattern===k,v=()=>{h.update(w=>({...w,filter:void 0}))},b=(w,k)=>{h.update(S=>({...S,filter:{field:w,pattern:k}}))};return t.$$set=w=>{e=Z(Z({},e),tt(w)),n(8,r=he(e,i)),"label"in w&&n(0,u=w.label),"disabled"in w&&n(1,c=w.disabled),"multiple"in w&&n(2,f=w.multiple),"noneLabel"in w&&n(3,d=w.noneLabel),"currentView"in w&&a(n(4,h=w.currentView)),"filters"in w&&n(5,m=w.filters)},[u,c,f,d,h,m,s,l,r,p,g,v,b]}class nT extends ie{constructor(e){super(),ne(this,e,nq,tq,te,{label:0,disabled:1,multiple:2,noneLabel:3,currentView:4,filters:5})}}function mv(t,e,n){const i=t.slice();return i[10]=e[n].key,i[11]=e[n].label,i}function gv(t,e,n){const i=t.slice();return i[14]=e[n],i}function iq(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function _v(t,e){let n,i,r;function s(){return e[9](e[10],e[14])}return i=new Ra({props:{label:e[4](e[7].includes(e[10])?`${e[14]}_date`:e[14],{values:{label:e[11]}}),checked:e[5].sort?.key===e[10]&&e[5].sort?.order===e[14]}}),i.$on("select",s),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(l,o){A(l,n,o),N(i,l,o),r=!0},p(l,o){e=l;const a={};o&24&&(a.label=e[4](e[7].includes(e[10])?`${e[14]}_date`:e[14],{values:{label:e[11]}})),o&40&&(a.checked=e[5].sort?.key===e[10]&&e[5].sort?.order===e[14]),i.$set(a)},i(l){r||(_(i.$$.fragment,l),r=!0)},o(l){y(i.$$.fragment,l),r=!1},d(l){l&&T(n),L(i,l)}}}function bv(t,e){let n,i=[],r=new Map,s,l,o=be(e[6]);const a=u=>u[14];for(let u=0;u<o.length;u+=1){let c=gv(e,o,u),f=a(c);r.set(f,i[u]=_v(f,c))}return{key:t,first:null,c(){n=Q();for(let u=0;u<i.length;u+=1)i[u].c();s=Q(),this.first=n},m(u,c){A(u,n,c);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(u,c);A(u,s,c),l=!0},p(u,c){e=u,c&252&&(o=be(e[6]),x(),i=bt(i,c,a,1,e,o,r,s.parentNode,_t,_v,s,gv),V())},i(u){if(!l){for(let c=0;c<o.length;c+=1)_(i[c]);l=!0}},o(u){for(let c=0;c<i.length;c+=1)y(i[c]);l=!1},d(u){u&&(T(n),T(s));for(let c=0;c<i.length;c+=1)i[c].d(u)}}}function rq(t){let e=[],n=new Map,i,r,s=be(t[3]);const l=o=>o[10];for(let o=0;o<s.length;o+=1){let a=mv(t,s,o),u=l(a);n.set(u,e[o]=bv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&252&&(s=be(o[3]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,bv,i,mv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function sq(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[4]("sorting_options"),"aria-controls":t[8]["aria-controls"],$$slots:{default:[rq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16&&(s["aria-label"]=i[4]("sorting_options")),r&256&&(s["aria-controls"]=i[8]["aria-controls"]),r&131132&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function lq(t){let e,n;return e=new pi({props:{variant:"ghost",label:t[0]||t[4]("sort"),disabled:t[1],$$slots:{popup:[sq],"end-icon":[iq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&17&&(s.label=i[0]||i[4]("sort")),r&2&&(s.disabled=i[1]),r&131388&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oq(t,e,n){const i=["label","disabled","currentView","fields"];let r=he(e,i),s,l,o=H,a=()=>(o(),o=Qn(f,g=>n(5,l=g)),f);B(t,ue,g=>n(4,s=g)),t.$$.on_destroy.push(()=>o());let{label:u=""}=e,{disabled:c=!1}=e,{currentView:f}=e;a();let{fields:d=[]}=e;const h=["ascending","descending"],m=["date","commit_date"],p=(g,v)=>{f.update(b=>({...b,sort:{key:g,order:v}}))};return t.$$set=g=>{e=Z(Z({},e),tt(g)),n(8,r=he(e,i)),"label"in g&&n(0,u=g.label),"disabled"in g&&n(1,c=g.disabled),"currentView"in g&&a(n(2,f=g.currentView)),"fields"in g&&n(3,d=g.fields)},[u,c,f,d,s,l,h,m,r,p]}class iT extends ie{constructor(e){super(),ne(this,e,oq,lq,te,{label:0,disabled:1,currentView:2,fields:3})}}function aq(t){ye(t,"svelte-1adg8sx",".wrapper.svelte-1adg8sx{display:contents}.wrapper.svelte-1adg8sx button{border-radius:var(--sui-button-medium-border-radius) !important}")}function uq(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"format_list_bulleted"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function cq(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"grid_view"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function fq(t){let e,n,i,r;return e=new Gl({props:{disabled:t[0],selected:t[3].type!=="grid",variant:"ghost",iconic:!0,"aria-label":t[2]("list_view"),$$slots:{"start-icon":[uq]},$$scope:{ctx:t}}}),e.$on("select",t[5]),i=new Gl({props:{disabled:t[0],selected:t[3].type==="grid",variant:"ghost",iconic:!0,"aria-label":t[2]("grid_view"),$$slots:{"start-icon":[cq]},$$scope:{ctx:t}}}),i.$on("select",t[6]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l&1&&(o.disabled=s[0]),l&8&&(o.selected=s[3].type!=="grid"),l&4&&(o["aria-label"]=s[2]("list_view")),l&128&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&1&&(a.disabled=s[0]),l&8&&(a.selected=s[3].type==="grid"),l&4&&(a["aria-label"]=s[2]("grid_view")),l&128&&(a.$$scope={dirty:l,ctx:s}),i.$set(a)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function dq(t){let e,n,i;const r=[{disabled:t[0]},{"aria-label":t[2]("switch_view")},t[4]];let s={$$slots:{default:[fq]},$$scope:{ctx:t}};for(let l=0;l<r.length;l+=1)s=Z(s,r[l]);return n=new Kc({props:s}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-1adg8sx")},m(l,o){A(l,e,o),N(n,e,null),i=!0},p(l,[o]){const a=o&21?Ge(r,[o&1&&{disabled:l[0]},o&4&&{"aria-label":l[2]("switch_view")},o&16&&qt(l[4])]):{};o&143&&(a.$$scope={dirty:o,ctx:l}),n.$set(a)},i(l){i||(_(n.$$.fragment,l),i=!0)},o(l){y(n.$$.fragment,l),i=!1},d(l){l&&T(e),L(n)}}}function hq(t,e,n){const i=["disabled","currentView"];let r=he(e,i),s,l,o=H,a=()=>(o(),o=Qn(c,h=>n(3,l=h)),c);B(t,ue,h=>n(2,s=h)),t.$$.on_destroy.push(()=>o());let{disabled:u=!1}=e,{currentView:c}=e;a();const f=()=>{c.update(h=>({...h,type:"list"}))},d=()=>{c.update(h=>({...h,type:"grid"}))};return t.$$set=h=>{e=Z(Z({},e),tt(h)),n(4,r=he(e,i)),"disabled"in h&&n(0,u=h.disabled),"currentView"in h&&a(n(1,c=h.currentView))},[u,c,s,l,r,f,d]}class mg extends ie{constructor(e){super(),ne(this,e,hq,dq,te,{disabled:0,currentView:1},aq)}}function vv(t){let e,n;return e=new qr({props:{variant:"secondary","aria-label":t[3]("asset_list"),$$slots:{default:[mq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8&&(s["aria-label"]=i[3]("asset_list")),r&8443&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function pq(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"info"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function mq(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g;return e=new et({props:{variant:"ghost",disabled:t[4].length===Object.values(t[5]).flat(1).length,label:t[3]("select_all"),"aria-controls":"asset-list"}}),e.$on("click",t[9]),i=new et({props:{variant:"ghost",disabled:!t[4].length,label:t[3]("clear_selection"),"aria-controls":"asset-list"}}),i.$on("click",t[10]),s=new In({props:{flex:!0}}),o=new iT({props:{disabled:!t[0],currentView:xi,fields:t[6],"aria-controls":"asset-list"}}),u=new nT({props:{label:t[3]("file_type"),disabled:!t[0],currentView:xi,noneLabel:t[3]("all"),filters:g0.map(t[11]),"aria-controls":"asset-list"}}),f=new mg({props:{disabled:!t[1],currentView:xi,"aria-controls":"asset-list"}}),h=new $n({props:{orientation:"vertical"}}),p=new et({props:{variant:"ghost",iconic:!0,disabled:!t[1],pressed:!!t[7]?.showInfo,"aria-controls":"asset-info","aria-expanded":!!t[7]?.showInfo,"aria-label":t[3](t[7]?.showInfo?"hide_info":"show_info"),$$slots:{"start-icon":[pq]},$$scope:{ctx:t}}}),p.$on("click",t[12]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),a=j(),O(u.$$.fragment),c=j(),O(f.$$.fragment),d=j(),O(h.$$.fragment),m=j(),O(p.$$.fragment)},m(v,b){N(e,v,b),A(v,n,b),N(i,v,b),A(v,r,b),N(s,v,b),A(v,l,b),N(o,v,b),A(v,a,b),N(u,v,b),A(v,c,b),N(f,v,b),A(v,d,b),N(h,v,b),A(v,m,b),N(p,v,b),g=!0},p(v,b){const w={};b&48&&(w.disabled=v[4].length===Object.values(v[5]).flat(1).length),b&8&&(w.label=v[3]("select_all")),e.$set(w);const k={};b&16&&(k.disabled=!v[4].length),b&8&&(k.label=v[3]("clear_selection")),i.$set(k);const S={};b&1&&(S.disabled=!v[0]),b&64&&(S.fields=v[6]),o.$set(S);const E={};b&8&&(E.label=v[3]("file_type")),b&1&&(E.disabled=!v[0]),b&8&&(E.noneLabel=v[3]("all")),b&8&&(E.filters=g0.map(v[11])),u.$set(E);const P={};b&2&&(P.disabled=!v[1]),f.$set(P);const M={};b&2&&(M.disabled=!v[1]),b&128&&(M.pressed=!!v[7]?.showInfo),b&128&&(M["aria-expanded"]=!!v[7]?.showInfo),b&136&&(M["aria-label"]=v[3](v[7]?.showInfo?"hide_info":"show_info")),b&8192&&(M.$$scope={dirty:b,ctx:v}),p.$set(M)},i(v){g||(_(e.$$.fragment,v),_(i.$$.fragment,v),_(s.$$.fragment,v),_(o.$$.fragment,v),_(u.$$.fragment,v),_(f.$$.fragment,v),_(h.$$.fragment,v),_(p.$$.fragment,v),g=!0)},o(v){y(e.$$.fragment,v),y(i.$$.fragment,v),y(s.$$.fragment,v),y(o.$$.fragment,v),y(u.$$.fragment,v),y(f.$$.fragment,v),y(h.$$.fragment,v),y(p.$$.fragment,v),g=!1},d(v){v&&(T(n),T(r),T(l),T(a),T(c),T(d),T(m)),L(e,v),L(i,v),L(s,v),L(o,v),L(u,v),L(f,v),L(h,v),L(p,v)}}}function gq(t){let e,n,i=!t[2]?.files&&vv(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[2]?.files?i&&(x(),y(i,1,1,()=>{i=null}),V()):i?(i.p(r,s),s&4&&_(i,1)):(i=vv(r),i.c(),_(i,1),i.m(e.parentNode,e))},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function _q(t,e,n){let i,r,s,l,o,a,u,c,f;B(t,tl,g=>n(8,s=g)),B(t,Yt,g=>n(2,l=g)),B(t,ue,g=>n(3,o=g)),B(t,Rs,g=>n(4,a=g)),B(t,JE,g=>n(5,u=g)),B(t,$j,g=>n(6,c=g)),B(t,xi,g=>n(7,f=g));const d=()=>{ze(Rs,a=Object.values(u).flat(1),a)},h=()=>{ze(Rs,a=[],a)},m=g=>({label:o(g),field:"fileType",pattern:g}),p=()=>{xi.update(g=>({...g,showInfo:!f?.showInfo}))};return t.$$.update=()=>{t.$$.dirty&256&&n(1,i=!!s.length),t.$$.dirty&256&&n(0,r=s.length>1)},[r,i,l,o,a,u,c,f,s,d,h,m,p]}let bq=class extends ie{constructor(e){super(),ne(this,e,_q,gq,te,{})}};function vq(t){ye(t,"svelte-1msxade",".main-inner.svelte-1msxade.svelte-1msxade{flex:auto;display:flex;overflow:hidden}.main-inner.svelte-1msxade .main-inner-main.svelte-1msxade{flex:auto;display:flex;flex-direction:column;overflow:hidden}.main-inner.svelte-1msxade .secondary-sidebar{flex:none;overflow:auto;width:320px;border-left:1px solid var(--sui-primary-border-color)}")}const yq=t=>({}),yv=t=>({}),wq=t=>({}),wv=t=>({}),kq=t=>({}),kv=t=>({}),Sq=t=>({}),Sv=t=>({});function Eq(t){let e,n,i,r,s,l;const o=t[1].primary_toolbar,a=ke(o,t,t[0],Sv),u=t[1].secondary_toolbar,c=ke(u,t,t[0],kv),f=t[1].main_content,d=ke(f,t,t[0],wv),h=t[1].secondary_sidebar,m=ke(h,t,t[0],yv);return{c(){a&&a.c(),e=j(),n=F("div"),i=F("div"),c&&c.c(),r=j(),d&&d.c(),s=j(),m&&m.c(),C(i,"role","none"),C(i,"class","main-inner-main svelte-1msxade"),C(n,"role","none"),C(n,"class","main-inner svelte-1msxade")},m(p,g){a&&a.m(p,g),A(p,e,g),A(p,n,g),$(n,i),c&&c.m(i,null),$(i,r),d&&d.m(i,null),$(n,s),m&&m.m(n,null),l=!0},p(p,[g]){a&&a.p&&(!l||g&1)&&Ee(a,o,p,p[0],l?Se(o,p[0],g,Sq):Te(p[0]),Sv),c&&c.p&&(!l||g&1)&&Ee(c,u,p,p[0],l?Se(u,p[0],g,kq):Te(p[0]),kv),d&&d.p&&(!l||g&1)&&Ee(d,f,p,p[0],l?Se(f,p[0],g,wq):Te(p[0]),wv),m&&m.p&&(!l||g&1)&&Ee(m,h,p,p[0],l?Se(h,p[0],g,yq):Te(p[0]),yv)},i(p){l||(_(a,p),_(c,p),_(d,p),_(m,p),l=!0)},o(p){y(a,p),y(c,p),y(d,p),y(m,p),l=!1},d(p){p&&(T(e),T(n)),a&&a.d(p),c&&c.d(p),d&&d.d(p),m&&m.d(p)}}}function Tq(t,e,n){let{$$slots:i={},$$scope:r}=e;return t.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class rT extends ie{constructor(e){super(),ne(this,e,Tq,Eq,te,{},vq)}}function Aq(t){ye(t,"svelte-20zwzg",'.outer.svelte-20zwzg{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer[inert].svelte-20zwzg{display:none}.outer.svelte-20zwzg>[role="toolbar"]{flex:none}.outer.svelte-20zwzg>[role="toolbar"] [role="search"]{flex:auto;width:auto;max-width:480px}.outer.svelte-20zwzg .browser{flex:auto;display:flex;overflow:hidden}.outer.svelte-20zwzg .primary-sidebar{display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;background-color:var(--sui-tertiary-background-color);border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.outer.svelte-20zwzg .primary-sidebar [role="radiogroup"]{width:100%}.outer.svelte-20zwzg .primary-sidebar [role="listbox"]{gap:4px;margin:8px;border-width:0;background-color:transparent}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button{display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:left}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button span{flex:none}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button span.label{flex:auto;overflow:hidden;text-overflow:ellipsis}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button span.icon.check{display:none}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button:not(:first-child){margin-top:4px}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] button:not(:focus){border-color:transparent}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"]{color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color)}.outer.svelte-20zwzg .primary-sidebar [role="listbox"] [role="option"].dragover{color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important}.outer.svelte-20zwzg .main{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer.svelte-20zwzg .main .primary.global[role="toolbar"]{justify-content:center}.outer.svelte-20zwzg .main .primary:not(.global)[role="toolbar"]{background-color:var(--sui-tertiary-background-color)}.outer.svelte-20zwzg .main .secondary[role="toolbar"]{border-width:0 0 1px;border-color:var(--sui-primary-border-color)}')}const Cq=t=>({}),Ev=t=>({}),Nq=t=>({}),Tv=t=>({});function Lq(t){let e,n;const i=t[3].primary_sidebar,r=ke(i,t,t[4],Tv),s=t[3].main,l=ke(s,t,t[4],Ev);return{c(){r&&r.c(),e=j(),l&&l.c()},m(o,a){r&&r.m(o,a),A(o,e,a),l&&l.m(o,a),n=!0},p(o,a){r&&r.p&&(!n||a&16)&&Ee(r,i,o,o[4],n?Se(i,o[4],a,Nq):Te(o[4]),Tv),l&&l.p&&(!n||a&16)&&Ee(l,s,o,o[4],n?Se(s,o[4],a,Cq):Te(o[4]),Ev)},i(o){n||(_(r,o),_(l,o),n=!0)},o(o){y(r,o),y(l,o),n=!1},d(o){o&&T(e),r&&r.d(o),l&&l.d(o)}}}function Oq(t){let e,n,i;const r=[{class:"browser "+t[0]},t[2]];let s={$$slots:{default:[Lq]},$$scope:{ctx:t}};for(let l=0;l<r.length;l+=1)s=Z(s,r[l]);return n=new Tn({props:s}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"id","page-container"),C(e,"class","outer svelte-20zwzg"),e.inert=t[1]},m(l,o){A(l,e,o),N(n,e,null),i=!0},p(l,[o]){const a=o&5?Ge(r,[o&1&&{class:"browser "+l[0]},o&4&&qt(l[2])]):{};o&16&&(a.$$scope={dirty:o,ctx:l}),n.$set(a),(!i||o&2)&&(e.inert=l[1])},i(l){i||(_(n.$$.fragment,l),i=!0)},o(l){y(n.$$.fragment,l),i=!1},d(l){l&&T(e),L(n)}}}function Pq(t,e,n){const i=["class"];let r=he(e,i),s;B(t,VE,u=>n(1,s=u));let{$$slots:l={},$$scope:o}=e,{class:a=""}=e;return t.$$set=u=>{e=Z(Z({},e),tt(u)),n(2,r=he(e,i)),"class"in u&&n(0,a=u.class),"$$scope"in u&&n(4,o=u.$$scope)},[a,s,r,l,o]}class au extends ie{constructor(e){super(),ne(this,e,Pq,Oq,te,{class:0},Aq)}}function Iq(t){let e,n;return e=new PU({props:{slot:"primary_sidebar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Dq(t){let e,n;return e=new qU({props:{slot:"primary_toolbar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Mq(t){let e,n;return e=new bq({props:{slot:"secondary_toolbar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Rq(t){let e,n;return e=new AU({props:{slot:"main_content"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function $q(t){let e,n;return e=new KU({props:{slot:"secondary_sidebar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Fq(t){let e,n;return e=new rT({props:{$$slots:{secondary_sidebar:[$q],main_content:[Rq],secondary_toolbar:[Mq],primary_toolbar:[Dq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16384&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function zq(t){let e,n;return e=new Tn({props:{slot:"main",id:"assets-container",class:"main","aria-label":t[1]("x_asset_folder",{values:{folder:t[0]}}),$$slots:{default:[Fq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&3&&(s["aria-label"]=i[1]("x_asset_folder",{values:{folder:i[0]}})),r&16384&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Av(t){let e,n;return e=new OB({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function jq(t){let e=t[1](t[3].published?t[3].count===1?"asset_saved_and_published":"assets_saved_and_published":t[3].count===1?"asset_saved":"assets_saved",{values:{count:t[3].count}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&10&&e!==(e=i[1](i[3].published?i[3].count===1?"asset_saved_and_published":"assets_saved_and_published":i[3].count===1?"asset_saved":"assets_saved",{values:{count:i[3].count}})+"")&&X(n,e)},d(i){i&&T(n)}}}function Bq(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[jq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16394&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Uq(t){let e=t[1](t[3].count===1?"asset_deleted":"assets_deleted",{values:{count:t[3].count}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&10&&e!==(e=i[1](i[3].count===1?"asset_deleted":"assets_deleted",{values:{count:i[3].count}})+"")&&X(n,e)},d(i){i&&T(n)}}}function qq(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[Uq]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16394&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Hq(t){let e,n,i,r,s,l,o,a,u,c,f,d,h;e=new au({props:{class:"media","aria-label":t[1]("asset_library"),$$slots:{main:[zq],primary_sidebar:[Iq]},$$scope:{ctx:t}}});let m=t[2]&&Av();r=new $B({});function p(w){t[7](w)}let g={$$slots:{default:[Bq]},$$scope:{ctx:t}};t[3].saved!==void 0&&(g.show=t[3].saved),l=new Si({props:g}),ae.push(()=>Re(l,"show",p));function v(w){t[8](w)}let b={$$slots:{default:[qq]},$$scope:{ctx:t}};return t[3].deleted!==void 0&&(b.show=t[3].deleted),u=new Si({props:b}),ae.push(()=>Re(u,"show",v)),{c(){O(e.$$.fragment),n=j(),m&&m.c(),i=j(),O(r.$$.fragment),s=j(),O(l.$$.fragment),a=j(),O(u.$$.fragment)},m(w,k){N(e,w,k),A(w,n,k),m&&m.m(w,k),A(w,i,k),N(r,w,k),A(w,s,k),N(l,w,k),A(w,a,k),N(u,w,k),f=!0,d||(h=Fe(window,"hashchange",t[6]),d=!0)},p(w,[k]){const S={};k&2&&(S["aria-label"]=w[1]("asset_library")),k&16387&&(S.$$scope={dirty:k,ctx:w}),e.$set(S),w[2]?m?k&4&&_(m,1):(m=Av(),m.c(),_(m,1),m.m(i.parentNode,i)):m&&(x(),y(m,1,1,()=>{m=null}),V());const E={};k&16394&&(E.$$scope={dirty:k,ctx:w}),!o&&k&8&&(o=!0,E.show=w[3].saved,$e(()=>o=!1)),l.$set(E);const P={};k&16394&&(P.$$scope={dirty:k,ctx:w}),!c&&k&8&&(c=!0,P.show=w[3].deleted,$e(()=>c=!1)),u.$set(P)},i(w){f||(_(e.$$.fragment,w),_(m),_(r.$$.fragment,w),_(l.$$.fragment,w),_(u.$$.fragment,w),f=!0)},o(w){y(e.$$.fragment,w),y(m),y(r.$$.fragment,w),y(l.$$.fragment,w),y(u.$$.fragment,w),f=!1},d(w){w&&(T(n),T(i),T(s),T(a)),L(e,w),m&&m.d(w),L(r,w),L(l,w),L(u,w),d=!1,h()}}}function xq(t,e,n){let i,r,s,l,o,a,u,c,f;B(t,ue,v=>n(1,r=v)),B(t,Or,v=>n(2,s=v)),B(t,Gn,v=>n(10,l=v)),B(t,wn,v=>n(11,o=v)),B(t,tl,v=>n(12,a=v)),B(t,Jn,v=>n(5,u=v)),B(t,gi,v=>n(13,c=v)),B(t,ta,v=>n(3,f=v));let d="";const h=async()=>{({path:d}=ru());const[v,b,w]=d.match(/^\/assets(?:\/([/\-\w]+))?(?:\/([^/]+.\w{2,4}))?$/)??[];if(v){if(!b)ze(Jn,u=void 0,u);else if(u?.internalPath!==b){const k=c.find(({internalPath:S})=>b===S);k&&ze(Jn,u=k,u)}if(!w){const k=a.length;await hs(100),ze(Or,s=void 0,s),ze(Gn,l=r(k>1?"viewing_x_asset_folder_many_assets":k===1?"viewing_x_asset_folder_one_asset":"viewing_x_asset_folder_no_assets",{values:{folder:i,count:k}}),l);return}ze(Or,s=d.match(/^\/assets\/(.+?)\.[a-zA-Z0-9]+$/)?o.find(k=>k.path===`${b}/${w}`):void 0,s),ze(Gn,l=s?r("viewing_x_asset_details",{values:{name:s.name}}):r("file_not_found"),l)}};Ut(()=>{h()});const m=()=>{h()};function p(v){t.$$.not_equal(f.saved,v)&&(f.saved=v,ta.set(f))}function g(v){t.$$.not_equal(f.deleted,v)&&(f.deleted=v,ta.set(f))}return t.$$.update=()=>{t.$$.dirty&32&&n(0,i=Sa(u?.internalPath))},[i,r,s,f,h,u,m,p,g]}class Vq extends ie{constructor(e){super(),ne(this,e,xq,Hq,te,{})}}function Wq(t){let e=t[5](t[3].length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:t[3].length,folder:`/${t[2]}`}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&44&&e!==(e=i[5](i[3].length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:i[3].length,folder:`/${i[2]}`}})+"")&&X(n,e)},d(i){i&&T(n)}}}function Yq(t){let e=t[5]("confirm_replacing_file",{values:{name:t[1].name}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&34&&e!==(e=i[5]("confirm_replacing_file",{values:{name:i[1].name}})+"")&&X(n,e)},d(i){i&&T(n)}}}function Gq(t){let e,n,i,r,s;function l(f,d){return f[1]?Yq:Wq}let o=l(t),a=o(t);function u(f){t[6](f)}let c={};return t[3]!==void 0&&(c.files=t[3]),i=new eT({props:c}),ae.push(()=>Re(i,"files",u)),{c(){e=F("div"),a.c(),n=j(),O(i.$$.fragment),C(e,"role","none")},m(f,d){A(f,e,d),a.m(e,null),A(f,n,d),N(i,f,d),s=!0},p(f,d){o===(o=l(f))&&a?a.p(f,d):(a.d(1),a=o(f),a&&(a.c(),a.m(e,null)));const h={};!r&&d&8&&(r=!0,h.files=f[3],$e(()=>r=!1)),i.$set(h)},i(f){s||(_(i.$$.fragment,f),s=!0)},o(f){y(i.$$.fragment,f),s=!1},d(f){f&&(T(e),T(n)),a.d(),L(i,f)}}}function Kq(t){let e,n;return e=new Ia({props:{open:t[4],title:t[5](t[1]?"replace_asset":"upload_assets"),okLabel:t[5](t[1]?"replace":"upload"),$$slots:{default:[Gq]},$$scope:{ctx:t}}}),e.$on("ok",t[7]),e.$on("cancel",t[8]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&16&&(s.open=i[4]),r&34&&(s.title=i[5](i[1]?"replace_asset":"upload_assets")),r&34&&(s.okLabel=i[5](i[1]?"replace":"upload")),r&558&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Zq(t,e,n){let i,r,s,l,o,a;B(t,Ai,d=>n(0,l=d)),B(t,Pj,d=>n(4,o=d)),B(t,ue,d=>n(5,a=d));function u(d){i=d,n(3,i),n(0,l)}const c=async()=>{await GE(l,{commitType:"uploadMedia"}),ze(Ai,l={folder:void 0,files:[]},l)},f=()=>{ze(Ai,l={folder:void 0,files:[]},l)};return t.$$.update=()=>{t.$$.dirty&1&&n(3,{files:i,folder:r,originalAsset:s}=l,i,(n(2,r),n(0,l)),(n(1,s),n(0,l)))},[l,s,r,i,o,a,u,c,f]}class Jq extends ie{constructor(e){super(),ne(this,e,Zq,Kq,te,{})}}function Xq(t){let e,n,i={accept:t[4],multiple:t[5]};return e=new tT({props:i}),t[11](e),e.$on("select",t[12]),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s&16&&(l.accept=r[4]),s&32&&(l.multiple=r[5]),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[11](null),L(e,r)}}}function Qq(t){let e,n,i;function r(l){t[10](l)}let s={title:t[2]?t[6]("replace_x",{values:{name:t[2].name}}):t[6]("upload_assets"),showOk:!1,$$slots:{default:[eH]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Br({props:s}),ae.push(()=>Re(e,"open",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&68&&(a.title=l[2]?l[6]("replace_x",{values:{name:l[2].name}}):l[6]("upload_assets")),o&32816&&(a.$$scope={dirty:o,ctx:l}),!n&&o&8&&(n=!0,a.open=l[3],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function eH(t){let e,n;return e=new lu({props:{showUploadButton:!0,accept:t[4],multiple:t[5]}}),e.$on("select",t[9]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16&&(s.accept=i[4]),r&32&&(s.multiple=i[5]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function tH(t){let e,n,i,r;const s=[Qq,Xq],l=[];function o(a,u){return a[0]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,[u]){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function nH(t,e,n){let i,r,s,l,o,a,u,c;B(t,Mr,b=>n(3,l=b)),B(t,L3,b=>n(13,o=b)),B(t,Jn,b=>n(14,a=b)),B(t,Ai,b=>n(8,u=b)),B(t,ue,b=>n(6,c=b));let f=!0,d;const h=b=>{ze(Ai,u={folder:i?i.folder:a?.internalPath||o?.internalPath,files:b,originalAsset:i},u),ze(Mr,l=!1,l)};Ut(()=>{n(0,f=window.matchMedia("(pointer: fine)").matches)});const m=({detail:{files:b}})=>{h(b)};function p(b){l=b,Mr.set(l)}function g(b){ae[b?"unshift":"push"](()=>{d=b,n(1,d)})}const v=({detail:{files:b}})=>{h(b)};return t.$$.update=()=>{t.$$.dirty&256&&n(2,{originalAsset:i}=u,i),t.$$.dirty&4&&n(5,r=!i),t.$$.dirty&4&&n(4,s=i?qs.getType(i.name)??void 0:void 0),t.$$.dirty&11&&!f&&d&&l&&d.open()},[f,d,i,l,s,r,c,h,u,m,p,g,v]}class iH extends ie{constructor(e){super(),ne(this,e,nH,tH,te,{})}}function rH(t){ye(t,"svelte-soravq","div.svelte-soravq{flex:auto;overflow:auto}pre.svelte-soravq{margin:0;padding:16px}")}function sH(t){let e,n,i=eo.stringify(t[1])+"",r,s;return{c(){e=F("div"),n=F("pre"),r=G(i),C(n,"class","svelte-soravq"),C(e,"role","blockquote"),C(e,"aria-label",s=t[0]("site_config")),C(e,"class","svelte-soravq")},m(l,o){A(l,e,o),$(e,n),$(n,r)},p(l,o){o&2&&i!==(i=eo.stringify(l[1])+"")&&X(r,i),o&1&&s!==(s=l[0]("site_config"))&&C(e,"aria-label",s)},d(l){l&&T(e)}}}function lH(t){let e,n;return e=new au({props:{class:"content","aria-label":t[0]("site_configuration_editor"),$$slots:{main:[sH]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s["aria-label"]=i[0]("site_configuration_editor")),r&7&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oH(t,e,n){let i,r;return B(t,ue,s=>n(0,i=s)),B(t,wt,s=>n(1,r=s)),[i,r]}class aH extends ie{constructor(e){super(),ne(this,e,oH,lH,te,{},rH)}}function uH(t){let e,n,i;function r(l){t[9](l)}let s={readonly:t[2],required:t[3],invalid:t[4],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error"};return t[0]!==void 0&&(s.checked=t[0]),e=new Zc({props:s}),ae.push(()=>Re(e,"checked",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&4&&(a.readonly=l[2]),o&8&&(a.required=l[3]),o&16&&(a.invalid=l[4]),o&2&&(a["aria-labelledby"]=l[1]+"-label"),o&2&&(a["aria-errormessage"]=l[1]+"-error"),!n&&o&1&&(n=!0,a.checked=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function cH(t,e,n){let{locale:i}=e,{keyPath:r}=e,{fieldId:s}=e,{fieldLabel:l}=e,{fieldConfig:o}=e,{currentValue:a}=e,{readonly:u=!1}=e,{required:c=!1}=e,{invalid:f=!1}=e;function d(h){a=h,n(0,a)}return t.$$set=h=>{"locale"in h&&n(5,i=h.locale),"keyPath"in h&&n(6,r=h.keyPath),"fieldId"in h&&n(1,s=h.fieldId),"fieldLabel"in h&&n(7,l=h.fieldLabel),"fieldConfig"in h&&n(8,o=h.fieldConfig),"currentValue"in h&&n(0,a=h.currentValue),"readonly"in h&&n(2,u=h.readonly),"required"in h&&n(3,c=h.required),"invalid"in h&&n(4,f=h.invalid)},[a,s,u,c,f,i,r,l,o,d]}class fH extends ie{constructor(e){super(),ne(this,e,cH,uH,te,{locale:5,keyPath:6,fieldId:1,fieldLabel:7,fieldConfig:8,currentValue:0,readonly:2,required:3,invalid:4})}}function Cv(t){let e,n=t[1](`boolean.${t[0]}`)+"",i;return{c(){e=F("p"),i=G(n)},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&3&&n!==(n=r[1](`boolean.${r[0]}`)+"")&&X(i,n)},d(r){r&&T(e)}}}function dH(t){let e,n=typeof t[0]=="boolean"&&Cv(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,[r]){typeof i[0]=="boolean"?n?n.p(i,r):(n=Cv(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:H,o:H,d(i){i&&T(e),n&&n.d(i)}}}function hH(t,e,n){let i;B(t,ue,a=>n(1,i=a));let{locale:r}=e,{keyPath:s}=e,{fieldConfig:l}=e,{currentValue:o}=e;return t.$$set=a=>{"locale"in a&&n(2,r=a.locale),"keyPath"in a&&n(3,s=a.keyPath),"fieldConfig"in a&&n(4,l=a.fieldConfig),"currentValue"in a&&n(0,o=a.currentValue)},[o,i,r,s,l]}class pH extends ie{constructor(e){super(),ne(this,e,hH,dH,te,{locale:2,keyPath:3,fieldConfig:4,currentValue:0})}}function mH(t){ye(t,"svelte-1rh35oy","div.svelte-1rh35oy.svelte-1rh35oy{display:flex;align-items:center;gap:8px}div.svelte-1rh35oy .value.svelte-1rh35oy{flex:auto;display:flex;align-items:center;gap:8px}div.svelte-1rh35oy .value.svelte-1rh35oy .sui.text-input{width:80px;min-width:0}div.svelte-1rh35oy .value.svelte-1rh35oy .sui.slider{padding:8px;--sui-slider-base-width:80px}input.svelte-1rh35oy.svelte-1rh35oy{font-family:var(--sui-textbox-font-family)}")}function Nv(t){let e,n,i;function r(l){t[16](l)}let s={id:t[9]+"-input",invalid:t[3],readonly:t[1],required:t[2],"aria-labelledby":t[0]+"-label","aria-errormessage":t[0]+"-error"};return t[4]!==void 0&&(s.value=t[4]),e=new Sn({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o&8&&(a.invalid=l[3]),o&2&&(a.readonly=l[1]),o&4&&(a.required=l[2]),o&1&&(a["aria-labelledby"]=l[0]+"-label"),o&1&&(a["aria-errormessage"]=l[0]+"-error"),!n&&o&16&&(n=!0,a.value=l[4],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function Lv(t){let e=t[8]("opacity")+"",n,i,r,s,l;function o(u){t[17](u)}let a={min:0,max:255,disabled:!t[4],"aria-label":t[8]("opacity")};return t[5]!==void 0&&(a.value=t[5]),r=new LO({props:a}),ae.push(()=>Re(r,"value",o)),{c(){n=G(e),i=j(),O(r.$$.fragment)},m(u,c){A(u,n,c),A(u,i,c),N(r,u,c),l=!0},p(u,c){(!l||c&256)&&e!==(e=u[8]("opacity")+"")&&X(n,e);const f={};c&16&&(f.disabled=!u[4]),c&256&&(f["aria-label"]=u[8]("opacity")),!s&&c&32&&(s=!0,f.value=u[5],$e(()=>s=!1)),r.$set(f)},i(u){l||(_(r.$$.fragment,u),l=!0)},o(u){y(r.$$.fragment,u),l=!1},d(u){u&&(T(n),T(i)),L(r,u)}}}function gH(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"delete"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function _H(t){let e,n,i,r,s,l,o,a,u,c,f,d,h=t[7]&&Nv(t),m=t[6]&&Lv(t);return u=new et({props:{variant:"tertiary",iconic:!0,disabled:!t[4],"aria-label":t[8]("clear"),"aria-controls":`${t[9]}-picker ${t[7]?`${t[9]}-input`:""}`,$$slots:{"start-icon":[gH]},$$scope:{ctx:t}}}),u.$on("click",t[18]),{c(){e=F("div"),n=F("input"),s=j(),l=F("span"),h&&h.c(),o=j(),m&&m.c(),a=j(),O(u.$$.fragment),C(n,"id",t[9]+"-picker"),C(n,"type","color"),n.readOnly=t[1],C(n,"aria-invalid",t[3]),C(n,"aria-readonly",t[1]),C(n,"aria-required",t[2]),C(n,"aria-labelledby",i=t[0]+"-label"),C(n,"aria-errormessage",r=t[0]+"-error"),C(n,"class","svelte-1rh35oy"),C(l,"role","none"),C(l,"class","value svelte-1rh35oy"),C(e,"role","none"),C(e,"class","svelte-1rh35oy")},m(p,g){A(p,e,g),$(e,n),ss(n,t[4]),$(e,s),$(e,l),h&&h.m(l,null),$(l,o),m&&m.m(l,null),$(e,a),N(u,e,null),c=!0,f||(d=Fe(n,"input",t[15]),f=!0)},p(p,[g]){(!c||g&2)&&(n.readOnly=p[1]),(!c||g&8)&&C(n,"aria-invalid",p[3]),(!c||g&2)&&C(n,"aria-readonly",p[1]),(!c||g&4)&&C(n,"aria-required",p[2]),(!c||g&1&&i!==(i=p[0]+"-label"))&&C(n,"aria-labelledby",i),(!c||g&1&&r!==(r=p[0]+"-error"))&&C(n,"aria-errormessage",r),g&16&&ss(n,p[4]),p[7]?h?(h.p(p,g),g&128&&_(h,1)):(h=Nv(p),h.c(),_(h,1),h.m(l,o)):h&&(x(),y(h,1,1,()=>{h=null}),V()),p[6]?m?(m.p(p,g),g&64&&_(m,1)):(m=Lv(p),m.c(),_(m,1),m.m(l,null)):m&&(x(),y(m,1,1,()=>{m=null}),V());const v={};g&16&&(v.disabled=!p[4]),g&256&&(v["aria-label"]=p[8]("clear")),g&128&&(v["aria-controls"]=`${p[9]}-picker ${p[7]?`${p[9]}-input`:""}`),g&2097152&&(v.$$scope={dirty:g,ctx:p}),u.$set(v)},i(p){c||(_(h),_(m),_(u.$$.fragment,p),c=!0)},o(p){y(h),y(m),y(u.$$.fragment,p),c=!1},d(p){p&&T(e),h&&h.d(),m&&m.d(),L(u),f=!1,d()}}}function bH(t,e,n){let i,r,s;B(t,ue,M=>n(8,s=M));let{locale:l}=e,{keyPath:o}=e,{fieldId:a}=e,{fieldLabel:u}=e,{fieldConfig:c}=e,{currentValue:f}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e;const p=ii("color");let g="",v=255;const b=()=>{if(typeof f!="string")return;const[,M,I]=f.match(/(^#[0-9a-f]{6})([0-9a-f]{2})?$/)??[];if(M&&g!==M&&n(4,g=M),M&&r){const D=Number.parseInt(`0x${I??"ff"}`,16);v!==D&&n(5,v=D)}},w=()=>{let M=g.match(/^#[0-9a-f]{6}$/)?g:"";M&&r&&(M+=v.toString(16).padStart(2,"0")),f!==M&&n(10,f=M)};function k(){g=this.value,n(4,g)}function S(M){g=M,n(4,g)}function E(M){v=M,n(5,v)}const P=()=>{n(4,g=""),n(5,v=255)};return t.$$set=M=>{"locale"in M&&n(11,l=M.locale),"keyPath"in M&&n(12,o=M.keyPath),"fieldId"in M&&n(0,a=M.fieldId),"fieldLabel"in M&&n(13,u=M.fieldLabel),"fieldConfig"in M&&n(14,c=M.fieldConfig),"currentValue"in M&&n(10,f=M.currentValue),"readonly"in M&&n(1,d=M.readonly),"required"in M&&n(2,h=M.required),"invalid"in M&&n(3,m=M.invalid)},t.$$.update=()=>{t.$$.dirty&16384&&n(7,{allowInput:i=!1,enableAlpha:r=!1}=c,i,(n(6,r),n(14,c))),t.$$.dirty&1024&&b(),t.$$.dirty&48&&w()},[a,d,h,m,g,v,r,i,s,p,f,l,o,u,c,k,S,E,P]}class vH extends ie{constructor(e){super(),ne(this,e,bH,_H,te,{locale:11,keyPath:12,fieldId:0,fieldLabel:13,fieldConfig:14,currentValue:10,readonly:1,required:2,invalid:3},mH)}}function yH(t){ye(t,"svelte-16cruwo",".preview.svelte-16cruwo.svelte-16cruwo{display:inline-flex;align-items:center;gap:8px}.preview.svelte-16cruwo .color.svelte-16cruwo{display:block;width:24px;height:24px;border-radius:24px}")}function Ov(t){let e,n,i,r,s,l,o,a,u;return{c(){e=F("p"),n=F("span"),i=F("span"),r=j(),s=F("span"),l=G(t[0]),o=j(),a=F("span"),u=G(t[1]),C(i,"role","none"),C(i,"class","color svelte-16cruwo"),jt(i,"background-color",t[0]),C(s,"role","none"),C(s,"class","value"),C(a,"role","none"),C(a,"class","value"),C(n,"role","none"),C(n,"class","preview svelte-16cruwo")},m(c,f){A(c,e,f),$(e,n),$(n,i),$(n,r),$(n,s),$(s,l),$(n,o),$(n,a),$(a,u)},p(c,f){f&1&&jt(i,"background-color",c[0]),f&1&&X(l,c[0]),f&2&&X(u,c[1])},d(c){c&&T(e)}}}function wH(t){let e=typeof t[0]=="string"&&t[0].trim(),n,i=e&&Ov(t);return{c(){i&&i.c(),n=Q()},m(r,s){i&&i.m(r,s),A(r,n,s)},p(r,[s]){s&1&&(e=typeof r[0]=="string"&&r[0].trim()),e?i?i.p(r,s):(i=Ov(r),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:H,o:H,d(r){r&&T(n),i&&i.d(r)}}}function kH(t,e,n){let i,r,{locale:s}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;const u=c=>Number.parseInt(`0x${c}`,16);return t.$$set=c=>{"locale"in c&&n(2,s=c.locale),"keyPath"in c&&n(3,l=c.keyPath),"fieldConfig"in c&&n(4,o=c.fieldConfig),"currentValue"in c&&n(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&n(5,{enableAlpha:i=!1}=o,i),t.$$.dirty&33&&n(1,r=(()=>{const[,c,f,d,h]=a?.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/)??[];return c?`rgb(${u(c)} ${u(f)} ${u(d)}${i&&h?` / ${Math.round(u(h)/255*100)}%`:""})`:""})())},[a,r,s,l,o,i]}class SH extends ie{constructor(e){super(),ne(this,e,kH,wH,te,{locale:2,keyPath:3,fieldConfig:4,currentValue:0},yH)}}function EH(t){let e,n;return e=new Sn({props:{value:t[0],flex:!0,readonly:t[2],required:t[3],invalid:t[4],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.value=i[0]),r&4&&(s.readonly=i[2]),r&8&&(s.required=i[3]),r&16&&(s.invalid=i[4]),r&2&&(s["aria-labelledby"]=i[1]+"-label"),r&2&&(s["aria-errormessage"]=i[1]+"-error"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TH(t,e,n){let i,r,s,l,o,a,u,c;B(t,at,S=>n(12,c=S));let{locale:f}=e,{keyPath:d}=e,{fieldId:h}=e,{fieldLabel:m}=e,{fieldConfig:p}=e,{currentValue:g}=e,{readonly:v=!1}=e,{required:b=!1}=e,{invalid:w=!1}=e;const k=()=>{const S=i.replaceAll(/{{fields\.(.+?)}}/g,(E,P)=>{const M=If({collectionName:r,fileName:s,valueMap:o,keyPath:P,locale:f});return Array.isArray(M)?u.format(M):String(M)});g!==S&&n(0,g=S)};return t.$$set=S=>{"locale"in S&&n(5,f=S.locale),"keyPath"in S&&n(6,d=S.keyPath),"fieldId"in S&&n(1,h=S.fieldId),"fieldLabel"in S&&n(7,m=S.fieldLabel),"fieldConfig"in S&&n(8,p=S.fieldConfig),"currentValue"in S&&n(0,g=S.currentValue),"readonly"in S&&n(2,v=S.readonly),"required"in S&&n(3,b=S.required),"invalid"in S&&n(4,w=S.invalid)},t.$$.update=()=>{t.$$.dirty&256&&({value:i=""}=p),t.$$.dirty&4096&&n(11,{collectionName:r,fileName:s,currentValues:l}=c??{},l),t.$$.dirty&2080&&n(9,o=l[f]),t.$$.dirty&32&&n(10,a=Hr(f)),t.$$.dirty&1024&&(u=new Intl.ListFormat(a,{style:"narrow",type:"conjunction"})),t.$$.dirty&512&&k()},[g,h,v,b,w,f,d,m,p,o,a,l,c]}class AH extends ie{constructor(e){super(),ne(this,e,TH,EH,te,{locale:5,keyPath:6,fieldId:1,fieldLabel:7,fieldConfig:8,currentValue:0,readonly:2,required:3,invalid:4})}}const CH=(t,e)=>{const{format:n,date_format:i,picker_utc:r=!1}=e,s=i===!1;if(t==="")return"";if(t){if(s)return t;try{return n?(r?De.utc(t):De(t)).format(n):new Date(t).toISOString()}catch(l){console.error(l);return}}},NH=(t,e)=>{const{required:n=!0,format:i,date_format:r,time_format:s,picker_utc:l=!1}=e,o=s===!1,a=r===!1;if(!(!n&&!t)){if(o&&t?.match(/^\d{4}-\d{2}-\d{2}$/)||a&&t?.match(/^\d{2}:\d{2}$/))return t;try{const{year:u,month:c,day:f,hour:d,minute:h}=Df({date:t?(l?De.utc(t,i):De(t,i)).toDate():new Date,timeZone:l?"UTC":void 0}),m=`${u}-${c}-${f}`,p=`${d}:${h}`;return o?m:a?p:`${m}T${p}`}catch(u){console.error(u);return}}},LH=(t,e)=>{const{format:n,date_format:i,picker_utc:r=!1}=e,s=i===!1;if(t)try{return n?r?De.utc(t,n).toDate():De(t,n).toDate():s?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):new Date(t)}catch(l){console.error(l);return}};function OH(t){ye(t,"svelte-1pvuczz","div.svelte-1pvuczz.svelte-1pvuczz{display:flex;align-items:center}div.svelte-1pvuczz input.svelte-1pvuczz{margin-right:auto;color:inherit;background-color:transparent;font-family:var(--sui-textbox-font-family)}div.svelte-1pvuczz input.svelte-1pvuczz:disabled{opacity:0.4}div.svelte-1pvuczz button{margin:4px}")}function PH(t){let e,n,i,r,s,l,o=[{type:t[6]?"date":t[5]?"time":"datetime-local"},{readOnly:t[1]},{"aria-readonly":t[1]},{"aria-required":t[2]},{"aria-invalid":t[3]},{"aria-labelledby":i=t[0]+"-label"},{"aria-errormessage":r=t[0]+"-error"}],a={};for(let u=0;u<o.length;u+=1)a=Z(a,o[u]);return{c(){e=F("div"),n=F("input"),je(n,a),re(n,"svelte-1pvuczz",!0),C(e,"role","none"),C(e,"class","svelte-1pvuczz")},m(u,c){A(u,e,c),$(e,n),n.autofocus&&n.focus(),ss(n,t[4]),s||(l=Fe(n,"input",t[14]),s=!0)},p(u,[c]){je(n,a=Ge(o,[c&96&&{type:u[6]?"date":u[5]?"time":"datetime-local"},c&2&&{readOnly:u[1]},c&2&&{"aria-readonly":u[1]},c&4&&{"aria-required":u[2]},c&8&&{"aria-invalid":u[3]},c&1&&i!==(i=u[0]+"-label")&&{"aria-labelledby":i},c&1&&r!==(r=u[0]+"-error")&&{"aria-errormessage":r}])),c&16&&n.value!==u[4]&&ss(n,u[4]),re(n,"svelte-1pvuczz",!0)},i:H,o:H,d(u){u&&T(e),s=!1,l()}}}function IH(t,e,n){let i,r,s,l,{locale:o}=e,{keyPath:a}=e,{fieldId:u}=e,{fieldLabel:c}=e,{fieldConfig:f}=e,{currentValue:d}=e,{readonly:h=!1}=e,{required:m=!1}=e,{invalid:p=!1}=e,g;const v=()=>{const k=NH(d,f);k!==void 0&&k!==g&&n(4,g=k)},b=()=>{const k=CH(g,f);k!==void 0&&k!==d&&n(7,d=k)};function w(){g=this.value,n(4,g)}return t.$$set=k=>{"locale"in k&&n(8,o=k.locale),"keyPath"in k&&n(9,a=k.keyPath),"fieldId"in k&&n(0,u=k.fieldId),"fieldLabel"in k&&n(10,c=k.fieldLabel),"fieldConfig"in k&&n(11,f=k.fieldConfig),"currentValue"in k&&n(7,d=k.currentValue),"readonly"in k&&n(1,h=k.readonly),"required"in k&&n(2,m=k.required),"invalid"in k&&n(3,p=k.invalid)},t.$$.update=()=>{t.$$.dirty&2048&&n(12,{date_format:i,time_format:r}=f,i,(n(13,r),n(11,f))),t.$$.dirty&8192&&n(6,s=r===!1),t.$$.dirty&4096&&n(5,l=i===!1),t.$$.dirty&128&&v(),t.$$.dirty&16&&b()},[u,h,m,p,g,l,s,d,o,a,c,f,i,r,w]}class DH extends ie{constructor(e){super(),ne(this,e,IH,PH,te,{locale:8,keyPath:9,fieldId:0,fieldLabel:10,fieldConfig:11,currentValue:7,readonly:1,required:2,invalid:3},OH)}}function Pv(t){let e;function n(s,l){return s[3]?RH:MH}let i=n(t),r=i(t);return{c(){e=F("p"),r.c()},m(s,l){A(s,e,l),r.m(e,null)},p(s,l){i===(i=n(s))&&r?r.p(s,l):(r.d(1),r=i(s),r&&(r.c(),r.m(e,null)))},d(s){s&&T(e),r.d()}}}function MH(t){let e,n;function i(l,o){return l[4]?FH:$H}let r=i(t),s=r(t);return{c(){e=F("time"),s.c(),C(e,"datetime",n=t[2].toJSON())},m(l,o){A(l,e,o),s.m(e,null)},p(l,o){r===(r=i(l))&&s?s.p(l,o):(s.d(1),s=r(l),s&&(s.c(),s.m(e,null))),o&4&&n!==(n=l[2].toJSON())&&C(e,"datetime",n)},d(l){l&&T(e),s.d()}}}function RH(t){let e=t[2].toLocaleTimeString(t[1],t[7])+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&6&&e!==(e=i[2].toLocaleTimeString(i[1],i[7])+"")&&X(n,e)},d(i){i&&T(n)}}}function $H(t){let e=t[2].toLocaleString(t[1],{...t[6],...t[7],timeZone:t[5]?"UTC":void 0})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&38&&e!==(e=i[2].toLocaleString(i[1],{...i[6],...i[7],timeZone:i[5]?"UTC":void 0})+"")&&X(n,e)},d(i){i&&T(n)}}}function FH(t){let e=t[2].toLocaleDateString(t[1],{...t[6],timeZone:t[5]||t[4]&&t[0]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||t[4]&&t[0]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&55&&e!==(e=i[2].toLocaleDateString(i[1],{...i[6],timeZone:i[5]||i[4]&&i[0]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||i[4]&&i[0]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"")&&X(n,e)},d(i){i&&T(n)}}}function zH(t){let e,n=t[2]&&Pv(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,[r]){i[2]?n?n.p(i,r):(n=Pv(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:H,o:H,d(i){i&&T(e),n&&n.d(i)}}}function jH(t,e,n){let i,r,s,l,o,a,u,{locale:c}=e,{keyPath:f}=e,{fieldConfig:d}=e,{currentValue:h}=e;const m={year:"numeric",month:"short",day:"numeric"},p={hour:"numeric",minute:"numeric",hour12:!0};return t.$$set=g=>{"locale"in g&&n(8,c=g.locale),"keyPath"in g&&n(9,f=g.keyPath),"fieldConfig"in g&&n(10,d=g.fieldConfig),"currentValue"in g&&n(0,h=g.currentValue)},t.$$.update=()=>{t.$$.dirty&1024&&n(11,{date_format:i,time_format:r,picker_utc:s=!1}=d,i,(n(12,r),n(10,d)),(n(5,s),n(10,d))),t.$$.dirty&4096&&n(4,l=r===!1),t.$$.dirty&2048&&n(3,o=i===!1),t.$$.dirty&1025&&n(2,a=LH(h,d)),t.$$.dirty&256&&n(1,u=Hr(c))},[h,u,a,o,l,s,m,p,c,f,d,i,r]}class BH extends ie{constructor(e){super(),ne(this,e,jH,zH,te,{locale:8,keyPath:9,fieldConfig:10,currentValue:0})}}function UH(t){ye(t,"svelte-d1nqp6",'.wrapper.svelte-d1nqp6{display:contents}.wrapper.svelte-d1nqp6 .listbox{gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2)}.wrapper.svelte-d1nqp6 .listbox .option button{border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none}.wrapper.svelte-d1nqp6 .listbox .option button:focus-visible{outline-color:transparent}.wrapper.svelte-d1nqp6 .listbox .option button .preview{flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain}.wrapper.svelte-d1nqp6 .listbox .option button[aria-selected="true"] .icon{display:none}.wrapper.svelte-d1nqp6 .listbox .name{display:-webkit-box;min-height:calc(var(--sui-font-size-default) * 2);-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact)}.wrapper.svelte-d1nqp6 .listbox.grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto}.wrapper.svelte-d1nqp6 .listbox.grid .option button{flex-direction:column;justify-content:flex-start}.wrapper.svelte-d1nqp6 .listbox.grid .option button .preview{width:100%;height:auto}.wrapper.svelte-d1nqp6 .listbox.grid .option button .name{flex:none;padding:4px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);color:var(--sui-secondary-foreground-color)}.wrapper.svelte-d1nqp6 .listbox.grid button[aria-selected="true"] .preview{outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light)}.wrapper.svelte-d1nqp6:not(.wrapper.show-title) .listbox.grid .option .name{position:absolute;left:-99999px}.wrapper.svelte-d1nqp6 .listbox.list .option button{gap:16px}.wrapper.svelte-d1nqp6 .listbox.list .option button .preview{width:64px}.wrapper.svelte-d1nqp6 .listbox.list .option button .name{flex:auto}.wrapper.svelte-d1nqp6 .listbox.list .option button[aria-selected="true"]{outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light)}')}function qH(t){let e;const n=t[4].default,i=ke(n,t,t[6],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),e=!0},p(r,s){i&&i.p&&(!e||s&64)&&Ee(i,n,r,r[6],e?Se(n,r[6],s,null):Te(r[6]),null)},i(r){e||(_(i,r),e=!0)},o(r){y(i,r),e=!1},d(r){i&&i.d(r)}}}function HH(t){let e,n,i;return n=new Ma({props:{id:t[1],class:t[0],"aria-label":t[3]("assets_dialog.available_images"),$$slots:{default:[qH]},$$scope:{ctx:t}}}),n.$on("change",t[5]),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-d1nqp6"),re(e,"show-title",t[2])},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&2&&(l.id=r[1]),s&1&&(l.class=r[0]),s&8&&(l["aria-label"]=r[3]("assets_dialog.available_images")),s&64&&(l.$$scope={dirty:s,ctx:r}),n.$set(l),(!i||s&4)&&re(e,"show-title",r[2])},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function xH(t,e,n){let i;B(t,ue,c=>n(3,i=c));let{$$slots:r={},$$scope:s}=e,{viewType:l="grid"}=e,{gridId:o=void 0}=e,{showTitle:a=!1}=e;function u(c){fe.call(this,t,c)}return t.$$set=c=>{"viewType"in c&&n(0,l=c.viewType),"gridId"in c&&n(1,o=c.gridId),"showTitle"in c&&n(2,a=c.showTitle),"$$scope"in c&&n(6,s=c.$$scope)},[l,o,a,i,r,u,s]}class sT extends ie{constructor(e){super(),ne(this,e,xH,HH,te,{viewType:0,gridId:1,showTitle:2},UH)}}function VH(t){ye(t,"svelte-1943iam",".grid-wrapper.svelte-1943iam{display:contents}")}function Iv(t,e,n){const i=t.slice();i[9]=e[n];const r=i[9];return i[10]=r.sha,i[11]=r.kind,i[12]=r.name,i}function WH(t){let e,n;return e=new qn({props:{$$slots:{default:[GH]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32800&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function YH(t){let e,n,i;return n=new sT({props:{gridId:t[2],viewType:t[1],showTitle:!0,$$slots:{default:[ZH]},$$scope:{ctx:t}}}),n.$on("change",t[8]),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","grid-wrapper svelte-1943iam")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s&4&&(l.gridId=r[2]),s&2&&(l.viewType=r[1]),s&32792&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function GH(t){let e,n=t[5]("no_files_found")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&32&&n!==(n=r[5]("no_files_found")+"")&&X(i,n)},d(r){r&&T(e)}}}function KH(t){let e,n,i,r=kn.sanitize(t[12].replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})+"",s,l;return e=new _s({props:{kind:t[11],asset:t[9],variant:"tile",checkerboard:t[3]}}),{c(){O(e.$$.fragment),n=j(),i=F("span"),s=j(),C(i,"role","none"),C(i,"class","name")},m(o,a){N(e,o,a),A(o,n,a),A(o,i,a),i.innerHTML=r,A(o,s,a),l=!0},p(o,a){const u={};a&16&&(u.kind=o[11]),a&16&&(u.asset=o[9]),a&8&&(u.checkerboard=o[3]),e.$set(u),(!l||a&16)&&r!==(r=kn.sanitize(o[12].replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})+"")&&(i.innerHTML=r)},i(o){l||(_(e.$$.fragment,o),l=!0)},o(o){y(e.$$.fragment,o),l=!1},d(o){o&&(T(n),T(i),T(s)),L(e,o)}}}function Dv(t,e){let n,i,r;return i=new mi({props:{label:"",value:e[10],$$slots:{default:[KH]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&16&&(o.value=e[10]),l&32792&&(o.$$scope={dirty:l,ctx:e}),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function ZH(t){let e=[],n=new Map,i,r,s=be(t[4]);const l=o=>o[9].path;for(let o=0;o<s.length;o+=1){let a=Iv(t,s,o),u=l(a);n.set(u,e[o]=Dv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&24&&(s=be(o[4]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Dv,i,Iv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function JH(t){let e,n,i,r;const s=[YH,WH],l=[];function o(a,u){return a[4].length?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,[u]){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function XH(t,e,n){let i,r;B(t,ue,d=>n(5,r=d));const s=sn();let{assets:l=[]}=e,{viewType:o="grid"}=e,{searchTerms:a=""}=e,{gridId:u=void 0}=e,{checkerboard:c=!1}=e;const f=d=>{s("select",{asset:l.find(({sha:h})=>h===d.detail.value)})};return t.$$set=d=>{"assets"in d&&n(0,l=d.assets),"viewType"in d&&n(1,o=d.viewType),"searchTerms"in d&&n(7,a=d.searchTerms),"gridId"in d&&n(2,u=d.gridId),"checkerboard"in d&&n(3,c=d.checkerboard)},t.$$.update=()=>{t.$$.dirty&129&&n(4,i=a?l.filter(({name:d})=>d.toLowerCase().includes(a.toLowerCase())):l)},[l,o,u,c,i,r,s,a,f]}class gg extends ie{constructor(e){super(),ne(this,e,XH,JH,te,{assets:0,viewType:1,searchTerms:7,gridId:2,checkerboard:3},VH)}}function QH(t){ye(t,"svelte-t9mjci","p.svelte-t9mjci{margin:0 0 8px}.input-outer.svelte-t9mjci{width:400px;text-align:center}")}function Mv(t,e,n){const i=t.slice();return i[36]=e[n].id,i[37]=e[n].previewURL,i[38]=e[n].description,i[39]=e[n].kind,i}function ex(t){let e,n;return e=new qn({props:{$$slots:{default:[ix]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&524288|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function tx(t){let e,n;return e=new qn({props:{$$slots:{default:[rx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1047798|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function nx(t){let e,n,i,r;const s=[ax,ox,lx,sx],l=[];function o(a,u){return a[9]?0:a[8]?a[8].length?3:2:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function ix(t){let e,n=t[19]("cloud_storage.invalid")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&524288&&n!==(n=r[19]("cloud_storage.invalid")+"")&&X(i,n)},d(r){r&&T(e)}}}function Rv(t){let e,n=kn.sanitize(t[19]("prefs.media.stock_photos.description",{values:{service:t[16],homeHref:`href="${t[14]}"`,apiKeyHref:`href="${t[13]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",i;return{c(){e=new xc(!1),i=Q(),e.a=i},m(r,s){e.m(n,r,s),A(r,i,s)},p(r,s){s[0]&614400&&n!==(n=kn.sanitize(r[19]("prefs.media.stock_photos.description",{values:{service:r[16],homeHref:`href="${r[14]}"`,apiKeyHref:`href="${r[13]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(n)},d(r){r&&(T(i),e.d())}}}function $v(t){let e,n=kn.sanitize(t[19](`cloud_storage.auth.${t[7]}`,{values:{service:t[16]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",i;return{c(){e=new xc(!1),i=Q(),e.a=i},m(r,s){e.m(n,r,s),A(r,i,s)},p(r,s){s[0]&589952&&n!==(n=kn.sanitize(r[19](`cloud_storage.auth.${r[7]}`,{values:{service:r[16]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(n)},d(r){r&&(T(i),e.d())}}}function Fv(t){let e,n,i;return n=new Sn({props:{flex:!0,spellcheck:"false","aria-label":t[19]("prefs.media.stock_photos.field_label",{values:{service:t[16]}})}}),n.$on("input",t[28]),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","input-outer svelte-t9mjci")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s[0]&589824&&(l["aria-label"]=r[19]("prefs.media.stock_photos.field_label",{values:{service:r[16]}})),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function zv(t){let e,n,i,r,s,l,o,a,u,c,f;function d(g){t[29](g)}let h={flex:!0,spellcheck:"false","aria-label":t[19]("user_name"),disabled:t[7]==="requested"};t[2].userName!==void 0&&(h.value=t[2].userName),n=new Sn({props:h}),ae.push(()=>Re(n,"value",d));function m(g){t[30](g)}let p={"aria-label":t[19]("password"),disabled:t[7]==="requested"};return t[2].password!==void 0&&(p.value=t[2].password),l=new XI({props:p}),ae.push(()=>Re(l,"value",m)),c=new et({props:{variant:"secondary",label:t[19]("sign_in"),disabled:!t[2].userName||!t[2].password||t[7]==="requested"}}),c.$on("click",t[31]),{c(){e=F("div"),O(n.$$.fragment),r=j(),s=F("div"),O(l.$$.fragment),a=j(),u=F("div"),O(c.$$.fragment),C(e,"role","none"),C(e,"class","input-outer svelte-t9mjci"),C(s,"role","none"),C(s,"class","input-outer svelte-t9mjci"),C(u,"role","none"),C(u,"class","input-outer svelte-t9mjci")},m(g,v){A(g,e,v),N(n,e,null),A(g,r,v),A(g,s,v),N(l,s,null),A(g,a,v),A(g,u,v),N(c,u,null),f=!0},p(g,v){const b={};v[0]&524288&&(b["aria-label"]=g[19]("user_name")),v[0]&128&&(b.disabled=g[7]==="requested"),!i&&v[0]&4&&(i=!0,b.value=g[2].userName,$e(()=>i=!1)),n.$set(b);const w={};v[0]&524288&&(w["aria-label"]=g[19]("password")),v[0]&128&&(w.disabled=g[7]==="requested"),!o&&v[0]&4&&(o=!0,w.value=g[2].password,$e(()=>o=!1)),l.$set(w);const k={};v[0]&524288&&(k.label=g[19]("sign_in")),v[0]&132&&(k.disabled=!g[2].userName||!g[2].password||g[7]==="requested"),c.$set(k)},i(g){f||(_(n.$$.fragment,g),_(l.$$.fragment,g),_(c.$$.fragment,g),f=!0)},o(g){y(n.$$.fragment,g),y(l.$$.fragment,g),y(c.$$.fragment,g),f=!1},d(g){g&&(T(e),T(r),T(s),T(a),T(u)),L(n),L(l),L(c)}}}function rx(t){let e,n,i,r,s,l,o=t[17]==="stock_photos"&&Rv(t),a=t[17]==="cloud_storage"&&$v(t),u=t[15]==="api_key"&&Fv(t),c=t[15]==="password"&&zv(t);return{c(){e=F("p"),o&&o.c(),n=j(),a&&a.c(),i=j(),u&&u.c(),r=j(),c&&c.c(),s=Q(),C(e,"role","alert"),C(e,"class","svelte-t9mjci")},m(f,d){A(f,e,d),o&&o.m(e,null),$(e,n),a&&a.m(e,null),A(f,i,d),u&&u.m(f,d),A(f,r,d),c&&c.m(f,d),A(f,s,d),l=!0},p(f,d){f[17]==="stock_photos"?o?o.p(f,d):(o=Rv(f),o.c(),o.m(e,n)):o&&(o.d(1),o=null),f[17]==="cloud_storage"?a?a.p(f,d):(a=$v(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null),f[15]==="api_key"?u?(u.p(f,d),d[0]&32768&&_(u,1)):(u=Fv(f),u.c(),_(u,1),u.m(r.parentNode,r)):u&&(x(),y(u,1,1,()=>{u=null}),V()),f[15]==="password"?c?(c.p(f,d),d[0]&32768&&_(c,1)):(c=zv(f),c.c(),_(c,1),c.m(s.parentNode,s)):c&&(x(),y(c,1,1,()=>{c=null}),V())},i(f){l||(_(u),_(c),l=!0)},o(f){y(u),y(c),l=!1},d(f){f&&(T(e),T(i),T(r),T(s)),o&&o.d(),a&&a.d(),u&&u.d(f),c&&c.d(f)}}}function sx(t){let e,n;return e=new sT({props:{gridId:t[0],viewType:t[20]?.type,$$slots:{default:[cx]},$$scope:{ctx:t}}}),e.$on("change",t[27]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1&&(s.gridId=i[0]),r[0]&1048576&&(s.viewType=i[20]?.type),r[0]&256|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function lx(t){let e,n;return e=new qn({props:{$$slots:{default:[fx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&524288|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ox(t){let e,n;return e=new qn({props:{$$slots:{default:[dx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&524288|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ax(t){let e,n;return e=new qn({props:{$$slots:{default:[hx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&524800|r[1]&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ux(t){let e,n,i,r=t[38]+"",s,l,o;return e=new _s({props:{kind:t[39],src:t[37],variant:"tile",crossorigin:"anonymous"}}),{c(){O(e.$$.fragment),n=j(),i=F("span"),s=G(r),l=j(),C(i,"role","none"),C(i,"class","name")},m(a,u){N(e,a,u),A(a,n,u),A(a,i,u),$(i,s),A(a,l,u),o=!0},p(a,u){const c={};u[0]&256&&(c.kind=a[39]),u[0]&256&&(c.src=a[37]),e.$set(c),(!o||u[0]&256)&&r!==(r=a[38]+"")&&X(s,r)},i(a){o||(_(e.$$.fragment,a),o=!0)},o(a){y(e.$$.fragment,a),o=!1},d(a){a&&(T(n),T(i),T(l)),L(e,a)}}}function jv(t,e){let n,i,r;return i=new mi({props:{label:"",value:e[36],$$slots:{default:[ux]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l[0]&256&&(o.value=e[36]),l[0]&256|l[1]&2048&&(o.$$scope={dirty:l,ctx:e}),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function cx(t){let e=[],n=new Map,i,r,s=be(t[8]);const l=o=>o[36];for(let o=0;o<s.length;o+=1){let a=Mv(t,s,o),u=l(a);n.set(u,e[o]=jv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a[0]&256&&(s=be(o[8]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,jv,i,Mv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function fx(t){let e,n=t[19]("no_files_found")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&524288&&n!==(n=r[19]("no_files_found")+"")&&X(i,n)},d(r){r&&T(e)}}}function dx(t){let e,n=t[19]("searching")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&524288&&n!==(n=r[19]("searching")+"")&&X(i,n)},d(r){r&&T(e)}}}function hx(t){let e,n=t[19](`assets_dialog.error.${t[9]}`)+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","alert")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&524800&&n!==(n=r[19](`assets_dialog.error.${r[9]}`)+"")&&X(i,n)},d(r){r&&T(e)}}}function px(t){let e,n,i,r;const s=[nx,tx,ex],l=[];function o(a,u){return a[1]?0:a[3]?1:2}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function mx(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g;B(t,Lt,_e=>n(18,m=_e)),B(t,ue,_e=>n(19,p=_e)),B(t,iu,_e=>n(20,g=_e));let{kind:v="image"}=e,{searchTerms:b=""}=e,{serviceProps:w}=e,{gridId:k=void 0}=e;const S=sn(),E={userName:"",password:""};let P=!0,M=!1,I="",D="",z="",R=0,U="initial",W=null,ee;const K=async(_e="")=>{n(8,W=null);try{n(8,W=await h(_e,{kind:v,apiKey:I,userName:D,password:z}))}catch(Be){n(9,ee="search_fetch_failed"),console.error(Be)}},ve=async _e=>{const{downloadURL:Be,fileName:Ke,credit:de}=_e;if(l){S("select",{url:Be,credit:de});return}try{const ge=await fetch(Be),{ok:pe,status:We}=ge;if(!pe)throw new Error(`The response returned with HTTP status ${We}.`);const ot=await ge.blob(),oe=new File([ot],Ke,{type:ot.type});S("select",{file:oe,credit:de})}catch(ge){n(9,ee="image_fetch_failed"),console.error(ge)}};Ut(()=>{(async()=>(typeof f=="function"&&(n(3,P=!1),n(3,P=await f())),P&&(n(4,I=m.apiKeys?.[r]??""),n(5,[D,z]=(m.logins?.[r]??"").split(" "),D,n(6,z)),n(1,M=!!I||!!z),n(8,W=null),M&&K())))()});const me=_e=>{const{value:Be}=_e.detail,Ke=W?.find(({id:de})=>de===Be);Ke&&ve(Ke)},se=_e=>{const Be=_e.target.value.trim();c&&Be.match(c)&&(n(4,I=Be),n(1,M=!0),ze(Lt,m.apiKeys??={},m),ze(Lt,m.apiKeys[r]=I,m),K())};function q(_e){t.$$.not_equal(E.userName,_e)&&(E.userName=_e,n(2,E))}function J(_e){t.$$.not_equal(E.password,_e)&&(E.password=_e,n(2,E))}const Le=async()=>{n(7,U="requested"),n(2,E.userName=E.userName.trim(),E),n(2,E.password=E.password.trim(),E),await d?.(E.userName,E.password)?(n(7,U="success"),n(5,D=E.userName),n(6,z=E.password),n(1,M=!0),ze(Lt,m.logins??={},m),ze(Lt,m.logins[r]=[D,z].join(" "),m),K()):n(7,U="error")};return t.$$set=_e=>{"kind"in _e&&n(23,v=_e.kind),"searchTerms"in _e&&n(24,b=_e.searchTerms),"serviceProps"in _e&&n(25,w=_e.serviceProps),"gridId"in _e&&n(0,k=_e.gridId)},t.$$.update=()=>{t.$$.dirty[0]&33554432&&n(17,{serviceType:i="stock_photos",serviceId:r="",serviceLabel:s="",hotlinking:l=!1,authType:o="api_key",developerURL:a="",apiKeyURL:u="",apiKeyPattern:c,init:f,signIn:d,search:h}=w,i,(n(10,r),n(25,w)),(n(16,s),n(25,w)),(n(15,o),n(25,w)),(n(14,a),n(25,w)),(n(13,u),n(25,w)),(n(12,c),n(25,w)),(n(11,d),n(25,w))),t.$$.dirty[0]&83886082&&(window.clearTimeout(R),n(26,R=window.setTimeout(()=>{M&&K(b)},1e3)))},[k,M,E,P,I,D,z,U,W,ee,r,d,c,u,a,o,s,i,m,p,g,K,ve,v,b,w,R,me,se,q,J,Le]}class lT extends ie{constructor(e){super(),ne(this,e,mx,px,te,{kind:23,searchTerms:24,serviceProps:25,gridId:0},QH,[-1,-1])}}const gx=["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"],Bv="https://api.pexels.com/v1",_x=async(t,{apiKey:e})=>{const n={Authorization:e},[i]=le(un).toLowerCase().split("-");let r=[];if(t)for(let s=1;s<=2;s+=1){const l=new URLSearchParams({query:t,locale:gx.find(c=>c.split("-")[0]===i)||"en-US",page:s,per_page:80}),o=await fetch(`${Bv}/search?${l.toString()}`,{headers:n});if(!o.ok)return Promise.reject();const{photos:a,next_page:u}=await o.json();if(r.push(...a),!u)break;await hs(50)}else{const s=new URLSearchParams({per_page:80}),l=await fetch(`${Bv}/curated?${s.toString()}`,{headers:n});if(!l.ok)return Promise.reject();r=(await l.json()).photos}return r.map(({id:s,url:l,alt:o,src:{large2x:a,medium:u},photographer:c})=>({id:String(s),description:l.match(/\/photo\/(.+?)-\d+\/$/)?.[1].replace(/-/g," ")??o,previewURL:u,downloadURL:a,fileName:`pexels-${c.split(/\s+/).join("-").toLowerCase()}-${s}.jpg`,kind:"image",credit:`<a href="${l}">Photo by ${c} on Pexels</a>`}))},bx={serviceType:"stock_photos",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:_x},vx=["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"],yx="https://pixabay.com/api",wx=async(t,{apiKey:e})=>{const[n]=le(un).toLowerCase().split("-"),i=new URLSearchParams({key:e,q:t,lang:vx.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),r=await fetch(`${yx}/?${i.toString()}`);return r.ok?(await r.json()).hits.map(({id:l,webformatURL:o,previewURL:a,largeImageURL:u,imageWidth:c,imageHeight:f,pageURL:d,tags:h,user:m})=>({id:String(l),description:h,previewURL:o.replace("_640.",c>f?"_180.":"_340."),downloadURL:u,fileName:a.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${d}">Photo by ${m} on Pixabay`})):Promise.reject()},kx={serviceType:"stock_photos",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:wx},Sx=["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"],Uv="https://api.unsplash.com",qv="utm_source=sveltia-cms&utm_medium=referral",Ex=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[i]=le(un).toLowerCase().split("-");let r=[];if(t)for(let s=1;s<=5;s+=1){const l=new URLSearchParams({query:t,lang:Sx.includes(i)?i:"en",page:s,per_page:30}),o=await fetch(`${Uv}/search/photos?${l.toString()}`,{headers:n});if(!o.ok)return Promise.reject();const{results:a,total_pages:u}=await o.json();if(r.push(...a),u===s)break;await hs(50)}else{const s=new URLSearchParams({per_page:30}),l=await fetch(`${Uv}/photos?${s.toString()}`,{headers:n});if(!l.ok)return Promise.reject();r=await l.json()}return r.map(({id:s,description:l,alt_description:o,urls:{regular:a,thumb:u},user:{username:c,name:f}})=>({id:String(s),description:[l,o].filter(Boolean).join(" — "),previewURL:u,downloadURL:a,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${s}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${c}?${qv}">${f}</a> on <a href="https://unsplash.com/?${qv}">Unsplash</a>`}))},Tx={serviceType:"stock_photos",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:Ex},Ys={},fs={pexels:bx,pixabay:kx,unsplash:Tx};function Ax(t){ye(t,"svelte-v3cscd",".wrapper.svelte-v3cscd.svelte-v3cscd{display:flex;gap:16px;height:60vh}.wrapper.svelte-v3cscd .listbox{flex:none;background-color:transparent}.wrapper.svelte-v3cscd .content-pane.svelte-v3cscd{overflow:auto;flex:auto}")}function Hv(t,e,n){const i=t.slice();return i[43]=e[n][0],i[44]=e[n][1],i}function xv(t,e,n){const i=t.slice();return i[43]=e[n][0],i[44]=e[n][1],i}function Vv(t,e,n){const i=t.slice();return i[43]=e[n].serviceId,i[41]=e[n].serviceLabel,i}function Wv(t,e,n){const i=t.slice();return i[43]=e[n].serviceId,i[41]=e[n].serviceLabel,i}function Qd(t){const e=t.slice(),n=fs[e[3]]??{};return e[40]=n.showServiceLink,e[41]=n.serviceLabel,e[42]=n.serviceURL,e}function Cx(t){let e,n;return e=new mi({props:{name:"upload",label:t[15]("upload"),selected:t[14]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&32768&&(s.label=i[15]("upload")),r[0]&16384&&(s.selected=i[14]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Yv(t){let e,n;return e=new mi({props:{name:"collection-files",label:t[15]("collection_assets"),selected:t[3]==="collection-files"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&32768&&(s.label=i[15]("collection_assets")),r[0]&8&&(s.selected=i[3]==="collection-files"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Nx(t){let e,n,i,r=t[13]&&Yv(t);return n=new mi({props:{name:"all-files",label:t[15]("all_assets"),selected:t[3]==="all-files"}}),{c(){r&&r.c(),e=j(),O(n.$$.fragment)},m(s,l){r&&r.m(s,l),A(s,e,l),N(n,s,l),i=!0},p(s,l){s[13]?r?(r.p(s,l),l[0]&8192&&_(r,1)):(r=Yv(s),r.c(),_(r,1),r.m(e.parentNode,e)):r&&(x(),y(r,1,1,()=>{r=null}),V());const o={};l[0]&32768&&(o.label=s[15]("all_assets")),l[0]&8&&(o.selected=s[3]==="all-files"),n.$set(o)},i(s){i||(_(r),_(n.$$.fragment,s),i=!0)},o(s){y(r),y(n.$$.fragment,s),i=!1},d(s){s&&T(e),r&&r.d(s),L(n,s)}}}function Gv(t){let e,n;return e=new $u({props:{label:t[15]("assets_dialog.location.external_locations"),$$slots:{default:[Lx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&32768&&(s.label=i[15]("assets_dialog.location.external_locations")),r[0]&32772|r[1]&4194304&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Kv(t){let e,n;return e=new mi({props:{name:"enter-url",label:t[15]("assets_dialog.enter_url")}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&32768&&(s.label=i[15]("assets_dialog.enter_url")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Zv(t,e){let n,i,r;return i=new mi({props:{name:e[43],label:e[41]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function Lx(t){let e,n=[],i=new Map,r,s,l=t[2]&&Kv(t),o=be(Object.values(Ys));const a=u=>u[43];for(let u=0;u<o.length;u+=1){let c=Wv(t,o,u),f=a(c);i.set(f,n[u]=Zv(f,c))}return{c(){l&&l.c(),e=j();for(let u=0;u<n.length;u+=1)n[u].c();r=Q()},m(u,c){l&&l.m(u,c),A(u,e,c);for(let f=0;f<n.length;f+=1)n[f]&&n[f].m(u,c);A(u,r,c),s=!0},p(u,c){u[2]?l?(l.p(u,c),c[0]&4&&_(l,1)):(l=Kv(u),l.c(),_(l,1),l.m(e.parentNode,e)):l&&(x(),y(l,1,1,()=>{l=null}),V()),c&0&&(o=be(Object.values(Ys)),x(),n=bt(n,c,a,1,u,o,i,r.parentNode,_t,Zv,r,Wv),V())},i(u){if(!s){_(l);for(let c=0;c<o.length;c+=1)_(n[c]);s=!0}},o(u){y(l);for(let c=0;c<n.length;c+=1)y(n[c]);s=!1},d(u){u&&(T(e),T(r)),l&&l.d(u);for(let c=0;c<n.length;c+=1)n[c].d(u)}}}function Jv(t,e){let n,i,r;return i=new mi({props:{name:e[43],label:e[41]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function Ox(t){let e=[],n=new Map,i,r,s=be(Object.values(fs));const l=o=>o[43];for(let o=0;o<s.length;o+=1){let a=Vv(t,s,o),u=l(a);n.set(u,e[o]=Jv(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&0&&(s=be(Object.values(fs)),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Jv,i,Vv),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Px(t){let e,n,i,r,s=t[2]||!!Object.keys(Ys).length,l,o,a;e=new $u({props:{label:t[15]("assets_dialog.location.local"),$$slots:{default:[Cx]},$$scope:{ctx:t}}}),i=new $u({props:{label:t[15]("assets_dialog.location.repository"),$$slots:{default:[Nx]},$$scope:{ctx:t}}});let u=s&&Gv(t);return o=new $u({props:{label:t[15]("assets_dialog.location.stock_photos"),$$slots:{default:[Ox]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),u&&u.c(),l=j(),O(o.$$.fragment)},m(c,f){N(e,c,f),A(c,n,f),N(i,c,f),A(c,r,f),u&&u.m(c,f),A(c,l,f),N(o,c,f),a=!0},p(c,f){const d={};f[0]&32768&&(d.label=c[15]("assets_dialog.location.local")),f[0]&49152|f[1]&4194304&&(d.$$scope={dirty:f,ctx:c}),e.$set(d);const h={};f[0]&32768&&(h.label=c[15]("assets_dialog.location.repository")),f[0]&40968|f[1]&4194304&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&4&&(s=c[2]||!!Object.keys(Ys).length),s?u?(u.p(c,f),f[0]&4&&_(u,1)):(u=Gv(c),u.c(),_(u,1),u.m(l.parentNode,l)):u&&(x(),y(u,1,1,()=>{u=null}),V());const m={};f[0]&32768&&(m.label=c[15]("assets_dialog.location.stock_photos")),f[1]&4194304&&(m.$$scope={dirty:f,ctx:c}),o.$set(m)},i(c){a||(_(e.$$.fragment,c),_(i.$$.fragment,c),_(u),_(o.$$.fragment,c),a=!0)},o(c){y(e.$$.fragment,c),y(i.$$.fragment,c),y(u),y(o.$$.fragment,c),a=!1},d(c){c&&(T(n),T(r),T(l)),L(e,c),L(i,c),u&&u.d(c),L(o,c)}}}function Xv(t){let e,n,i={accept:t[1]==="image"?"image/*":void 0,showUploadButton:t[14],showFilePreview:!0,$$slots:{default:[Ix]},$$scope:{ctx:t}};return e=new lu({props:i}),t[28](e),e.$on("select",t[29]),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s[0]&2&&(l.accept=r[1]==="image"?"image/*":void 0),s[0]&16384&&(l.showUploadButton=r[14]),s[0]&214290|s[1]&4194304&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[28](null),L(e,r)}}}function Qv(t){let e,n;return e=new gg({props:{assets:t[16].filter(t[26]),viewType:t[17]?.type,searchTerms:t[10],gridId:"select-assets-grid",checkerboard:!0}}),e.$on("select",t[27]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&65554&&(s.assets=i[16].filter(i[26])),r[0]&131072&&(s.viewType=i[17]?.type),r[0]&1024&&(s.searchTerms=i[10]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Ix(t){let e,n,i=!t[14]&&Qv(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[14]?i&&(x(),y(i,1,1,()=>{i=null}),V()):i?(i.p(r,s),s[0]&16384&&_(i,1)):(i=Qv(r),i.c(),_(i,1),i.m(e.parentNode,e))},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function ey(t){let e,n,i={accept:t[1]==="image"?"image/*":void 0,showUploadButton:t[14],showFilePreview:!0,$$slots:{default:[Dx]},$$scope:{ctx:t}};return e=new lu({props:i}),t[32](e),e.$on("select",t[33]),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s[0]&2&&(l.accept=r[1]==="image"?"image/*":void 0),s[0]&16384&&(l.showUploadButton=r[14]),s[0]&476418|s[1]&4194304&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[32](null),L(e,r)}}}function ty(t){let e,n;return e=new gg({props:{assets:t[16].filter(t[30]),viewType:t[17]?.type,searchTerms:t[10],gridId:"select-assets-grid",checkerboard:!0}}),e.$on("select",t[31]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&327682&&(s.assets=i[16].filter(i[30])),r[0]&131072&&(s.viewType=i[17]?.type),r[0]&1024&&(s.searchTerms=i[10]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Dx(t){let e,n,i=!t[14]&&ty(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[14]?i&&(x(),y(i,1,1,()=>{i=null}),V()):i?(i.p(r,s),s[0]&16384&&_(i,1)):(i=ty(r),i.c(),_(i,1),i.m(e.parentNode,e))},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function ny(t){let e,n;return e=new qn({props:{$$slots:{default:[Mx]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&33538|r[1]&4194304&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Mx(t){let e,n=(t[1]==="image"?t[15]("assets_dialog.enter_image_url"):t[15]("assets_dialog.enter_file_url"))+"",i,r,s,l,o;function a(c){t[34](c)}let u={flex:!0};return t[9]!==void 0&&(u.value=t[9]),s=new Sn({props:u}),ae.push(()=>Re(s,"value",a)),s.$on("input",t[35]),{c(){e=F("div"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","none")},m(c,f){A(c,e,f),$(e,i),A(c,r,f),N(s,c,f),o=!0},p(c,f){(!o||f[0]&32770)&&n!==(n=(c[1]==="image"?c[15]("assets_dialog.enter_image_url"):c[15]("assets_dialog.enter_file_url"))+"")&&X(i,n);const d={};!l&&f[0]&512&&(l=!0,d.value=c[9],$e(()=>l=!1)),s.$set(d)},i(c){o||(_(s.$$.fragment,c),o=!0)},o(c){y(s.$$.fragment,c),o=!1},d(c){c&&(T(e),T(r)),L(s,c)}}}function iy(t){let e,n;return e=new lT({props:{kind:t[1],searchTerms:t[10],serviceProps:t[44],gridId:"select-assets-grid"}}),e.$on("select",t[36]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&2&&(s.kind=i[1]),r[0]&1024&&(s.searchTerms=i[10]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ry(t,e){let n,i,r,s=e[3]===e[43]&&iy(e);return{key:t,first:null,c(){n=Q(),s&&s.c(),i=Q(),this.first=n},m(l,o){A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){e=l,e[3]===e[43]?s?(s.p(e,o),o[0]&8&&_(s,1)):(s=iy(e),s.c(),_(s,1),s.m(i.parentNode,i)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(n),T(i)),s&&s.d(l)}}}function sy(t){let e,n;return e=new lT({props:{kind:t[1],searchTerms:t[10],serviceProps:t[44],gridId:"select-assets-grid"}}),e.$on("select",t[37]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&2&&(s.kind=i[1]),r[0]&1024&&(s.searchTerms=i[10]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ly(t,e){let n,i,r,s=e[3]===e[43]&&sy(e);return{key:t,first:null,c(){n=Q(),s&&s.c(),i=Q(),this.first=n},m(l,o){A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){e=l,e[3]===e[43]?s?(s.p(e,o),o[0]&8&&_(s,1)):(s=sy(e),s.c(),_(s,1),s.m(i.parentNode,i)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(n),T(i)),s&&s.d(l)}}}function Rx(t){let e,n,i,r,s,l,o,a=[],u=new Map,c,f=[],d=new Map,h,m;n=new Ma({props:{class:"tabs","aria-label":t[15]("assets_dialog.locations"),"aria-controls":t[7]+"-content-pane",$$slots:{default:[Px]},$$scope:{ctx:t}}}),n.$on("change",t[25]);let p=t[13]&&(t[3]==="collection-files"||t[14])&&Xv(t),g=(t[3]==="all-files"||!t[13]&&t[14])&&ey(t),v=t[2]&&t[3]==="enter-url"&&ny(t),b=be(Object.entries(Ys));const w=E=>E[43];for(let E=0;E<b.length;E+=1){let P=xv(t,b,E),M=w(P);u.set(M,a[E]=ry(M,P))}let k=be(Object.entries(fs));const S=E=>E[43];for(let E=0;E<k.length;E+=1){let P=Hv(t,k,E),M=S(P);d.set(M,f[E]=ly(M,P))}return{c(){e=F("div"),O(n.$$.fragment),i=j(),r=F("div"),p&&p.c(),s=j(),g&&g.c(),l=j(),v&&v.c(),o=j();for(let E=0;E<a.length;E+=1)a[E].c();c=j();for(let E=0;E<f.length;E+=1)f[E].c();C(r,"role","none"),C(r,"id",h=t[7]+"-content-pane"),C(r,"class","content-pane svelte-v3cscd"),C(e,"role","none"),C(e,"class","wrapper svelte-v3cscd")},m(E,P){A(E,e,P),N(n,e,null),$(e,i),$(e,r),p&&p.m(r,null),$(r,s),g&&g.m(r,null),$(r,l),v&&v.m(r,null),$(r,o);for(let M=0;M<a.length;M+=1)a[M]&&a[M].m(r,null);$(r,c);for(let M=0;M<f.length;M+=1)f[M]&&f[M].m(r,null);m=!0},p(E,P){const M={};P[0]&32768&&(M["aria-label"]=E[15]("assets_dialog.locations")),P[0]&128&&(M["aria-controls"]=E[7]+"-content-pane"),P[0]&57356|P[1]&4194304&&(M.$$scope={dirty:P,ctx:E}),n.$set(M),E[13]&&(E[3]==="collection-files"||E[14])?p?(p.p(E,P),P[0]&24584&&_(p,1)):(p=Xv(E),p.c(),_(p,1),p.m(r,s)):p&&(x(),y(p,1,1,()=>{p=null}),V()),E[3]==="all-files"||!E[13]&&E[14]?g?(g.p(E,P),P[0]&24584&&_(g,1)):(g=ey(E),g.c(),_(g,1),g.m(r,l)):g&&(x(),y(g,1,1,()=>{g=null}),V()),E[2]&&E[3]==="enter-url"?v?(v.p(E,P),P[0]&12&&_(v,1)):(v=ny(E),v.c(),_(v,1),v.m(r,o)):v&&(x(),y(v,1,1,()=>{v=null}),V()),P[0]&1290&&(b=be(Object.entries(Ys)),x(),a=bt(a,P,w,1,E,b,u,r,_t,ry,c,xv),V()),P[0]&1290&&(k=be(Object.entries(fs)),x(),f=bt(f,P,S,1,E,k,d,r,_t,ly,null,Hv),V()),(!m||P[0]&128&&h!==(h=E[7]+"-content-pane"))&&C(r,"id",h)},i(E){if(!m){_(n.$$.fragment,E),_(p),_(g),_(v);for(let P=0;P<b.length;P+=1)_(a[P]);for(let P=0;P<k.length;P+=1)_(f[P]);m=!0}},o(E){y(n.$$.fragment,E),y(p),y(g),y(v);for(let P=0;P<a.length;P+=1)y(a[P]);for(let P=0;P<f.length;P+=1)y(f[P]);m=!1},d(E){E&&T(e),L(n),p&&p.d(),g&&g.d(),v&&v.d();for(let P=0;P<a.length;P+=1)a[P].d();for(let P=0;P<f.length;P+=1)f[P].d()}}}function oy(t){let e,n,i,r,s;e=new mg({props:{currentView:iu,"aria-controls":"select-assets-grid"}});function l(a){t[24](a)}let o={disabled:!!t[8]?.file,"aria-label":t[15](`assets_dialog.search_for_${t[1]??"file"}`)};return t[10]!==void 0&&(o.value=t[10]),i=new Ap({props:o}),ae.push(()=>Re(i,"value",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,u){const c={};u[0]&256&&(c.disabled=!!a[8]?.file),u[0]&32770&&(c["aria-label"]=a[15](`assets_dialog.search_for_${a[1]??"file"}`)),!r&&u[0]&1024&&(r=!0,c.value=a[10],$e(()=>r=!1)),i.$set(c)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function $x(t){let e,n,i=(t[12]||t[11])&&oy(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[12]||r[11]?i?(i.p(r,s),s[0]&6144&&_(i,1)):(i=oy(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function ay(t){let e,n=t[40]&&uy(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,r){i[40]?n?n.p(i,r):(n=uy(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&T(e),n&&n.d(i)}}}function uy(t){let e,n=t[15]("prefs.media.stock_photos.credit",{values:{service:t[41]}})+"",i,r;return{c(){e=F("a"),i=G(n),C(e,"href",r=t[42])},m(s,l){A(s,e,l),$(e,i)},p(s,l){l[0]&32776&&n!==(n=s[15]("prefs.media.stock_photos.credit",{values:{service:s[41]}})+"")&&X(i,n),l[0]&8&&r!==(r=s[42])&&C(e,"href",r)},d(s){s&&T(e)}}}function Fx(t){let e,n=t[11]&&ay(Qd(t));return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,r){i[11]?n?n.p(Qd(i),r):(n=ay(Qd(i)),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&T(e),n&&n.d(i)}}}function zx(t){let e,n,i;function r(l){t[38](l)}let s={title:t[20],size:"x-large",okLabel:t[15]("insert"),okDisabled:!t[8],$$slots:{"footer-extra":[Fx],"header-extra":[$x],default:[Rx]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Br({props:s}),ae.push(()=>Re(e,"open",r)),e.$on("ok",t[39]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o[0]&32768&&(a.okLabel=l[15]("insert")),o[0]&256&&(a.okDisabled=!l[8]),o[0]&524286|o[1]&4194304&&(a.$$scope={dirty:o,ctx:l}),!n&&o[0]&1&&(n=!0,a.open=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function jx(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m;B(t,Lt,ge=>n(22,u=ge)),B(t,Yt,ge=>n(23,c=ge)),B(t,ue,ge=>n(15,f=ge)),B(t,wn,ge=>n(16,d=ge)),B(t,iu,ge=>n(17,h=ge)),B(t,gi,ge=>n(18,m=ge));let{open:p=!1}=e,{kind:g}=e,{canEnterURL:v=!0}=e;const b=sn(),w=f(g==="image"?"assets_dialog.title.image":"assets_dialog.title.file");let k="upload",S,E,P="",M=null,I="",D="";Ut(()=>{n(7,P=`library-${ki("short")}`)});function z(ge){D=ge,n(10,D)}const R=ge=>{n(3,k=ge.detail.name),n(8,M=null),S?.reset(),E?.reset()},U=ge=>(!g||g===ge.kind)&&i===ge.folder,W=({detail:ge})=>{n(8,M=ge)};function ee(ge){ae[ge?"unshift":"push"](()=>{S=ge,n(5,S)})}const K=({detail:{files:ge}})=>{n(8,M=ge.length?{file:ge[0]}:null)},ve=ge=>(!g||g===ge.kind)&&!m.find(pe=>pe.collectionName===ge.collectionName)?.entryRelative,me=({detail:ge})=>{n(8,M=ge)};function se(ge){ae[ge?"unshift":"push"](()=>{E=ge,n(6,E)})}const q=({detail:{files:ge}})=>{n(8,M=ge.length?{file:ge[0]}:null)};function J(ge){I=ge,n(9,I),n(0,p)}const Le=()=>{n(8,M=I.trim()?{url:I.trim()}:null)},_e=({detail:ge})=>{n(8,M=ge)},Be=({detail:ge})=>{n(8,M=ge)};function Ke(ge){p=ge,n(0,p)}const de=()=>{b("select",M)};return t.$$set=ge=>{"open"in ge&&n(0,p=ge.open),"kind"in ge&&n(1,g=ge.kind),"canEnterURL"in ge&&n(2,v=ge.canEnterURL)},t.$$.update=()=>{t.$$.dirty[0]&8388608&&n(4,{internalPath:i="",entryRelative:r=!1}=c?._assetFolder??{},i,(n(21,r),n(23,c))),t.$$.dirty[0]&8&&n(14,s=k==="upload"),t.$$.dirty[0]&2097168&&n(13,l=!!i&&!r),t.$$.dirty[0]&8&&n(12,o=["collection-files","all-files"].includes(k)),t.$$.dirty[0]&4194312&&n(11,a=Object.keys(fs).includes(k)&&u?.apiKeys?.[k]||Object.keys(Ys).includes(k)&&u?.logins?.[k]),t.$$.dirty[0]&1&&p&&n(9,I="")},[p,g,v,k,i,S,E,P,M,I,D,a,o,l,s,f,d,h,m,b,w,r,u,c,z,R,U,W,ee,K,ve,me,se,q,J,Le,_e,Be,Ke,de]}class Bx extends ie{constructor(e){super(),ne(this,e,jx,zx,te,{open:0,kind:1,canEnterURL:2},Ax,[-1,-1])}}function Ux(t){ye(t,"svelte-17osem6",".image-widget.svelte-17osem6.svelte-17osem6{display:flex !important;align-items:center;gap:16px}.image-widget.svelte-17osem6 .preview{flex:none;width:160px !important;height:160px !important;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius)}.image-widget.svelte-17osem6>div.svelte-17osem6{flex:auto;overflow:hidden}.image-widget.svelte-17osem6>div .filename.svelte-17osem6{margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all}.image-widget.svelte-17osem6>div .filename.svelte-17osem6:empty{margin:0;padding:0}")}function qx(t){let e,n;return e=new su({props:{src:t[9],variant:"tile",checkerboard:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&512&&(s.src=i[9]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Hx(t){let e,n;return e=new _s({props:{kind:t[7].kind,asset:t[7],variant:"tile",checkerboard:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&128&&(s.kind=i[7].kind),r[0]&128&&(s.asset=i[7]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function cy(t){let e,n,i,r,s;function l(u,c){if(c[0]&1&&(n=null),u[8])return Vx;if(n==null&&(n=!u[0].startsWith("data:")),n)return xx}let o=l(t,[-1,-1]),a=o&&o(t);return{c(){e=F("div"),a&&a.c(),C(e,"role","textbox"),C(e,"id",i=t[1]+"-value"),C(e,"tabindex","0"),C(e,"class","filename svelte-17osem6"),C(e,"aria-readonly",t[2]),C(e,"aria-invalid",t[4]),C(e,"aria-required",t[3]),C(e,"aria-labelledby",r=t[1]+"-label"),C(e,"aria-errormessage",s=t[1]+"-error")},m(u,c){A(u,e,c),a&&a.m(e,null)},p(u,c){o===(o=l(u,c))&&a?a.p(u,c):(a&&a.d(1),a=o&&o(u),a&&(a.c(),a.m(e,null))),c[0]&2&&i!==(i=u[1]+"-value")&&C(e,"id",i),c[0]&4&&C(e,"aria-readonly",u[2]),c[0]&16&&C(e,"aria-invalid",u[4]),c[0]&8&&C(e,"aria-required",u[3]),c[0]&2&&r!==(r=u[1]+"-label")&&C(e,"aria-labelledby",r),c[0]&2&&s!==(s=u[1]+"-error")&&C(e,"aria-errormessage",s)},d(u){u&&T(e),a&&a.d()}}}function xx(t){let e;return{c(){e=G(t[0])},m(n,i){A(n,e,i)},p(n,i){i[0]&1&&X(e,n[0])},d(n){n&&T(e)}}}function Vx(t){let e=t[8].name+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&256&&e!==(e=i[8].name+"")&&X(n,e)},d(i){i&&T(n)}}}function fy(t){let e,n;return e=new et({props:{disabled:t[2],variant:"tertiary",label:t[16]("remove"),"aria-label":t[16](`remove_${t[6]}`),"aria-controls":t[1]+"-value"}}),e.$on("click",t[25]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&4&&(s.disabled=i[2]),r[0]&65536&&(s.label=i[16]("remove")),r[0]&65600&&(s["aria-label"]=i[16](`remove_${i[6]}`)),r[0]&2&&(s["aria-controls"]=i[1]+"-value"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Wx(t){let e=t[16]("assets_dialog.large_file.description",{values:{size:to(t[14])}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&81920&&e!==(e=i[16]("assets_dialog.large_file.description",{values:{size:to(i[14])}})+"")&&X(n,e)},d(i){i&&T(n)}}}function Yx(t){let e,n=t[16]("assets_dialog.photo_credit.description")+"",i,r,s,l,o;return l=new gf({props:{flex:!0,readonly:!0,value:t[13]}}),l.$on("click",Kx),{c(){e=F("div"),i=G(n),r=j(),s=F("div"),O(l.$$.fragment),C(e,"role","none"),C(s,"role","none")},m(a,u){A(a,e,u),$(e,i),A(a,r,u),A(a,s,u),N(l,s,null),o=!0},p(a,u){(!o||u[0]&65536)&&n!==(n=a[16]("assets_dialog.photo_credit.description")+"")&&X(i,n);const c={};u[0]&8192&&(c.value=a[13]),l.$set(c)},i(a){o||(_(l.$$.fragment,a),o=!0)},o(a){y(l.$$.fragment,a),o=!1},d(a){a&&(T(e),T(r),T(s)),L(l)}}}function Gx(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w;const k=[Hx,qx],S=[];function E(ee,K){return ee[7]?0:ee[9]?1:-1}~(n=E(t))&&(i=S[n]=k[n](t));let P=typeof t[0]=="string"&&cy(t);a=new et({props:{disabled:t[2],variant:"tertiary",label:t[0]?t[16]("replace"):t[16]("select"),"aria-label":t[0]?t[16](`replace_${t[6]}`):t[16](`select_${t[6]}`),"aria-controls":t[1]+"-value"}}),a.$on("click",t[24]);let M=t[0]&&fy(t);function I(ee){t[26](ee)}let D={kind:t[5]?"image":void 0,canEnterURL:t[15]};t[10]!==void 0&&(D.open=t[10]),f=new Bx({props:D}),ae.push(()=>Re(f,"open",I)),f.$on("select",t[27]);function z(ee){t[28](ee)}let R={title:t[16]("assets_dialog.large_file.title"),$$slots:{default:[Wx]},$$scope:{ctx:t}};t[11]!==void 0&&(R.open=t[11]),m=new D2({props:R}),ae.push(()=>Re(m,"open",z));function U(ee){t[29](ee)}let W={title:t[16]("assets_dialog.photo_credit.title"),okLabel:t[16]("copy"),$$slots:{default:[Yx]},$$scope:{ctx:t}};return t[12]!==void 0&&(W.open=t[12]),v=new Ia({props:W}),ae.push(()=>Re(v,"open",U)),v.$on("ok",t[30]),{c(){e=F("div"),i&&i.c(),r=j(),s=F("div"),P&&P.c(),l=j(),o=F("div"),O(a.$$.fragment),u=j(),M&&M.c(),c=j(),O(f.$$.fragment),h=j(),O(m.$$.fragment),g=j(),O(v.$$.fragment),C(o,"role","none"),C(s,"role","none"),C(s,"class","svelte-17osem6"),C(e,"role","none"),C(e,"class","image-widget svelte-17osem6")},m(ee,K){A(ee,e,K),~n&&S[n].m(e,null),$(e,r),$(e,s),P&&P.m(s,null),$(s,l),$(s,o),N(a,o,null),$(o,u),M&&M.m(o,null),A(ee,c,K),N(f,ee,K),A(ee,h,K),N(m,ee,K),A(ee,g,K),N(v,ee,K),w=!0},p(ee,K){let ve=n;n=E(ee),n===ve?~n&&S[n].p(ee,K):(i&&(x(),y(S[ve],1,1,()=>{S[ve]=null}),V()),~n?(i=S[n],i?i.p(ee,K):(i=S[n]=k[n](ee),i.c()),_(i,1),i.m(e,r)):i=null),typeof ee[0]=="string"?P?P.p(ee,K):(P=cy(ee),P.c(),P.m(s,l)):P&&(P.d(1),P=null);const me={};K[0]&4&&(me.disabled=ee[2]),K[0]&65537&&(me.label=ee[0]?ee[16]("replace"):ee[16]("select")),K[0]&65601&&(me["aria-label"]=ee[0]?ee[16](`replace_${ee[6]}`):ee[16](`select_${ee[6]}`)),K[0]&2&&(me["aria-controls"]=ee[1]+"-value"),a.$set(me),ee[0]?M?(M.p(ee,K),K[0]&1&&_(M,1)):(M=fy(ee),M.c(),_(M,1),M.m(o,null)):M&&(x(),y(M,1,1,()=>{M=null}),V());const se={};K[0]&32&&(se.kind=ee[5]?"image":void 0),K[0]&32768&&(se.canEnterURL=ee[15]),!d&&K[0]&1024&&(d=!0,se.open=ee[10],$e(()=>d=!1)),f.$set(se);const q={};K[0]&65536&&(q.title=ee[16]("assets_dialog.large_file.title")),K[0]&81920|K[1]&4&&(q.$$scope={dirty:K,ctx:ee}),!p&&K[0]&2048&&(p=!0,q.open=ee[11],$e(()=>p=!1)),m.$set(q);const J={};K[0]&65536&&(J.title=ee[16]("assets_dialog.photo_credit.title")),K[0]&65536&&(J.okLabel=ee[16]("copy")),K[0]&73728|K[1]&4&&(J.$$scope={dirty:K,ctx:ee}),!b&&K[0]&4096&&(b=!0,J.open=ee[12],$e(()=>b=!1)),v.$set(J)},i(ee){w||(_(i),_(a.$$.fragment,ee),_(M),_(f.$$.fragment,ee),_(m.$$.fragment,ee),_(v.$$.fragment,ee),w=!0)},o(ee){y(i),y(a.$$.fragment,ee),y(M),y(f.$$.fragment,ee),y(m.$$.fragment,ee),y(v.$$.fragment,ee),w=!1},d(ee){ee&&(T(e),T(c),T(h),T(g)),~n&&S[n].d(),P&&P.d(),L(a),M&&M.d(),L(f,ee),L(m,ee),L(v,ee)}}}const Kx=t=>{t.target.focus(),t.target.select()};function Zx(t,e,n){let i,r,s,l,o,a;B(t,at,q=>n(23,o=q)),B(t,ue,q=>n(16,a=q));let{locale:u}=e,{keyPath:c}=e,{fieldId:f}=e,{fieldLabel:d}=e,{fieldConfig:h}=e,{currentValue:m}=e,{readonly:p=!1}=e,{required:g=!1}=e,{invalid:v=!1}=e,b,w,k,S,E,P=!1,M=!1,I=!1,D="";const z=()=>{n(0,m=""),n(7,b=void 0),n(8,w=void 0),k=void 0,E=void 0},R=async q=>{z(),n(7,{asset:b,file:w,url:k,credit:E}=q,b,n(8,w)),b&&n(0,m=Pm(b,{pathOnly:!0,allowSpecial:!0})),w&&(l&&s!==void 0&&Number.isInteger(s)&&w.size>s?n(11,M=!0):(n(0,m=await AS(w)),ze(at,o.files[u][c]=w,o))),k&&n(0,m=k),E&&(n(13,D=kn.sanitize(E,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),n(12,I=!0))},U=()=>{n(10,P=!0)},W=()=>{z()};function ee(q){P=q,n(10,P)}const K=({detail:q})=>{R(q)};function ve(q){M=q,n(11,M)}function me(q){I=q,n(12,I)}const se=()=>{navigator.clipboard.writeText(D)};return t.$$set=q=>{"locale"in q&&n(19,u=q.locale),"keyPath"in q&&n(20,c=q.keyPath),"fieldId"in q&&n(1,f=q.fieldId),"fieldLabel"in q&&n(21,d=q.fieldLabel),"fieldConfig"in q&&n(22,h=q.fieldConfig),"currentValue"in q&&n(0,m=q.currentValue),"readonly"in q&&n(2,p=q.readonly),"required"in q&&n(3,g=q.required),"invalid"in q&&n(4,v=q.invalid)},t.$$.update=()=>{t.$$.dirty[0]&4194304&&n(6,{widget:i,choose_url:r=!0,media_library:{config:{max_file_size:s=void 0}={}}={}}=h,i,(n(15,r),n(22,h)),(n(14,s),n(22,h))),t.$$.dirty[0]&64&&n(5,l=i==="image"),t.$$.dirty[0]&8388641&&(async()=>n(9,S=l&&m?await Ws(m,o?.originalEntry,{thumbnail:!0}):void 0))()},[m,f,p,g,v,l,i,b,w,S,P,M,I,D,s,r,a,z,R,u,c,d,h,o,U,W,ee,K,ve,me,se]}class dy extends ie{constructor(e){super(),ne(this,e,Zx,Gx,te,{locale:19,keyPath:20,fieldId:1,fieldLabel:21,fieldConfig:22,currentValue:0,readonly:2,required:3,invalid:4},Ux,[-1,-1])}}function Jx(t){let e,n;return{c(){e=F("p"),n=G(t[0])},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&1&&X(n,i[0])},i:H,o:H,d(i){i&&T(e)}}}function Xx(t){let e,n,i;return n=new su({props:{src:t[1]}}),{c(){e=F("p"),O(n.$$.fragment)},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s&2&&(l.src=r[1]),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function Qx(t){let e,n,i,r,s;const l=[Xx,Jx],o=[];function a(u,c){return c&1&&(e=null),u[1]?0:(e==null&&(e=!!(typeof u[0]=="string"&&u[0].trim()&&!u[0].startsWith("data:"))),e?1:-1)}return~(n=a(t,-1))&&(i=o[n]=l[n](t)),{c(){i&&i.c(),r=Q()},m(u,c){~n&&o[n].m(u,c),A(u,r,c),s=!0},p(u,[c]){let f=n;n=a(u,c),n===f?~n&&o[n].p(u,c):(i&&(x(),y(o[f],1,1,()=>{o[f]=null}),V()),~n?(i=o[n],i?i.p(u,c):(i=o[n]=l[n](u),i.c()),_(i,1),i.m(r.parentNode,r)):i=null)},i(u){s||(_(i),s=!0)},o(u){y(i),s=!1},d(u){u&&T(r),~n&&o[n].d(u)}}}function eV(t,e,n){let i,r,s;B(t,at,f=>n(7,s=f));let{locale:l}=e,{keyPath:o}=e,{fieldConfig:a}=e,{currentValue:u}=e,c;return t.$$set=f=>{"locale"in f&&n(2,l=f.locale),"keyPath"in f&&n(3,o=f.keyPath),"fieldConfig"in f&&n(4,a=f.fieldConfig),"currentValue"in f&&n(0,u=f.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&n(6,{widget:i}=a,i),t.$$.dirty&64&&n(5,r=i==="image"),t.$$.dirty&161&&(async()=>n(1,c=r&&u?await Ws(u,s?.originalEntry):void 0))()},[u,c,l,o,a,r,i,s]}class hy extends ie{constructor(e){super(),ne(this,e,eV,Qx,te,{locale:2,keyPath:3,fieldConfig:4,currentValue:0})}}function tV(t){ye(t,"svelte-10l9uu2",".header.svelte-10l9uu2.svelte-10l9uu2{display:flex;align-items:center;gap:8px;background-color:var(--sui-selected-background-color)}.header.svelte-10l9uu2>div.svelte-10l9uu2{display:flex;align-items:center}.header.svelte-10l9uu2>div.svelte-10l9uu2:first-child{justify-content:flex-start;width:40%}.header.svelte-10l9uu2>div.svelte-10l9uu2:nth-child(2){width:20%;justify-content:center}.header.svelte-10l9uu2>div.svelte-10l9uu2:last-child{width:40%;justify-content:flex-end}.header.svelte-10l9uu2 button{padding:0;height:16px}.header.svelte-10l9uu2 .type.svelte-10l9uu2{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}")}const nV=t=>({}),py=t=>({});function my(t){let e,n;return{c(){e=F("span"),n=G(t[0]),C(e,"role","none"),C(e,"class","type svelte-10l9uu2")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&1&&X(n,i[0])},d(i){i&&T(e)}}}function iV(t){let e,n=t[0]&&my(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,r){i[0]?n?n.p(i,r):(n=my(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&T(e),n&&n.d(i)}}}function rV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[2]?"expand_more":"chevron_right"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.name=i[2]?"expand_more":"chevron_right"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gy(t){let e,n;return e=new et({props:{size:"small",iconic:!0,disabled:t[5],"aria-label":t[7]("remove_this_item"),$$slots:{"start-icon":[sV]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s.disabled=i[5]),r&128&&(s["aria-label"]=i[7]("remove_this_item")),r&2048&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"close"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function lV(t){let e,n,i,r,s,l,o,a;i=new et({props:{size:"small","aria-label":t[2]?t[7]("collapse"):t[7]("expand"),"aria-expanded":t[2],"aria-controls":t[1],$$slots:{"start-icon":[rV],default:[iV]},$$scope:{ctx:t}}}),i.$on("click",t[9]);const u=t[8].middle,c=ke(u,t,t[11],py);let f=t[4]&&gy(t);return{c(){e=F("div"),n=F("div"),O(i.$$.fragment),r=j(),s=F("div"),c&&c.c(),l=j(),o=F("div"),f&&f.c(),C(n,"role","none"),C(n,"class","svelte-10l9uu2"),C(s,"role","none"),C(s,"class","svelte-10l9uu2"),C(o,"role","none"),C(o,"class","svelte-10l9uu2"),C(e,"role","none"),C(e,"class","header svelte-10l9uu2")},m(d,h){A(d,e,h),$(e,n),N(i,n,null),$(e,r),$(e,s),c&&c.m(s,null),$(e,l),$(e,o),f&&f.m(o,null),a=!0},p(d,[h]){const m={};h&132&&(m["aria-label"]=d[2]?d[7]("collapse"):d[7]("expand")),h&4&&(m["aria-expanded"]=d[2]),h&2&&(m["aria-controls"]=d[1]),h&2053&&(m.$$scope={dirty:h,ctx:d}),i.$set(m),c&&c.p&&(!a||h&2048)&&Ee(c,u,d,d[11],a?Se(u,d[11],h,nV):Te(d[11]),py),d[4]?f?(f.p(d,h),h&16&&_(f,1)):(f=gy(d),f.c(),_(f,1),f.m(o,null)):f&&(x(),y(f,1,1,()=>{f=null}),V())},i(d){a||(_(i.$$.fragment,d),_(c,d),_(f),a=!0)},o(d){y(i.$$.fragment,d),y(c,d),y(f),a=!1},d(d){d&&T(e),L(i),c&&c.d(d),f&&f.d()}}}function oV(t,e,n){let i;B(t,ue,p=>n(7,i=p));let{$$slots:r={},$$scope:s}=e,{label:l=""}=e,{controlId:o}=e,{expanded:a}=e,{toggleExpanded:u}=e,{removeButtonVisible:c=!1}=e,{removeButtonDisabled:f=!1}=e,{remove:d}=e;const h=()=>{u()},m=()=>{d()};return t.$$set=p=>{"label"in p&&n(0,l=p.label),"controlId"in p&&n(1,o=p.controlId),"expanded"in p&&n(2,a=p.expanded),"toggleExpanded"in p&&n(3,u=p.toggleExpanded),"removeButtonVisible"in p&&n(4,c=p.removeButtonVisible),"removeButtonDisabled"in p&&n(5,f=p.removeButtonDisabled),"remove"in p&&n(6,d=p.remove),"$$scope"in p&&n(11,s=p.$$scope)},[l,o,a,u,c,f,d,i,r,h,m,s]}class oT extends ie{constructor(e){super(),ne(this,e,oV,lV,te,{label:0,controlId:1,expanded:2,toggleExpanded:3,removeButtonVisible:4,removeButtonDisabled:5,remove:6},tV)}}function _y(t,e,n){const i=t.slice();return i[15]=e[n].name,i[16]=e[n].label,i}function aV(t){let e,n;return e=new et({props:{variant:"tertiary",label:t[3],disabled:t[2],$$slots:{"start-icon":[cV]},$$scope:{ctx:t}}}),e.$on("click",t[14]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.label=i[3]),r&4&&(s.disabled=i[2]),r&524288&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function uV(t){let e,n;return e=new pi({props:{variant:"tertiary",label:t[3],disabled:t[2],$$slots:{popup:[hV],"start-icon":[fV]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.label=i[3]),r&4&&(s.disabled=i[2]),r&524307&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function cV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"add"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function fV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"add"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function by(t,e){let n,i,r;function s(){return e[13](e[15])}return i=new Pt({props:{label:e[16]}}),i.$on("click",s),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(l,o){A(l,n,o),N(i,l,o),r=!0},p(l,o){e=l;const a={};o&16&&(a.label=e[16]),i.$set(a)},i(l){r||(_(i.$$.fragment,l),r=!0)},o(l){y(i.$$.fragment,l),r=!1},d(l){l&&T(n),L(i,l)}}}function dV(t){let e=[],n=new Map,i,r,s=be(t[4]);const l=o=>o[15];for(let o=0;o<s.length;o+=1){let a=_y(t,s,o),u=l(a);n.set(u,e[o]=by(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&17&&(s=be(o[4]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,by,i,_y),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function hV(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[1]("select_list_type"),$$slots:{default:[dV]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s["aria-label"]=i[1]("select_list_type")),r&524305&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function pV(t){let e,n,i,r,s;const l=[uV,aV],o=[];function a(u,c){return c&16&&(e=null),e==null&&(e=!!Array.isArray(u[4])),e?0:1}return n=a(t,-1),i=o[n]=l[n](t),{c(){i.c(),r=Q()},m(u,c){o[n].m(u,c),A(u,r,c),s=!0},p(u,[c]){let f=n;n=a(u,c),n===f?o[n].p(u,c):(x(),y(o[f],1,1,()=>{o[f]=null}),V(),i=o[n],i?i.p(u,c):(i=o[n]=l[n](u),i.c()),_(i,1),i.m(r.parentNode,r))},i(u){s||(_(i),s=!0)},o(u){y(i),s=!1},d(u){u&&T(r),o[n].d(u)}}}function mV(t,e,n){let i,r,s,l,o,a,u,c,f;B(t,ue,b=>n(1,f=b));let{disabled:d=!1}=e,{fieldConfig:h}=e,{items:m=[]}=e,{addItem:p=b=>{}}=e;const g=b=>p(b),v=()=>p();return t.$$set=b=>{"disabled"in b&&n(5,d=b.disabled),"fieldConfig"in b&&n(6,h=b.fieldConfig),"items"in b&&n(7,m=b.items),"addItem"in b&&n(0,p=b.addItem)},t.$$.update=()=>{t.$$.dirty&64&&n(12,{widget:i,name:r,label:s,types:l}=h,i,(n(9,r),n(6,h)),(n(10,s),n(6,h)),(n(4,l),n(6,h))),t.$$.dirty&4160&&n(11,{label_singular:o,max:a}=i==="list"?h:{},o,(n(8,a),n(12,i),n(6,h))),t.$$.dirty&3586&&n(3,u=f("add_x",{values:{name:o||s||r}})),t.$$.dirty&416&&n(2,c=d||typeof a=="number"&&m.length===a)},[p,f,c,u,l,d,h,m,a,r,s,o,i,g,v]}class _g extends ie{constructor(e){super(),ne(this,e,mV,pV,te,{disabled:5,fieldConfig:6,items:7,addItem:0})}}function gV(t){ye(t,"svelte-2xi82y",".toolbar.svelte-2xi82y.svelte-2xi82y{display:flex;align-items:center;gap:8px}.item-list.collapsed.svelte-2xi82y.svelte-2xi82y{display:none}.item.svelte-2xi82y.svelte-2xi82y{margin:8px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}.item.svelte-2xi82y .summary.svelte-2xi82y{overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis}")}function vy(t,e,n){const i=t.slice();i[64]=e[n],i[70]=e,i[71]=n;const r=`${i[1]}.${i[71]}`;i[65]=r;const s=!!i[14]?._[i[65]];i[66]=s;const l=i[15]?i[11]?.find(function(...c){return t[54](i[64],...c)}):void 0;i[67]=l;const o=i[15]?i[67]?.fields??[]:i[10]??(i[9]?[i[9]]:[]);i[68]=o;const a=i[15]&&i[67]?.summary||i[25];return i[69]=a,i}function yy(t,e,n){const i=t.slice();return i[72]=e[n],i}function _V(t){let e,n,i;function r(l){t[55](l)}let s={flex:!0,readonly:t[4],required:t[5],invalid:t[6],"aria-errormessage":t[2]+"-error"};return t[17]!==void 0&&(s.value=t[17]),e=new Sn({props:s}),ae.push(()=>Re(e,"value",r)),e.$on("input",t[56]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o[0]&16&&(a.readonly=l[4]),o[0]&32&&(a.required=l[5]),o[0]&64&&(a.invalid=l[6]),o[0]&4&&(a["aria-errormessage"]=l[2]+"-error"),!n&&o[0]&131072&&(n=!0,a.value=l[17],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function bV(t){let e,n,i,r,s=t[21].length+"",l,o,a=((t[21].length===1?t[24]:void 0)||t[27]||t[13])+"",u,c,f,d,h,m,p,g,v,b,w;n=new et({props:{iconic:!0,disabled:!t[21].length,"aria-label":t[22]?t[28]("collapse"):t[28]("expand"),"aria-expanded":t[22],"aria-controls":"list-"+t[16]+"-item-list",$$slots:{"start-icon":[vV]},$$scope:{ctx:t}}}),n.$on("click",t[48]),d=new In({props:{flex:!0}});let k=t[26]&&(t[20]||!t[21].length)&&wy(t),S=be(t[21]),E=[];for(let I=0;I<S.length;I+=1)E[I]=Sy(vy(t,S,I));const P=I=>y(E[I],1,1,()=>{E[I]=null});let M=t[26]&&!t[20]&&t[21].length&&Ey(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),r=F("div"),l=G(s),o=j(),u=G(a),f=j(),O(d.$$.fragment),h=j(),k&&k.c(),m=j(),p=F("div");for(let I=0;I<E.length;I+=1)E[I].c();v=j(),M&&M.c(),b=Q(),C(r,"role","none"),C(r,"class","summary"),C(r,"id",c="object-"+t[16]+"-summary"),C(e,"role","none"),C(e,"class","toolbar top svelte-2xi82y"),C(p,"role","none"),C(p,"id",g="list-"+t[16]+"-item-list"),C(p,"class","item-list svelte-2xi82y"),re(p,"collapsed",!t[22])},m(I,D){A(I,e,D),N(n,e,null),$(e,i),$(e,r),$(r,l),$(r,o),$(r,u),$(e,f),N(d,e,null),$(e,h),k&&k.m(e,null),A(I,m,D),A(I,p,D);for(let z=0;z<E.length;z+=1)E[z]&&E[z].m(p,null);A(I,v,D),M&&M.m(I,D),A(I,b,D),w=!0},p(I,D){const z={};if(D[0]&2097152&&(z.disabled=!I[21].length),D[0]&272629760&&(z["aria-label"]=I[22]?I[28]("collapse"):I[28]("expand")),D[0]&4194304&&(z["aria-expanded"]=I[22]),D[0]&65536&&(z["aria-controls"]="list-"+I[16]+"-item-list"),D[0]&4194304|D[2]&8192&&(z.$$scope={dirty:D,ctx:I}),n.$set(z),(!w||D[0]&2097152)&&s!==(s=I[21].length+"")&&X(l,s),(!w||D[0]&153100288)&&a!==(a=((I[21].length===1?I[24]:void 0)||I[27]||I[13])+"")&&X(u,a),(!w||D[0]&65536&&c!==(c="object-"+I[16]+"-summary"))&&C(r,"id",c),I[26]&&(I[20]||!I[21].length)?k?(k.p(I,D),D[0]&70254592&&_(k,1)):(k=wy(I),k.c(),_(k,1),k.m(e,null)):k&&(x(),y(k,1,1,()=>{k=null}),V()),D[0]&313380483|D[1]&15){S=be(I[21]);let R;for(R=0;R<S.length;R+=1){const U=vy(I,S,R);E[R]?(E[R].p(U,D),_(E[R],1)):(E[R]=Sy(U),E[R].c(),_(E[R],1),E[R].m(p,null))}for(x(),R=S.length;R<E.length;R+=1)P(R);V()}(!w||D[0]&65536&&g!==(g="list-"+I[16]+"-item-list"))&&C(p,"id",g),(!w||D[0]&4194304)&&re(p,"collapsed",!I[22]),I[26]&&!I[20]&&I[21].length?M?(M.p(I,D),D[0]&70254592&&_(M,1)):(M=Ey(I),M.c(),_(M,1),M.m(b.parentNode,b)):M&&(x(),y(M,1,1,()=>{M=null}),V())},i(I){if(!w){_(n.$$.fragment,I),_(d.$$.fragment,I),_(k);for(let D=0;D<S.length;D+=1)_(E[D]);_(M),w=!0}},o(I){y(n.$$.fragment,I),y(d.$$.fragment,I),y(k),E=E.filter(Boolean);for(let D=0;D<E.length;D+=1)y(E[D]);y(M),w=!1},d(I){I&&(T(e),T(m),T(p),T(v),T(b)),L(n),L(d),k&&k.d(),ni(E,I),M&&M.d(I)}}}function vV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[22]?"expand_more":"chevron_right"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&4194304&&(s.name=i[22]?"expand_more":"chevron_right"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function wy(t){let e,n;return e=new _g({props:{disabled:t[23],fieldConfig:t[3],items:t[21],addItem:t[30]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&8388608&&(s.disabled=i[23]),r[0]&8&&(s.fieldConfig=i[3]),r[0]&2097152&&(s.items=i[21]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function yV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"arrow_upward"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function wV(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"arrow_downward"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function kV(t){let e,n,i,r,s,l;function o(){return t[49](t[71])}e=new et({props:{size:"small",iconic:!0,disabled:t[23]||t[71]===0,"aria-label":t[28]("move_up"),$$slots:{"start-icon":[yV]},$$scope:{ctx:t}}}),e.$on("click",o),i=new In({});function a(){return t[50](t[71])}return s=new et({props:{iconic:!0,size:"small",disabled:t[23]||t[71]===t[21].length-1,"aria-label":t[28]("move_down"),$$slots:{"start-icon":[wV]},$$scope:{ctx:t}}}),s.$on("click",a),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment)},m(u,c){N(e,u,c),A(u,n,c),N(i,u,c),A(u,r,c),N(s,u,c),l=!0},p(u,c){t=u;const f={};c[0]&8388608&&(f.disabled=t[23]||t[71]===0),c[0]&268435456&&(f["aria-label"]=t[28]("move_up")),c[2]&8192&&(f.$$scope={dirty:c,ctx:t}),e.$set(f);const d={};c[0]&10485760&&(d.disabled=t[23]||t[71]===t[21].length-1),c[0]&268435456&&(d["aria-label"]=t[28]("move_down")),c[2]&8192&&(d.$$scope={dirty:c,ctx:t}),s.$set(d)},i(u){l||(_(e.$$.fragment,u),_(i.$$.fragment,u),_(s.$$.fragment,u),l=!0)},o(u){y(e.$$.fragment,u),y(i.$$.fragment,u),y(s.$$.fragment,u),l=!1},d(u){u&&(T(n),T(r)),L(e,u),L(i,u),L(s,u)}}}function SV(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function EV(t){let e,n,i,r;const s=[AV,TV],l=[];function o(a,u){return a[66]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function TV(t){let e,n=t[34](t[64],t[71],t[69])+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","none"),C(e,"class","summary svelte-2xi82y")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&36210688&&n!==(n=r[34](r[64],r[71],r[69])+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function AV(t){let e=[],n=new Map,i,r,s=be(t[68]);const l=o=>o[72].name;for(let o=0;o<s.length;o+=1){let a=yy(t,s,o),u=l(a);n.set(u,e[o]=ky(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a[0]&2657923&&(s=be(o[68]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,ky,i,yy),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ky(t,e){let n,i,r;return i=new vg({props:{keyPath:e[7]?`${e[1]}.${e[71]}`:`${e[1]}.${e[71]}.${e[72].name}`,locale:e[0],fieldConfig:e[72]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l[0]&2657922&&(o.keyPath=e[7]?`${e[1]}.${e[71]}`:`${e[1]}.${e[71]}.${e[72].name}`),l[0]&1&&(o.locale=e[0]),l[0]&2657792&&(o.fieldConfig=e[72]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function CV(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function Sy(t){let e,n,i,r,s,l,o=t[71],a,u;function c(){return t[51](t[65],t[66])}function f(){return t[52](t[71])}n=new oT({props:{label:t[15]?t[67]?.label||t[67]?.name:"",controlId:"list-"+t[16]+"-item-"+t[71]+"-body",expanded:t[66],toggleExpanded:c,removeButtonVisible:!0,removeButtonDisabled:t[23],remove:f,$$slots:{middle:[kV]},$$scope:{ctx:t}}});let d={ctx:t,current:null,token:null,hasCatch:!1,pending:CV,then:EV,catch:SV,blocks:[,,,]};Ci(s=Ni(t[18][t[71]]),d);const h=()=>t[53](r,o),m=()=>t[53](null,o);return{c(){e=F("div"),O(n.$$.fragment),i=j(),r=F("div"),d.block.c(),a=j(),C(r,"role","none"),C(r,"class","item-body"),C(r,"id",l="list-"+t[16]+"-item-"+t[71]+"-body"),C(e,"role","none"),C(e,"class","item svelte-2xi82y")},m(p,g){A(p,e,g),N(n,e,null),$(e,i),$(e,r),d.block.m(r,d.anchor=null),d.mount=()=>r,d.anchor=null,h(),$(e,a),u=!0},p(p,g){t=p;const v={};g[0]&2656256&&(v.label=t[15]?t[67]?.label||t[67]?.name:""),g[0]&65536&&(v.controlId="list-"+t[16]+"-item-"+t[71]+"-body"),g[0]&16386&&(v.expanded=t[66]),g[0]&16386&&(v.toggleExpanded=c),g[0]&8388608&&(v.removeButtonDisabled=t[23]),g[0]&278921216|g[2]&8192&&(v.$$scope={dirty:g,ctx:t}),n.$set(v),d.ctx=t,g[0]&262144&&s!==(s=Ni(t[18][t[71]]))&&Ci(s,d)||so(d,t,g),(!u||g[0]&65536&&l!==(l="list-"+t[16]+"-item-"+t[71]+"-body"))&&C(r,"id",l),o!==t[71]&&(m(),o=t[71],h())},i(p){u||(_(n.$$.fragment,p),_(d.block),u=!0)},o(p){y(n.$$.fragment,p);for(let g=0;g<3;g+=1){const v=d.blocks[g];y(v)}u=!1},d(p){p&&T(e),L(n),d.block.d(),d.token=null,d=null,m()}}}function Ey(t){let e,n,i,r,s;return n=new _g({props:{disabled:t[23],fieldConfig:t[3],items:t[21],addItem:t[30]}}),r=new In({props:{flex:!0}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),C(e,"role","none"),C(e,"class","toolbar bottom svelte-2xi82y")},m(l,o){A(l,e,o),N(n,e,null),$(e,i),N(r,e,null),s=!0},p(l,o){const a={};o[0]&8388608&&(a.disabled=l[23]),o[0]&8&&(a.fieldConfig=l[3]),o[0]&2097152&&(a.items=l[21]),n.$set(a)},i(l){s||(_(n.$$.fragment,l),_(r.$$.fragment,l),s=!0)},o(l){y(n.$$.fragment,l),y(r.$$.fragment,l),s=!1},d(l){l&&T(e),L(n),L(r)}}}function NV(t){let e,n,i,r;const s=[bV,_V],l=[];function o(a,u){return a[8]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function LV(t){let e,n;return e=new Tn({props:{"aria-labelledby":"list-"+t[16]+"-summary",$$slots:{default:[NV]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&65536&&(s["aria-labelledby"]="list-"+i[16]+"-summary"),r[0]&536870911|r[2]&8192&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function OV(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k,S,E,P,M,I,D,z,R,U,W,ee,K,ve,me,se,q;B(t,at,Pe=>n(47,se=Pe)),B(t,ue,Pe=>n(28,q=Pe));let{locale:J}=e,{keyPath:Le}=e,{fieldId:_e}=e,{fieldLabel:Be}=e,{fieldConfig:Ke}=e,{currentValue:de}=e,{readonly:ge=!1}=e,{required:pe=!1}=e,{invalid:We=!1}=e,ot=!1,oe="",Ne="";const Qe=[];Ut(()=>{n(37,ot=!0),n(16,oe=ki("short")),zs({[K]:!u,...Object.fromEntries(me.map((Pe,dt)=>[`${Le}.${dt}`,!o]))})});const rt=()=>{const Pe=de.join(", ");!Ne.match(/,\s*$/)&&Ne.trim()!==Pe&&n(17,Ne=Pe)},pt=()=>{const Pe=Ne.split(/,/g).map(dt=>dt.trim()).filter(dt=>dt!=="");Object.keys(se?.currentValues??{}).forEach(dt=>{s!=="duplicate"&&dt!==J||(Object.keys(se?.currentValues[dt]??{}).forEach($t=>{$t.match(`^${dn(Le)}\\.\\d+$`)&&delete se?.currentValues[dt][$t]}),Pe.forEach(($t,pr)=>{ze(at,se.currentValues[dt][`${Le}.${pr}`]=$t,se)}))})},Jt=Pe=>{Object.keys(se?.currentValues??{}).forEach(dt=>{s!=="duplicate"&&dt!==J||UE(dt,Le,Pe)})},Ot=Pe=>{Jt(({valueList:dt,expanderStateList:$t})=>{const pr=Pe?m?.find(({name:Xf})=>Xf===Pe)?.fields??[]:d??(f?[f]:[]),il=h?0:dt.length,mr=xs(Zf(pr));Pe&&(mr[p]=Pe),dt.splice(il,0,g&&f?mr[f.name]:mr),$t.splice(il,0,!0)})},st=Pe=>{Jt(({valueList:dt,expanderStateList:$t})=>{dt.splice(Pe,1),$t.splice(Pe,1)})},mn=Pe=>{Jt(({valueList:dt,expanderStateList:$t})=>{[dt[Pe],dt[Pe-1]]=[dt[Pe-1],dt[Pe]],[$t[Pe],$t[Pe-1]]=[$t[Pe-1],$t[Pe]]})},lt=Pe=>{Jt(({valueList:dt,expanderStateList:$t})=>{[dt[Pe],dt[Pe+1]]=[dt[Pe+1],dt[Pe]],[$t[Pe],$t[Pe+1]]=[$t[Pe+1],$t[Pe]]})},Me=(Pe,dt,$t)=>$t?$t.replaceAll(/{{fields\.(.+?)}}/g,(pr,il)=>{const mr=If({collectionName:S,fileName:E,valueMap:U,keyPath:g?`${Le}.${dt}`:`${Le}.${dt}.${il}`,locale:J});return Array.isArray(mr)?ee.format(mr):String(mr)}):Pe.title||Pe.name||"",Oe=()=>{zs({[K]:!ve})},ut=Pe=>{mn(Pe)},Xt=Pe=>{lt(Pe)},Rt=(Pe,dt)=>{zs({[Pe]:!dt})},qe=Pe=>{st(Pe)};function ct(Pe,dt){ae[Pe?"unshift":"push"](()=>{Qe[dt]=Pe,n(18,Qe)})}const bi=(Pe,{name:dt})=>dt===Pe[p];function bs(Pe){Ne=Pe,n(17,Ne)}const Jf=()=>{pt()};return t.$$set=Pe=>{"locale"in Pe&&n(0,J=Pe.locale),"keyPath"in Pe&&n(1,Le=Pe.keyPath),"fieldId"in Pe&&n(2,_e=Pe.fieldId),"fieldLabel"in Pe&&n(35,Be=Pe.fieldLabel),"fieldConfig"in Pe&&n(3,Ke=Pe.fieldConfig),"currentValue"in Pe&&n(36,de=Pe.currentValue),"readonly"in Pe&&n(4,ge=Pe.readonly),"required"in Pe&&n(5,pe=Pe.required),"invalid"in Pe&&n(6,We=Pe.invalid)},t.$$.update=()=>{t.$$.dirty[0]&8&&n(13,{name:i,label:r,i18n:s,allow_add:l=!0,collapsed:o=!1,summary:a,minimize_collapsed:u=!1,label_singular:c,field:f,fields:d,add_to_top:h=!1,types:m,typeKey:p="type"}=Ke,i,(n(27,r),n(3,Ke)),(n(39,s),n(3,Ke)),(n(26,l),n(3,Ke)),(n(25,a),n(3,Ke)),(n(24,c),n(3,Ke)),(n(9,f),n(3,Ke)),(n(10,d),n(3,Ke)),(n(20,h),n(3,Ke)),(n(11,m),n(3,Ke)),(n(19,p),n(3,Ke))),t.$$.dirty[0]&512&&n(7,g=!!f),t.$$.dirty[0]&1024&&n(46,v=Array.isArray(d)),t.$$.dirty[0]&2048&&n(15,b=Array.isArray(m)),t.$$.dirty[0]&32896|t.$$.dirty[1]&32768&&n(8,w=g||v||b),t.$$.dirty[0]&2&&n(40,k=new RegExp(`^${dn(Le)}\\.(\\d+)(.*)?`)),t.$$.dirty[1]&65536&&n(44,{collectionName:S,fileName:E,collection:P,collectionFile:M,currentValues:I,expanderStates:D}=se??{},P,(n(45,M),n(47,se)),(n(42,I),n(47,se)),(n(14,D),n(47,se))),t.$$.dirty[1]&24576&&n(43,{defaultLocale:z}=(M??P)?._i18n??gs,z),t.$$.dirty[0]&1|t.$$.dirty[1]&4352&&n(23,R=J!==z&&s==="duplicate"),t.$$.dirty[0]&1|t.$$.dirty[1]&2048&&n(38,U=I[J]),t.$$.dirty[0]&1&&n(41,W=Hr(J)),t.$$.dirty[1]&1024&&(ee=new Intl.ListFormat(W,{style:"narrow",type:"conjunction"})),t.$$.dirty[0]&2&&n(12,K=`${Le}#`),t.$$.dirty[0]&20480&&n(22,ve=!!D?._[K]),t.$$.dirty[0]&8194|t.$$.dirty[1]&640&&n(21,me=xs(Object.fromEntries(Object.entries(U).filter(([Pe])=>Pe.match(k)).map(([Pe,dt])=>[Pe.replace(new RegExp(`^${dn(Le)}`),i),dt])))[i]??[]),t.$$.dirty[0]&256|t.$$.dirty[1]&96&&ot&&!w&&rt()},[J,Le,_e,Ke,ge,pe,We,g,w,f,d,m,K,i,D,b,oe,Ne,Qe,p,h,me,ve,R,c,a,l,r,q,pt,Ot,st,mn,lt,Me,Be,de,ot,U,s,k,W,I,z,P,M,v,se,Oe,ut,Xt,Rt,qe,ct,bi,bs,Jf]}class PV extends ie{constructor(e){super(),ne(this,e,OV,LV,te,{locale:0,keyPath:1,fieldId:2,fieldLabel:35,fieldConfig:3,currentValue:36,readonly:4,required:5,invalid:6},gV,[-1,-1,-1])}}function IV(t){ye(t,"svelte-1e3n6y2","section.svelte-1e3n6y2.svelte-1e3n6y2{overflow:hidden;margin:8px 0;padding:8px 0}section.svelte-1e3n6y2>*{margin-right:auto;margin-left:auto;max-width:768px}section.svelte-1e3n6y2 h4.svelte-1e3n6y2{color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}section.svelte-1e3n6y2 h4.svelte-1e3n6y2:not(:last-child){margin-bottom:8px}section.svelte-1e3n6y2 p{margin:8px auto 0;-webkit-user-select:text;user-select:text}section.svelte-1e3n6y2 img{max-height:800px !important}section.svelte-1e3n6y2 .subsection{border-width:2px 2px 0;border-style:solid;border-color:var(--sui-secondary-border-color);padding:8px 16px}section.svelte-1e3n6y2 .subsection .title{font-size:inherit;font-weight:normal}section.svelte-1e3n6y2 .subsection:first-of-type{border-top-right-radius:var(--sui-control-medium-border-radius);border-top-left-radius:var(--sui-control-medium-border-radius)}section.svelte-1e3n6y2 .subsection:last-of-type{border-bottom:2px solid var(--sui-secondary-border-color);border-bottom-right-radius:var(--sui-control-medium-border-radius);border-bottom-left-radius:var(--sui-control-medium-border-radius)}")}function Ty(t){let e,n,i=(t[9]||t[10])+"",r,s,l,o,a,u=t[3]in Bc&&Ay(t);return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),u&&u.c(),C(n,"class","svelte-1e3n6y2"),C(e,"role","group"),C(e,"data-widget",t[3]),C(e,"data-key-path",t[1]),C(e,"tabindex","0"),C(e,"class","svelte-1e3n6y2")},m(c,f){A(c,e,f),$(e,n),$(n,r),$(e,s),u&&u.m(e,null),l=!0,o||(a=[Fe(e,"keydown",t[22]),Fe(e,"click",t[23])],o=!0)},p(c,f){(!l||f&1536)&&i!==(i=(c[9]||c[10])+"")&&X(r,i),c[3]in Bc?u?(u.p(c,f),f&8&&_(u,1)):(u=Ay(c),u.c(),_(u,1),u.m(e,null)):u&&(x(),y(u,1,1,()=>{u=null}),V()),(!l||f&8)&&C(e,"data-widget",c[3]),(!l||f&2)&&C(e,"data-key-path",c[1])},i(c){l||(_(u),l=!0)},o(c){y(u),l=!1},d(c){c&&T(e),u&&u.d(),o=!1,Gt(a)}}}function Ay(t){let e,n,i;var r=Bc[t[3]];function s(l,o){return{props:{keyPath:l[1],locale:l[0],fieldConfig:l[2],currentValue:l[4]}}}return r&&(e=an(r,s(t))),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o&8&&r!==(r=Bc[l[3]])){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s(l)),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}else if(r){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),o&4&&(a.fieldConfig=l[2]),o&16&&(a.currentValue=l[4]),e.$set(a)}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function DV(t){let e,n,i=t[3]!=="hidden"&&t[8]&&(t[0]===t[7]||t[6]||t[5])&&Ty(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[3]!=="hidden"&&r[8]&&(r[0]===r[7]||r[6]||r[5])?i?(i.p(r,s),s&489&&_(i,1)):(i=Ty(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function MV(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k;B(t,at,z=>n(21,k=z));let{locale:S}=e,{keyPath:E}=e,{fieldConfig:P}=e;const M=()=>{zs(Object.fromEntries(E.split(".").map((z,R,U)=>[xE(U,R+1),!0]))),window.requestAnimationFrame(()=>{const z=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(E)}"]`);z&&(typeof z.scrollIntoViewIfNeeded=="function"?z.scrollIntoViewIfNeeded():z.scrollIntoView(),z.classList.add("highlight"),window.setTimeout(()=>{z.classList.remove("highlight")},1500))})},I=z=>{z.key==="Enter"&&(z.stopPropagation(),M())},D=z=>{z.stopPropagation(),M()};return t.$$set=z=>{"locale"in z&&n(0,S=z.locale),"keyPath"in z&&n(1,E=z.keyPath),"fieldConfig"in z&&n(2,P=z.fieldConfig)},t.$$.update=()=>{t.$$.dirty&4&&n(10,{name:i,label:r="",widget:s="string",preview:l=!0,i18n:o=!1}=P,i,(n(9,r),n(2,P)),(n(3,s),n(2,P)),(n(8,l),n(2,P)),(n(15,o),n(2,P))),t.$$.dirty&8&&n(20,a=["relation","select"].includes(s)),t.$$.dirty&1048580&&n(19,u=a?P.multiple:void 0),t.$$.dirty&1572872&&n(14,c=s==="list"||a&&u),t.$$.dirty&2097152&&n(17,{collection:f,collectionFile:d,currentValues:h}=k??{},f,(n(18,d),n(21,k)),(n(12,h),n(21,k))),t.$$.dirty&393216&&n(16,{i18nEnabled:m,defaultLocale:p}=(d??f)?._i18n??gs,m,(n(7,p),n(18,d),n(17,f),n(21,k))),t.$$.dirty&98304&&n(6,g=m&&(o===!0||o==="translate")),t.$$.dirty&98304&&n(5,v=m&&o==="duplicate"),t.$$.dirty&2&&n(13,b=new RegExp(`^${dn(E)}\\.\\d+$`)),t.$$.dirty&28675&&n(4,w=c?Object.entries(h[S]).filter(([z])=>z.match(b)).map(([,z])=>z).filter(z=>z!==void 0):h[S][E])},[S,E,P,s,w,v,g,p,l,r,i,M,h,b,c,o,m,f,d,u,a,k,I,D]}class bg extends ie{constructor(e){super(),ne(this,e,MV,DV,te,{locale:0,keyPath:1,fieldConfig:2},IV)}}function Cy(t,e,n){const i=t.slice();i[18]=e[n],i[21]=e,i[22]=n;const r=Array.isArray(i[3])?i[6]?.currentValues[i[0]][`${i[1]}.${i[22]}.${i[11]}`]:void 0;i[19]=r;const s=i[19]?i[3]?.find(function(...o){return t[17](i[19],...o)})?.fields??[]:i[4]??(i[5]?[i[5]]:[]);return i[20]=s,i}function Ny(t,e,n){const i=t.slice();return i[23]=e[n],i}function RV(t){let e,n=t[9].format(t[2])+"",i;return{c(){e=F("p"),i=G(n)},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&516&&n!==(n=r[9].format(r[2])+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function $V(t){let e,n,i=be(t[8]),r=[];for(let l=0;l<i.length;l+=1)r[l]=Oy(Cy(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Q()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);A(l,e,o),n=!0},p(l,o){if(o&2555){i=be(l[8]);let a;for(a=0;a<i.length;a+=1){const u=Cy(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=Oy(u),r[a].c(),_(r[a],1),r[a].m(e.parentNode,e))}for(x(),a=i.length;a<r.length;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<i.length;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function FV(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function zV(t){let e=[],n=new Map,i,r,s=be(t[20]);const l=o=>o[23].name;for(let o=0;o<s.length;o+=1){let a=Ny(t,s,o),u=l(a);n.set(u,e[o]=Ly(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&2171&&(s=be(o[20]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Ly,i,Ny),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Ly(t,e){let n,i,r;return i=new bg({props:{keyPath:e[5]?`${e[1]}.${e[22]}`:`${e[1]}.${e[22]}.${e[23].name}`,locale:e[0],fieldConfig:e[23]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&2171&&(o.keyPath=e[5]?`${e[1]}.${e[22]}`:`${e[1]}.${e[22]}.${e[23].name}`),l&1&&(o.locale=e[0]),l&2171&&(o.fieldConfig=e[23]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function jV(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function Oy(t){let e,n,i,r=t[22],s,l={ctx:t,current:null,token:null,hasCatch:!1,pending:jV,then:zV,catch:FV,blocks:[,,,]};Ci(n=Ni(t[7][t[22]]),l);const o=()=>t[16](e,r),a=()=>t[16](null,r);return{c(){e=F("section"),l.block.c(),i=j(),C(e,"class","subsection")},m(u,c){A(u,e,c),l.block.m(e,l.anchor=null),l.mount=()=>e,l.anchor=i,$(e,i),o(),s=!0},p(u,c){t=u,l.ctx=t,c&128&&n!==(n=Ni(t[7][t[22]]))&&Ci(n,l)||so(l,t,c),r!==t[22]&&(a(),r=t[22],o())},i(u){s||(_(l.block),s=!0)},o(u){for(let c=0;c<3;c+=1){const f=l.blocks[c];y(f)}s=!1},d(u){u&&T(e),l.block.d(),l.token=null,l=null,a()}}}function BV(t){let e,n,i,r,s;const l=[$V,RV],o=[];function a(u,c){return c&4&&(e=null),u[10]?0:(e==null&&(e=!!(Array.isArray(u[2])&&u[2].length)),e?1:-1)}return~(n=a(t,-1))&&(i=o[n]=l[n](t)),{c(){i&&i.c(),r=Q()},m(u,c){~n&&o[n].m(u,c),A(u,r,c),s=!0},p(u,[c]){let f=n;n=a(u,c),n===f?~n&&o[n].p(u,c):(i&&(x(),y(o[f],1,1,()=>{o[f]=null}),V()),~n?(i=o[n],i?i.p(u,c):(i=o[n]=l[n](u),i.c()),_(i,1),i.m(r.parentNode,r)):i=null)},i(u){s||(_(i),s=!0)},o(u){y(i),s=!1},d(u){u&&T(r),~n&&o[n].d(u)}}}function UV(t,e,n){let i,r,s,l,o,a,u,c,f,d,h;B(t,at,S=>n(6,h=S));let{locale:m}=e,{keyPath:p}=e,{fieldConfig:g}=e,{currentValue:v}=e;const b=[];function w(S,E){ae[S?"unshift":"push"](()=>{b[E]=S,n(7,b)})}const k=(S,{name:E})=>E===S;return t.$$set=S=>{"locale"in S&&n(0,m=S.locale),"keyPath"in S&&n(1,p=S.keyPath),"fieldConfig"in S&&n(12,g=S.fieldConfig),"currentValue"in S&&n(2,v=S.currentValue)},t.$$.update=()=>{t.$$.dirty&4096&&n(13,{name:i,field:r,fields:s,types:l,typeKey:o="type"}=g,i,(n(5,r),n(12,g)),(n(4,s),n(12,g)),(n(3,l),n(12,g)),(n(11,o),n(12,g))),t.$$.dirty&56&&n(10,a=!!(r??s??l)),t.$$.dirty&2&&n(14,u=new RegExp(`^${dn(p)}\\.\\d+`)),t.$$.dirty&1&&n(15,c=Hr(m)),t.$$.dirty&32768&&n(9,f=new Intl.ListFormat(c,{style:"narrow",type:"conjunction"})),t.$$.dirty&24643&&n(8,d=xs(Object.fromEntries(Object.entries(h?.currentValues[m]??{}).filter(([S])=>S.match(u)).map(([S,E])=>[S.replace(new RegExp(`^${dn(p)}`),i),E])))[i]??[])},[m,p,v,l,s,r,h,b,d,f,a,o,g,i,u,c,w,k]}class qV extends ie{constructor(e){super(),ne(this,e,UV,BV,te,{locale:0,keyPath:1,fieldConfig:12,currentValue:2})}}const HV=["rich_text","raw"],xV={rich_text:"rich-text",raw:"plain-text"},VV=["bold","italic","code","link","heading-one","heading-two","heading-three","heading-four","heading-five","heading-six","bulleted-list","numbered-list","quote"],WV={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"};function YV(t){ye(t,"svelte-1e9a0b3",'.wrapper.svelte-1e9a0b3{display:contents}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],.wrapper.minimal.svelte-1e9a0b3 textarea{overflow:auto;max-height:240px}')}function GV(t){let e,n,i,r;function s(o){t[14](o)}let l={modes:t[7].map(t[12]).filter(Boolean),buttons:t[6].map(t[13]).filter(Boolean),flex:!0,readonly:t[2],required:t[3],invalid:t[4],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error",autoResize:!0};return t[0]!==void 0&&(l.value=t[0]),n=new RI({props:l}),ae.push(()=>Re(n,"value",s)),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-1e9a0b3"),re(e,"minimal",t[5])},m(o,a){A(o,e,a),N(n,e,null),r=!0},p(o,[a]){const u={};a&128&&(u.modes=o[7].map(o[12]).filter(Boolean)),a&64&&(u.buttons=o[6].map(o[13]).filter(Boolean)),a&4&&(u.readonly=o[2]),a&8&&(u.required=o[3]),a&16&&(u.invalid=o[4]),a&2&&(u["aria-labelledby"]=o[1]+"-label"),a&2&&(u["aria-errormessage"]=o[1]+"-error"),!i&&a&1&&(i=!0,u.value=o[0],$e(()=>i=!1)),n.$set(u),(!r||a&32)&&re(e,"minimal",o[5])},i(o){r||(_(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&T(e),L(n)}}}function KV(t,e,n){let i,r,s,{locale:l}=e,{keyPath:o}=e,{fieldId:a}=e,{fieldLabel:u}=e,{fieldConfig:c}=e,{currentValue:f}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e;const p=b=>xV[b],g=b=>WV[b];function v(b){f=b,n(0,f)}return t.$$set=b=>{"locale"in b&&n(8,l=b.locale),"keyPath"in b&&n(9,o=b.keyPath),"fieldId"in b&&n(1,a=b.fieldId),"fieldLabel"in b&&n(10,u=b.fieldLabel),"fieldConfig"in b&&n(11,c=b.fieldConfig),"currentValue"in b&&n(0,f=b.currentValue),"readonly"in b&&n(2,d=b.readonly),"required"in b&&n(3,h=b.required),"invalid"in b&&n(4,m=b.invalid)},t.$$.update=()=>{t.$$.dirty&2048&&n(7,{modes:i=[...HV],buttons:r=[...VV],minimal:s=!1}=c,i,(n(6,r),n(11,c)),(n(5,s),n(11,c)))},[f,a,d,h,m,s,r,i,l,o,u,c,p,g,v]}class ZV extends ie{constructor(e){super(),ne(this,e,KV,GV,te,{locale:8,keyPath:9,fieldId:1,fieldLabel:10,fieldConfig:11,currentValue:0,readonly:2,required:3,invalid:4},YV)}}function JV(t){ye(t,"svelte-1xowtfp","div.svelte-1xowtfp :is(h1, h2, h3, h4, h5, h6, p, ul, ol){margin:1em 0 0}div.svelte-1xowtfp :is(video, img){max-width:100%;max-height:100%}")}function Py(t){let e,n=(t[2]?kn.sanitize(t[1]):t[1])+"",i;return{c(){e=new xc(!1),i=Q(),e.a=i},m(r,s){e.m(n,r,s),A(r,i,s)},p(r,s){s&6&&n!==(n=(r[2]?kn.sanitize(r[1]):r[1])+"")&&e.p(n)},d(r){r&&(T(i),e.d())}}}function XV(t){let e,n=typeof t[0]=="string"&&t[0].trim(),i=n&&Py(t);return{c(){e=F("div"),i&&i.c(),C(e,"role","none"),C(e,"class","svelte-1xowtfp")},m(r,s){A(r,e,s),i&&i.m(e,null)},p(r,[s]){s&1&&(n=typeof r[0]=="string"&&r[0].trim()),n?i?i.p(r,s):(i=Py(r),i.c(),i.m(e,null)):i&&(i.d(1),i=null)},i:H,o:H,d(r){r&&T(e),i&&i.d()}}}function QV(t,e,n){let i,r;B(t,at,f=>n(6,r=f));let{locale:s}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;const u={breaks:!0,async:!0,walkTokens:async f=>{if(f.type==="image"){const d=await Ws(f.href,r?.originalEntry);d&&(f.href=d)}}};let c="";return t.$$set=f=>{"locale"in f&&n(3,s=f.locale),"keyPath"in f&&n(4,l=f.keyPath),"fieldConfig"in f&&n(5,o=f.fieldConfig),"currentValue"in f&&n(0,a=f.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&n(2,{sanitize_preview:i=!1}=o,i),t.$$.dirty&1&&(async()=>n(1,c=await Tt.parse(a??"",u)))()},[a,c,i,s,l,o]}class eW extends ie{constructor(e){super(),ne(this,e,QV,XV,te,{locale:3,keyPath:4,fieldConfig:5,currentValue:0},JV)}}function tW(t){let e,n,i;function r(l){t[13](l)}let s={min:t[7],max:t[6],step:t[5],readonly:t[1],required:t[2],invalid:t[3],"aria-labelledby":t[0]+"-label","aria-errormessage":t[0]+"-error"};return t[4]!==void 0&&(s.value=t[4]),e=new VI({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&128&&(a.min=l[7]),o&64&&(a.max=l[6]),o&32&&(a.step=l[5]),o&2&&(a.readonly=l[1]),o&4&&(a.required=l[2]),o&8&&(a.invalid=l[3]),o&1&&(a["aria-labelledby"]=l[0]+"-label"),o&1&&(a["aria-errormessage"]=l[0]+"-error"),!n&&o&16&&(n=!0,a.value=l[4],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function nW(t,e,n){let i,r,s,l,{locale:o}=e,{keyPath:a}=e,{fieldId:u}=e,{fieldLabel:c}=e,{fieldConfig:f}=e,{currentValue:d}=e,{readonly:h=!1}=e,{required:m=!1}=e,{invalid:p=!1}=e,g="";const v=()=>{d!==void 0&&g!==String(d)&&n(4,g=String(d))},b=()=>{let k;i==="int"?k=Number.parseInt(g,10):i==="float"?k=Number.parseFloat(g):k=g,(i==="int"||i==="float")&&Number.isNaN(k)&&(k=""),d!==k&&n(8,d=k)};function w(k){g=k,n(4,g)}return t.$$set=k=>{"locale"in k&&n(9,o=k.locale),"keyPath"in k&&n(10,a=k.keyPath),"fieldId"in k&&n(0,u=k.fieldId),"fieldLabel"in k&&n(11,c=k.fieldLabel),"fieldConfig"in k&&n(12,f=k.fieldConfig),"currentValue"in k&&n(8,d=k.currentValue),"readonly"in k&&n(1,h=k.readonly),"required"in k&&n(2,m=k.required),"invalid"in k&&n(3,p=k.invalid)},t.$$.update=()=>{t.$$.dirty&4096&&n(7,{value_type:i="int",min:r,max:s,step:l=1}=f,r,(n(6,s),n(12,f)),(n(5,l),n(12,f))),t.$$.dirty&256&&v(),t.$$.dirty&16&&b()},[u,h,m,p,g,l,s,r,d,o,a,c,f,w]}class iW extends ie{constructor(e){super(),ne(this,e,nW,tW,te,{locale:9,keyPath:10,fieldId:0,fieldLabel:11,fieldConfig:12,currentValue:8,readonly:1,required:2,invalid:3})}}function Iy(t){let e;function n(s,l){return s[2]==="int"||s[2]==="float"?sW:rW}let i=n(t),r=i(t);return{c(){e=F("p"),r.c()},m(s,l){A(s,e,l),r.m(e,null)},p(s,l){i===(i=n(s))&&r?r.p(s,l):(r.d(1),r=i(s),r&&(r.c(),r.m(e,null)))},d(s){s&&T(e),r.d()}}}function rW(t){let e;return{c(){e=G(t[0])},m(n,i){A(n,e,i)},p(n,i){i&1&&X(e,n[0])},d(n){n&&T(e)}}}function sW(t){let e=t[1].format(Number(t[0]))+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&3&&e!==(e=i[1].format(Number(i[0]))+"")&&X(n,e)},d(i){i&&T(n)}}}function lW(t){let e,n=t[0]!==void 0&&t[0]!==""&&Iy(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,[r]){i[0]!==void 0&&i[0]!==""?n?n.p(i,r):(n=Iy(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:H,o:H,d(i){i&&T(e),n&&n.d(i)}}}function oW(t,e,n){let i,r,s,{locale:l}=e,{keyPath:o}=e,{fieldConfig:a}=e,{currentValue:u}=e;return t.$$set=c=>{"locale"in c&&n(3,l=c.locale),"keyPath"in c&&n(4,o=c.keyPath),"fieldConfig"in c&&n(5,a=c.fieldConfig),"currentValue"in c&&n(0,u=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&n(2,{value_type:i="int"}=a,i),t.$$.dirty&8&&n(6,r=Hr(l)),t.$$.dirty&64&&n(1,s=Intl.NumberFormat(r))},[u,s,i,l,o,a,r]}class aW extends ie{constructor(e){super(),ne(this,e,oW,lW,te,{locale:3,keyPath:4,fieldConfig:5,currentValue:0})}}function uW(t){ye(t,"svelte-7ryjkt",".wrapper.svelte-7ryjkt{display:contents}.wrapper.svelte-7ryjkt>.group{border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}.summary.svelte-7ryjkt{overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis}")}function Dy(t,e,n){const i=t.slice();return i[45]=e[n],i}function My(t){let e,n,i;return n=new Tn({props:{"aria-labelledby":t[11]?void 0:`object-${t[6]}-summary`,$$slots:{default:[mW]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-7ryjkt")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s[0]&2112&&(l["aria-labelledby"]=r[11]?void 0:`object-${r[6]}-summary`),s[0]&4091|s[1]&131072&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function cW(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function fW(t){let e,n,i,r;const s=[hW,dW],l=[];function o(a,u){return a[11]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function dW(t){let e,n=t[16]()+"",i,r;return{c(){e=F("div"),i=G(n),C(e,"role","none"),C(e,"class","summary svelte-7ryjkt"),C(e,"id",r="object-"+t[6]+"-summary")},m(s,l){A(s,e,l),$(e,i)},p(s,l){l[0]&64&&r!==(r="object-"+s[6]+"-summary")&&C(e,"id",r)},i:H,o:H,d(s){s&&T(e)}}}function hW(t){let e=[],n=new Map,i,r,s=be(t[8]);const l=o=>o[45].name;for(let o=0;o<s.length;o+=1){let a=Dy(t,s,o),u=l(a);n.set(u,e[o]=Ry(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a[0]&259&&(s=be(o[8]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Ry,i,Dy),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Ry(t,e){let n,i,r;return i=new vg({props:{keyPath:[e[1],e[45].name].join("."),locale:e[0],fieldConfig:e[45]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l[0]&258&&(o.keyPath=[e[1],e[45].name].join(".")),l[0]&1&&(o.locale=e[0]),l[0]&256&&(o.fieldConfig=e[45]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function pW(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function mW(t){let e,n,i,r,s,l;e=new oT({props:{label:t[4]?t[5]?.label||t[5]?.name:"",controlId:"object-"+t[6]+"-item-list",expanded:t[11],toggleExpanded:t[37],removeButtonVisible:t[10],removeButtonDisabled:t[9],remove:t[38]}});let o={ctx:t,current:null,token:null,hasCatch:!1,pending:pW,then:fW,catch:cW,blocks:[,,,]};return Ci(r=Ni(t[7]),o),{c(){O(e.$$.fragment),n=j(),i=F("div"),o.block.c(),C(i,"role","none"),C(i,"class","item-list"),C(i,"id",s="object-"+t[6]+"-item-list")},m(a,u){N(e,a,u),A(a,n,u),A(a,i,u),o.block.m(i,o.anchor=null),o.mount=()=>i,o.anchor=null,t[39](i),l=!0},p(a,u){t=a;const c={};u[0]&48&&(c.label=t[4]?t[5]?.label||t[5]?.name:""),u[0]&64&&(c.controlId="object-"+t[6]+"-item-list"),u[0]&2048&&(c.expanded=t[11]),u[0]&2056&&(c.toggleExpanded=t[37]),u[0]&1024&&(c.removeButtonVisible=t[10]),u[0]&512&&(c.removeButtonDisabled=t[9]),e.$set(c),o.ctx=t,u[0]&128&&r!==(r=Ni(t[7]))&&Ci(r,o)||so(o,t,u),(!l||u[0]&64&&s!==(s="object-"+t[6]+"-item-list"))&&C(i,"id",s)},i(a){l||(_(e.$$.fragment,a),_(o.block),l=!0)},o(a){y(e.$$.fragment,a);for(let u=0;u<3;u+=1){const c=o.blocks[u];y(c)}l=!1},d(a){a&&(T(n),T(i)),L(e,a),o.block.d(),o.token=null,o=null,t[39](null)}}}function $y(t){let e,n;return e=new _g({props:{disabled:t[9],fieldConfig:t[2],addItem:t[14]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&512&&(s.disabled=i[9]),r[0]&4&&(s.fieldConfig=i[2]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gW(t){let e,n,i,r=(!t[10]||t[13])&&t[12]&&My(t),s=t[10]&&!t[13]&&t[12]&&$y(t);return{c(){r&&r.c(),e=j(),s&&s.c(),n=Q()},m(l,o){r&&r.m(l,o),A(l,e,o),s&&s.m(l,o),A(l,n,o),i=!0},p(l,o){(!l[10]||l[13])&&l[12]?r?(r.p(l,o),o[0]&13312&&_(r,1)):(r=My(l),r.c(),_(r,1),r.m(e.parentNode,e)):r&&(x(),y(r,1,1,()=>{r=null}),V()),l[10]&&!l[13]&&l[12]?s?(s.p(l,o),o[0]&13312&&_(s,1)):(s=$y(l),s.c(),_(s,1),s.m(n.parentNode,n)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){i||(_(r),_(s),i=!0)},o(l){y(r),y(s),i=!1},d(l){l&&(T(e),T(n)),r&&r.d(l),s&&s.d(l)}}}function _W(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k,S,E,P,M,I,D,z,R,U,W;B(t,at,Ne=>n(36,W=Ne));let{locale:ee}=e,{keyPath:K}=e,{fieldId:ve}=e,{fieldLabel:me}=e,{fieldConfig:se}=e,{currentValue:q}=e,{readonly:J=!1}=e,{required:Le=!1}=e,{invalid:_e=!1}=e,Be="",Ke;Ut(()=>{n(6,Be=ki("short")),zs({[S]:!r})});const de=async Ne=>{Ne&&(Object.keys(W?.currentValues??{}).forEach(rt=>{(rt===ee||i==="duplicate")&&ze(at,W.currentValues[rt][M]=Ne,W)}),await e2());const Qe=mp(Object.fromEntries(Object.entries(Zf(D)).map(([rt,pt])=>[`${K}.${rt}`,pt])));Object.keys(W?.currentValues??{}).forEach(rt=>{(rt===ee||i==="duplicate")&&(ze(at,W.currentValues[rt]=io({draft:W,locale:rt,target:{...Qe,...W?.currentValues[rt]}}),W),delete W.currentValues[rt][K])})},ge=()=>{Object.entries(W?.currentValues??{}).forEach(([Ne,Qe])=>{(Ne===ee||i==="duplicate")&&(Object.keys(Qe).forEach(rt=>{rt.startsWith(`${K}.`)&&(ze(at,W.currentValues[Ne][rt]=null,W),delete W?.currentValues[Ne][rt])}),Le&&ze(at,W.currentValues[Ne][K]=null,W))})},pe=()=>z?z.replaceAll(/{{fields\.(.+?)}}/g,(Ne,Qe)=>{const rt=If({collectionName:u,fileName:c,valueMap:g,keyPath:`${K}.${Qe}`,locale:ee});return Array.isArray(rt)?k.format(rt):String(rt)}):g[`${K}.title`]??g[`${K}.name`]??"",We=()=>{zs({[S]:!E})},ot=()=>{ge()};function oe(Ne){ae[Ne?"unshift":"push"](()=>{Ke=Ne,n(7,Ke)})}return t.$$set=Ne=>{"locale"in Ne&&n(0,ee=Ne.locale),"keyPath"in Ne&&n(1,K=Ne.keyPath),"fieldId"in Ne&&n(17,ve=Ne.fieldId),"fieldLabel"in Ne&&n(18,me=Ne.fieldLabel),"fieldConfig"in Ne&&n(2,se=Ne.fieldConfig),"currentValue"in Ne&&n(19,q=Ne.currentValue),"readonly"in Ne&&n(20,J=Ne.readonly),"required"in Ne&&n(21,Le=Ne.required),"invalid"in Ne&&n(22,_e=Ne.invalid)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(24,{i18n:i=!1,collapsed:r=!1,summary:s,fields:l,types:o,typeKey:a="type"}=se,i,(n(27,s),n(2,se)),(n(28,l),n(2,se)),(n(29,o),n(2,se)),(n(30,a),n(2,se))),t.$$.dirty[1]&32&&n(34,{collectionName:u,fileName:c,collection:f,collectionFile:d,currentValues:h,expanderStates:m}=W??{},f,(n(35,d),n(36,W)),(n(33,h),n(36,W)),(n(31,m),n(36,W))),t.$$.dirty[1]&24&&n(26,{defaultLocale:p}=(d??f)?._i18n??gs,p),t.$$.dirty[0]&1|t.$$.dirty[1]&4&&n(23,g=h[ee]),t.$$.dirty[0]&8388610&&n(13,v=Object.entries(g).some(([Ne,Qe])=>!!Ne.startsWith(`${K}.`)&&Qe!==null)),t.$$.dirty[0]&83886081&&n(12,b=ee===p||i!==!1),t.$$.dirty[0]&1&&n(32,w=Hr(ee)),t.$$.dirty[1]&2&&(k=new Intl.ListFormat(w,{style:"narrow",type:"conjunction"})),t.$$.dirty[0]&2&&n(3,S=`${K}#`),t.$$.dirty[0]&8|t.$$.dirty[1]&1&&n(11,E=!!m?._[S]),t.$$.dirty[0]&536870912&&n(4,P=Array.isArray(o)),t.$$.dirty[0]&1073741826&&n(25,M=`${K}.${a}`),t.$$.dirty[0]&578813968&&n(5,I=P?o?.find(({name:Ne})=>Ne===g[M]):void 0),t.$$.dirty[0]&268435504&&n(8,D=(P?I?.fields:l)??[]),t.$$.dirty[0]&134217776&&(z=P&&I?.summary||s),t.$$.dirty[0]&2097168&&n(10,R=!Le||P),t.$$.dirty[0]&83886081&&n(9,U=ee!==p&&i==="duplicate")},[ee,K,se,S,P,I,Be,Ke,D,U,R,E,b,v,de,ge,pe,ve,me,q,J,Le,_e,g,i,M,p,s,l,o,a,m,w,h,f,d,W,We,ot,oe]}class bW extends ie{constructor(e){super(),ne(this,e,_W,gW,te,{locale:0,keyPath:1,fieldId:17,fieldLabel:18,fieldConfig:2,currentValue:19,readonly:20,required:21,invalid:22},uW,[-1,-1])}}function Fy(t,e,n){const i=t.slice();return i[16]=e[n],i}function zy(t){let e,n,i,r={ctx:t,current:null,token:null,hasCatch:!1,pending:wW,then:yW,catch:vW,blocks:[,,,]};return Ci(n=Ni(t[2]),r),{c(){e=F("section"),r.block.c(),C(e,"class","subsection")},m(s,l){A(s,e,l),r.block.m(e,r.anchor=null),r.mount=()=>e,r.anchor=null,t[15](e),i=!0},p(s,l){t=s,r.ctx=t,l&4&&n!==(n=Ni(t[2]))&&Ci(n,r)||so(r,t,l)},i(s){i||(_(r.block),i=!0)},o(s){for(let l=0;l<3;l+=1){const o=r.blocks[l];y(o)}i=!1},d(s){s&&T(e),r.block.d(),r.token=null,r=null,t[15](null)}}}function vW(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function yW(t){let e=[],n=new Map,i,r,s=be(t[3]);const l=o=>o[16].name;for(let o=0;o<s.length;o+=1){let a=Fy(t,s,o),u=l(a);n.set(u,e[o]=jy(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&11&&(s=be(o[3]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,jy,i,Fy),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function jy(t,e){let n,i,r;return i=new bg({props:{keyPath:[e[1],e[16].name].join("."),locale:e[0],fieldConfig:e[16]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&10&&(o.keyPath=[e[1],e[16].name].join(".")),l&1&&(o.locale=e[0]),l&8&&(o.fieldConfig=e[16]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function wW(t){return{c:H,m:H,p:H,i:H,o:H,d:H}}function kW(t){let e,n,i=t[4]&&zy(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[4]?i?(i.p(r,s),s&16&&_(i,1)):(i=zy(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function SW(t,e,n){let i,r,s,l,o,a,u,c,f,d;B(t,at,w=>n(14,d=w));let{locale:h}=e,{keyPath:m}=e,{fieldConfig:p}=e,{currentValue:g}=e,v;function b(w){ae[w?"unshift":"push"](()=>{v=w,n(2,v)})}return t.$$set=w=>{"locale"in w&&n(0,h=w.locale),"keyPath"in w&&n(1,m=w.keyPath),"fieldConfig"in w&&n(5,p=w.fieldConfig),"currentValue"in w&&n(6,g=w.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&n(7,{fields:i,types:r,typeKey:s="type"}=p,i,(n(12,r),n(5,p)),(n(13,s),n(5,p))),t.$$.dirty&16385&&n(11,l=d?.currentValues[h]??{}),t.$$.dirty&2050&&n(4,o=Object.entries(l).some(([w,k])=>!!w.startsWith(`${m}.`)&&!!k)),t.$$.dirty&4096&&n(9,a=Array.isArray(r)),t.$$.dirty&8194&&n(10,u=`${m}.${s}`),t.$$.dirty&7680&&n(8,c=a?r?.find(({name:w})=>w===l[u]):void 0),t.$$.dirty&896&&n(3,f=(a?c?.fields:i)??[])},[h,m,v,f,o,p,g,i,c,a,u,l,r,s,d,b]}class EW extends ie{constructor(e){super(),ne(this,e,SW,kW,te,{locale:0,keyPath:1,fieldConfig:5,currentValue:6})}}function TW(t){ye(t,"svelte-1osax9j",".multi-selector.svelte-1osax9j.svelte-1osax9j{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.multi-selector.disabled.svelte-1osax9j.svelte-1osax9j{pointer-events:none}.multi-selector.disabled.svelte-1osax9j>.svelte-1osax9j{opacity:0.5}.multi-selector.svelte-1osax9j span.svelte-1osax9j{display:inline-flex;align-items:center;gap:8px;padding:0 0 0 8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color)}.multi-selector.svelte-1osax9j span.svelte-1osax9j .icon{font-size:var(--sui-font-size-large)}")}function By(t,e,n){const i=t.slice();return i[26]=e[n].label,i[27]=e[n].value,i[28]=e[n].searchValue,i}function Uy(t,e,n){const i=t.slice();return i[26]=e[n].label,i[27]=e[n].value,i[28]=e[n].searchValue,i}function qy(t,e,n){const i=t.slice();i[27]=e[n],i[33]=n;const r=i[6].find(function(...l){return t[20](i[27],...l)});return i[31]=r,i}function AW(t){let e,n,i;function r(l){t[23](l)}let s={readonly:t[2],required:t[3],invalid:t[4],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error",$$slots:{default:[NW]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.value=t[0]),e=new Cp({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o[0]&4&&(a.readonly=l[2]),o[0]&8&&(a.required=l[3]),o[0]&16&&(a.invalid=l[4]),o[0]&2&&(a["aria-labelledby"]=l[1]+"-label"),o[0]&2&&(a["aria-errormessage"]=l[1]+"-error"),o[0]&65|o[1]&32&&(a.$$scope={dirty:o,ctx:l}),!n&&o[0]&1&&(n=!0,a.value=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function CW(t){let e,n,i,r=be(t[0]),s=[];for(let a=0;a<r.length;a+=1)s[a]=Vy(qy(t,r,a));const l=a=>y(s[a],1,1,()=>{s[a]=null});let o=(typeof t[7]!="number"||t[0].length<t[7])&&t[0].length<t[6].length&&Wy(t);return{c(){e=F("div");for(let a=0;a<s.length;a+=1)s[a].c();n=j(),o&&o.c(),C(e,"role","none"),C(e,"class","multi-selector svelte-1osax9j"),re(e,"disabled",t[2])},m(a,u){A(a,e,u);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(e,null);$(e,n),o&&o.m(e,null),i=!0},p(a,u){if(u[0]&5189){r=be(a[0]);let c;for(c=0;c<r.length;c+=1){const f=qy(a,r,c);s[c]?(s[c].p(f,u),_(s[c],1)):(s[c]=Vy(f),s[c].c(),_(s[c],1),s[c].m(e,n))}for(x(),c=r.length;c<s.length;c+=1)l(c);V()}(typeof a[7]!="number"||a[0].length<a[7])&&a[0].length<a[6].length?o?(o.p(a,u),u[0]&193&&_(o,1)):(o=Wy(a),o.c(),_(o,1),o.m(e,null)):o&&(x(),y(o,1,1,()=>{o=null}),V()),(!i||u[0]&4)&&re(e,"disabled",a[2])},i(a){if(!i){for(let u=0;u<r.length;u+=1)_(s[u]);_(o),i=!0}},o(a){s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)y(s[u]);y(o),i=!1},d(a){a&&T(e),ni(s,a),o&&o.d()}}}function Hy(t,e){let n,i,r;return i=new mi({props:{label:e[26],value:e[27],searchValue:e[28],selected:e[27]===e[0]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l[0]&64&&(o.label=e[26]),l[0]&64&&(o.value=e[27]),l[0]&64&&(o.searchValue=e[28]),l[0]&65&&(o.selected=e[27]===e[0]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function NW(t){let e=[],n=new Map,i,r,s=be(t[6]);const l=o=>o[27];for(let o=0;o<s.length;o+=1){let a=By(t,s,o),u=l(a);n.set(u,e[o]=Hy(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a[0]&65&&(s=be(o[6]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Hy,i,By),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function xy(t){let e,n=t[31].label+"",i,r,s,l;function o(){return t[19](t[33])}return s=new et({props:{iconic:!0,size:"small",disabled:t[2],"aria-label":t[10]("remove_x",{values:{name:t[31].label}}),$$slots:{"start-icon":[LW]},$$scope:{ctx:t}}}),s.$on("click",o),{c(){e=F("span"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","none"),C(e,"class","svelte-1osax9j")},m(a,u){A(a,e,u),$(e,i),$(e,r),N(s,e,null),l=!0},p(a,u){t=a,(!l||u[0]&65)&&n!==(n=t[31].label+"")&&X(i,n);const c={};u[0]&4&&(c.disabled=t[2]),u[0]&1089&&(c["aria-label"]=t[10]("remove_x",{values:{name:t[31].label}})),u[1]&32&&(c.$$scope={dirty:u,ctx:t}),s.$set(c)},i(a){l||(_(s.$$.fragment,a),l=!0)},o(a){y(s.$$.fragment,a),l=!1},d(a){a&&T(e),L(s)}}}function LW(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"close"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Vy(t){let e,n,i=t[31]&&xy(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[31]?i?(i.p(r,s),s[0]&65&&_(i,1)):(i=xy(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function Wy(t){let e,n,i;function r(l){t[21](l)}let s={disabled:t[2],readonly:t[2],required:t[3],invalid:t[4],$$slots:{default:[OW]},$$scope:{ctx:t}};return t[5]!==void 0&&(s.value=t[5]),e=new Cp({props:s}),ae.push(()=>Re(e,"value",r)),e.$on("change",t[22]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,o){const a={};o[0]&4&&(a.disabled=l[2]),o[0]&4&&(a.readonly=l[2]),o[0]&8&&(a.required=l[3]),o[0]&16&&(a.invalid=l[4]),o[0]&65|o[1]&32&&(a.$$scope={dirty:o,ctx:l}),!n&&o[0]&32&&(n=!0,a.value=l[5],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function Yy(t){let e,n;return e=new mi({props:{label:t[26],value:t[27],searchValue:t[28]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&64&&(s.label=i[26]),r[0]&64&&(s.value=i[27]),r[0]&64&&(s.searchValue=i[28]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Gy(t,e){let n,i=!e[0].includes(e[27]),r,s,l=i&&Yy(e);return{key:t,first:null,c(){n=Q(),l&&l.c(),r=Q(),this.first=n},m(o,a){A(o,n,a),l&&l.m(o,a),A(o,r,a),s=!0},p(o,a){e=o,a[0]&65&&(i=!e[0].includes(e[27])),i?l?(l.p(e,a),a[0]&65&&_(l,1)):(l=Yy(e),l.c(),_(l,1),l.m(r.parentNode,r)):l&&(x(),y(l,1,1,()=>{l=null}),V())},i(o){s||(_(l),s=!0)},o(o){y(l),s=!1},d(o){o&&(T(n),T(r)),l&&l.d(o)}}}function OW(t){let e=[],n=new Map,i,r,s=be(t[6]);const l=o=>o[27];for(let o=0;o<s.length;o+=1){let a=Uy(t,s,o),u=l(a);n.set(u,e[o]=Gy(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a[0]&65&&(s=be(o[6]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Gy,i,Uy),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function PW(t){let e,n,i,r;const s=[CW,AW],l=[];function o(a,u){return a[8]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function IW(t,e,n){let i,r,s,l,o,a,u;B(t,at,U=>n(9,a=U)),B(t,ue,U=>n(10,u=U));let{locale:c}=e,{keyPath:f}=e,{fieldId:d}=e,{fieldLabel:h}=e,{fieldConfig:m}=e,{currentValue:p}=e,{sortOptions:g=!1}=e,{readonly:v=!1}=e,{required:b=!1}=e,{invalid:w=!1}=e,k;const S=U=>{Object.keys(a?.currentValues??{}).forEach(W=>{i!=="duplicate"&&W!==c||UE(W,f,U)})},E=U=>{S(({valueList:W})=>{W.push(U)})},P=U=>{S(({valueList:W})=>{W.splice(U,1)})},M=U=>{P(U)},I=(U,W)=>W.value===U;function D(U){k=U,n(5,k)}const z=()=>{a&&k&&(E(k),n(5,k=void 0))};function R(U){p=U,n(0,p)}return t.$$set=U=>{"locale"in U&&n(13,c=U.locale),"keyPath"in U&&n(14,f=U.keyPath),"fieldId"in U&&n(1,d=U.fieldId),"fieldLabel"in U&&n(15,h=U.fieldLabel),"fieldConfig"in U&&n(16,m=U.fieldConfig),"currentValue"in U&&n(0,p=U.currentValue),"sortOptions"in U&&n(17,g=U.sortOptions),"readonly"in U&&n(2,v=U.readonly),"required"in U&&n(3,b=U.required),"invalid"in U&&n(4,w=U.invalid)},t.$$.update=()=>{t.$$.dirty[0]&65536&&n(18,{i18n:i,options:r,multiple:s,max:l}=m,r,(n(8,s),n(16,m)),(n(7,l),n(16,m))),t.$$.dirty[0]&393216&&n(6,o=(()=>{const U=r.map(W=>Ei(W)?W:{label:W,value:W});return g&&U.sort((W,ee)=>W.label.localeCompare(ee.label)),U})())},[p,d,v,b,w,k,o,l,s,a,u,E,P,c,f,h,m,g,r,M,I,D,z,R]}class aT extends ie{constructor(e){super(),ne(this,e,IW,PW,te,{locale:13,keyPath:14,fieldId:1,fieldLabel:15,fieldConfig:16,currentValue:0,sortOptions:17,readonly:2,required:3,invalid:4},TW,[-1,-1])}}function DW(t){let e,n,i;function r(l){t[13](l)}let s={locale:t[1],keyPath:t[2],fieldId:t[3],fieldLabel:t[4],fieldConfig:{...t[5],options:t[9]},readonly:t[6],required:t[7],invalid:t[8],sortOptions:!0};return t[0]!==void 0&&(s.currentValue=t[0]),e=new aT({props:s}),ae.push(()=>Re(e,"currentValue",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&2&&(a.locale=l[1]),o&4&&(a.keyPath=l[2]),o&8&&(a.fieldId=l[3]),o&16&&(a.fieldLabel=l[4]),o&544&&(a.fieldConfig={...l[5],options:l[9]}),o&64&&(a.readonly=l[6]),o&128&&(a.required=l[7]),o&256&&(a.invalid=l[8]),!n&&o&1&&(n=!0,a.currentValue=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function MW(t,e,n){let i,r,s,l,{locale:o}=e,{keyPath:a}=e,{fieldId:u}=e,{fieldLabel:c}=e,{fieldConfig:f}=e,{currentValue:d}=e,{readonly:h=!1}=e,{required:m=!1}=e,{invalid:p=!1}=e;function g(v){d=v,n(0,d)}return t.$$set=v=>{"locale"in v&&n(1,o=v.locale),"keyPath"in v&&n(2,a=v.keyPath),"fieldId"in v&&n(3,u=v.fieldId),"fieldLabel"in v&&n(4,c=v.fieldLabel),"fieldConfig"in v&&n(5,f=v.fieldConfig),"currentValue"in v&&n(0,d=v.currentValue),"readonly"in v&&n(6,h=v.readonly),"required"in v&&n(7,m=v.required),"invalid"in v&&n(8,p=v.invalid)},t.$$.update=()=>{t.$$.dirty&32&&n(11,{collection:i,file:r}=f,i,(n(12,r),n(5,f))),t.$$.dirty&6144&&n(10,s=r?[Rm(i,r)].filter(Boolean):Za(i)),t.$$.dirty&1058&&n(9,l=Im(o,f,s))},[d,o,a,u,c,f,h,m,p,l,s,i,r,g]}class RW extends ie{constructor(e){super(),ne(this,e,MW,DW,te,{locale:1,keyPath:2,fieldId:3,fieldLabel:4,fieldConfig:5,currentValue:0,readonly:6,required:7,invalid:8})}}function Ky(t){let e,n=t[0].format(t[1])+"",i;return{c(){e=F("p"),i=G(n)},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&3&&n!==(n=r[0].format(r[1])+"")&&X(i,n)},d(r){r&&T(e)}}}function $W(t){let e,n=t[1]?.length&&Ky(t);return{c(){n&&n.c(),e=Q()},m(i,r){n&&n.m(i,r),A(i,e,r)},p(i,[r]){i[1]?.length?n?n.p(i,r):(n=Ky(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:H,o:H,d(i){i&&T(e),n&&n.d(i)}}}function FW(t,e,n){let i,r,s,l,o,a,u,c,f,{locale:d}=e,{keyPath:h}=e,{fieldConfig:m}=e,{currentValue:p}=e;return t.$$set=g=>{"locale"in g&&n(2,d=g.locale),"keyPath"in g&&n(3,h=g.keyPath),"fieldConfig"in g&&n(4,m=g.fieldConfig),"currentValue"in g&&n(5,p=g.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&n(11,{collection:i,file:r,multiple:s=!1,value_field:l}=m,i,(n(12,r),n(4,m)),(n(9,s),n(4,m)),(n(7,l),n(4,m))),t.$$.dirty&6144&&n(10,o=r?[Rm(i,r)].filter(Boolean):Za(i)),t.$$.dirty&1044&&n(8,a=Im(d,m,o)),t.$$.dirty&928&&n(1,u=(s?p:[p]).filter(g=>g!==void 0).map(g=>{const v=a.find(b=>b.value===g)?.label;return v&&v!==g?["slug","{{slug}}","{{fields.slug}}"].includes(l)?v:`${v} (${g})`:g})),t.$$.dirty&4&&n(6,c=Hr(d)),t.$$.dirty&64&&n(0,f=new Intl.ListFormat(c,{style:"narrow",type:"conjunction"}))},[f,u,d,h,m,p,c,l,a,s,o,i,r]}class zW extends ie{constructor(e){super(),ne(this,e,FW,$W,te,{locale:2,keyPath:3,fieldConfig:4,currentValue:5})}}function jW(t){let e,n=t[3](t[0])+"",i;return{c(){e=F("p"),i=G(n)},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=r[3](r[0])+"")&&X(i,n)},d(r){r&&T(e)}}}function BW(t){let e,n=t[1].format(t[0].map(t[3]))+"",i;return{c(){e=F("p"),i=G(n)},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&3&&n!==(n=r[1].format(r[0].map(r[3]))+"")&&X(i,n)},d(r){r&&T(e)}}}function UW(t){let e,n;function i(l,o){if(o&5&&(e=null),e==null&&(e=!!(l[2]&&Array.isArray(l[0])&&l[0].length)),e)return BW;if(l[0]!==void 0)return jW}let r=i(t,-1),s=r&&r(t);return{c(){s&&s.c(),n=Q()},m(l,o){s&&s.m(l,o),A(l,n,o)},p(l,[o]){r===(r=i(l,o))&&s?s.p(l,o):(s&&s.d(1),s=r&&r(l),s&&(s.c(),s.m(n.parentNode,n)))},i:H,o:H,d(l){l&&T(n),s&&s.d(l)}}}function qW(t,e,n){let i,r,s,l,o,{locale:a}=e,{keyPath:u}=e,{fieldConfig:c}=e,{currentValue:f}=e;const d=h=>s&&i.find(m=>m.value===h)?.label||h;return t.$$set=h=>{"locale"in h&&n(4,a=h.locale),"keyPath"in h&&n(5,u=h.keyPath),"fieldConfig"in h&&n(6,c=h.fieldConfig),"currentValue"in h&&n(0,f=h.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&n(7,{options:i,multiple:r}=c,i,(n(2,r),n(6,c))),t.$$.dirty&128&&(s=DS(i)),t.$$.dirty&16&&n(8,l=Hr(a)),t.$$.dirty&256&&n(1,o=new Intl.ListFormat(l,{style:"narrow",type:"conjunction"}))},[f,o,r,d,a,u,c,i,l]}class HW extends ie{constructor(e){super(),ne(this,e,qW,UW,te,{locale:4,keyPath:5,fieldConfig:6,currentValue:0})}}function xW(t){let e,n,i;function r(l){t[11](l)}let s={type:t[5],inputmode:t[5],flex:!0,readonly:t[1],required:t[2],invalid:t[3],"aria-labelledby":t[0]+"-label","aria-errormessage":t[0]+"-error"};return t[4]!==void 0&&(s.value=t[4]),e=new Sn({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&32&&(a.type=l[5]),o&32&&(a.inputmode=l[5]),o&2&&(a.readonly=l[1]),o&4&&(a.required=l[2]),o&8&&(a.invalid=l[3]),o&1&&(a["aria-labelledby"]=l[0]+"-label"),o&1&&(a["aria-errormessage"]=l[0]+"-error"),!n&&o&16&&(n=!0,a.value=l[4],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function VW(t,e,n){let i,r,s,{locale:l}=e,{keyPath:o}=e,{fieldId:a}=e,{fieldLabel:u}=e,{fieldConfig:c}=e,{currentValue:f}=e,{readonly:d=!1}=e,{required:h=!1}=e,{invalid:m=!1}=e,p="";const g=()=>{if(f===void 0)return;let w=f;r&&w.startsWith(r)&&(w=w.slice(r.length)),s&&w.endsWith(s)&&(w=w.slice(0,-s.length)),p!==w&&n(4,p=w)},v=()=>{let w=p;r&&!w.startsWith(r)&&(w=`${r}${w}`),s&&!w.endsWith(s)&&(w=`${w}${s}`),f!==w&&n(6,f=w)};function b(w){p=w,n(4,p)}return t.$$set=w=>{"locale"in w&&n(7,l=w.locale),"keyPath"in w&&n(8,o=w.keyPath),"fieldId"in w&&n(0,a=w.fieldId),"fieldLabel"in w&&n(9,u=w.fieldLabel),"fieldConfig"in w&&n(10,c=w.fieldConfig),"currentValue"in w&&n(6,f=w.currentValue),"readonly"in w&&n(1,d=w.readonly),"required"in w&&n(2,h=w.required),"invalid"in w&&n(3,m=w.invalid)},t.$$.update=()=>{t.$$.dirty&1024&&n(5,{type:i="text",prefix:r="",suffix:s=""}=c,i),t.$$.dirty&64&&g(),t.$$.dirty&16&&v()},[a,d,h,m,p,i,f,l,o,u,c,b]}class WW extends ie{constructor(e){super(),ne(this,e,VW,xW,te,{locale:7,keyPath:8,fieldId:0,fieldLabel:9,fieldConfig:10,currentValue:6,readonly:1,required:2,invalid:3})}}function YW(t){ye(t,"svelte-162himw",".title.svelte-162himw{font-size:var(--sui-font-size-xxx-large);font-weight:600}")}function Zy(t){let e,n;function i(l,o){return o&3&&(n=null),n==null&&(n=!!(l[1]==="url"||ha(l[0]))),n?ZW:l[2]?KW:GW}let r=i(t,-1),s=r(t);return{c(){e=F("p"),s.c(),C(e,"class","svelte-162himw"),re(e,"title",t[3]==="title")},m(l,o){A(l,e,o),s.m(e,null)},p(l,o){r===(r=i(l,o))&&s?s.p(l,o):(s.d(1),s=r(l),s&&(s.c(),s.m(e,null))),o&8&&re(e,"title",l[3]==="title")},d(l){l&&T(e),s.d()}}}function GW(t){let e;return{c(){e=G(t[0])},m(n,i){A(n,e,i)},p(n,i){i&1&&X(e,n[0])},d(n){n&&T(e)}}}function KW(t){let e,n,i;return{c(){e=F("a"),n=G(t[0]),C(e,"href",i="mailto:"+encodeURI(t[0]))},m(r,s){A(r,e,s),$(e,n)},p(r,s){s&1&&X(n,r[0]),s&1&&i!==(i="mailto:"+encodeURI(r[0]))&&C(e,"href",i)},d(r){r&&T(e)}}}function ZW(t){let e,n,i;return{c(){e=F("a"),n=G(t[0]),C(e,"href",i=encodeURI(t[0]))},m(r,s){A(r,e,s),$(e,n)},p(r,s){s&1&&X(n,r[0]),s&1&&i!==(i=encodeURI(r[0]))&&C(e,"href",i)},d(r){r&&T(e)}}}function JW(t){let e=typeof t[0]=="string"&&t[0].trim(),n,i=e&&Zy(t);return{c(){i&&i.c(),n=Q()},m(r,s){i&&i.m(r,s),A(r,n,s)},p(r,[s]){s&1&&(e=typeof r[0]=="string"&&r[0].trim()),e?i?i.p(r,s):(i=Zy(r),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:H,o:H,d(r){r&&T(n),i&&i.d(r)}}}function XW(t,e,n){let i,r,s,{locale:l}=e,{keyPath:o}=e,{fieldConfig:a}=e,{currentValue:u}=e;return t.$$set=c=>{"locale"in c&&n(4,l=c.locale),"keyPath"in c&&n(5,o=c.keyPath),"fieldConfig"in c&&n(6,a=c.fieldConfig),"currentValue"in c&&n(0,u=c.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&n(3,{name:i,type:r="text"}=a,i,(n(1,r),n(6,a))),t.$$.dirty&2&&n(2,s=r==="email")},[u,r,s,i,l,o,a]}class Jy extends ie{constructor(e){super(),ne(this,e,XW,JW,te,{locale:4,keyPath:5,fieldConfig:6,currentValue:0},YW)}}function QW(t){let e,n,i;function r(l){t[9](l)}let s={flex:!0,readonly:t[2],required:t[3],invalid:t[4],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error",autoResize:!0};return t[0]!==void 0&&(s.value=t[0]),e=new gf({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&4&&(a.readonly=l[2]),o&8&&(a.required=l[3]),o&16&&(a.invalid=l[4]),o&2&&(a["aria-labelledby"]=l[1]+"-label"),o&2&&(a["aria-errormessage"]=l[1]+"-error"),!n&&o&1&&(n=!0,a.value=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function eY(t,e,n){let{locale:i}=e,{keyPath:r}=e,{fieldId:s}=e,{fieldLabel:l}=e,{fieldConfig:o}=e,{currentValue:a}=e,{readonly:u=!1}=e,{required:c=!1}=e,{invalid:f=!1}=e;function d(h){a=h,n(0,a)}return t.$$set=h=>{"locale"in h&&n(5,i=h.locale),"keyPath"in h&&n(6,r=h.keyPath),"fieldId"in h&&n(1,s=h.fieldId),"fieldLabel"in h&&n(7,l=h.fieldLabel),"fieldConfig"in h&&n(8,o=h.fieldConfig),"currentValue"in h&&n(0,a=h.currentValue),"readonly"in h&&n(2,u=h.readonly),"required"in h&&n(3,c=h.required),"invalid"in h&&n(4,f=h.invalid)},[a,s,u,c,f,i,r,l,o,d]}class tY extends ie{constructor(e){super(),ne(this,e,eY,QW,te,{locale:5,keyPath:6,fieldId:1,fieldLabel:7,fieldConfig:8,currentValue:0,readonly:2,required:3,invalid:4})}}function nY(t){ye(t,"svelte-tzbr78","p.svelte-tzbr78{white-space:pre-wrap}")}function Xy(t){let e,n;return{c(){e=F("p"),n=G(t[0]),C(e,"class","svelte-tzbr78")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&1&&X(n,i[0])},d(i){i&&T(e)}}}function iY(t){let e=typeof t[0]=="string"&&t[0].trim(),n,i=e&&Xy(t);return{c(){i&&i.c(),n=Q()},m(r,s){i&&i.m(r,s),A(r,n,s)},p(r,[s]){s&1&&(e=typeof r[0]=="string"&&r[0].trim()),e?i?i.p(r,s):(i=Xy(r),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:H,o:H,d(r){r&&T(n),i&&i.d(r)}}}function rY(t,e,n){let{locale:i}=e,{keyPath:r}=e,{fieldConfig:s}=e,{currentValue:l}=e;return t.$$set=o=>{"locale"in o&&n(1,i=o.locale),"keyPath"in o&&n(2,r=o.keyPath),"fieldConfig"in o&&n(3,s=o.fieldConfig),"currentValue"in o&&n(0,l=o.currentValue)},[l,i,r,s]}class sY extends ie{constructor(e){super(),ne(this,e,rY,iY,te,{locale:1,keyPath:2,fieldConfig:3,currentValue:0},nY)}}function lY(t){let e,n,i;function r(l){t[9](l)}let s={flex:!0,readonly:t[3]||t[2].read_only!==!1,required:t[4],invalid:t[5],"aria-labelledby":t[1]+"-label","aria-errormessage":t[1]+"-error"};return t[0]!==void 0&&(s.value=t[0]),e=new Sn({props:s}),ae.push(()=>Re(e,"value",r)),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&12&&(a.readonly=l[3]||l[2].read_only!==!1),o&16&&(a.required=l[4]),o&32&&(a.invalid=l[5]),o&2&&(a["aria-labelledby"]=l[1]+"-label"),o&2&&(a["aria-errormessage"]=l[1]+"-error"),!n&&o&1&&(n=!0,a.value=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function oY(t,e,n){let{locale:i}=e,{keyPath:r}=e,{fieldId:s}=e,{fieldLabel:l}=e,{fieldConfig:o}=e,{currentValue:a}=e,{readonly:u=!1}=e,{required:c=!1}=e,{invalid:f=!1}=e;function d(h){a=h,n(0,a)}return t.$$set=h=>{"locale"in h&&n(6,i=h.locale),"keyPath"in h&&n(7,r=h.keyPath),"fieldId"in h&&n(1,s=h.fieldId),"fieldLabel"in h&&n(8,l=h.fieldLabel),"fieldConfig"in h&&n(2,o=h.fieldConfig),"currentValue"in h&&n(0,a=h.currentValue),"readonly"in h&&n(3,u=h.readonly),"required"in h&&n(4,c=h.required),"invalid"in h&&n(5,f=h.invalid)},[a,s,o,u,c,f,i,r,l,d]}class aY extends ie{constructor(e){super(),ne(this,e,oY,lY,te,{locale:6,keyPath:7,fieldId:1,fieldLabel:8,fieldConfig:2,currentValue:0,readonly:3,required:4,invalid:5})}}function uY(t){ye(t,"svelte-1e2mlgo","p.svelte-1e2mlgo{font-family:var(--sui-font-family-monospace)}")}function Qy(t){let e,n;return{c(){e=F("p"),n=G(t[0]),C(e,"class","svelte-1e2mlgo")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r&1&&X(n,i[0])},d(i){i&&T(e)}}}function cY(t){let e=typeof t[0]=="string"&&t[0].trim(),n,i=e&&Qy(t);return{c(){i&&i.c(),n=Q()},m(r,s){i&&i.m(r,s),A(r,n,s)},p(r,[s]){s&1&&(e=typeof r[0]=="string"&&r[0].trim()),e?i?i.p(r,s):(i=Qy(r),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:H,o:H,d(r){r&&T(n),i&&i.d(r)}}}function fY(t,e,n){let{locale:i}=e,{keyPath:r}=e,{fieldConfig:s}=e,{currentValue:l}=e;return t.$$set=o=>{"locale"in o&&n(1,i=o.locale),"keyPath"in o&&n(2,r=o.keyPath),"fieldConfig"in o&&n(3,s=o.fieldConfig),"currentValue"in o&&n(0,l=o.currentValue)},[l,i,r,s]}class dY extends ie{constructor(e){super(),ne(this,e,fY,cY,te,{locale:1,keyPath:2,fieldConfig:3,currentValue:0},uY)}}const Ea={boolean:fH,color:vH,compute:AH,datetime:DH,file:dy,image:dy,list:PV,markdown:ZV,number:iW,object:bW,relation:RW,select:aT,string:WW,text:tY,uuid:aY},Bc={boolean:pH,color:SH,compute:Jy,datetime:BH,file:hy,image:hy,list:qV,markdown:eW,number:aW,object:EW,relation:zW,select:HW,string:Jy,text:sY,uuid:dY};function ew(t,e,n){const i=t.slice();return i[23]=e[n],i}function tw(t){let e,n;function i(){return t[19](t[23])}return e=new Pt({props:{label:t[8](t[2]?"translate_from_x":"copy_from_x",{values:{locale:di(t[23])}}),disabled:!t[7][t[0]]||!t[7][t[23]]||t[1]&&!t[6][t[23]][t[1]]||!t[2]&&t[1]&&t[6][t[23]][t[1]]===t[6][t[0]][t[1]]||t[2]&&(!t[4].includes(t[0].toUpperCase())||!t[3].includes(t[23].toUpperCase()))}}),e.$on("click",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&292&&(l.label=t[8](t[2]?"translate_from_x":"copy_from_x",{values:{locale:di(t[23])}})),s&255&&(l.disabled=!t[7][t[0]]||!t[7][t[23]]||t[1]&&!t[6][t[23]][t[1]]||!t[2]&&t[1]&&t[6][t[23]][t[1]]===t[6][t[0]][t[1]]||t[2]&&(!t[4].includes(t[0].toUpperCase())||!t[3].includes(t[23].toUpperCase()))),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function hY(t){let e,n,i=be(t[5]),r=[];for(let l=0;l<i.length;l+=1)r[l]=tw(ew(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Q()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);A(l,e,o),n=!0},p(l,[o]){if(o&1023){i=be(l[5]);let a;for(a=0;a<i.length;a+=1){const u=ew(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=tw(u),r[a].c(),_(r[a],1),r[a].m(e.parentNode,e))}for(x(),a=i.length;a<r.length;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<i.length;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function pY(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w;B(t,ea,D=>n(21,m=D)),B(t,ql,D=>n(22,p=D)),B(t,Lt,D=>n(16,g=D)),B(t,zc,D=>n(17,v=D)),B(t,at,D=>n(18,b=D)),B(t,ue,D=>n(8,w=D));let{locale:k}=e,{keyPath:S=""}=e,{translate:E=!1}=e,{anchor:P}=e;const M=async D=>{if(E&&!h){ze(ql,p=!0,p),ze(ea,m=[D,k,S,E],m);const z=ql.subscribe(R=>{R||(z(),window.setTimeout(()=>{P.focus()},250))})}else HE(D,k,S,E)},I=D=>{M(D)};return t.$$set=D=>{"locale"in D&&n(0,k=D.locale),"keyPath"in D&&n(1,S=D.keyPath),"translate"in D&&n(2,E=D.translate),"anchor"in D&&n(10,P=D.anchor)},t.$$.update=()=>{t.$$.dirty&262144&&n(14,{collection:i,collectionFile:r,currentLocales:s,currentValues:l}=b??{},i,(n(15,r),n(18,b)),(n(7,s),n(18,b)),(n(6,l),n(18,b))),t.$$.dirty&49152&&n(13,{i18nEnabled:o,locales:a}=(r??i)?._i18n??gs,o,(n(12,a),n(15,r),n(14,i),n(18,b))),t.$$.dirty&12289&&n(5,u=o?a.filter(D=>D!==k):[]),t.$$.dirty&131072&&n(11,{serviceId:c,sourceLanguages:f=[],targetLanguages:d=[]}=v??{},c,(n(4,f),n(17,v)),(n(3,d),n(17,v))),t.$$.dirty&67584&&(h=g.apiKeys?.[c]??"")},[k,S,E,d,f,u,l,s,w,M,P,c,a,o,i,r,g,v,b,I]}class Uc extends ie{constructor(e){super(),ne(this,e,pY,hY,te,{locale:0,keyPath:1,translate:2,anchor:10})}}function mY(t){ye(t,"svelte-c1tfwx",'@keyframes svelte-c1tfwx-highlight{50%{opacity:0.2}}section.svelte-c1tfwx.svelte-c1tfwx{padding:16px}section.svelte-c1tfwx.svelte-c1tfwx:not(:last-child){border-width:0 0 1px;border-color:var(--sui-secondary-border-color)}section.svelte-c1tfwx>.svelte-c1tfwx{margin-right:auto;margin-left:auto;max-width:768px}@media(prefers-reduced-motion){section.svelte-c1tfwx.svelte-c1tfwx.highlight{animation:none;outline-width:4px !important;outline-color:var(--sui-primary-accent-color-translucent);outline-offset:-4px}}section.svelte-c1tfwx.svelte-c1tfwx.highlight > *{animation:svelte-c1tfwx-highlight 750ms 2}@media(prefers-reduced-motion){section.svelte-c1tfwx.svelte-c1tfwx.highlight > *{animation:none}}header.svelte-c1tfwx.svelte-c1tfwx{display:flex;align-items:center;gap:8px;margin-bottom:8px}header.svelte-c1tfwx h4.svelte-c1tfwx{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}header.svelte-c1tfwx .required.svelte-c1tfwx{border:1px solid var(--sui-error-border-color);border-radius:4px;padding:2px 4px;color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);font-size:var(--sui-font-size-x-small)}.validation.svelte-c1tfwx.svelte-c1tfwx{color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small)}.validation.svelte-c1tfwx div.svelte-c1tfwx{display:flex;gap:4px;margin:4px 0}.validation.svelte-c1tfwx div.svelte-c1tfwx .icon{flex:none;font-size:16px}.widget-wrapper.has-extra-labels.svelte-c1tfwx.svelte-c1tfwx{display:flex;align-items:center;justify-content:flex-start;gap:4px}.widget-wrapper.svelte-c1tfwx input[type="color"],.widget-wrapper.svelte-c1tfwx input[type="date"],.widget-wrapper.svelte-c1tfwx input[type="datetime-local"],.widget-wrapper.svelte-c1tfwx input[type="time"],.widget-wrapper.svelte-c1tfwx input[type="number"]{outline:0;border:0;color:inherit}.widget-wrapper.svelte-c1tfwx input[type="text"],.widget-wrapper.svelte-c1tfwx textarea{width:100%}.widget-wrapper.svelte-c1tfwx input[type="color"],.widget-wrapper.svelte-c1tfwx input[type="number"]{background-color:var(--sui-textbox-background-color);border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius)}.widget-wrapper.svelte-c1tfwx input[type="file"],.widget-wrapper.svelte-c1tfwx input[type="checkbox"],.widget-wrapper.svelte-c1tfwx>div{color:inherit}.widget-wrapper.svelte-c1tfwx input[type="date"],.widget-wrapper.svelte-c1tfwx input[type="datetime-local"],.widget-wrapper.svelte-c1tfwx input[type="time"]{width:auto;text-transform:uppercase;background-color:transparent}.before-input.svelte-c1tfwx.svelte-c1tfwx,.after-input.svelte-c1tfwx.svelte-c1tfwx,.prefix.svelte-c1tfwx.svelte-c1tfwx,.suffix.svelte-c1tfwx.svelte-c1tfwx{color:var(--sui-secondary-foreground-color);white-space:nowrap}.comment.svelte-c1tfwx.svelte-c1tfwx{margin:4px;line-height:var(--sui-line-height-compact)}.hint.svelte-c1tfwx.svelte-c1tfwx{margin:4px 4px 0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75}')}function eh(t){const e=t.slice(),n=e[8]&&e[22].length;e[55]=n;const i=!(e[7]&&e[0]!==e[5]);return e[56]=i,e}function nw(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k=!t[17]&&t[29]&&iw(t);o=new In({props:{flex:!0}});let S=(t[55]||t[56])&&rw(t),E=!t[17]&&t[31]&&cw(t),P=t[3]?.valid===!1&&fw(t);const M=[TY,EY,SY],I=[];function D(R,U){return R[4]in Ea?R[6]?1:2:0}m=D(t),p=I[m]=M[m](t);let z=!t[17]&&t[30]&&ww(t);return{c(){e=F("section"),n=F("header"),k&&k.c(),i=j(),r=F("h4"),s=G(t[18]),l=j(),O(o.$$.fragment),a=j(),S&&S.c(),u=j(),E&&E.c(),c=j(),f=F("div"),P&&P.c(),d=j(),h=F("div"),p.c(),g=j(),z&&z.c(),C(r,"role","none"),C(r,"id",t[33]+"-label"),C(r,"class","svelte-c1tfwx"),C(n,"role","none"),C(n,"class","svelte-c1tfwx"),C(f,"role","alert"),C(f,"id",t[33]+"-error"),C(f,"class","validation svelte-c1tfwx"),C(f,"aria-live","polite"),C(h,"role","none"),C(h,"class","widget-wrapper svelte-c1tfwx"),re(h,"has-extra-labels",t[23]),C(e,"role","group"),C(e,"class","field svelte-c1tfwx"),C(e,"aria-label",v=t[32]("x_field",{values:{field:t[18]}})),C(e,"data-widget",t[4]),C(e,"data-key-path",t[1]),e.hidden=b=t[4]==="compute"},m(R,U){A(R,e,U),$(e,n),k&&k.m(n,null),$(n,i),$(n,r),$(r,s),$(n,l),N(o,n,null),$(n,a),S&&S.m(n,null),$(e,u),E&&E.m(e,null),$(e,c),$(e,f),P&&P.m(f,null),$(e,d),$(e,h),I[m].m(h,null),$(e,g),z&&z.m(e,null),w=!0},p(R,U){!R[17]&&R[29]?k?k.p(R,U):(k=iw(R),k.c(),k.m(n,i)):k&&(k.d(1),k=null),(!w||U[0]&262144)&&X(s,R[18]),R[55]||R[56]?S?(S.p(R,U),U[0]&4194721&&_(S,1)):(S=rw(R),S.c(),_(S,1),S.m(n,null)):S&&(x(),y(S,1,1,()=>{S=null}),V()),!R[17]&&R[31]?E?E.p(R,U):(E=cw(R),E.c(),E.m(e,c)):E&&(E.d(1),E=null),R[3]?.valid===!1?P?(P.p(R,U),U[0]&8&&_(P,1)):(P=fw(R),P.c(),_(P,1),P.m(f,null)):P&&(x(),y(P,1,1,()=>{P=null}),V());let W=m;m=D(R),m===W?I[m].p(R,U):(x(),y(I[W],1,1,()=>{I[W]=null}),V(),p=I[m],p?p.p(R,U):(p=I[m]=M[m](R),p.c()),_(p,1),p.m(h,null)),(!w||U[0]&8388608)&&re(h,"has-extra-labels",R[23]),!R[17]&&R[30]?z?z.p(R,U):(z=ww(R),z.c(),z.m(e,null)):z&&(z.d(1),z=null),(!w||U[0]&262144|U[1]&2&&v!==(v=R[32]("x_field",{values:{field:R[18]}})))&&C(e,"aria-label",v),(!w||U[0]&16)&&C(e,"data-widget",R[4]),(!w||U[0]&2)&&C(e,"data-key-path",R[1]),(!w||U[0]&16&&b!==(b=R[4]==="compute"))&&(e.hidden=b)},i(R){w||(_(o.$$.fragment,R),_(S),_(P),_(p),w=!0)},o(R){y(o.$$.fragment,R),y(S),y(P),y(p),w=!1},d(R){R&&T(e),k&&k.d(),L(o),S&&S.d(),E&&E.d(),P&&P.d(),I[m].d(),z&&z.d()}}}function iw(t){let e,n=t[32]("required")+"",i;return{c(){e=F("div"),i=G(n),C(e,"class","required svelte-c1tfwx"),C(e,"aria-hidden","true")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[1]&2&&n!==(n=r[32]("required")+"")&&X(i,n)},d(r){r&&T(e)}}}function rw(t){let e,n,i={variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right","aria-label":t[32]("show_field_options"),$$slots:{popup:[bY],"start-icon":[gY]},$$scope:{ctx:t}};return e=new pi({props:i}),t[53](e),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s[1]&2&&(l["aria-label"]=r[32]("show_field_options")),s[0]&5800371|s[1]&67108866&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[53](null),L(e,r)}}}function gY(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"more_vert"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sw(t){let e=["markdown","string","text","list","object"].includes(t[4]),n,i,r,s=e&&lw(t);return i=new Uc({props:{anchor:t[15],keyPath:t[1],locale:t[0]}}),{c(){s&&s.c(),n=j(),O(i.$$.fragment)},m(l,o){s&&s.m(l,o),A(l,n,o),N(i,l,o),r=!0},p(l,o){o[0]&16&&(e=["markdown","string","text","list","object"].includes(l[4])),e?s?(s.p(l,o),o[0]&16&&_(s,1)):(s=lw(l),s.c(),_(s,1),s.m(n.parentNode,n)):s&&(x(),y(s,1,1,()=>{s=null}),V());const a={};o[0]&32768&&(a.anchor=l[15]),o[0]&2&&(a.keyPath=l[1]),o[0]&1&&(a.locale=l[0]),i.$set(a)},i(l){r||(_(s),_(i.$$.fragment,l),r=!0)},o(l){y(s),y(i.$$.fragment,l),r=!1},d(l){l&&T(n),s&&s.d(l),L(i,l)}}}function lw(t){let e,n,i,r;e=new Uc({props:{anchor:t[15],keyPath:t[1],locale:t[0],translate:!0}});let s=t[22].length>1&&ow();return{c(){O(e.$$.fragment),n=j(),s&&s.c(),i=Q()},m(l,o){N(e,l,o),A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){const a={};o[0]&32768&&(a.anchor=l[15]),o[0]&2&&(a.keyPath=l[1]),o[0]&1&&(a.locale=l[0]),e.$set(a),l[22].length>1?s?o[0]&4194304&&_(s,1):(s=ow(),s.c(),_(s,1),s.m(i.parentNode,i)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){r||(_(e.$$.fragment,l),_(s),r=!0)},o(l){y(e.$$.fragment,l),y(s),r=!1},d(l){l&&(T(n),T(i)),L(e,l),s&&s.d(l)}}}function ow(t){let e,n;return e=new $n({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function aw(t){let e,n;return e=new $n({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function uw(t){let e,n;return e=new Pt({props:{label:t[32]("revert_changes"),disabled:ei(t[20],t[19])}}),e.$on("click",t[52]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[1]&2&&(s.label=i[32]("revert_changes")),r[0]&1572864&&(s.disabled=ei(i[20],i[19])),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function _Y(t){let e,n,i,r,s=t[55]&&sw(t),l=t[55]&&t[56]&&aw(),o=t[56]&&uw(t);return{c(){s&&s.c(),e=j(),l&&l.c(),n=j(),o&&o.c(),i=Q()},m(a,u){s&&s.m(a,u),A(a,e,u),l&&l.m(a,u),A(a,n,u),o&&o.m(a,u),A(a,i,u),r=!0},p(a,u){a[55]?s?(s.p(a,u),u[0]&4194560&&_(s,1)):(s=sw(a),s.c(),_(s,1),s.m(e.parentNode,e)):s&&(x(),y(s,1,1,()=>{s=null}),V()),a[55]&&a[56]?l?u[0]&4194721&&_(l,1):(l=aw(),l.c(),_(l,1),l.m(n.parentNode,n)):l&&(x(),y(l,1,1,()=>{l=null}),V()),a[56]?o?(o.p(a,u),u[0]&161&&_(o,1)):(o=uw(a),o.c(),_(o,1),o.m(i.parentNode,i)):o&&(x(),y(o,1,1,()=>{o=null}),V())},i(a){r||(_(s),_(l),_(o),r=!0)},o(a){y(s),y(l),y(o),r=!1},d(a){a&&(T(e),T(n),T(i)),s&&s.d(a),l&&l.d(a),o&&o.d(a)}}}function bY(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[32]("field_options"),$$slots:{default:[_Y]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[1]&2&&(s["aria-label"]=i[32]("field_options")),r[0]&5800371|r[1]&67108866&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function cw(t){let e,n=t[34](t[31])+"";return{c(){e=F("p"),C(e,"class","comment svelte-c1tfwx")},m(i,r){A(i,e,r),e.innerHTML=n},p(i,r){r[1]&1&&n!==(n=i[34](i[31])+"")&&(e.innerHTML=n)},d(i){i&&T(e)}}}function fw(t){let e,n,i,r,s,l,o=t[3].valueMissing&&dw(t),a=t[3].rangeUnderflow&&hw(t),u=t[3].rangeOverflow&&pw(t),c=t[3].patternMismatch&&mw(t),f=t[3].typeMismatch&&gw(t);return{c(){o&&o.c(),e=j(),a&&a.c(),n=j(),u&&u.c(),i=j(),c&&c.c(),r=j(),f&&f.c(),s=Q()},m(d,h){o&&o.m(d,h),A(d,e,h),a&&a.m(d,h),A(d,n,h),u&&u.m(d,h),A(d,i,h),c&&c.m(d,h),A(d,r,h),f&&f.m(d,h),A(d,s,h),l=!0},p(d,h){d[3].valueMissing?o?(o.p(d,h),h[0]&8&&_(o,1)):(o=dw(d),o.c(),_(o,1),o.m(e.parentNode,e)):o&&(x(),y(o,1,1,()=>{o=null}),V()),d[3].rangeUnderflow?a?(a.p(d,h),h[0]&8&&_(a,1)):(a=hw(d),a.c(),_(a,1),a.m(n.parentNode,n)):a&&(x(),y(a,1,1,()=>{a=null}),V()),d[3].rangeOverflow?u?(u.p(d,h),h[0]&8&&_(u,1)):(u=pw(d),u.c(),_(u,1),u.m(i.parentNode,i)):u&&(x(),y(u,1,1,()=>{u=null}),V()),d[3].patternMismatch?c?(c.p(d,h),h[0]&8&&_(c,1)):(c=mw(d),c.c(),_(c,1),c.m(r.parentNode,r)):c&&(x(),y(c,1,1,()=>{c=null}),V()),d[3].typeMismatch?f?(f.p(d,h),h[0]&8&&_(f,1)):(f=gw(d),f.c(),_(f,1),f.m(s.parentNode,s)):f&&(x(),y(f,1,1,()=>{f=null}),V())},i(d){l||(_(o),_(a),_(u),_(c),_(f),l=!0)},o(d){y(o),y(a),y(u),y(c),y(f),l=!1},d(d){d&&(T(e),T(n),T(i),T(r),T(s)),o&&o.d(d),a&&a.d(d),u&&u.d(d),c&&c.d(d),f&&f.d(d)}}}function dw(t){let e,n,i,r=t[32]("validation.value_missing")+"",s,l;return n=new xe({props:{name:"error"}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),s=G(r),C(e,"role","none"),C(e,"class","svelte-c1tfwx")},m(o,a){A(o,e,a),N(n,e,null),$(e,i),$(e,s),l=!0},p(o,a){(!l||a[1]&2)&&r!==(r=o[32]("validation.value_missing")+"")&&X(s,r)},i(o){l||(_(n.$$.fragment,o),l=!0)},o(o){y(n.$$.fragment,o),l=!1},d(o){o&&T(e),L(n)}}}function hw(t){let e,n,i,r;n=new xe({props:{name:"error"}});function s(a,u){return a[4]==="list"&&a[27]||a[9]?yY:vY}let l=s(t),o=l(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),o.c(),C(e,"role","none"),C(e,"class","svelte-c1tfwx")},m(a,u){A(a,e,u),N(n,e,null),$(e,i),o.m(e,null),r=!0},p(a,u){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e,null)))},i(a){r||(_(n.$$.fragment,a),r=!0)},o(a){y(n.$$.fragment,a),r=!1},d(a){a&&T(e),L(n),o.d()}}}function vY(t){let e=t[32](`validation.range_underflow.select_${t[26]===1?"one":"many"}`,{values:{min:t[26]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&67108864|r[1]&2&&e!==(e=i[32](`validation.range_underflow.select_${i[26]===1?"one":"many"}`,{values:{min:i[26]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function yY(t){let e=t[32](`validation.range_underflow.add_${t[26]===1?"one":"many"}`,{values:{min:t[26]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&67108864|r[1]&2&&e!==(e=i[32](`validation.range_underflow.add_${i[26]===1?"one":"many"}`,{values:{min:i[26]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function pw(t){let e,n,i,r;n=new xe({props:{name:"error"}});function s(a,u){return a[4]==="list"&&a[27]||a[9]?kY:wY}let l=s(t),o=l(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),o.c(),C(e,"role","none"),C(e,"class","svelte-c1tfwx")},m(a,u){A(a,e,u),N(n,e,null),$(e,i),o.m(e,null),r=!0},p(a,u){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e,null)))},i(a){r||(_(n.$$.fragment,a),r=!0)},o(a){y(n.$$.fragment,a),r=!1},d(a){a&&T(e),L(n),o.d()}}}function wY(t){let e=t[32](`validation.range_overflow.select_${t[25]===1?"one":"many"}`,{values:{max:t[25]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&33554432|r[1]&2&&e!==(e=i[32](`validation.range_overflow.select_${i[25]===1?"one":"many"}`,{values:{max:i[25]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function kY(t){let e=t[32](`validation.range_overflow.add_${t[25]===1?"one":"many"}`,{values:{max:t[25]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&33554432|r[1]&2&&e!==(e=i[32](`validation.range_overflow.add_${i[25]===1?"one":"many"}`,{values:{max:i[25]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function mw(t){let e,n,i,r=(t[28]?.[1]??"")+"",s,l;return n=new xe({props:{name:"error"}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),s=G(r),C(e,"role","none"),C(e,"class","svelte-c1tfwx")},m(o,a){A(o,e,a),N(n,e,null),$(e,i),$(e,s),l=!0},p(o,a){(!l||a[0]&268435456)&&r!==(r=(o[28]?.[1]??"")+"")&&X(s,r)},i(o){l||(_(n.$$.fragment,o),l=!0)},o(o){y(n.$$.fragment,o),l=!1},d(o){o&&T(e),L(n)}}}function gw(t){let e,n,i,r=t[32](`validation.type_mismatch.${t[24]}`)+"",s,l;return n=new xe({props:{name:"error"}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),s=G(r),C(e,"role","none"),C(e,"class","svelte-c1tfwx")},m(o,a){A(o,e,a),N(n,e,null),$(e,i),$(e,s),l=!0},p(o,a){(!l||a[0]&16777216|a[1]&2)&&r!==(r=o[32](`validation.type_mismatch.${o[24]}`)+"")&&X(s,r)},i(o){l||(_(n.$$.fragment,o),l=!0)},o(o){y(n.$$.fragment,o),l=!1},d(o){o&&T(e),L(n)}}}function SY(t){let e,n,i,r,s,l,o,a,u=t[11]&&_w(t),c=t[13]&&bw(t);function f(g){t[54](g)}var d=Ea[t[4]];function h(g,v){let b={locale:g[0],keyPath:g[1],fieldId:g[33],fieldLabel:g[18],fieldConfig:g[2],readonly:g[17],required:g[29],invalid:g[16]};return g[14].currentValues[g[0]][g[1]]!==void 0&&(b.currentValue=g[14].currentValues[g[0]][g[1]]),{props:b}}d&&(i=an(d,h(t)),ae.push(()=>Re(i,"currentValue",f)));let m=t[12]&&vw(t),p=t[10]&&yw(t);return{c(){u&&u.c(),e=j(),c&&c.c(),n=j(),i&&O(i.$$.fragment),s=j(),m&&m.c(),l=j(),p&&p.c(),o=Q()},m(g,v){u&&u.m(g,v),A(g,e,v),c&&c.m(g,v),A(g,n,v),i&&N(i,g,v),A(g,s,v),m&&m.m(g,v),A(g,l,v),p&&p.m(g,v),A(g,o,v),a=!0},p(g,v){if(g[11]?u?u.p(g,v):(u=_w(g),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),g[13]?c?c.p(g,v):(c=bw(g),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),v[0]&16&&d!==(d=Ea[g[4]])){if(i){x();const b=i;y(b.$$.fragment,1,0,()=>{L(b,1)}),V()}d?(i=an(d,h(g)),ae.push(()=>Re(i,"currentValue",f)),O(i.$$.fragment),_(i.$$.fragment,1),N(i,s.parentNode,s)):i=null}else if(d){const b={};v[0]&1&&(b.locale=g[0]),v[0]&2&&(b.keyPath=g[1]),v[0]&262144&&(b.fieldLabel=g[18]),v[0]&4&&(b.fieldConfig=g[2]),v[0]&131072&&(b.readonly=g[17]),v[0]&536870912&&(b.required=g[29]),v[0]&65536&&(b.invalid=g[16]),!r&&v[0]&16387&&(r=!0,b.currentValue=g[14].currentValues[g[0]][g[1]],$e(()=>r=!1)),i.$set(b)}g[12]?m?m.p(g,v):(m=vw(g),m.c(),m.m(l.parentNode,l)):m&&(m.d(1),m=null),g[10]?p?p.p(g,v):(p=yw(g),p.c(),p.m(o.parentNode,o)):p&&(p.d(1),p=null)},i(g){a||(i&&_(i.$$.fragment,g),a=!0)},o(g){i&&y(i.$$.fragment,g),a=!1},d(g){g&&(T(e),T(n),T(s),T(l),T(o)),u&&u.d(g),c&&c.d(g),i&&L(i,g),m&&m.d(g),p&&p.d(g)}}}function EY(t){let e,n,i;var r=Ea[t[4]];function s(l,o){return{props:{locale:l[0],keyPath:l[1],fieldId:l[33],fieldLabel:l[18],fieldConfig:l[2],currentValue:l[20],readonly:l[17],required:l[29],invalid:l[16]}}}return r&&(e=an(r,s(t))),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o[0]&16&&r!==(r=Ea[l[4]])){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s(l)),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}else if(r){const a={};o[0]&1&&(a.locale=l[0]),o[0]&2&&(a.keyPath=l[1]),o[0]&262144&&(a.fieldLabel=l[18]),o[0]&4&&(a.fieldConfig=l[2]),o[0]&1048576&&(a.currentValue=l[20]),o[0]&131072&&(a.readonly=l[17]),o[0]&536870912&&(a.required=l[29]),o[0]&65536&&(a.invalid=l[16]),e.$set(a)}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function TY(t){let e,n=t[32]("unsupported_widget_x",{values:{name:t[4]}})+"",i;return{c(){e=F("div"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&16|s[1]&2&&n!==(n=r[32]("unsupported_widget_x",{values:{name:r[4]}})+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function _w(t){let e,n=t[34](t[11])+"";return{c(){e=F("div"),C(e,"role","none"),C(e,"class","before-input svelte-c1tfwx")},m(i,r){A(i,e,r),e.innerHTML=n},p(i,r){r[0]&2048&&n!==(n=i[34](i[11])+"")&&(e.innerHTML=n)},d(i){i&&T(e)}}}function bw(t){let e,n;return{c(){e=F("div"),n=G(t[13]),C(e,"role","none"),C(e,"class","prefix svelte-c1tfwx")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r[0]&8192&&X(n,i[13])},d(i){i&&T(e)}}}function vw(t){let e,n;return{c(){e=F("div"),n=G(t[12]),C(e,"role","none"),C(e,"class","suffix svelte-c1tfwx")},m(i,r){A(i,e,r),$(e,n)},p(i,r){r[0]&4096&&X(n,i[12])},d(i){i&&T(e)}}}function yw(t){let e,n=t[34](t[10])+"";return{c(){e=F("div"),C(e,"role","none"),C(e,"class","after-input svelte-c1tfwx")},m(i,r){A(i,e,r),e.innerHTML=n},p(i,r){r[0]&1024&&n!==(n=i[34](i[10])+"")&&(e.innerHTML=n)},d(i){i&&T(e)}}}function ww(t){let e,n=t[34](t[30])+"";return{c(){e=F("p"),C(e,"class","hint svelte-c1tfwx")},m(i,r){A(i,e,r),e.innerHTML=n},p(i,r){r[0]&1073741824&&n!==(n=i[34](i[30])+"")&&(e.innerHTML=n)},d(i){i&&T(e)}}}function AY(t){let e,n,i=t[14]&&t[21]&&t[4]!=="hidden"&&nw(eh(t));return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[14]&&r[21]&&r[4]!=="hidden"?i?(i.p(eh(r),s),s[0]&2113552&&_(i,1)):(i=nw(eh(r)),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function CY(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k,S,E,P,M,I,D,z,R,U,W,ee,K,ve,me,se,q,J,Le,_e,Be,Ke,de,ge,pe,We,ot,oe,Ne;B(t,at,Oe=>n(14,oe=Oe)),B(t,ue,Oe=>n(32,Ne=Oe));let{locale:Qe}=e,{keyPath:rt}=e,{fieldConfig:pt}=e;const Jt=ii("field"),Ot=Oe=>kn.sanitize(Tt.parseInline(Oe.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]});let st;const mn=()=>{hg(Qe,rt)};function lt(Oe){ae[Oe?"unshift":"push"](()=>{st=Oe,n(15,st)})}function Me(Oe){t.$$.not_equal(oe.currentValues[Qe][rt],Oe)&&(oe.currentValues[Qe][rt]=Oe,at.set(oe))}return t.$$set=Oe=>{"locale"in Oe&&n(0,Qe=Oe.locale),"keyPath"in Oe&&n(1,rt=Oe.keyPath),"fieldConfig"in Oe&&n(2,pt=Oe.fieldConfig)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(36,{name:i,label:r="",comment:s="",hint:l="",widget:o="string",required:a=!0,i18n:u=!1,pattern:c=[]}=pt,i,(n(37,r),n(2,pt)),(n(31,s),n(2,pt)),(n(30,l),n(2,pt)),(n(4,o),n(2,pt)),(n(29,a),n(2,pt)),(n(35,u),n(2,pt)),(n(28,c),n(2,pt))),t.$$.dirty[0]&4&&n(51,{field:f,fields:d,types:h}=pt,f,(n(50,d),n(2,pt)),(n(49,h),n(2,pt))),t.$$.dirty[1]&1835008&&n(27,m=!!f||!!d||!!h),t.$$.dirty[0]&4&&n(26,{min:p,max:g}=pt,p,(n(25,g),n(2,pt))),t.$$.dirty[0]&20&&n(24,v=o==="string"?pt.type??"text":void 0),t.$$.dirty[0]&16&&n(48,b=["string"].includes(o)),t.$$.dirty[0]&4|t.$$.dirty[1]&131072&&n(13,w=b?pt.prefix:void 0),t.$$.dirty[0]&4|t.$$.dirty[1]&131072&&n(12,k=b?pt.suffix:void 0),t.$$.dirty[0]&16&&n(47,S=["boolean","number","string"].includes(o)),t.$$.dirty[0]&4|t.$$.dirty[1]&65536&&n(11,E=S?pt.before_input:void 0),t.$$.dirty[0]&4|t.$$.dirty[1]&65536&&n(10,P=S?pt.after_input:void 0),t.$$.dirty[0]&15360&&n(23,M=!!(w||k||E||P)),t.$$.dirty[0]&16&&n(46,I=["relation","select"].includes(o)),t.$$.dirty[0]&4|t.$$.dirty[1]&32768&&n(9,D=I?pt.multiple:void 0),t.$$.dirty[0]&528|t.$$.dirty[1]&32768&&n(6,z=o==="list"||I&&D),t.$$.dirty[0]&16384&&n(44,{collection:R,collectionFile:U,originalValues:W,currentValues:ee,validities:K}=oe??{},R,(n(45,U),n(14,oe)),(n(39,W),n(14,oe)),(n(41,ee),n(14,oe)),(n(38,K),n(14,oe))),t.$$.dirty[1]&24576&&n(42,{i18nEnabled:ve,locales:me,defaultLocale:se}=(U??R)?._i18n??gs,ve,(n(43,me),n(45,U),n(44,R),n(14,oe)),(n(5,se),n(45,U),n(44,R),n(14,oe))),t.$$.dirty[0]&1|t.$$.dirty[1]&6144&&n(22,q=ve?me.filter(Oe=>Oe!==Qe):[]),t.$$.dirty[1]&2064&&n(8,J=ve&&(u===!0||u==="translate")),t.$$.dirty[1]&2064&&n(7,Le=ve&&u==="duplicate"),t.$$.dirty[0]&417&&n(21,_e=Qe===se||J||Le),t.$$.dirty[0]&2&&n(40,Be=new RegExp(`^${dn(rt)}\\.\\d+$`)),t.$$.dirty[0]&67|t.$$.dirty[1]&1536&&n(20,Ke=z?Object.entries(ee[Qe]).filter(([Oe])=>Oe.match(Be)).map(([,Oe])=>Oe).filter(Oe=>Oe!==void 0):ee[Qe][rt]),t.$$.dirty[0]&67|t.$$.dirty[1]&768&&n(19,de=z?Object.entries(W[Qe]).filter(([Oe])=>Oe.match(Be)).map(([,Oe])=>Oe).filter(Oe=>Oe!==void 0):W[Qe][rt]),t.$$.dirty[0]&3|t.$$.dirty[1]&128&&n(3,ge=K[Qe][rt]),t.$$.dirty[1]&96&&n(18,pe=r||i),t.$$.dirty[0]&49|t.$$.dirty[1]&16&&n(17,We=u==="duplicate"&&Qe!==se||o==="compute"),t.$$.dirty[0]&8&&n(16,ot=ge?.valid===!1)},[Qe,rt,pt,ge,o,se,z,Le,J,D,P,E,k,w,oe,st,ot,We,pe,de,Ke,_e,q,M,v,g,p,m,c,a,l,s,Ne,Jt,Ot,u,i,r,K,W,Be,ee,ve,me,R,U,I,S,b,h,d,f,mn,lt,Me]}class vg extends ie{constructor(e){super(),ne(this,e,CY,AY,te,{locale:0,keyPath:1,fieldConfig:2},mY,[-1,-1])}}function kw(t,e,n){const i=t.slice();return i[5]=e[n],i}function Sw(t,e){let n,i,r;return i=new vg({props:{keyPath:e[5].name,locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&2&&(o.keyPath=e[5].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[5]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function NY(t){let e=[],n=new Map,i,r,s=be(t[1]);const l=o=>o[5].name;for(let o=0;o<s.length;o+=1){let a=kw(t,s,o),u=l(a);n.set(u,e[o]=Sw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,[a]){a&3&&(s=be(o[1]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Sw,i,kw),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function LY(t,e,n){let i,r,s,l;B(t,at,a=>n(4,l=a));let{locale:o}=e;return t.$$set=a=>{"locale"in a&&n(0,o=a.locale)},t.$$.update=()=>{t.$$.dirty&16&&n(2,{collection:i,collectionFile:r}=l??{},i,(n(3,r),n(4,l))),t.$$.dirty&12&&n(1,s=r?.fields??i?.fields??[])},[o,s,i,r,l]}class Ew extends ie{constructor(e){super(),ne(this,e,LY,NY,te,{locale:0})}}function OY(t){ye(t,"svelte-t01vxl","div.svelte-t01vxl{padding:8px 16px}")}function Tw(t,e,n){const i=t.slice();return i[6]=e[n],i}function Aw(t,e){let n,i,r;return i=new bg({props:{keyPath:e[6].name,locale:e[0],fieldConfig:e[6]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&2&&(o.keyPath=e[6].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[6]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function PY(t){let e,n=[],i=new Map,r,s,l=be(t[1]);const o=a=>a[6].name;for(let a=0;a<l.length;a+=1){let u=Tw(t,l,a),c=o(u);i.set(c,n[a]=Aw(c,u))}return{c(){e=F("div");for(let a=0;a<n.length;a+=1)n[a].c();C(e,"role","document"),C(e,"aria-label",r=t[2]("content_preview")),C(e,"class","svelte-t01vxl")},m(a,u){A(a,e,u);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);s=!0},p(a,[u]){u&3&&(l=be(a[1]),x(),n=bt(n,u,o,1,a,l,i,e,_t,Aw,null,Tw),V()),(!s||u&4&&r!==(r=a[2]("content_preview")))&&C(e,"aria-label",r)},i(a){if(!s){for(let u=0;u<l.length;u+=1)_(n[u]);s=!0}},o(a){for(let u=0;u<n.length;u+=1)y(n[u]);s=!1},d(a){a&&T(e);for(let u=0;u<n.length;u+=1)n[u].d()}}}function IY(t,e,n){let i,r,s,l,o;B(t,at,u=>n(5,l=u)),B(t,ue,u=>n(2,o=u));let{locale:a}=e;return t.$$set=u=>{"locale"in u&&n(0,a=u.locale)},t.$$.update=()=>{t.$$.dirty&32&&n(3,{collection:i,collectionFile:r}=l??{},i,(n(4,r),n(5,l))),t.$$.dirty&24&&n(1,s=r?.fields??i?.fields??[])},[a,s,o,i,r,l]}class Cw extends ie{constructor(e){super(),ne(this,e,IY,PY,te,{locale:0},OY)}}function DY(t){ye(t,"svelte-1g8n4fi",'@charset "UTF-8";.wrapper.svelte-1g8n4fi{display:contents}.wrapper.svelte-1g8n4fi>.group{display:contents}.content.svelte-1g8n4fi{flex:auto;overflow-y:auto;scroll-behavior:auto;overscroll-behavior-y:contain}')}function MY(t){let e,n;return e=new qn({props:{$$slots:{default:[$Y]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1048888&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function RY(t){let e,n,i,r,s;var l=t[6]==="preview"?Cw:Ew;function o(a,u){return{props:{locale:a[3]}}}return l&&(n=an(l,o(t))),{c(){e=F("div"),n&&O(n.$$.fragment),C(e,"role","none"),C(e,"class","content svelte-1g8n4fi")},m(a,u){A(a,e,u),n&&N(n,e,null),t[15](e),i=!0,r||(s=[Fe(e,"wheel",t[16],{passive:!0,capture:!0}),Fe(e,"touchmove",t[17],{passive:!0})],r=!0)},p(a,u){if(u&64&&l!==(l=a[6]==="preview"?Cw:Ew)){if(n){x();const c=n;y(c.$$.fragment,1,0,()=>{L(c,1)}),V()}l?(n=an(l,o(a)),O(n.$$.fragment),_(n.$$.fragment,1),N(n,e,null)):n=null}else if(l){const c={};u&8&&(c.locale=a[3]),n.$set(c)}},i(a){i||(n&&_(n.$$.fragment,a),i=!0)},o(a){n&&y(n.$$.fragment,a),i=!1},d(a){a&&T(e),n&&L(n),t[15](null),r=!1,Gt(s)}}}function $Y(t){let e,n=t[8](t[5]?"locale_x_now_disabled":"locale_x_has_been_disabled",t[4])+"",i,r,s,l;return s=new et({props:{variant:"tertiary",label:t[8](t[5]?"reenable_x_locale":"enable_x_locale",t[4])}}),s.$on("click",t[18]),{c(){e=F("span"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","alert")},m(o,a){A(o,e,a),$(e,i),A(o,r,a),N(s,o,a),l=!0},p(o,a){(!l||a&304)&&n!==(n=o[8](o[5]?"locale_x_now_disabled":"locale_x_has_been_disabled",o[4])+"")&&X(i,n);const u={};a&304&&(u.label=o[8](o[5]?"reenable_x_locale":"enable_x_locale",o[4])),s.$set(u)},i(o){l||(_(s.$$.fragment,o),l=!0)},o(o){y(s.$$.fragment,o),l=!1},d(o){o&&(T(e),T(r)),L(s,o)}}}function FY(t){let e,n,i,r;const s=[RY,MY],l=[];function o(a,u){return a[7][a[3]]?0:a[6]==="edit"?1:-1}return~(n=o(t))&&(i=l[n]=s[n](t)),{c(){e=F("div"),i&&i.c(),C(e,"role","none"),C(e,"id",t[1]),C(e,"class","wrapper svelte-1g8n4fi")},m(a,u){A(a,e,u),~n&&l[n].m(e,null),r=!0},p(a,[u]){let c=n;n=o(a),n===c?~n&&l[n].p(a,u):(i&&(x(),y(l[c],1,1,()=>{l[c]=null}),V()),~n?(i=l[n],i?i.p(a,u):(i=l[n]=s[n](a),i.c()),_(i,1),i.m(e,null)):i=null),(!r||u&2)&&C(e,"id",a[1])},i(a){r||(_(i),r=!0)},o(a){y(i),r=!1},d(a){a&&T(e),~n&&l[n].d()}}}function zY(t,e,n){let i,r,s,l,o,a,u,c,f=H,d=()=>(f(),f=Qn(v,I=>n(12,c=I)),v),h,m,p;B(t,at,I=>n(13,h=I)),B(t,lr,I=>n(14,m=I)),B(t,ue,I=>n(8,p=I)),t.$$.on_destroy.push(()=>f());let{id:g}=e,{thisPane:v}=e;d();let{thisPaneContentArea:b}=e,{thatPaneContentArea:w}=e;const k=()=>{window.requestAnimationFrame(()=>{if(!i||!b||!w)return;const{x:I,y:D}=b.getBoundingClientRect(),z=document.elementsFromPoint(I+80,D).find(ve=>ve.matches("[data-key-path]"));if(!z)return;const{keyPath:R}=z.dataset,{top:U,height:W}=z.getBoundingClientRect(),ee=(D-U)/W,K=w.querySelector(`[data-key-path="${CSS.escape(R??"")}"]`);ee<0||ee>1||!K||n(10,w.scrollTop=K.offsetTop-D+K.clientHeight*ee,w)})};function S(I){ae[I?"unshift":"push"](()=>{b=I,n(0,b)})}const E=()=>{k()},P=()=>{k()},M=()=>{qE(l)};return t.$$set=I=>{"id"in I&&n(1,g=I.id),"thisPane"in I&&d(n(2,v=I.thisPane)),"thisPaneContentArea"in I&&n(0,b=I.thisPaneContentArea),"thatPaneContentArea"in I&&n(10,w=I.thatPaneContentArea)},t.$$.update=()=>{t.$$.dirty&16384&&({syncScrolling:i}=m),t.$$.dirty&8192&&n(7,{currentLocales:r,currentValues:s}=h??{},r,(n(11,s),n(13,h))),t.$$.dirty&4096&&n(3,{locale:l,mode:o}=c??{},l,(n(6,o),n(12,c))),t.$$.dirty&2056&&n(5,a=!!s[l]),t.$$.dirty&8&&n(4,u={values:{locale:di(l)}}),t.$$.dirty&1&&b&&n(0,b.scrollTop=0,b)},[b,g,v,l,u,a,o,r,p,k,w,s,c,h,m,S,E,P,M]}class uT extends ie{constructor(e){super(),ne(this,e,zY,FY,te,{id:1,thisPane:2,thisPaneContentArea:0,thatPaneContentArea:10},DY)}}function jY(t){ye(t,"svelte-1y2vbgq",'.header.svelte-1y2vbgq{flex:none !important;background-color:var(--sui-tertiary-background-color)}.header.svelte-1y2vbgq>[role="toolbar"]{margin-right:auto;margin-left:auto;max-width:800px}.header.svelte-1y2vbgq>[role="toolbar"] h3{margin:0 8px;font-size:var(--sui-font-size-default)}.header.svelte-1y2vbgq>[role="toolbar"] button.error{color:var(--sui-error-foreground-color)}')}function th(t){const e=t.slice(),n=di(e[7]?.locale);return e[32]=n,e}function Nw(t,e,n){const i=t.slice();i[33]=e[n];const r=di(i[33]);i[32]=r;const s=Object.values(i[16][i[33]]).some(({valid:l})=>!l);return i[34]=s,i}function BY(t){let e,n=(t[7]?.mode==="preview"?t[17]("preview"):t[17]("edit"))+"",i;return{c(){e=F("h3"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s[0]&131200&&n!==(n=(r[7]?.mode==="preview"?r[17]("preview"):r[17]("edit"))+"")&&X(i,n)},i:H,o:H,d(r){r&&T(e)}}}function UY(t){let e,n;return e=new Kc({props:{"aria-label":t[17]("switch_locale"),"aria-controls":t[0].replace("-header","-body"),$$slots:{default:[HY]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&131072&&(s["aria-label"]=i[17]("switch_locale")),r[0]&1&&(s["aria-controls"]=i[0].replace("-header","-body")),r[0]&985248|r[1]&64&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Lw(t){let e,n;function i(){return t[27](t[33])}return e=new Gl({props:{selected:t[7]?.mode==="edit"&&t[7]?.locale===t[33],variant:"tertiary",size:"small",class:t[34]?"error":"",label:t[32],$$slots:{default:[qY]},$$scope:{ctx:t}}}),e.$on("select",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s[0]&160&&(l.selected=t[7]?.mode==="edit"&&t[7]?.locale===t[33]),s[0]&65568&&(l.class=t[34]?"error":""),s[0]&32&&(l.label=t[32]),s[0]&196640|s[1]&64&&(l.$$scope={dirty:s,ctx:t}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function Ow(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"error","aria-label":t[17]("locale_content_errors")}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&131072&&(s["aria-label"]=i[17]("locale_content_errors")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qY(t){let e,n,i=t[34]&&Ow(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[34]?i?(i.p(r,s),s[0]&65568&&_(i,1)):(i=Ow(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function Pw(t){let e,n,i=!(t[18]?.mode==="edit"&&t[18]?.locale===t[33])&&Lw(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[18]?.mode==="edit"&&r[18]?.locale===r[33]?i&&(x(),y(i,1,1,()=>{i=null}),V()):i?(i.p(r,s),s[0]&262176&&_(i,1)):(i=Lw(r),i.c(),_(i,1),i.m(e.parentNode,e))},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function Iw(t){let e,n;return e=new Gl({props:{selected:t[7]?.mode==="preview",variant:"tertiary",size:"small",label:t[17]("preview")}}),e.$on("select",t[28]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&128&&(s.selected=i[7]?.mode==="preview"),r[0]&131072&&(s.label=i[17]("preview")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function HY(t){let e,n,i,r=be(t[5]),s=[];for(let a=0;a<r.length;a+=1)s[a]=Pw(Nw(t,r,a));const l=a=>y(s[a],1,1,()=>{s[a]=null});let o=t[18]?.mode==="edit"&&t[11]&&t[19].showPreview&&Iw(t);return{c(){for(let a=0;a<s.length;a+=1)s[a].c();e=j(),o&&o.c(),n=Q()},m(a,u){for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(a,u);A(a,e,u),o&&o.m(a,u),A(a,n,u),i=!0},p(a,u){if(u[0]&458912){r=be(a[5]);let c;for(c=0;c<r.length;c+=1){const f=Nw(a,r,c);s[c]?(s[c].p(f,u),_(s[c],1)):(s[c]=Pw(f),s[c].c(),_(s[c],1),s[c].m(e.parentNode,e))}for(x(),c=r.length;c<s.length;c+=1)l(c);V()}a[18]?.mode==="edit"&&a[11]&&a[19].showPreview?o?(o.p(a,u),u[0]&788480&&_(o,1)):(o=Iw(a),o.c(),_(o,1),o.m(n.parentNode,n)):o&&(x(),y(o,1,1,()=>{o=null}),V())},i(a){if(!i){for(let u=0;u<r.length;u+=1)_(s[u]);_(o),i=!0}},o(a){s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)y(s[u]);y(o),i=!1},d(a){a&&(T(e),T(n)),ni(s,a),o&&o.d(a)}}}function Dw(t){let e,n,i={variant:"ghost",iconic:!0,popupPosition:"bottom-right","aria-label":t[17]("show_content_options_x_locale",{values:{locale:t[32]}}),$$slots:{popup:[WY],"start-icon":[xY]},$$scope:{ctx:t}};return e=new pi({props:i}),t[31](e),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){const l={};s[0]&131200&&(l["aria-label"]=r[17]("show_content_options_x_locale",{values:{locale:r[32]}})),s[0]&194456|s[1]&64&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){t[31](null),L(e,r)}}}function xY(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"more_vert"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Mw(t){let e,n,i,r,s,l,o;e=new Uc({props:{anchor:t[8],locale:t[7]?.locale,translate:!0}});let a=t[4].length>1&&Rw();return r=new Uc({props:{anchor:t[8],locale:t[7]?.locale}}),l=new $n({}),{c(){O(e.$$.fragment),n=j(),a&&a.c(),i=j(),O(r.$$.fragment),s=j(),O(l.$$.fragment)},m(u,c){N(e,u,c),A(u,n,c),a&&a.m(u,c),A(u,i,c),N(r,u,c),A(u,s,c),N(l,u,c),o=!0},p(u,c){const f={};c[0]&256&&(f.anchor=u[8]),c[0]&128&&(f.locale=u[7]?.locale),e.$set(f),u[4].length>1?a?c[0]&16&&_(a,1):(a=Rw(),a.c(),_(a,1),a.m(i.parentNode,i)):a&&(x(),y(a,1,1,()=>{a=null}),V());const d={};c[0]&256&&(d.anchor=u[8]),c[0]&128&&(d.locale=u[7]?.locale),r.$set(d)},i(u){o||(_(e.$$.fragment,u),_(a),_(r.$$.fragment,u),_(l.$$.fragment,u),o=!0)},o(u){y(e.$$.fragment,u),y(a),y(r.$$.fragment,u),y(l.$$.fragment,u),o=!1},d(u){u&&(T(n),T(i),T(s)),L(e,u),a&&a.d(u),L(r,u),L(l,u)}}}function Rw(t){let e,n;return e=new $n({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function $w(t){let e,n,i,r;return e=new $n({}),i=new Pt({props:{label:t[17](t[13]?"disable_x_locale":t[3][t[7]?.locale]?"reenable_x_locale":"enable_x_locale",{values:{locale:t[32]}}),disabled:t[13]&&t[12]}}),i.$on("click",t[30]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l[0]&139400&&(o.label=s[17](s[13]?"disable_x_locale":s[3][s[7]?.locale]?"reenable_x_locale":"enable_x_locale",{values:{locale:s[32]}})),l[0]&12288&&(o.disabled=s[13]&&s[12]),i.$set(o)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function VY(t){let e,n,i,r,s,l=t[10]&&Mw(t);n=new Pt({props:{label:t[17]("revert_changes"),disabled:!t[9]}}),n.$on("click",t[29]);let o=!t[15]&&t[7]?.locale!==t[14]&&$w(t);return{c(){l&&l.c(),e=j(),O(n.$$.fragment),i=j(),o&&o.c(),r=Q()},m(a,u){l&&l.m(a,u),A(a,e,u),N(n,a,u),A(a,i,u),o&&o.m(a,u),A(a,r,u),s=!0},p(a,u){a[10]?l?(l.p(a,u),u[0]&1024&&_(l,1)):(l=Mw(a),l.c(),_(l,1),l.m(e.parentNode,e)):l&&(x(),y(l,1,1,()=>{l=null}),V());const c={};u[0]&131072&&(c.label=a[17]("revert_changes")),u[0]&512&&(c.disabled=!a[9]),n.$set(c),!a[15]&&a[7]?.locale!==a[14]?o?(o.p(a,u),u[0]&49280&&_(o,1)):(o=$w(a),o.c(),_(o,1),o.m(r.parentNode,r)):o&&(x(),y(o,1,1,()=>{o=null}),V())},i(a){s||(_(l),_(n.$$.fragment,a),_(o),s=!0)},o(a){y(l),y(n.$$.fragment,a),y(o),s=!1},d(a){a&&(T(e),T(i),T(r)),l&&l.d(a),L(n,a),o&&o.d(a)}}}function WY(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[17]("content_options_x_locale",{values:{locale:t[32]}}),$$slots:{default:[VY]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&131200&&(s["aria-label"]=i[17]("content_options_x_locale",{values:{locale:i[32]}})),r[0]&194456|r[1]&64&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function YY(t){let e,n,i,r,s,l,o;const a=[UY,BY],u=[];function c(d,h){return d[6]?0:1}e=c(t),n=u[e]=a[e](t),r=new In({props:{flex:!0}});let f=t[7]?.mode==="edit"&&Dw(th(t));return{c(){n.c(),i=j(),O(r.$$.fragment),s=j(),f&&f.c(),l=Q()},m(d,h){u[e].m(d,h),A(d,i,h),N(r,d,h),A(d,s,h),f&&f.m(d,h),A(d,l,h),o=!0},p(d,h){let m=e;e=c(d),e===m?u[e].p(d,h):(x(),y(u[m],1,1,()=>{u[m]=null}),V(),n=u[e],n?n.p(d,h):(n=u[e]=a[e](d),n.c()),_(n,1),n.m(i.parentNode,i)),d[7]?.mode==="edit"?f?(f.p(th(d),h),h[0]&128&&_(f,1)):(f=Dw(th(d)),f.c(),_(f,1),f.m(l.parentNode,l)):f&&(x(),y(f,1,1,()=>{f=null}),V())},i(d){o||(_(n),_(r.$$.fragment,d),_(f),o=!0)},o(d){y(n),y(r.$$.fragment,d),y(f),o=!1},d(d){d&&(T(i),T(s),T(l)),u[e].d(d),L(r,d),f&&f.d(d)}}}function GY(t){let e,n,i;return n=new qr({props:{variant:"secondary","aria-label":t[17]("secondary"),$$slots:{default:[YY]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"id",t[0]),C(e,"class","header svelte-1y2vbgq")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s[0]&131072&&(l["aria-label"]=r[17]("secondary")),s[0]&1048569|s[1]&64&&(l.$$scope={dirty:s,ctx:r}),n.$set(l),(!i||s[0]&1)&&C(e,"id",r[0])},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function KY(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k,S=H,E=()=>(S(),S=Qn(ee,_e=>n(7,k=_e)),ee),P,M,I,D,z=H,R=()=>(z(),z=Qn(K,_e=>n(18,D=_e)),K),U;B(t,at,_e=>n(25,P=_e)),B(t,wt,_e=>n(26,M=_e)),B(t,ue,_e=>n(17,I=_e)),B(t,lr,_e=>n(19,U=_e)),t.$$.on_destroy.push(()=>S()),t.$$.on_destroy.push(()=>z());let{id:W}=e,{thisPane:ee}=e;E();let{thatPane:K=Xe(null)}=e;R();let ve;const me=_e=>{ze(ee,k={mode:"edit",locale:_e},k),D?.mode==="preview"&&ze(K,D={mode:"preview",locale:_e},D)},se=()=>{ze(ee,k={mode:"preview",locale:D?.locale??""},k)},q=()=>{hg(k?.locale)},J=()=>{qE(k?.locale??"")};function Le(_e){ae[_e?"unshift":"push"](()=>{ve=_e,n(8,ve)})}return t.$$set=_e=>{"id"in _e&&n(0,W=_e.id),"thisPane"in _e&&E(n(1,ee=_e.thisPane)),"thatPane"in _e&&R(n(2,K=_e.thatPane))},t.$$.update=()=>{t.$$.dirty[0]&67108864&&n(21,{editor:{preview:i=!0}={}}=M??{},i),t.$$.dirty[0]&33554432&&n(22,{collection:r,collectionFile:s,currentLocales:l,currentValues:o,originalValues:a,validities:u}=P??{},r,(n(23,s),n(25,P)),(n(24,l),n(25,P)),(n(3,o),n(25,P)),(n(20,a),n(25,P)),(n(16,u),n(25,P))),t.$$.dirty[0]&12582912&&n(6,{i18nEnabled:c,saveAllLocales:f,locales:d,defaultLocale:h}=(s??r)?._i18n??gs,c,(n(15,f),n(23,s),n(22,r),n(25,P)),(n(5,d),n(23,s),n(22,r),n(25,P)),(n(14,h),n(23,s),n(22,r),n(25,P))),t.$$.dirty[0]&16777344&&n(13,m=l[k?.locale??""]),t.$$.dirty[0]&16777216&&n(12,p=Object.values(l).filter(_e=>_e).length===1),t.$$.dirty[0]&224&&n(4,g=c?d.filter(_e=>_e!==k?.locale):[]),t.$$.dirty[0]&14680064&&n(11,v=(s??r)?.editor?.preview??i),t.$$.dirty[0]&16&&n(10,b=!!g.length),t.$$.dirty[0]&1048712&&n(9,w=k?.locale&&!ei(o[k?.locale],a[k?.locale]))},[W,ee,K,o,g,d,c,k,ve,w,b,v,p,m,h,f,u,I,D,U,a,i,r,s,l,P,M,me,se,q,J,Le]}class cT extends ie{constructor(e){super(),ne(this,e,KY,GY,te,{id:0,thisPane:1,thatPane:2},jY,[-1,-1])}}const qc="sveltia-cms.contents-view",fT=["title","name","date","author","description"],hi=Xe({type:"list"}),Ta=(t,e,n,{useTemplate:i=!0}={})=>{const{content:r}=e.locales[n],{name:s,folder:l,identifier_field:o,summary:a,_i18n:{defaultLocale:u}}=t;if(!i||!a)return r[o??""]||r.title||r.name||r.label||e.slug;const{locales:c,slug:f,commitDate:d,commitAuthor:h}=e,{path:m=""}=c[n],p=zr(r),g=b=>b==="slug"?f:b==="dirname"?Ln(m.replace(/[^/]+$/,"").replace(l??"","")):b==="filename"?m.split("/").pop().split(".").shift():b==="extension"?m.split("/").pop().split(".").pop():b==="commit_date"?d??"":b==="commit_author"?h?.name||h?.login||h?.email:If({collectionName:s,valueMap:p,keyPath:b.replace(/^fields\./,""),locale:u}),v=b=>{const[w,...k]=b.split(/\s*\|\s*/);let S=g(w);if(S===void 0)return"";if(S instanceof Date&&!k.length){const{year:E,month:P,day:M}=Df({date:S});return`${E}-${P}-${M}`}if(k.length){const E=li({collectionName:s,valueMap:p,keyPath:w});k.forEach(P=>{S=CE(S,P,E)})}return String(S)};return a.replace(/{{(.+?)}}/g,(b,w)=>v(w)).trim()},ZY=(t,{key:e,order:n})=>{if(e===void 0||n===void 0)return t;const i=[...t],{defaultLocale:r}=le(Yt)._i18n,s={slug:String,commit_author:String,commit_date:Date}[e]||(i.length?no(i[0],r,e)?.constructor:String)||String,l=Object.fromEntries(i.map(o=>[o.slug,no(o,r,e)]));return i.sort((o,a)=>{const u=l[o.slug],c=l[a.slug];return u===void 0||c===void 0?0:s===String?u.localeCompare(c):s===Date?Number(u)-Number(c):u-c}),n==="descending"&&i.reverse(),i},JY=(t,e)=>{const{view_filters:n=[],_i18n:{defaultLocale:i}}=le(Yt),r=e.filter(({field:s,pattern:l})=>s!==void 0&&l!==void 0&&n.some(o=>o.field===s&&o.pattern===l));return t.filter(s=>r.every(({field:l,pattern:o})=>{const a=no(s,i,l,{resolveRef:!1}),u=no(s,i,l),c=typeof o=="string"?new RegExp(o):void 0;return a===void 0||u===void 0?!1:c?c.test(String(a))||c.test(String(u)):a===o||u===o}))},XY=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?[{name:"*",entries:t}]:[];const i=le(hi).sort,{defaultLocale:r}=le(Yt)._i18n,s=typeof n=="string"?new RegExp(n):void 0,l={},o=le(ue)("other");t.forEach(u=>{const c=no(u,r,e);if(c===void 0)return;const f=s?(String(c).match(s)??[])[0]??o:String(c);f in l||(l[f]=[]),l[f].push(u)});const a=Object.entries(l).map(([u,c])=>({name:u,entries:c})).sort(({name:u},{name:c})=>u.localeCompare(c));return i?.key===e&&i?.order==="descending"&&a.reverse(),a},Hc=Xe({},t=>{(async()=>{try{const e=await Zt.get(qc)??{};let n=!1;const i=Object.fromEntries(Object.entries(e).map(([r,s])=>(s.filter&&(n=!0,s.filters??=[],s.filters.push(s.filter),delete s.filter),[r,s])));t(i),n&&await Zt.set(qc,i)}catch{}})()}),QY=(t,e)=>["name","commit_author","commit_date"].includes(e)?le(ue)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,i,r)=>{if(n.match(/^\d+$/))return;const s=r.slice(0,i+1).join(".");return li({collectionName:t.name,keyPath:s})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,eG=An([Yt,Pi,un],([t,e],n)=>{const{name:i="",files:r,sortable_fields:s}=t??{};if(r){n([]);return}const{commitAuthor:l,commitDate:o}=e?.[0]??{},a=(Array.isArray(s)?s:fT).filter(u=>!!li({collectionName:i,keyPath:u}));l&&!a.includes("author")&&a.push("commit_author"),o&&!a.includes("date")&&a.push("commit_date"),n(a.map(u=>({key:u,label:t?QY(t,u):""})))}),nl=An([Pi,Yt],([t,e],n)=>{n(t&&e?Za(e.name):[])}),dT=An([nl,hi],([t,e],n)=>{let i=[...t];!i.length||i[0].fileName?n([]):(e?.sort&&(i=ZY(i,e.sort)),e?.filters&&(i=JY(i,e.filters)),n(XY(i,e?.group)))});nl.subscribe(t=>{is.set([]),le(Lt).devModeEnabled&&console.info("listedEntries",t)});Yt.subscribe(t=>{if(!t)return;le(Lt).devModeEnabled&&console.info("selectedCollection",t);const{name:e,identifier_field:n,fields:i=[]}=t;if(Fs.set(null),es.set(null),!i.length)return;const r={type:"list",sort:{key:n||i.find(l=>fT.includes(l.name))?.name,order:"ascending"}},s=le(Hc)[e]??r;ei(s,le(hi))||hi.set(s)});hi.subscribe(t=>{const{name:e}=le(Yt)??{},n=le(Hc)[e??""]??{};e&&!ei(t,n)&&Hc.update(i=>({...i,[e]:t}))});Hc.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{ei(t,await Zt.get(qc))||await Zt.set(qc,t)}catch{}})()});function Fw(t){const e=t[22];t[51]=e.status,t[52]=e.message,t[53]=e.count,t[54]=e.sourceLocale}function tG(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"arrow_back_ios_new"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function nG(t){let e=t[20]("editing_x_in_x",{values:{collection:t[5],entry:t[4]?t[4].label||t[4].name:t[1]?vc(Ta(t[0],t[1],t[18],{useTemplate:!1}),40):""}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1310771&&e!==(e=i[20]("editing_x_in_x",{values:{collection:i[5],entry:i[4]?i[4].label||i[4].name:i[1]?vc(Ta(i[0],i[1],i[18],{useTemplate:!1}),40):""}})+"")&&X(n,e)},d(i){i&&T(n)}}}function iG(t){let e=t[20]("creating_x",{values:{name:t[17]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1179648&&e!==(e=i[20]("creating_x",{values:{name:i[17]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function zw(t){let e,n,i,r;return e=new et({props:{variant:"ghost",label:t[20]("duplicate"),"aria-label":t[20]("duplicate_entry"),disabled:t[0]?.create===!1}}),e.$on("click",t[34]),i=new et({props:{variant:"ghost",label:t[20]("delete"),"aria-label":t[20]("delete_entry"),disabled:t[0]?.delete===!1}}),i.$on("click",t[35]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l[0]&1048576&&(o.label=s[20]("duplicate")),l[0]&1048576&&(o["aria-label"]=s[20]("duplicate_entry")),l[0]&1&&(o.disabled=s[0]?.create===!1),e.$set(o);const a={};l[0]&1048576&&(a.label=s[20]("delete")),l[0]&1048576&&(a["aria-label"]=s[20]("delete_entry")),l[0]&1&&(a.disabled=s[0]?.delete===!1),i.$set(a)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function rG(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"more_vert"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sG(t){let e,n,i,r,s,l,o,a;return e=new ec({props:{label:t[20]("show_preview"),checked:t[21].showPreview,disabled:!t[16]}}),e.$on("change",t[36]),i=new ec({props:{label:t[20]("sync_scrolling"),checked:t[21].syncScrolling,disabled:!t[16]&&Object.keys(t[2]).length===1}}),i.$on("change",t[37]),s=new $n({}),o=new Pt({props:{label:t[20]("revert_all_changes"),disabled:!t[15]}}),o.$on("click",t[38]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment)},m(u,c){N(e,u,c),A(u,n,c),N(i,u,c),A(u,r,c),N(s,u,c),A(u,l,c),N(o,u,c),a=!0},p(u,c){const f={};c[0]&1048576&&(f.label=u[20]("show_preview")),c[0]&2097152&&(f.checked=u[21].showPreview),c[0]&65536&&(f.disabled=!u[16]),e.$set(f);const d={};c[0]&1048576&&(d.label=u[20]("sync_scrolling")),c[0]&2097152&&(d.checked=u[21].syncScrolling),c[0]&65540&&(d.disabled=!u[16]&&Object.keys(u[2]).length===1),i.$set(d);const h={};c[0]&1048576&&(h.label=u[20]("revert_all_changes")),c[0]&32768&&(h.disabled=!u[15]),o.$set(h)},i(u){a||(_(e.$$.fragment,u),_(i.$$.fragment,u),_(s.$$.fragment,u),_(o.$$.fragment,u),a=!0)},o(u){y(e.$$.fragment,u),y(i.$$.fragment,u),y(s.$$.fragment,u),y(o.$$.fragment,u),a=!1},d(u){u&&(T(n),T(r),T(l)),L(e,u),L(i,u),L(s,u),L(o,u)}}}function lG(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[20]("editor_options"),$$slots:{default:[sG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1048576&&(s["aria-label"]=i[20]("editor_options")),r[0]&3244036|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oG(t){let e,n;return e=new et({props:{variant:"primary",label:t[20](t[11]?"saving":"save"),disabled:!t[15]||t[11],keyShortcuts:"Accel+S"}}),e.$on("click",t[42]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1050624&&(s.label=i[20](i[11]?"saving":"save")),r[0]&34816&&(s.disabled=!i[15]||i[11]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function aG(t){let e,n;return e=new lN({props:{variant:"primary",label:t[20](t[11]?"saving":"save"),disabled:!t[15]||t[11],keyShortcuts:"Accel+S",$$slots:{popup:[cG]},$$scope:{ctx:t}}}),e.$on("click",t[41]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1050624&&(s.label=i[20](i[11]?"saving":"save")),r[0]&34816&&(s.disabled=!i[15]||i[11]),r[0]&1048640|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function uG(t){let e,n;return e=new Pt({props:{label:t[20](t[6]?"save_without_publishing":"save_and_publish")}}),e.$on("click",t[40]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1048640&&(s.label=i[20](i[6]?"save_without_publishing":"save_and_publish")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function cG(t){let e,n;return e=new ri({props:{slot:"popup",$$slots:{default:[uG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1048640|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function fG(t){let e,n,i,r,s,l,o,a,u,c,f,d,h;e=new et({props:{variant:"ghost",iconic:!0,"aria-label":t[20]("cancel_editing"),$$slots:{"start-icon":[tG]},$$scope:{ctx:t}}}),e.$on("click",t[33]);function m(E,P){return E[3]?iG:nG}let p=m(t),g=p(t);s=new In({props:{flex:!0}});let v=!t[4]&&!t[3]&&zw(t),b={variant:"ghost",iconic:!0,popupPosition:"bottom-right","aria-label":t[20]("show_editor_options"),$$slots:{popup:[lG],"start-icon":[rG]},$$scope:{ctx:t}};a=new pi({props:b}),t[39](a);const w=[aG,oG],k=[];function S(E,P){return E[19]?0:1}return c=S(t),f=k[c]=w[c](t),{c(){O(e.$$.fragment),n=j(),i=F("h2"),g.c(),r=j(),O(s.$$.fragment),l=j(),v&&v.c(),o=j(),O(a.$$.fragment),u=j(),f.c(),d=Q(),C(i,"role","none")},m(E,P){N(e,E,P),A(E,n,P),A(E,i,P),g.m(i,null),A(E,r,P),N(s,E,P),A(E,l,P),v&&v.m(E,P),A(E,o,P),N(a,E,P),A(E,u,P),k[c].m(E,P),A(E,d,P),h=!0},p(E,P){const M={};P[0]&1048576&&(M["aria-label"]=E[20]("cancel_editing")),P[1]&16777216&&(M.$$scope={dirty:P,ctx:E}),e.$set(M),p===(p=m(E))&&g?g.p(E,P):(g.d(1),g=p(E),g&&(g.c(),g.m(i,null))),!E[4]&&!E[3]?v?(v.p(E,P),P[0]&24&&_(v,1)):(v=zw(E),v.c(),_(v,1),v.m(o.parentNode,o)):v&&(x(),y(v,1,1,()=>{v=null}),V());const I={};P[0]&1048576&&(I["aria-label"]=E[20]("show_editor_options")),P[0]&3244036|P[1]&16777216&&(I.$$scope={dirty:P,ctx:E}),a.$set(I);let D=c;c=S(E),c===D?k[c].p(E,P):(x(),y(k[D],1,1,()=>{k[D]=null}),V(),f=k[c],f?f.p(E,P):(f=k[c]=w[c](E),f.c()),_(f,1),f.m(d.parentNode,d))},i(E){h||(_(e.$$.fragment,E),_(s.$$.fragment,E),_(v),_(a.$$.fragment,E),_(f),h=!0)},o(E){y(e.$$.fragment,E),y(s.$$.fragment,E),y(v),y(a.$$.fragment,E),y(f),h=!1},d(E){E&&(T(n),T(i),T(r),T(l),T(o),T(u),T(d)),L(e,E),g.d(),L(s,E),v&&v.d(E),t[39](null),L(a,E),k[c].d(E)}}}function dG(t){let e=t[20]("entry_duplicated")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1048576&&e!==(e=i[20]("entry_duplicated")+"")&&X(n,e)},d(i){i&&T(n)}}}function hG(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[dG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1048576|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function pG(t){let e=t[20](t[14]===1?"entry_validation_error":"entry_validation_errors",{values:{count:t[14]}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1064960&&e!==(e=i[20](i[14]===1?"entry_validation_error":"entry_validation_errors",{values:{count:i[14]}})+"")&&X(n,e)},d(i){i&&T(n)}}}function mG(t){let e,n;return e=new Ii({props:{status:"error",$$slots:{default:[pG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r[0]&1064960|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gG(t){let e=t[20](`editor.${t[52]}`,{values:{count:t[53],source:t[54]?di(t[54]):""}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&5242880&&e!==(e=i[20](`editor.${i[52]}`,{values:{count:i[53],source:i[54]?di(i[54]):""}})+"")&&X(n,e)},d(i){i&&T(n)}}}function _G(t){Fw(t);let e,n;return e=new Ii({props:{status:t[51],$$slots:{default:[gG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){Fw(i);const s={};r[0]&4194304&&(s.status=i[51]),r[0]&5242880|r[1]&16777216&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function bG(t){let e=t[20](t[13].length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1056768&&e!==(e=i[20](i[13].length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")+"")&&X(n,e)},d(i){i&&T(n)}}}function vG(t){let e=t[20]("saving_entry.error.description")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r[0]&1048576&&e!==(e=i[20]("saving_entry.error.description")+"")&&X(n,e)},d(i){i&&T(n)}}}function yG(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g,v;e=new qr({props:{variant:"primary","aria-label":t[20]("primary"),$$slots:{default:[fG]},$$scope:{ctx:t}}});function b(R){t[43](R)}let w={$$slots:{default:[hG]},$$scope:{ctx:t}};t[7]!==void 0&&(w.show=t[7]),i=new Si({props:w}),ae.push(()=>Re(i,"show",b));function k(R){t[44](R)}let S={$$slots:{default:[mG]},$$scope:{ctx:t}};t[8]!==void 0&&(S.show=t[8]),l=new Si({props:S}),ae.push(()=>Re(l,"show",k));function E(R){t[45](R)}let P={id:t[22].id,$$slots:{default:[_G]},$$scope:{ctx:t}};t[22].show!==void 0&&(P.show=t[22].show),u=new Si({props:P}),ae.push(()=>Re(u,"show",E));function M(R){t[46](R)}let I={title:t[20]("delete_entry"),okLabel:t[20]("delete"),$$slots:{default:[bG]},$$scope:{ctx:t}};t[9]!==void 0&&(I.open=t[9]),d=new Ia({props:I}),ae.push(()=>Re(d,"open",M)),d.$on("ok",t[47]),d.$on("close",t[48]);function D(R){t[49](R)}let z={title:t[20]("saving_entry.error.title"),$$slots:{default:[vG]},$$scope:{ctx:t}};return t[10]!==void 0&&(z.open=t[10]),p=new D2({props:z}),ae.push(()=>Re(p,"open",D)),p.$on("close",t[50]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),s=j(),O(l.$$.fragment),a=j(),O(u.$$.fragment),f=j(),O(d.$$.fragment),m=j(),O(p.$$.fragment)},m(R,U){N(e,R,U),A(R,n,U),N(i,R,U),A(R,s,U),N(l,R,U),A(R,a,U),N(u,R,U),A(R,f,U),N(d,R,U),A(R,m,U),N(p,R,U),v=!0},p(R,U){const W={};U[0]&1048576&&(W["aria-label"]=R[20]("primary")),U[0]&4168319|U[1]&16777216&&(W.$$scope={dirty:U,ctx:R}),e.$set(W);const ee={};U[0]&1048576|U[1]&16777216&&(ee.$$scope={dirty:U,ctx:R}),!r&&U[0]&128&&(r=!0,ee.show=R[7],$e(()=>r=!1)),i.$set(ee);const K={};U[0]&1064960|U[1]&16777216&&(K.$$scope={dirty:U,ctx:R}),!o&&U[0]&256&&(o=!0,K.show=R[8],$e(()=>o=!1)),l.$set(K);const ve={};U[0]&4194304&&(ve.id=R[22].id),U[0]&5242880|U[1]&16777216&&(ve.$$scope={dirty:U,ctx:R}),!c&&U[0]&4194304&&(c=!0,ve.show=R[22].show,$e(()=>c=!1)),u.$set(ve);const me={};U[0]&1048576&&(me.title=R[20]("delete_entry")),U[0]&1048576&&(me.okLabel=R[20]("delete")),U[0]&1056768|U[1]&16777216&&(me.$$scope={dirty:U,ctx:R}),!h&&U[0]&512&&(h=!0,me.open=R[9],$e(()=>h=!1)),d.$set(me);const se={};U[0]&1048576&&(se.title=R[20]("saving_entry.error.title")),U[0]&1048576|U[1]&16777216&&(se.$$scope={dirty:U,ctx:R}),!g&&U[0]&1024&&(g=!0,se.open=R[10],$e(()=>g=!1)),p.$set(se)},i(R){v||(_(e.$$.fragment,R),_(i.$$.fragment,R),_(l.$$.fragment,R),_(u.$$.fragment,R),_(d.$$.fragment,R),_(p.$$.fragment,R),v=!0)},o(R){y(e.$$.fragment,R),y(i.$$.fragment,R),y(l.$$.fragment,R),y(u.$$.fragment,R),y(d.$$.fragment,R),y(p.$$.fragment,R),v=!1},d(R){R&&(T(n),T(s),T(a),T(f),T(m)),L(e,R),L(i,R),L(l,R),L(u,R),L(d,R),L(p,R)}}}function wG(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b,w,k,S,E,P,M,I,D,z;B(t,at,st=>n(30,E=st)),B(t,Wr,st=>n(31,P=st)),B(t,wt,st=>n(32,M=st)),B(t,ue,st=>n(20,I=st)),B(t,lr,st=>n(21,D=st)),B(t,gp,st=>n(22,z=st));let R=!1,U=!1,W=!1,ee=!1,K=!1,ve;const me=async()=>{n(7,R=!0),pn(`/collections/${r?.name}/new`,{replaceState:!0,notifyChange:!1}),ze(at,E={...E??{},isNew:!0,originalEntry:void 0},E)},se=async({skipCI:st=void 0}={})=>{try{n(11,K=!0),await Zz({skipCI:st}),Hl(`/collections/${r?.name}`)}catch(mn){mn.message==="validation_failed"?n(8,U=!0):(n(10,ee=!0),console.error(mn))}finally{n(11,K=!1)}},q=()=>{Hl(`/collections/${r?.name}`)},J=()=>{me()},Le=()=>{n(9,W=!0)},_e=()=>{lr.update(st=>({...st,showPreview:!st.showPreview}))},Be=()=>{lr.update(st=>({...st,syncScrolling:!st.syncScrolling}))},Ke=()=>{hg()};function de(st){ae[st?"unshift":"push"](()=>{ve=st,n(12,ve)})}const ge=()=>se({skipCI:h}),pe=()=>se(),We=()=>se();function ot(st){R=st,n(7,R)}function oe(st){U=st,n(8,U)}function Ne(st){t.$$.not_equal(z.show,st)&&(z.show=st,gp.set(z))}function Qe(st){W=st,n(9,W)}const rt=async()=>{l&&await jE([l.id],S.map(({path:st})=>st)),Hl(`/collections/${r?.name}`)},pt=()=>{ve.focus()};function Jt(st){ee=st,n(10,ee)}const Ot=()=>{ve.focus()};return t.$$.update=()=>{t.$$.dirty[0]&1073741824&&n(3,{isNew:i,collection:r,collectionFile:s,originalEntry:l,originalLocales:o,currentLocales:a,originalValues:u,currentValues:c,validities:f}=E??{},i,(n(0,r),n(30,E)),(n(4,s),n(30,E)),(n(1,l),n(30,E)),(n(28,o),n(30,E)),(n(27,a),n(30,E)),(n(26,u),n(30,E)),(n(2,c),n(30,E)),(n(25,f),n(30,E))),t.$$.dirty[1]&2&&n(29,{editor:{preview:d=!0}={},backend:{automatic_deployments:h=void 0}={}}=M??{},d,(n(6,h),n(32,M))),t.$$.dirty[0]&64|t.$$.dirty[1]&1&&n(19,m=P!=="local"&&typeof h=="boolean"),t.$$.dirty[0]&17&&n(18,{defaultLocale:p}=(s??r)?._i18n??gs,p),t.$$.dirty[0]&1&&n(5,g=r?.label||r?.name),t.$$.dirty[0]&33&&n(17,v=r?.label_singular||g),t.$$.dirty[0]&536870929&&n(16,b=(s??r)?.editor?.preview??d),t.$$.dirty[0]&469762060&&n(15,w=i||!ei(o,a)||!ei(u,c)),t.$$.dirty[0]&33554432&&n(14,k=Object.values(f).map(st=>Object.values(st).map(({valid:mn})=>!mn)).flat(1).filter(Boolean).length),t.$$.dirty[0]&3&&n(13,S=l&&r._assetFolder?.entryRelative?D3(l,{relative:!0}):[])},[r,l,c,i,s,g,h,R,U,W,ee,K,ve,S,k,w,b,v,p,m,I,D,z,me,se,f,u,a,o,d,E,P,M,q,J,Le,_e,Be,Ke,de,ge,pe,We,ot,oe,Ne,Qe,rt,pt,Jt,Ot]}class kG extends ie{constructor(e){super(),ne(this,e,wG,yG,te,{},null,[-1,-1])}}function SG(t){ye(t,"svelte-29z2or",'.wrapper.svelte-29z2or.svelte-29z2or{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-primary-background-color)}.wrapper.svelte-29z2or .cols.svelte-29z2or{flex:auto;overflow:hidden;display:flex}.wrapper.svelte-29z2or .cols.svelte-29z2or>div{display:flex;flex-direction:column;min-width:480px;transition:all 500ms}.wrapper.svelte-29z2or .cols.svelte-29z2or>div:first-child:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.wrapper.svelte-29z2or .cols.svelte-29z2or>[data-mode="edit"]{flex:1 1}.wrapper.svelte-29z2or .cols.svelte-29z2or>[data-mode="preview"]{flex:2 1}')}function nh(t){const e=t.slice(),n=e[1];return e[25]=n.locale,e[26]=n.mode,e}function ih(t){const e=t.slice(),n=e[2];return e[25]=n.locale,e[26]=n.mode,e}function jw(t){let e,n,i,r=t[2]&&Bw(ih(t)),s=t[1]&&Uw(nh(t));return{c(){r&&r.c(),e=j(),s&&s.c(),n=Q()},m(l,o){r&&r.m(l,o),A(l,e,o),s&&s.m(l,o),A(l,n,o),i=!0},p(l,o){l[2]?r?(r.p(ih(l),o),o&4&&_(r,1)):(r=Bw(ih(l)),r.c(),_(r,1),r.m(e.parentNode,e)):r&&(x(),y(r,1,1,()=>{r=null}),V()),l[1]?s?(s.p(nh(l),o),o&2&&_(s,1)):(s=Uw(nh(l)),s.c(),_(s,1),s.m(n.parentNode,n)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){i||(_(r),_(s),i=!0)},o(l){y(r),y(s),i=!1},d(l){l&&(T(e),T(n)),r&&r.d(l),s&&s.d(l)}}}function Bw(t){let e,n;return e=new Tn({props:{class:"pane","aria-label":t[6](t[26]==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:di(t[25])}}),"data-locale":t[25],"data-mode":t[26],$$slots:{default:[EG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&68&&(s["aria-label"]=i[6](i[26]==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:di(i[25])}})),r&4&&(s["data-locale"]=i[25]),r&4&&(s["data-mode"]=i[26]),r&134217752&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function EG(t){let e,n,i,r,s;e=new cT({props:{id:"left-pane-header",thisPane:Fs,thatPane:es}});function l(a){t[14](a)}let o={id:"left-pane-body",thisPane:Fs,thatPaneContentArea:t[4]};return t[3]!==void 0&&(o.thisPaneContentArea=t[3]),i=new uT({props:o}),ae.push(()=>Re(i,"thisPaneContentArea",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,u){const c={};u&16&&(c.thatPaneContentArea=a[4]),!r&&u&8&&(r=!0,c.thisPaneContentArea=a[3],$e(()=>r=!1)),i.$set(c)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function Uw(t){let e,n;return e=new Tn({props:{"aria-label":t[6](t[26]==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:di(t[25])}}),"data-locale":t[25],"data-mode":t[26],$$slots:{default:[TG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&66&&(s["aria-label"]=i[6](i[26]==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:di(i[25])}})),r&2&&(s["data-locale"]=i[25]),r&2&&(s["data-mode"]=i[26]),r&134217752&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TG(t){let e,n,i,r,s;e=new cT({props:{id:"right-pane-header",thisPane:es,thatPane:Fs}});function l(a){t[15](a)}let o={id:"right-pane-body",thisPane:es,thatPaneContentArea:t[3]};return t[4]!==void 0&&(o.thisPaneContentArea=t[4]),i=new uT({props:o}),ae.push(()=>Re(i,"thisPaneContentArea",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,u){const c={};u&8&&(c.thatPaneContentArea=a[3]),!r&&u&16&&(r=!0,c.thisPaneContentArea=a[4],$e(()=>r=!1)),i.$set(c)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function AG(t){let e,n,i,r,s;n=new kG({});let l=t[0]&&jw(t);return{c(){e=F("div"),O(n.$$.fragment),i=j(),r=F("div"),l&&l.c(),C(r,"role","none"),C(r,"class","cols svelte-29z2or"),C(e,"role","none"),C(e,"class","wrapper svelte-29z2or")},m(o,a){A(o,e,a),N(n,e,null),$(e,i),$(e,r),l&&l.m(r,null),t[16](e),s=!0},p(o,a){o[0]?l?(l.p(o,a),a&1&&_(l,1)):(l=jw(o),l.c(),_(l,1),l.m(r,null)):l&&(x(),y(l,1,1,()=>{l=null}),V())},i(o){s||(_(n.$$.fragment,o),_(l),s=!0)},o(o){y(n.$$.fragment,o),y(l),s=!1},d(o){o&&T(e),L(n),l&&l.d(),t[16](null)}}}function CG(t){let e,n;return e=new Tn({props:{class:"content-editor","aria-label":t[6]("content_editor"),$$slots:{default:[AG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&64&&(s["aria-label"]=i[6]("content_editor")),r&134217855&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function NG(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m,p,g,v;B(t,at,R=>n(11,d=R)),B(t,es,R=>n(1,h=R)),B(t,Fs,R=>n(2,m=R)),B(t,lr,R=>n(12,p=R)),B(t,wt,R=>n(13,g=R)),B(t,ue,R=>n(6,v=R));let b,w,k=!1;const S=()=>{const R=o?.[r.name];if(!Array.isArray(R))return;const[U,W]=R;if(U?.locale&&!u.includes(U.locale)||W?.locale&&!u.includes(W.locale)||(!l||!f)&&(U?.mode==="preview"||W?.mode==="preview"))throw new Error("Saved panes are invalid");ze(Fs,m=U,m),ze(es,h=W,h)},E=()=>{if(!k)try{S();return}catch(R){console.error(R)}finally{k=!0}if(ze(Fs,m={mode:"edit",locale:m?.locale??c},m),!l||!f){const R=a?u.filter(U=>U!==m?.locale):[];ze(es,h=R.length?{mode:"edit",locale:R[0]}:null,h)}else ze(es,h={mode:"preview",locale:m?.locale},h)},P=()=>{r&&lr.update(R=>({...R,paneStates:{...R.paneStates??{},[r.name]:[m,h]}}))};let M;Ut(()=>{E();const R=M.closest('[role="group"]');return R.tabIndex=0,R.focus(),()=>{ze(at,d=null,d)}});function I(R){b=R,n(3,b)}function D(R){w=R,n(4,w)}function z(R){ae[R?"unshift":"push"](()=>{M=R,n(5,M)})}return t.$$.update=()=>{t.$$.dirty&8192&&n(9,{editor:{preview:i=!0}={}}=g??{},i),t.$$.dirty&2048&&n(0,{collection:r,collectionFile:s}=d??{},r,(n(10,s),n(11,d))),t.$$.dirty&4096&&n(8,{showPreview:l,paneStates:o}=p,l),t.$$.dirty&1025&&({i18nEnabled:a,locales:u,defaultLocale:c}=(s??r)?._i18n??gs),t.$$.dirty&1537&&n(7,f=(s??r)?.editor?.preview??i),t.$$.dirty&384&&E(),t.$$.dirty&6&&P()},[r,h,m,b,w,M,v,f,l,i,s,d,p,g,I,D,z]}class LG extends ie{constructor(e){super(),ne(this,e,NG,CG,te,{},SG)}}function OG(t){let e,n;return e=new I2({props:{role:"none",tabindex:"-1",checked:t[7].includes(t[0])}}),e.$on("change",t[10]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&129&&(s.checked=i[7].includes(i[0])),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qw(t){let e,n;return e=new fi({props:{class:"image",$$slots:{default:[PG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8212&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Hw(t){let e,n;return e=new su({props:{src:t[4],variant:t[2]==="list"?"icon":"tile",cover:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16&&(s.src=i[4]),r&4&&(s.variant=i[2]==="list"?"icon":"tile"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function PG(t){let e,n,i=t[4]&&Hw(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[4]?i?(i.p(r,s),s&16&&_(i,1)):(i=Hw(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function xw(t){let e=Ta(t[6],t[0],t[1])+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&67&&e!==(e=Ta(i[6],i[0],i[1])+"")&&X(n,e)},d(i){i&&T(n)}}}function IG(t){let e,n=t[6]&&xw(t);return{c(){e=F("span"),n&&n.c(),C(e,"role","none")},m(i,r){A(i,e,r),n&&n.m(e,null)},p(i,r){i[6]?n?n.p(i,r):(n=xw(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&T(e),n&&n.d()}}}function DG(t){let e,n,i,r,s;e=new fi({props:{class:"checkbox",$$slots:{default:[OG]},$$scope:{ctx:t}}});let l=t[3]&&qw(t);return r=new fi({props:{class:"title",$$slots:{default:[IG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),l&&l.c(),i=j(),O(r.$$.fragment)},m(o,a){N(e,o,a),A(o,n,a),l&&l.m(o,a),A(o,i,a),N(r,o,a),s=!0},p(o,a){const u={};a&8321&&(u.$$scope={dirty:a,ctx:o}),e.$set(u),o[3]?l?(l.p(o,a),a&8&&_(l,1)):(l=qw(o),l.c(),_(l,1),l.m(i.parentNode,i)):l&&(x(),y(l,1,1,()=>{l=null}),V());const c={};a&8259&&(c.$$scope={dirty:a,ctx:o}),r.$set(c)},i(o){s||(_(e.$$.fragment,o),_(l),_(r.$$.fragment,o),s=!0)},o(o){y(e.$$.fragment,o),y(l),y(r.$$.fragment,o),s=!1},d(o){o&&(T(n),T(i)),L(e,o),l&&l.d(o),L(r,o)}}}function MG(t){let e,n;return e=new Da({props:{"aria-rowindex":t[5].indexOf(t[0]),$$slots:{default:[DG]},$$scope:{ctx:t}}}),e.$on("change",t[11]),e.$on("click",t[12]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&33&&(s["aria-rowindex"]=i[5].indexOf(i[0])),r&8415&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function RG(t,e,n){let i,r,s;B(t,nl,g=>n(5,i=g)),B(t,Yt,g=>n(6,r=g)),B(t,is,g=>n(7,s=g));let{entry:l}=e,{content:o}=e,{locale:a}=e,{viewType:u}=e,{firstImageField:c}=e,f;const d=g=>{is.update(v=>{const b=v.indexOf(l);return g&&b===-1&&v.push(l),!g&&b>-1&&v.splice(b,1),v})},h=({detail:{checked:g}})=>{d(g)},m=g=>{d(g.detail.selected)},p=()=>{pn(`/collections/${r?.name}/entries/${l.slug}`)};return t.$$set=g=>{"entry"in g&&n(0,l=g.entry),"content"in g&&n(9,o=g.content),"locale"in g&&n(1,a=g.locale),"viewType"in g&&n(2,u=g.viewType),"firstImageField"in g&&n(3,c=g.firstImageField)},t.$$.update=()=>{t.$$.dirty&521&&(async()=>n(4,f=o&&c?await Ws(o[c.name],l,{thumbnail:!0}):void 0))()},[l,a,u,c,f,i,r,s,d,o,h,m,p]}class $G extends ie{constructor(e){super(),ne(this,e,RG,MG,te,{entry:0,content:9,locale:1,viewType:2,firstImageField:3})}}function Vw(t,e,n){const i=t.slice();return i[9]=e[n].name,i[10]=e[n].entries,i}function Ww(t,e,n){const i=t.slice();i[13]=e[n];const r=i[13];i[14]=r.locales;const s=i[8]in i[14]?i[8]:Object.keys(i[14])[0];i[15]=s;const l=i[14][i[15]];return i[16]=l.content,i}function FG(t){const e=t.slice(),n=e[0]._i18n;return e[8]=n.defaultLocale,e}function zG(t){let e,n;return e=new qn({props:{$$slots:{default:[BG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&524304&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function jG(t){let e,n,i,r;const s=[HG,qG,UG],l=[];function o(u,c){return u[3].length?0:u[6].length?1:2}function a(u,c){return c===0?FG(u):u}return e=o(t),n=l[e]=s[e](a(t,e)),{c(){n.c(),i=Q()},m(u,c){l[e].m(u,c),A(u,i,c),r=!0},p(u,c){let f=e;e=o(u),e===f?l[e].p(a(u,e),c):(x(),y(l[f],1,1,()=>{l[f]=null}),V(),n=l[e],n?n.p(a(u,e),c):(n=l[e]=s[e](a(u,e)),n.c()),_(n,1),n.m(i.parentNode,i))},i(u){r||(_(n),r=!0)},o(u){y(n),r=!1},d(u){u&&T(i),l[e].d(u)}}}function BG(t){let e,n=t[4]("collection_not_found")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&16&&n!==(n=r[4]("collection_not_found")+"")&&X(i,n)},d(r){r&&T(e)}}}function UG(t){let e,n;return e=new qn({props:{$$slots:{default:[VG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&524305&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qG(t){let e,n;return e=new qn({props:{$$slots:{default:[WG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&524304&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function HG(t){let e,n;return e=new ou({props:{viewType:t[5].type,id:"entry-list","aria-label":t[4]("entries"),"aria-rowcount":t[6].length,$$slots:{default:[GG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s.viewType=i[5].type),r&16&&(s["aria-label"]=i[4]("entries")),r&64&&(s["aria-rowcount"]=i[6].length),r&524327&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function xG(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"edit"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function VG(t){let e,n=t[4]("no_entries_created")+"",i,r,s,l;return s=new et({props:{variant:"primary",disabled:!t[0].create,label:t[4]("create_new_entry"),$$slots:{"start-icon":[xG]},$$scope:{ctx:t}}}),s.$on("click",t[7]),{c(){e=F("span"),i=G(n),r=j(),O(s.$$.fragment),C(e,"role","none")},m(o,a){A(o,e,a),$(e,i),A(o,r,a),N(s,o,a),l=!0},p(o,a){(!l||a&16)&&n!==(n=o[4]("no_entries_created")+"")&&X(i,n);const u={};a&1&&(u.disabled=!o[0].create),a&16&&(u.label=o[4]("create_new_entry")),a&524288&&(u.$$scope={dirty:a,ctx:o}),s.$set(u)},i(o){l||(_(s.$$.fragment,o),l=!0)},o(o){y(s.$$.fragment,o),l=!1},d(o){o&&(T(e),T(r)),L(s,o)}}}function WG(t){let e,n=t[4]("no_entries_found")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&16&&n!==(n=r[4]("no_entries_found")+"")&&X(i,n)},d(r){r&&T(e)}}}function Yw(t){let e,n;return e=new $G({props:{entry:t[13],content:t[16],locale:t[15],viewType:t[5].type,firstImageField:t[2]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.entry=i[13]),r&3&&(s.content=i[16]),r&3&&(s.locale=i[15]),r&32&&(s.viewType=i[5].type),r&4&&(s.firstImageField=i[2]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Gw(t,e){let n,i,r,s=e[16]&&Yw(e);return{key:t,first:null,c(){n=Q(),s&&s.c(),i=Q(),this.first=n},m(l,o){A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){e=l,e[16]?s?(s.p(e,o),o&3&&_(s,1)):(s=Yw(e),s.c(),_(s,1),s.m(i.parentNode,i)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(n),T(i)),s&&s.d(l)}}}function YG(t){let e=[],n=new Map,i,r,s=be(t[10]);const l=o=>o[13].slug;for(let o=0;o<s.length;o+=1){let a=Ww(t,s,o),u=l(a);n.set(u,e[o]=Gw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=j()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&39&&(s=be(o[10]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Gw,i,Ww),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Kw(t,e){let n,i,r;return i=new M2({props:{label:e[9]!=="*"?e[9]:void 0,$$slots:{default:[YG]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&2&&(o.label=e[9]!=="*"?e[9]:void 0),l&524327&&(o.$$scope={dirty:l,ctx:e}),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function GG(t){let e=[],n=new Map,i,r,s=be(t[1]);const l=o=>o[9];for(let o=0;o<s.length;o+=1){let a=Vw(t,s,o),u=l(a);n.set(u,e[o]=Kw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&39&&(s=be(o[1]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Kw,i,Vw),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function KG(t){let e,n,i,r;const s=[jG,zG],l=[];function o(a,u){return a[0]?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function ZG(t){let e,n;return e=new pg({props:{"aria-label":t[0]?.files?t[4]("file_list"):t[4]("entry_list"),$$slots:{default:[KG]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&17&&(s["aria-label"]=i[0]?.files?i[4]("file_list"):i[4]("entry_list")),r&524415&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function JG(t,e,n){let i,r,s,l,o,a,u;B(t,Yt,f=>n(0,s=f)),B(t,dT,f=>n(1,l=f)),B(t,ue,f=>n(4,o=f)),B(t,hi,f=>n(5,a=f)),B(t,nl,f=>n(6,u=f));const c=()=>{pn(`/collections/${s?.name}/new`)};return t.$$.update=()=>{t.$$.dirty&2&&n(3,i=l.map(({entries:f})=>f).flat(1)),t.$$.dirty&1&&n(2,r=s?.fields?.find(({widget:f})=>f==="image"))},[s,l,r,i,o,a,u,c]}class Zw extends ie{constructor(e){super(),ne(this,e,JG,ZG,te,{})}}function Jw(t,e,n){const i=t.slice();return i[3]=e[n].name,i[4]=e[n].label,i}function XG(t){let e,n;return e=new qn({props:{$$slots:{default:[eK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&129&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function QG(t){let e,n;return e=new ou({props:{viewType:"list","aria-label":t[0]("files"),"aria-rowcount":t[1].files.length,$$slots:{default:[iK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s["aria-label"]=i[0]("files")),r&2&&(s["aria-rowcount"]=i[1].files.length),r&130&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function eK(t){let e,n=t[0]("no_files_in_collection")+"",i;return{c(){e=F("span"),i=G(n),C(e,"role","none")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&1&&n!==(n=r[0]("no_files_in_collection")+"")&&X(i,n)},d(r){r&&T(e)}}}function tK(t){let e=t[4]+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&2&&e!==(e=i[4]+"")&&X(n,e)},d(i){i&&T(n)}}}function nK(t){let e,n,i;return e=new fi({props:{class:"title",$$slots:{default:[tK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j()},m(r,s){N(e,r,s),A(r,n,s),i=!0},p(r,s){const l={};s&130&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(r){i||(_(e.$$.fragment,r),i=!0)},o(r){y(e.$$.fragment,r),i=!1},d(r){r&&T(n),L(e,r)}}}function Xw(t,e){let n,i,r;function s(){return e[2](e[3])}return i=new Da({props:{$$slots:{default:[nK]},$$scope:{ctx:e}}}),i.$on("click",s),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(l,o){A(l,n,o),N(i,l,o),r=!0},p(l,o){e=l;const a={};o&130&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(l){r||(_(i.$$.fragment,l),r=!0)},o(l){y(i.$$.fragment,l),r=!1},d(l){l&&T(n),L(i,l)}}}function iK(t){let e=[],n=new Map,i,r,s=be(t[1].files);const l=o=>o[3];for(let o=0;o<s.length;o+=1){let a=Jw(t,s,o),u=l(a);n.set(u,e[o]=Xw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&2&&(s=be(o[1].files),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Xw,i,Jw),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function rK(t){let e,n,i,r;const s=[QG,XG],l=[];function o(a,u){return a[1]?.files?.length?0:1}return e=o(t),n=l[e]=s[e](t),{c(){n.c(),i=Q()},m(a,u){l[e].m(a,u),A(a,i,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(x(),y(l[c],1,1,()=>{l[c]=null}),V(),n=l[e],n?n.p(a,u):(n=l[e]=s[e](a),n.c()),_(n,1),n.m(i.parentNode,i))},i(a){r||(_(n),r=!0)},o(a){y(n),r=!1},d(a){a&&T(i),l[e].d(a)}}}function sK(t){let e,n;return e=new pg({props:{"aria-label":t[0]("file_list"),$$slots:{default:[rK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s["aria-label"]=i[0]("file_list")),r&131&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function lK(t,e,n){let i,r;return B(t,ue,l=>n(0,i=l)),B(t,Yt,l=>n(1,r=l)),[i,r,l=>{pn(`/collections/${r?.name}/entries/${l}`)}]}class Qw extends ie{constructor(e){super(),ne(this,e,lK,sK,te,{})}}function ek(t,e,n){const i=t.slice();return i[5]=e[n].name,i[6]=e[n].label,i[7]=e[n].icon,i[8]=e[n].hide!==void 0?e[n].hide:!1,i}function tk(t){let e,n;function i(){return t[4](t[5])}return e=new mi({props:{label:t[6]||t[5],selected:t[2]?.name===t[5],$$slots:{"start-icon":[oK]},$$scope:{ctx:t}}}),e.$on("select",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&1&&(l.label=t[6]||t[5]),s&5&&(l.selected=t[2]?.name===t[5]),s&2049&&(l.$$scope={dirty:s,ctx:t}),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function oK(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[7]||"edit_note"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.name=i[7]||"edit_note"),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function nk(t,e){let n,i,r,s=!e[8]&&tk(e);return{key:t,first:null,c(){n=Q(),s&&s.c(),i=Q(),this.first=n},m(l,o){A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){e=l,e[8]?s&&(x(),y(s,1,1,()=>{s=null}),V()):s?(s.p(e,o),o&1&&_(s,1)):(s=tk(e),s.c(),_(s,1),s.m(i.parentNode,i))},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(n),T(i)),s&&s.d(l)}}}function aK(t){let e=[],n=new Map,i,r,s=be(t[0]);const l=o=>o[5];for(let o=0;o<s.length;o+=1){let a=ek(t,s,o),u=l(a);n.set(u,e[o]=nk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&5&&(s=be(o[0]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,nk,i,ek),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function uK(t){let e,n,i;return n=new Ma({props:{"aria-label":t[1]("collections"),"aria-controls":"collection-container",$$slots:{default:[aK]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","primary-sidebar")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&2&&(l["aria-label"]=r[1]("collections")),s&2053&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function cK(t,e,n){let i,r,s,l;B(t,wt,a=>n(3,r=a)),B(t,ue,a=>n(1,s=a)),B(t,Yt,a=>n(2,l=a));const o=a=>{pn(`/collections/${a}`)};return t.$$.update=()=>{t.$$.dirty&8&&n(0,i=r?.collections.filter(({hide:a})=>!a)??[])},[i,s,l,r,o]}class fK extends ie{constructor(e){super(),ne(this,e,cK,uK,te,{})}}function dK(t){let e=t[3](t[2].length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:t[1].length}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&14&&e!==(e=i[3](i[2].length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:i[1].length}})+"")&&X(n,e)},d(i){i&&T(n)}}}function hK(t){let e=t[3](t[2].length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&12&&e!==(e=i[3](i[2].length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")+"")&&X(n,e)},d(i){i&&T(n)}}}function pK(t){let e=t[3](t[2].length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&12&&e!==(e=i[3](i[2].length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")+"")&&X(n,e)},d(i){i&&T(n)}}}function mK(t){let e;function n(s,l){return s[1].length===1?pK:s[1].length===s[4].length?hK:dK}let i=n(t),r=i(t);return{c(){r.c(),e=Q()},m(s,l){r.m(s,l),A(s,e,l)},p(s,l){i===(i=n(s))&&r?r.p(s,l):(r.d(1),r=i(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&T(e),r.d(s)}}}function gK(t){let e,n,i;function r(l){t[6](l)}let s={title:t[1].length===1?t[3]("delete_entry"):t[3]("delete_entries"),okLabel:t[3]("delete"),$$slots:{default:[mK]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Ia({props:s}),ae.push(()=>Re(e,"open",r)),e.$on("ok",t[7]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&10&&(a.title=l[1].length===1?l[3]("delete_entry"):l[3]("delete_entries")),o&8&&(a.okLabel=l[3]("delete")),o&286&&(a.$$scope={dirty:o,ctx:l}),!n&&o&1&&(n=!0,a.open=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function _K(t,e,n){let i,r,s,l,o;B(t,is,f=>n(1,r=f)),B(t,Yt,f=>n(5,s=f)),B(t,ue,f=>n(3,l=f)),B(t,nl,f=>n(4,o=f));let{open:a=!1}=e;function u(f){a=f,n(0,a)}const c=()=>{jE(r.map(({id:f})=>f),i.map(({path:f})=>f))};return t.$$set=f=>{"open"in f&&n(0,a=f.open)},t.$$.update=()=>{t.$$.dirty&34&&n(2,i=r.length&&s?._assetFolder?.entryRelative?r.map(f=>D3(f,{relative:!0})).flat(1):[])},[a,r,i,l,o,s,u,c]}class bK extends ie{constructor(e){super(),ne(this,e,_K,gK,te,{open:0})}}function vK(t){ye(t,"svelte-1bsy0ix","h2.svelte-1bsy0ix{flex:none !important}.description.svelte-1bsy0ix{flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}")}function ik(t){let e,n;return e=new qr({props:{variant:"primary","aria-label":t[8]("collection"),$$slots:{default:[wK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&256&&(s["aria-label"]=i[8]("collection")),r&17405&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function rk(t){let e,n,i,r;return e=new et({props:{variant:"ghost",label:t[8]("delete"),"aria-label":t[9].length===1?t[8]("delete_selected_entry"):t[8]("delete_selected_entries"),disabled:!t[9].length||!t[4]}}),e.$on("click",t[11]),i=new et({props:{variant:"primary",disabled:!t[5],label:t[8]("create"),"aria-label":t[8]("create_new_entry"),keyShortcuts:"Accel+E",$$slots:{"start-icon":[yK]},$$scope:{ctx:t}}}),i.$on("click",t[12]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(s,l){N(e,s,l),A(s,n,l),N(i,s,l),r=!0},p(s,l){const o={};l&256&&(o.label=s[8]("delete")),l&768&&(o["aria-label"]=s[9].length===1?s[8]("delete_selected_entry"):s[8]("delete_selected_entries")),l&528&&(o.disabled=!s[9].length||!s[4]),e.$set(o);const a={};l&32&&(a.disabled=!s[5]),l&256&&(a.label=s[8]("create")),l&256&&(a["aria-label"]=s[8]("create_new_entry")),l&16384&&(a.$$scope={dirty:l,ctx:s}),i.$set(a)},i(s){r||(_(e.$$.fragment,s),_(i.$$.fragment,s),r=!0)},o(s){y(e.$$.fragment,s),y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(e,s),L(i,s)}}}function yK(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"edit"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function wK(t){let e,n,i,r,s=(t[7]||"")+"",l,o,a,u,c,f;a=new In({props:{flex:!0}});let d=!t[6]&&rk(t);return{c(){e=F("h2"),n=G(t[3]),i=j(),r=F("div"),l=G(s),o=j(),O(a.$$.fragment),u=j(),d&&d.c(),c=Q(),C(e,"role","none"),C(e,"class","svelte-1bsy0ix"),C(r,"role","none"),C(r,"class","description svelte-1bsy0ix")},m(h,m){A(h,e,m),$(e,n),A(h,i,m),A(h,r,m),$(r,l),A(h,o,m),N(a,h,m),A(h,u,m),d&&d.m(h,m),A(h,c,m),f=!0},p(h,m){(!f||m&8)&&X(n,h[3]),(!f||m&128)&&s!==(s=(h[7]||"")+"")&&X(l,s),h[6]?d&&(x(),y(d,1,1,()=>{d=null}),V()):d?(d.p(h,m),m&64&&_(d,1)):(d=rk(h),d.c(),_(d,1),d.m(c.parentNode,c))},i(h){f||(_(a.$$.fragment,h),_(d),f=!0)},o(h){y(a.$$.fragment,h),y(d),f=!1},d(h){h&&(T(e),T(i),T(r),T(o),T(u),T(c)),L(a,h),d&&d.d(h)}}}function kK(t){let e,n,i,r,s=t[1]&&ik(t);function l(a){t[13](a)}let o={};return t[2]!==void 0&&(o.open=t[2]),n=new bK({props:o}),ae.push(()=>Re(n,"open",l)),{c(){s&&s.c(),e=j(),O(n.$$.fragment)},m(a,u){s&&s.m(a,u),A(a,e,u),N(n,a,u),r=!0},p(a,[u]){a[1]?s?(s.p(a,u),u&2&&_(s,1)):(s=ik(a),s.c(),_(s,1),s.m(e.parentNode,e)):s&&(x(),y(s,1,1,()=>{s=null}),V());const c={};!i&&u&4&&(i=!0,c.open=a[2],$e(()=>i=!1)),n.$set(c)},i(a){r||(_(s),_(n.$$.fragment,a),r=!0)},o(a){y(s),y(n.$$.fragment,a),r=!1},d(a){a&&T(e),s&&s.d(a),L(n,a)}}}function SK(t,e,n){let i,r,s,l,o,a,u,c,f,d;B(t,Yt,v=>n(1,c=v)),B(t,ue,v=>n(8,f=v)),B(t,is,v=>n(9,d=v));let h=!1;const m=()=>{n(2,h=!0)},p=()=>{pn(`/collections/${i}/new`)};function g(v){h=v,n(2,h)}return t.$$.update=()=>{t.$$.dirty&2&&n(0,{name:i,label:r,description:s,files:l,create:o=!1,delete:a=!0}=c??{},i,(n(10,r),n(1,c)),(n(7,s),n(1,c)),(n(6,l),n(1,c)),(n(5,o),n(1,c)),(n(4,a),n(1,c))),t.$$.dirty&1025&&n(3,u=r||i)},[i,c,h,u,a,o,l,s,f,d,r,m,p,g]}class EK extends ie{constructor(e){super(),ne(this,e,SK,kK,te,{},vK)}}function sk(t){let e,n;return e=new Tn({props:{id:"collection-assets",class:"secondary-sidebar",hidden:!t[2].showMedia,"aria-label":t[3]("collection_assets"),$$slots:{default:[AK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&4&&(s.hidden=!i[2].showMedia),r&8&&(s["aria-label"]=i[3]("collection_assets")),r&2099&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TK(t){let e,n;return e=new gg({props:{assets:t[5].filter(t[8])}}),e.$on("select",t[9]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&34&&(s.assets=i[5].filter(i[8])),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function AK(t){let e,n;return e=new lu({props:{disabled:t[0],multiple:!0,$$slots:{default:[TK]},$$scope:{ctx:t}}}),e.$on("select",t[10]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.disabled=i[0]),r&2082&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function CK(t){let e,n,i=t[1]&&sk(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[1]?i?(i.p(r,s),s&2&&_(i,1)):(i=sk(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function NK(t,e,n){let i,r,s,l,o,a,u,c;B(t,Yt,m=>n(7,l=m)),B(t,hi,m=>n(2,o=m)),B(t,ue,m=>n(3,a=m)),B(t,Ai,m=>n(4,u=m)),B(t,wn,m=>n(5,c=m));const f=({folder:m})=>i===m,d=({detail:{asset:m}})=>{pn(`/assets/${m.path}`)},h=({detail:{files:m}})=>{ze(Ai,u={folder:i,files:m},u)};return t.$$.update=()=>{t.$$.dirty&128&&n(1,{internalPath:i,entryRelative:r}=l?._assetFolder??{},i,(n(6,r),n(7,l))),t.$$.dirty&64&&n(0,s=!!r)},[s,i,o,a,u,c,r,l,f,d,h]}class LK extends ie{constructor(e){super(),ne(this,e,NK,CK,te,{})}}function lk(t,e,n){const i=t.slice();return i[10]=e[n].label,i[11]=e[n].field,i[12]=e[n].pattern,i}function OK(t){let e,n;return e=new xe({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ok(t){let e,n;function i(){return t[9](t[11],t[12])}return e=new Ra({props:{label:t[10],checked:t[6].group?.field===t[11]&&t[6].group?.pattern===t[12]}}),e.$on("select",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&16&&(l.label=t[10]),s&80&&(l.checked=t[6].group?.field===t[11]&&t[6].group?.pattern===t[12]),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function PK(t){let e,n,i,r;e=new Ra({props:{label:t[3]||t[5]("sort_keys.none"),checked:!t[6].group}}),e.$on("select",t[8]);let s=be(t[4]),l=[];for(let a=0;a<s.length;a+=1)l[a]=ok(lk(t,s,a));const o=a=>y(l[a],1,1,()=>{l[a]=null});return{c(){O(e.$$.fragment),n=j();for(let a=0;a<l.length;a+=1)l[a].c();i=Q()},m(a,u){N(e,a,u),A(a,n,u);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(a,u);A(a,i,u),r=!0},p(a,u){const c={};if(u&40&&(c.label=a[3]||a[5]("sort_keys.none")),u&64&&(c.checked=!a[6].group),e.$set(c),u&84){s=be(a[4]);let f;for(f=0;f<s.length;f+=1){const d=lk(a,s,f);l[f]?(l[f].p(d,u),_(l[f],1)):(l[f]=ok(d),l[f].c(),_(l[f],1),l[f].m(i.parentNode,i))}for(x(),f=s.length;f<l.length;f+=1)o(f);V()}},i(a){if(!r){_(e.$$.fragment,a);for(let u=0;u<s.length;u+=1)_(l[u]);r=!0}},o(a){y(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)y(l[u]);r=!1},d(a){a&&(T(n),T(i)),L(e,a),ni(l,a)}}}function IK(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[5]("grouping_options"),"aria-controls":t[7]["aria-controls"],$$slots:{default:[PK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s["aria-label"]=i[5]("grouping_options")),r&128&&(s["aria-controls"]=i[7]["aria-controls"]),r&32892&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function DK(t){let e,n;return e=new pi({props:{variant:"ghost",label:t[0]||t[5]("group"),disabled:t[1],$$slots:{popup:[IK],"end-icon":[OK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&33&&(s.label=i[0]||i[5]("group")),r&2&&(s.disabled=i[1]),r&33020&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function MK(t,e,n){const i=["label","disabled","currentView","noneLabel","groups"];let r=he(e,i),s,l,o=H,a=()=>(o(),o=Qn(f,g=>n(6,l=g)),f);B(t,ue,g=>n(5,s=g)),t.$$.on_destroy.push(()=>o());let{label:u=""}=e,{disabled:c=!1}=e,{currentView:f}=e;a();let{noneLabel:d=""}=e,{groups:h=[]}=e;const m=()=>{f.update(g=>({...g,group:void 0}))},p=(g,v)=>{f.update(b=>({...b,group:{field:g,pattern:v}}))};return t.$$set=g=>{e=Z(Z({},e),tt(g)),n(7,r=he(e,i)),"label"in g&&n(0,u=g.label),"disabled"in g&&n(1,c=g.disabled),"currentView"in g&&a(n(2,f=g.currentView)),"noneLabel"in g&&n(3,d=g.noneLabel),"groups"in g&&n(4,h=g.groups)},[u,c,f,d,h,s,l,r,m,p]}class RK extends ie{constructor(e){super(),ne(this,e,MK,DK,te,{label:0,disabled:1,currentView:2,noneLabel:3,groups:4})}}function ak(t){let e,n;return e=new qr({props:{variant:"secondary","aria-label":t[5]("entry_list"),$$slots:{default:[FK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s["aria-label"]=i[5]("entry_list")),r&33279&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function uk(t){let e,n;return e=new nT({props:{disabled:!t[1],currentView:hi,filters:t[0].view_filters,multiple:!0,"aria-controls":"entry-list"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.disabled=!i[1]),r&1&&(s.filters=i[0].view_filters),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ck(t){let e,n;return e=new RK({props:{disabled:!t[1],currentView:hi,groups:t[0].view_groups,"aria-controls":"entry-list"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.disabled=!i[1]),r&1&&(s.groups=i[0].view_groups),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function $K(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"photo_library"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function FK(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g;e=new et({props:{variant:"ghost",disabled:t[6].length===t[4].length,label:t[5]("select_all"),"aria-controls":"entry-list"}}),e.$on("click",t[12]),i=new et({props:{variant:"ghost",disabled:!t[6].length,label:t[5]("clear_selection"),"aria-controls":"entry-list"}}),i.$on("click",t[13]),s=new In({props:{flex:!0}}),o=new iT({props:{disabled:!t[1]||!t[7].length,currentView:hi,fields:t[7],"aria-controls":"entry-list"}});let v=t[0].view_filters?.length&&uk(t),b=t[0].view_groups?.length&&ck(t);return f=new mg({props:{disabled:!t[2]||!t[3],currentView:hi,"aria-controls":"entry-list"}}),h=new $n({props:{orientation:"vertical"}}),p=new et({props:{variant:"ghost",iconic:!0,disabled:!t[2]||!t[0]._assetFolder,pressed:!!t[8].showMedia,"aria-controls":"collection-assets","aria-expanded":t[8].showMedia,"aria-label":t[5](t[8].showMedia?"hide_assets":"show_assets"),$$slots:{"start-icon":[$K]},$$scope:{ctx:t}}}),p.$on("click",t[14]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),a=j(),v&&v.c(),u=j(),b&&b.c(),c=j(),O(f.$$.fragment),d=j(),O(h.$$.fragment),m=j(),O(p.$$.fragment)},m(w,k){N(e,w,k),A(w,n,k),N(i,w,k),A(w,r,k),N(s,w,k),A(w,l,k),N(o,w,k),A(w,a,k),v&&v.m(w,k),A(w,u,k),b&&b.m(w,k),A(w,c,k),N(f,w,k),A(w,d,k),N(h,w,k),A(w,m,k),N(p,w,k),g=!0},p(w,k){const S={};k&80&&(S.disabled=w[6].length===w[4].length),k&32&&(S.label=w[5]("select_all")),e.$set(S);const E={};k&64&&(E.disabled=!w[6].length),k&32&&(E.label=w[5]("clear_selection")),i.$set(E);const P={};k&130&&(P.disabled=!w[1]||!w[7].length),k&128&&(P.fields=w[7]),o.$set(P),w[0].view_filters?.length?v?(v.p(w,k),k&1&&_(v,1)):(v=uk(w),v.c(),_(v,1),v.m(u.parentNode,u)):v&&(x(),y(v,1,1,()=>{v=null}),V()),w[0].view_groups?.length?b?(b.p(w,k),k&1&&_(b,1)):(b=ck(w),b.c(),_(b,1),b.m(c.parentNode,c)):b&&(x(),y(b,1,1,()=>{b=null}),V());const M={};k&12&&(M.disabled=!w[2]||!w[3]),f.$set(M);const I={};k&5&&(I.disabled=!w[2]||!w[0]._assetFolder),k&256&&(I.pressed=!!w[8].showMedia),k&256&&(I["aria-expanded"]=w[8].showMedia),k&288&&(I["aria-label"]=w[5](w[8].showMedia?"hide_assets":"show_assets")),k&32768&&(I.$$scope={dirty:k,ctx:w}),p.$set(I)},i(w){g||(_(e.$$.fragment,w),_(i.$$.fragment,w),_(s.$$.fragment,w),_(o.$$.fragment,w),_(v),_(b),_(f.$$.fragment,w),_(h.$$.fragment,w),_(p.$$.fragment,w),g=!0)},o(w){y(e.$$.fragment,w),y(i.$$.fragment,w),y(s.$$.fragment,w),y(o.$$.fragment,w),y(v),y(b),y(f.$$.fragment,w),y(h.$$.fragment,w),y(p.$$.fragment,w),g=!1},d(w){w&&(T(n),T(r),T(l),T(a),T(u),T(c),T(d),T(m)),L(e,w),L(i,w),L(s,w),L(o,w),v&&v.d(w),b&&b.d(w),L(f,w),L(h,w),L(p,w)}}}function zK(t){let e,n,i=t[0]?.folder&&ak(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[0]?.folder?i?(i.p(r,s),s&1&&_(i,1)):(i=ak(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function jK(t,e,n){let i,r,s,l,o,a,u,c,f,d,h,m;B(t,nl,b=>n(10,a=b)),B(t,dT,b=>n(11,u=b)),B(t,Yt,b=>n(0,c=b)),B(t,ue,b=>n(5,f=b)),B(t,is,b=>n(6,d=b)),B(t,eG,b=>n(7,h=b)),B(t,hi,b=>n(8,m=b));const p=()=>{ze(is,d=r,d)},g=()=>{ze(is,d=[],d)},v=()=>{hi.update(b=>({...b,showMedia:!m.showMedia}))};return t.$$.update=()=>{t.$$.dirty&1&&n(9,{fields:i}=c??{},i),t.$$.dirty&2048&&n(4,r=u.map(({entries:b})=>b).flat(1)),t.$$.dirty&512&&n(3,s=i?.find(({widget:b})=>b==="image")),t.$$.dirty&1024&&n(2,l=!!a.length),t.$$.dirty&1024&&n(1,o=a.length>1)},[c,o,l,s,r,f,d,h,m,i,a,u,p,g,v]}class BK extends ie{constructor(e){super(),ne(this,e,jK,zK,te,{})}}function UK(t){let e,n;return e=new fK({props:{slot:"primary_sidebar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qK(t){let e,n;return e=new EK({props:{slot:"primary_toolbar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function HK(t){let e,n;return e=new BK({props:{slot:"secondary_toolbar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function xK(t){let e,n,i;var r=t[0]?.files?Qw:Zw;function s(l,o){return{props:{slot:"main_content"}}}return r&&(e=an(r,s())),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o&1&&r!==(r=l[0]?.files?Qw:Zw)){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s()),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function VK(t){let e,n;return e=new LK({props:{slot:"secondary_sidebar"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function WK(t){let e,n;return e=new rT({props:{$$slots:{secondary_sidebar:[VK],main_content:[xK],secondary_toolbar:[HK],primary_toolbar:[qK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1025&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function YK(t){let e,n;return e=new Tn({props:{slot:"main",id:"collection-container",class:"main","aria-label":t[1]("x_collection",{values:{collection:t[0]?.label||t[0]?.name}}),"aria-description":t[0]?.description,$$slots:{default:[WK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&3&&(s["aria-label"]=i[1]("x_collection",{values:{collection:i[0]?.label||i[0]?.name}})),r&1&&(s["aria-description"]=i[0]?.description),r&1025&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function fk(t){let e,n;return e=new LG({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function GK(t){let e=t[1](t[3].published?"entry_saved_and_published":"entry_saved")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&10&&e!==(e=i[1](i[3].published?"entry_saved_and_published":"entry_saved")+"")&&X(n,e)},d(i){i&&T(n)}}}function KK(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[GK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1034&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ZK(t){let e=t[1](t[3].count===1?"entry_deleted":"entries_deleted",{values:{count:t[3].count}})+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&10&&e!==(e=i[1](i[3].count===1?"entry_deleted":"entries_deleted",{values:{count:i[3].count}})+"")&&X(n,e)},d(i){i&&T(n)}}}function JK(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[ZK]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1034&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function XK(t){let e,n,i,r,s,l,o,a,u,c,f;e=new au({props:{class:"content","aria-label":t[1]("content_library"),$$slots:{main:[YK],primary_sidebar:[UK]},$$scope:{ctx:t}}});let d=t[2]&&fk();function h(v){t[6](v)}let m={$$slots:{default:[KK]},$$scope:{ctx:t}};t[3].saved!==void 0&&(m.show=t[3].saved),r=new Si({props:m}),ae.push(()=>Re(r,"show",h));function p(v){t[7](v)}let g={$$slots:{default:[JK]},$$scope:{ctx:t}};return t[3].deleted!==void 0&&(g.show=t[3].deleted),o=new Si({props:g}),ae.push(()=>Re(o,"show",p)),{c(){O(e.$$.fragment),n=j(),d&&d.c(),i=j(),O(r.$$.fragment),l=j(),O(o.$$.fragment)},m(v,b){N(e,v,b),A(v,n,b),d&&d.m(v,b),A(v,i,b),N(r,v,b),A(v,l,b),N(o,v,b),u=!0,c||(f=Fe(window,"hashchange",t[5]),c=!0)},p(v,[b]){const w={};b&2&&(w["aria-label"]=v[1]("content_library")),b&1027&&(w.$$scope={dirty:b,ctx:v}),e.$set(w),v[2]?d?b&4&&_(d,1):(d=fk(),d.c(),_(d,1),d.m(i.parentNode,i)):d&&(x(),y(d,1,1,()=>{d=null}),V());const k={};b&1034&&(k.$$scope={dirty:b,ctx:v}),!s&&b&8&&(s=!0,k.show=v[3].saved,$e(()=>s=!1)),r.$set(k);const S={};b&1034&&(S.$$scope={dirty:b,ctx:v}),!a&&b&8&&(a=!0,S.show=v[3].deleted,$e(()=>a=!1)),o.$set(S)},i(v){u||(_(e.$$.fragment,v),_(d),_(r.$$.fragment,v),_(o.$$.fragment,v),u=!0)},o(v){y(e.$$.fragment,v),y(d),y(r.$$.fragment,v),y(o.$$.fragment,v),u=!1},d(v){v&&(T(n),T(i),T(l)),L(e,v),d&&d.d(v),L(r,v),L(o,v),c=!1,f()}}}function QK(t,e,n){let i,r,s,l,o,a;B(t,Yt,h=>n(0,i=h)),B(t,ue,h=>n(1,r=h)),B(t,Gn,h=>n(8,s=h)),B(t,nl,h=>n(9,l=h)),B(t,at,h=>n(2,o=h)),B(t,Qo,h=>n(3,a=h));const u=()=>{const{path:h,params:m}=ru(),p=h.match(/^\/collections\/([^/]+)(?:\/(new|entries))?(?:\/(.+?))?$/);if(!p)return;const[,g,v,b]=p,w=g?Mi(g):void 0;if(w&&!w.hide&&i!==w&&ze(Yt,i=w,i),ze(at,o=null,o),!i){ze(Gn,s=r("collection_not_found"),s);return}const{name:k,label:S,create:E,_fileMap:P,_i18n:M}=i,I=S||k;if(!v){const D=l.length;ze(Gn,s=r(D>1?"viewing_x_collection_many_entries":D===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:I,count:D}}),s);return}if(P){if(v==="entries"&&b){const D=Rm(k,b),z=P[b];if(D)Pu(D);else if(z){const{locales:R}=z._i18n;Pu({collectionName:k,fileName:z.name,slug:z.name,locales:Object.fromEntries(R.map(U=>[U,{}]))})}ze(Gn,s=r("editing_x_collection_file",{values:{collection:I,file:z.label||z.name}}),s)}}else if(v==="new"&&!b&&E&&(Pu({collectionName:k},m),ze(Gn,s=r("creating_x_collection_entry",{values:{collection:I}}),s)),v==="entries"&&b){const D=l.find(({slug:z})=>z===b);if(D){const{defaultLocale:z}=M;Pu(D),ze(Gn,s=r("editing_x_collection_entry",{values:{collection:I,entry:Ta(i,D,z,{useTemplate:!1})}}),s)}}};Ut(()=>{u()});const c=()=>{u()};function f(h){t.$$.not_equal(a.saved,h)&&(a.saved=h,Qo.set(a))}function d(h){t.$$.not_equal(a.deleted,h)&&(a.deleted=h,Qo.set(a))}return[i,r,o,a,u,c,f,d]}class eZ extends ie{constructor(e){super(),ne(this,e,QK,XK,te,{})}}function tZ(t){let e,n=kn.sanitize(t[5]("prefs.languages.translator.description",{values:{service:t[3],homeHref:`href="${t[2]}"`,apiKeyHref:`href="${t[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",i;return{c(){e=new xc(!1),i=Q(),e.a=i},m(r,s){e.m(n,r,s),A(r,i,s)},p(r,s){s&46&&n!==(n=kn.sanitize(r[5]("prefs.languages.translator.description",{values:{service:r[3],homeHref:`href="${r[2]}"`,apiKeyHref:`href="${r[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(n)},d(r){r&&(T(i),e.d())}}}function nZ(t){let e,n,i;function r(l){t[10](l)}let s={title:t[5]("prefs.languages.translator.field_label",{values:{service:t[3]}}),showOk:!1,textboxAttrs:{spellcheck:!1,"aria-label":t[5]("api_key")},$$slots:{default:[tZ]},$$scope:{ctx:t}};return t[6]!==void 0&&(s.open=t[6]),e=new eL({props:s}),ae.push(()=>Re(e,"open",r)),e.$on("cancel",t[11]),e.$on("input",t[12]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&40&&(a.title=l[5]("prefs.languages.translator.field_label",{values:{service:l[3]}})),o&32&&(a.textboxAttrs={spellcheck:!1,"aria-label":l[5]("api_key")}),o&8238&&(a.$$scope={dirty:o,ctx:l}),!n&&o&64&&(n=!0,a.open=l[6],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function iZ(t,e,n){let i,r,s,l,o,a,u,c,f,d;B(t,zc,g=>n(9,a=g)),B(t,ue,g=>n(5,u=g)),B(t,ql,g=>n(6,c=g)),B(t,ea,g=>n(7,f=g)),B(t,Lt,g=>n(8,d=g));function h(g){c=g,ql.set(c)}const m=()=>{ze(ea,f=void 0,f)},p=g=>{const v=g.target.value.trim();o&&v.match(o)&&(ze(Lt,d.apiKeys??={},d),ze(Lt,d.apiKeys[i]=v,d),ze(ql,c=!1,c),f&&(HE(...f),ze(ea,f=void 0,f)))};return t.$$.update=()=>{t.$$.dirty&512&&n(4,{serviceId:i,serviceLabel:r,developerURL:s,apiKeyURL:l,apiKeyPattern:o}=a??{},i,(n(3,r),n(9,a)),(n(2,s),n(9,a)),(n(1,l),n(9,a)),(n(0,o),n(9,a)))},[o,l,s,r,i,u,c,f,d,a,h,m,p]}class rZ extends ie{constructor(e){super(),ne(this,e,iZ,nZ,te,{})}}function dk(t){let e,n,i,r,s;e=new Pt({props:{label:t[4]("publish_changes"),disabled:!t[2]}}),e.$on("click",t[13]);function l(a){t[14](a)}let o={$$slots:{default:[lZ]},$$scope:{ctx:t}};return t[1]!==void 0&&(o.show=t[1]),i=new Si({props:o}),ae.push(()=>Re(i,"show",l)),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment)},m(a,u){N(e,a,u),A(a,n,u),N(i,a,u),s=!0},p(a,u){const c={};u&16&&(c.label=a[4]("publish_changes")),u&4&&(c.disabled=!a[2]),e.$set(c);const f={};u&32785&&(f.$$scope={dirty:u,ctx:a}),!r&&u&2&&(r=!0,f.show=a[1],$e(()=>r=!1)),i.$set(f)},i(a){s||(_(e.$$.fragment,a),_(i.$$.fragment,a),s=!0)},o(a){y(e.$$.fragment,a),y(i.$$.fragment,a),s=!1},d(a){a&&T(n),L(e,a),L(i,a)}}}function sZ(t){let e=t[4](t[0]==="error"?"publishing_changes_failed":"publishing_changes")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&17&&e!==(e=i[4](i[0]==="error"?"publishing_changes_failed":"publishing_changes")+"")&&X(n,e)},d(i){i&&T(n)}}}function lZ(t){let e,n;return e=new Ii({props:{status:t[0],$$slots:{default:[sZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.status=i[0]),r&32785&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oZ(t){let e,n,i=t[3]&&dk(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[3]?i?(i.p(r,s),s&8&&_(i,1)):(i=dk(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function aZ(t,e,n){let i,r,s,l,o,a,u,c,f,d;B(t,Wr,b=>n(9,a=b)),B(t,ti,b=>n(10,u=b)),B(t,Lt,b=>n(11,c=b)),B(t,wt,b=>n(12,f=b)),B(t,ue,b=>n(4,d=b));let h="info",m=!1;const p=async()=>{n(0,h="info"),n(1,m=!0);try{const{ok:b,status:w}=r?await fetch(r,{method:"POST",mode:"no-cors"}):await s?.()??{};if(!b&&w!==0)throw new Error(`Webhook returned ${w} error`)}catch(b){n(0,h="error"),n(1,m=!0),console.error(b)}},g=()=>p();function v(b){m=b,n(1,m)}return t.$$.update=()=>{t.$$.dirty&4096&&n(8,{backend:{automatic_deployments:i=void 0}={}}=f??{},i),t.$$.dirty&2048&&n(7,{deployHookURL:r}=c,r),t.$$.dirty&1024&&n(6,{triggerDeployment:s}=u??{},s),t.$$.dirty&768&&n(3,l=a!=="local"&&typeof i=="boolean"),t.$$.dirty&192&&n(2,o=!!r||typeof s=="function")},[h,m,o,l,d,p,s,r,i,a,u,c,f,g,v]}class uZ extends ie{constructor(e){super(),ne(this,e,aZ,oZ,te,{})}}function cZ(t){ye(t,"svelte-h10dbf",".wrapper.svelte-h10dbf{display:contents}.wrapper.svelte-h10dbf .table-row{display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color)}.wrapper.svelte-h10dbf .table-row:last-child{border-bottom:1px solid var(--sui-secondary-border-color)}.wrapper.svelte-h10dbf .table-row .feature{flex:auto}.wrapper.svelte-h10dbf .table-row .keys{display:flex;gap:8px}kbd.svelte-h10dbf{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height)}")}function hk(t,e,n){const i=t.slice();return i[6]=e[n].feature,i[7]=e[n].keys,i}function pk(t,e,n){const i=t.slice();return i[10]=e[n],i}function fZ(t){let e=t[2](`keyboard_shortcuts.${t[6]}`)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&4&&e!==(e=i[2](`keyboard_shortcuts.${i[6]}`)+"")&&X(n,e)},d(i){i&&T(n)}}}function mk(t){let e,n=t[10].replace("Accel",t[1])+"",i;return{c(){e=F("kbd"),i=G(n),C(e,"class","svelte-h10dbf")},m(r,s){A(r,e,s),$(e,i)},p(r,s){s&2&&n!==(n=r[10].replace("Accel",r[1])+"")&&X(i,n)},d(r){r&&T(e)}}}function dZ(t){let e,n=be(t[7].split("+")),i=[];for(let r=0;r<n.length;r+=1)i[r]=mk(pk(t,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();e=Q()},m(r,s){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(r,s);A(r,e,s)},p(r,s){if(s&10){n=be(r[7].split("+"));let l;for(l=0;l<n.length;l+=1){const o=pk(r,n,l);i[l]?i[l].p(o,s):(i[l]=mk(o),i[l].c(),i[l].m(e.parentNode,e))}for(;l<i.length;l+=1)i[l].d(1);i.length=n.length}},d(r){r&&T(e),ni(i,r)}}}function hZ(t){let e,n,i,r,s;return e=new pb({props:{class:"feature",$$slots:{default:[fZ]},$$scope:{ctx:t}}}),i=new pb({props:{class:"keys",$$slots:{default:[dZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j()},m(l,o){N(e,l,o),A(l,n,o),N(i,l,o),A(l,r,o),s=!0},p(l,o){const a={};o&8196&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const u={};o&8194&&(u.$$scope={dirty:o,ctx:l}),i.$set(u)},i(l){s||(_(e.$$.fragment,l),_(i.$$.fragment,l),s=!0)},o(l){y(e.$$.fragment,l),y(i.$$.fragment,l),s=!1},d(l){l&&(T(n),T(r)),L(e,l),L(i,l)}}}function gk(t,e){let n,i,r;return i=new UO({props:{$$slots:{default:[hZ]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&8198&&(o.$$scope={dirty:l,ctx:e}),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function pZ(t){let e=[],n=new Map,i,r,s=be(t[3]);const l=o=>o[7];for(let o=0;o<s.length;o+=1){let a=hk(t,s,o),u=l(a);n.set(u,e[o]=gk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&14&&(s=be(o[3]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,gk,i,hk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function mZ(t){let e,n,i;return n=new VO({props:{"aria-label":t[2]("help.keyboard_shortcuts"),$$slots:{default:[pZ]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-h10dbf")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,s){const l={};s&4&&(l["aria-label"]=r[2]("help.keyboard_shortcuts")),s&8198&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function gZ(t){let e,n,i;function r(l){t[4](l)}let s={title:t[2]("help.keyboard_shortcuts"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[mZ]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Br({props:s}),ae.push(()=>Re(e,"open",r)),e.$on("close",t[5]),{c(){O(e.$$.fragment)},m(l,o){N(e,l,o),i=!0},p(l,[o]){const a={};o&4&&(a.title=l[2]("help.keyboard_shortcuts")),o&8198&&(a.$$scope={dirty:o,ctx:l}),!n&&o&1&&(n=!0,a.open=l[0],$e(()=>n=!1)),e.$set(a)},i(l){i||(_(e.$$.fragment,l),i=!0)},o(l){y(e.$$.fragment,l),i=!1},d(l){L(e,l)}}}function _Z(t,e,n){let i;B(t,ue,u=>n(2,i=u));let{open:r=!1}=e;const s=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"}];let l="Ctrl";Ut(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&n(1,l="⌘")});function o(u){r=u,n(0,r)}function a(u){fe.call(this,t,u)}return t.$$set=u=>{"open"in u&&n(0,r=u.open)},[r,l,i,s,o,a]}class bZ extends ie{constructor(e){super(),ne(this,e,_Z,gZ,te,{open:0},cZ)}}function _k(t){let e,n,i=t[1]("prefs.advanced.deploy_hook.title")+"",r,s,l,o=t[1]("prefs.advanced.deploy_hook.description")+"",a,u,c,f,d,h;function m(g){t[5](g)}let p={flex:!0,label:t[1]("prefs.advanced.deploy_hook.field_label")};return t[2].deployHookURL!==void 0&&(p.value=t[2].deployHookURL),f=new Sn({props:p}),ae.push(()=>Re(f,"value",m)),f.$on("change",t[6]),{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("p"),a=G(o),u=j(),c=F("div"),O(f.$$.fragment),C(c,"role","none")},m(g,v){A(g,e,v),$(e,n),$(n,r),$(e,s),$(e,l),$(l,a),$(e,u),$(e,c),N(f,c,null),h=!0},p(g,v){(!h||v&2)&&i!==(i=g[1]("prefs.advanced.deploy_hook.title")+"")&&X(r,i),(!h||v&2)&&o!==(o=g[1]("prefs.advanced.deploy_hook.description")+"")&&X(a,o);const b={};v&2&&(b.label=g[1]("prefs.advanced.deploy_hook.field_label")),!d&&v&4&&(d=!0,b.value=g[2].deployHookURL,$e(()=>d=!1)),f.$set(b)},i(g){h||(_(f.$$.fragment,g),h=!0)},o(g){y(f.$$.fragment,g),h=!1},d(g){g&&T(e),L(f)}}}function vZ(t){let e,n,i,r=t[1]("prefs.advanced.developer_mode.title")+"",s,l,o,a=t[1]("prefs.advanced.developer_mode.description")+"",u,c,f,d,h,m,p=typeof t[0]=="boolean"&&_k(t);function g(b){t[7](b)}let v={label:t[1]("prefs.advanced.developer_mode.switch_label")};return t[2].devModeEnabled!==void 0&&(v.checked=t[2].devModeEnabled),d=new Zc({props:v}),ae.push(()=>Re(d,"checked",g)),{c(){p&&p.c(),e=j(),n=F("section"),i=F("h4"),s=G(r),l=j(),o=F("p"),u=G(a),c=j(),f=F("div"),O(d.$$.fragment),C(f,"role","none")},m(b,w){p&&p.m(b,w),A(b,e,w),A(b,n,w),$(n,i),$(i,s),$(n,l),$(n,o),$(o,u),$(n,c),$(n,f),N(d,f,null),m=!0},p(b,w){typeof b[0]=="boolean"?p?(p.p(b,w),w&1&&_(p,1)):(p=_k(b),p.c(),_(p,1),p.m(e.parentNode,e)):p&&(x(),y(p,1,1,()=>{p=null}),V()),(!m||w&2)&&r!==(r=b[1]("prefs.advanced.developer_mode.title")+"")&&X(s,r),(!m||w&2)&&a!==(a=b[1]("prefs.advanced.developer_mode.description")+"")&&X(u,a);const k={};w&2&&(k.label=b[1]("prefs.advanced.developer_mode.switch_label")),!h&&w&4&&(h=!0,k.checked=b[2].devModeEnabled,$e(()=>h=!1)),d.$set(k)},i(b){m||(_(p),_(d.$$.fragment,b),m=!0)},o(b){y(p),y(d.$$.fragment,b),m=!1},d(b){b&&(T(e),T(n)),p&&p.d(b),L(d)}}}function yZ(t){let e,n;return e=new Jc({props:{id:"prefs-tab-advanced",$$slots:{default:[vZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&263&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function wZ(t,e,n){let i,r,s,l;B(t,wt,f=>n(4,r=f)),B(t,ue,f=>n(1,s=f)),B(t,Lt,f=>n(2,l=f));const o=sn();function a(f){t.$$.not_equal(l.deployHookURL,f)&&(l.deployHookURL=f,Lt.set(l))}const u=()=>{o("change",{message:s(l.deployHookURL?"prefs.advanced.deploy_hook.url_saved":"prefs.advanced.deploy_hook.url_removed")})};function c(f){t.$$.not_equal(l.devModeEnabled,f)&&(l.devModeEnabled=f,Lt.set(l))}return t.$$.update=()=>{t.$$.dirty&16&&n(0,{backend:{automatic_deployments:i=void 0}={}}=r??{},i)},[i,s,l,o,r,a,u,c]}class kZ extends ie{constructor(e){super(),ne(this,e,wZ,yZ,te,{})}}function bk(t,e,n){const i=t.slice();return i[3]=e[n],i}function vk(t){let e,n;return e=new Gl({props:{variant:"tertiary",label:t[0](`prefs.theme.${t[3]}`),value:t[3],selected:!t[1].theme&&t[3]==="auto"||t[1].theme===t[3]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s.label=i[0](`prefs.theme.${i[3]}`)),r&2&&(s.selected=!i[1].theme&&i[3]==="auto"||i[1].theme===i[3]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function SZ(t){let e,n,i=be(["auto","dark","light"]),r=[];for(let l=0;l<3;l+=1)r[l]=vk(bk(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<3;l+=1)r[l].c();e=Q()},m(l,o){for(let a=0;a<3;a+=1)r[a]&&r[a].m(l,o);A(l,e,o),n=!0},p(l,o){if(o&3){i=be(["auto","dark","light"]);let a;for(a=0;a<3;a+=1){const u=bk(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=vk(u),r[a].c(),_(r[a],1),r[a].m(e.parentNode,e))}for(x(),a=3;a<3;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<3;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<3;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function EZ(t){let e,n,i=t[0]("prefs.appearance.theme")+"",r,s,l,o,a;return o=new Kc({props:{"aria-label":t[0]("prefs.appearance.select_theme"),$$slots:{default:[SZ]},$$scope:{ctx:t}}}),o.$on("change",t[2]),{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("div"),O(o.$$.fragment),C(l,"role","none")},m(u,c){A(u,e,c),$(e,n),$(n,r),$(e,s),$(e,l),N(o,l,null),a=!0},p(u,c){(!a||c&1)&&i!==(i=u[0]("prefs.appearance.theme")+"")&&X(r,i);const f={};c&1&&(f["aria-label"]=u[0]("prefs.appearance.select_theme")),c&67&&(f.$$scope={dirty:c,ctx:u}),o.$set(f)},i(u){a||(_(o.$$.fragment,u),a=!0)},o(u){y(o.$$.fragment,u),a=!1},d(u){u&&T(e),L(o)}}}function TZ(t){let e,n;return e=new Jc({props:{id:"prefs-tab-appearance",$$slots:{default:[EZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&67&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function AZ(t,e,n){let i,r;return B(t,ue,l=>n(0,i=l)),B(t,Lt,l=>n(1,r=l)),[i,r,l=>{ze(Lt,r={...r,theme:l.detail.value},r)}]}class CZ extends ie{constructor(e){super(),ne(this,e,AZ,TZ,te,{})}}function yk(t,e,n){const i=t.slice();i[9]=e[n][0],i[10]=e[n][1],i[14]=e,i[15]=n;const r=i[10];return i[11]=r.serviceLabel,i[12]=r.developerURL,i[13]=r.apiKeyURL,i}function wk(t,e,n){const i=t.slice();return i[16]=e[n],i}function kk(t){let e,n;return e=new mi({props:{label:di(t[16]),value:t[16],selected:t[16]===t[1]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8&&(s.label=di(i[16])),r&8&&(s.value=i[16]),r&10&&(s.selected=i[16]===i[1]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function NZ(t){let e,n,i=be(t[3]),r=[];for(let l=0;l<i.length;l+=1)r[l]=kk(wk(t,i,l));const s=l=>y(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=Q()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);A(l,e,o),n=!0},p(l,o){if(o&10){i=be(l[3]);let a;for(a=0;a<i.length;a+=1){const u=wk(l,i,a);r[a]?(r[a].p(u,o),_(r[a],1)):(r[a]=kk(u),r[a].c(),_(r[a],1),r[a].m(e.parentNode,e))}for(x(),a=i.length;a<r.length;a+=1)s(a);V()}},i(l){if(!n){for(let o=0;o<i.length;o+=1)_(r[o]);n=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)y(r[o]);n=!1},d(l){l&&T(e),ni(r,l)}}}function Sk(t){let e,n;return e=new Cp({props:{"aria-label":t[0]("prefs.languages.ui_language.select_language"),value:t[1]??void 0,$$slots:{default:[NZ]},$$scope:{ctx:t}}}),e.$on("change",t[6]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s["aria-label"]=i[0]("prefs.languages.ui_language.select_language")),r&2&&(s.value=i[1]??void 0),r&524298&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Ek(t){let e=[],n=new Map,i,r,s=be(Object.entries(M0));const l=o=>o[9];for(let o=0;o<s.length;o+=1){let a=yk(t,s,o),u=l(a);n.set(u,e[o]=Ak(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&37&&(s=be(Object.entries(M0)),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Ak,i,yk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Tk(t){let e,n,i;function r(o){t[7](o,t[9])}function s(){return t[8](t[9])}let l={flex:!0,spellcheck:"false","aria-label":t[0]("prefs.languages.translator.field_label",{values:{service:t[11]}})};return t[2].apiKeys[t[9]]!==void 0&&(l.value=t[2].apiKeys[t[9]]),e=new Sn({props:l}),ae.push(()=>Re(e,"value",r)),e.$on("change",s),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,a){t=o;const u={};a&1&&(u["aria-label"]=t[0]("prefs.languages.translator.field_label",{values:{service:t[11]}})),!n&&a&4&&(n=!0,u.value=t[2].apiKeys[t[9]],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function Ak(t,e){let n,i,r=e[0]("prefs.languages.translator.title",{values:{service:e[11]}})+"",s,l,o,a=kn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[11],homeHref:`href="${e[12]}"`,apiKeyHref:`href="${e[13]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",u,c,f,d,h=e[2].apiKeys&&Tk(e);return{key:t,first:null,c(){n=F("section"),i=F("h4"),s=G(r),l=j(),o=F("p"),u=j(),c=F("div"),h&&h.c(),f=j(),C(c,"role","none"),this.first=n},m(m,p){A(m,n,p),$(n,i),$(i,s),$(n,l),$(n,o),o.innerHTML=a,$(n,u),$(n,c),h&&h.m(c,null),$(n,f),d=!0},p(m,p){e=m,(!d||p&1)&&r!==(r=e[0]("prefs.languages.translator.title",{values:{service:e[11]}})+"")&&X(s,r),(!d||p&1)&&a!==(a=kn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[11],homeHref:`href="${e[12]}"`,apiKeyHref:`href="${e[13]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a),e[2].apiKeys?h?(h.p(e,p),p&4&&_(h,1)):(h=Tk(e),h.c(),_(h,1),h.m(c,null)):h&&(x(),y(h,1,1,()=>{h=null}),V())},i(m){d||(_(h),d=!0)},o(m){y(h),d=!1},d(m){m&&T(n),h&&h.d()}}}function LZ(t){let e,n,i=t[0]("prefs.languages.ui_language.title")+"",r,s,l,o=t[1],a,u,c,f=Sk(t),d=(t[4]?.i18n?.locales?.length??0)>1&&Ek(t);return{c(){e=F("section"),n=F("h4"),r=G(i),s=j(),l=F("div"),f.c(),a=j(),d&&d.c(),u=Q(),C(l,"role","none")},m(h,m){A(h,e,m),$(e,n),$(n,r),$(e,s),$(e,l),f.m(l,null),A(h,a,m),d&&d.m(h,m),A(h,u,m),c=!0},p(h,m){(!c||m&1)&&i!==(i=h[0]("prefs.languages.ui_language.title")+"")&&X(r,i),m&2&&te(o,o=h[1])?(x(),y(f,1,1,H),V(),f=Sk(h),f.c(),_(f,1),f.m(l,null)):f.p(h,m),(h[4]?.i18n?.locales?.length??0)>1?d?(d.p(h,m),m&16&&_(d,1)):(d=Ek(h),d.c(),_(d,1),d.m(u.parentNode,u)):d&&(x(),y(d,1,1,()=>{d=null}),V())},i(h){c||(_(f),_(d),c=!0)},o(h){y(f),y(d),c=!1},d(h){h&&(T(e),T(a),T(u)),f.d(h),d&&d.d(h)}}}function OZ(t){let e,n;return e=new Jc({props:{id:"prefs-tab-languages",$$slots:{default:[LZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&524319&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function PZ(t,e,n){let i,r,s,l,o;B(t,ue,d=>n(0,i=d)),B(t,un,d=>n(1,r=d)),B(t,Lt,d=>n(2,s=d)),B(t,E2,d=>n(3,l=d)),B(t,wt,d=>n(4,o=d));const a=sn(),u=d=>{ze(Lt,s={...s,locale:d.detail.value},s)};function c(d,h){t.$$.not_equal(s.apiKeys[h],d)&&(s.apiKeys[h]=d,Lt.set(s))}return[i,r,s,l,o,a,u,c,d=>{a("change",{message:i(s.apiKeys?.[d]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})}]}class IZ extends ie{constructor(e){super(),ne(this,e,PZ,OZ,te,{})}}function Ck(t,e,n){const i=t.slice();i[5]=e[n][0],i[6]=e[n][1],i[10]=e,i[11]=n;const r=i[6];return i[7]=r.serviceLabel,i[8]=r.developerURL,i[9]=r.apiKeyURL,i}function Nk(t){let e,n,i;function r(o){t[3](o,t[5])}function s(){return t[4](t[5])}let l={flex:!0,spellcheck:"false","aria-label":t[0]("prefs.media.stock_photos.field_label",{values:{service:t[7]}})};return t[1].apiKeys[t[5]]!==void 0&&(l.value=t[1].apiKeys[t[5]]),e=new Sn({props:l}),ae.push(()=>Re(e,"value",r)),e.$on("change",s),{c(){O(e.$$.fragment)},m(o,a){N(e,o,a),i=!0},p(o,a){t=o;const u={};a&1&&(u["aria-label"]=t[0]("prefs.media.stock_photos.field_label",{values:{service:t[7]}})),!n&&a&2&&(n=!0,u.value=t[1].apiKeys[t[5]],$e(()=>n=!1)),e.$set(u)},i(o){i||(_(e.$$.fragment,o),i=!0)},o(o){y(e.$$.fragment,o),i=!1},d(o){L(e,o)}}}function Lk(t,e){let n,i,r=e[0]("prefs.media.stock_photos.title",{values:{service:e[7]}})+"",s,l,o,a=kn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[7],homeHref:`href="${e[8]}"`,apiKeyHref:`href="${e[9]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",u,c,f,d,h=e[1].apiKeys&&Nk(e);return{key:t,first:null,c(){n=F("section"),i=F("h4"),s=G(r),l=j(),o=F("p"),u=j(),c=F("div"),h&&h.c(),f=j(),C(c,"role","none"),this.first=n},m(m,p){A(m,n,p),$(n,i),$(i,s),$(n,l),$(n,o),o.innerHTML=a,$(n,u),$(n,c),h&&h.m(c,null),$(n,f),d=!0},p(m,p){e=m,(!d||p&1)&&r!==(r=e[0]("prefs.media.stock_photos.title",{values:{service:e[7]}})+"")&&X(s,r),(!d||p&1)&&a!==(a=kn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[7],homeHref:`href="${e[8]}"`,apiKeyHref:`href="${e[9]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a),e[1].apiKeys?h?(h.p(e,p),p&2&&_(h,1)):(h=Nk(e),h.c(),_(h,1),h.m(c,null)):h&&(x(),y(h,1,1,()=>{h=null}),V())},i(m){d||(_(h),d=!0)},o(m){y(h),d=!1},d(m){m&&T(n),h&&h.d()}}}function DZ(t){let e=[],n=new Map,i,r,s=be(Object.entries(fs));const l=o=>o[5];for(let o=0;o<s.length;o+=1){let a=Ck(t,s,o),u=l(a);n.set(u,e[o]=Lk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&7&&(s=be(Object.entries(fs)),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Lk,i,Ck),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function MZ(t){let e,n;return e=new Jc({props:{id:"prefs-tab-media",$$slots:{default:[DZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&4099&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function RZ(t,e,n){let i,r;B(t,ue,a=>n(0,i=a)),B(t,Lt,a=>n(1,r=a));const s=sn();function l(a,u){t.$$.not_equal(r.apiKeys[u],a)&&(r.apiKeys[u]=a,Lt.set(r))}return[i,r,s,l,a=>{s("change",{message:i(r.apiKeys?.[a]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})}]}class $Z extends ie{constructor(e){super(),ne(this,e,RZ,MZ,te,{})}}function FZ(t){ye(t,"svelte-1lc0cir",".wrapper.svelte-1lc0cir{display:flex}.wrapper.svelte-1lc0cir .tab-list{flex:none;width:160px !important}.wrapper.svelte-1lc0cir .tab-panel{flex:auto;border-width:0}.wrapper.svelte-1lc0cir .tab-panel section:not(:first-child){margin:16px 0 0}.wrapper.svelte-1lc0cir .tab-panel p{margin-top:0}.wrapper.svelte-1lc0cir .tab-panel h4{font-size:inherit}.wrapper.svelte-1lc0cir .tab-panel h4~div{margin:8px 0 0}.wrapper.svelte-1lc0cir .tab-panel h4~p{margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}")}function Ok(t,e,n){const i=t.slice();return i[11]=e[n].key,i[12]=e[n].component,i}function Pk(t,e,n){const i=t.slice();return i[11]=e[n].key,i[15]=e[n].icon,i}function zZ(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[15]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&16&&(s.name=i[15]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Ik(t,e){let n,i,r;function s(){return e[6](e[11])}return i=new l5({props:{label:e[5](`prefs.${e[11]}.title`),selected:e[11]===e[1],"aria-controls":"prefs-tab-"+e[11],$$slots:{"start-icon":[zZ]},$$scope:{ctx:e}}}),i.$on("select",s),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(l,o){A(l,n,o),N(i,l,o),r=!0},p(l,o){e=l;const a={};o&48&&(a.label=e[5](`prefs.${e[11]}.title`)),o&18&&(a.selected=e[11]===e[1]),o&16&&(a["aria-controls"]="prefs-tab-"+e[11]),o&262160&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(l){r||(_(i.$$.fragment,l),r=!0)},o(l){y(i.$$.fragment,l),r=!1},d(l){l&&T(n),L(i,l)}}}function jZ(t){let e=[],n=new Map,i,r,s=be(t[4]);const l=o=>o[11];for(let o=0;o<s.length;o+=1){let a=Pk(t,s,o),u=l(a);n.set(u,e[o]=Ik(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&50&&(s=be(o[4]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Ik,i,Pk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Dk(t,e){let n,i,r,s;var l=e[12];function o(a,u){return{}}return l&&(i=an(l,o()),i.$on("change",e[7])),{key:t,first:null,c(){n=Q(),i&&O(i.$$.fragment),r=Q(),this.first=n},m(a,u){A(a,n,u),i&&N(i,a,u),A(a,r,u),s=!0},p(a,u){if(e=a,u&16&&l!==(l=e[12])){if(i){x();const c=i;y(c.$$.fragment,1,0,()=>{L(c,1)}),V()}l?(i=an(l,o()),i.$on("change",e[7]),O(i.$$.fragment),_(i.$$.fragment,1),N(i,r.parentNode,r)):i=null}},i(a){s||(i&&_(i.$$.fragment,a),s=!0)},o(a){i&&y(i.$$.fragment,a),s=!1},d(a){a&&(T(n),T(r)),i&&L(i,a)}}}function BZ(t){let e,n,i,r=[],s=new Map,l;n=new KO({props:{orientation:"vertical","aria-label":t[5]("categories"),$$slots:{default:[jZ]},$$scope:{ctx:t}}});let o=be(t[4]);const a=u=>u[11];for(let u=0;u<o.length;u+=1){let c=Ok(t,o,u),f=a(c);s.set(f,r[u]=Dk(f,c))}return{c(){e=F("div"),O(n.$$.fragment),i=j();for(let u=0;u<r.length;u+=1)r[u].c();C(e,"role","none"),C(e,"class","wrapper svelte-1lc0cir")},m(u,c){A(u,e,c),N(n,e,null),$(e,i);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);l=!0},p(u,c){const f={};c&32&&(f["aria-label"]=u[5]("categories")),c&262194&&(f.$$scope={dirty:c,ctx:u}),n.$set(f),c&28&&(o=be(u[4]),x(),r=bt(r,c,a,1,u,o,s,e,_t,Dk,null,Ok),V())},i(u){if(!l){_(n.$$.fragment,u);for(let c=0;c<o.length;c+=1)_(r[c]);l=!0}},o(u){y(n.$$.fragment,u);for(let c=0;c<r.length;c+=1)y(r[c]);l=!1},d(u){u&&T(e),L(n);for(let c=0;c<r.length;c+=1)r[c].d()}}}function UZ(t){let e;return{c(){e=G(t[2])},m(n,i){A(n,e,i)},p(n,i){i&4&&X(e,n[2])},d(n){n&&T(e)}}}function qZ(t){let e,n;return e=new Ii({props:{status:"success",$$slots:{default:[UZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&262148&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function HZ(t){let e,n,i,r,s,l;function o(f){t[8](f)}let a={title:t[5]("settings"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[BZ]},$$scope:{ctx:t}};t[0]!==void 0&&(a.open=t[0]),e=new Br({props:a}),ae.push(()=>Re(e,"open",o)),e.$on("close",t[9]);function u(f){t[10](f)}let c={$$slots:{default:[qZ]},$$scope:{ctx:t}};return t[3]!==void 0&&(c.show=t[3]),r=new Si({props:c}),ae.push(()=>Re(r,"show",u)),{c(){O(e.$$.fragment),i=j(),O(r.$$.fragment)},m(f,d){N(e,f,d),A(f,i,d),N(r,f,d),l=!0},p(f,[d]){const h={};d&32&&(h.title=f[5]("settings")),d&262206&&(h.$$scope={dirty:d,ctx:f}),!n&&d&1&&(n=!0,h.open=f[0],$e(()=>n=!1)),e.$set(h);const m={};d&262148&&(m.$$scope={dirty:d,ctx:f}),!s&&d&8&&(s=!0,m.show=f[3],$e(()=>s=!1)),r.$set(m)},i(f){l||(_(e.$$.fragment,f),_(r.$$.fragment,f),l=!0)},o(f){y(e.$$.fragment,f),y(r.$$.fragment,f),l=!1},d(f){f&&T(i),L(e,f),L(r,f)}}}function xZ(t,e,n){let i,r;B(t,ue,m=>n(5,r=m));let{open:s=!1}=e,l="appearance",o="",a=!1;const u=m=>{n(1,l=m)},c=({detail:{message:m}})=>{n(2,o=m),n(3,a=!0)};function f(m){s=m,n(0,s)}function d(m){fe.call(this,t,m)}function h(m){a=m,n(3,a)}return t.$$set=m=>{"open"in m&&n(0,s=m.open)},n(4,i=[{key:"appearance",icon:"palette",component:CZ},{key:"languages",icon:"language",component:IZ},{key:"media",icon:"photo_library",component:$Z},{key:"advanced",icon:"build",component:kZ}]),[s,l,o,a,i,r,u,c,f,d,h]}class VZ extends ie{constructor(e){super(),ne(this,e,xZ,HZ,te,{open:0},FZ)}}function WZ(t){ye(t,"svelte-xssn1c",".wrapper.svelte-xssn1c{display:contents}.wrapper.svelte-xssn1c button.avatar{border-width:0;background-color:transparent}.avatar.svelte-xssn1c{width:32px;height:32px;border-radius:32px;object-fit:cover}")}function rh(t){let e,n,i=[{class:"avatar svelte-xssn1c"},{loading:"lazy"},{src:n=t[0]?.avatarURL}],r={};for(let s=0;s<i.length;s+=1)r=Z(r,i[s]);return{c(){e=F(t[5]?"img":void 0),Zg(t[5]?"img":void 0)(e,r)},m(s,l){A(s,e,l)},p(s,l){Zg(s[5]?"img":void 0)(e,r=Ge(i,[{class:"avatar svelte-xssn1c"},{loading:"lazy"},l&1&&!Xn(e.src,n=s[0]?.avatarURL)&&{src:n}]))},d(s){s&&T(e)}}}function YZ(t){let e=t[5]?"img":void 0,n,i=(t[5]?"img":void 0)&&rh(t);return{c(){i&&i.c(),n=Q()},m(r,s){i&&i.m(r,s),A(r,n,s)},p(r,s){r[5]||!1?e?te(e,r[5]?"img":void 0)?(i.d(1),i=rh(r),e=r[5]?"img":void 0,i.c(),i.m(n.parentNode,n)):i.p(r,s):(i=rh(r),e=r[5]?"img":void 0,i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=r[5]?"img":void 0)},d(r){r&&T(n),i&&i.d(r)}}}function GZ(t){let e,n,i;var r=t[5]?void 0:xe;function s(l,o){return{props:{slot:"start-icon",name:"account_circle"}}}return r&&(e=an(r,s())),{c(){e&&O(e.$$.fragment),n=Q()},m(l,o){e&&N(e,l,o),A(l,n,o),i=!0},p(l,o){if(o&32&&r!==(r=l[5]?void 0:xe)){if(e){x();const a=e;y(a.$$.fragment,1,0,()=>{L(a,1)}),V()}r?(e=an(r,s()),O(e.$$.fragment),_(e.$$.fragment,1),N(e,n.parentNode,n)):e=null}},i(l){i||(e&&_(e.$$.fragment,l),i=!0)},o(l){e&&y(e.$$.fragment,l),i=!1},d(l){l&&T(n),e&&L(e,l)}}}function Mk(t){let e,n;return e=new Pt({props:{label:t[6]("site_config")}}),e.$on("click",t[14]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s.label=i[6]("site_config")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function KZ(t){let e,n;return e=new Pt({props:{label:t[6]("help.keyboard_shortcuts")}}),e.$on("click",t[15]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s.label=i[6]("help.keyboard_shortcuts")),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function ZZ(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g,v,b=window.matchMedia("(pointer: fine)").matches,w,k,S,E,P,M,I,D,z,R,U,W,ee,K,ve;e=new Pt({props:{label:t[4]?t[6]("working_with_local_repo"):t[6]("signed_in_as_x",{values:{name:t[0]?.login}}),disabled:t[4]}}),e.$on("click",t[10]),i=new $n({}),s=new Pt({props:{label:t[6]("live_site")}}),s.$on("click",t[11]),o=new Pt({props:{label:t[6]("git_repository"),disabled:t[4]}}),o.$on("click",t[12]),u=new uZ({}),f=new $n({}),h=new Pt({props:{label:t[6]("settings")}}),h.$on("click",t[13]);let me=t[8].devModeEnabled&&Mk(t);g=new $n({});let se=b&&KZ(t);return k=new Pt({props:{label:t[6]("help.documentation")}}),k.$on("click",t[16]),E=new Pt({props:{label:t[8].devModeEnabled?t[6]("help.release_notes_version_x",{values:{version:_p}}):t[6]("help.release_notes")}}),E.$on("click",t[17]),M=new $n({}),D=new Pt({props:{label:t[6]("help.issue")}}),D.$on("click",t[18]),R=new Pt({props:{label:t[6]("help.feedback")}}),R.$on("click",t[19]),W=new $n({}),K=new Pt({props:{label:t[6]("sign_out")}}),K.$on("click",t[20]),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),a=j(),O(u.$$.fragment),c=j(),O(f.$$.fragment),d=j(),O(h.$$.fragment),m=j(),me&&me.c(),p=j(),O(g.$$.fragment),v=j(),se&&se.c(),w=j(),O(k.$$.fragment),S=j(),O(E.$$.fragment),P=j(),O(M.$$.fragment),I=j(),O(D.$$.fragment),z=j(),O(R.$$.fragment),U=j(),O(W.$$.fragment),ee=j(),O(K.$$.fragment)},m(q,J){N(e,q,J),A(q,n,J),N(i,q,J),A(q,r,J),N(s,q,J),A(q,l,J),N(o,q,J),A(q,a,J),N(u,q,J),A(q,c,J),N(f,q,J),A(q,d,J),N(h,q,J),A(q,m,J),me&&me.m(q,J),A(q,p,J),N(g,q,J),A(q,v,J),se&&se.m(q,J),A(q,w,J),N(k,q,J),A(q,S,J),N(E,q,J),A(q,P,J),N(M,q,J),A(q,I,J),N(D,q,J),A(q,z,J),N(R,q,J),A(q,U,J),N(W,q,J),A(q,ee,J),N(K,q,J),ve=!0},p(q,J){const Le={};J&81&&(Le.label=q[4]?q[6]("working_with_local_repo"):q[6]("signed_in_as_x",{values:{name:q[0]?.login}})),J&16&&(Le.disabled=q[4]),e.$set(Le);const _e={};J&64&&(_e.label=q[6]("live_site")),s.$set(_e);const Be={};J&64&&(Be.label=q[6]("git_repository")),J&16&&(Be.disabled=q[4]),o.$set(Be);const Ke={};J&64&&(Ke.label=q[6]("settings")),h.$set(Ke),q[8].devModeEnabled?me?(me.p(q,J),J&256&&_(me,1)):(me=Mk(q),me.c(),_(me,1),me.m(p.parentNode,p)):me&&(x(),y(me,1,1,()=>{me=null}),V()),b&&se.p(q,J);const de={};J&64&&(de.label=q[6]("help.documentation")),k.$set(de);const ge={};J&320&&(ge.label=q[8].devModeEnabled?q[6]("help.release_notes_version_x",{values:{version:_p}}):q[6]("help.release_notes")),E.$set(ge);const pe={};J&64&&(pe.label=q[6]("help.issue")),D.$set(pe);const We={};J&64&&(We.label=q[6]("help.feedback")),R.$set(We);const ot={};J&64&&(ot.label=q[6]("sign_out")),K.$set(ot)},i(q){ve||(_(e.$$.fragment,q),_(i.$$.fragment,q),_(s.$$.fragment,q),_(o.$$.fragment,q),_(u.$$.fragment,q),_(f.$$.fragment,q),_(h.$$.fragment,q),_(me),_(g.$$.fragment,q),_(se),_(k.$$.fragment,q),_(E.$$.fragment,q),_(M.$$.fragment,q),_(D.$$.fragment,q),_(R.$$.fragment,q),_(W.$$.fragment,q),_(K.$$.fragment,q),ve=!0)},o(q){y(e.$$.fragment,q),y(i.$$.fragment,q),y(s.$$.fragment,q),y(o.$$.fragment,q),y(u.$$.fragment,q),y(f.$$.fragment,q),y(h.$$.fragment,q),y(me),y(g.$$.fragment,q),y(se),y(k.$$.fragment,q),y(E.$$.fragment,q),y(M.$$.fragment,q),y(D.$$.fragment,q),y(R.$$.fragment,q),y(W.$$.fragment,q),y(K.$$.fragment,q),ve=!1},d(q){q&&(T(n),T(r),T(l),T(a),T(c),T(d),T(m),T(p),T(v),T(w),T(S),T(P),T(I),T(z),T(U),T(ee)),L(e,q),L(i,q),L(s,q),L(o,q),L(u,q),L(f,q),L(h,q),me&&me.d(q),L(g,q),se&&se.d(q),L(k,q),L(E,q),L(M,q),L(D,q),L(R,q),L(W,q),L(K,q)}}}function JZ(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[6]("account"),$$slots:{default:[ZZ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&64&&(s["aria-label"]=i[6]("account")),r&67109341&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function XZ(t){let e,n,i,r,s,l,o,a,u,c={variant:"ghost",iconic:!0,class:t[5]?"avatar":"",popupPosition:"bottom-right","aria-label":t[6]("show_account_menu"),$$slots:{popup:[JZ],"start-icon":[GZ],default:[YZ]},$$scope:{ctx:t}};n=new pi({props:c}),t[21](n);function f(p){t[22](p)}let d={};t[2]!==void 0&&(d.open=t[2]),r=new VZ({props:d}),ae.push(()=>Re(r,"open",f)),r.$on("close",t[23]);function h(p){t[24](p)}let m={};return t[3]!==void 0&&(m.open=t[3]),o=new bZ({props:m}),ae.push(()=>Re(o,"open",h)),o.$on("close",t[25]),{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),l=j(),O(o.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-xssn1c")},m(p,g){A(p,e,g),N(n,e,null),A(p,i,g),N(r,p,g),A(p,l,g),N(o,p,g),u=!0},p(p,[g]){const v={};g&32&&(v.class=p[5]?"avatar":""),g&64&&(v["aria-label"]=p[6]("show_account_menu")),g&67109373&&(v.$$scope={dirty:g,ctx:p}),n.$set(v);const b={};!s&&g&4&&(s=!0,b.open=p[2],$e(()=>s=!1)),r.$set(b);const w={};!a&&g&8&&(a=!0,w.open=p[3],$e(()=>a=!1)),o.$set(w)},i(p){u||(_(n.$$.fragment,p),_(r.$$.fragment,p),_(o.$$.fragment,p),u=!0)},o(p){y(n.$$.fragment,p),y(r.$$.fragment,p),y(o.$$.fragment,p),u=!1},d(p){p&&(T(e),T(i),T(l)),t[21](null),L(n),L(r,p),L(o,p)}}}function QZ(t,e,n){let i,r,s,l,o,a,u;B(t,Wr,U=>n(9,s=U)),B(t,Yi,U=>n(0,l=U)),B(t,ue,U=>n(6,o=U)),B(t,ti,U=>n(7,a=U)),B(t,Lt,U=>n(8,u=U));let c,f=!1,d=!1;const h=()=>{window.open(l?.profileURL,"_blank")},m=()=>{WE()},p=()=>{window.open(a?.repository?.branchURL)},g=()=>{n(2,f=!0)},v=()=>{pn("/config")},b=()=>{n(3,d=!0)},w=()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")},k=()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},S=()=>{window.open("https://github.com/sveltia/sveltia-cms/issues","_blank")},E=()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions","_blank")},P=async()=>{window.requestAnimationFrame(()=>{ze(Yi,l=null,l),a?.signOut()})};function M(U){ae[U?"unshift":"push"](()=>{c=U,n(1,c)})}function I(U){f=U,n(2,f)}const D=()=>c.focus();function z(U){d=U,n(3,d)}const R=()=>c.focus();return t.$$.update=()=>{t.$$.dirty&1&&n(5,i=!!l?.avatarURL),t.$$.dirty&512&&n(4,r=s==="local")},[l,c,f,d,r,i,o,a,u,s,h,m,p,g,v,b,w,k,S,E,P,M,I,D,z,R]}class eJ extends ie{constructor(e){super(),ne(this,e,QZ,XZ,te,{},WZ)}}function Rk(t,e,n){const i=t.slice();i[5]=e[n];const r=i[5];return i[6]=r.name,i[7]=r.label,i[8]=r.label_singular,i[9]=r.folder,i[10]=r.hide!==void 0?r.hide:!1,i[11]=r.create!==void 0?r.create:!1,i}function tJ(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"add"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function $k(t){let e,n;function i(){return t[3](t[6])}return e=new Pt({props:{label:t[8]||t[7]||t[6],disabled:!t[11]}}),e.$on("click",i),{c(){O(e.$$.fragment)},m(r,s){N(e,r,s),n=!0},p(r,s){t=r;const l={};s&2&&(l.label=t[8]||t[7]||t[6]),s&2&&(l.disabled=!t[11]),e.$set(l)},i(r){n||(_(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){L(e,r)}}}function Fk(t,e){let n,i,r,s=e[9]&&!e[10]&&$k(e);return{key:t,first:null,c(){n=Q(),s&&s.c(),i=Q(),this.first=n},m(l,o){A(l,n,o),s&&s.m(l,o),A(l,i,o),r=!0},p(l,o){e=l,e[9]&&!e[10]?s?(s.p(e,o),o&2&&_(s,1)):(s=$k(e),s.c(),_(s,1),s.m(i.parentNode,i)):s&&(x(),y(s,1,1,()=>{s=null}),V())},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(n),T(i)),s&&s.d(l)}}}function nJ(t){let e=[],n=new Map,i,r,s,l,o,a=be(t[1]?.collections??[]);const u=c=>c[5].name;for(let c=0;c<a.length;c+=1){let f=Rk(t,a,c),d=u(f);n.set(d,e[c]=Fk(d,f))}return r=new $n({}),l=new Pt({props:{label:t[0]("assets")}}),l.$on("click",t[4]),{c(){for(let c=0;c<e.length;c+=1)e[c].c();i=j(),O(r.$$.fragment),s=j(),O(l.$$.fragment)},m(c,f){for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(c,f);A(c,i,f),N(r,c,f),A(c,s,f),N(l,c,f),o=!0},p(c,f){f&2&&(a=be(c[1]?.collections??[]),x(),e=bt(e,f,u,1,c,a,n,i.parentNode,_t,Fk,i,Rk),V());const d={};f&1&&(d.label=c[0]("assets")),l.$set(d)},i(c){if(!o){for(let f=0;f<a.length;f+=1)_(e[f]);_(r.$$.fragment,c),_(l.$$.fragment,c),o=!0}},o(c){for(let f=0;f<e.length;f+=1)y(e[f]);y(r.$$.fragment,c),y(l.$$.fragment,c),o=!1},d(c){c&&(T(i),T(s));for(let f=0;f<e.length;f+=1)e[f].d(c);L(r,c),L(l,c)}}}function iJ(t){let e,n;return e=new ri({props:{slot:"popup","aria-label":t[0]("create_entry_or_assets"),$$slots:{default:[nJ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s["aria-label"]=i[0]("create_entry_or_assets")),r&16391&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function rJ(t){let e,n;return e=new pi({props:{variant:"ghost",iconic:!0,popupPosition:"bottom-right","aria-label":t[0]("create_entry_or_assets"),$$slots:{popup:[iJ],"start-icon":[tJ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s["aria-label"]=i[0]("create_entry_or_assets")),r&16391&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function sJ(t,e,n){let i,r,s;return B(t,ue,a=>n(0,i=a)),B(t,wt,a=>n(1,r=a)),B(t,Mr,a=>n(2,s=a)),[i,r,s,a=>{pn(`/collections/${a}/new`)},async()=>{pn("/assets"),await hs(100),ze(Mr,s=!0,s)}]}class lJ extends ie{constructor(e){super(),ne(this,e,sJ,rJ,te,{})}}function oJ(t){let e,n;return e=new xe({props:{slot:"start-icon",name:"notifications"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function aJ(t){let e,n;return e=new et({props:{variant:"ghost",iconic:!0,hidden:!0,"aria-label":t[0]("show_notifications"),$$slots:{"start-icon":[oJ]},$$scope:{ctx:t}}}),e.$on("click",uJ),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s["aria-label"]=i[0]("show_notifications")),r&2&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}const uJ=()=>{};function cJ(t,e,n){let i;return B(t,ue,r=>n(0,i=r)),[i]}class fJ extends ie{constructor(e){super(),ne(this,e,cJ,aJ,te,{})}}function dJ(t){ye(t,"svelte-1wpllk",".wrapper.svelte-1wpllk{display:contents}.wrapper.svelte-1wpllk .sui.select-button-group{gap:4px}.wrapper.svelte-1wpllk .sui.button{border-radius:var(--sui-button-medium-border-radius) !important}")}function zk(t,e,n){const i=t.slice();return i[6]=e[n].key,i[7]=e[n].label,i[8]=e[n].icon,i[9]=e[n].link,i[11]=n,i}function hJ(t){let e,n;return e=new xe({props:{slot:"start-icon",name:t[8]}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.name=i[8]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function jk(t,e){let n,i,r;function s(){return e[5](e[9])}return i=new Gl({props:{variant:"ghost",iconic:!0,selected:e[2]===e[6],"aria-label":e[7],keyShortcuts:"Alt+"+(e[11]+1),$$slots:{"start-icon":[hJ]},$$scope:{ctx:e}}}),i.$on("select",s),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(l,o){A(l,n,o),N(i,l,o),r=!0},p(l,o){e=l;const a={};o&6&&(a.selected=e[2]===e[6]),o&2&&(a["aria-label"]=e[7]),o&2&&(a.keyShortcuts="Alt+"+(e[11]+1)),o&4098&&(a.$$scope={dirty:o,ctx:e}),i.$set(a)},i(l){r||(_(i.$$.fragment,l),r=!0)},o(l){y(i.$$.fragment,l),r=!1},d(l){l&&T(n),L(i,l)}}}function pJ(t){let e=[],n=new Map,i,r,s=be(t[1]);const l=o=>o[6];for(let o=0;o<s.length;o+=1){let a=zk(t,s,o),u=l(a);n.set(u,e[o]=jk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&6&&(s=be(o[1]),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,jk,i,zk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function mJ(t){let e,n,i;return n=new Kc({props:{"aria-label":t[0]("switch_page"),"aria-controls":"page-container",$$slots:{default:[pJ]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","wrapper svelte-1wpllk")},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&1&&(l["aria-label"]=r[0]("switch_page")),s&4102&&(l.$$scope={dirty:s,ctx:r}),n.$set(l)},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function gJ(t,e,n){let i,r,s,l,o;B(t,Jn,u=>n(3,r=u)),B(t,ue,u=>n(0,s=u)),B(t,Yt,u=>n(4,l=u)),B(t,Zu,u=>n(2,o=u));const a=u=>{pn(u)};return t.$$.update=()=>{t.$$.dirty&25&&n(1,i=[{key:"collections",label:s("contents"),icon:"library_books",link:`/collections/${l?.name}`},{key:"assets",label:s("assets"),icon:"photo_library",link:r?`/assets/${r.internalPath}`:"/assets"}])},[s,i,o,r,l,a]}class _J extends ie{constructor(e){super(),ne(this,e,gJ,mJ,te,{},dJ)}}const ro=Xe(""),hT=An([Pi,wn,ro],([t,e,n],i)=>{const r=t?.length&&n?t.filter(l=>Object.values(zr(l)).some(o=>typeof o=="string"&&o.toLowerCase().includes(n.toLowerCase()))):[],s=e?.length&&n?e.filter(l=>l.name.toLowerCase().includes(n.toLowerCase())):[];i({entries:r,assets:s})});function bJ(t){ye(t,"svelte-38ttcj",".wrapper.svelte-38ttcj{display:contents}")}function vJ(t){let e,n,i,r,s={keyShortcuts:"Accel+F",showInlineLabel:!0,"aria-label":t[2]("search_placeholder")};return n=new Ap({props:s}),t[5](n),n.$on("input",t[6]),{c(){e=F("div"),i=F("div"),O(n.$$.fragment),jt(i,"display","contents"),jt(i,"--sui-textbox-placeholder-text-align","center"),C(e,"role","none"),C(e,"class","wrapper svelte-38ttcj")},m(l,o){A(l,e,o),$(e,i),N(n,i,null),t[7](e),r=!0},p(l,[o]){const a={};o&4&&(a["aria-label"]=l[2]("search_placeholder")),n.$set(a)},i(l){r||(_(n.$$.fragment,l),r=!0)},o(l){y(n.$$.fragment,l),r=!1},d(l){l&&T(e),t[5](null),L(n),t[7](null)}}}function yJ(t,e,n){let i,r,s;B(t,ro,d=>n(4,i=d)),B(t,Yt,d=>n(8,r=d)),B(t,ue,d=>n(2,s=d));const l=d=>{const h=!!i,{path:m}=ru(),p=m.startsWith("/search/");ze(ro,i=d,i),d?pn(`/search/${d}`,{replaceState:p}):h&&p&&Hl(`/collections/${r?.name}`)};let o,a;function u(d){ae[d?"unshift":"push"](()=>{a=d,n(0,a),n(4,i)})}const c=({target:d})=>{l(d.value.trim())};function f(d){ae[d?"unshift":"push"](()=>{o=d,n(1,o)})}return t.$$.update=()=>{t.$$.dirty&17&&a&&i!==a?.value&&n(0,a.value=i,a)},[a,o,s,l,i,u,c,f]}class wJ extends ie{constructor(e){super(),ne(this,e,yJ,vJ,te,{},bJ)}}function kJ(t){ye(t,"svelte-14sy0eb","img.svelte-14sy0eb{width:24px;height:24px;object-fit:contain}")}function Bk(t){let e,n;return e=new et({props:{variant:"ghost",iconic:!0,"aria-label":t[1]("visit_live_site"),$$slots:{default:[SJ]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s["aria-label"]=i[1]("visit_live_site")),r&9&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function SJ(t){let e,n;return{c(){e=F("img"),C(e,"loading","lazy"),Xn(e.src,n=t[0].logo_url)||C(e,"src",n),C(e,"alt",""),C(e,"class","logo svelte-14sy0eb")},m(i,r){A(i,e,r)},p(i,r){r&1&&!Xn(e.src,n=i[0].logo_url)&&C(e,"src",n)},d(i){i&&T(e)}}}function EJ(t){let e,n,i=t[0]?.logo_url&&Bk(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[0]?.logo_url?i?(i.p(r,s),s&1&&_(i,1)):(i=Bk(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function TJ(t,e,n){let i,r;return B(t,wt,l=>n(0,i=l)),B(t,ue,l=>n(1,r=l)),[i,r,()=>{WE()}]}class AJ extends ie{constructor(e){super(),ne(this,e,TJ,EJ,te,{},kJ)}}function CJ(t){ye(t,"svelte-1ko682w",".toolbar-wrapper.svelte-1ko682w{display:contents}.toolbar-wrapper[inert].svelte-1ko682w{display:none}.toolbar-wrapper.svelte-1ko682w>.toolbar{border-width:0 0 1px 0 !important}.toolbar-wrapper.svelte-1ko682w>.toolbar .search-bar{width:640px}")}function NJ(t){let e,n,i,r,s,l,o,a,u,c,f,d,h,m,p,g;return e=new AJ({}),i=new _J({}),s=new In({props:{flex:!0}}),o=new wJ({}),u=new In({props:{flex:!0}}),f=new lJ({}),h=new fJ({}),p=new eJ({}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),a=j(),O(u.$$.fragment),c=j(),O(f.$$.fragment),d=j(),O(h.$$.fragment),m=j(),O(p.$$.fragment)},m(v,b){N(e,v,b),A(v,n,b),N(i,v,b),A(v,r,b),N(s,v,b),A(v,l,b),N(o,v,b),A(v,a,b),N(u,v,b),A(v,c,b),N(f,v,b),A(v,d,b),N(h,v,b),A(v,m,b),N(p,v,b),g=!0},p:H,i(v){g||(_(e.$$.fragment,v),_(i.$$.fragment,v),_(s.$$.fragment,v),_(o.$$.fragment,v),_(u.$$.fragment,v),_(f.$$.fragment,v),_(h.$$.fragment,v),_(p.$$.fragment,v),g=!0)},o(v){y(e.$$.fragment,v),y(i.$$.fragment,v),y(s.$$.fragment,v),y(o.$$.fragment,v),y(u.$$.fragment,v),y(f.$$.fragment,v),y(h.$$.fragment,v),y(p.$$.fragment,v),g=!1},d(v){v&&(T(n),T(r),T(l),T(a),T(c),T(d),T(m)),L(e,v),L(i,v),L(s,v),L(o,v),L(u,v),L(f,v),L(h,v),L(p,v)}}}function LJ(t){let e,n,i;return n=new qr({props:{variant:"primary","aria-label":t[1]("global"),$$slots:{default:[NJ]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),C(e,"role","none"),C(e,"class","toolbar-wrapper svelte-1ko682w"),e.inert=t[0]},m(r,s){A(r,e,s),N(n,e,null),i=!0},p(r,[s]){const l={};s&2&&(l["aria-label"]=r[1]("global")),s&4&&(l.$$scope={dirty:s,ctx:r}),n.$set(l),(!i||s&1)&&(e.inert=r[0])},i(r){i||(_(n.$$.fragment,r),i=!0)},o(r){y(n.$$.fragment,r),i=!1},d(r){r&&T(e),L(n)}}}function OJ(t,e,n){let i,r;return B(t,VE,s=>n(0,i=s)),B(t,ue,s=>n(1,r=s)),[i,r]}class PJ extends ie{constructor(e){super(),ne(this,e,OJ,LJ,te,{},CJ)}}function IJ(t){let e,n;return e=new _s({props:{kind:t[1],asset:t[0],variant:"icon",cover:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&2&&(s.kind=i[1]),r&1&&(s.asset=i[0]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function DJ(t){let e=(t[5]?Sa(t[2]):"")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&36&&e!==(e=(i[5]?Sa(i[2]):"")+"")&&X(n,e)},d(i){i&&T(n)}}}function MJ(t){let e;return{c(){e=G(t[3])},m(n,i){A(n,e,i)},p(n,i){i&8&&X(e,n[3])},d(n){n&&T(e)}}}function RJ(t){let e,n,i,r,s,l;return e=new fi({props:{class:"image",$$slots:{default:[IJ]},$$scope:{ctx:t}}}),i=new fi({props:{class:"collection",$$slots:{default:[DJ]},$$scope:{ctx:t}}}),s=new fi({props:{class:"title",$$slots:{default:[MJ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment)},m(o,a){N(e,o,a),A(o,n,a),N(i,o,a),A(o,r,a),N(s,o,a),l=!0},p(o,a){const u={};a&131&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&164&&(c.$$scope={dirty:a,ctx:o}),i.$set(c);const f={};a&136&&(f.$$scope={dirty:a,ctx:o}),s.$set(f)},i(o){l||(_(e.$$.fragment,o),_(i.$$.fragment,o),_(s.$$.fragment,o),l=!0)},o(o){y(e.$$.fragment,o),y(i.$$.fragment,o),y(s.$$.fragment,o),l=!1},d(o){o&&(T(n),T(r)),L(e,o),L(i,o),L(s,o)}}}function $J(t){let e,n;return e=new Da({props:{$$slots:{default:[RJ]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&175&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function FJ(t,e,n){let i,r,s,l,o;B(t,un,c=>n(5,o=c));let{asset:a}=e;const u=()=>{pn(`/assets/${i}`)};return t.$$set=c=>{"asset"in c&&n(0,a=c.asset)},t.$$.update=()=>{t.$$.dirty&1&&n(4,{path:i,name:r,folder:s,kind:l}=a,i,(n(3,r),n(0,a)),(n(2,s),n(0,a)),(n(1,l),n(0,a)))},[a,l,s,r,i,o,u]}class zJ extends ie{constructor(e){super(),ne(this,e,FJ,$J,te,{asset:0})}}function Uk(t){let e,n;return e=new Da({props:{$$slots:{default:[xJ]},$$scope:{ctx:t}}}),e.$on("click",t[12]),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&8231&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function qk(t){let e,n;return e=new su({props:{src:t[5],variant:"icon",cover:!0}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&32&&(s.src=i[5]),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function jJ(t){let e,n,i=t[5]&&qk(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,s){r[5]?i?(i.p(r,s),s&32&&_(i,1)):(i=qk(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function BJ(t){let e=(t[1]?.label||t[1]?.name)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&2&&e!==(e=(i[1]?.label||i[1]?.name)+"")&&X(n,e)},d(i){i&&T(n)}}}function UJ(t){let e=(t[0][t[1]?.identifier_field??""]||t[0].title||t[0].name||t[0].label)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&3&&e!==(e=(i[0][i[1]?.identifier_field??""]||i[0].title||i[0].name||i[0].label)+"")&&X(n,e)},d(i){i&&T(n)}}}function qJ(t){let e=(t[2].label||t[2].name)+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&4&&e!==(e=(i[2].label||i[2].name)+"")&&X(n,e)},d(i){i&&T(n)}}}function HJ(t){let e;function n(s,l){if(s[2])return qJ;if(s[0])return UJ}let i=n(t),r=i&&i(t);return{c(){r&&r.c(),e=Q()},m(s,l){r&&r.m(s,l),A(s,e,l)},p(s,l){i===(i=n(s))&&r?r.p(s,l):(r&&r.d(1),r=i&&i(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&T(e),r&&r.d(s)}}}function xJ(t){let e,n,i,r,s,l;return e=new fi({props:{class:"image",$$slots:{default:[jJ]},$$scope:{ctx:t}}}),i=new fi({props:{class:"collection",$$slots:{default:[BJ]},$$scope:{ctx:t}}}),s=new fi({props:{class:"title",$$slots:{default:[HJ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment),n=j(),O(i.$$.fragment),r=j(),O(s.$$.fragment)},m(o,a){N(e,o,a),A(o,n,a),N(i,o,a),A(o,r,a),N(s,o,a),l=!0},p(o,a){const u={};a&8224&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&8194&&(c.$$scope={dirty:a,ctx:o}),i.$set(c);const f={};a&8199&&(f.$$scope={dirty:a,ctx:o}),s.$set(f)},i(o){l||(_(e.$$.fragment,o),_(i.$$.fragment,o),_(s.$$.fragment,o),l=!0)},o(o){y(e.$$.fragment,o),y(i.$$.fragment,o),y(s.$$.fragment,o),l=!1},d(o){o&&(T(n),T(r)),L(e,o),L(i,o),L(s,o)}}}function VJ(t){let e,n,i=t[0]&&Uk(t);return{c(){i&&i.c(),e=Q()},m(r,s){i&&i.m(r,s),A(r,e,s),n=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&_(i,1)):(i=Uk(r),i.c(),_(i,1),i.m(e.parentNode,e)):i&&(x(),y(i,1,1,()=>{i=null}),V())},i(r){n||(_(i),n=!0)},o(r){y(i),n=!1},d(r){r&&T(e),i&&i.d(r)}}}function WJ(t,e,n){let i,r,s,l,o,a,u,c,f,d,{entry:h}=e,m;const p=()=>{pn(`/collections/${l}/entries/${s||i}`)};return t.$$set=g=>{"entry"in g&&n(7,h=g.entry)},t.$$.update=()=>{t.$$.dirty&128&&n(6,{slug:i,locales:r,fileName:s,collectionName:l}=h,i,(n(10,r),n(7,h)),(n(3,s),n(7,h)),(n(4,l),n(7,h))),t.$$.dirty&16&&n(1,o=Mi(l)),t.$$.dirty&10&&n(2,a=s?o?._fileMap?.[s]:void 0),t.$$.dirty&2&&n(11,{defaultLocale:u}=o?._i18n??{},u),t.$$.dirty&3072&&n(9,c=u in r?u:Object.keys(r)[0]),t.$$.dirty&1536&&n(0,{content:f}=r[c]??{},f),t.$$.dirty&6&&n(8,d=a?void 0:o?.fields?.find(({widget:g})=>g==="image")),t.$$.dirty&385&&(async()=>n(5,m=f&&d?await Ws(f[d.name],h,{thumbnail:!0}):void 0))()},[f,o,a,s,l,m,i,h,d,c,r,u,p]}class YJ extends ie{constructor(e){super(),ne(this,e,WJ,VJ,te,{entry:7})}}function GJ(t){ye(t,"svelte-13wd1r4",".wrapper.svelte-13wd1r4.svelte-13wd1r4.svelte-13wd1r4{display:flex;flex-direction:column;width:100%}header.svelte-13wd1r4.svelte-13wd1r4.svelte-13wd1r4{display:flex;align-items:center;border-width:0 0 1px 0;border-color:var(--sui-primary-border-color);padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color)}header.svelte-13wd1r4 h2.svelte-13wd1r4.svelte-13wd1r4{font-size:var(--sui-font-size-x-large)}.results.svelte-13wd1r4.svelte-13wd1r4.svelte-13wd1r4{flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%}.results.svelte-13wd1r4>.group{flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%}.results.svelte-13wd1r4 h3.svelte-13wd1r4.svelte-13wd1r4{flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color)}.results.svelte-13wd1r4 h3.svelte-13wd1r4+div.svelte-13wd1r4{overflow:auto;flex:auto}")}function Hk(t,e,n){const i=t.slice();return i[3]=e[n],i}function xk(t,e,n){const i=t.slice();return i[6]=e[n],i}function KJ(t){let e=t[0]("no_entries_found")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&1&&e!==(e=i[0]("no_entries_found")+"")&&X(n,e)},i:H,o:H,d(i){i&&T(n)}}}function ZJ(t){let e,n;return e=new ou({props:{viewType:"list","aria-label":t[0]("entries"),"aria-rowcount":t[2].entries.length,$$slots:{default:[JJ]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s["aria-label"]=i[0]("entries")),r&4&&(s["aria-rowcount"]=i[2].entries.length),r&516&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Vk(t,e){let n,i,r;return i=new YJ({props:{entry:e[6]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&4&&(o.entry=e[6]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function JJ(t){let e=[],n=new Map,i,r,s=be(t[2].entries);const l=o=>o[6].id;for(let o=0;o<s.length;o+=1){let a=xk(t,s,o),u=l(a);n.set(u,e[o]=Vk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&4&&(s=be(o[2].entries),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Vk,i,xk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function XJ(t){let e,n=t[0]("entries")+"",i,r,s,l,o,a;const u=[ZJ,KJ],c=[];function f(d,h){return d[2]?.entries?.length?0:1}return l=f(t),o=c[l]=u[l](t),{c(){e=F("h3"),i=G(n),r=j(),s=F("div"),o.c(),C(e,"role","none"),C(e,"id","search-results-entries"),C(e,"class","svelte-13wd1r4"),C(s,"role","none"),C(s,"class","svelte-13wd1r4")},m(d,h){A(d,e,h),$(e,i),A(d,r,h),A(d,s,h),c[l].m(s,null),a=!0},p(d,h){(!a||h&1)&&n!==(n=d[0]("entries")+"")&&X(i,n);let m=l;l=f(d),l===m?c[l].p(d,h):(x(),y(c[m],1,1,()=>{c[m]=null}),V(),o=c[l],o?o.p(d,h):(o=c[l]=u[l](d),o.c()),_(o,1),o.m(s,null))},i(d){a||(_(o),a=!0)},o(d){y(o),a=!1},d(d){d&&(T(e),T(r),T(s)),c[l].d()}}}function QJ(t){let e=t[0]("no_files_found")+"",n;return{c(){n=G(e)},m(i,r){A(i,n,r)},p(i,r){r&1&&e!==(e=i[0]("no_files_found")+"")&&X(n,e)},i:H,o:H,d(i){i&&T(n)}}}function eX(t){let e,n;return e=new ou({props:{viewType:"list","aria-label":t[0]("assets"),"aria-rowcount":t[2].assets.length,$$slots:{default:[tX]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,r){const s={};r&1&&(s["aria-label"]=i[0]("assets")),r&4&&(s["aria-rowcount"]=i[2].assets.length),r&516&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function Wk(t,e){let n,i,r;return i=new zJ({props:{asset:e[3]}}),{key:t,first:null,c(){n=Q(),O(i.$$.fragment),this.first=n},m(s,l){A(s,n,l),N(i,s,l),r=!0},p(s,l){e=s;const o={};l&4&&(o.asset=e[3]),i.$set(o)},i(s){r||(_(i.$$.fragment,s),r=!0)},o(s){y(i.$$.fragment,s),r=!1},d(s){s&&T(n),L(i,s)}}}function tX(t){let e=[],n=new Map,i,r,s=be(t[2].assets);const l=o=>o[3].path;for(let o=0;o<s.length;o+=1){let a=Hk(t,s,o),u=l(a);n.set(u,e[o]=Wk(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Q()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);A(o,i,a),r=!0},p(o,a){a&4&&(s=be(o[2].assets),x(),e=bt(e,a,l,1,o,s,n,i.parentNode,_t,Wk,i,Hk),V())},i(o){if(!r){for(let a=0;a<s.length;a+=1)_(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)y(e[a]);r=!1},d(o){o&&T(i);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function nX(t){let e,n=t[0]("assets")+"",i,r,s,l,o,a;const u=[eX,QJ],c=[];function f(d,h){return d[2]?.assets?.length?0:1}return l=f(t),o=c[l]=u[l](t),{c(){e=F("h3"),i=G(n),r=j(),s=F("div"),o.c(),C(e,"role","none"),C(e,"id","search-results-assets"),C(e,"class","svelte-13wd1r4"),C(s,"role","none"),C(s,"class","svelte-13wd1r4")},m(d,h){A(d,e,h),$(e,i),A(d,r,h),A(d,s,h),c[l].m(s,null),a=!0},p(d,h){(!a||h&1)&&n!==(n=d[0]("assets")+"")&&X(i,n);let m=l;l=f(d),l===m?c[l].p(d,h):(x(),y(c[m],1,1,()=>{c[m]=null}),V(),o=c[l],o?o.p(d,h):(o=c[l]=u[l](d),o.c()),_(o,1),o.m(s,null))},i(d){a||(_(o),a=!0)},o(d){y(o),a=!1},d(d){d&&(T(e),T(r),T(s)),c[l].d()}}}function iX(t){let e,n,i,r=t[0]("search_results_for_x",{values:{terms:t[1]}})+"",s,l,o,a,u,c,f;return a=new Tn({props:{"aria-labelledby":"search-results-entries",$$slots:{default:[XJ]},$$scope:{ctx:t}}}),c=new Tn({props:{"aria-labelledby":"search-results-assets",$$slots:{default:[nX]},$$scope:{ctx:t}}}),{c(){e=F("div"),n=F("header"),i=F("h2"),s=G(r),l=j(),o=F("div"),O(a.$$.fragment),u=j(),O(c.$$.fragment),C(i,"role","none"),C(i,"class","svelte-13wd1r4"),C(n,"role","none"),C(n,"class","svelte-13wd1r4"),C(o,"role","none"),C(o,"class","results svelte-13wd1r4"),C(e,"role","none"),C(e,"class","wrapper svelte-13wd1r4")},m(d,h){A(d,e,h),$(e,n),$(n,i),$(i,s),$(e,l),$(e,o),N(a,o,null),$(o,u),N(c,o,null),f=!0},p(d,[h]){(!f||h&3)&&r!==(r=d[0]("search_results_for_x",{values:{terms:d[1]}})+"")&&X(s,r);const m={};h&517&&(m.$$scope={dirty:h,ctx:d}),a.$set(m);const p={};h&517&&(p.$$scope={dirty:h,ctx:d}),c.$set(p)},i(d){f||(_(a.$$.fragment,d),_(c.$$.fragment,d),f=!0)},o(d){y(a.$$.fragment,d),y(c.$$.fragment,d),f=!1},d(d){d&&T(e),L(a),L(c)}}}function rX(t,e,n){let i,r,s;return B(t,ue,l=>n(0,i=l)),B(t,ro,l=>n(1,r=l)),B(t,hT,l=>n(2,s=l)),[i,r,s]}class sX extends ie{constructor(e){super(),ne(this,e,rX,iX,te,{},GJ)}}function lX(t){let e,n;return e=new sX({props:{slot:"main"}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p:H,i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function oX(t){let e,n,i,r;return e=new au({props:{class:"content","aria-label":t[0]("search_results_for_x",{values:{terms:t[1]}}),$$slots:{main:[lX]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(s,l){N(e,s,l),n=!0,i||(r=Fe(window,"hashchange",t[3]),i=!0)},p(s,[l]){const o={};l&3&&(o["aria-label"]=s[0]("search_results_for_x",{values:{terms:s[1]}})),l&64&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){n||(_(e.$$.fragment,s),n=!0)},o(s){y(e.$$.fragment,s),n=!1},d(s){L(e,s),i=!1,r()}}}function aX(t,e,n){let i,r,s,l;B(t,ue,u=>n(0,i=u)),B(t,ro,u=>n(1,r=u)),B(t,Gn,u=>n(4,s=u)),B(t,hT,u=>n(5,l=u));const o=()=>{const{path:u}=ru(),[,c]=u.match(/^\/search\/(.+)$/)??[];c&&c!==r&&ze(ro,r=c,r);const{entries:f,assets:d}=l,h=f.length,m=d.length;ze(Gn,s=i("viewing_search_results",{values:{terms:r,entries:h>1?i("many_entries",{values:{count:h}}):i(h===1?"one_entry":"no_entries"),assets:m>1?i("many_assets",{values:{count:m}}):i(m===1?"one_asset":"no_assets")}}),s)};return Ut(()=>{o()}),[i,r,o,()=>{o()}]}class uX extends ie{constructor(e){super(),ne(this,e,aX,oX,te,{})}}function cX(t){ye(t,"svelte-1unqaq6",".columns.svelte-1unqaq6.svelte-1unqaq6{flex:auto;display:flex}.columns.svelte-1unqaq6 .column{flex:auto;width:33.3333333333%}.columns.svelte-1unqaq6 .column:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.columns.svelte-1unqaq6 header.svelte-1unqaq6{display:flex;align-items:center;border-width:0 0 1px 0;border-color:var(--sui-primary-border-color);padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color)}")}function fX(t){let e,n,i=t[0]("status.drafts")+"",r;return{c(){e=F("header"),n=F("h3"),r=G(i),C(n,"role","none"),C(n,"id","draft-column-title"),C(e,"role","none"),C(e,"class","svelte-1unqaq6")},m(s,l){A(s,e,l),$(e,n),$(n,r)},p(s,l){l&1&&i!==(i=s[0]("status.drafts")+"")&&X(r,i)},d(s){s&&T(e)}}}function dX(t){let e,n,i=t[0]("status.in_review")+"",r;return{c(){e=F("header"),n=F("h3"),r=G(i),C(n,"role","none"),C(n,"id","review-column-title"),C(e,"role","none"),C(e,"class","svelte-1unqaq6")},m(s,l){A(s,e,l),$(e,n),$(n,r)},p(s,l){l&1&&i!==(i=s[0]("status.in_review")+"")&&X(r,i)},d(s){s&&T(e)}}}function hX(t){let e,n,i=t[0]("status.ready")+"",r;return{c(){e=F("header"),n=F("h3"),r=G(i),C(n,"role","none"),C(n,"id","ready-column-title"),C(e,"role","none"),C(e,"class","svelte-1unqaq6")},m(s,l){A(s,e,l),$(e,n),$(n,r)},p(s,l){l&1&&i!==(i=s[0]("status.ready")+"")&&X(r,i)},d(s){s&&T(e)}}}function pX(t){let e,n,i,r,s,l,o;return n=new Tn({props:{class:"column","aria-labelledby":"draft-column-title",$$slots:{default:[fX]},$$scope:{ctx:t}}}),r=new Tn({props:{class:"column","aria-labelledby":"review-column-title",$$slots:{default:[dX]},$$scope:{ctx:t}}}),l=new Tn({props:{class:"column","aria-labelledby":"ready-column-title",$$slots:{default:[hX]},$$scope:{ctx:t}}}),{c(){e=F("div"),O(n.$$.fragment),i=j(),O(r.$$.fragment),s=j(),O(l.$$.fragment),C(e,"role","none"),C(e,"class","columns svelte-1unqaq6")},m(a,u){A(a,e,u),N(n,e,null),$(e,i),N(r,e,null),$(e,s),N(l,e,null),o=!0},p(a,u){const c={};u&3&&(c.$$scope={dirty:u,ctx:a}),n.$set(c);const f={};u&3&&(f.$$scope={dirty:u,ctx:a}),r.$set(f);const d={};u&3&&(d.$$scope={dirty:u,ctx:a}),l.$set(d)},i(a){o||(_(n.$$.fragment,a),_(r.$$.fragment,a),_(l.$$.fragment,a),o=!0)},o(a){y(n.$$.fragment,a),y(r.$$.fragment,a),y(l.$$.fragment,a),o=!1},d(a){a&&T(e),L(n),L(r),L(l)}}}function mX(t){let e,n;return e=new au({props:{class:"content","aria-label":t[0]("editorial_workflow"),$$slots:{main:[pX]},$$scope:{ctx:t}}}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},p(i,[r]){const s={};r&1&&(s["aria-label"]=i[0]("editorial_workflow")),r&3&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function gX(t,e,n){let i;return B(t,ue,r=>n(0,i=r)),[i]}class _X extends ie{constructor(e){super(),ne(this,e,gX,mX,te,{},cX)}}const{window:bX}=vp;function vX(t){let e,n,i,r,s,l,o,a,u,c,f,d;e=new PJ({});var h=t[0][t[2]];function m(p,g){return{}}return h&&(i=an(h,m())),s=new iH({}),o=new Jq({}),u=new rZ({}),{c(){O(e.$$.fragment),n=j(),i&&O(i.$$.fragment),r=j(),O(s.$$.fragment),l=j(),O(o.$$.fragment),a=j(),O(u.$$.fragment)},m(p,g){N(e,p,g),A(p,n,g),i&&N(i,p,g),A(p,r,g),N(s,p,g),A(p,l,g),N(o,p,g),A(p,a,g),N(u,p,g),c=!0,f||(d=Fe(bX,"hashchange",t[3]),f=!0)},p(p,[g]){if(g&4&&h!==(h=p[0][p[2]])){if(i){x();const v=i;y(v.$$.fragment,1,0,()=>{L(v,1)}),V()}h?(i=an(h,m()),O(i.$$.fragment),_(i.$$.fragment,1),N(i,r.parentNode,r)):i=null}},i(p){c||(_(e.$$.fragment,p),i&&_(i.$$.fragment,p),_(s.$$.fragment,p),_(o.$$.fragment,p),_(u.$$.fragment,p),c=!0)},o(p){y(e.$$.fragment,p),i&&y(i.$$.fragment,p),y(s.$$.fragment,p),y(o.$$.fragment,p),y(u.$$.fragment,p),c=!1},d(p){p&&(T(n),T(r),T(l),T(a)),L(e,p),i&&L(i,p),L(s,p),L(o,p),L(u,p),f=!1,d()}}}function yX(t,e,n){let i;B(t,Zu,o=>n(2,i=o));const r={collections:eZ,assets:Vq,search:uX,workflow:_X,config:aH},s=()=>{const{path:o}=ru(),[,a]=o.match(`^\\/(${Object.keys(r).join("|")})\\b`)??[];a?le(Zu)!==a&&Zu.set(a):window.location.replace(`#/collections/${le(Yt)?.name}`)};return Ut(()=>{s()}),[r,s,i,()=>{s()}]}class wX extends ie{constructor(e){super(),ne(this,e,yX,vX,te,{pages:0,selectPage:1})}get pages(){return this.$$.ctx[0]}get selectPage(){return this.$$.ctx[1]}}const kX=()=>{Object.entries(Object.assign({"/src/lib/locales/en.js":t2,"/src/lib/locales/ja.js":n2})).forEach(([e,{strings:n}])=>{const[,i]=e.match(/([a-zA-Z-]+)\.js/)??[];Ep(i,n)}),mS({fallbackLocale:"en",initialLocale:(LA()??"").split("-")[0]||"en"})};function SX(t){ye(t,"svelte-1wl2b5z",".outer.svelte-1wl2b5z{display:flex;flex-direction:column;position:fixed;inset:0;overflow:hidden}[role=status].svelte-1wl2b5z{position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none}")}function EX(t){let e;return{c(){e=F("link"),C(e,"href",$m+"/admin/config.yml"),C(e,"type","text/yaml"),C(e,"rel","cms-config-url")},m(n,i){A(n,e,i)},d(n){n&&T(e)}}}function Yk(t){let e,n,i,r,s,l,o;n=new mj({});let a=t[1]&&Gk();const u=[AX,TX],c=[];function f(d,h){return d[2]&&d[3]?0:1}return s=f(t),l=c[s]=u[s](t),{c(){e=F("div"),O(n.$$.fragment),i=j(),a&&a.c(),r=j(),l.c(),C(e,"role","none"),C(e,"class","outer svelte-1wl2b5z")},m(d,h){A(d,e,h),N(n,e,null),$(e,i),a&&a.m(e,null),$(e,r),c[s].m(e,null),o=!0},p(d,h){d[1]?a?h&2&&_(a,1):(a=Gk(),a.c(),_(a,1),a.m(e,r)):a&&(x(),y(a,1,1,()=>{a=null}),V());let m=s;s=f(d),s!==m&&(x(),y(c[m],1,1,()=>{c[m]=null}),V(),l=c[s],l||(l=c[s]=u[s](d),l.c()),_(l,1),l.m(e,null))},i(d){o||(_(n.$$.fragment,d),_(a),_(l),o=!0)},o(d){y(n.$$.fragment,d),y(a),y(l),o=!1},d(d){d&&T(e),L(n),a&&a.d(),c[s].d()}}}function Gk(t){let e,n;return e=new fj({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function TX(t){let e,n;return e=new oj({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function AX(t){let e,n;return e=new wX({}),{c(){O(e.$$.fragment)},m(i,r){N(e,i,r),n=!0},i(i){n||(_(e.$$.fragment,i),n=!0)},o(i){y(e.$$.fragment,i),n=!1},d(i){L(e,i)}}}function CX(t){let e,n,i,r,s=!t[0]&&Yk(t);return{c(){s&&s.c(),e=j(),n=F("div"),i=G(t[4]),C(n,"role","status"),C(n,"class","svelte-1wl2b5z")},m(l,o){s&&s.m(l,o),A(l,e,o),A(l,n,o),$(n,i),r=!0},p(l,o){l[0]?s&&(x(),y(s,1,1,()=>{s=null}),V()):s?(s.p(l,o),o&1&&_(s,1)):(s=Yk(l),s.c(),_(s,1),s.m(e.parentNode,e)),(!r||o&16)&&X(i,l[4])},i(l){r||(_(s),r=!0)},o(l){y(s),r=!1},d(l){l&&(T(e),T(n)),s&&s.d(l)}}}function NX(t){let e,n,i,r,s,l,o,a=$m&&EX();return l=new nD({props:{$$slots:{default:[CX]},$$scope:{ctx:t}}}),{c(){e=F("base"),n=F("meta"),i=F("link"),a&&a.c(),r=Q(),s=j(),O(l.$$.fragment),C(e,"target","_blank"),C(n,"name","referrer"),C(n,"content","same-origin"),C(i,"rel","icon"),C(i,"href","data:image/svg+xml;base64,"+btoa(Bh)),C(i,"type","image/svg+xml")},m(u,c){$(document.head,e),$(document.head,n),$(document.head,i),a&&a.m(document.head,null),$(document.head,r),A(u,s,c),N(l,u,c),o=!0},p(u,[c]){const f={};c&95&&(f.$$scope={dirty:c,ctx:u}),l.$set(f)},i(u){o||(_(l.$$.fragment,u),o=!0)},o(u){y(l.$$.fragment,u),o=!1},d(u){u&&T(s),T(e),T(n),T(i),a&&a.d(u),T(r),L(l,u)}}}function LX(t,e,n){let i,r,s,l,o;B(t,Ru,u=>n(0,i=u)),B(t,ti,u=>n(1,r=u)),B(t,Yi,u=>n(2,s=u)),B(t,ba,u=>n(3,l=u)),B(t,Gn,u=>n(4,o=u));let{config:a}=e;return Ut(()=>{kX(),vM(a)}),t.$$set=u=>{"config"in u&&n(5,a=u.config)},[i,r,s,l,o,a]}class OX extends ie{constructor(e){super(),ne(this,e,LX,NX,te,{config:5},SX)}}const PX=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerCustomFormat","registerEditorComponent","registerEventListener","registerLocale","registerMediaLibrary","registerPreviewStyle","registerPreviewTemplate","registerRemarkPlugin","registerWidget","registerWidgetValueSerializer","removeEventListener","resolveWidget"],yg=({config:t={}}={})=>{new OX({target:document.querySelector("#nc-root")??document.body,props:{config:t}})},IX=new Proxy({init:yg},{get:(t,e)=>{if(e in t)return t[e];if(PX.includes(e))return console.error(`CMS.${e}() is not yet supported in Sveltia CMS. See https://github.com/sveltia/sveltia-cms#compatibility for compatibility information.`),()=>{}}});window.CMS=IX;window.initCMS=yg;!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&yg();export{IX as default,yg as init};
|