~ianmjones/snippetexpander

00d37cec342466b83370c0a228d8db1d2c8120ae — Ian M. Jones 1 year, 1 month ago 6cfb02b
gui: add version info to about screen
M cmd/snippetpixie/main.go => cmd/snippetpixie/main.go +1 -1
@@ 15,7 15,7 @@ import (
	"github.com/godbus/dbus/v5"
)

var version = "2.0.0-alpha.5"
var version = "2.0.0-alpha.6"

func main() {
	ctx := context.Background()

M cmd/snippetpixiegui/app.go => cmd/snippetpixiegui/app.go +5 -0
@@ 307,3 307,8 @@ func (a *App) StartDaemon() error {

	return nil
}

// GetVersion of app.
func (a *App) GetVersion() string {
	return version
}

M cmd/snippetpixiegui/config_test.go => cmd/snippetpixiegui/config_test.go +3 -3
@@ 23,9 23,9 @@ func TestConfig_Init(t *testing.T) {
		{[]string{"snippetpixiegui", "-h"}, true, false, "Usage: snippetpixiegui [FLAG]"},
		{[]string{"snippetpixiegui", "--version", "--help"}, true, false, "Usage: snippetpixiegui [FLAG]"},
		{[]string{"snippetpixiegui", "--search-and-paste", "--version", "--help"}, true, false, "Usage: snippetpixiegui [FLAG]"},
		{[]string{"snippetpixiegui", "--version"}, true, false, "2.0.0-alpha.5"},
		{[]string{"snippetpixiegui", "-v"}, true, false, "2.0.0-alpha.5"},
		{[]string{"snippetpixiegui", "--search-and-paste", "--version"}, true, false, "2.0.0-alpha.5"},
		{[]string{"snippetpixiegui", "--version"}, true, false, "2.0.0-alpha.6"},
		{[]string{"snippetpixiegui", "-v"}, true, false, "2.0.0-alpha.6"},
		{[]string{"snippetpixiegui", "--search-and-paste", "--version"}, true, false, "2.0.0-alpha.6"},
		{[]string{"snippetpixiegui", "--search-and-paste"}, false, true, ""},
		{[]string{"snippetpixiegui", "-s"}, false, true, ""},
		{[]string{"snippetpixiegui"}, false, false, ""},

R cmd/snippetpixiegui/frontend/dist/assets/en-GB-551b3444.js => cmd/snippetpixiegui/frontend/dist/assets/en-GB-782433d5.js +1 -1
@@ 1,1 1,1 @@
const t={title:"Abbreviation",empty:"Please enter an Abbreviation",exists:"That Abbreviation already exists"},e={title:"Body"},n={title:"Add Snippet",error_title:"Error adding snippet"},i={title:"Edit Snippet",error_title:"Error editing snippet",id_not_supplied:"A Snippet ID was not specified for edit.",snippet_not_found:"Could not find Snippet for edit."},o={title:"Remove Snippet",error_title:"Error removing snippet"},s={title:"Import Snippets",new_only_title:"Import Snippets: Discarding Duplicates",update_title:"Import Snippets: Update Existing",error_title:"Error importing snippets"},p={title:"Export Snippets",error_title:"Error exporting snippets"},r={title:"Settings",import_export_title:"Import & Export",get_error_title:"Error getting settings",save_error_title:"Error saving settings",no_connection:"Settings can only be changed when the daemon is running.",autostart_title:"Auto Start",autostart:"Start daemon on login",autoexpand_title:"Auto Expand Snippets",autoexpand:"Auto expand snippets as they are typed",search_and_paste_title:"Search & Paste",focus_search:"Focus search box"},a="Could not connect to the snippetpixied daemon.",l={title:"No Snippets Found",description:"Please try entering a different search term."},d={cancel:"Cancel",save:"Save",remove:"Remove",back:"Back",about:"About"},c="Search…",_="Clear",u={not_installed:"It does not look like the required snippetpixied daemon is installed.",installed:"It looks like snippetpixied is installed.",start:"Start it?",starting:"Starting snippetpixied…"},b={description:"Your little expandable text snippet helper",source:"Source",licence_title:"Licence",licence:"GNU General Public License Version 2 Plus (GPLv2+)",by:"By"},g={abbreviation:t,body:e,add_snippet:n,edit_snippet:i,remove_snippet:o,import_snippets:s,export_snippets:p,settings:r,no_connection:a,no_snippets_found:l,button:d,search:c,clear:_,daemon:u,about:b};export{t as abbreviation,b as about,n as add_snippet,e as body,d as button,_ as clear,u as daemon,g as default,i as edit_snippet,p as export_snippets,s as import_snippets,a as no_connection,l as no_snippets_found,o as remove_snippet,c as search,r as settings};
const t={title:"Abbreviation",empty:"Please enter an Abbreviation",exists:"That Abbreviation already exists"},e={title:"Body"},n={title:"Add Snippet",error_title:"Error adding snippet"},i={title:"Edit Snippet",error_title:"Error editing snippet",id_not_supplied:"A Snippet ID was not specified for edit.",snippet_not_found:"Could not find Snippet for edit."},o={title:"Remove Snippet",error_title:"Error removing snippet"},s={title:"Import Snippets",new_only_title:"Import Snippets: Discarding Duplicates",update_title:"Import Snippets: Update Existing",error_title:"Error importing snippets"},p={title:"Export Snippets",error_title:"Error exporting snippets"},r={title:"Settings",import_export_title:"Import & Export",get_error_title:"Error getting settings",save_error_title:"Error saving settings",no_connection:"Settings can only be changed when the daemon is running.",autostart_title:"Auto Start",autostart:"Start daemon on login",autoexpand_title:"Auto Expand Snippets",autoexpand:"Auto expand snippets as they are typed",search_and_paste_title:"Search & Paste",focus_search:"Focus search box"},a="Could not connect to the snippetpixied daemon.",d={title:"No Snippets Found",description:"Please try entering a different search term."},l={cancel:"Cancel",save:"Save",remove:"Remove",back:"Back",about:"About"},c="Loading…",_="Search…",u="Clear",g={not_installed:"It does not look like the required snippetpixied daemon is installed.",installed:"It looks like snippetpixied is installed.",start:"Start it?",starting:"Starting snippetpixied…"},b={description:"Your little expandable text snippet helper",source:"Source",licence_title:"Licence",licence:"GNU General Public License Version 2 Plus (GPLv2+)",by:"By"},m={abbreviation:t,body:e,add_snippet:n,edit_snippet:i,remove_snippet:o,import_snippets:s,export_snippets:p,settings:r,no_connection:a,no_snippets_found:d,button:l,loading:c,search:_,clear:u,daemon:g,about:b};export{t as abbreviation,b as about,n as add_snippet,e as body,l as button,u as clear,g as daemon,m as default,i as edit_snippet,p as export_snippets,s as import_snippets,c as loading,a as no_connection,d as no_snippets_found,o as remove_snippet,_ as search,r as settings};

A cmd/snippetpixiegui/frontend/dist/assets/index-95462b26.js => cmd/snippetpixiegui/frontend/dist/assets/index-95462b26.js +5 -0
@@ 0,0 1,5 @@
var Ci=Object.defineProperty;var Li=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>(Li(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const Pi="modulepreload",Ni=function(e){return"/"+e},yn={},Oi=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Ni(s),s in yn)return;yn[s]=!0;const o=s.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let f=r.length-1;f>=0;f--){const p=r[f];if(p.href===s&&(!o||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":Pi,o||(a.as="script",a.crossOrigin=""),a.href=s,document.head.appendChild(a),o)return new Promise((f,p)=>{a.addEventListener("load",f),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function G(){}function sn(e,t){for(const n in t)e[n]=t[n];return e}function Qn(e){return e()}function Sn(){return Object.create(null)}function de(e){e.forEach(Qn)}function qe(e){return typeof e=="function"}function J(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let _t;function Mi(e,t){return e===t?!0:(_t||(_t=document.createElement("a")),_t.href=t,e===_t.href)}function xi(e){return Object.keys(e).length===0}function on(e,...t){if(e==null){for(const i of t)i(void 0);return G}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function kn(e){let t;return on(e,n=>t=n)(),t}function ie(e,t,n){e.$$.on_destroy.push(on(t,n))}function ft(e,t,n,i){if(e){const r=Jn(e,t,n,i);return e[0](r)}}function Jn(e,t,n,i){return e[1]&&i?sn(n.ctx.slice(),e[1](i(t))):n.ctx}function ct(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let l=0;l<o;l+=1)s[l]=t.dirty[l]|r[l];return s}return t.dirty|r}return t.dirty}function ht(e,t,n,i,r,s){if(r){const o=Jn(t,n,i,s);e.p(o,r)}}function pt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function Ri(e,t,n){return e.set(n),t}function ln(e){return e&&qe(e.destroy)?e.destroy:G}function T(e,t){e.appendChild(t)}function g(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode&&e.parentNode.removeChild(e)}function Ui(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function P(e){return document.createElement(e)}function X(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function j(e){return document.createTextNode(e)}function R(){return j(" ")}function we(){return j("")}function ne(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function gt(e){return function(t){return t.preventDefault(),e.call(this,t)}}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Di(e){return Array.from(e.childNodes)}function z(e,t){t=""+t,e.data!==t&&(e.data=t)}function je(e,t){e.value=t??""}function W(e,t,n){e.classList.toggle(t,!!n)}function Gi(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function Fe(e,t){return new e(t)}let ot;function it(e){ot=e}function It(){if(!ot)throw new Error("Function called outside component initialization");return ot}function Ze(e){It().$$.on_mount.push(e)}function Yn(e){It().$$.after_update.push(e)}function an(e){It().$$.on_destroy.push(e)}function mt(){const e=It();return(t,n,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Gi(t,n,{cancelable:i});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function lt(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const xe=[],he=[];let Re=[];const Wt=[],Kn=Promise.resolve();let Xt=!1;function ei(){Xt||(Xt=!0,Kn.then(ti))}function un(){return ei(),Kn}function qt(e){Re.push(e)}function Ue(e){Wt.push(e)}const Rt=new Set;let Oe=0;function ti(){if(Oe!==0)return;const e=ot;do{try{for(;Oe<xe.length;){const t=xe[Oe];Oe++,it(t),$i(t.$$)}}catch(t){throw xe.length=0,Oe=0,t}for(it(null),xe.length=0,Oe=0;he.length;)he.pop()();for(let t=0;t<Re.length;t+=1){const n=Re[t];Rt.has(n)||(Rt.add(n),n())}Re.length=0}while(xe.length);for(;Wt.length;)Wt.pop()();Xt=!1,Rt.clear(),it(e)}function $i(e){if(e.fragment!==null){e.update(),de(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(qt)}}function ji(e){const t=[],n=[];Re.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),Re=t}const wt=new Set;let Le;function ae(){Le={r:0,c:[],p:Le}}function ue(){Le.r||de(Le.c),Le=Le.p}function y(e,t){e&&e.i&&(wt.delete(e),e.i(t))}function k(e,t,n,i){if(e&&e.o){if(wt.has(e))return;wt.add(e),Le.c.push(()=>{wt.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function An(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function kt(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],l=t[s];if(l){for(const u in o)u in l||(i[u]=1);for(const u in l)r[u]||(n[u]=l[u],r[u]=1);e[s]=l}else for(const u in o)r[u]=1}for(const o in i)o in n||(n[o]=void 0);return n}function At(e){return typeof e=="object"&&e!==null?e:{}}function De(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function U(e){e&&e.c()}function M(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),qt(()=>{const s=e.$$.on_mount.map(Qn).filter(qe);e.$$.on_destroy?e.$$.on_destroy.push(...s):de(s),e.$$.on_mount=[]}),r.forEach(qt)}function x(e,t){const n=e.$$;n.fragment!==null&&(ji(n.after_update),de(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Fi(e,t){e.$$.dirty[0]===-1&&(xe.push(e),ei(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function K(e,t,n,i,r,s,o,l=[-1]){const u=ot;it(e);const a=e.$$={fragment:null,ctx:[],props:s,update:G,not_equal:r,bound:Sn(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Sn(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(e,t.props||{},(p,h,...m)=>{const d=m.length?m[0]:h;return a.ctx&&r(a.ctx[p],a.ctx[p]=d)&&(!a.skip_bound&&a.bound[p]&&a.bound[p](d),f&&Fi(e,p)),h}):[],a.update(),f=!0,de(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const p=Di(t.target);a.fragment&&a.fragment.l(p),p.forEach(_)}else a.fragment&&a.fragment.c();t.intro&&y(e.$$.fragment),M(e,t.target,t.anchor),ti()}it(u)}class ee{constructor(){xt(this,"$$");xt(this,"$$set")}$destroy(){x(this,1),this.$destroy=G}$on(t,n){if(!qe(n))return G;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!xi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zi="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zi);function Ut(e){window.runtime.LogError(e)}function bt(e){window.runtime.BrowserOpenURL(e)}function Vi(){window.runtime.Quit()}function Wi(e,t){return window.go.main.App.AddSnippet(e,t)}function Xi(){return window.go.main.App.DaemonInstalled()}function qi(){return window.go.main.App.ExportSnippets()}function Zi(){return window.go.main.App.GetAllSnippets()}function Qi(){return window.go.main.App.GetAutoexpandStatus()}function Ji(){return window.go.main.App.GetAutostartStatus()}function ni(e){return window.go.main.App.GetSetting(e)}function ii(e){return window.go.main.App.GetSnippetWithAbbreviation(e)}function Yi(e){return window.go.main.App.GetSnippetWithID(e)}function Ki(e,t){return window.go.main.App.GetSnippets(e,t)}function er(){return window.go.main.App.GetVersion()}function ri(e){return window.go.main.App.ImportSnippets(e)}function tr(e){return window.go.main.App.NilUUID(e)}function nr(e,t){return window.go.main.App.PasteSnippetAndQuit(e,t)}function ir(e){return window.go.main.App.Ping(e)}function rr(e){return window.go.main.App.RemoveSnippet(e)}function sr(e,t){return window.go.main.App.SaveSetting(e,t)}function or(){return window.go.main.App.SearchAndPasteMode()}function oe(e,t){return window.go.main.App.ShowError(e,t)}function lr(){return window.go.main.App.StartDaemon()}function ar(e){return window.go.main.App.UpdateAutoexpand(e)}function ur(e){return window.go.main.App.UpdateAutostart(e)}function fr(e,t){return window.go.main.App.UpdateSnippetWithID(e,t)}const Me=[];function si(e,t){return{subscribe:ke(e,t).subscribe}}function ke(e,t=G){let n;const i=new Set;function r(l){if(J(e,l)&&(e=l,n)){const u=!Me.length;for(const a of i)a[1](),Me.push(a,e);if(u){for(let a=0;a<Me.length;a+=2)Me[a][0](Me[a+1]);Me.length=0}}}function s(l){r(l(e))}function o(l,u=G){const a=[l,u];return i.add(a),i.size===1&&(n=t(r,s)||G),l(e),()=>{i.delete(a),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function Ie(e,t,n){const i=!Array.isArray(e),r=i?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return si(n,(o,l)=>{let u=!1;const a=[];let f=0,p=G;const h=()=>{if(f)return;p();const d=t(i?a[0]:a,o,l);s?o(d):p=qe(d)?d:G},m=r.map((d,b)=>on(d,C=>{a[b]=C,f&=~(1<<b),u&&h()},()=>{f|=1<<b}));return u=!0,h(),function(){de(m),p(),u=!1}})}function cr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hr=function(t){return pr(t)&&!mr(t)};function pr(e){return!!e&&typeof e=="object"}function mr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||gr(e)}var dr=typeof Symbol=="function"&&Symbol.for,_r=dr?Symbol.for("react.element"):60103;function gr(e){return e.$$typeof===_r}function br(e){return Array.isArray(e)?[]:{}}function at(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ze(br(e),e,t):e}function vr(e,t,n){return e.concat(t).map(function(i){return at(i,n)})}function wr(e,t){if(!t.customMerge)return ze;var n=t.customMerge(e);return typeof n=="function"?n:ze}function Er(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Bn(e){return Object.keys(e).concat(Er(e))}function oi(e,t){try{return t in e}catch{return!1}}function yr(e,t){return oi(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Sr(e,t,n){var i={};return n.isMergeableObject(e)&&Bn(e).forEach(function(r){i[r]=at(e[r],n)}),Bn(t).forEach(function(r){yr(e,r)||(oi(e,r)&&n.isMergeableObject(t[r])?i[r]=wr(r,n)(e[r],t[r],n):i[r]=at(t[r],n))}),i}function ze(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||vr,n.isMergeableObject=n.isMergeableObject||hr,n.cloneUnlessOtherwiseSpecified=at;var i=Array.isArray(t),r=Array.isArray(e),s=i===r;return s?i?n.arrayMerge(e,t,n):Sr(e,t,n):at(t,n)}ze.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,r){return ze(i,r,n)},{})};var kr=ze,Ar=kr;const Br=cr(Ar);var Zt=function(e,t){return Zt=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])},Zt(e,t)};function Ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){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)&&(t[s]=n[s])}return t},te.apply(this,arguments)};function Dt(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,s;i<r;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var re;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(re||(re={}));var Ve;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ve||(Ve={}));function Tn(e){return e.type===re.literal}function Tr(e){return e.type===re.argument}function li(e){return e.type===re.number}function ai(e){return e.type===re.date}function ui(e){return e.type===re.time}function fi(e){return e.type===re.select}function ci(e){return e.type===re.plural}function Ir(e){return e.type===re.pound}function hi(e){return e.type===re.tag}function pi(e){return!!(e&&typeof e=="object"&&e.type===Ve.number)}function Qt(e){return!!(e&&typeof e=="object"&&e.type===Ve.dateTime)}var mi=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Hr=/(?:[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 Cr(e){var t={};return e.replace(Hr,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.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":t.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":t.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":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.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":t.minute=["numeric","2-digit"][i-1];break;case"s":t.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":t.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""}),t}var Lr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Pr(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Lr).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var s=r[i],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var l=o[0],u=o.slice(1),a=0,f=u;a<f.length;a++){var p=f[a];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:u})}return n}function Nr(e){return e.replace(/^(.*?)-/,"")}var In=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,di=/^(@+)?(\+|#+)?[rs]?$/g,Or=/(\*)(0+)|(#+)(0+)|(0+)/g,_i=/^(0+)$/;function Hn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(di,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function gi(e){switch(e){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 Mr(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!_i.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Cn(e){var t={},n=gi(e);return n||t}function xr(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Nr(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=te(te(te({},t),{notation:"scientific"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.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(Or,function(u,a,f,p,h,m){if(a)t.minimumIntegerDigits=f.length;else{if(p&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(_i.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(In.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(In,function(u,a,f,p,h,m){return f==="*"?t.minimumFractionDigits=a.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length),""});var s=r.options[0];s==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=te(te({},t),Hn(s)));continue}if(di.test(r.stem)){t=te(te({},t),Hn(r.stem));continue}var o=gi(r.stem);o&&(t=te(te({},t),o));var l=Mr(r.stem);l&&(t=te(te({},t),l))}return t}var vt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","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"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Rr(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var s=0;i+1<e.length&&e.charAt(i+1)===r;)s++,i++;var o=1+(s&1),l=s<2?1:3+(s>>1),u="a",a=Ur(t);for((a=="H"||a=="k")&&(l=0);l-- >0;)n+=u;for(;o-- >0;)n=a+n}else r==="J"?n+="H":n+=r}return n}function Ur(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=vt[i||""]||vt[n||""]||vt["".concat(n,"-001")]||vt["001"];return r[0]}var Gt,Dr=new RegExp("^".concat(mi.source,"*")),Gr=new RegExp("".concat(mi.source,"*$"));function Q(e,t){return{start:e,end:t}}var $r=!!String.prototype.startsWith,jr=!!String.fromCodePoint,Fr=!!Object.fromEntries,zr=!!String.prototype.codePointAt,Vr=!!String.prototype.trimStart,Wr=!!String.prototype.trimEnd,Xr=!!Number.isSafeInteger,qr=Xr?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jt=!0;try{var Zr=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jt=((Gt=Zr.exec("a"))===null||Gt===void 0?void 0:Gt[0])==="a"}catch{Jt=!1}var Ln=$r?function(t,n,i){return t.startsWith(n,i)}:function(t,n,i){return t.slice(i,i+n.length)===n},Yt=jr?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i="",r=t.length,s=0,o;r>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},Pn=Fr?Object.fromEntries:function(t){for(var n={},i=0,r=t;i<r.length;i++){var s=r[i],o=s[0],l=s[1];n[o]=l}return n},bi=zr?function(t,n){return t.codePointAt(n)}:function(t,n){var i=t.length;if(!(n<0||n>=i)){var r=t.charCodeAt(n),s;return r<55296||r>56319||n+1===i||(s=t.charCodeAt(n+1))<56320||s>57343?r:(r-55296<<10)+(s-56320)+65536}},Qr=Vr?function(t){return t.trimStart()}:function(t){return t.replace(Dr,"")},Jr=Wr?function(t){return t.trimEnd()}:function(t){return t.replace(Gr,"")};function vi(e,t){return new RegExp(e,t)}var Kt;if(Jt){var Nn=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kt=function(t,n){var i;Nn.lastIndex=n;var r=Nn.exec(t);return(i=r[1])!==null&&i!==void 0?i:""}}else Kt=function(t,n){for(var i=[];;){var r=bi(t,n);if(r===void 0||wi(r)||ts(r))break;i.push(r),n+=r>=65536?2:1}return Yt.apply(void 0,i)};var Yr=function(){function e(t,n){n===void 0&&(n={}),this.message=t,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 e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,i);if(o.err)return o;r.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),r.push({type:re.pound,location:Q(l,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(q.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&en(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;r.push(o.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:re.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var o=s.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!en(this.char()))return this.error(q.INVALID_TAG,Q(l,this.clonePosition()));var u=this.clonePosition(),a=this.parseTagName();return r!==a?this.error(q.UNMATCHED_CLOSING_TAG,Q(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:re.tag,value:r,children:o,location:Q(i,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Q(l,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(q.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&es(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var s=this.tryParseQuote(n);if(s){r+=s;continue}var o=this.tryParseUnquoted(t,n);if(o){r+=o;continue}var l=this.tryParseLeftAngleBracket();if(l){r+=l;continue}break}var u=Q(i,this.clonePosition());return{val:{type:re.literal,value:r,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Kr(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){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(t==="plural"||t==="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 Yt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Yt(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:re.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Kt(this.message,n),r=n+i.length;this.bumpTo(r);var s=this.clonePosition(),o=Q(t,s);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,n,i,r){var s,o=this.clonePosition(),l=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(l){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Q(o,u));case"number":case"date":case"time":{this.bumpSpace();var a=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var h=Jr(p.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var m=Q(f,this.clonePosition());a={style:h,styleLocation:m}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var b=Q(r,this.clonePosition());if(a&&Ln(a==null?void 0:a.style,"::",0)){var C=Qr(a.style.slice(2));if(l==="number"){var p=this.parseNumberSkeletonFromString(C,a.styleLocation);return p.err?p:{val:{type:re.number,value:i,location:b,style:p.val},err:null}}else{if(C.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,b);var A=C;this.locale&&(A=Rr(C,this.locale));var h={type:Ve.dateTime,pattern:A,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?Cr(A):{}},w=l==="date"?re.date:re.time;return{val:{type:w,value:i,location:b,style:h},err:null}}}return{val:{type:l==="number"?re.number:l==="date"?re.date:re.time,value:i,location:b,style:(s=a==null?void 0:a.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(I,te({},I)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),B=0;if(l!=="select"&&E.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),E=this.parseIdentifierIfPossible(),B=p.val}var L=this.tryParsePluralOrSelectOptions(t,l,n,E);if(L.err)return L;var d=this.tryParseArgumentClose(r);if(d.err)return d;var S=Q(r,this.clonePosition());return l==="select"?{val:{type:re.select,value:i,options:Pn(L.val),location:S},err:null}:{val:{type:re.plural,value:i,options:Pn(L.val),offset:B,pluralType:l==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Q(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=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(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=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}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=Pr(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ve.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?xr(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var s,o=!1,l=[],u=new Set,a=r.value,f=r.location;;){if(a.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Q(p,this.clonePosition()),a=this.message.slice(p.offset,this.offset())}else break}if(u.has(a))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);a==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,i);if(d.err)return d;var b=this.tryParseArgumentClose(m);if(b.err)return b;l.push([a,{value:d.val,location:Q(m,this.clonePosition())}]),u.add(a),this.bumpSpace(),s=this.parseIdentifierIfPossible(),a=s.value,f=s.location}return l.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(q.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,o=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)s=!0,o=o*10+(l-48),this.bump();else break}var u=Q(r,this.clonePosition());return s?(o*=i,qr(o)?{val:o,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=bi(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ln(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&wi(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function en(e){return e>=97&&e<=122||e>=65&&e<=90}function Kr(e){return en(e)||e===47}function es(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function wi(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ts(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function tn(e){e.forEach(function(t){if(delete t.location,fi(t)||ci(t))for(var n in t.options)delete t.options[n].location,tn(t.options[n].value);else li(t)&&pi(t.style)||(ai(t)||ui(t))&&Qt(t.style)?delete t.style.location:hi(t)&&tn(t.children)})}function ns(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yr(e,t).parse();if(n.err){var i=SyntaxError(q[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||tn(n.val),n.val}function $t(e,t){var n=t&&t.cache?t.cache:as,i=t&&t.serializer?t.serializer:ls,r=t&&t.strategy?t.strategy:rs;return r(e,{cache:n,serializer:i})}function is(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Ei(e,t,n,i){var r=is(i)?i:n(i),s=t.get(r);return typeof s>"u"&&(s=e.call(this,i),t.set(r,s)),s}function yi(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return typeof s>"u"&&(s=e.apply(this,i),t.set(r,s)),s}function fn(e,t,n,i,r){return n.bind(t,e,i,r)}function rs(e,t){var n=e.length===1?Ei:yi;return fn(e,this,n,t.cache.create(),t.serializer)}function ss(e,t){return fn(e,this,yi,t.cache.create(),t.serializer)}function os(e,t){return fn(e,this,Ei,t.cache.create(),t.serializer)}var ls=function(){return JSON.stringify(arguments)};function cn(){this.cache=Object.create(null)}cn.prototype.get=function(e){return this.cache[e]};cn.prototype.set=function(e,t){this.cache[e]=t};var as={create:function(){return new cn}},jt={variadic:ss,monadic:os},We;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(We||(We={}));var Ct=function(e){Ht(t,e);function t(n,i,r){var s=e.call(this,n)||this;return s.code=i,s.originalMessage=r,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),On=function(e){Ht(t,e);function t(n,i,r,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),We.INVALID_VALUE,s)||this}return t}(Ct),us=function(e){Ht(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),We.INVALID_VALUE,r)||this}return t}(Ct),fs=function(e){Ht(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),We.MISSING_VALUE,i)||this}return t}(Ct),ce;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ce||(ce={}));function cs(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==ce.literal||n.type!==ce.literal?t.push(n):i.value+=n.value,t},[])}function hs(e){return typeof e=="function"}function Et(e,t,n,i,r,s,o){if(e.length===1&&Tn(e[0]))return[{type:ce.literal,value:e[0].value}];for(var l=[],u=0,a=e;u<a.length;u++){var f=a[u];if(Tn(f)){l.push({type:ce.literal,value:f.value});continue}if(Ir(f)){typeof s=="number"&&l.push({type:ce.literal,value:n.getNumberFormat(t).format(s)});continue}var p=f.value;if(!(r&&p in r))throw new fs(p,o);var h=r[p];if(Tr(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),l.push({type:typeof h=="string"?ce.literal:ce.object,value:h});continue}if(ai(f)){var m=typeof f.style=="string"?i.date[f.style]:Qt(f.style)?f.style.parsedOptions:void 0;l.push({type:ce.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(ui(f)){var m=typeof f.style=="string"?i.time[f.style]:Qt(f.style)?f.style.parsedOptions:i.time.medium;l.push({type:ce.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(li(f)){var m=typeof f.style=="string"?i.number[f.style]:pi(f.style)?f.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),l.push({type:ce.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(hi(f)){var d=f.children,b=f.value,C=r[b];if(!hs(C))throw new us(b,"function",o);var A=Et(d,t,n,i,r,s),w=C(A.map(function(B){return B.value}));Array.isArray(w)||(w=[w]),l.push.apply(l,w.map(function(B){return{type:typeof B=="string"?ce.literal:ce.object,value:B}}))}if(fi(f)){var I=f.options[h]||f.options.other;if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,Et(I.value,t,n,i,r));continue}if(ci(f)){var I=f.options["=".concat(h)];if(!I){if(!Intl.PluralRules)throw new Ct(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,We.MISSING_INTL_API,o);var E=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));I=f.options[E]||f.options.other}if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,Et(I.value,t,n,i,r,h-(f.offset||0)));continue}}return cs(l)}function ps(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=te(te({},e[i]),t[i]||{}),n},{})):e}function ms(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=ps(e[i],t[i]),n},te({},e)):e}function Ft(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ds(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.number),strategy:jt.variadic}),getDateTimeFormat:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.dateTime),strategy:jt.variadic}),getPluralRules:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.pluralRules),strategy:jt.variadic})}}var _s=function(){function e(t,n,i,r){var s=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(o){var l=s.formatToParts(o);if(l.length===1)return l[0].value;var u=l.reduce(function(a,f){return!a.length||f.type!==ce.literal||typeof a[a.length-1]!="string"?a.push(f.value):a[a.length-1]+=f.value,a},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(o){return Et(s.ast,s.locales,s.formatters,s.formats,o,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:r==null?void 0:r.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ms(e.formats,i),this.formatters=r&&r.formatters||ds(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=ns,e.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"}}},e}();const Te={},gs=(e,t,n)=>n&&(t in Te||(Te[t]={}),e in Te[t]||(Te[t][e]=n),n),Si=(e,t)=>{if(t==null)return;if(t in Te&&e in Te[t])return Te[t][e];const n=dt(t);for(let i=0;i<n.length;i++){const r=bs(n[i],e);if(r)return gs(e,t,r)}};let hn;const Qe=ke({});function pn(e){return e in hn}function bs(e,t){if(!pn(e))return null;const n=function(i){return hn[i]||null}(e);return function(i,r){if(r==null)return;if(r in i)return i[r];const s=r.split(".");let o=i;for(let l=0;l<s.length;l++)if(typeof o=="object"){if(l>0){const u=s.slice(l,s.length).join(".");if(u in o){o=o[u];break}}o=o[s[l]]}else o=void 0;return o}(n,t)}function vs(e,...t){delete Te[e],Qe.update(n=>(n[e]=Br.all([n[e]||{},...t]),n))}Ie([Qe],([e])=>Object.keys(e));Qe.subscribe(e=>hn=e);const rt={};function st(e){return rt[e]}function Bt(e){return e!=null&&dt(e).some(t=>{var n;return(n=st(t))===null||n===void 0?void 0:n.size})}function ws(e,t){return Promise.all(t.map(i=>(function(r,s){rt[r].delete(s),rt[r].size===0&&delete rt[r]}(e,i),i().then(r=>r.default||r)))).then(i=>vs(e,...i))}const et={};function ki(e){if(!Bt(e))return e in et?et[e]:Promise.resolve();const t=function(n){return dt(n).map(i=>{const r=st(i);return[i,r?[...r]:[]]}).filter(([,i])=>i.length>0)}(e);return et[e]=Promise.all(t.map(([n,i])=>ws(n,i))).then(()=>{if(Bt(e))return ki(e);delete et[e]}),et[e]}function Es(e,t){st(e)||function(i){rt[i]=new Set}(e);const n=st(e);st(e).has(t)||(pn(e)||Qe.update(i=>(i[e]={},i)),n.add(t))}function ys({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${dt(e).join('", "')}".${Bt(He())?`

Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const tt={fallbackLocale:null,loadingDelay:200,formats:{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"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Xe(){return tt}function Ss(e){const{formats:t,...n}=e,i=e.initialLocale||e.fallbackLocale;return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=ys:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(tt,n,{initialLocale:i}),t&&("number"in t&&Object.assign(tt.formats.number,t.number),"date"in t&&Object.assign(tt.formats.date,t.date),"time"in t&&Object.assign(tt.formats.time,t.time)),Je.set(i)}const yt=ke(!1);let nn;const St=ke(null);function Mn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function dt(e,t=Xe().fallbackLocale){const n=Mn(e);return t?[...new Set([...n,...Mn(t)])]:n}function He(){return nn??void 0}St.subscribe(e=>{nn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Je={...St,set:e=>{if(e&&function(t){if(t==null)return;const n=dt(t);for(let i=0;i<n.length;i++){const r=n[i];if(pn(r))return r}}(e)&&Bt(e)){const{loadingDelay:t}=Xe();let n;return typeof window<"u"&&He()!=null&&t?n=window.setTimeout(()=>yt.set(!0),t):yt.set(!0),ki(e).then(()=>{St.set(e)}).finally(()=>{clearTimeout(n),yt.set(!1)})}return St.set(e)}},ks=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Lt=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},ut=(e,t)=>{const{formats:n}=Xe();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},As=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=ut("number",t)),new Intl.NumberFormat(e,n)}),Bs=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=ut("date",t):Object.keys(n).length===0&&(n=ut("date","short")),new Intl.DateTimeFormat(e,n)}),Ts=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=ut("time",t):Object.keys(n).length===0&&(n=ut("time","short")),new Intl.DateTimeFormat(e,n)}),Is=({locale:e=He(),...t}={})=>As({locale:e,...t}),Hs=({locale:e=He(),...t}={})=>Bs({locale:e,...t}),Cs=({locale:e=He(),...t}={})=>Ts({locale:e,...t}),Ls=Lt((e,t=He())=>new _s(e,t,Xe().formats,{ignoreTag:Xe().ignoreTag})),Ps=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:l,locale:u=He(),default:a}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Si(e,u);if(f){if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f}else f=(s=(r=(i=(n=Xe()).handleMissingMessage)===null||i===void 0?void 0:i.call(n,{locale:u,id:e,defaultValue:a}))!==null&&r!==void 0?r:a)!==null&&s!==void 0?s:e;if(!l)return f;let p=f;try{p=Ls(f,u).format(l)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return p},Ns=(e,t)=>Cs(t).format(e),Os=(e,t)=>Hs(t).format(e),Ms=(e,t)=>Is(t).format(e),xs=(e,t=He())=>Si(e,t),_e=Ie([Je,Qe],()=>Ps);Ie([Je],()=>Ns);Ie([Je],()=>Os);Ie([Je],()=>Ms);Ie([Je,Qe],()=>xs);function Rs(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,i,r,s,o=[],l="",u=e.split("/");for(u[0]||u.shift();r=u.shift();)n=r[0],n==="*"?(o.push("wild"),l+="/(.*)"):n===":"?(i=r.indexOf("?",1),s=r.indexOf(".",1),o.push(r.substring(1,~i?i:~s?s:r.length)),l+=~i&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(l+=(~i?"?":"")+"\\"+r.substring(s))):l+="/"+r;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}function Us(e){let t,n,i;const r=[e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&4)a=kt(r,[At(l[2])]);else for(let f=0;f<r.length;f+=1)a=sn(a,r[f]);return{props:a}}return s&&(t=Fe(s,o(e)),t.$on("routeEvent",e[7])),{c(){t&&U(t.$$.fragment),n=we()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){ae();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ue()}s?(t=Fe(s,o(l,u)),t.$on("routeEvent",l[7]),U(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&4?kt(r,[At(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Ds(e){let t,n,i;const r=[{params:e[1]},e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&6)a=kt(r,[u&2&&{params:l[1]},u&4&&At(l[2])]);else for(let f=0;f<r.length;f+=1)a=sn(a,r[f]);return{props:a}}return s&&(t=Fe(s,o(e)),t.$on("routeEvent",e[6])),{c(){t&&U(t.$$.fragment),n=we()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){ae();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ue()}s?(t=Fe(s,o(l,u)),t.$on("routeEvent",l[6]),U(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&6?kt(r,[u&2&&{params:l[1]},u&4&&At(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Gs(e){let t,n,i,r;const s=[Ds,Us],o=[];function l(u,a){return u[1]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function xn(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let i="";return n>-1&&(i=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:i}}const mn=si(null,function(t){t(xn());const n=()=>{t(xn())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}});Ie(mn,e=>e.location);Ie(mn,e=>e.querystring);const Rn=ke(void 0);async function Ge(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await un(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function ve(){await un(),window.history.back()}function $s(e){e?window.scrollTo(e.__svelte_spa_router_scrollX,e.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function js(e,t,n){let{routes:i={}}=t,{prefix:r=""}=t,{restoreScrollState:s=!1}=t;class o{constructor(B,L){if(!L||typeof L!="function"&&(typeof L!="object"||L._sveltesparouter!==!0))throw Error("Invalid component object");if(!B||typeof B=="string"&&(B.length<1||B.charAt(0)!="/"&&B.charAt(0)!="*")||typeof B=="object"&&!(B instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:S,keys:O}=Rs(B);this.path=B,typeof L=="object"&&L._sveltesparouter===!0?(this.component=L.component,this.conditions=L.conditions||[],this.userData=L.userData,this.props=L.props||{}):(this.component=()=>Promise.resolve(L),this.conditions=[],this.props={}),this._pattern=S,this._keys=O}match(B){if(r){if(typeof r=="string")if(B.startsWith(r))B=B.substr(r.length)||"/";else return null;else if(r instanceof RegExp){const v=B.match(r);if(v&&v[0])B=B.substr(v[0].length)||"/";else return null}}const L=this._pattern.exec(B);if(L===null)return null;if(this._keys===!1)return L;const S={};let O=0;for(;O<this._keys.length;){try{S[this._keys[O]]=decodeURIComponent(L[O+1]||"")||null}catch{S[this._keys[O]]=null}O++}return S}async checkConditions(B){for(let L=0;L<this.conditions.length;L++)if(!await this.conditions[L](B))return!1;return!0}}const l=[];i instanceof Map?i.forEach((E,B)=>{l.push(new o(B,E))}):Object.keys(i).forEach(E=>{l.push(new o(E,i[E]))});let u=null,a=null,f={};const p=mt();async function h(E,B){await un(),p(E,B)}let m=null,d=null;s&&(d=E=>{E.state&&(E.state.__svelte_spa_router_scrollY||E.state.__svelte_spa_router_scrollX)?m=E.state:m=null},window.addEventListener("popstate",d),Yn(()=>{$s(m)}));let b=null,C=null;const A=mn.subscribe(async E=>{b=E;let B=0;for(;B<l.length;){const L=l[B].match(E.location);if(!L){B++;continue}const S={route:l[B].path,location:E.location,querystring:E.querystring,userData:l[B].userData,params:L&&typeof L=="object"&&Object.keys(L).length?L:null};if(!await l[B].checkConditions(S)){n(0,u=null),C=null,h("conditionsFailed",S);return}h("routeLoading",Object.assign({},S));const O=l[B].component;if(C!=O){O.loading?(n(0,u=O.loading),C=O,n(1,a=O.loadingParams),n(2,f={}),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a}))):(n(0,u=null),C=null);const v=await O();if(E!=b)return;n(0,u=v&&v.default||v),C=O}L&&typeof L=="object"&&Object.keys(L).length?n(1,a=L):n(1,a=null),n(2,f=l[B].props),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a})).then(()=>{Rn.set(a)});return}n(0,u=null),C=null,Rn.set(void 0)});an(()=>{A(),d&&window.removeEventListener("popstate",d)});function w(E){lt.call(this,e,E)}function I(E){lt.call(this,e,E)}return e.$$set=E=>{"routes"in E&&n(3,i=E.routes),"prefix"in E&&n(4,r=E.prefix),"restoreScrollState"in E&&n(5,s=E.restoreScrollState)},e.$$.update=()=>{e.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[u,a,f,i,r,s,w,I]}class Fs extends ee{constructor(t){super(),K(this,t,js,Gs,J,{routes:3,prefix:4,restoreScrollState:5})}}const pe=ke(!1),nt=ke(!1),Tt=ke(!1);function Ai(){const{subscribe:e,set:t,update:n}=ke([]);return{subscribe:e,fetch:async()=>{if(!kn(pe))return;const i=await Zi();n(r=>i)},search:async(i,r)=>{if(!kn(pe))return;const s=await Ki(i,r);n(o=>s)},reset:()=>t([])}}const Pe=Ai(),zt=ke(""),Vt=Ai();function zs(e){let t,n,i,r;return{c(){t=X("svg"),n=X("polyline"),i=X("polyline"),c(n,"points","11 17 6 12 11 7"),c(i,"points","18 17 13 12 18 7"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-chevrons-left "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-chevrons-left "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function Vs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Bi extends ee{constructor(t){super(),K(this,t,Vs,zs,J,{size:0,strokeWidth:1,class:2})}}function Ws(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("line"),r=X("line"),c(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),c(i,"x1","18"),c(i,"y1","9"),c(i,"x2","12"),c(i,"y2","15"),c(r,"x1","12"),c(r,"y1","9"),c(r,"x2","18"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-delete "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-delete "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Xs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class qs extends ee{constructor(t){super(),K(this,t,Xs,Ws,J,{size:0,strokeWidth:1,class:2})}}function Zs(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","7 10 12 15 17 10"),c(r,"x1","12"),c(r,"y1","15"),c(r,"x2","12"),c(r,"y2","3"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-download "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-download "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Qs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Js extends ee{constructor(t){super(),K(this,t,Qs,Zs,J,{size:0,strokeWidth:1,class:2})}}function Ys(e){let t,n,i,r;return{c(){t=X("svg"),n=X("path"),i=X("path"),c(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),c(i,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-edit "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-edit "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function Ks(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class eo extends ee{constructor(t){super(),K(this,t,Ks,Ys,J,{size:0,strokeWidth:1,class:2})}}function to(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("path"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),c(r,"x1","12"),c(r,"y1","17"),c(r,"x2","12.01"),c(r,"y2","17"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-help-circle "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-help-circle "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function no(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class io extends ee{constructor(t){super(),K(this,t,no,to,J,{size:0,strokeWidth:1,class:2})}}function ro(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("line"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"x1","12"),c(i,"y1","16"),c(i,"x2","12"),c(i,"y2","12"),c(r,"x1","12"),c(r,"y1","8"),c(r,"x2","12.01"),c(r,"y2","8"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-info "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-info "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function so(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class oo extends ee{constructor(t){super(),K(this,t,so,ro,J,{size:0,strokeWidth:1,class:2})}}function lo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("rect"),i=X("line"),r=X("line"),c(n,"x","3"),c(n,"y","3"),c(n,"width","18"),c(n,"height","18"),c(n,"rx","2"),c(n,"ry","2"),c(i,"x1","12"),c(i,"y1","8"),c(i,"x2","12"),c(i,"y2","16"),c(r,"x1","8"),c(r,"y1","12"),c(r,"x2","16"),c(r,"y2","12"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-plus-square "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-plus-square "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function ao(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class dn extends ee{constructor(t){super(),K(this,t,ao,lo,J,{size:0,strokeWidth:1,class:2})}}function uo(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("line"),c(n,"cx","11"),c(n,"cy","11"),c(n,"r","8"),c(i,"x1","21"),c(i,"y1","21"),c(i,"x2","16.65"),c(i,"y2","16.65"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-search "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-search "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function fo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class co extends ee{constructor(t){super(),K(this,t,fo,uo,J,{size:0,strokeWidth:1,class:2})}}function ho(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("path"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","3"),c(i,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-settings "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-settings "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function po(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ti extends ee{constructor(t){super(),K(this,t,po,ho,J,{size:0,strokeWidth:1,class:2})}}function mo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","17 8 12 3 7 8"),c(r,"x1","12"),c(r,"y1","3"),c(r,"x2","12"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-upload "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-upload "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function _o(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class rn extends ee{constructor(t){super(),K(this,t,_o,mo,J,{size:0,strokeWidth:1,class:2})}}function go(e){let t,n;const i=e[5].default,r=ft(i,e,e[4],null);return{c(){t=P("p"),r&&r.c(),c(t,"class","svelte-hclhr3"),W(t,"error",e[3]),W(t,"warning",e[0]),W(t,"success",e[1]),W(t,"info",e[2])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&16)&&ht(r,i,s,s[4],n?ct(i,s[4],o,null):pt(s[4]),null),(!n||o&8)&&W(t,"error",s[3]),(!n||o&1)&&W(t,"warning",s[0]),(!n||o&2)&&W(t,"success",s[1]),(!n||o&4)&&W(t,"info",s[2])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function bo(e,t,n){let{$$slots:i={},$$scope:r}=t,{error:s=!1}=t,{warning:o=!1}=t,{success:l=!1}=t,{info:u=!1}=t;return o=s&&o?!1:o,l=(s||o)&&l?!1:l,u=!(s||o||l),e.$$set=a=>{"error"in a&&n(3,s=a.error),"warning"in a&&n(0,o=a.warning),"success"in a&&n(1,l=a.success),"info"in a&&n(2,u=a.info),"$$scope"in a&&n(4,r=a.$$scope)},[o,l,u,s,r,i]}class Pt extends ee{constructor(t){super(),K(this,t,bo,go,J,{error:3,warning:0,success:1,info:2})}}function vo(e){let t=e[0]("no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("no_connection")+"")&&z(n,t)},d(i){i&&_(n)}}}function wo(e){let t,n;return t=new Pt({props:{error:!0,$$slots:{default:[vo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Eo(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class yo extends ee{constructor(t){super(),K(this,t,Eo,wo,J,{})}}function So(e){let t,n,i,r;const s=e[5].default,o=ft(s,e,e[4],null);return{c(){t=P("button"),o&&o.c(),t.disabled=e[3],c(t,"class","svelte-1jbd97"),W(t,"primary",e[0]),W(t,"danger",e[1]),W(t,"secondary",e[2])},m(l,u){g(l,t,u),o&&o.m(t,null),n=!0,i||(r=ne(t,"click",e[6]),i=!0)},p(l,[u]){o&&o.p&&(!n||u&16)&&ht(o,s,l,l[4],n?ct(s,l[4],u,null):pt(l[4]),null),(!n||u&8)&&(t.disabled=l[3]),(!n||u&1)&&W(t,"primary",l[0]),(!n||u&2)&&W(t,"danger",l[1]),(!n||u&4)&&W(t,"secondary",l[2])},i(l){n||(y(o,l),n=!0)},o(l){k(o,l),n=!1},d(l){l&&_(t),o&&o.d(l),i=!1,r()}}}function ko(e,t,n){let{$$slots:i={},$$scope:r}=t,{primary:s=!1}=t,{danger:o=!1}=t,{secondary:l=!1}=t,{disabled:u=!1}=t;s=!s&&!l&&!o?!0:s,o=s&&o?!1:o,l=(s||o)&&l?!1:l;function a(f){lt.call(this,e,f)}return e.$$set=f=>{"primary"in f&&n(0,s=f.primary),"danger"in f&&n(1,o=f.danger),"secondary"in f&&n(2,l=f.secondary),"disabled"in f&&n(3,u=f.disabled),"$$scope"in f&&n(4,r=f.$$scope)},[s,o,l,u,r,i,a]}class $e extends ee{constructor(t){super(),K(this,t,ko,So,J,{primary:0,danger:1,secondary:2,disabled:3})}}function Ao(e){let t=e[0]("daemon.start")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.start")+"")&&z(n,t)},d(i){i&&_(n)}}}function Bo(e){let t=e[0]("daemon.installed")+"",n,i,r,s;return r=new $e({props:{$$slots:{default:[Ao]},$$scope:{ctx:e}}}),r.$on("click",e[1]),{c(){n=j(t),i=R(),U(r.$$.fragment)},m(o,l){g(o,n,l),g(o,i,l),M(r,o,l),s=!0},p(o,l){(!s||l&1)&&t!==(t=o[0]("daemon.installed")+"")&&z(n,t);const u={};l&5&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){s||(y(r.$$.fragment,o),s=!0)},o(o){k(r.$$.fragment,o),s=!1},d(o){o&&(_(n),_(i)),x(r,o)}}}function To(e){let t,n;return t=new Pt({props:{warning:!0,$$slots:{default:[Bo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&5&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Io(e,t,n){let i;ie(e,_e,s=>n(0,i=s));async function r(){Tt.update(s=>!0);try{const s=await lr()}catch(s){await oe(i("daemon.start_error_title"),s),Tt.update(o=>!1)}await Pe.fetch()}return[i,r]}class Ho extends ee{constructor(t){super(),K(this,t,Io,To,J,{})}}function Co(e){let t=e[0]("daemon.not_installed")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.not_installed")+"")&&z(n,t)},d(i){i&&_(n)}}}function Lo(e){let t,n;return t=new Pt({props:{error:!0,$$slots:{default:[Co]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Po(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class No extends ee{constructor(t){super(),K(this,t,Po,Lo,J,{})}}function Oo(e){let t=e[0]("daemon.starting")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.starting")+"")&&z(n,t)},d(i){i&&_(n)}}}function Mo(e){let t,n;return t=new Pt({props:{warning:!0,$$slots:{default:[Oo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function xo(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class Ro extends ee{constructor(t){super(),K(this,t,xo,Mo,J,{})}}function Un(e){let t,n,i,r,s,o;t=new yo({});const l=[Go,Do,Uo],u=[];function a(f,p){return f[2]&&!f[3]?0:f[2]&&f[3]?1:2}return i=a(e),r=u[i]=l[i](e),{c(){U(t.$$.fragment),n=R(),r.c(),s=we()},m(f,p){M(t,f,p),g(f,n,p),u[i].m(f,p),g(f,s,p),o=!0},p(f,p){let h=i;i=a(f),i!==h&&(ae(),k(u[h],1,1,()=>{u[h]=null}),ue(),r=u[i],r||(r=u[i]=l[i](f),r.c()),y(r,1),r.m(s.parentNode,s))},i(f){o||(y(t.$$.fragment,f),y(r),o=!0)},o(f){k(t.$$.fragment,f),k(r),o=!1},d(f){f&&(_(n),_(s)),x(t,f),u[i].d(f)}}}function Uo(e){let t,n;return t=new No({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Do(e){let t,n;return t=new Ro({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Go(e){let t,n;return t=new Ho({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function $o(e){let t,n,i,r,s,o=!e[1]&&Un(e);const l=e[6].default,u=ft(l,e,e[5],null);return{c(){t=P("div"),o&&o.c(),n=R(),u&&u.c(),c(t,"class","screen svelte-i096ea"),W(t,"centered",e[0])},m(a,f){g(a,t,f),o&&o.m(t,null),T(t,n),u&&u.m(t,null),i=!0,r||(s=[ne(t,"keyup",e[4]),ne(t,"keyup",e[7])],r=!0)},p(a,[f]){a[1]?o&&(ae(),k(o,1,1,()=>{o=null}),ue()):o?(o.p(a,f),f&2&&y(o,1)):(o=Un(a),o.c(),y(o,1),o.m(t,n)),u&&u.p&&(!i||f&32)&&ht(u,l,a,a[5],i?ct(l,a[5],f,null):pt(a[5]),null),(!i||f&1)&&W(t,"centered",a[0])},i(a){i||(y(o),y(u,a),i=!0)},o(a){k(o),k(u,a),i=!1},d(a){a&&_(t),o&&o.d(),u&&u.d(a),r=!1,de(s)}}}function jo(e,t,n){let i,r,s;ie(e,pe,h=>n(1,i=h)),ie(e,nt,h=>n(2,r=h)),ie(e,Tt,h=>n(3,s=h));let{$$slots:o={},$$scope:l}=t,{centered:u=!1}=t;const a=mt();function f(h){h.key==="Escape"&&(h.preventDefault(),a("cancel"))}function p(h){lt.call(this,e,h)}return e.$$set=h=>{"centered"in h&&n(0,u=h.centered),"$$scope"in h&&n(5,l=h.$$scope)},[u,i,r,s,f,l,o,p]}class Ye extends ee{constructor(t){super(),K(this,t,jo,$o,J,{centered:0})}}function Fo(e){let t,n,i,r,s,o,l,u;var a=e[0];function f(m,d){return{props:{size:m[2],strokeWidth:m[3]}}}a&&(i=Fe(a,f(e)));const p=e[10].default,h=ft(p,e,e[9],null);return{c(){t=P("div"),n=P("div"),i&&U(i.$$.fragment),s=R(),h&&h.c(),c(n,"class",r="icon-wrapper "+e[1]+" svelte-bhj2u4"),c(t,"class","content svelte-bhj2u4"),c(t,"tabindex","0"),c(t,"title",e[5]),W(t,"centered",e[6]),W(t,"horizontal",e[4])},m(m,d){g(m,t,d),T(t,n),i&&M(i,n,null),T(t,s),h&&h.m(t,null),o=!0,l||(u=[ne(t,"click",e[7]),ne(t,"keyup",e[8])],l=!0)},p(m,[d]){if(d&1&&a!==(a=m[0])){if(i){ae();const b=i;k(b.$$.fragment,1,0,()=>{x(b,1)}),ue()}a?(i=Fe(a,f(m)),U(i.$$.fragment),y(i.$$.fragment,1),M(i,n,null)):i=null}else if(a){const b={};d&4&&(b.size=m[2]),d&8&&(b.strokeWidth=m[3]),i.$set(b)}(!o||d&2&&r!==(r="icon-wrapper "+m[1]+" svelte-bhj2u4"))&&c(n,"class",r),h&&h.p&&(!o||d&512)&&ht(h,p,m,m[9],o?ct(p,m[9],d,null):pt(m[9]),null),(!o||d&32)&&c(t,"title",m[5]),(!o||d&16)&&W(t,"horizontal",m[4])},i(m){o||(i&&y(i.$$.fragment,m),y(h,m),o=!0)},o(m){i&&k(i.$$.fragment,m),k(h,m),o=!1},d(m){m&&_(t),i&&x(i),h&&h.d(m),l=!1,de(u)}}}function zo(e,t,n){let{$$slots:i={},$$scope:r}=t,{icon:s=io}=t,{iconClass:o}=t,{size:l="24"}=t,{strokeWidth:u="2"}=t,{horizontal:a=!1}=t,{title:f=""}=t;const p=!a,h=mt();function m(){h("activate")}function d(b){(b.key==="Enter"||b.key===" ")&&h("activate")}return e.$$set=b=>{"icon"in b&&n(0,s=b.icon),"iconClass"in b&&n(1,o=b.iconClass),"size"in b&&n(2,l=b.size),"strokeWidth"in b&&n(3,u=b.strokeWidth),"horizontal"in b&&n(4,a=b.horizontal),"title"in b&&n(5,f=b.title),"$$scope"in b&&n(9,r=b.$$scope)},[s,o,l,u,a,f,p,m,d,r,i]}class me extends ee{constructor(t){super(),K(this,t,zo,Fo,J,{icon:0,iconClass:1,size:2,strokeWidth:3,horizontal:4,title:5})}}function Vo(e,t){t&&setTimeout(()=>{e.focus(),e.select()},250)}function Dn(e){let t,n;return{c(){t=P("label"),n=j(e[4]),c(t,"for",e[3])},m(i,r){g(i,t,r),T(t,n)},p(i,r){r&16&&z(n,i[4]),r&8&&c(t,"for",i[3])},d(i){i&&_(t)}}}function Gn(e){let t,n,i,r,s;return n=new co({}),{c(){t=P("button"),U(n.$$.fragment),c(t,"class","search-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[6]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=ne(t,"click",e[14]),r=!0)},p(o,l){(!i||l&64)&&c(t,"title",o[6]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function $n(e){let t,n,i,r,s;return n=new qs({}),{c(){t=P("button"),U(n.$$.fragment),c(t,"class","clear-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[7]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=ne(t,"click",e[15]),r=!0)},p(o,l){(!i||l&128)&&c(t,"title",o[7]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function jn(e){let t;return{c(){t=P("div"),c(t,"class","error-message svelte-8p6spj")},m(n,i){g(n,t,i),t.innerHTML=e[11]},p(n,i){i&2048&&(t.innerHTML=n[11])},d(n){n&&_(t)}}}function Wo(e){let t,n,i,r,s,o,l,u,a,f,p,h,m=e[4]&&Dn(e),d=e[9]&&Gn(e),b=e[9]&&e[0]&&$n(e),C=!e[9]&&jn(e);return{c(){t=P("div"),m&&m.c(),n=R(),i=P("div"),d&&d.c(),r=R(),s=P("input"),l=R(),b&&b.c(),u=R(),C&&C.c(),a=we(),c(s,"type","text"),c(s,"id",e[3]),c(s,"name",e[3]),c(s,"placeholder",e[5]),c(s,"tabindex",e[10]),c(s,"class","svelte-8p6spj"),W(s,"search",e[9]),W(s,"focussed",e[2]),W(s,"value",e[0]),c(i,"class","input-control svelte-8p6spj"),c(t,"class","input svelte-8p6spj")},m(A,w){g(A,t,w),m&&m.m(t,null),T(t,n),T(t,i),d&&d.m(i,null),T(i,r),T(i,s),je(s,e[0]),e[18](s),T(i,l),b&&b.m(i,null),g(A,u,w),C&&C.m(A,w),g(A,a,w),f=!0,p||(h=[ne(s,"input",e[17]),ne(s,"focusin",e[12]),ne(s,"focusout",e[13]),ln(o=Vo.call(null,s,e[8]))],p=!0)},p(A,[w]){A[4]?m?m.p(A,w):(m=Dn(A),m.c(),m.m(t,n)):m&&(m.d(1),m=null),A[9]?d?(d.p(A,w),w&512&&y(d,1)):(d=Gn(A),d.c(),y(d,1),d.m(i,r)):d&&(ae(),k(d,1,1,()=>{d=null}),ue()),(!f||w&8)&&c(s,"id",A[3]),(!f||w&8)&&c(s,"name",A[3]),(!f||w&32)&&c(s,"placeholder",A[5]),(!f||w&1024)&&c(s,"tabindex",A[10]),w&1&&s.value!==A[0]&&je(s,A[0]),o&&qe(o.update)&&w&256&&o.update.call(null,A[8]),(!f||w&512)&&W(s,"search",A[9]),(!f||w&4)&&W(s,"focussed",A[2]),(!f||w&1)&&W(s,"value",A[0]),A[9]&&A[0]?b?(b.p(A,w),w&513&&y(b,1)):(b=$n(A),b.c(),y(b,1),b.m(i,null)):b&&(ae(),k(b,1,1,()=>{b=null}),ue()),A[9]?C&&(C.d(1),C=null):C?C.p(A,w):(C=jn(A),C.c(),C.m(a.parentNode,a))},i(A){f||(y(d),y(b),f=!0)},o(A){k(d),k(b),f=!1},d(A){A&&(_(t),_(u),_(a)),m&&m.d(),d&&d.d(),e[18](null),b&&b.d(),C&&C.d(A),p=!1,de(h)}}}function Xo(e,t,n){let i;const r=mt();let{name:s="input"}=t,{label:o=""}=t,{value:l=""}=t,{errorMessage:u=""}=t,{placeholder:a=""}=t,{searchButtonTitle:f=""}=t,{clearButtonTitle:p=""}=t,{autofocus:h=!1}=t,{search:m=!1}=t,{tabindex:d=0}=t,{ref:b}=t,{focussed:C=h}=t;function A(){n(2,C=!0)}function w(){n(2,C=!1)}function I(){r("query",l),document.getElementById(s).focus()}function E(){n(0,l=""),document.getElementById(s).focus()}function B(){l=this.value,n(0,l)}function L(S){he[S?"unshift":"push"](()=>{b=S,n(1,b)})}return e.$$set=S=>{"name"in S&&n(3,s=S.name),"label"in S&&n(4,o=S.label),"value"in S&&n(0,l=S.value),"errorMessage"in S&&n(16,u=S.errorMessage),"placeholder"in S&&n(5,a=S.placeholder),"searchButtonTitle"in S&&n(6,f=S.searchButtonTitle),"clearButtonTitle"in S&&n(7,p=S.clearButtonTitle),"autofocus"in S&&n(8,h=S.autofocus),"search"in S&&n(9,m=S.search),"tabindex"in S&&n(10,d=S.tabindex),"ref"in S&&n(1,b=S.ref),"focussed"in S&&n(2,C=S.focussed)},e.$$.update=()=>{e.$$.dirty&65536&&n(11,i=u||"&nbsp;")},[l,b,C,s,o,a,f,p,h,m,d,i,A,w,I,E,u,B,L]}class _n extends ee{constructor(t){super(),K(this,t,Xo,Wo,J,{name:3,label:4,value:0,errorMessage:16,placeholder:5,searchButtonTitle:6,clearButtonTitle:7,autofocus:8,search:9,tabindex:10,ref:1,focussed:2})}}function Ii(e,t){t&&e.focus()}function qo(e){let t;return{c(){t=j(e[0])},m(n,i){g(n,t,i)},p(n,i){i&1&&z(t,n[0])},d(n){n&&_(t)}}}function Zo(e){let t;return{c(){t=j(" ")},m(n,i){g(n,t,i)},p:G,d(n){n&&_(t)}}}function Qo(e){let t;function n(s,o){return s[1]?Zo:qo}let r=n(e)(e);return{c(){t=P("span"),r.c(),c(t,"class","shortcut-button svelte-11t060e"),W(t,"hide",e[1])},m(s,o){g(s,t,o),r.m(t,null)},p(s,[o]){r.p(s,o)},i:G,o:G,d(s){s&&_(t),r.d()}}}function Jo(e,t,n){let{shortcut:i=""}=t;const r=i.length===0;return e.$$set=s=>{"shortcut"in s&&n(0,i=s.shortcut)},[i,r]}class Hi extends ee{constructor(t){super(),K(this,t,Jo,Qo,J,{shortcut:0})}}function Fn(e){let t,n;return t=new Hi({props:{shortcut:e[6]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&64&&(s.shortcut=i[6]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function zn(e){let t,n,i;return n=new eo({props:{size:"1.25x"}}),{c(){t=P("div"),U(n.$$.fragment),c(t,"class","edit-icon-wrapper svelte-1ebkg7o")},m(r,s){g(r,t,s),M(n,t,null),i=!0},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function Yo(e){let t,n,i,r,s,o=e[0].body+"",l,u,a,f,p,h=e[4]&&Fn(e);i=new Hi({props:{shortcut:e[0].abbreviation}});let m=!e[4]&&zn();return{c(){t=P("li"),h&&h.c(),n=R(),U(i.$$.fragment),r=R(),s=P("span"),l=j(o),u=R(),m&&m.c(),c(s,"class","body svelte-1ebkg7o"),c(t,"tabindex",e[1]),c(t,"title",e[7]),c(t,"class","svelte-1ebkg7o"),W(t,"focussed",e[2]),W(t,"active",e[3])},m(d,b){g(d,t,b),h&&h.m(t,null),T(t,n),M(i,t,null),T(t,r),T(t,s),T(s,l),T(t,u),m&&m.m(t,null),e[13](t),a=!0,f||(p=ne(t,"click",e[12]),f=!0)},p(d,[b]){d[4]?h?(h.p(d,b),b&16&&y(h,1)):(h=Fn(d),h.c(),y(h,1),h.m(t,n)):h&&(ae(),k(h,1,1,()=>{h=null}),ue());const C={};b&1&&(C.shortcut=d[0].abbreviation),i.$set(C),(!a||b&1)&&o!==(o=d[0].body+"")&&z(l,o),d[4]?m&&(ae(),k(m,1,1,()=>{m=null}),ue()):m?b&16&&y(m,1):(m=zn(),m.c(),y(m,1),m.m(t,null)),(!a||b&2)&&c(t,"tabindex",d[1]),(!a||b&4)&&W(t,"focussed",d[2]),(!a||b&8)&&W(t,"active",d[3])},i(d){a||(y(h),y(i.$$.fragment,d),y(m),a=!0)},o(d){k(h),k(i.$$.fragment,d),k(m),a=!1},d(d){d&&_(t),h&&h.d(),x(i),m&&m.d(),e[13](null),f=!1,p()}}}function Ko(e,t,n){let i;ie(e,_e,w=>n(14,i=w));let{snippet:r}=t,{index:s=-1}=t,{tabindex:o=-1}=t,{focussed:l=!1}=t,{active:u=!1}=t,{selectMode:a=!1}=t,{observer:f=null}=t,p,h=i(a?"use_snippet.title":"edit_snippet.title"),m=s>=0&&s<10?s+1:"";m===10&&(m=0);function d(){return p.classList.contains("is-visible")}function b(w){p.scrollIntoView({behavior:"smooth",block:w})}Ze(()=>{f&&f.observe(p)}),an(()=>{f&&f.unobserve(p)});function C(w){lt.call(this,e,w)}function A(w){he[w?"unshift":"push"](()=>{p=w,n(5,p)})}return e.$$set=w=>{"snippet"in w&&n(0,r=w.snippet),"index"in w&&n(8,s=w.index),"tabindex"in w&&n(1,o=w.tabindex),"focussed"in w&&n(2,l=w.focussed),"active"in w&&n(3,u=w.active),"selectMode"in w&&n(4,a=w.selectMode),"observer"in w&&n(9,f=w.observer)},[r,o,l,u,a,p,m,h,s,f,d,b,C,A]}class el extends ee{constructor(t){super(),K(this,t,Ko,Yo,J,{snippet:0,index:8,tabindex:1,focussed:2,active:3,selectMode:4,observer:9,isVisible:10,scrollIntoView:11})}get isVisible(){return this.$$.ctx[10]}get scrollIntoView(){return this.$$.ctx[11]}}function Vn(e,t,n){const i=e.slice();return i[22]=t[n],i[23]=t,i[24]=n,i}function Wn(e){let t,n=e[24],i;const r=()=>e[14](t,n),s=()=>e[14](null,n);function o(){return e[15](e[24])}let l={snippet:e[22],index:e[24],focussed:e[24]===e[4],active:e[5],observer:e[8],selectMode:e[2]};return t=new el({props:l}),r(),t.$on("click",o),{c(){U(t.$$.fragment)},m(u,a){M(t,u,a),i=!0},p(u,a){e=u,n!==e[24]&&(s(),n=e[24],r());const f={};a&128&&(f.snippet=e[22]),a&16&&(f.focussed=e[24]===e[4]),a&32&&(f.active=e[5]),a&4&&(f.selectMode=e[2]),t.$set(f)},i(u){i||(y(t.$$.fragment,u),i=!0)},o(u){k(t.$$.fragment,u),i=!1},d(u){s(),x(t,u)}}}function tl(e){let t,n,i,r,s,o=An(e[7]),l=[];for(let a=0;a<o.length;a+=1)l[a]=Wn(Vn(e,o,a));const u=a=>k(l[a],1,1,()=>{l[a]=null});return{c(){t=P("ul");for(let a=0;a<l.length;a+=1)l[a].c();c(t,"tabindex",e[1]),c(t,"class","svelte-1wnqbvs")},m(a,f){g(a,t,f);for(let p=0;p<l.length;p+=1)l[p]&&l[p].m(t,null);e[16](t),i=!0,r||(s=[ne(t,"focus",e[9]),ne(t,"blur",e[10]),ne(t,"keydown",e[12]),ln(n=Ii.call(null,t,e[3]))],r=!0)},p(a,[f]){if(f&2548){o=An(a[7]);let p;for(p=0;p<o.length;p+=1){const h=Vn(a,o,p);l[p]?(l[p].p(h,f),y(l[p],1)):(l[p]=Wn(h),l[p].c(),y(l[p],1),l[p].m(t,null))}for(ae(),p=o.length;p<l.length;p+=1)u(p);ue()}(!i||f&2)&&c(t,"tabindex",a[1]),n&&qe(n.update)&&f&8&&n.update.call(null,a[3])},i(a){if(!i){for(let f=0;f<o.length;f+=1)y(l[f]);i=!0}},o(a){l=l.filter(Boolean);for(let f=0;f<l.length;f+=1)k(l[f]);i=!1},d(a){a&&_(t),Ui(l,a),e[16](null),r=!1,de(s)}}}function nl(e,t,n){let i;const r=mt();let{snippets:s=null}=t,{tabindex:o=0}=t,{selectMode:l=!1}=t,{autofocus:u=!1}=t,{ref:a}=t,f=0,p=u,h=[];const m=new IntersectionObserver(function(v){for(let N=0;N<v.length;N++)v[N].isIntersecting?v[N].target.classList.add("is-visible"):v[N].target.classList.remove("is-visible")},{root:a,threshold:[.6]});function d(v){return n(4,f=0),v}function b(){n(5,p=!0)}function C(){n(5,p=!1)}function A(v){l?E(i[v]):B(i[v])}function w(v){!s||s.length===0||I(v)&&v.preventDefault()}function I(v){if(v.key==="Home"||v.key==="g")return n(4,f=0),h[f].scrollIntoView("nearest"),!0;if(v.key==="End"||v.key==="G")return n(4,f=s.length-1),h[f].scrollIntoView("nearest"),!0;if(f<s.length-1&&(v.key==="ArrowDown"||v.key==="j"))return n(4,f++,f),h[f].scrollIntoView("nearest"),!0;if(f>0&&(v.key==="ArrowUp"||v.key==="k"))return n(4,f--,f),h[f].scrollIntoView("nearest"),!0;if(v.key==="PageDown"||v.key==="d"){let N=-1,H=-1;for(let se=0;se<h.length;se++)if(h[se].isVisible())H=se,N<0&&(N=se);else if(H>=0)break;const D=h.length-1,V=H-N;return H+V>D?n(4,f=D):n(4,f=H),h[f].scrollIntoView("start"),!0}if(v.key==="PageUp"||v.key==="u"){let N=-1,H=-1;for(let V=0;V<h.length;V++){const se=h[V];if(se.isVisible()&&N<0)N=V,H=V;else if(se.isVisible())H=V;else if(N>=0)break}const D=H-N;return N-D<=0?n(4,f=0):n(4,f=N),h[f].scrollIntoView("end"),!0}if(l&&f>=0&&f<s.length&&v.key==="Enter")return E(i[f]),!0;if(l&&["1","2","3","4","5","6","7","8","9","0"].includes(v.key)){let N=v.key-1;return N===-1&&(N=9),N+1>i.length?!1:(E(i[N]),!0)}return!l&&f>=0&&f<s.length&&(v.key==="ArrowRight"||v.key==="Enter")?(B(i[f]),!0):!1}function E(v){r("itemActivated",{snippet:v})}function B(v){r("itemEdit",{snippet:v})}Yn(()=>{h.length!==i.length&&n(6,h.length=i.length,h)});function L(v,N){he[v?"unshift":"push"](()=>{h[N]=v,n(6,h)})}const S=v=>A(v);function O(v){he[v?"unshift":"push"](()=>{a=v,n(0,a)})}return e.$$set=v=>{"snippets"in v&&n(13,s=v.snippets),"tabindex"in v&&n(1,o=v.tabindex),"selectMode"in v&&n(2,l=v.selectMode),"autofocus"in v&&n(3,u=v.autofocus),"ref"in v&&n(0,a=v.ref)},e.$$.update=()=>{e.$$.dirty&8192&&n(7,i=d(s))},[a,o,l,u,f,p,h,i,m,b,C,A,w,s,L,S,O]}class il extends ee{constructor(t){super(),K(this,t,nl,tl,J,{snippets:13,tabindex:1,selectMode:2,autofocus:3,ref:0})}}function rl(e){let t,n;const i=e[2].default,r=ft(i,e,e[1],null);return{c(){t=P("div"),r&&r.c(),c(t,"class","toolbar svelte-i867mn"),W(t,"bottom",e[0])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&2)&&ht(r,i,s,s[1],n?ct(i,s[1],o,null):pt(s[1]),null),(!n||o&1)&&W(t,"bottom",s[0])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function sl(e,t,n){let{$$slots:i={},$$scope:r}=t,{bottom:s=!1}=t;return e.$$set=o=>{"bottom"in o&&n(0,s=o.bottom),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Nt extends ee{constructor(t){super(),K(this,t,sl,rl,J,{bottom:0})}}function ol(e){let t;return{c(){t=P("div"),c(t,"class","toolbar-spacer svelte-1a67v9")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}class gn extends ee{constructor(t){super(),K(this,t,null,ol,J,{})}}function ll(e){let t,n,i=e[6]("no_snippets_found.title")+"",r,s,o,l=e[6]("no_snippets_found.description")+"",u;return{c(){t=P("div"),n=P("p"),r=j(i),s=R(),o=P("p"),u=j(l),c(n,"class","no-snippets-found svelte-y4605t"),c(o,"class","no-snippets-found description dimmed svelte-y4605t"),c(t,"class","centered")},m(a,f){g(a,t,f),T(t,n),T(n,r),T(t,s),T(t,o),T(o,u)},p(a,f){f&64&&i!==(i=a[6]("no_snippets_found.title")+"")&&z(r,i),f&64&&l!==(l=a[6]("no_snippets_found.description")+"")&&z(u,l)},i:G,o:G,d(a){a&&_(t)}}}function al(e){let t,n,i;function r(o){e[21](o)}let s={snippets:e[7],tabindex:2,selectMode:e[0],autofocus:e[8]};return e[4]!==void 0&&(s.ref=e[4]),t=new il({props:s}),he.push(()=>De(t,"ref",r)),t.$on("itemActivated",e[12]),t.$on("itemEdit",e[13]),{c(){U(t.$$.fragment)},m(o,l){M(t,o,l),i=!0},p(o,l){const u={};l&128&&(u.snippets=o[7]),l&1&&(u.selectMode=o[0]),!n&&l&16&&(n=!0,u.ref=o[4],Ue(()=>n=!1)),t.$set(u)},i(o){i||(y(t.$$.fragment,o),i=!0)},o(o){k(t.$$.fragment,o),i=!1},d(o){x(t,o)}}}function Xn(e){let t,n;return t=new Nt({props:{bottom:!0,$$slots:{default:[ul]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&16777280&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ul(e){let t,n,i,r,s,o;return t=new me({props:{iconClass:"dimmed",icon:dn,size:"2.3x",title:e[6]("add_snippet.title")}}),t.$on("activate",e[10]),i=new gn({}),s=new me({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[6]("settings.title")}}),s.$on("activate",e[11]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&64&&(a.title=l[6]("add_snippet.title")),t.$set(a);const f={};u&64&&(f.title=l[6]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function fl(e){let t,n,i,r,s,o,l,u,a,f,p;function h(E){e[18](E)}function m(E){e[19](E)}function d(E){e[20](E)}let b={search:!0,autofocus:e[1],placeholder:e[6]("search"),searchButtonTitle:e[6]("search"),clearButtonTitle:e[6]("clear"),tabindex:1};e[2]!==void 0&&(b.value=e[2]),e[3]!==void 0&&(b.ref=e[3]),e[5]!==void 0&&(b.focussed=e[5]),n=new _n({props:b}),he.push(()=>De(n,"value",h)),he.push(()=>De(n,"ref",m)),he.push(()=>De(n,"focussed",d)),n.$on("query",e[9]);const C=[al,ll],A=[];function w(E,B){return E[7]?0:1}l=w(e),u=A[l]=C[l](e);let I=!e[0]&&Xn(e);return{c(){t=P("div"),U(n.$$.fragment),o=R(),u.c(),a=R(),I&&I.c(),f=we(),c(t,"class","toolbar top")},m(E,B){g(E,t,B),M(n,t,null),g(E,o,B),A[l].m(E,B),g(E,a,B),I&&I.m(E,B),g(E,f,B),p=!0},p(E,B){const L={};B&2&&(L.autofocus=E[1]),B&64&&(L.placeholder=E[6]("search")),B&64&&(L.searchButtonTitle=E[6]("search")),B&64&&(L.clearButtonTitle=E[6]("clear")),!i&&B&4&&(i=!0,L.value=E[2],Ue(()=>i=!1)),!r&&B&8&&(r=!0,L.ref=E[3],Ue(()=>r=!1)),!s&&B&32&&(s=!0,L.focussed=E[5],Ue(()=>s=!1)),n.$set(L);let S=l;l=w(E),l===S?A[l].p(E,B):(ae(),k(A[S],1,1,()=>{A[S]=null}),ue(),u=A[l],u?u.p(E,B):(u=A[l]=C[l](E),u.c()),y(u,1),u.m(a.parentNode,a)),E[0]?I&&(ae(),k(I,1,1,()=>{I=null}),ue()):I?(I.p(E,B),B&1&&y(I,1)):(I=Xn(E),I.c(),y(I,1),I.m(f.parentNode,f))},i(E){p||(y(n.$$.fragment,E),y(u),y(I),p=!0)},o(E){k(n.$$.fragment,E),k(u),k(I),p=!1},d(E){E&&(_(t),_(o),_(a),_(f)),x(n),A[l].d(E),I&&I.d(E)}}}function cl(e){let t,n;return t=new Ye({props:{$$slots:{default:[fl]},$$scope:{ctx:e}}}),t.$on("keyup",e[14]),t.$on("cancel",e[15]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&16777471&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function hl(e,t,n){let i,r,s,o;ie(e,pe,H=>n(17,i=H)),ie(e,zt,H=>n(2,r=H)),ie(e,_e,H=>n(6,s=H)),ie(e,Vt,H=>n(7,o=H));let{orderByLastUsed:l=!1}=t,{selectMode:u=!1}=t,{focusSearchBox:a=!0}=t;const f=!a;let p,h,m=a;function d(H){Ri(zt,r=H.detail,r),Vt.search(r,l)}function b(){Ge("/snippet/add")}function C(){Ge("/settings")}function A(H){nr(H.detail.snippet.abbreviation,500)}function w(H){const D=H.detail.snippet.id;Ge("/snippet/edit/"+D)}function I(H,D,V){Vt.search(H,D)}function E(){m?h.focus():p.focus()}function B(H){H.ctrlKey&&H.key==="n"&&(b(),H.preventDefault()),H.ctrlKey&&H.altKey&&H.key==="s"&&(C(),H.preventDefault()),H.ctrlKey&&H.key==="f"&&(E(),H.preventDefault())}function L(){u&&Vi()}function S(H){r=H,zt.set(r)}function O(H){p=H,n(3,p)}function v(H){m=H,n(5,m)}function N(H){h=H,n(4,h)}return e.$$set=H=>{"orderByLastUsed"in H&&n(16,l=H.orderByLastUsed),"selectMode"in H&&n(0,u=H.selectMode),"focusSearchBox"in H&&n(1,a=H.focusSearchBox)},e.$$.update=()=>{e.$$.dirty&196612&&I(r,l)},[u,a,r,p,h,m,s,o,f,d,b,C,A,w,B,L,l,i,S,O,v,N]}class pl extends ee{constructor(t){super(),K(this,t,hl,cl,J,{orderByLastUsed:16,selectMode:0,focusSearchBox:1})}}function qn(e){let t,n,i,r,s,o,l,u;return n=new me({props:{iconClass:"dimmed",icon:dn,title:e[0]("add_snippet.title"),size:"5x",$$slots:{default:[ml]},$$scope:{ctx:e}}}),n.$on("activate",e[2]),s=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,title:e[0]("import_snippets.title"),size:"1.5x",$$slots:{default:[dl]},$$scope:{ctx:e}}}),s.$on("activate",e[4]),l=new Nt({props:{bottom:!0,$$slots:{default:[_l]},$$scope:{ctx:e}}}),{c(){t=P("p"),U(n.$$.fragment),i=R(),r=P("p"),U(s.$$.fragment),o=R(),U(l.$$.fragment),c(t,"class","add-snippet"),c(r,"class","import-snippets")},m(a,f){g(a,t,f),M(n,t,null),g(a,i,f),g(a,r,f),M(s,r,null),g(a,o,f),M(l,a,f),u=!0},p(a,f){const p={};f&1&&(p.title=a[0]("add_snippet.title")),f&33&&(p.$$scope={dirty:f,ctx:a}),n.$set(p);const h={};f&1&&(h.title=a[0]("import_snippets.title")),f&33&&(h.$$scope={dirty:f,ctx:a}),s.$set(h);const m={};f&33&&(m.$$scope={dirty:f,ctx:a}),l.$set(m)},i(a){u||(y(n.$$.fragment,a),y(s.$$.fragment,a),y(l.$$.fragment,a),u=!0)},o(a){k(n.$$.fragment,a),k(s.$$.fragment,a),k(l.$$.fragment,a),u=!1},d(a){a&&(_(t),_(i),_(r),_(o)),x(n),x(s),x(l,a)}}}function ml(e){let t=e[0]("add_snippet.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("add_snippet.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function dl(e){let t=e[0]("import_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("import_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function _l(e){let t,n,i,r,s,o;return t=new me({props:{iconClass:"dimmed",icon:dn,size:"2.3x",title:e[0]("add_snippet.title")}}),t.$on("activate",e[2]),i=new gn({}),s=new me({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[0]("settings.title")}}),s.$on("activate",e[3]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&1&&(a.title=l[0]("add_snippet.title")),t.$set(a);const f={};u&1&&(f.title=l[0]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function gl(e){let t,n,i,r=e[0]("no_snippets_found.title")+"",s,o,l,u,a=e[1]&&qn(e);return{c(){t=P("h1"),t.textContent="Snippet Pixie",n=R(),i=P("p"),s=j(r),o=R(),a&&a.c(),l=we(),c(i,"class","dimmed")},m(f,p){g(f,t,p),g(f,n,p),g(f,i,p),T(i,s),g(f,o,p),a&&a.m(f,p),g(f,l,p),u=!0},p(f,p){(!u||p&1)&&r!==(r=f[0]("no_snippets_found.title")+"")&&z(s,r),f[1]?a?(a.p(f,p),p&2&&y(a,1)):(a=qn(f),a.c(),y(a,1),a.m(l.parentNode,l)):a&&(ae(),k(a,1,1,()=>{a=null}),ue())},i(f){u||(y(a),u=!0)},o(f){k(a),u=!1},d(f){f&&(_(t),_(n),_(i),_(o),_(l)),a&&a.d(f)}}}function bl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[gl]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&35&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function vl(e,t,n){let i,r;ie(e,_e,u=>n(0,i=u)),ie(e,pe,u=>n(1,r=u));function s(){Ge("/snippet/add")}function o(){Ge("/settings")}async function l(){try{const u=await ri(!1)}catch(u){await oe(i("import_snippets.error_title"),u)}await Pe.fetch()}return[i,r,s,o,l]}class wl extends ee{constructor(t){super(),K(this,t,vl,bl,J,{})}}function El(e){let t,n;return t=new wl({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function yl(e){let t,n;return t=new pl({props:{selectMode:e[2],orderByLastUsed:e[3],focusSearchBox:e[4]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&4&&(s.selectMode=i[2]),r&8&&(s.orderByLastUsed=i[3]),r&16&&(s.focusSearchBox=i[4]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Sl(e){let t;return{c(){t=j("Checking settings ...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function kl(e){let t,n,i,r;const s=[Sl,yl,El],o=[];function l(u,a){return u[1]?0:u[0]&&(u[5]&&u[5].length>0||u[2])?1:2}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function Al(e,t,n){let i,r,s;ie(e,_e,p=>n(6,i=p)),ie(e,pe,p=>n(0,r=p)),ie(e,Pe,p=>n(5,s=p));let o=!0,l=!1,u=!1,a=!0;function f(p){Pe.fetch()}return Ze(async()=>{if(n(2,l=await or()),n(3,u=l),l&&r)try{const p=await ni("FOCUS_SEARCH_BOX");n(4,a=p!=="false")}catch(p){await oe(i("settings.get_error_title"),p)}n(1,o=!1)}),e.$$.update=()=>{e.$$.dirty&1&&f()},[r,o,l,u,a,s]}class Bl extends ee{constructor(t){super(),K(this,t,Al,kl,J,{})}}function Tl(e){let t=e[4]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function Il(e){let t=e[4]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function Hl(e){let t,n=e[4]("add_snippet.title")+"",i,r,s,o,l,u,a=e[4]("body.title")+"",f,p,h,m,d,b,C,A,w,I,E;function B(S){e[8](S)}let L={label:e[4]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(L.value=e[0]),s=new _n({props:L}),he.push(()=>De(s,"value",B)),b=new $e({props:{secondary:!0,$$slots:{default:[Tl]},$$scope:{ctx:e}}}),b.$on("click",e[5]),A=new $e({props:{primary:!0,disabled:e[3],$$slots:{default:[Il]},$$scope:{ctx:e}}}),A.$on("click",e[6]),{c(){t=P("h2"),i=j(n),r=R(),U(s.$$.fragment),l=R(),u=P("label"),f=j(a),p=R(),h=P("textarea"),m=R(),d=P("div"),U(b.$$.fragment),C=R(),U(A.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(S,O){g(S,t,O),T(t,i),g(S,r,O),M(s,S,O),g(S,l,O),g(S,u,O),T(u,f),g(S,p,O),g(S,h,O),je(h,e[2]),g(S,m,O),g(S,d,O),M(b,d,null),T(d,C),M(A,d,null),w=!0,I||(E=ne(h,"input",e[9]),I=!0)},p(S,O){(!w||O&16)&&n!==(n=S[4]("add_snippet.title")+"")&&z(i,n);const v={};O&16&&(v.label=S[4]("abbreviation.title")),O&2&&(v.errorMessage=S[1]),!o&&O&1&&(o=!0,v.value=S[0],Ue(()=>o=!1)),s.$set(v),(!w||O&16)&&a!==(a=S[4]("body.title")+"")&&z(f,a),O&4&&je(h,S[2]);const N={};O&2064&&(N.$$scope={dirty:O,ctx:S}),b.$set(N);const H={};O&8&&(H.disabled=S[3]),O&2064&&(H.$$scope={dirty:O,ctx:S}),A.$set(H)},i(S){w||(y(s.$$.fragment,S),y(b.$$.fragment,S),y(A.$$.fragment,S),w=!0)},o(S){k(s.$$.fragment,S),k(b.$$.fragment,S),k(A.$$.fragment,S),w=!1},d(S){S&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,S),x(b),x(A),I=!1,E()}}}function Cl(e){let t,n;return t=new Ye({props:{$$slots:{default:[Hl]},$$scope:{ctx:e}}}),t.$on("cancel",e[5]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&2079&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Ll(e,t,n){let i,r,s;ie(e,_e,d=>n(4,r=d)),ie(e,pe,d=>n(7,s=d));let o="",l="";async function u(d){if(d.length===0){n(1,a=r("abbreviation.empty"));return}if(!s){n(1,a="");return}try{const b=await ii(d);if(b.hasOwnProperty("abbreviation")&&b.abbreviation.length>0){n(1,a=r("abbreviation.exists"));return}}catch(b){await oe(r("add_snippet.error_title"),b)}n(1,a="")}let a="";function f(){ve()}async function p(){try{const d=await Wi(o,l);await ve()}catch(d){await oe(r("add_snippet.error_title"),d)}}function h(d){o=d,n(0,o)}function m(){l=this.value,n(2,l)}return e.$$.update=()=>{e.$$.dirty&1&&u(o),e.$$.dirty&130&&n(3,i=!s||a.length>0)},[o,a,l,i,r,f,p,s,h,m]}class Pl extends ee{constructor(t){super(),K(this,t,Ll,Cl,J,{})}}function Nl(e){let t=e[5]("button.remove")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.remove")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ol(e){let t=e[5]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ml(e){let t=e[5]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function xl(e){let t,n=e[5]("edit_snippet.title")+"",i,r,s,o,l,u,a=e[5]("body.title")+"",f,p,h,m,d,b,C,A,w,I,E,B,L;function S(v){e[11](v)}let O={label:e[5]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(O.value=e[0]),s=new _n({props:O}),he.push(()=>De(s,"value",S)),b=new $e({props:{danger:!0,disabled:e[3],$$slots:{default:[Nl]},$$scope:{ctx:e}}}),b.$on("click",e[7]),A=new $e({props:{secondary:!0,$$slots:{default:[Ol]},$$scope:{ctx:e}}}),A.$on("click",e[6]),I=new $e({props:{primary:!0,disabled:e[4],$$slots:{default:[Ml]},$$scope:{ctx:e}}}),I.$on("click",e[8]),{c(){t=P("h2"),i=j(n),r=R(),U(s.$$.fragment),l=R(),u=P("label"),f=j(a),p=R(),h=P("textarea"),m=R(),d=P("div"),U(b.$$.fragment),C=R(),U(A.$$.fragment),w=R(),U(I.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(v,N){g(v,t,N),T(t,i),g(v,r,N),M(s,v,N),g(v,l,N),g(v,u,N),T(u,f),g(v,p,N),g(v,h,N),je(h,e[2]),g(v,m,N),g(v,d,N),M(b,d,null),T(d,C),M(A,d,null),T(d,w),M(I,d,null),E=!0,B||(L=ne(h,"input",e[12]),B=!0)},p(v,N){(!E||N&32)&&n!==(n=v[5]("edit_snippet.title")+"")&&z(i,n);const H={};N&32&&(H.label=v[5]("abbreviation.title")),N&2&&(H.errorMessage=v[1]),!o&&N&1&&(o=!0,H.value=v[0],Ue(()=>o=!1)),s.$set(H),(!E||N&32)&&a!==(a=v[5]("body.title")+"")&&z(f,a),N&4&&je(h,v[2]);const D={};N&8&&(D.disabled=v[3]),N&32800&&(D.$$scope={dirty:N,ctx:v}),b.$set(D);const V={};N&32800&&(V.$$scope={dirty:N,ctx:v}),A.$set(V);const se={};N&16&&(se.disabled=v[4]),N&32800&&(se.$$scope={dirty:N,ctx:v}),I.$set(se)},i(v){E||(y(s.$$.fragment,v),y(b.$$.fragment,v),y(A.$$.fragment,v),y(I.$$.fragment,v),E=!0)},o(v){k(s.$$.fragment,v),k(b.$$.fragment,v),k(A.$$.fragment,v),k(I.$$.fragment,v),E=!1},d(v){v&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,v),x(b),x(A),x(I),B=!1,L()}}}function Rl(e){let t,n;return t=new Ye({props:{$$slots:{default:[xl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&32831&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Ul(e,t,n){let i,r,s,o;ie(e,_e,w=>n(5,s=w)),ie(e,pe,w=>n(10,o=w));let{params:l={}}=t,u={},a="",f="";async function p(w){if(n(1,h=""),!!u.hasOwnProperty("id")){if(w.length===0){n(1,h=s("abbreviation.empty"));return}if(o)try{const I=await ii(w);I.hasOwnProperty("abbreviation")&&I.abbreviation.length>0&&I.id!==u.id&&n(1,h=s("abbreviation.exists"))}catch(I){await oe(s("edit_snippet.error_title"),I)}}}let h="";function m(){ve()}async function d(){try{await rr(u.abbreviation),await ve()}catch(w){await oe(s("remove_snippet.error_title"),w)}}async function b(){let w={...u};w.abbreviation=a,w.body=f;try{await fr(u.id,w),await ve()}catch(I){await oe(s("edit_snippet.error_title"),I)}}Ze(async()=>{l.hasOwnProperty("id")||(await oe(s("edit_snippet.error_title"),s("edit_snippet.id_not_supplied")),await ve());try{u=await Yi(l.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await ve()}let w=!1;try{w=await tr(u.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await ve()}w&&(await oe(s("edit_snippet.error_title"),s("edit_snippet.snippet_not_found")),await ve()),n(0,a=u.abbreviation),n(2,f=u.body)});function C(w){a=w,n(0,a)}function A(){f=this.value,n(2,f)}return e.$$set=w=>{"params"in w&&n(9,l=w.params)},e.$$.update=()=>{e.$$.dirty&1&&p(a),e.$$.dirty&1026&&n(4,i=!o||h.length>0),e.$$.dirty&1024&&n(3,r=!o)},[a,h,f,r,i,s,m,d,b,l,o,C,A]}class Dl extends ee{constructor(t){super(),K(this,t,Ul,Rl,J,{params:9})}}function Gl(e){let t,n,i,r,s,o;return t=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[4]("button.back")}}),t.$on("activate",e[6]),i=new gn({}),s=new me({props:{horizontal:!0,iconClass:"dimmed",icon:oo,size:"2.5x",title:e[4]("button.about")}}),s.$on("activate",e[7]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&16&&(a.title=l[4]("button.back")),t.$set(a);const f={};u&16&&(f.title=l[4]("button.about")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function $l(e){let t=e[4]("settings.no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("settings.no_connection")+"")&&z(n,t)},i:G,o:G,d(i){i&&_(n)}}}function jl(e){let t,n=e[4]("settings.import_export_title")+"",i,r,s,o,l,u,a,f,p;o=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,size:"1.5x",$$slots:{default:[Fl]},$$scope:{ctx:e}}}),o.$on("activate",e[19]),u=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,size:"1.5x",$$slots:{default:[zl]},$$scope:{ctx:e}}}),u.$on("activate",e[20]);let h=e[5]&&e[5].length>0&&Zn(e);return{c(){t=P("h3"),i=j(n),r=R(),s=P("p"),U(o.$$.fragment),l=R(),U(u.$$.fragment),a=R(),h&&h.c(),f=we(),c(t,"class","svelte-jq6614"),c(s,"class","import-snippets svelte-jq6614")},m(m,d){g(m,t,d),T(t,i),g(m,r,d),g(m,s,d),M(o,s,null),T(s,l),M(u,s,null),g(m,a,d),h&&h.m(m,d),g(m,f,d),p=!0},p(m,d){(!p||d&16)&&n!==(n=m[4]("settings.import_export_title")+"")&&z(i,n);const b={};d&33554448&&(b.$$scope={dirty:d,ctx:m}),o.$set(b);const C={};d&33554448&&(C.$$scope={dirty:d,ctx:m}),u.$set(C),m[5]&&m[5].length>0?h?(h.p(m,d),d&32&&y(h,1)):(h=Zn(m),h.c(),y(h,1),h.m(f.parentNode,f)):h&&(ae(),k(h,1,1,()=>{h=null}),ue())},i(m){p||(y(o.$$.fragment,m),y(u.$$.fragment,m),y(h),p=!0)},o(m){k(o.$$.fragment,m),k(u.$$.fragment,m),k(h),p=!1},d(m){m&&(_(t),_(r),_(s),_(a),_(f)),x(o),x(u),h&&h.d(m)}}}function Fl(e){let t=e[4]("import_snippets.new_only_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.new_only_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function zl(e){let t=e[4]("import_snippets.update_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.update_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Zn(e){let t,n,i;return n=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Js,size:"1.5x",$$slots:{default:[Vl]},$$scope:{ctx:e}}}),n.$on("activate",e[12]),{c(){t=P("p"),U(n.$$.fragment),c(t,"class","export-snippets svelte-jq6614")},m(r,s){g(r,t,s),M(n,t,null),i=!0},p(r,s){const o={};s&33554448&&(o.$$scope={dirty:s,ctx:r}),n.$set(o)},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function Vl(e){let t=e[4]("export_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("export_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Wl(e){let t,n,i,r=e[4]("settings.title")+"",s,o,l,u=e[4]("settings.autostart_title")+"",a,f,p,h,m,d,b=e[4]("settings.autostart")+"",C,A,w,I=e[4]("settings.autoexpand_title")+"",E,B,L,S,O,v,N=e[4]("settings.autoexpand")+"",H,D,V,se=e[4]("settings.search_and_paste_title")+"",Ee,ye,Se,Ae,le,Ne,Ce=e[4]("settings.focus_search")+"",F,Y,fe,ge,Ke,be,Ot,bn;t=new Nt({props:{$$slots:{default:[Gl]},$$scope:{ctx:e}}});const vn=[jl,$l],Be=[];function wn($,Z){return $[0]?0:1}return fe=wn(e),ge=Be[fe]=vn[fe](e),{c(){U(t.$$.fragment),n=R(),i=P("h2"),s=j(r),o=R(),l=P("h3"),a=j(u),f=R(),p=P("p"),h=P("label"),m=P("input"),d=R(),C=j(b),A=R(),w=P("h3"),E=j(I),B=R(),L=P("p"),S=P("label"),O=P("input"),v=R(),H=j(N),D=R(),V=P("h3"),Ee=j(se),ye=R(),Se=P("p"),Ae=P("label"),le=P("input"),Ne=R(),F=j(Ce),Y=R(),ge.c(),Ke=we(),c(i,"class","svelte-jq6614"),c(l,"class","svelte-jq6614"),c(m,"type","checkbox"),c(p,"class","svelte-jq6614"),c(w,"class","svelte-jq6614"),c(O,"type","checkbox"),c(L,"class","svelte-jq6614"),c(V,"class","svelte-jq6614"),c(le,"type","checkbox"),c(Se,"class","svelte-jq6614")},m($,Z){M(t,$,Z),g($,n,Z),g($,i,Z),T(i,s),g($,o,Z),g($,l,Z),T(l,a),g($,f,Z),g($,p,Z),T(p,h),T(h,m),m.checked=e[1],T(h,d),T(h,C),g($,A,Z),g($,w,Z),T(w,E),g($,B,Z),g($,L,Z),T(L,S),T(S,O),O.checked=e[2],T(S,v),T(S,H),g($,D,Z),g($,V,Z),T(V,Ee),g($,ye,Z),g($,Se,Z),T(Se,Ae),T(Ae,le),le.checked=e[3],T(Ae,Ne),T(Ae,F),g($,Y,Z),Be[fe].m($,Z),g($,Ke,Z),be=!0,Ot||(bn=[ne(m,"change",e[13]),ne(m,"change",e[14]),ln(Ii.call(null,m,!0)),ne(O,"change",e[15]),ne(O,"change",e[16]),ne(le,"change",e[17]),ne(le,"change",e[18])],Ot=!0)},p($,Z){const En={};Z&33554448&&(En.$$scope={dirty:Z,ctx:$}),t.$set(En),(!be||Z&16)&&r!==(r=$[4]("settings.title")+"")&&z(s,r),(!be||Z&16)&&u!==(u=$[4]("settings.autostart_title")+"")&&z(a,u),Z&2&&(m.checked=$[1]),(!be||Z&16)&&b!==(b=$[4]("settings.autostart")+"")&&z(C,b),(!be||Z&16)&&I!==(I=$[4]("settings.autoexpand_title")+"")&&z(E,I),Z&4&&(O.checked=$[2]),(!be||Z&16)&&N!==(N=$[4]("settings.autoexpand")+"")&&z(H,N),(!be||Z&16)&&se!==(se=$[4]("settings.search_and_paste_title")+"")&&z(Ee,se),Z&8&&(le.checked=$[3]),(!be||Z&16)&&Ce!==(Ce=$[4]("settings.focus_search")+"")&&z(F,Ce);let Mt=fe;fe=wn($),fe===Mt?Be[fe].p($,Z):(ae(),k(Be[Mt],1,1,()=>{Be[Mt]=null}),ue(),ge=Be[fe],ge?ge.p($,Z):(ge=Be[fe]=vn[fe]($),ge.c()),y(ge,1),ge.m(Ke.parentNode,Ke))},i($){be||(y(t.$$.fragment,$),y(ge),be=!0)},o($){k(t.$$.fragment,$),k(ge),be=!1},d($){$&&(_(n),_(i),_(o),_(l),_(f),_(p),_(A),_(w),_(B),_(L),_(D),_(V),_(ye),_(Se),_(Y),_(Ke)),x(t,$),Be[fe].d($),Ot=!1,de(bn)}}}function Xl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[Wl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&33554495&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ql(e,t,n){let i,r,s;ie(e,_e,D=>n(4,i=D)),ie(e,pe,D=>n(0,r=D)),ie(e,Pe,D=>n(5,s=D));function o(){ve()}function l(){Ge("/about")}let u=!1,a=!1,f=!0;async function p(){let D=!1;try{D=await Ji()}catch(V){await oe(i("settings.get_error_title"),V);return}return D}async function h(D){try{await ur(D)}catch(V){await oe(i("settings.save_error_title"),V);return}return D}async function m(){let D=!1;try{D=await Qi()}catch(V){await oe(i("settings.get_error_title"),V);return}return D}async function d(D){try{await ar(D)}catch(V){await oe(i("settings.save_error_title"),V);return}return D}async function b(){let D="";try{D=await ni("FOCUS_SEARCH_BOX")}catch(V){await oe(i("settings.get_error_title"),V);return}return D!=="false"}async function C(D){const V=D?"true":"false";try{await sr("FOCUS_SEARCH_BOX",V)}catch(se){await oe(i("settings.save_error_title"),se);return}return D}function A(D){Pe.fetch()}async function w(D){try{const V=await ri(D)}catch(V){await oe(i("import_snippets.error_title"),V)}await Pe.fetch()}async function I(){try{const D=await qi()}catch(D){await oe(i("export_snippets.error_title"),D)}}Ze(async()=>{n(1,u=await p()),n(2,a=await m()),n(3,f=await b())});function E(){u=this.checked,n(1,u)}const B=()=>h(u);function L(){a=this.checked,n(2,a)}const S=()=>d(a);function O(){f=this.checked,n(3,f)}const v=()=>C(f),N=()=>w(!1),H=()=>w(!0);return e.$$.update=()=>{e.$$.dirty&1&&A()},[r,u,a,f,i,s,o,l,h,d,C,w,I,E,B,L,S,O,v,N,H]}class Zl extends ee{constructor(t){super(),K(this,t,ql,Xl,J,{})}}const Ql="/assets/snippetpixie-icon-128-1d7040bc.svg";function Jl(e){let t,n;return t=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[3]("button.back")}}),t.$on("activate",e[4]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&8&&(s.title=i[3]("button.back")),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Yl(e){let t,n,i,r,s,o,l,u,a,f=e[3]("about.description")+"",p,h,m,d,b,C,A,w,I,E,B=e[3]("about.by")+"",L,S,O,v,N,H,D=e[3]("about.licence_title")+"",V,se,Ee,ye,Se=e[3]("about.licence")+"",Ae,le,Ne,Ce;return t=new Nt({props:{$$slots:{default:[Jl]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment),n=R(),i=P("img"),s=R(),o=P("h2"),o.textContent="Snippet Pixie",l=R(),u=P("p"),a=P("em"),p=j(f),h=R(),m=P("p"),d=P("a"),b=j(e[2]),C=R(),A=P("p"),w=P("a"),w.textContent="snippetpixie.org",I=R(),E=P("h3"),L=j(B),S=R(),O=P("p"),v=P("a"),v.textContent="ianmjones",N=R(),H=P("h3"),V=j(D),se=R(),Ee=P("p"),ye=P("a"),Ae=j(Se),Mi(i.src,r=Ql)||c(i,"src",r),c(i,"alt","Snippet Pixie icon"),c(o,"class","svelte-sjm2tb"),c(u,"class","svelte-sjm2tb"),c(d,"href",e[0]),c(m,"class","svelte-sjm2tb"),c(w,"href","https://snippetpixie.org"),c(A,"class","svelte-sjm2tb"),c(E,"class","svelte-sjm2tb"),c(v,"href","https://ianmjones.com"),c(O,"class","svelte-sjm2tb"),c(H,"class","svelte-sjm2tb"),c(ye,"href",e[1]),c(Ee,"class","svelte-sjm2tb")},m(F,Y){M(t,F,Y),g(F,n,Y),g(F,i,Y),g(F,s,Y),g(F,o,Y),g(F,l,Y),g(F,u,Y),T(u,a),T(a,p),g(F,h,Y),g(F,m,Y),T(m,d),T(d,b),g(F,C,Y),g(F,A,Y),T(A,w),g(F,I,Y),g(F,E,Y),T(E,L),g(F,S,Y),g(F,O,Y),T(O,v),g(F,N,Y),g(F,H,Y),T(H,V),g(F,se,Y),g(F,Ee,Y),T(Ee,ye),T(ye,Ae),le=!0,Ne||(Ce=[ne(d,"click",gt(e[6])),ne(w,"click",gt(e[7])),ne(v,"click",gt(e[8])),ne(ye,"click",gt(e[9]))],Ne=!0)},p(F,Y){const fe={};Y&1032&&(fe.$$scope={dirty:Y,ctx:F}),t.$set(fe),(!le||Y&8)&&f!==(f=F[3]("about.description")+"")&&z(p,f),(!le||Y&4)&&z(b,F[2]),(!le||Y&1)&&c(d,"href",F[0]),(!le||Y&8)&&B!==(B=F[3]("about.by")+"")&&z(L,B),(!le||Y&8)&&D!==(D=F[3]("about.licence_title")+"")&&z(V,D),(!le||Y&8)&&Se!==(Se=F[3]("about.licence")+"")&&z(Ae,Se),(!le||Y&2)&&c(ye,"href",F[1])},i(F){le||(y(t.$$.fragment,F),le=!0)},o(F){k(t.$$.fragment,F),le=!1},d(F){F&&(_(n),_(i),_(s),_(o),_(l),_(u),_(h),_(m),_(C),_(A),_(I),_(E),_(S),_(O),_(N),_(H),_(se),_(Ee)),x(t,F),Ne=!1,de(Ce)}}}function Kl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[Yl]},$$scope:{ctx:e}}}),t.$on("cancel",e[4]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&1039&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ea(e,t,n){let i,r,s,o;ie(e,_e,m=>n(3,o=m));function l(){ve()}let u="";Ze(async()=>{n(5,u=await er())});const a=()=>bt(r),f=()=>bt("https://snippetpixie.org"),p=()=>bt("https://ianmjones.com"),h=()=>bt(s);return e.$$.update=()=>{e.$$.dirty&32&&n(2,i="v"+u),e.$$.dirty&32&&n(0,r="https://git.sr.ht/~ianmjones/snippetpixie/tree/"+u),e.$$.dirty&1&&n(1,s=r+"/item/LICENSE")},[r,s,i,o,l,u,a,f,p,h]}class ta extends ee{constructor(t){super(),K(this,t,ea,Kl,J,{})}}function na(e){let t,n;return t=new Fs({props:{routes:e[1]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ia(e){let t;return{c(){t=j("Loading...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function ra(e){let t,n,i,r;const s=[ia,na],o=[];function l(u,a){return u[0]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function sa(e,t,n){let i;ie(e,yt,u=>n(0,i=u));let r;async function s(){try{const u=await ir("Pong");u==="Pong"?pe.update(a=>!0):(pe.update(a=>!1),Ut("Got '"+u+"' back from Ping instead of 'Pong'.")),nt.update(a=>!0),Tt.update(a=>!1)}catch(u){pe.update(a=>!1),Ut("Ping returned: "+u),o()}}async function o(){try{await Xi()?nt.update(a=>!0):nt.update(a=>!1)}catch(u){nt.update(a=>!1),Ut("DaemonInstalled returned: "+u)}}Es("en-GB",()=>Oi(()=>import("./en-GB-782433d5.js"),[])),Ss({fallbackLocale:"en-GB",initialLocale:ks()});const l={"/":Bl,"/snippet/add":Pl,"/snippet/edit/:id":Dl,"/settings":Zl,"/about":ta};return Ze(async()=>{await s(),r=setInterval(s,5e3)}),an(()=>{clearInterval(r)}),[i,l]}class oa extends ee{constructor(t){super(),K(this,t,sa,ra,J,{})}}new oa({target:document.getElementById("app")});

D cmd/snippetpixiegui/frontend/dist/assets/index-ef06e3c7.js => cmd/snippetpixiegui/frontend/dist/assets/index-ef06e3c7.js +0 -5
@@ 1,5 0,0 @@
var Ci=Object.defineProperty;var Pi=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Nt=(e,t,n)=>(Pi(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const Li="modulepreload",Ni=function(e){return"/"+e},wn={},Oi=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Ni(s),s in wn)return;wn[s]=!0;const o=s.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let f=r.length-1;f>=0;f--){const p=r[f];if(p.href===s&&(!o||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":Li,o||(a.as="script",a.crossOrigin=""),a.href=s,document.head.appendChild(a),o)return new Promise((f,p)=>{a.addEventListener("load",f),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function G(){}function tn(e,t){for(const n in t)e[n]=t[n];return e}function Qn(e){return e()}function En(){return Object.create(null)}function me(e){e.forEach(Qn)}function ze(e){return typeof e=="function"}function J(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let pt;function Mi(e,t){return e===t?!0:(pt||(pt=document.createElement("a")),pt.href=t,e===pt.href)}function xi(e){return Object.keys(e).length===0}function nn(e,...t){if(e==null){for(const i of t)i(void 0);return G}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function yn(e){let t;return nn(e,n=>t=n)(),t}function ie(e,t,n){e.$$.on_destroy.push(nn(t,n))}function st(e,t,n,i){if(e){const r=Jn(e,t,n,i);return e[0](r)}}function Jn(e,t,n,i){return e[1]&&i?tn(n.ctx.slice(),e[1](i(t))):n.ctx}function ot(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let l=0;l<o;l+=1)s[l]=t.dirty[l]|r[l];return s}return t.dirty|r}return t.dirty}function lt(e,t,n,i,r,s){if(r){const o=Jn(t,n,i,s);e.p(o,r)}}function at(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function Ri(e,t,n){return e.set(n),t}function rn(e){return e&&ze(e.destroy)?e.destroy:G}function T(e,t){e.appendChild(t)}function g(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode&&e.parentNode.removeChild(e)}function Ui(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function N(e){return document.createElement(e)}function X(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function j(e){return document.createTextNode(e)}function U(){return j(" ")}function ve(){return j("")}function se(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Sn(e){return function(t){return t.preventDefault(),e.call(this,t)}}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Di(e){return Array.from(e.childNodes)}function F(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ue(e,t){e.value=t??""}function W(e,t,n){e.classList.toggle(t,!!n)}function Gi(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function De(e,t){return new e(t)}let tt;function Ye(e){tt=e}function St(){if(!tt)throw new Error("Function called outside component initialization");return tt}function ut(e){St().$$.on_mount.push(e)}function Yn(e){St().$$.after_update.push(e)}function sn(e){St().$$.on_destroy.push(e)}function ft(){const e=St();return(t,n,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Gi(t,n,{cancelable:i});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function nt(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const Le=[],ce=[];let Ne=[];const Ft=[],Kn=Promise.resolve();let zt=!1;function ei(){zt||(zt=!0,Kn.then(ti))}function on(){return ei(),Kn}function Vt(e){Ne.push(e)}function Oe(e){Ft.push(e)}const Ot=new Set;let Ce=0;function ti(){if(Ce!==0)return;const e=tt;do{try{for(;Ce<Le.length;){const t=Le[Ce];Ce++,Ye(t),$i(t.$$)}}catch(t){throw Le.length=0,Ce=0,t}for(Ye(null),Le.length=0,Ce=0;ce.length;)ce.pop()();for(let t=0;t<Ne.length;t+=1){const n=Ne[t];Ot.has(n)||(Ot.add(n),n())}Ne.length=0}while(Le.length);for(;Ft.length;)Ft.pop()();zt=!1,Ot.clear(),Ye(e)}function $i(e){if(e.fragment!==null){e.update(),me(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Vt)}}function ji(e){const t=[],n=[];Ne.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),Ne=t}const dt=new Set;let Te;function le(){Te={r:0,c:[],p:Te}}function ae(){Te.r||me(Te.c),Te=Te.p}function y(e,t){e&&e.i&&(dt.delete(e),e.i(t))}function k(e,t,n,i){if(e&&e.o){if(dt.has(e))return;dt.add(e),Te.c.push(()=>{dt.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function kn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function vt(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],l=t[s];if(l){for(const u in o)u in l||(i[u]=1);for(const u in l)r[u]||(n[u]=l[u],r[u]=1);e[s]=l}else for(const u in o)r[u]=1}for(const o in i)o in n||(n[o]=void 0);return n}function wt(e){return typeof e=="object"&&e!==null?e:{}}function Me(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function R(e){e&&e.c()}function M(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),Vt(()=>{const s=e.$$.on_mount.map(Qn).filter(ze);e.$$.on_destroy?e.$$.on_destroy.push(...s):me(s),e.$$.on_mount=[]}),r.forEach(Vt)}function x(e,t){const n=e.$$;n.fragment!==null&&(ji(n.after_update),me(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Fi(e,t){e.$$.dirty[0]===-1&&(Le.push(e),ei(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Y(e,t,n,i,r,s,o,l=[-1]){const u=tt;Ye(e);const a=e.$$={fragment:null,ctx:[],props:s,update:G,not_equal:r,bound:En(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:En(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(e,t.props||{},(p,h,...m)=>{const d=m.length?m[0]:h;return a.ctx&&r(a.ctx[p],a.ctx[p]=d)&&(!a.skip_bound&&a.bound[p]&&a.bound[p](d),f&&Fi(e,p)),h}):[],a.update(),f=!0,me(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const p=Di(t.target);a.fragment&&a.fragment.l(p),p.forEach(_)}else a.fragment&&a.fragment.c();t.intro&&y(e.$$.fragment),M(e,t.target,t.anchor),ti()}Ye(u)}class K{constructor(){Nt(this,"$$");Nt(this,"$$set")}$destroy(){x(this,1),this.$destroy=G}$on(t,n){if(!ze(n))return G;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!xi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zi="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zi);function Mt(e){window.runtime.LogError(e)}function An(e){window.runtime.BrowserOpenURL(e)}function Vi(){window.runtime.Quit()}function Wi(e,t){return window.go.main.App.AddSnippet(e,t)}function Xi(){return window.go.main.App.DaemonInstalled()}function qi(){return window.go.main.App.ExportSnippets()}function Zi(){return window.go.main.App.GetAllSnippets()}function Qi(){return window.go.main.App.GetAutoexpandStatus()}function Ji(){return window.go.main.App.GetAutostartStatus()}function ni(e){return window.go.main.App.GetSetting(e)}function ii(e){return window.go.main.App.GetSnippetWithAbbreviation(e)}function Yi(e){return window.go.main.App.GetSnippetWithID(e)}function Ki(e,t){return window.go.main.App.GetSnippets(e,t)}function ri(e){return window.go.main.App.ImportSnippets(e)}function er(e){return window.go.main.App.NilUUID(e)}function tr(e,t){return window.go.main.App.PasteSnippetAndQuit(e,t)}function nr(e){return window.go.main.App.Ping(e)}function ir(e){return window.go.main.App.RemoveSnippet(e)}function rr(e,t){return window.go.main.App.SaveSetting(e,t)}function sr(){return window.go.main.App.SearchAndPasteMode()}function oe(e,t){return window.go.main.App.ShowError(e,t)}function or(){return window.go.main.App.StartDaemon()}function lr(e){return window.go.main.App.UpdateAutoexpand(e)}function ar(e){return window.go.main.App.UpdateAutostart(e)}function ur(e,t){return window.go.main.App.UpdateSnippetWithID(e,t)}const Pe=[];function si(e,t){return{subscribe:Ee(e,t).subscribe}}function Ee(e,t=G){let n;const i=new Set;function r(l){if(J(e,l)&&(e=l,n)){const u=!Pe.length;for(const a of i)a[1](),Pe.push(a,e);if(u){for(let a=0;a<Pe.length;a+=2)Pe[a][0](Pe[a+1]);Pe.length=0}}}function s(l){r(l(e))}function o(l,u=G){const a=[l,u];return i.add(a),i.size===1&&(n=t(r,s)||G),l(e),()=>{i.delete(a),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function Ae(e,t,n){const i=!Array.isArray(e),r=i?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return si(n,(o,l)=>{let u=!1;const a=[];let f=0,p=G;const h=()=>{if(f)return;p();const d=t(i?a[0]:a,o,l);s?o(d):p=ze(d)?d:G},m=r.map((d,b)=>nn(d,H=>{a[b]=H,f&=~(1<<b),u&&h()},()=>{f|=1<<b}));return u=!0,h(),function(){me(m),p(),u=!1}})}function fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cr=function(t){return hr(t)&&!pr(t)};function hr(e){return!!e&&typeof e=="object"}function pr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||_r(e)}var mr=typeof Symbol=="function"&&Symbol.for,dr=mr?Symbol.for("react.element"):60103;function _r(e){return e.$$typeof===dr}function gr(e){return Array.isArray(e)?[]:{}}function it(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ge(gr(e),e,t):e}function br(e,t,n){return e.concat(t).map(function(i){return it(i,n)})}function vr(e,t){if(!t.customMerge)return Ge;var n=t.customMerge(e);return typeof n=="function"?n:Ge}function wr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Bn(e){return Object.keys(e).concat(wr(e))}function oi(e,t){try{return t in e}catch{return!1}}function Er(e,t){return oi(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function yr(e,t,n){var i={};return n.isMergeableObject(e)&&Bn(e).forEach(function(r){i[r]=it(e[r],n)}),Bn(t).forEach(function(r){Er(e,r)||(oi(e,r)&&n.isMergeableObject(t[r])?i[r]=vr(r,n)(e[r],t[r],n):i[r]=it(t[r],n))}),i}function Ge(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||br,n.isMergeableObject=n.isMergeableObject||cr,n.cloneUnlessOtherwiseSpecified=it;var i=Array.isArray(t),r=Array.isArray(e),s=i===r;return s?i?n.arrayMerge(e,t,n):yr(e,t,n):it(t,n)}Ge.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,r){return Ge(i,r,n)},{})};var Sr=Ge,kr=Sr;const Ar=fr(kr);var Wt=function(e,t){return Wt=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])},Wt(e,t)};function kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){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)&&(t[s]=n[s])}return t},te.apply(this,arguments)};function xt(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,s;i<r;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var re;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(re||(re={}));var $e;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})($e||($e={}));function Tn(e){return e.type===re.literal}function Br(e){return e.type===re.argument}function li(e){return e.type===re.number}function ai(e){return e.type===re.date}function ui(e){return e.type===re.time}function fi(e){return e.type===re.select}function ci(e){return e.type===re.plural}function Tr(e){return e.type===re.pound}function hi(e){return e.type===re.tag}function pi(e){return!!(e&&typeof e=="object"&&e.type===$e.number)}function Xt(e){return!!(e&&typeof e=="object"&&e.type===$e.dateTime)}var mi=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Hr=/(?:[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 Ir(e){var t={};return e.replace(Hr,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.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":t.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":t.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":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.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":t.minute=["numeric","2-digit"][i-1];break;case"s":t.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":t.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""}),t}var Cr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Pr(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Cr).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var s=r[i],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var l=o[0],u=o.slice(1),a=0,f=u;a<f.length;a++){var p=f[a];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:u})}return n}function Lr(e){return e.replace(/^(.*?)-/,"")}var Hn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,di=/^(@+)?(\+|#+)?[rs]?$/g,Nr=/(\*)(0+)|(#+)(0+)|(0+)/g,_i=/^(0+)$/;function In(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(di,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function gi(e){switch(e){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 Or(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!_i.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Cn(e){var t={},n=gi(e);return n||t}function Mr(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Lr(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=te(te(te({},t),{notation:"scientific"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.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(Nr,function(u,a,f,p,h,m){if(a)t.minimumIntegerDigits=f.length;else{if(p&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(_i.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(Hn.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Hn,function(u,a,f,p,h,m){return f==="*"?t.minimumFractionDigits=a.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length),""});var s=r.options[0];s==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=te(te({},t),In(s)));continue}if(di.test(r.stem)){t=te(te({},t),In(r.stem));continue}var o=gi(r.stem);o&&(t=te(te({},t),o));var l=Or(r.stem);l&&(t=te(te({},t),l))}return t}var mt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","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"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function xr(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var s=0;i+1<e.length&&e.charAt(i+1)===r;)s++,i++;var o=1+(s&1),l=s<2?1:3+(s>>1),u="a",a=Rr(t);for((a=="H"||a=="k")&&(l=0);l-- >0;)n+=u;for(;o-- >0;)n=a+n}else r==="J"?n+="H":n+=r}return n}function Rr(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=mt[i||""]||mt[n||""]||mt["".concat(n,"-001")]||mt["001"];return r[0]}var Rt,Ur=new RegExp("^".concat(mi.source,"*")),Dr=new RegExp("".concat(mi.source,"*$"));function Q(e,t){return{start:e,end:t}}var Gr=!!String.prototype.startsWith,$r=!!String.fromCodePoint,jr=!!Object.fromEntries,Fr=!!String.prototype.codePointAt,zr=!!String.prototype.trimStart,Vr=!!String.prototype.trimEnd,Wr=!!Number.isSafeInteger,Xr=Wr?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{var qr=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qt=((Rt=qr.exec("a"))===null||Rt===void 0?void 0:Rt[0])==="a"}catch{qt=!1}var Pn=Gr?function(t,n,i){return t.startsWith(n,i)}:function(t,n,i){return t.slice(i,i+n.length)===n},Zt=$r?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i="",r=t.length,s=0,o;r>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},Ln=jr?Object.fromEntries:function(t){for(var n={},i=0,r=t;i<r.length;i++){var s=r[i],o=s[0],l=s[1];n[o]=l}return n},bi=Fr?function(t,n){return t.codePointAt(n)}:function(t,n){var i=t.length;if(!(n<0||n>=i)){var r=t.charCodeAt(n),s;return r<55296||r>56319||n+1===i||(s=t.charCodeAt(n+1))<56320||s>57343?r:(r-55296<<10)+(s-56320)+65536}},Zr=zr?function(t){return t.trimStart()}:function(t){return t.replace(Ur,"")},Qr=Vr?function(t){return t.trimEnd()}:function(t){return t.replace(Dr,"")};function vi(e,t){return new RegExp(e,t)}var Qt;if(qt){var Nn=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qt=function(t,n){var i;Nn.lastIndex=n;var r=Nn.exec(t);return(i=r[1])!==null&&i!==void 0?i:""}}else Qt=function(t,n){for(var i=[];;){var r=bi(t,n);if(r===void 0||wi(r)||es(r))break;i.push(r),n+=r>=65536?2:1}return Zt.apply(void 0,i)};var Jr=function(){function e(t,n){n===void 0&&(n={}),this.message=t,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 e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,i);if(o.err)return o;r.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),r.push({type:re.pound,location:Q(l,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(q.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Jt(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;r.push(o.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:re.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var o=s.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Jt(this.char()))return this.error(q.INVALID_TAG,Q(l,this.clonePosition()));var u=this.clonePosition(),a=this.parseTagName();return r!==a?this.error(q.UNMATCHED_CLOSING_TAG,Q(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:re.tag,value:r,children:o,location:Q(i,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Q(l,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(q.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Kr(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var s=this.tryParseQuote(n);if(s){r+=s;continue}var o=this.tryParseUnquoted(t,n);if(o){r+=o;continue}var l=this.tryParseLeftAngleBracket();if(l){r+=l;continue}break}var u=Q(i,this.clonePosition());return{val:{type:re.literal,value:r,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Yr(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){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(t==="plural"||t==="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 Zt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Zt(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:re.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Qt(this.message,n),r=n+i.length;this.bumpTo(r);var s=this.clonePosition(),o=Q(t,s);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,n,i,r){var s,o=this.clonePosition(),l=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(l){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Q(o,u));case"number":case"date":case"time":{this.bumpSpace();var a=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var h=Qr(p.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var m=Q(f,this.clonePosition());a={style:h,styleLocation:m}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var b=Q(r,this.clonePosition());if(a&&Pn(a==null?void 0:a.style,"::",0)){var H=Zr(a.style.slice(2));if(l==="number"){var p=this.parseNumberSkeletonFromString(H,a.styleLocation);return p.err?p:{val:{type:re.number,value:i,location:b,style:p.val},err:null}}else{if(H.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,b);var A=H;this.locale&&(A=xr(H,this.locale));var h={type:$e.dateTime,pattern:A,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?Ir(A):{}},w=l==="date"?re.date:re.time;return{val:{type:w,value:i,location:b,style:h},err:null}}}return{val:{type:l==="number"?re.number:l==="date"?re.date:re.time,value:i,location:b,style:(s=a==null?void 0:a.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(I,te({},I)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),B=0;if(l!=="select"&&E.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),E=this.parseIdentifierIfPossible(),B=p.val}var P=this.tryParsePluralOrSelectOptions(t,l,n,E);if(P.err)return P;var d=this.tryParseArgumentClose(r);if(d.err)return d;var S=Q(r,this.clonePosition());return l==="select"?{val:{type:re.select,value:i,options:Ln(P.val),location:S},err:null}:{val:{type:re.plural,value:i,options:Ln(P.val),offset:B,pluralType:l==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Q(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=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(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=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}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=Pr(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:$e.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Mr(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var s,o=!1,l=[],u=new Set,a=r.value,f=r.location;;){if(a.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Q(p,this.clonePosition()),a=this.message.slice(p.offset,this.offset())}else break}if(u.has(a))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);a==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,i);if(d.err)return d;var b=this.tryParseArgumentClose(m);if(b.err)return b;l.push([a,{value:d.val,location:Q(m,this.clonePosition())}]),u.add(a),this.bumpSpace(),s=this.parseIdentifierIfPossible(),a=s.value,f=s.location}return l.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(q.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,o=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)s=!0,o=o*10+(l-48),this.bump();else break}var u=Q(r,this.clonePosition());return s?(o*=i,Xr(o)?{val:o,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=bi(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Pn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&wi(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function Jt(e){return e>=97&&e<=122||e>=65&&e<=90}function Yr(e){return Jt(e)||e===47}function Kr(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function wi(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function es(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Yt(e){e.forEach(function(t){if(delete t.location,fi(t)||ci(t))for(var n in t.options)delete t.options[n].location,Yt(t.options[n].value);else li(t)&&pi(t.style)||(ai(t)||ui(t))&&Xt(t.style)?delete t.style.location:hi(t)&&Yt(t.children)})}function ts(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Jr(e,t).parse();if(n.err){var i=SyntaxError(q[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||Yt(n.val),n.val}function Ut(e,t){var n=t&&t.cache?t.cache:ls,i=t&&t.serializer?t.serializer:os,r=t&&t.strategy?t.strategy:is;return r(e,{cache:n,serializer:i})}function ns(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Ei(e,t,n,i){var r=ns(i)?i:n(i),s=t.get(r);return typeof s>"u"&&(s=e.call(this,i),t.set(r,s)),s}function yi(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return typeof s>"u"&&(s=e.apply(this,i),t.set(r,s)),s}function ln(e,t,n,i,r){return n.bind(t,e,i,r)}function is(e,t){var n=e.length===1?Ei:yi;return ln(e,this,n,t.cache.create(),t.serializer)}function rs(e,t){return ln(e,this,yi,t.cache.create(),t.serializer)}function ss(e,t){return ln(e,this,Ei,t.cache.create(),t.serializer)}var os=function(){return JSON.stringify(arguments)};function an(){this.cache=Object.create(null)}an.prototype.get=function(e){return this.cache[e]};an.prototype.set=function(e,t){this.cache[e]=t};var ls={create:function(){return new an}},Dt={variadic:rs,monadic:ss},je;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(je||(je={}));var At=function(e){kt(t,e);function t(n,i,r){var s=e.call(this,n)||this;return s.code=i,s.originalMessage=r,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),On=function(e){kt(t,e);function t(n,i,r,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),je.INVALID_VALUE,s)||this}return t}(At),as=function(e){kt(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),je.INVALID_VALUE,r)||this}return t}(At),us=function(e){kt(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),je.MISSING_VALUE,i)||this}return t}(At),ue;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ue||(ue={}));function fs(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==ue.literal||n.type!==ue.literal?t.push(n):i.value+=n.value,t},[])}function cs(e){return typeof e=="function"}function _t(e,t,n,i,r,s,o){if(e.length===1&&Tn(e[0]))return[{type:ue.literal,value:e[0].value}];for(var l=[],u=0,a=e;u<a.length;u++){var f=a[u];if(Tn(f)){l.push({type:ue.literal,value:f.value});continue}if(Tr(f)){typeof s=="number"&&l.push({type:ue.literal,value:n.getNumberFormat(t).format(s)});continue}var p=f.value;if(!(r&&p in r))throw new us(p,o);var h=r[p];if(Br(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),l.push({type:typeof h=="string"?ue.literal:ue.object,value:h});continue}if(ai(f)){var m=typeof f.style=="string"?i.date[f.style]:Xt(f.style)?f.style.parsedOptions:void 0;l.push({type:ue.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(ui(f)){var m=typeof f.style=="string"?i.time[f.style]:Xt(f.style)?f.style.parsedOptions:i.time.medium;l.push({type:ue.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(li(f)){var m=typeof f.style=="string"?i.number[f.style]:pi(f.style)?f.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),l.push({type:ue.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(hi(f)){var d=f.children,b=f.value,H=r[b];if(!cs(H))throw new as(b,"function",o);var A=_t(d,t,n,i,r,s),w=H(A.map(function(B){return B.value}));Array.isArray(w)||(w=[w]),l.push.apply(l,w.map(function(B){return{type:typeof B=="string"?ue.literal:ue.object,value:B}}))}if(fi(f)){var I=f.options[h]||f.options.other;if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,_t(I.value,t,n,i,r));continue}if(ci(f)){var I=f.options["=".concat(h)];if(!I){if(!Intl.PluralRules)throw new At(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,je.MISSING_INTL_API,o);var E=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));I=f.options[E]||f.options.other}if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,_t(I.value,t,n,i,r,h-(f.offset||0)));continue}}return fs(l)}function hs(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=te(te({},e[i]),t[i]||{}),n},{})):e}function ps(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=hs(e[i],t[i]),n},te({},e)):e}function Gt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ms(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ut(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,xt([void 0],n,!1)))},{cache:Gt(e.number),strategy:Dt.variadic}),getDateTimeFormat:Ut(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,xt([void 0],n,!1)))},{cache:Gt(e.dateTime),strategy:Dt.variadic}),getPluralRules:Ut(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,xt([void 0],n,!1)))},{cache:Gt(e.pluralRules),strategy:Dt.variadic})}}var ds=function(){function e(t,n,i,r){var s=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(o){var l=s.formatToParts(o);if(l.length===1)return l[0].value;var u=l.reduce(function(a,f){return!a.length||f.type!==ue.literal||typeof a[a.length-1]!="string"?a.push(f.value):a[a.length-1]+=f.value,a},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(o){return _t(s.ast,s.locales,s.formatters,s.formats,o,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:r==null?void 0:r.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ps(e.formats,i),this.formatters=r&&r.formatters||ms(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=ts,e.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"}}},e}();const ke={},_s=(e,t,n)=>n&&(t in ke||(ke[t]={}),e in ke[t]||(ke[t][e]=n),n),Si=(e,t)=>{if(t==null)return;if(t in ke&&e in ke[t])return ke[t][e];const n=ct(t);for(let i=0;i<n.length;i++){const r=gs(n[i],e);if(r)return _s(e,t,r)}};let un;const Ve=Ee({});function fn(e){return e in un}function gs(e,t){if(!fn(e))return null;const n=function(i){return un[i]||null}(e);return function(i,r){if(r==null)return;if(r in i)return i[r];const s=r.split(".");let o=i;for(let l=0;l<s.length;l++)if(typeof o=="object"){if(l>0){const u=s.slice(l,s.length).join(".");if(u in o){o=o[u];break}}o=o[s[l]]}else o=void 0;return o}(n,t)}function bs(e,...t){delete ke[e],Ve.update(n=>(n[e]=Ar.all([n[e]||{},...t]),n))}Ae([Ve],([e])=>Object.keys(e));Ve.subscribe(e=>un=e);const Ke={};function et(e){return Ke[e]}function Et(e){return e!=null&&ct(e).some(t=>{var n;return(n=et(t))===null||n===void 0?void 0:n.size})}function vs(e,t){return Promise.all(t.map(i=>(function(r,s){Ke[r].delete(s),Ke[r].size===0&&delete Ke[r]}(e,i),i().then(r=>r.default||r)))).then(i=>bs(e,...i))}const Ze={};function ki(e){if(!Et(e))return e in Ze?Ze[e]:Promise.resolve();const t=function(n){return ct(n).map(i=>{const r=et(i);return[i,r?[...r]:[]]}).filter(([,i])=>i.length>0)}(e);return Ze[e]=Promise.all(t.map(([n,i])=>vs(n,i))).then(()=>{if(Et(e))return ki(e);delete Ze[e]}),Ze[e]}function ws(e,t){et(e)||function(i){Ke[i]=new Set}(e);const n=et(e);et(e).has(t)||(fn(e)||Ve.update(i=>(i[e]={},i)),n.add(t))}function Es({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${ct(e).join('", "')}".${Et(Be())?`

Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const Qe={fallbackLocale:null,loadingDelay:200,formats:{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"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Fe(){return Qe}function ys(e){const{formats:t,...n}=e,i=e.initialLocale||e.fallbackLocale;return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=Es:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Qe,n,{initialLocale:i}),t&&("number"in t&&Object.assign(Qe.formats.number,t.number),"date"in t&&Object.assign(Qe.formats.date,t.date),"time"in t&&Object.assign(Qe.formats.time,t.time)),We.set(i)}const gt=Ee(!1);let Kt;const bt=Ee(null);function Mn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function ct(e,t=Fe().fallbackLocale){const n=Mn(e);return t?[...new Set([...n,...Mn(t)])]:n}function Be(){return Kt??void 0}bt.subscribe(e=>{Kt=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const We={...bt,set:e=>{if(e&&function(t){if(t==null)return;const n=ct(t);for(let i=0;i<n.length;i++){const r=n[i];if(fn(r))return r}}(e)&&Et(e)){const{loadingDelay:t}=Fe();let n;return typeof window<"u"&&Be()!=null&&t?n=window.setTimeout(()=>gt.set(!0),t):gt.set(!0),ki(e).then(()=>{bt.set(e)}).finally(()=>{clearTimeout(n),gt.set(!1)})}return bt.set(e)}},Ss=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Bt=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},rt=(e,t)=>{const{formats:n}=Fe();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ks=Bt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=rt("number",t)),new Intl.NumberFormat(e,n)}),As=Bt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=rt("date",t):Object.keys(n).length===0&&(n=rt("date","short")),new Intl.DateTimeFormat(e,n)}),Bs=Bt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=rt("time",t):Object.keys(n).length===0&&(n=rt("time","short")),new Intl.DateTimeFormat(e,n)}),Ts=({locale:e=Be(),...t}={})=>ks({locale:e,...t}),Hs=({locale:e=Be(),...t}={})=>As({locale:e,...t}),Is=({locale:e=Be(),...t}={})=>Bs({locale:e,...t}),Cs=Bt((e,t=Be())=>new ds(e,t,Fe().formats,{ignoreTag:Fe().ignoreTag})),Ps=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:l,locale:u=Be(),default:a}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Si(e,u);if(f){if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f}else f=(s=(r=(i=(n=Fe()).handleMissingMessage)===null||i===void 0?void 0:i.call(n,{locale:u,id:e,defaultValue:a}))!==null&&r!==void 0?r:a)!==null&&s!==void 0?s:e;if(!l)return f;let p=f;try{p=Cs(f,u).format(l)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return p},Ls=(e,t)=>Is(t).format(e),Ns=(e,t)=>Hs(t).format(e),Os=(e,t)=>Ts(t).format(e),Ms=(e,t=Be())=>Si(e,t),de=Ae([We,Ve],()=>Ps);Ae([We],()=>Ls);Ae([We],()=>Ns);Ae([We],()=>Os);Ae([We,Ve],()=>Ms);function xs(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,i,r,s,o=[],l="",u=e.split("/");for(u[0]||u.shift();r=u.shift();)n=r[0],n==="*"?(o.push("wild"),l+="/(.*)"):n===":"?(i=r.indexOf("?",1),s=r.indexOf(".",1),o.push(r.substring(1,~i?i:~s?s:r.length)),l+=~i&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(l+=(~i?"?":"")+"\\"+r.substring(s))):l+="/"+r;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}function Rs(e){let t,n,i;const r=[e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&4)a=vt(r,[wt(l[2])]);else for(let f=0;f<r.length;f+=1)a=tn(a,r[f]);return{props:a}}return s&&(t=De(s,o(e)),t.$on("routeEvent",e[7])),{c(){t&&R(t.$$.fragment),n=ve()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){le();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ae()}s?(t=De(s,o(l,u)),t.$on("routeEvent",l[7]),R(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&4?vt(r,[wt(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Us(e){let t,n,i;const r=[{params:e[1]},e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&6)a=vt(r,[u&2&&{params:l[1]},u&4&&wt(l[2])]);else for(let f=0;f<r.length;f+=1)a=tn(a,r[f]);return{props:a}}return s&&(t=De(s,o(e)),t.$on("routeEvent",e[6])),{c(){t&&R(t.$$.fragment),n=ve()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){le();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ae()}s?(t=De(s,o(l,u)),t.$on("routeEvent",l[6]),R(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&6?vt(r,[u&2&&{params:l[1]},u&4&&wt(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Ds(e){let t,n,i,r;const s=[Us,Rs],o=[];function l(u,a){return u[1]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ve()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(le(),k(o[f],1,1,()=>{o[f]=null}),ae(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function xn(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let i="";return n>-1&&(i=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:i}}const cn=si(null,function(t){t(xn());const n=()=>{t(xn())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}});Ae(cn,e=>e.location);Ae(cn,e=>e.querystring);const Rn=Ee(void 0);async function xe(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await on(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function be(){await on(),window.history.back()}function Gs(e){e?window.scrollTo(e.__svelte_spa_router_scrollX,e.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function $s(e,t,n){let{routes:i={}}=t,{prefix:r=""}=t,{restoreScrollState:s=!1}=t;class o{constructor(B,P){if(!P||typeof P!="function"&&(typeof P!="object"||P._sveltesparouter!==!0))throw Error("Invalid component object");if(!B||typeof B=="string"&&(B.length<1||B.charAt(0)!="/"&&B.charAt(0)!="*")||typeof B=="object"&&!(B instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:S,keys:O}=xs(B);this.path=B,typeof P=="object"&&P._sveltesparouter===!0?(this.component=P.component,this.conditions=P.conditions||[],this.userData=P.userData,this.props=P.props||{}):(this.component=()=>Promise.resolve(P),this.conditions=[],this.props={}),this._pattern=S,this._keys=O}match(B){if(r){if(typeof r=="string")if(B.startsWith(r))B=B.substr(r.length)||"/";else return null;else if(r instanceof RegExp){const v=B.match(r);if(v&&v[0])B=B.substr(v[0].length)||"/";else return null}}const P=this._pattern.exec(B);if(P===null)return null;if(this._keys===!1)return P;const S={};let O=0;for(;O<this._keys.length;){try{S[this._keys[O]]=decodeURIComponent(P[O+1]||"")||null}catch{S[this._keys[O]]=null}O++}return S}async checkConditions(B){for(let P=0;P<this.conditions.length;P++)if(!await this.conditions[P](B))return!1;return!0}}const l=[];i instanceof Map?i.forEach((E,B)=>{l.push(new o(B,E))}):Object.keys(i).forEach(E=>{l.push(new o(E,i[E]))});let u=null,a=null,f={};const p=ft();async function h(E,B){await on(),p(E,B)}let m=null,d=null;s&&(d=E=>{E.state&&(E.state.__svelte_spa_router_scrollY||E.state.__svelte_spa_router_scrollX)?m=E.state:m=null},window.addEventListener("popstate",d),Yn(()=>{Gs(m)}));let b=null,H=null;const A=cn.subscribe(async E=>{b=E;let B=0;for(;B<l.length;){const P=l[B].match(E.location);if(!P){B++;continue}const S={route:l[B].path,location:E.location,querystring:E.querystring,userData:l[B].userData,params:P&&typeof P=="object"&&Object.keys(P).length?P:null};if(!await l[B].checkConditions(S)){n(0,u=null),H=null,h("conditionsFailed",S);return}h("routeLoading",Object.assign({},S));const O=l[B].component;if(H!=O){O.loading?(n(0,u=O.loading),H=O,n(1,a=O.loadingParams),n(2,f={}),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a}))):(n(0,u=null),H=null);const v=await O();if(E!=b)return;n(0,u=v&&v.default||v),H=O}P&&typeof P=="object"&&Object.keys(P).length?n(1,a=P):n(1,a=null),n(2,f=l[B].props),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a})).then(()=>{Rn.set(a)});return}n(0,u=null),H=null,Rn.set(void 0)});sn(()=>{A(),d&&window.removeEventListener("popstate",d)});function w(E){nt.call(this,e,E)}function I(E){nt.call(this,e,E)}return e.$$set=E=>{"routes"in E&&n(3,i=E.routes),"prefix"in E&&n(4,r=E.prefix),"restoreScrollState"in E&&n(5,s=E.restoreScrollState)},e.$$.update=()=>{e.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[u,a,f,i,r,s,w,I]}class js extends K{constructor(t){super(),Y(this,t,$s,Ds,J,{routes:3,prefix:4,restoreScrollState:5})}}const he=Ee(!1),Je=Ee(!1),yt=Ee(!1);function Ai(){const{subscribe:e,set:t,update:n}=Ee([]);return{subscribe:e,fetch:async()=>{if(!yn(he))return;const i=await Zi();n(r=>i)},search:async(i,r)=>{if(!yn(he))return;const s=await Ki(i,r);n(o=>s)},reset:()=>t([])}}const He=Ai(),$t=Ee(""),jt=Ai();function Fs(e){let t,n,i,r;return{c(){t=X("svg"),n=X("polyline"),i=X("polyline"),c(n,"points","11 17 6 12 11 7"),c(i,"points","18 17 13 12 18 7"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-chevrons-left "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-chevrons-left "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function zs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Bi extends K{constructor(t){super(),Y(this,t,zs,Fs,J,{size:0,strokeWidth:1,class:2})}}function Vs(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("line"),r=X("line"),c(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),c(i,"x1","18"),c(i,"y1","9"),c(i,"x2","12"),c(i,"y2","15"),c(r,"x1","12"),c(r,"y1","9"),c(r,"x2","18"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-delete "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-delete "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Ws(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Xs extends K{constructor(t){super(),Y(this,t,Ws,Vs,J,{size:0,strokeWidth:1,class:2})}}function qs(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","7 10 12 15 17 10"),c(r,"x1","12"),c(r,"y1","15"),c(r,"x2","12"),c(r,"y2","3"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-download "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-download "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Zs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Qs extends K{constructor(t){super(),Y(this,t,Zs,qs,J,{size:0,strokeWidth:1,class:2})}}function Js(e){let t,n,i,r;return{c(){t=X("svg"),n=X("path"),i=X("path"),c(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),c(i,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-edit "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-edit "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function Ys(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ks extends K{constructor(t){super(),Y(this,t,Ys,Js,J,{size:0,strokeWidth:1,class:2})}}function eo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("path"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),c(r,"x1","12"),c(r,"y1","17"),c(r,"x2","12.01"),c(r,"y2","17"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-help-circle "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-help-circle "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function to(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class no extends K{constructor(t){super(),Y(this,t,to,eo,J,{size:0,strokeWidth:1,class:2})}}function io(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("line"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"x1","12"),c(i,"y1","16"),c(i,"x2","12"),c(i,"y2","12"),c(r,"x1","12"),c(r,"y1","8"),c(r,"x2","12.01"),c(r,"y2","8"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-info "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-info "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function ro(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class so extends K{constructor(t){super(),Y(this,t,ro,io,J,{size:0,strokeWidth:1,class:2})}}function oo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("rect"),i=X("line"),r=X("line"),c(n,"x","3"),c(n,"y","3"),c(n,"width","18"),c(n,"height","18"),c(n,"rx","2"),c(n,"ry","2"),c(i,"x1","12"),c(i,"y1","8"),c(i,"x2","12"),c(i,"y2","16"),c(r,"x1","8"),c(r,"y1","12"),c(r,"x2","16"),c(r,"y2","12"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-plus-square "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-plus-square "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function lo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class hn extends K{constructor(t){super(),Y(this,t,lo,oo,J,{size:0,strokeWidth:1,class:2})}}function ao(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("line"),c(n,"cx","11"),c(n,"cy","11"),c(n,"r","8"),c(i,"x1","21"),c(i,"y1","21"),c(i,"x2","16.65"),c(i,"y2","16.65"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-search "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-search "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function uo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class fo extends K{constructor(t){super(),Y(this,t,uo,ao,J,{size:0,strokeWidth:1,class:2})}}function co(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("path"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","3"),c(i,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-settings "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-settings "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function ho(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ti extends K{constructor(t){super(),Y(this,t,ho,co,J,{size:0,strokeWidth:1,class:2})}}function po(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","17 8 12 3 7 8"),c(r,"x1","12"),c(r,"y1","3"),c(r,"x2","12"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-upload "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-upload "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function mo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class en extends K{constructor(t){super(),Y(this,t,mo,po,J,{size:0,strokeWidth:1,class:2})}}function _o(e){let t,n;const i=e[5].default,r=st(i,e,e[4],null);return{c(){t=N("p"),r&&r.c(),c(t,"class","svelte-hclhr3"),W(t,"error",e[3]),W(t,"warning",e[0]),W(t,"success",e[1]),W(t,"info",e[2])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&16)&&lt(r,i,s,s[4],n?ot(i,s[4],o,null):at(s[4]),null),(!n||o&8)&&W(t,"error",s[3]),(!n||o&1)&&W(t,"warning",s[0]),(!n||o&2)&&W(t,"success",s[1]),(!n||o&4)&&W(t,"info",s[2])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function go(e,t,n){let{$$slots:i={},$$scope:r}=t,{error:s=!1}=t,{warning:o=!1}=t,{success:l=!1}=t,{info:u=!1}=t;return o=s&&o?!1:o,l=(s||o)&&l?!1:l,u=!(s||o||l),e.$$set=a=>{"error"in a&&n(3,s=a.error),"warning"in a&&n(0,o=a.warning),"success"in a&&n(1,l=a.success),"info"in a&&n(2,u=a.info),"$$scope"in a&&n(4,r=a.$$scope)},[o,l,u,s,r,i]}class Tt extends K{constructor(t){super(),Y(this,t,go,_o,J,{error:3,warning:0,success:1,info:2})}}function bo(e){let t=e[0]("no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("no_connection")+"")&&F(n,t)},d(i){i&&_(n)}}}function vo(e){let t,n;return t=new Tt({props:{error:!0,$$slots:{default:[bo]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function wo(e,t,n){let i;return ie(e,de,r=>n(0,i=r)),[i]}class Eo extends K{constructor(t){super(),Y(this,t,wo,vo,J,{})}}function yo(e){let t,n,i,r;const s=e[5].default,o=st(s,e,e[4],null);return{c(){t=N("button"),o&&o.c(),t.disabled=e[3],c(t,"class","svelte-1jbd97"),W(t,"primary",e[0]),W(t,"danger",e[1]),W(t,"secondary",e[2])},m(l,u){g(l,t,u),o&&o.m(t,null),n=!0,i||(r=se(t,"click",e[6]),i=!0)},p(l,[u]){o&&o.p&&(!n||u&16)&&lt(o,s,l,l[4],n?ot(s,l[4],u,null):at(l[4]),null),(!n||u&8)&&(t.disabled=l[3]),(!n||u&1)&&W(t,"primary",l[0]),(!n||u&2)&&W(t,"danger",l[1]),(!n||u&4)&&W(t,"secondary",l[2])},i(l){n||(y(o,l),n=!0)},o(l){k(o,l),n=!1},d(l){l&&_(t),o&&o.d(l),i=!1,r()}}}function So(e,t,n){let{$$slots:i={},$$scope:r}=t,{primary:s=!1}=t,{danger:o=!1}=t,{secondary:l=!1}=t,{disabled:u=!1}=t;s=!s&&!l&&!o?!0:s,o=s&&o?!1:o,l=(s||o)&&l?!1:l;function a(f){nt.call(this,e,f)}return e.$$set=f=>{"primary"in f&&n(0,s=f.primary),"danger"in f&&n(1,o=f.danger),"secondary"in f&&n(2,l=f.secondary),"disabled"in f&&n(3,u=f.disabled),"$$scope"in f&&n(4,r=f.$$scope)},[s,o,l,u,r,i,a]}class Re extends K{constructor(t){super(),Y(this,t,So,yo,J,{primary:0,danger:1,secondary:2,disabled:3})}}function ko(e){let t=e[0]("daemon.start")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.start")+"")&&F(n,t)},d(i){i&&_(n)}}}function Ao(e){let t=e[0]("daemon.installed")+"",n,i,r,s;return r=new Re({props:{$$slots:{default:[ko]},$$scope:{ctx:e}}}),r.$on("click",e[1]),{c(){n=j(t),i=U(),R(r.$$.fragment)},m(o,l){g(o,n,l),g(o,i,l),M(r,o,l),s=!0},p(o,l){(!s||l&1)&&t!==(t=o[0]("daemon.installed")+"")&&F(n,t);const u={};l&5&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){s||(y(r.$$.fragment,o),s=!0)},o(o){k(r.$$.fragment,o),s=!1},d(o){o&&(_(n),_(i)),x(r,o)}}}function Bo(e){let t,n;return t=new Tt({props:{warning:!0,$$slots:{default:[Ao]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&5&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function To(e,t,n){let i;ie(e,de,s=>n(0,i=s));async function r(){yt.update(s=>!0);try{const s=await or()}catch(s){await oe(i("daemon.start_error_title"),s),yt.update(o=>!1)}await He.fetch()}return[i,r]}class Ho extends K{constructor(t){super(),Y(this,t,To,Bo,J,{})}}function Io(e){let t=e[0]("daemon.not_installed")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.not_installed")+"")&&F(n,t)},d(i){i&&_(n)}}}function Co(e){let t,n;return t=new Tt({props:{error:!0,$$slots:{default:[Io]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Po(e,t,n){let i;return ie(e,de,r=>n(0,i=r)),[i]}class Lo extends K{constructor(t){super(),Y(this,t,Po,Co,J,{})}}function No(e){let t=e[0]("daemon.starting")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.starting")+"")&&F(n,t)},d(i){i&&_(n)}}}function Oo(e){let t,n;return t=new Tt({props:{warning:!0,$$slots:{default:[No]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Mo(e,t,n){let i;return ie(e,de,r=>n(0,i=r)),[i]}class xo extends K{constructor(t){super(),Y(this,t,Mo,Oo,J,{})}}function Un(e){let t,n,i,r,s,o;t=new Eo({});const l=[Do,Uo,Ro],u=[];function a(f,p){return f[2]&&!f[3]?0:f[2]&&f[3]?1:2}return i=a(e),r=u[i]=l[i](e),{c(){R(t.$$.fragment),n=U(),r.c(),s=ve()},m(f,p){M(t,f,p),g(f,n,p),u[i].m(f,p),g(f,s,p),o=!0},p(f,p){let h=i;i=a(f),i!==h&&(le(),k(u[h],1,1,()=>{u[h]=null}),ae(),r=u[i],r||(r=u[i]=l[i](f),r.c()),y(r,1),r.m(s.parentNode,s))},i(f){o||(y(t.$$.fragment,f),y(r),o=!0)},o(f){k(t.$$.fragment,f),k(r),o=!1},d(f){f&&(_(n),_(s)),x(t,f),u[i].d(f)}}}function Ro(e){let t,n;return t=new Lo({}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Uo(e){let t,n;return t=new xo({}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Do(e){let t,n;return t=new Ho({}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Go(e){let t,n,i,r,s,o=!e[1]&&Un(e);const l=e[6].default,u=st(l,e,e[5],null);return{c(){t=N("div"),o&&o.c(),n=U(),u&&u.c(),c(t,"class","screen svelte-i096ea"),W(t,"centered",e[0])},m(a,f){g(a,t,f),o&&o.m(t,null),T(t,n),u&&u.m(t,null),i=!0,r||(s=[se(t,"keyup",e[4]),se(t,"keyup",e[7])],r=!0)},p(a,[f]){a[1]?o&&(le(),k(o,1,1,()=>{o=null}),ae()):o?(o.p(a,f),f&2&&y(o,1)):(o=Un(a),o.c(),y(o,1),o.m(t,n)),u&&u.p&&(!i||f&32)&&lt(u,l,a,a[5],i?ot(l,a[5],f,null):at(a[5]),null),(!i||f&1)&&W(t,"centered",a[0])},i(a){i||(y(o),y(u,a),i=!0)},o(a){k(o),k(u,a),i=!1},d(a){a&&_(t),o&&o.d(),u&&u.d(a),r=!1,me(s)}}}function $o(e,t,n){let i,r,s;ie(e,he,h=>n(1,i=h)),ie(e,Je,h=>n(2,r=h)),ie(e,yt,h=>n(3,s=h));let{$$slots:o={},$$scope:l}=t,{centered:u=!1}=t;const a=ft();function f(h){h.key==="Escape"&&(h.preventDefault(),a("cancel"))}function p(h){nt.call(this,e,h)}return e.$$set=h=>{"centered"in h&&n(0,u=h.centered),"$$scope"in h&&n(5,l=h.$$scope)},[u,i,r,s,f,l,o,p]}class Xe extends K{constructor(t){super(),Y(this,t,$o,Go,J,{centered:0})}}function jo(e){let t,n,i,r,s,o,l,u;var a=e[0];function f(m,d){return{props:{size:m[2],strokeWidth:m[3]}}}a&&(i=De(a,f(e)));const p=e[10].default,h=st(p,e,e[9],null);return{c(){t=N("div"),n=N("div"),i&&R(i.$$.fragment),s=U(),h&&h.c(),c(n,"class",r="icon-wrapper "+e[1]+" svelte-bhj2u4"),c(t,"class","content svelte-bhj2u4"),c(t,"tabindex","0"),c(t,"title",e[5]),W(t,"centered",e[6]),W(t,"horizontal",e[4])},m(m,d){g(m,t,d),T(t,n),i&&M(i,n,null),T(t,s),h&&h.m(t,null),o=!0,l||(u=[se(t,"click",e[7]),se(t,"keyup",e[8])],l=!0)},p(m,[d]){if(d&1&&a!==(a=m[0])){if(i){le();const b=i;k(b.$$.fragment,1,0,()=>{x(b,1)}),ae()}a?(i=De(a,f(m)),R(i.$$.fragment),y(i.$$.fragment,1),M(i,n,null)):i=null}else if(a){const b={};d&4&&(b.size=m[2]),d&8&&(b.strokeWidth=m[3]),i.$set(b)}(!o||d&2&&r!==(r="icon-wrapper "+m[1]+" svelte-bhj2u4"))&&c(n,"class",r),h&&h.p&&(!o||d&512)&&lt(h,p,m,m[9],o?ot(p,m[9],d,null):at(m[9]),null),(!o||d&32)&&c(t,"title",m[5]),(!o||d&16)&&W(t,"horizontal",m[4])},i(m){o||(i&&y(i.$$.fragment,m),y(h,m),o=!0)},o(m){i&&k(i.$$.fragment,m),k(h,m),o=!1},d(m){m&&_(t),i&&x(i),h&&h.d(m),l=!1,me(u)}}}function Fo(e,t,n){let{$$slots:i={},$$scope:r}=t,{icon:s=no}=t,{iconClass:o}=t,{size:l="24"}=t,{strokeWidth:u="2"}=t,{horizontal:a=!1}=t,{title:f=""}=t;const p=!a,h=ft();function m(){h("activate")}function d(b){(b.key==="Enter"||b.key===" ")&&h("activate")}return e.$$set=b=>{"icon"in b&&n(0,s=b.icon),"iconClass"in b&&n(1,o=b.iconClass),"size"in b&&n(2,l=b.size),"strokeWidth"in b&&n(3,u=b.strokeWidth),"horizontal"in b&&n(4,a=b.horizontal),"title"in b&&n(5,f=b.title),"$$scope"in b&&n(9,r=b.$$scope)},[s,o,l,u,a,f,p,m,d,r,i]}class pe extends K{constructor(t){super(),Y(this,t,Fo,jo,J,{icon:0,iconClass:1,size:2,strokeWidth:3,horizontal:4,title:5})}}function zo(e,t){t&&setTimeout(()=>{e.focus(),e.select()},250)}function Dn(e){let t,n;return{c(){t=N("label"),n=j(e[4]),c(t,"for",e[3])},m(i,r){g(i,t,r),T(t,n)},p(i,r){r&16&&F(n,i[4]),r&8&&c(t,"for",i[3])},d(i){i&&_(t)}}}function Gn(e){let t,n,i,r,s;return n=new fo({}),{c(){t=N("button"),R(n.$$.fragment),c(t,"class","search-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[6]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=se(t,"click",e[14]),r=!0)},p(o,l){(!i||l&64)&&c(t,"title",o[6]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function $n(e){let t,n,i,r,s;return n=new Xs({}),{c(){t=N("button"),R(n.$$.fragment),c(t,"class","clear-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[7]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=se(t,"click",e[15]),r=!0)},p(o,l){(!i||l&128)&&c(t,"title",o[7]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function jn(e){let t;return{c(){t=N("div"),c(t,"class","error-message svelte-8p6spj")},m(n,i){g(n,t,i),t.innerHTML=e[11]},p(n,i){i&2048&&(t.innerHTML=n[11])},d(n){n&&_(t)}}}function Vo(e){let t,n,i,r,s,o,l,u,a,f,p,h,m=e[4]&&Dn(e),d=e[9]&&Gn(e),b=e[9]&&e[0]&&$n(e),H=!e[9]&&jn(e);return{c(){t=N("div"),m&&m.c(),n=U(),i=N("div"),d&&d.c(),r=U(),s=N("input"),l=U(),b&&b.c(),u=U(),H&&H.c(),a=ve(),c(s,"type","text"),c(s,"id",e[3]),c(s,"name",e[3]),c(s,"placeholder",e[5]),c(s,"tabindex",e[10]),c(s,"class","svelte-8p6spj"),W(s,"search",e[9]),W(s,"focussed",e[2]),W(s,"value",e[0]),c(i,"class","input-control svelte-8p6spj"),c(t,"class","input svelte-8p6spj")},m(A,w){g(A,t,w),m&&m.m(t,null),T(t,n),T(t,i),d&&d.m(i,null),T(i,r),T(i,s),Ue(s,e[0]),e[18](s),T(i,l),b&&b.m(i,null),g(A,u,w),H&&H.m(A,w),g(A,a,w),f=!0,p||(h=[se(s,"input",e[17]),se(s,"focusin",e[12]),se(s,"focusout",e[13]),rn(o=zo.call(null,s,e[8]))],p=!0)},p(A,[w]){A[4]?m?m.p(A,w):(m=Dn(A),m.c(),m.m(t,n)):m&&(m.d(1),m=null),A[9]?d?(d.p(A,w),w&512&&y(d,1)):(d=Gn(A),d.c(),y(d,1),d.m(i,r)):d&&(le(),k(d,1,1,()=>{d=null}),ae()),(!f||w&8)&&c(s,"id",A[3]),(!f||w&8)&&c(s,"name",A[3]),(!f||w&32)&&c(s,"placeholder",A[5]),(!f||w&1024)&&c(s,"tabindex",A[10]),w&1&&s.value!==A[0]&&Ue(s,A[0]),o&&ze(o.update)&&w&256&&o.update.call(null,A[8]),(!f||w&512)&&W(s,"search",A[9]),(!f||w&4)&&W(s,"focussed",A[2]),(!f||w&1)&&W(s,"value",A[0]),A[9]&&A[0]?b?(b.p(A,w),w&513&&y(b,1)):(b=$n(A),b.c(),y(b,1),b.m(i,null)):b&&(le(),k(b,1,1,()=>{b=null}),ae()),A[9]?H&&(H.d(1),H=null):H?H.p(A,w):(H=jn(A),H.c(),H.m(a.parentNode,a))},i(A){f||(y(d),y(b),f=!0)},o(A){k(d),k(b),f=!1},d(A){A&&(_(t),_(u),_(a)),m&&m.d(),d&&d.d(),e[18](null),b&&b.d(),H&&H.d(A),p=!1,me(h)}}}function Wo(e,t,n){let i;const r=ft();let{name:s="input"}=t,{label:o=""}=t,{value:l=""}=t,{errorMessage:u=""}=t,{placeholder:a=""}=t,{searchButtonTitle:f=""}=t,{clearButtonTitle:p=""}=t,{autofocus:h=!1}=t,{search:m=!1}=t,{tabindex:d=0}=t,{ref:b}=t,{focussed:H=h}=t;function A(){n(2,H=!0)}function w(){n(2,H=!1)}function I(){r("query",l),document.getElementById(s).focus()}function E(){n(0,l=""),document.getElementById(s).focus()}function B(){l=this.value,n(0,l)}function P(S){ce[S?"unshift":"push"](()=>{b=S,n(1,b)})}return e.$$set=S=>{"name"in S&&n(3,s=S.name),"label"in S&&n(4,o=S.label),"value"in S&&n(0,l=S.value),"errorMessage"in S&&n(16,u=S.errorMessage),"placeholder"in S&&n(5,a=S.placeholder),"searchButtonTitle"in S&&n(6,f=S.searchButtonTitle),"clearButtonTitle"in S&&n(7,p=S.clearButtonTitle),"autofocus"in S&&n(8,h=S.autofocus),"search"in S&&n(9,m=S.search),"tabindex"in S&&n(10,d=S.tabindex),"ref"in S&&n(1,b=S.ref),"focussed"in S&&n(2,H=S.focussed)},e.$$.update=()=>{e.$$.dirty&65536&&n(11,i=u||"&nbsp;")},[l,b,H,s,o,a,f,p,h,m,d,i,A,w,I,E,u,B,P]}class pn extends K{constructor(t){super(),Y(this,t,Wo,Vo,J,{name:3,label:4,value:0,errorMessage:16,placeholder:5,searchButtonTitle:6,clearButtonTitle:7,autofocus:8,search:9,tabindex:10,ref:1,focussed:2})}}function Hi(e,t){t&&e.focus()}function Xo(e){let t;return{c(){t=j(e[0])},m(n,i){g(n,t,i)},p(n,i){i&1&&F(t,n[0])},d(n){n&&_(t)}}}function qo(e){let t;return{c(){t=j(" ")},m(n,i){g(n,t,i)},p:G,d(n){n&&_(t)}}}function Zo(e){let t;function n(s,o){return s[1]?qo:Xo}let r=n(e)(e);return{c(){t=N("span"),r.c(),c(t,"class","shortcut-button svelte-11t060e"),W(t,"hide",e[1])},m(s,o){g(s,t,o),r.m(t,null)},p(s,[o]){r.p(s,o)},i:G,o:G,d(s){s&&_(t),r.d()}}}function Qo(e,t,n){let{shortcut:i=""}=t;const r=i.length===0;return e.$$set=s=>{"shortcut"in s&&n(0,i=s.shortcut)},[i,r]}class Ii extends K{constructor(t){super(),Y(this,t,Qo,Zo,J,{shortcut:0})}}function Fn(e){let t,n;return t=new Ii({props:{shortcut:e[6]}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&64&&(s.shortcut=i[6]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function zn(e){let t,n,i;return n=new Ks({props:{size:"1.25x"}}),{c(){t=N("div"),R(n.$$.fragment),c(t,"class","edit-icon-wrapper svelte-1ebkg7o")},m(r,s){g(r,t,s),M(n,t,null),i=!0},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function Jo(e){let t,n,i,r,s,o=e[0].body+"",l,u,a,f,p,h=e[4]&&Fn(e);i=new Ii({props:{shortcut:e[0].abbreviation}});let m=!e[4]&&zn();return{c(){t=N("li"),h&&h.c(),n=U(),R(i.$$.fragment),r=U(),s=N("span"),l=j(o),u=U(),m&&m.c(),c(s,"class","body svelte-1ebkg7o"),c(t,"tabindex",e[1]),c(t,"title",e[7]),c(t,"class","svelte-1ebkg7o"),W(t,"focussed",e[2]),W(t,"active",e[3])},m(d,b){g(d,t,b),h&&h.m(t,null),T(t,n),M(i,t,null),T(t,r),T(t,s),T(s,l),T(t,u),m&&m.m(t,null),e[13](t),a=!0,f||(p=se(t,"click",e[12]),f=!0)},p(d,[b]){d[4]?h?(h.p(d,b),b&16&&y(h,1)):(h=Fn(d),h.c(),y(h,1),h.m(t,n)):h&&(le(),k(h,1,1,()=>{h=null}),ae());const H={};b&1&&(H.shortcut=d[0].abbreviation),i.$set(H),(!a||b&1)&&o!==(o=d[0].body+"")&&F(l,o),d[4]?m&&(le(),k(m,1,1,()=>{m=null}),ae()):m?b&16&&y(m,1):(m=zn(),m.c(),y(m,1),m.m(t,null)),(!a||b&2)&&c(t,"tabindex",d[1]),(!a||b&4)&&W(t,"focussed",d[2]),(!a||b&8)&&W(t,"active",d[3])},i(d){a||(y(h),y(i.$$.fragment,d),y(m),a=!0)},o(d){k(h),k(i.$$.fragment,d),k(m),a=!1},d(d){d&&_(t),h&&h.d(),x(i),m&&m.d(),e[13](null),f=!1,p()}}}function Yo(e,t,n){let i;ie(e,de,w=>n(14,i=w));let{snippet:r}=t,{index:s=-1}=t,{tabindex:o=-1}=t,{focussed:l=!1}=t,{active:u=!1}=t,{selectMode:a=!1}=t,{observer:f=null}=t,p,h=i(a?"use_snippet.title":"edit_snippet.title"),m=s>=0&&s<10?s+1:"";m===10&&(m=0);function d(){return p.classList.contains("is-visible")}function b(w){p.scrollIntoView({behavior:"smooth",block:w})}ut(()=>{f&&f.observe(p)}),sn(()=>{f&&f.unobserve(p)});function H(w){nt.call(this,e,w)}function A(w){ce[w?"unshift":"push"](()=>{p=w,n(5,p)})}return e.$$set=w=>{"snippet"in w&&n(0,r=w.snippet),"index"in w&&n(8,s=w.index),"tabindex"in w&&n(1,o=w.tabindex),"focussed"in w&&n(2,l=w.focussed),"active"in w&&n(3,u=w.active),"selectMode"in w&&n(4,a=w.selectMode),"observer"in w&&n(9,f=w.observer)},[r,o,l,u,a,p,m,h,s,f,d,b,H,A]}class Ko extends K{constructor(t){super(),Y(this,t,Yo,Jo,J,{snippet:0,index:8,tabindex:1,focussed:2,active:3,selectMode:4,observer:9,isVisible:10,scrollIntoView:11})}get isVisible(){return this.$$.ctx[10]}get scrollIntoView(){return this.$$.ctx[11]}}function Vn(e,t,n){const i=e.slice();return i[22]=t[n],i[23]=t,i[24]=n,i}function Wn(e){let t,n=e[24],i;const r=()=>e[14](t,n),s=()=>e[14](null,n);function o(){return e[15](e[24])}let l={snippet:e[22],index:e[24],focussed:e[24]===e[4],active:e[5],observer:e[8],selectMode:e[2]};return t=new Ko({props:l}),r(),t.$on("click",o),{c(){R(t.$$.fragment)},m(u,a){M(t,u,a),i=!0},p(u,a){e=u,n!==e[24]&&(s(),n=e[24],r());const f={};a&128&&(f.snippet=e[22]),a&16&&(f.focussed=e[24]===e[4]),a&32&&(f.active=e[5]),a&4&&(f.selectMode=e[2]),t.$set(f)},i(u){i||(y(t.$$.fragment,u),i=!0)},o(u){k(t.$$.fragment,u),i=!1},d(u){s(),x(t,u)}}}function el(e){let t,n,i,r,s,o=kn(e[7]),l=[];for(let a=0;a<o.length;a+=1)l[a]=Wn(Vn(e,o,a));const u=a=>k(l[a],1,1,()=>{l[a]=null});return{c(){t=N("ul");for(let a=0;a<l.length;a+=1)l[a].c();c(t,"tabindex",e[1]),c(t,"class","svelte-1wnqbvs")},m(a,f){g(a,t,f);for(let p=0;p<l.length;p+=1)l[p]&&l[p].m(t,null);e[16](t),i=!0,r||(s=[se(t,"focus",e[9]),se(t,"blur",e[10]),se(t,"keydown",e[12]),rn(n=Hi.call(null,t,e[3]))],r=!0)},p(a,[f]){if(f&2548){o=kn(a[7]);let p;for(p=0;p<o.length;p+=1){const h=Vn(a,o,p);l[p]?(l[p].p(h,f),y(l[p],1)):(l[p]=Wn(h),l[p].c(),y(l[p],1),l[p].m(t,null))}for(le(),p=o.length;p<l.length;p+=1)u(p);ae()}(!i||f&2)&&c(t,"tabindex",a[1]),n&&ze(n.update)&&f&8&&n.update.call(null,a[3])},i(a){if(!i){for(let f=0;f<o.length;f+=1)y(l[f]);i=!0}},o(a){l=l.filter(Boolean);for(let f=0;f<l.length;f+=1)k(l[f]);i=!1},d(a){a&&_(t),Ui(l,a),e[16](null),r=!1,me(s)}}}function tl(e,t,n){let i;const r=ft();let{snippets:s=null}=t,{tabindex:o=0}=t,{selectMode:l=!1}=t,{autofocus:u=!1}=t,{ref:a}=t,f=0,p=u,h=[];const m=new IntersectionObserver(function(v){for(let L=0;L<v.length;L++)v[L].isIntersecting?v[L].target.classList.add("is-visible"):v[L].target.classList.remove("is-visible")},{root:a,threshold:[.6]});function d(v){return n(4,f=0),v}function b(){n(5,p=!0)}function H(){n(5,p=!1)}function A(v){l?E(i[v]):B(i[v])}function w(v){!s||s.length===0||I(v)&&v.preventDefault()}function I(v){if(v.key==="Home"||v.key==="g")return n(4,f=0),h[f].scrollIntoView("nearest"),!0;if(v.key==="End"||v.key==="G")return n(4,f=s.length-1),h[f].scrollIntoView("nearest"),!0;if(f<s.length-1&&(v.key==="ArrowDown"||v.key==="j"))return n(4,f++,f),h[f].scrollIntoView("nearest"),!0;if(f>0&&(v.key==="ArrowUp"||v.key==="k"))return n(4,f--,f),h[f].scrollIntoView("nearest"),!0;if(v.key==="PageDown"||v.key==="d"){let L=-1,C=-1;for(let ne=0;ne<h.length;ne++)if(h[ne].isVisible())C=ne,L<0&&(L=ne);else if(C>=0)break;const D=h.length-1,z=C-L;return C+z>D?n(4,f=D):n(4,f=C),h[f].scrollIntoView("start"),!0}if(v.key==="PageUp"||v.key==="u"){let L=-1,C=-1;for(let z=0;z<h.length;z++){const ne=h[z];if(ne.isVisible()&&L<0)L=z,C=z;else if(ne.isVisible())C=z;else if(L>=0)break}const D=C-L;return L-D<=0?n(4,f=0):n(4,f=L),h[f].scrollIntoView("end"),!0}if(l&&f>=0&&f<s.length&&v.key==="Enter")return E(i[f]),!0;if(l&&["1","2","3","4","5","6","7","8","9","0"].includes(v.key)){let L=v.key-1;return L===-1&&(L=9),L+1>i.length?!1:(E(i[L]),!0)}return!l&&f>=0&&f<s.length&&(v.key==="ArrowRight"||v.key==="Enter")?(B(i[f]),!0):!1}function E(v){r("itemActivated",{snippet:v})}function B(v){r("itemEdit",{snippet:v})}Yn(()=>{h.length!==i.length&&n(6,h.length=i.length,h)});function P(v,L){ce[v?"unshift":"push"](()=>{h[L]=v,n(6,h)})}const S=v=>A(v);function O(v){ce[v?"unshift":"push"](()=>{a=v,n(0,a)})}return e.$$set=v=>{"snippets"in v&&n(13,s=v.snippets),"tabindex"in v&&n(1,o=v.tabindex),"selectMode"in v&&n(2,l=v.selectMode),"autofocus"in v&&n(3,u=v.autofocus),"ref"in v&&n(0,a=v.ref)},e.$$.update=()=>{e.$$.dirty&8192&&n(7,i=d(s))},[a,o,l,u,f,p,h,i,m,b,H,A,w,s,P,S,O]}class nl extends K{constructor(t){super(),Y(this,t,tl,el,J,{snippets:13,tabindex:1,selectMode:2,autofocus:3,ref:0})}}function il(e){let t,n;const i=e[2].default,r=st(i,e,e[1],null);return{c(){t=N("div"),r&&r.c(),c(t,"class","toolbar svelte-i867mn"),W(t,"bottom",e[0])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&2)&&lt(r,i,s,s[1],n?ot(i,s[1],o,null):at(s[1]),null),(!n||o&1)&&W(t,"bottom",s[0])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function rl(e,t,n){let{$$slots:i={},$$scope:r}=t,{bottom:s=!1}=t;return e.$$set=o=>{"bottom"in o&&n(0,s=o.bottom),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Ht extends K{constructor(t){super(),Y(this,t,rl,il,J,{bottom:0})}}function sl(e){let t;return{c(){t=N("div"),c(t,"class","toolbar-spacer svelte-1a67v9")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}class mn extends K{constructor(t){super(),Y(this,t,null,sl,J,{})}}function ol(e){let t,n,i=e[6]("no_snippets_found.title")+"",r,s,o,l=e[6]("no_snippets_found.description")+"",u;return{c(){t=N("div"),n=N("p"),r=j(i),s=U(),o=N("p"),u=j(l),c(n,"class","no-snippets-found svelte-y4605t"),c(o,"class","no-snippets-found description dimmed svelte-y4605t"),c(t,"class","centered")},m(a,f){g(a,t,f),T(t,n),T(n,r),T(t,s),T(t,o),T(o,u)},p(a,f){f&64&&i!==(i=a[6]("no_snippets_found.title")+"")&&F(r,i),f&64&&l!==(l=a[6]("no_snippets_found.description")+"")&&F(u,l)},i:G,o:G,d(a){a&&_(t)}}}function ll(e){let t,n,i;function r(o){e[21](o)}let s={snippets:e[7],tabindex:2,selectMode:e[0],autofocus:e[8]};return e[4]!==void 0&&(s.ref=e[4]),t=new nl({props:s}),ce.push(()=>Me(t,"ref",r)),t.$on("itemActivated",e[12]),t.$on("itemEdit",e[13]),{c(){R(t.$$.fragment)},m(o,l){M(t,o,l),i=!0},p(o,l){const u={};l&128&&(u.snippets=o[7]),l&1&&(u.selectMode=o[0]),!n&&l&16&&(n=!0,u.ref=o[4],Oe(()=>n=!1)),t.$set(u)},i(o){i||(y(t.$$.fragment,o),i=!0)},o(o){k(t.$$.fragment,o),i=!1},d(o){x(t,o)}}}function Xn(e){let t,n;return t=new Ht({props:{bottom:!0,$$slots:{default:[al]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&16777280&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function al(e){let t,n,i,r,s,o;return t=new pe({props:{iconClass:"dimmed",icon:hn,size:"2.3x",title:e[6]("add_snippet.title")}}),t.$on("activate",e[10]),i=new mn({}),s=new pe({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[6]("settings.title")}}),s.$on("activate",e[11]),{c(){R(t.$$.fragment),n=U(),R(i.$$.fragment),r=U(),R(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&64&&(a.title=l[6]("add_snippet.title")),t.$set(a);const f={};u&64&&(f.title=l[6]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function ul(e){let t,n,i,r,s,o,l,u,a,f,p;function h(E){e[18](E)}function m(E){e[19](E)}function d(E){e[20](E)}let b={search:!0,autofocus:e[1],placeholder:e[6]("search"),searchButtonTitle:e[6]("search"),clearButtonTitle:e[6]("clear"),tabindex:1};e[2]!==void 0&&(b.value=e[2]),e[3]!==void 0&&(b.ref=e[3]),e[5]!==void 0&&(b.focussed=e[5]),n=new pn({props:b}),ce.push(()=>Me(n,"value",h)),ce.push(()=>Me(n,"ref",m)),ce.push(()=>Me(n,"focussed",d)),n.$on("query",e[9]);const H=[ll,ol],A=[];function w(E,B){return E[7]?0:1}l=w(e),u=A[l]=H[l](e);let I=!e[0]&&Xn(e);return{c(){t=N("div"),R(n.$$.fragment),o=U(),u.c(),a=U(),I&&I.c(),f=ve(),c(t,"class","toolbar top")},m(E,B){g(E,t,B),M(n,t,null),g(E,o,B),A[l].m(E,B),g(E,a,B),I&&I.m(E,B),g(E,f,B),p=!0},p(E,B){const P={};B&2&&(P.autofocus=E[1]),B&64&&(P.placeholder=E[6]("search")),B&64&&(P.searchButtonTitle=E[6]("search")),B&64&&(P.clearButtonTitle=E[6]("clear")),!i&&B&4&&(i=!0,P.value=E[2],Oe(()=>i=!1)),!r&&B&8&&(r=!0,P.ref=E[3],Oe(()=>r=!1)),!s&&B&32&&(s=!0,P.focussed=E[5],Oe(()=>s=!1)),n.$set(P);let S=l;l=w(E),l===S?A[l].p(E,B):(le(),k(A[S],1,1,()=>{A[S]=null}),ae(),u=A[l],u?u.p(E,B):(u=A[l]=H[l](E),u.c()),y(u,1),u.m(a.parentNode,a)),E[0]?I&&(le(),k(I,1,1,()=>{I=null}),ae()):I?(I.p(E,B),B&1&&y(I,1)):(I=Xn(E),I.c(),y(I,1),I.m(f.parentNode,f))},i(E){p||(y(n.$$.fragment,E),y(u),y(I),p=!0)},o(E){k(n.$$.fragment,E),k(u),k(I),p=!1},d(E){E&&(_(t),_(o),_(a),_(f)),x(n),A[l].d(E),I&&I.d(E)}}}function fl(e){let t,n;return t=new Xe({props:{$$slots:{default:[ul]},$$scope:{ctx:e}}}),t.$on("keyup",e[14]),t.$on("cancel",e[15]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&16777471&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function cl(e,t,n){let i,r,s,o;ie(e,he,C=>n(17,i=C)),ie(e,$t,C=>n(2,r=C)),ie(e,de,C=>n(6,s=C)),ie(e,jt,C=>n(7,o=C));let{orderByLastUsed:l=!1}=t,{selectMode:u=!1}=t,{focusSearchBox:a=!0}=t;const f=!a;let p,h,m=a;function d(C){Ri($t,r=C.detail,r),jt.search(r,l)}function b(){xe("/snippet/add")}function H(){xe("/settings")}function A(C){tr(C.detail.snippet.abbreviation,500)}function w(C){const D=C.detail.snippet.id;xe("/snippet/edit/"+D)}function I(C,D,z){jt.search(C,D)}function E(){m?h.focus():p.focus()}function B(C){C.ctrlKey&&C.key==="n"&&(b(),C.preventDefault()),C.ctrlKey&&C.altKey&&C.key==="s"&&(H(),C.preventDefault()),C.ctrlKey&&C.key==="f"&&(E(),C.preventDefault())}function P(){u&&Vi()}function S(C){r=C,$t.set(r)}function O(C){p=C,n(3,p)}function v(C){m=C,n(5,m)}function L(C){h=C,n(4,h)}return e.$$set=C=>{"orderByLastUsed"in C&&n(16,l=C.orderByLastUsed),"selectMode"in C&&n(0,u=C.selectMode),"focusSearchBox"in C&&n(1,a=C.focusSearchBox)},e.$$.update=()=>{e.$$.dirty&196612&&I(r,l)},[u,a,r,p,h,m,s,o,f,d,b,H,A,w,B,P,l,i,S,O,v,L]}class hl extends K{constructor(t){super(),Y(this,t,cl,fl,J,{orderByLastUsed:16,selectMode:0,focusSearchBox:1})}}function qn(e){let t,n,i,r,s,o,l,u;return n=new pe({props:{iconClass:"dimmed",icon:hn,title:e[0]("add_snippet.title"),size:"5x",$$slots:{default:[pl]},$$scope:{ctx:e}}}),n.$on("activate",e[2]),s=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:en,title:e[0]("import_snippets.title"),size:"1.5x",$$slots:{default:[ml]},$$scope:{ctx:e}}}),s.$on("activate",e[4]),l=new Ht({props:{bottom:!0,$$slots:{default:[dl]},$$scope:{ctx:e}}}),{c(){t=N("p"),R(n.$$.fragment),i=U(),r=N("p"),R(s.$$.fragment),o=U(),R(l.$$.fragment),c(t,"class","add-snippet"),c(r,"class","import-snippets")},m(a,f){g(a,t,f),M(n,t,null),g(a,i,f),g(a,r,f),M(s,r,null),g(a,o,f),M(l,a,f),u=!0},p(a,f){const p={};f&1&&(p.title=a[0]("add_snippet.title")),f&33&&(p.$$scope={dirty:f,ctx:a}),n.$set(p);const h={};f&1&&(h.title=a[0]("import_snippets.title")),f&33&&(h.$$scope={dirty:f,ctx:a}),s.$set(h);const m={};f&33&&(m.$$scope={dirty:f,ctx:a}),l.$set(m)},i(a){u||(y(n.$$.fragment,a),y(s.$$.fragment,a),y(l.$$.fragment,a),u=!0)},o(a){k(n.$$.fragment,a),k(s.$$.fragment,a),k(l.$$.fragment,a),u=!1},d(a){a&&(_(t),_(i),_(r),_(o)),x(n),x(s),x(l,a)}}}function pl(e){let t=e[0]("add_snippet.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("add_snippet.title")+"")&&F(n,t)},d(i){i&&_(n)}}}function ml(e){let t=e[0]("import_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("import_snippets.title")+"")&&F(n,t)},d(i){i&&_(n)}}}function dl(e){let t,n,i,r,s,o;return t=new pe({props:{iconClass:"dimmed",icon:hn,size:"2.3x",title:e[0]("add_snippet.title")}}),t.$on("activate",e[2]),i=new mn({}),s=new pe({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[0]("settings.title")}}),s.$on("activate",e[3]),{c(){R(t.$$.fragment),n=U(),R(i.$$.fragment),r=U(),R(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&1&&(a.title=l[0]("add_snippet.title")),t.$set(a);const f={};u&1&&(f.title=l[0]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function _l(e){let t,n,i,r=e[0]("no_snippets_found.title")+"",s,o,l,u,a=e[1]&&qn(e);return{c(){t=N("h1"),t.textContent="Snippet Pixie",n=U(),i=N("p"),s=j(r),o=U(),a&&a.c(),l=ve(),c(i,"class","dimmed")},m(f,p){g(f,t,p),g(f,n,p),g(f,i,p),T(i,s),g(f,o,p),a&&a.m(f,p),g(f,l,p),u=!0},p(f,p){(!u||p&1)&&r!==(r=f[0]("no_snippets_found.title")+"")&&F(s,r),f[1]?a?(a.p(f,p),p&2&&y(a,1)):(a=qn(f),a.c(),y(a,1),a.m(l.parentNode,l)):a&&(le(),k(a,1,1,()=>{a=null}),ae())},i(f){u||(y(a),u=!0)},o(f){k(a),u=!1},d(f){f&&(_(t),_(n),_(i),_(o),_(l)),a&&a.d(f)}}}function gl(e){let t,n;return t=new Xe({props:{centered:!0,$$slots:{default:[_l]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&35&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function bl(e,t,n){let i,r;ie(e,de,u=>n(0,i=u)),ie(e,he,u=>n(1,r=u));function s(){xe("/snippet/add")}function o(){xe("/settings")}async function l(){try{const u=await ri(!1)}catch(u){await oe(i("import_snippets.error_title"),u)}await He.fetch()}return[i,r,s,o,l]}class vl extends K{constructor(t){super(),Y(this,t,bl,gl,J,{})}}function wl(e){let t,n;return t=new vl({}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function El(e){let t,n;return t=new hl({props:{selectMode:e[2],orderByLastUsed:e[3],focusSearchBox:e[4]}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&4&&(s.selectMode=i[2]),r&8&&(s.orderByLastUsed=i[3]),r&16&&(s.focusSearchBox=i[4]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function yl(e){let t;return{c(){t=j("Checking settings ...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function Sl(e){let t,n,i,r;const s=[yl,El,wl],o=[];function l(u,a){return u[1]?0:u[0]&&(u[5]&&u[5].length>0||u[2])?1:2}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ve()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(le(),k(o[f],1,1,()=>{o[f]=null}),ae(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function kl(e,t,n){let i,r,s;ie(e,de,p=>n(6,i=p)),ie(e,he,p=>n(0,r=p)),ie(e,He,p=>n(5,s=p));let o=!0,l=!1,u=!1,a=!0;function f(p){He.fetch()}return ut(async()=>{if(n(2,l=await sr()),n(3,u=l),l&&r)try{const p=await ni("FOCUS_SEARCH_BOX");n(4,a=p!=="false")}catch(p){await oe(i("settings.get_error_title"),p)}n(1,o=!1)}),e.$$.update=()=>{e.$$.dirty&1&&f()},[r,o,l,u,a,s]}class Al extends K{constructor(t){super(),Y(this,t,kl,Sl,J,{})}}function Bl(e){let t=e[4]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.cancel")+"")&&F(n,t)},d(i){i&&_(n)}}}function Tl(e){let t=e[4]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.save")+"")&&F(n,t)},d(i){i&&_(n)}}}function Hl(e){let t,n=e[4]("add_snippet.title")+"",i,r,s,o,l,u,a=e[4]("body.title")+"",f,p,h,m,d,b,H,A,w,I,E;function B(S){e[8](S)}let P={label:e[4]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(P.value=e[0]),s=new pn({props:P}),ce.push(()=>Me(s,"value",B)),b=new Re({props:{secondary:!0,$$slots:{default:[Bl]},$$scope:{ctx:e}}}),b.$on("click",e[5]),A=new Re({props:{primary:!0,disabled:e[3],$$slots:{default:[Tl]},$$scope:{ctx:e}}}),A.$on("click",e[6]),{c(){t=N("h2"),i=j(n),r=U(),R(s.$$.fragment),l=U(),u=N("label"),f=j(a),p=U(),h=N("textarea"),m=U(),d=N("div"),R(b.$$.fragment),H=U(),R(A.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(S,O){g(S,t,O),T(t,i),g(S,r,O),M(s,S,O),g(S,l,O),g(S,u,O),T(u,f),g(S,p,O),g(S,h,O),Ue(h,e[2]),g(S,m,O),g(S,d,O),M(b,d,null),T(d,H),M(A,d,null),w=!0,I||(E=se(h,"input",e[9]),I=!0)},p(S,O){(!w||O&16)&&n!==(n=S[4]("add_snippet.title")+"")&&F(i,n);const v={};O&16&&(v.label=S[4]("abbreviation.title")),O&2&&(v.errorMessage=S[1]),!o&&O&1&&(o=!0,v.value=S[0],Oe(()=>o=!1)),s.$set(v),(!w||O&16)&&a!==(a=S[4]("body.title")+"")&&F(f,a),O&4&&Ue(h,S[2]);const L={};O&2064&&(L.$$scope={dirty:O,ctx:S}),b.$set(L);const C={};O&8&&(C.disabled=S[3]),O&2064&&(C.$$scope={dirty:O,ctx:S}),A.$set(C)},i(S){w||(y(s.$$.fragment,S),y(b.$$.fragment,S),y(A.$$.fragment,S),w=!0)},o(S){k(s.$$.fragment,S),k(b.$$.fragment,S),k(A.$$.fragment,S),w=!1},d(S){S&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,S),x(b),x(A),I=!1,E()}}}function Il(e){let t,n;return t=new Xe({props:{$$slots:{default:[Hl]},$$scope:{ctx:e}}}),t.$on("cancel",e[5]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&2079&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Cl(e,t,n){let i,r,s;ie(e,de,d=>n(4,r=d)),ie(e,he,d=>n(7,s=d));let o="",l="";async function u(d){if(d.length===0){n(1,a=r("abbreviation.empty"));return}if(!s){n(1,a="");return}try{const b=await ii(d);if(b.hasOwnProperty("abbreviation")&&b.abbreviation.length>0){n(1,a=r("abbreviation.exists"));return}}catch(b){await oe(r("add_snippet.error_title"),b)}n(1,a="")}let a="";function f(){be()}async function p(){try{const d=await Wi(o,l);await be()}catch(d){await oe(r("add_snippet.error_title"),d)}}function h(d){o=d,n(0,o)}function m(){l=this.value,n(2,l)}return e.$$.update=()=>{e.$$.dirty&1&&u(o),e.$$.dirty&130&&n(3,i=!s||a.length>0)},[o,a,l,i,r,f,p,s,h,m]}class Pl extends K{constructor(t){super(),Y(this,t,Cl,Il,J,{})}}function Ll(e){let t=e[5]("button.remove")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.remove")+"")&&F(n,t)},d(i){i&&_(n)}}}function Nl(e){let t=e[5]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.cancel")+"")&&F(n,t)},d(i){i&&_(n)}}}function Ol(e){let t=e[5]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.save")+"")&&F(n,t)},d(i){i&&_(n)}}}function Ml(e){let t,n=e[5]("edit_snippet.title")+"",i,r,s,o,l,u,a=e[5]("body.title")+"",f,p,h,m,d,b,H,A,w,I,E,B,P;function S(v){e[11](v)}let O={label:e[5]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(O.value=e[0]),s=new pn({props:O}),ce.push(()=>Me(s,"value",S)),b=new Re({props:{danger:!0,disabled:e[3],$$slots:{default:[Ll]},$$scope:{ctx:e}}}),b.$on("click",e[7]),A=new Re({props:{secondary:!0,$$slots:{default:[Nl]},$$scope:{ctx:e}}}),A.$on("click",e[6]),I=new Re({props:{primary:!0,disabled:e[4],$$slots:{default:[Ol]},$$scope:{ctx:e}}}),I.$on("click",e[8]),{c(){t=N("h2"),i=j(n),r=U(),R(s.$$.fragment),l=U(),u=N("label"),f=j(a),p=U(),h=N("textarea"),m=U(),d=N("div"),R(b.$$.fragment),H=U(),R(A.$$.fragment),w=U(),R(I.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(v,L){g(v,t,L),T(t,i),g(v,r,L),M(s,v,L),g(v,l,L),g(v,u,L),T(u,f),g(v,p,L),g(v,h,L),Ue(h,e[2]),g(v,m,L),g(v,d,L),M(b,d,null),T(d,H),M(A,d,null),T(d,w),M(I,d,null),E=!0,B||(P=se(h,"input",e[12]),B=!0)},p(v,L){(!E||L&32)&&n!==(n=v[5]("edit_snippet.title")+"")&&F(i,n);const C={};L&32&&(C.label=v[5]("abbreviation.title")),L&2&&(C.errorMessage=v[1]),!o&&L&1&&(o=!0,C.value=v[0],Oe(()=>o=!1)),s.$set(C),(!E||L&32)&&a!==(a=v[5]("body.title")+"")&&F(f,a),L&4&&Ue(h,v[2]);const D={};L&8&&(D.disabled=v[3]),L&32800&&(D.$$scope={dirty:L,ctx:v}),b.$set(D);const z={};L&32800&&(z.$$scope={dirty:L,ctx:v}),A.$set(z);const ne={};L&16&&(ne.disabled=v[4]),L&32800&&(ne.$$scope={dirty:L,ctx:v}),I.$set(ne)},i(v){E||(y(s.$$.fragment,v),y(b.$$.fragment,v),y(A.$$.fragment,v),y(I.$$.fragment,v),E=!0)},o(v){k(s.$$.fragment,v),k(b.$$.fragment,v),k(A.$$.fragment,v),k(I.$$.fragment,v),E=!1},d(v){v&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,v),x(b),x(A),x(I),B=!1,P()}}}function xl(e){let t,n;return t=new Xe({props:{$$slots:{default:[Ml]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&32831&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Rl(e,t,n){let i,r,s,o;ie(e,de,w=>n(5,s=w)),ie(e,he,w=>n(10,o=w));let{params:l={}}=t,u={},a="",f="";async function p(w){if(n(1,h=""),!!u.hasOwnProperty("id")){if(w.length===0){n(1,h=s("abbreviation.empty"));return}if(o)try{const I=await ii(w);I.hasOwnProperty("abbreviation")&&I.abbreviation.length>0&&I.id!==u.id&&n(1,h=s("abbreviation.exists"))}catch(I){await oe(s("edit_snippet.error_title"),I)}}}let h="";function m(){be()}async function d(){try{await ir(u.abbreviation),await be()}catch(w){await oe(s("remove_snippet.error_title"),w)}}async function b(){let w={...u};w.abbreviation=a,w.body=f;try{await ur(u.id,w),await be()}catch(I){await oe(s("edit_snippet.error_title"),I)}}ut(async()=>{l.hasOwnProperty("id")||(await oe(s("edit_snippet.error_title"),s("edit_snippet.id_not_supplied")),await be());try{u=await Yi(l.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await be()}let w=!1;try{w=await er(u.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await be()}w&&(await oe(s("edit_snippet.error_title"),s("edit_snippet.snippet_not_found")),await be()),n(0,a=u.abbreviation),n(2,f=u.body)});function H(w){a=w,n(0,a)}function A(){f=this.value,n(2,f)}return e.$$set=w=>{"params"in w&&n(9,l=w.params)},e.$$.update=()=>{e.$$.dirty&1&&p(a),e.$$.dirty&1026&&n(4,i=!o||h.length>0),e.$$.dirty&1024&&n(3,r=!o)},[a,h,f,r,i,s,m,d,b,l,o,H,A]}class Ul extends K{constructor(t){super(),Y(this,t,Rl,xl,J,{params:9})}}function Dl(e){let t,n,i,r,s,o;return t=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[4]("button.back")}}),t.$on("activate",e[6]),i=new mn({}),s=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:so,size:"2.5x",title:e[4]("button.about")}}),s.$on("activate",e[7]),{c(){R(t.$$.fragment),n=U(),R(i.$$.fragment),r=U(),R(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&16&&(a.title=l[4]("button.back")),t.$set(a);const f={};u&16&&(f.title=l[4]("button.about")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function Gl(e){let t=e[4]("settings.no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("settings.no_connection")+"")&&F(n,t)},i:G,o:G,d(i){i&&_(n)}}}function $l(e){let t,n=e[4]("settings.import_export_title")+"",i,r,s,o,l,u,a,f,p;o=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:en,size:"1.5x",$$slots:{default:[jl]},$$scope:{ctx:e}}}),o.$on("activate",e[19]),u=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:en,size:"1.5x",$$slots:{default:[Fl]},$$scope:{ctx:e}}}),u.$on("activate",e[20]);let h=e[5]&&e[5].length>0&&Zn(e);return{c(){t=N("h3"),i=j(n),r=U(),s=N("p"),R(o.$$.fragment),l=U(),R(u.$$.fragment),a=U(),h&&h.c(),f=ve(),c(t,"class","svelte-jq6614"),c(s,"class","import-snippets svelte-jq6614")},m(m,d){g(m,t,d),T(t,i),g(m,r,d),g(m,s,d),M(o,s,null),T(s,l),M(u,s,null),g(m,a,d),h&&h.m(m,d),g(m,f,d),p=!0},p(m,d){(!p||d&16)&&n!==(n=m[4]("settings.import_export_title")+"")&&F(i,n);const b={};d&33554448&&(b.$$scope={dirty:d,ctx:m}),o.$set(b);const H={};d&33554448&&(H.$$scope={dirty:d,ctx:m}),u.$set(H),m[5]&&m[5].length>0?h?(h.p(m,d),d&32&&y(h,1)):(h=Zn(m),h.c(),y(h,1),h.m(f.parentNode,f)):h&&(le(),k(h,1,1,()=>{h=null}),ae())},i(m){p||(y(o.$$.fragment,m),y(u.$$.fragment,m),y(h),p=!0)},o(m){k(o.$$.fragment,m),k(u.$$.fragment,m),k(h),p=!1},d(m){m&&(_(t),_(r),_(s),_(a),_(f)),x(o),x(u),h&&h.d(m)}}}function jl(e){let t=e[4]("import_snippets.new_only_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.new_only_title")+"")&&F(n,t)},d(i){i&&_(n)}}}function Fl(e){let t=e[4]("import_snippets.update_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.update_title")+"")&&F(n,t)},d(i){i&&_(n)}}}function Zn(e){let t,n,i;return n=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:Qs,size:"1.5x",$$slots:{default:[zl]},$$scope:{ctx:e}}}),n.$on("activate",e[12]),{c(){t=N("p"),R(n.$$.fragment),c(t,"class","export-snippets svelte-jq6614")},m(r,s){g(r,t,s),M(n,t,null),i=!0},p(r,s){const o={};s&33554448&&(o.$$scope={dirty:s,ctx:r}),n.$set(o)},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function zl(e){let t=e[4]("export_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("export_snippets.title")+"")&&F(n,t)},d(i){i&&_(n)}}}function Vl(e){let t,n,i,r=e[4]("settings.title")+"",s,o,l,u=e[4]("settings.autostart_title")+"",a,f,p,h,m,d,b=e[4]("settings.autostart")+"",H,A,w,I=e[4]("settings.autoexpand_title")+"",E,B,P,S,O,v,L=e[4]("settings.autoexpand")+"",C,D,z,ne=e[4]("settings.search_and_paste_title")+"",ye,Ie,V,ee,we,dn,ht=e[4]("settings.focus_search")+"",It,Ct,fe,_e,qe,ge,Pt,_n;t=new Ht({props:{$$slots:{default:[Dl]},$$scope:{ctx:e}}});const gn=[$l,Gl],Se=[];function bn($,Z){return $[0]?0:1}return fe=bn(e),_e=Se[fe]=gn[fe](e),{c(){R(t.$$.fragment),n=U(),i=N("h2"),s=j(r),o=U(),l=N("h3"),a=j(u),f=U(),p=N("p"),h=N("label"),m=N("input"),d=U(),H=j(b),A=U(),w=N("h3"),E=j(I),B=U(),P=N("p"),S=N("label"),O=N("input"),v=U(),C=j(L),D=U(),z=N("h3"),ye=j(ne),Ie=U(),V=N("p"),ee=N("label"),we=N("input"),dn=U(),It=j(ht),Ct=U(),_e.c(),qe=ve(),c(i,"class","svelte-jq6614"),c(l,"class","svelte-jq6614"),c(m,"type","checkbox"),c(p,"class","svelte-jq6614"),c(w,"class","svelte-jq6614"),c(O,"type","checkbox"),c(P,"class","svelte-jq6614"),c(z,"class","svelte-jq6614"),c(we,"type","checkbox"),c(V,"class","svelte-jq6614")},m($,Z){M(t,$,Z),g($,n,Z),g($,i,Z),T(i,s),g($,o,Z),g($,l,Z),T(l,a),g($,f,Z),g($,p,Z),T(p,h),T(h,m),m.checked=e[1],T(h,d),T(h,H),g($,A,Z),g($,w,Z),T(w,E),g($,B,Z),g($,P,Z),T(P,S),T(S,O),O.checked=e[2],T(S,v),T(S,C),g($,D,Z),g($,z,Z),T(z,ye),g($,Ie,Z),g($,V,Z),T(V,ee),T(ee,we),we.checked=e[3],T(ee,dn),T(ee,It),g($,Ct,Z),Se[fe].m($,Z),g($,qe,Z),ge=!0,Pt||(_n=[se(m,"change",e[13]),se(m,"change",e[14]),rn(Hi.call(null,m,!0)),se(O,"change",e[15]),se(O,"change",e[16]),se(we,"change",e[17]),se(we,"change",e[18])],Pt=!0)},p($,Z){const vn={};Z&33554448&&(vn.$$scope={dirty:Z,ctx:$}),t.$set(vn),(!ge||Z&16)&&r!==(r=$[4]("settings.title")+"")&&F(s,r),(!ge||Z&16)&&u!==(u=$[4]("settings.autostart_title")+"")&&F(a,u),Z&2&&(m.checked=$[1]),(!ge||Z&16)&&b!==(b=$[4]("settings.autostart")+"")&&F(H,b),(!ge||Z&16)&&I!==(I=$[4]("settings.autoexpand_title")+"")&&F(E,I),Z&4&&(O.checked=$[2]),(!ge||Z&16)&&L!==(L=$[4]("settings.autoexpand")+"")&&F(C,L),(!ge||Z&16)&&ne!==(ne=$[4]("settings.search_and_paste_title")+"")&&F(ye,ne),Z&8&&(we.checked=$[3]),(!ge||Z&16)&&ht!==(ht=$[4]("settings.focus_search")+"")&&F(It,ht);let Lt=fe;fe=bn($),fe===Lt?Se[fe].p($,Z):(le(),k(Se[Lt],1,1,()=>{Se[Lt]=null}),ae(),_e=Se[fe],_e?_e.p($,Z):(_e=Se[fe]=gn[fe]($),_e.c()),y(_e,1),_e.m(qe.parentNode,qe))},i($){ge||(y(t.$$.fragment,$),y(_e),ge=!0)},o($){k(t.$$.fragment,$),k(_e),ge=!1},d($){$&&(_(n),_(i),_(o),_(l),_(f),_(p),_(A),_(w),_(B),_(P),_(D),_(z),_(Ie),_(V),_(Ct),_(qe)),x(t,$),Se[fe].d($),Pt=!1,me(_n)}}}function Wl(e){let t,n;return t=new Xe({props:{centered:!0,$$slots:{default:[Vl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&33554495&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Xl(e,t,n){let i,r,s;ie(e,de,D=>n(4,i=D)),ie(e,he,D=>n(0,r=D)),ie(e,He,D=>n(5,s=D));function o(){be()}function l(){xe("/about")}let u=!1,a=!1,f=!0;async function p(){let D=!1;try{D=await Ji()}catch(z){await oe(i("settings.get_error_title"),z);return}return D}async function h(D){try{await ar(D)}catch(z){await oe(i("settings.save_error_title"),z);return}return D}async function m(){let D=!1;try{D=await Qi()}catch(z){await oe(i("settings.get_error_title"),z);return}return D}async function d(D){try{await lr(D)}catch(z){await oe(i("settings.save_error_title"),z);return}return D}async function b(){let D="";try{D=await ni("FOCUS_SEARCH_BOX")}catch(z){await oe(i("settings.get_error_title"),z);return}return D!=="false"}async function H(D){const z=D?"true":"false";try{await rr("FOCUS_SEARCH_BOX",z)}catch(ne){await oe(i("settings.save_error_title"),ne);return}return D}function A(D){He.fetch()}async function w(D){try{const z=await ri(D)}catch(z){await oe(i("import_snippets.error_title"),z)}await He.fetch()}async function I(){try{const D=await qi()}catch(D){await oe(i("export_snippets.error_title"),D)}}ut(async()=>{n(1,u=await p()),n(2,a=await m()),n(3,f=await b())});function E(){u=this.checked,n(1,u)}const B=()=>h(u);function P(){a=this.checked,n(2,a)}const S=()=>d(a);function O(){f=this.checked,n(3,f)}const v=()=>H(f),L=()=>w(!1),C=()=>w(!0);return e.$$.update=()=>{e.$$.dirty&1&&A()},[r,u,a,f,i,s,o,l,h,d,H,w,I,E,B,P,S,O,v,L,C]}class ql extends K{constructor(t){super(),Y(this,t,Xl,Wl,J,{})}}const Zl="/assets/snippetpixie-icon-128-1d7040bc.svg";function Ql(e){let t,n;return t=new pe({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[0]("button.back")}}),t.$on("activate",e[1]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.title=i[0]("button.back")),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Jl(e){let t,n,i,r,s,o,l,u,a,f=e[0]("about.description")+"",p,h,m,d,b,H,A=e[0]("about.by")+"",w,I,E,B,P,S,O=e[0]("about.licence_title")+"",v,L,C,D=e[0]("about.licence")+"",z,ne,ye,Ie;return t=new Ht({props:{$$slots:{default:[Ql]},$$scope:{ctx:e}}}),{c(){R(t.$$.fragment),n=U(),i=N("img"),s=U(),o=N("h2"),o.textContent="Snippet Pixie",l=U(),u=N("p"),a=N("em"),p=j(f),h=U(),m=N("p"),d=N("a"),d.textContent="snippetpixie.org",b=U(),H=N("h3"),w=j(A),I=U(),E=N("p"),B=N("a"),B.textContent="ianmjones",P=U(),S=N("h3"),v=j(O),L=U(),C=N("p"),z=j(D),Mi(i.src,r=Zl)||c(i,"src",r),c(i,"alt","Snippet Pixie icon"),c(o,"class","svelte-sjm2tb"),c(u,"class","svelte-sjm2tb"),c(d,"href","https://snippetpixie.org"),c(m,"class","svelte-sjm2tb"),c(H,"class","svelte-sjm2tb"),c(B,"href","https://ianmjones.com"),c(E,"class","svelte-sjm2tb"),c(S,"class","svelte-sjm2tb"),c(C,"class","svelte-sjm2tb")},m(V,ee){M(t,V,ee),g(V,n,ee),g(V,i,ee),g(V,s,ee),g(V,o,ee),g(V,l,ee),g(V,u,ee),T(u,a),T(a,p),g(V,h,ee),g(V,m,ee),T(m,d),g(V,b,ee),g(V,H,ee),T(H,w),g(V,I,ee),g(V,E,ee),T(E,B),g(V,P,ee),g(V,S,ee),T(S,v),g(V,L,ee),g(V,C,ee),T(C,z),ne=!0,ye||(Ie=[se(d,"click",Sn(e[2])),se(B,"click",Sn(e[3]))],ye=!0)},p(V,ee){const we={};ee&17&&(we.$$scope={dirty:ee,ctx:V}),t.$set(we),(!ne||ee&1)&&f!==(f=V[0]("about.description")+"")&&F(p,f),(!ne||ee&1)&&A!==(A=V[0]("about.by")+"")&&F(w,A),(!ne||ee&1)&&O!==(O=V[0]("about.licence_title")+"")&&F(v,O),(!ne||ee&1)&&D!==(D=V[0]("about.licence")+"")&&F(z,D)},i(V){ne||(y(t.$$.fragment,V),ne=!0)},o(V){k(t.$$.fragment,V),ne=!1},d(V){V&&(_(n),_(i),_(s),_(o),_(l),_(u),_(h),_(m),_(b),_(H),_(I),_(E),_(P),_(S),_(L),_(C)),x(t,V),ye=!1,me(Ie)}}}function Yl(e){let t,n;return t=new Xe({props:{centered:!0,$$slots:{default:[Jl]},$$scope:{ctx:e}}}),t.$on("cancel",e[1]),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&17&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Kl(e,t,n){let i;ie(e,de,l=>n(0,i=l));function r(){be()}return[i,r,()=>An("https://snippetpixie.org"),()=>An("https://ianmjones.com")]}class ea extends K{constructor(t){super(),Y(this,t,Kl,Yl,J,{})}}function ta(e){let t,n;return t=new js({props:{routes:e[1]}}),{c(){R(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function na(e){let t;return{c(){t=j("Loading...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function ia(e){let t,n,i,r;const s=[na,ta],o=[];function l(u,a){return u[0]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ve()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(le(),k(o[f],1,1,()=>{o[f]=null}),ae(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function ra(e,t,n){let i;ie(e,gt,u=>n(0,i=u));let r;async function s(){try{const u=await nr("Pong");u==="Pong"?he.update(a=>!0):(he.update(a=>!1),Mt("Got '"+u+"' back from Ping instead of 'Pong'.")),Je.update(a=>!0),yt.update(a=>!1)}catch(u){he.update(a=>!1),Mt("Ping returned: "+u),o()}}async function o(){try{await Xi()?Je.update(a=>!0):Je.update(a=>!1)}catch(u){Je.update(a=>!1),Mt("DaemonInstalled returned: "+u)}}ws("en-GB",()=>Oi(()=>import("./en-GB-551b3444.js"),[])),ys({fallbackLocale:"en-GB",initialLocale:Ss()});const l={"/":Al,"/snippet/add":Pl,"/snippet/edit/:id":Ul,"/settings":ql,"/about":ea};return ut(async()=>{await s(),r=setInterval(s,5e3)}),sn(()=>{clearInterval(r)}),[i,l]}class sa extends K{constructor(t){super(),Y(this,t,ra,ia,J,{})}}new sa({target:document.getElementById("app")});

M cmd/snippetpixiegui/frontend/dist/index.html => cmd/snippetpixiegui/frontend/dist/index.html +1 -1
@@ 5,7 5,7 @@
	<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
	
	<title>Snippet Pixie</title>
  <script type="module" crossorigin src="/assets/index-ef06e3c7.js"></script>
  <script type="module" crossorigin src="/assets/index-95462b26.js"></script>
  <link rel="stylesheet" href="/assets/index-b94e7b91.css">
</head>
<body>

M cmd/snippetpixiegui/frontend/package-lock.json => cmd/snippetpixiegui/frontend/package-lock.json +2 -2
@@ 1,12 1,12 @@
{
  "name": "frontend",
  "version": "2.0.0-alpha.5",
  "version": "2.0.0-alpha.6",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "frontend",
      "version": "2.0.0-alpha.5",
      "version": "2.0.0-alpha.6",
      "devDependencies": {
        "@sveltejs/vite-plugin-svelte": "^2.4.3",
        "svelte": "^4.1.2",

M cmd/snippetpixiegui/frontend/package.json => cmd/snippetpixiegui/frontend/package.json +1 -1
@@ 1,7 1,7 @@
{
  "name": "frontend",
  "private": true,
  "version": "2.0.0-alpha.5",
  "version": "2.0.0-alpha.6",
  "type": "module",
  "scripts": {
    "dev": "vite",

M cmd/snippetpixiegui/frontend/package.json.md5 => cmd/snippetpixiegui/frontend/package.json.md5 +1 -1
@@ 1,1 1,1 @@
a527e158948b37972583e0f8400574a5
\ No newline at end of file
1ceabad2db7cb177dcdbaac627f656ab
\ No newline at end of file

M cmd/snippetpixiegui/frontend/src/components/AboutScreen.svelte => cmd/snippetpixiegui/frontend/src/components/AboutScreen.svelte +14 -1
@@ 1,8 1,10 @@
<script>
	import {onMount} from "svelte";
	import {_} from "svelte-i18n";
	import {pop} from "svelte-spa-router";
	import {ChevronsLeftIcon} from "svelte-feather-icons";
	import {BrowserOpenURL} from "../../wailsjs/runtime";
	import {GetVersion} from "../../wailsjs/go/main/App.js";
	import Screen from "./Screen.svelte";
	import Toolbar from "./Toolbar.svelte";
	import IconButton from "./IconButton.svelte";


@@ 11,6 13,16 @@
	function handleCancel() {
		pop();
	}

	let version = "";

	$: versionStr = "v" + version;
	$: versionURL = "https://git.sr.ht/~ianmjones/snippetpixie/tree/" + version;
	$: licenceURL = versionURL + "/item/LICENSE";

	onMount(async () => {
		version = await GetVersion();
	});
</script>

<Screen centered on:cancel={handleCancel}>


@@ 27,13 39,14 @@
	<img src={SnippetPixieIcon} alt="Snippet Pixie icon">
	<h2>Snippet Pixie</h2>
	<p><em>{$_( "about.description" )}</em></p>
	<p><a href={versionURL} on:click|preventDefault={() => BrowserOpenURL(versionURL)}>{versionStr}</a></p>
	<p>
		<a href="https://snippetpixie.org" on:click|preventDefault={() => BrowserOpenURL("https://snippetpixie.org")}>snippetpixie.org</a>
	</p>
	<h3>{$_( "about.by" )}</h3>
	<p><a href="https://ianmjones.com" on:click|preventDefault={() => BrowserOpenURL("https://ianmjones.com")}>ianmjones</a></p>
	<h3>{$_( "about.licence_title" )}</h3>
	<p>{$_( "about.licence" )}</p>
	<p><a href={licenceURL} on:click|preventDefault={() => BrowserOpenURL(licenceURL)}>{$_( "about.licence" )}</a></p>
</Screen>

<style>

M cmd/snippetpixiegui/i18n/en-GB.json => cmd/snippetpixiegui/i18n/en-GB.json +1 -0
@@ 56,6 56,7 @@
    "back": "Back",
    "about": "About"
  },
  "loading": "Loading…",
  "search": "Search…",
  "clear": "Clear",
  "daemon": {

M cmd/snippetpixiegui/main.go => cmd/snippetpixiegui/main.go +1 -1
@@ 10,7 10,7 @@ import (
	"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)

var version = "2.0.0-alpha.5"
var version = "2.0.0-alpha.6"

func main() {
	// Create an instance of the app structure

M cmd/snippetpixiex/snippetpixiex-application.vala => cmd/snippetpixiex/snippetpixiex-application.vala +1 -1
@@ 22,7 22,7 @@
namespace SnippetPixieX {
    public class Application : Gtk.Application {
        public const string ID = "org.snippetpixie.snippetpixiex";
        public const string VERSION = "2.0.0-alpha.5";
        public const string VERSION = "2.0.0-alpha.6";

        private const ulong SLEEP_INTERVAL = (ulong) TimeSpan.MILLISECOND * 10;
        private const ulong SLEEP_INTERVAL_RETRY = SLEEP_INTERVAL * 2;