@verbaly/studio 0.73.0 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){for(var t=0;t<e.length;t++)e[t]()}function p(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var m=1024,h=2048,g=4096,_=8192,v=16384,y=32768,b=1<<25,x=65536,S=1<<19,ee=1<<20,C=1<<25,w=1<<21,te=1<<22,T=1<<23,ne=Symbol(`$state`),re=Symbol(`component`),ie=Symbol(``),ae=Symbol(`attributes`),oe=Symbol(`class`),se=Symbol(`style`),ce=Symbol(`text`),le=Symbol(`form reset`),E=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ue=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),de={},D=Symbol(`uninitialized`),fe=`http://www.w3.org/1999/xhtml`;function pe(){console.warn(`https://svelte.dev/e/derived_inert`)}function me(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function he(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function ge(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var O=!1;function _e(e){O=e}var k;function A(e){if(e===null)throw me(),de;return k=e}function ve(){return A(Qt(k))}function j(e){if(O){if(Qt(k)!==null)throw me(),de;k=e}}function ye(e=1){if(O){for(var t=e,n=k;t--;)n=Qt(n);k=n}}function be(e=!0){for(var t=0,n=k;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function xe(e){if(!e||e.nodeType!==8)throw me(),de;return e.data}function Se(e){return e===this.v}function Ce(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function we(e){return!Ce(e,this.v)}function Te(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ee(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function De(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Oe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ke(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ae(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function je(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Me(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ne(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Pe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Fe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var M=null;function Ie(e){M=e}function Le(e,t=!1,n){M={p:M,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Re(e){var t=M,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,M=t.p,ze(e)}function ze(e={}){return i(e,re,{value:!0}),e}function Be(){return!0}var Ve=[];function He(){var e=Ve;Ve=[],f(e)}function Ue(e){if(Ve.length===0&&!_t){var t=Ve;queueMicrotask(()=>{t===Ve&&He()})}Ve.push(e)}function We(){for(;Ve.length>0;)He()}var Ge=~(h|g|m);function N(e,t){e.f=e.f&Ge|t}function Ke(e){e.f&512||e.deps===null?N(e,m):N(e,g)}function qe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),N(e,m)}function Je(e,t){if(t){let t=document.body;e.autofocus=!0,Ue(()=>{document.activeElement===t&&e.focus()})}}function Ye(e){O&&Zt(e)!==null&&en(e)}var Xe=!1;function Ze(){Xe||(Xe=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[le]?.()})},{capture:!0}))}function Qe(e){var t=H,n=U;Fn(null),In(null);try{return e()}finally{Fn(t),In(n)}}function $e(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));let i=e[le];e[le]=i?()=>{i(),r(!0)}:()=>r(!0),Ze()}function et(e,t,n,r){let i=Be()?it:st;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=tt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){on(e,s)}nt()}}var d=rt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ot(e))).then(u).catch(e=>on(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),nt())}):f()}function tt(){var e=U,t=H,n=M,r=F;return function(i=!0){In(e),Fn(t),Ie(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function nt(e=!0){In(null),Fn(null),Ie(null),e&&F?.deactivate()}function rt(){var e=U,t=e.b,n=F,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function it(e){var t=2|h;return U!==null&&(U.f|=S),{ctx:M,deps:null,effects:null,equals:Se,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:U,ac:null}}var at=Symbol(`obsolete`);function ot(e,t,n){let r=U;r===null&&Ee();var i=void 0,a=Pt(D),o=!H,s=new Set;return gn(()=>{var t=U,n=p();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==E&&n.reject(e)}).finally(nt)}catch(e){n.reject(e),nt()}var c=F;if(o){if(t.f&32768)var l=rt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(at);else for(let e of s.values())e.reject(at);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==at&&(c.activate(),t?(a.f|=T,Rt(a,t)):(a.f&8388608&&(a.f^=T),Rt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(at)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function P(e){let t=it(e);return Rn(t),t}function st(e){let t=it(e);return t.equals=we,t}function ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Cn(t[n])}}function lt(e){var t,n=U,r=e.parent;if(!Mn&&r!==null&&e.v!==D&&r.f&24576)return pe(),e.v;In(r);try{ct(e),t=Xn(e)}finally{In(n)}return t}function ut(e){var t=lt(e);!e.equals(t)&&(e.wv=qn(),(!F?.is_fork||e.deps===null)&&(F===null?e.v=t:(F.capture(e,t,!0),mt?.capture(e,t,!0)),e.deps===null))?N(e,m):Mn||(ht===null?Ke(e):(un()||F?.is_fork)&&ht.set(e,t))}function dt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Qe(()=>{t.ac.abort(E),t.ac=null}),t.fn!==null&&(t.teardown=d),$n(t,0),xn(t))}function ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&er(t)}var pt=null,F=null,mt=null,ht=null,gt=null,_t=!1,vt=!1,yt=null,bt=null,xt=0,St=1,Ct=class e{id=St++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){pt===null?pt=this:(pt.#n=this,this.#t=pt),pt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)N(r,h),t(r);for(r of n.m)N(r,g),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=m}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),N(e,h),this.schedule(e);for(let e of this.#d)N(e,g),this.schedule(e);this.apply();for(var t=yt=[],n=[],r=bt=[];this.#c.length>0;){xt++>1e3&&(this.#S(),Tt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw At(e),this.#h()||this.discard(),t}}if(F=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(yt=null,bt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)kt(e,t);r.length>0&&F.#_();return}let a=this.#y();if(a)this.#x(n),this.#x(t),a.#b(this);else{this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),mt=this,Dt(n),Dt(t),mt=null,this.#s?.resolve();var o=F;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0){if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this}o!==null&&(Mt.clear(),o.#_())}}#v(e,t,n){e.f^=m;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=m:i&4?t.push(r):Jn(r)&&(i&16&&this.#d.add(r),er(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),N(i,h),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),F=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)qe(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==D&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),ht?.set(e,t)),this.is_fork||(e.v=t)}activate(){F=this}deactivate(){F=null,ht=null}flush(){try{vt=!0,F=this,this.#_()}finally{xt=0,gt=null,yt=null,bt=null,vt=!1,F=null,ht=null,Mt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(at);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ue(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=p()).promise}static ensure(){if(F===null){let t=F=new e;!vt&&!_t&&Ue(()=>{t.#e||t.flush()})}return F}apply(){ht=null}schedule(e){gt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?pt=e:t.#t=e,this.linked=!1}}};function wt(e){var t=_t,n=mt;mt=null,_t=!0;try{var r;for(e&&(wt(),r=e());;){if(We(),F===null)return r;F.flush()}}finally{_t=t,mt=n}}function Tt(){try{je()}catch(e){on(e,gt)}}var Et=null;function Dt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Jn(r)&&(Et=new Set,er(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Tn(r),Et?.size>0)){Mt.clear();for(let e of Et){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Et.has(n)&&(Et.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||er(n)}}Et.clear()}}Et=null}}function Ot(e){F.schedule(e)}function kt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,m);for(var n=e.first;n!==null;)kt(n,t),n=n.next}}function At(e){N(e,m);for(var t=e.first;t!==null;)At(t),t=t.next}var jt=new Set,Mt=new Map,Nt=!1;function Pt(e,t){return{f:0,v:e,reactions:null,equals:Se,rv:0,wv:0}}function I(e,t){let n=Pt(e,t);return Rn(n),n}function Ft(e,t=!1,n=!0){let r=Pt(e);return t||(r.equals=we),r}function L(e,t,n=!1){return H!==null&&(!Pn||H.f&131072)&&Be()&&H.f&4325394&&(Ln===null||!Ln.has(e))&&Pe(),Rt(e,n?Ht(t):t,bt)}var It=null,Lt=0;function Rt(e,t,n=null){if(!e.equals(t)){Mn?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var r=Ct.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&<(t),ht===null&&Ke(t)}e.wv=qn(),It=null,Lt=0,Vt(e,h,n),It=null,Be()&&U!==null&&U.f&1024&&!(U.f&96)&&(Vn===null?Hn([e]):Vn.push(e)),!r.is_fork&&jt.size>0&&!Nt&&zt()}return t}function zt(){Nt=!1;for(let e of jt){e.f&1024&&N(e,g);let t;try{t=Jn(e)}catch{t=!0}t&&er(e)}jt.clear()}function Bt(e){L(e,e.v+1)}function Vt(e,t,n){var r=e.reactions;if(r!==null){var i=Be(),a=r.length;if(Lt+=a,Lt>1e5&&It===null&&(It=new Set),It!==null){if(It.has(e))return;It.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==U){var l=(c&h)===0;if(l&&N(s,t),c&131072)jt.add(s);else if(c&2){var u=s;ht?.delete(u),Vt(u,g,n)}else if(l){var d=s;c&16&&Et!==null&&Et.add(d),n===null?Ot(d):n.push(d)}}}}}function Ht(t){if(typeof t!=`object`||!t||ne in t||re in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=I(0),u=null,d=Gn,f=e=>{if(Gn===d)return e();var t=H,n=Gn;Fn(null),Kn(d);var r=e();return Fn(t),Kn(n),r};return i&&r.set(`length`,I(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Me();var i=r.get(t);return i===void 0?f(()=>{var e=I(n.value,u);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>I(D,u));r.set(t,e),Bt(o)}}else L(n,D),Bt(o);return!0},get(e,n,i){if(n===ne)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>I(Ht(s?e[n]:D),u)),r.set(n,o)),o!==void 0){var c=W(o);return c===D?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=W(i);if(a===D)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ne)return!0;var n=r.get(t),i=n!==void 0&&n.v!==D||Reflect.has(e,t);return(n!==void 0||U!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>I(i?Ht(e[t]):D,u)),r.set(t,n)),W(n)===D)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>I(D,u)),r.set(d+``,p)):L(p,D)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>I(void 0,u)),L(c,Ht(n)),r.set(t,c));else{l=c.v!==D;var m=f(()=>Ht(n));L(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&L(g,_+1)}Bt(o)}return!0},ownKeys(e){W(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==D});for(var[n,i]of r)i.v!==D&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ne()}})}function Ut(e){try{if(typeof e==`object`&&e&&ne in e)return e[ne]}catch{}return e}function Wt(e,t){return Object.is(Ut(e),Ut(t))}var Gt,Kt,qt,Jt;function Yt(){if(Gt===void 0){Gt=window,Kt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;qt=a(t,`firstChild`).get,Jt=a(t,`nextSibling`).get,u(e)&&(e[oe]=void 0,e[ae]=null,e[se]=void 0,e.__e=void 0),u(n)&&(n[ce]=void 0)}}function Xt(e=``){return document.createTextNode(e)}function Zt(e){return qt.call(e)}function Qt(e){return Jt.call(e)}function R(e,t){if(!O)return Zt(e);var n=Zt(k);if(n===null)n=k.appendChild(Xt());else if(t&&n.nodeType!==3){var r=Xt();return n?.before(r),A(r),r}return t&&rn(n),A(n),n}function $t(e,t=!1){if(!O){var n=Zt(e);return n instanceof Comment&&n.data===``?Qt(n):n}if(t){if(k?.nodeType!==3){var r=Xt();return k?.before(r),A(r),r}rn(k)}return k}function z(e,t=!1){if(!O)return Zt(e);var n=R(e,t);return j(e),n}function B(e,t=1,n=!1){let r=O?k:e;for(var i;t--;)i=r,r=Qt(r);if(!O)return r;if(n){if(r?.nodeType!==3){var a=Xt();return r===null?i?.after(a):r.before(a),A(a),a}rn(r)}return A(r),r}function en(e){e.textContent=``}function tn(){return!1}function nn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function rn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function an(e){var t=U;if(t===null)return H.f|=T,e;if(!(t.f&32768)&&!(t.f&4))throw e;on(e,t)}function on(e,t){if(e===de)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function sn(e){U===null&&(H===null&&Ae(e),ke()),Mn&&Oe(e)}function cn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ln(e,t){var n=U;n!==null&&n.f&8192&&(e|=_);var r={ctx:M,deps:null,nodes:null,f:e|h|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F?.register_created_effect(r);var i=r;if(e&4)yt===null?Ct.ensure().schedule(r):yt.push(r);else if(t!==null){try{er(r)}catch(e){throw Cn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=x))}if(i!==null&&(i.parent=n,n!==null&&cn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function un(){return H!==null&&!Pn}function dn(e){let t=ln(8,null);return N(t,m),t.teardown=e,t}function fn(e){sn(`$effect`);var t=U.f;if(!H&&t&32&&M!==null&&!M.i){var n=M;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return ln(4|ee,e)}function mn(e){Ct.ensure();let t=ln(64|S,e);return(e={})=>new Promise(n=>{e.outro?En(t,()=>{Cn(t),n(void 0)}):(Cn(t),n(void 0))})}function hn(e){return ln(4,e)}function gn(e){return ln(te|S,e)}function _n(e,t=0){return ln(8|t,e)}function V(e,t=[],n=[],r=[]){et(r,t,n,t=>{ln(8,()=>{e(...t.map(W))})})}function vn(e,t=0){return ln(16|t,e)}function yn(e){return ln(32|S,e)}function bn(e){var t=e.teardown;if(t!==null){let n=Mn,r=H;Nn(!0),Fn(null);try{t.call(null)}catch(t){on(t,e.parent)}finally{Nn(n),Fn(r)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Qe(()=>{e.abort(E)});var r=n.next;n.f&64?n.parent=null:Cn(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Cn(t),t=n}}function Cn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(wn(e.nodes.start,e.nodes.end),n=!0),e.f|=b,xn(e,t&&!n),$n(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=b,e.f|=v;var i=e.parent;i!==null&&i.first!==null&&Tn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function wn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function Tn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function En(e,t,n=!0){var r=[];e.f|=256,Dn(e,r,!0);var i=()=>{n&&Cn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Dn(e,t,n){if(!(e.f&8192)){e.f^=_;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Dn(i,t,o?n:!1)}i=a}}}function On(e){e.f&=-257,kn(e,!0)}function kn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=_,e.f&1024||(N(e,h),Ct.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);kn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function An(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var jn=null,Mn=!1;function Nn(e){Mn=e}var H=null,Pn=!1;function Fn(e){H=e}var U=null;function In(e){U=e}var Ln=null;function Rn(e){H!==null&&(H.f&2097152||H.f&2)&&(Ln??=new Set).add(e)}var zn=null,Bn=0,Vn=null;function Hn(e){Vn=e}var Un=1,Wn=0,Gn=Wn;function Kn(e){Gn=e}function qn(){return++Un}function Jn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Jn(a)&&ut(a),a.wv>e.wv)return!0}t&512&&ht===null&&N(e,m)}return!1}function Yn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ln!==null&&Ln.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Yn(a,t,!1):t===a&&(n?N(a,h):a.f&1024&&N(a,g),Ot(a))}}function Xn(e){var t=zn,n=Bn,r=Vn,i=H,a=Ln,o=M,s=Pn,c=Gn,l=e.f;zn=null,Bn=0,Vn=null,H=l&96?null:e,Ln=null,Ie(e.ctx),Pn=!1,Gn=++Wn,e.ac!==null&&(Qe(()=>{e.ac.abort(E)}),e.ac=null);try{e.f|=w;var u=e.fn,d=u();e.f|=y;var f=Zn(e);if(Be()&&Vn!==null&&!Pn&&f!==null&&!(e.f&6146))for(var p=0;p<Vn.length;p++)Yn(Vn[p],e);if(i!==null&&i!==e){if(Wn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Wn;if(t!==null)for(let e of t)e.rv=Wn;Vn!==null&&(r===null?r=Vn:r.push(...Vn))}return e.f&8388608&&(e.f^=T),d}catch(t){return Zn(e),an(t)}finally{e.f^=w,zn=t,Bn=n,Vn=r,H=i,Ln=a,Ie(o),Pn=s,Gn=c}}function Zn(e){var t=e.deps,n=F?.is_fork;if(zn!==null){var r;if(n||$n(e,Bn),t!==null&&Bn>0)for(t.length=Bn+zn.length,r=0;r<zn.length;r++)t[Bn+r]=zn[r];else e.deps=t=zn;if(un()&&e.f&512)for(r=Bn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Bn<t.length&&($n(e,Bn),t.length=Bn);return t}function Qn(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(zn===null||!n.call(zn,r))){var s=r;s.f&512&&(s.f^=512),s.v!==D&&Ke(s),s.ac!==null&&Qe(()=>{s.ac.abort(E),s.ac=null,N(s,h)}),dt(s),$n(s,0)}}function $n(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Qn(e,n[r])}function er(e){var t=e.f;if(!(t&16384)){N(e,m);var n=U;U=e;try{t&16777232?Sn(e):xn(e),bn(e);var r=Xn(e);e.teardown=typeof r==`function`?r:null,e.wv=Un}finally{U=n}}}async function tr(){await Promise.resolve(),wt()}function W(e){var t=!!(e.f&2);if(jn?.add(e),H!==null&&!Pn&&!(U!==null&&U.f&16384)&&(Ln===null||!Ln.has(e))){var r=H.deps;if(H.f&2097152)e.rv<Wn&&(e.rv=Wn,zn===null&&r!==null&&r[Bn]===e?Bn++:zn===null?zn=[e]:zn.push(e));else{H.deps??=[],n.call(H.deps,e)||H.deps.push(e);var i=e.reactions;i===null?e.reactions=[H]:n.call(i,H)||i.push(H)}}if(Mn&&Mt.has(e))return Mt.get(e);if(t){var a=e;if(Mn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||rr(a))&&(o=lt(a)),Mt.set(a,o),o}var s=!(a.f&512)&&!Pn&&H!==null&&!!(H.f&512),c=(a.f&y)===0;Jn(a)&&(s&&(a.f|=512),ut(a)),s&&!c&&(ft(a),nr(a))}if(ht?.has(e))return ht.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:n.call(t,e)||t.push(e),r.f&2&&!(r.f&512)&&(ft(r),nr(r))}}function rr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=Pn;try{return Pn=!0,e()}finally{Pn=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var ar=[`touchstart`,`touchmove`];function or(e){return ar.includes(e)}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n,r={}){function i(e){if(r.capture||hr.call(t,e),!e.cancelBubble)return Qe(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Ue(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function dr(e,t,n,r,i){var a={capture:r,passive:i},o=ur(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&dn(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function G(e,t,n){(t[sr]??={})[e]=n}function fr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var pr=null,mr=!1;function hr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;pr=e,mr||(mr=!0,setTimeout(()=>{mr=!1,pr=null}));var s=0,c=pr===e&&e[sr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[sr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=H,f=U;Fn(null),In(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[sr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[sr]=t,delete e.currentTarget,Fn(d),In(f)}}}var gr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function _r(e){return gr?.createHTML(e)??e}function vr(e){var t=nn(`template`);return t.innerHTML=_r(e.replaceAll(`<!>`,`<!---->`)),t.content}function yr(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(O)return yr(k,null),k;i===void 0&&(i=vr(a?e:`<!>`+e),n||(i=Zt(i)));var t=r||Kt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Zt(t),s=t.lastChild;yr(o,s)}else yr(t,t);return t}}function br(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(O)return yr(k,null),k;if(!o){var e=Zt(vr(a));if(i)for(o=document.createDocumentFragment();Zt(e);)o.appendChild(Zt(e));else o=Zt(e)}var t=o.cloneNode(!0);if(i){var n=Zt(t),r=t.lastChild;yr(n,r)}else yr(t,t);return t}}function xr(e,t){return br(e,t,`svg`)}function Sr(e=``){if(!O){var t=Xt(e+``);return yr(t,t),t}var n=k;return n.nodeType===3?rn(n):(n.before(n=Xt()),A(n)),yr(n,n),n}function Cr(){if(O)return yr(k,null),k;var e=document.createDocumentFragment(),t=document.createComment(``),n=Xt();return e.append(t,n),yr(t,n),e}function q(e,t){if(O){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=k),ve()}else e!==null&&e.before(t)}function wr(e){let t=0,n=Pt(0),r;return()=>{un()&&(W(n),_n(()=>(t===0&&(r=ir(()=>e(()=>Bt(n)))),t+=1,()=>{Ue(()=>{--t,t===0&&(r?.(),r=void 0,Bt(n))})})))}}var Tr=x|S;function Er(e,t,n,r){new Dr(e,t,n,r)}var Dr=class{parent;is_pending=!1;transform_error;#e;#t=O?k:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=wr(()=>(this.#m=Pt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=vn(()=>{if(O){let e=xe(this.#t);ve();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#_(t)}else t?this.#b():this.#g()}else this.#x()},Tr),O&&(this.#e=k)}#g(){try{this.#a=yn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ue(r),t&&(this.#s=yn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{this.#y()||(t?ge():(t=!0,n&&Fe(),this.#s!==null&&En(this.#s,()=>{this.#s=null}),this.#C(()=>{this.#x()})))};return{reset:r,invoke_onerror:()=>{if(!this.#y())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){on(e,this.#i&&this.#i.parent)}}}}#y(){return(this.#i.f&(v|b))!==0}#b(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=yn(()=>e(this.#e)),Ue(()=>{if(!this.#y()){var e=this.#c=document.createDocumentFragment(),t=Xt(),n=!1;e.append(t),this.#a=this.#C(()=>{try{return yn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){on(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#S(F)):this.#u===0&&(this.#e.before(e),this.#c=null,En(this.#o,()=>{this.#o=null}),this.#S(F))}}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=yn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();An(this.#a,e);let t=this.#n.pending;this.#o=yn(()=>t(this.#e))}else this.#S(F)}catch(e){this.error(e)}}#S(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){qe(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#C(e){var t=U,n=H,r=M;In(this.#i),Fn(this.#i),Ie(this.#i.ctx);try{return Ct.ensure(),e()}finally{In(t),Fn(n),Ie(r)}}#w(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#S(t),this.#o&&En(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#w(e,t)}update_pending_count(e,t){this.#w(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ue(()=>{this.#d=!1,this.#m&&Rt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),W(this.#m)}error(e){if(e===de||!this.#n.onerror&&!this.#n.failed)throw e;F?.is_fork?(this.#a&&F.skip_effect(this.#a),this.#o&&F.skip_effect(this.#o),this.#s&&F.skip_effect(this.#s),F.oncommit(()=>{this.#y()||this.#T(e)})):this.#T(e)}#T(e){this.#a&&=(Cn(this.#a),null),this.#o&&=(Cn(this.#o),null),this.#s&&=(Cn(this.#s),null),O&&(A(this.#t),ye(),A(be()));let t=this.#n.failed,n=e=>{if(this.#y())return;let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&!this.#y()&&(this.#s=this.#C(()=>{try{return yn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return on(e,this.#i.parent),null}}))};Ue(()=>{if(!this.#y()){var t;try{t=this.transform_error(e)}catch(e){on(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>on(e,this.#i&&this.#i.parent)):n(t)}})}};function J(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ce]??=e.nodeValue)&&(e[ce]=n,e.nodeValue=`${n}`)}function Or(e,t){return Ar(e,t)}var kr=new Map;function Ar(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Yt();var l=void 0,u=mn(()=>{var s=n??t.appendChild(Xt());Er(s,{pending:()=>{}},t=>{Le({});var n=M;if(o&&(n.c=o),a&&(i.$$events=a),O&&yr(t,null),l=e(t,i)||ze(),O&&(U.nodes.end=k,k===null||k.nodeType!==8||k.data!==`]`))throw me(),de;Re()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=or(r);for(let e of[t,document]){var a=kr.get(e);a===void 0&&(a=new Map,kr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,hr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(cr)),lr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=kr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,hr),r.delete(e),r.size===0&&kr.delete(n)):r.set(e,i)}lr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return jr.set(l,u),l}var jr=new WeakMap,Mr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)On(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(On(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Cn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();An(r,t),t.append(Xt()),this.#n.set(e,{effect:r,fragment:t})}else Cn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),En(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Cn(n.effect),this.#n.delete(e))};ensure(e,t){var n=F,r=tn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=Xt();i.append(a),this.#n.set(e,{effect:yn(()=>t(a)),fragment:i})}else this.#t.set(e,yn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else O&&(this.anchor=k),this.#a(n)}};function Y(e,t,n=!1){var r;O&&(r=k,ve());var i=new Mr(e),a=n?x:0;function o(e,t){if(O){var n=xe(r);if(e!==parseInt(n.substring(1))){var a=be();A(a),i.anchor=a,_e(!1),i.ensure(e,t),_e(!0);return}}i.ensure(e,t)}vn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Nr(e,t){return t}function Pr(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];En(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Fr(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;en(d),d.append(u),e.items.clear()}Fr(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function Fr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=C,An(a,document.createDocumentFragment())):Cn(t[i],n)}}var Ir;function X(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=O?A(Zt(u)):u.appendChild(Xt())}O&&ve();var d=null,f=st(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var t=W(f);_.fallback=d,Rr(_,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=C,Br(d,null,c)):On(d):En(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:vn(()=>{var e=W(f),t=e.length;let r=!1;O&&xe(c)===`[!`!=(t===0)&&(c=be(),A(c),_e(!1),r=!0);for(var u=new Set,_=F,v=tn(),y=0;y<t;y+=1){O&&k.nodeType===8&&k.data===`]`&&(c=k,r=!0,_e(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&Rt(S.v,b),S.i&&Rt(S.i,y),v&&_.unskip_effect(S.e)):(S=zr(l,m?c:Ir??=Xt(),b,x,y,o,n,i),m||(S.e.f|=C),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=yn(()=>s(c)):(d=yn(()=>s(Ir??=Xt())),d.f|=C)),t>u.size&&De(``,``,``),O&&t>0&&A(be()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}r&&_e(!0),W(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,O&&(c=k)}function Lr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Rr(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=Lr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(On(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=C,_===l)Br(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Vr(e,d,_),Vr(e,_,y),Br(_,y,n),d=_,p=[],m=[],l=Lr(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Br(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Vr(e,S.prev,ee.next),Vr(e,d,S),Vr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Br(_,l,n),Vr(e,_.prev,_.next),Vr(e,_,d===null?e.effect.first:d.next),Vr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Lr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Lr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Fr(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Lr(l.next);var te=w.length;if(te>0){var T=i&4&&s===0?n:null;if(o){for(v=0;v<te;v+=1)w[v].nodes?.a?.measure();for(v=0;v<te;v+=1)w[v].nodes?.a?.fix()}Pr(e,w,T)}}o&&Ue(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function zr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Pt(n):Ft(n,!1,!1):null,l=o&2?Pt(i):null;return{v:c,i:l,e:yn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Br(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Qt(r);if(a.before(r),r===i)return;r=o}}function Vr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Hr(e,t,...n){var r=new Mr(e);vn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},x)}var Ur=[...`
|
|
2
|
+
\r\f\xA0\v`];function Wr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ur.includes(r[o-1]))&&(s===r.length||Ur.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Gr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Kr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function qr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Kr)),i&&c.push(...Object.keys(i).map(Kr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Kr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Gr(r)),i&&(n+=Gr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Jr(e,t,n,r,i,a){var o=e[oe];if(O||o!==n||o===void 0){var s=Wr(n,r,a);(!O||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[oe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Yr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Xr(e,t,n,r){var i=e[se];if(O||i!==t){var a=qr(t,r);(!O||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[se]=t}else r&&(Array.isArray(r)?(Yr(e,n?.[0],r[0]),Yr(e,n?.[1],r[1],`important`)):Yr(e,n,r));return r}function Zr(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Qr(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=ti(c);Zr(c,i?a.includes(l):Wt(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function $r(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return he();for(var i of t.options)i.selected=n.includes(ti(i))}else{for(i of t.options)if(Wt(ti(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}}function ei(e){var t=new MutationObserver(t=>{t.every(ni)||(`__defaultValue`in e&&Qr(e,!1),`__value`in e&&$r(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),dn(()=>{t.disconnect()})}function ti(e){return`__value`in e?e.__value:e.value}function ni(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var ri=Symbol(`is custom element`),ii=Symbol(`is html`),ai=ue?`link`:`LINK`;function oi(e){if(O){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Z(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Z(e,`checked`,null),e.checked=r}}};e[le]=n,Ue(n),Ze()}}function si(e,t){var n=ci(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Z(e,t,n,r){var i=ci(e);O&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ai)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ie]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ui(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ci(e){return e[ae]??={[ri]:e.nodeName.includes(`-`),[ii]:e.namespaceURI===fe}}var li=new Map;function ui(e){var t=e.getAttribute(`is`)||e.nodeName,n=li.get(t);if(n)return n;li.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.add(s);i=l(i)}return n}function di(e,t,n=t){var r=new WeakSet;$e(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=fi(e)?pi(a):a,n(a),F!==null&&r.add(F),await tr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(O&&e.defaultValue!==e.value||ir(t)==null&&e.value)&&(n(fi(e)?pi(e.value):e.value),F!==null&&r.add(F)),_n(()=>{var n=t();if(e===document.activeElement){var i=F;if(r.has(i))return}fi(e)&&n===pi(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function fi(e){var t=e.type;return t===`number`||t===`range`}function pi(e){return e===``?null:+e}function mi(e,t){return e===t||e?.[ne]===t}function hi(e=ze(),t,n,r){var i=M.r,a=U;return hn(()=>{var o,s;return _n(()=>{o=s,s=r?.()||[],ir(()=>{mi(n(...s),e)||(t(e,...s),o&&mi(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&mi(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function gi(e){M===null&&Te(`onMount`),fn(()=>{let t=ir(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var _i=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg>`),vi=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M8 4v5"></path><path d="M8 12h.01"></path></svg>`),yi=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg>`),bi=K(`<span class="fix svelte-1grjtup"> </span>`),xi=K(`<li class="svelte-1grjtup"><span class="mark svelte-1grjtup" aria-hidden="true"><!></span> <span class="body svelte-1grjtup"><b class="svelte-1grjtup"> </b> <span class="msg svelte-1grjtup"> </span> <!></span> <span class="sr svelte-1grjtup"> </span></li>`),Si=K(`<section class="health svelte-1grjtup" aria-label="Health"><header class="svelte-1grjtup"><h2 class="svelte-1grjtup"> </h2> <p class="svelte-1grjtup">This is the same check <code>npx verbaly doctor</code> runs, read out loud. It looks at your
|
|
3
|
+
settings, your catalogs and the way your build is wired, and it never changes anything.</p> <button class="close svelte-1grjtup">Back to the messages</button></header> <ul class="svelte-1grjtup"></ul></section>`);function Ci(e,t){Le(t,!0);let n={config:`Your settings`,cli:`The verbaly command`,catalogs:`Your catalogs`,locales:`The names of your languages`,routing:`Where the language lives in your urls`,plugin:`The piece that wires your build`,types:`The generated types`,sources:`Reading your code`,orphans:`Keys nothing in your code uses`,extras:`Keys only a translation has`,bundle:`What the browser downloads`,translations:`The translations themselves`},r=P(()=>t.entries.filter(e=>e.level!==`ok`).length);var i=Si(),a=R(i),o=R(a),s=z(o,!0),c=B(o,4);j(a);var l=B(a,2);X(l,21,()=>t.entries,Nr,(e,t)=>{var r=xi(),i=R(r),a=R(i),o=e=>{q(e,_i())},s=e=>{q(e,vi())},c=e=>{q(e,yi())};Y(a,e=>{W(t).level===`ok`?e(o):W(t).level===`warn`?e(s,1):e(c,-1)}),j(i);var l=B(i,2),u=R(l),d=z(u,!0),f=B(u,2),p=z(f,!0),m=B(f,2),h=e=>{var n=bi(),r=z(n,!0);V(()=>J(r,W(t).fix)),q(e,n)};Y(m,e=>{W(t).fix&&e(h)}),j(l);var g=z(B(l,2),!0);j(r),V(()=>{Z(r,`data-level`,W(t).level),J(d,n[W(t).check]??W(t).check),J(p,W(t).message),J(g,W(t).level)}),q(e,r)}),j(l),j(i),V(()=>J(s,t.ok?`Nothing is broken`:`${W(r)} of ${t.entries.length} need you`)),G(`click`,c,function(...e){t.onClose?.apply(this,e)}),q(e,i),Re()}fr([`click`]);var wi=new Set;function Ti(e){wi.has(e)||(wi.add(e),console.warn(`[verbaly] ${e}`))}var Ei=200,Di=new Map;function Oi(e,t,n,r){let i=e.get(t);if(!i){e.size>=Ei&&e.delete(e.keys().next().value);try{i=r(n)}catch{let e=n.replace(/_/g,`-`);try{i=r(e)}catch{i=r(e=void 0)}Ti(`"${n}" is not a locale tag, so Intl reads it as ${e??`its default locale`}`)}e.set(t,i)}return i}function ki(e){return Oi(Di,e,e,e=>new Intl.DisplayNames(e,{type:`language`}))}function Ai(e,t=e){try{return ki(t).of(e)??e}catch{return e}}var ji=/(^|[^{])\{\s*[a-zA-Z0-9_]+\s*,\s*(?:plural|selectordinal|select|number|date|time)\b/;function Mi(e){return ji.test(e)}function Ni(e){let t=0,n=()=>e.charAt(t),r=()=>{for(;t<e.length&&/\s/.test(n());)t++},i=()=>{let r=``;for(;t<e.length&&/[a-zA-Z0-9_]/.test(n());)r+=e[t++];return r};function a(r){let i=[],a=``,c=()=>{a&&i.push({kind:`text`,value:a}),a=``};for(;t<e.length;){let e=n();if(e===`}`)break;e===`{`?(c(),i.push(s())):e===`#`&&r?(c(),i.push({kind:`hash`}),t++):e===`'`?a+=o():(a+=e,t++)}return c(),i}function o(){if(t++,n()===`'`)return t++,`'`;let r=n();if(r!==`{`&&r!==`}`&&r!==`#`)return`'`;let i=``;for(;t<e.length;){if(n()===`'`){if(e.charAt(t+1)===`'`){i+=`'`,t+=2;continue}return t++,i}i+=e[t++]}return i}function s(){t++,r();let o=i();if(r(),n()===`}`)return t++,{kind:`param`,name:o};n()===`,`&&t++,r();let s=i(),u={kind:`param`,name:o};if(s===`number`||s===`date`||s===`time`){r();let i=``;if(n()===`,`){for(t++,r();t<e.length&&n()!==`}`&&n()!==`,`;)i+=e[t++];i=i.trim()}return s===`number`?u.format=i===`integer`||i===`percent`||i===`currency`?i:`number`:(u.format=s,i&&(u.arg=i)),l(),u}if(s===`plural`||s===`selectordinal`||s===`select`){s===`selectordinal`&&(u.ordinal=!0);let i=[];if(r(),n()===`,`&&t++,r(),s!==`select`&&e.startsWith(`offset:`,t)){for(t+=7,r();t<e.length&&/[0-9]/.test(n());)t++;r()}for(;t<e.length&&n()!==`}`;){let e=c();if(r(),n()!==`{`)break;t++;let o=a(s!==`select`);n()===`}`&&t++,i.push([e,o]),r()}return n()===`}`&&t++,u.variants=i,u}return l(),u}function c(){if(n()===`=`){let r=`=`;for(t++;t<e.length&&/[0-9]/.test(n());)r+=e[t++];return r}let r=``;for(;t<e.length&&!/[\s{]/.test(n());)r+=e[t++];return r}function l(){for(;t<e.length&&n()!==`}`;)t++;n()===`}`&&t++}return a(!1)}var Pi=new Map,Fi=5e3,Ii=Pi.keys();function Li(e,t){let n=Pi.get(e);if(!n){if(Mi(e)){if(!t)return Ri(e);n=t(e)}else n=zi(e,!1);Pi.size>=Fi&&Pi.delete(Ii.next().value),Pi.set(e,n)}return n}function Ri(e){return Ti(`a message uses ICU syntax and no ICU parser is loaded: set icu: true in your verbaly config, or pass icu to createVerbaly`),[{kind:`text`,value:e}]}function zi(e,t){let n=[],r=``,i=0,a=()=>{r&&n.push({kind:`text`,value:r}),r=``};for(;i<e.length;){let o=e[i];if(o===`{`){if(e[i+1]===`{`){r+=`{`,i+=2;continue}let t=Vi(e,i);if(t<0){r+=e.slice(i);break}a(),n.push(Hi(e.slice(i+1,t))),i=t+1}else o===`}`&&e[i+1]===`}`?(r+=`}`,i+=2):t&&o===`#`?e[i+1]===`#`?(r+=`#`,i+=2):(a(),n.push({kind:`hash`}),i+=1):(r+=o,i+=1)}return a(),n}var Bi;function Vi(e,t,n){Bi=n;let r=0,i=t;for(;i<e.length;){let t=e[i];if(t===`{`){if(e[i+1]===`{`){i+=2;continue}r+=1}else if(t===`}`){if(e[i+1]===`}`&&!(n&&r>1)){i+=2;continue}if(--r,r===0)return i}i+=1}return n?-1:Vi(e,t,!0)}function Hi(e){let t=Ui(e),n=(t[0]??``).trim();if(!n)return{kind:`text`,value:`{${e}}`};let r=n.indexOf(`:`),i=(r<0?n:n.slice(0,r)).trim();if(!i)return{kind:`text`,value:`{${e}}`};let a={kind:`param`,name:i};if(r>=0){let e=n.slice(r+1).trim(),t=e.indexOf(`/`);a.format=(t<0?e:e.slice(0,t)).trim(),t>=0&&(a.arg=e.slice(t+1).trim())}if(t.length>1){a.variants=[];for(let e of t.slice(1)){let t=e.indexOf(`:`);if(t<0)continue;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();n&&a.variants.push([n,zi(r,!0)])}}return a}function Ui(e){let t=[],n=``,r=0,i=0;for(;i<e.length;){let a=e[i];if(a===`{`){if(e[i+1]===`{`){n+=`{{`,i+=2;continue}r+=1,n+=a}else if(a===`}`){if(e[i+1]===`}`&&!(Bi&&r>0)){n+=`}}`,i+=2;continue}--r,n+=a}else if(a===`|`&&r===0){if(e[i+1]===`|`){n+=`|`,i+=2;continue}t.push(n),n=``}else n+=a;i+=1}return t.push(n),t}var Wi=/<(\/?)([a-zA-Z][\w-]*)\s*(\/?)>/g,Gi=/^(?:br|wbr)$/,Ki=/&(?:(lt|gt|amp)|#(\d+)|#[xX]([0-9a-fA-F]+));/g,qi={lt:`<`,gt:`>`,amp:`&`},Ji=e=>e.replace(Ki,(e,t,n,r)=>{if(t)return qi[t];let i=n?parseInt(n,10):parseInt(r,16);return i<=1114111?String.fromCodePoint(i):e});function Yi(e){Wi.lastIndex=0;let t=[],n=[],r=()=>n.length?n[n.length-1].children:t,i=e=>{e&&r().push(Ji(e))},a=0,o;for(;(o=Wi.exec(e))!==null;){let[t,s,c,l]=o;if(i(e.slice(a,o.index)),a=o.index+t.length,l||Gi.test(c))s||r().push({name:c,children:[]});else if(s){if(n.length&&n[n.length-1].name===c){let e=n.pop();r().push(e)}else i(t)}else n.push({name:c,children:[]})}for(i(e.slice(a));n.length;){let e=n.pop();r().push(...e.children)}return t}var Xi={done:{short:`ready`,long:`ready`},draft:{short:`unread`,long:`written by a machine, nobody has read it`},missing:{short:`missing`,long:`missing, so your visitor sees the source language`},broken:{short:`breaks`,long:`breaks your site`}},Zi={all:`everything`,missing:`missing`,draft:`unread`,broken:`breaks your site`,look:`worth a look`,clean:`nothing odd`},Qi={divergent:`the source says this two ways`,collision:`came back as two translations`,echo:`still identical to the source`,digits:`the numbers moved`,url:`a link changed`,code:`a code span changed`},Q={open:`More for this message`,close:`Close`,edit:`Edit here`,copyKey:`Copy the key`,copySource:`Copy the source text`,commit:`The commit that changed it`,origins:`Where it is used`,reading:`reading your history`,nogit:`no git here`,uncommitted:`not committed yet`,older:`not in recent commits`,scanOff:`include: [] is off`,noFiles:`no file in your code uses it`,more:e=>`and ${e} more`,copiedKey:`The key is on your clipboard.`,copiedSource:`The source text is on your clipboard.`,copiedSha:`The commit is on your clipboard.`,noClipboard:`Your browser would not let the panel write to the clipboard.`,nothingToEdit:`Tick a language in the rail and this message has a line to edit.`},$i={cap:`Group`,all:`every group`,none:`Your keys have no groups yet.`,hint:`A key like nav.home belongs to nav.`},ea=`Undo`,ta={find:`Find new text`,findWhy:`Reads your code and adds what your catalogs do not have yet.`,translate:`Translate what is missing`,translateWhy:`Calls your provider, so it costs money and takes minutes.`,cancel:`Not now`,working:`Reading your code`,running:`Translating`,nothingNew:`Nothing new: your catalogs already have every message your code uses.`,nothingMissing:`Nothing missing in the languages you ticked.`,pickFirst:`Tick a language to translate it.`,onlyLocale:`This project has one language, so there is nothing to translate into.`,scanOff:`Source scanning is off in your config, so there is nothing to read.`,kept:e=>`${e===1?`One was`:`${e} were`} written by someone else while it ran, so ${e===1?`it keeps its text`:`they keep their text`}.`},na={noCatalogs:`No messages yet. Studio reads the catalogs in your project, and there are none here.`,oneLocale:`One language is all you have, so there is nothing to compare it against yet.`,oneLocaleFix:`Add another one to your config and it shows up in the rail.`,pickOne:`Tick a language in the rail to see its translations.`,noMatch:`Nothing matches. Every message here is in the state you asked for.`};function ra(e){return`${e} ${e===1?`message`:`messages`}`}var ia={broken:{one:`translation breaks your site`,many:`translations break your site`},missing:{one:`message is missing`,many:`messages are missing`},draft:{one:`translation nobody has read`,many:`translations nobody has read`},undefined:{one:`key your code calls has no message`,many:`keys your code calls have no message`},extra:{one:`key only a translation has`,many:`keys only a translation has`}},aa={broken:`It lost a parameter or a tag, so the sentence would ship incomplete.`,missing:`Your visitor sees the source language until one is written.`,draft:`A machine wrote it and nobody has looked. It is already on your site.`,undefined:`Nothing defines it, so the build fails and the raw key would reach your page.`,extra:`Your source catalog lacks it, so it is dead weight, or a raw key if your code reads it.`},oa={here:`Overview`,clear:`Nothing is waiting for you.`,clearWhy:`Every language is complete and the build passes.`,project:`Project`,healthy:`Healthy`,problems:`Needs a look`,checks:`checks`,history:`Last changes to your catalogs`,noHistory:`No git history for your catalog directory.`,countMessages:`Messages`,countLocales:`Languages`,open:`Open`},sa={label:`Search your messages`,scope:`Searches your text in every language, never the key.`,none:`Nothing has that text, in any language.`,oneHit:`1 message`,hits:e=>`${e} messages`,moveKeys:`move`,openKeys:`open`,closeKeys:`close`,close:`Close`,placeholder:`Search the text, not the key`},$={mark:`Look`,live:`They are already on your site.`,written:e=>`A machine wrote ${e===1?`one of them`:`${e} of them`} and nobody has read ${e===1?`it`:`them`} yet.`,sound:`Nothing is broken: the check your build runs passes on this language.`,broken:e=>`${e} ${e===1?`breaks`:`break`} your site, so ${e===1?`it is`:`they are`} first.`,flagged:e=>`${e} ${e===1?`is`:`are`} worth reading before the rest, so ${e===1?`it is`:`they are`} at the top.`,clean:`Nothing in them looks off to me.`,approve:e=>`Mark all of ${e} as read`,approveSub:e=>`${e} unread, and it undoes`,nothingUnread:`Every one of them has been read.`,chipAll:`Everything`,chipLook:`Look`,chipClean:`Nothing odd`,rest:e=>`${e} more with nothing odd. They are below and you do not need to read them.`,order:`Sorted by what is worth reading first`},ca=K(`<span> </span>`),la=K(`<li><button><span> </span> <!></button></li>`),ua=K(`<button class="read svelte-l3e5c7"> <span class="n svelte-l3e5c7"> </span></button>`),da=K(`<li><label><input type="checkbox" class="svelte-l3e5c7"/> <span class="meta svelte-l3e5c7"><span class="name svelte-l3e5c7"> <code class="svelte-l3e5c7"> </code></span> <span class="state svelte-l3e5c7"><b class="svelte-l3e5c7"> </b><!></span></span></label> <!></li>`),fa=K(`<p class="undo svelte-l3e5c7"><span> </span> <button class="svelte-l3e5c7"> </button></p>`),pa=K(`<option> </option>`),ma=K(`<h2 class="cap svelte-l3e5c7"> </h2> <select class="groups svelte-l3e5c7"><option> </option><!></select>`,1),ha=K(`<li><button type="button"><span> </span> <span class="count svelte-l3e5c7"> </span></button></li>`),ga=K(`<nav class="rail svelte-l3e5c7" aria-label="Languages and filters"><ul class="views svelte-l3e5c7"></ul> <!> <h2 class="cap svelte-l3e5c7">Languages</h2> <ul class="langs svelte-l3e5c7"></ul> <!> <!> <h2 class="cap svelte-l3e5c7">Show</h2> <ul class="filters svelte-l3e5c7"></ul></nav>`);function _a(e,t){Le(t,!0);let n=[{id:`overview`,label:`Overview`},{id:`messages`,label:`Messages`},{id:`health`,label:`Health`}],r=[`all`,`look`,`clean`,`missing`,`draft`,`broken`];function i(e){if(e.source)return[`the one you write`];let t=[];return e.broken&&t.push(`${e.broken} ${e.broken===1?`breaks`:`break`} your site`),e.missing&&t.push(`${e.missing} missing`),e.draft&&t.push(`${e.draft} nobody has read`),t.length?t:[`all read`]}function a(e){let t=i(e);return{lead:t[0],rest:t.slice(1).join(` · `)}}function o(e){return e.source?`done`:e.broken?`broken`:e.missing?`missing`:e.draft?`draft`:`done`}var s=ga(),c=R(s);X(c,21,()=>n,e=>e.id,(e,n)=>{var r=la(),i=R(r);let a;var o=R(i),s=z(o,!0),c=B(o,2),l=e=>{var n=ca();let r;var i=z(n,!0);V(()=>{r=Jr(n,1,`bad svelte-l3e5c7`,null,r,{clean:!t.checks.bad}),J(i,t.checks.bad||`ok`)}),q(e,n)};Y(c,e=>{W(n).id===`health`&&t.checks&&e(l)}),j(i),j(r),V(()=>{a=Jr(i,1,`nav svelte-l3e5c7`,null,a,{on:t.view===W(n).id}),Z(i,`aria-current`,t.view===W(n).id?`page`:void 0),J(s,W(n).label)}),G(`click`,i,()=>t.onView(W(n).id)),q(e,r)}),j(c);var l=B(c,2);Hr(l,()=>t.actions);var u=B(l,4);X(u,21,()=>t.health,e=>e.locale,(e,n,r,i)=>{let s=P(()=>a(W(n)));var c=da(),l=R(c);let u;var d=R(l);oi(d);var f=B(d,2),p=R(f),m=R(p),h=z(B(m),!0);j(p);var g=B(p,2),_=R(g),v=z(_,!0),y=B(_),b=e=>{var t=Sr();V(()=>J(t,` · ${W(s).rest??``}`)),q(e,t)};Y(y,e=>{W(s).rest&&e(b)}),j(g),j(f),j(l);var x=B(l,2),S=e=>{var r=ua(),i=R(r),a=z(B(i),!0);j(r),V(()=>{J(i,`Mark as read `),J(a,W(n).draft)}),G(`click`,r,()=>t.onRead(W(n).locale)),q(e,r)};Y(x,e=>{!W(n).source&&W(n).draft>0&&e(S)}),j(c),V((e,t,r)=>{u=Jr(l,1,`lang svelte-l3e5c7`,null,u,{source:W(n).source}),si(d,e),d.disabled=W(n).source,J(m,`${t??``} `),J(h,W(n).locale),Z(g,`data-state`,r),J(v,W(s).lead)},[()=>t.shown.includes(W(n).locale),()=>Ai(W(n).locale),()=>o(W(n))]),G(`change`,d,()=>t.onToggle(W(n).locale)),q(e,c)}),j(u);var d=B(u,2),f=e=>{var n=fa(),r=R(n),i=z(r),a=B(r,2),o=z(a,!0);j(n),V(()=>{J(i,`${t.pending.keys.length??``} in ${t.pending.locale??``} marked as read`),J(o,ea)}),G(`click`,a,function(...e){t.onUndo?.apply(this,e)}),q(e,n)};Y(d,e=>{t.pending&&e(f)});var p=B(d,2),m=e=>{var n=ma(),r=$t(n),i=z(r,!0),a=B(r,2),o=R(a),s=z(o,!0);o.value=o.__value=``,X(B(o),17,()=>t.groups,e=>e.name,(e,t)=>{var n=pa(),r=z(n),i={};V(()=>{J(r,`${W(t).name??``} (${W(t).total??``})${W(t).broken+W(t).missing+W(t).draft>0?` · ${W(t).broken+W(t).missing+W(t).draft} to do`:``}`),i!==(i=W(t).name)&&(n.value=(n.__value=i)??``)}),q(e,n)}),j(a);var c;ei(a),V(()=>{J(i,$i.cap),Z(a,`aria-label`,$i.cap),J(s,$i.all),c!==(c=t.group??``)&&(a.value=(a.__value=c)??``,$r(a,c))}),G(`change`,a,e=>t.onGroup(e.currentTarget.value||null)),q(e,n)};Y(p,e=>{t.groups.length&&e(m)});var h=B(p,4);X(h,20,()=>r,e=>e,(e,n)=>{var r=ha(),i=R(r);let a;var o=R(i),s=z(o,!0),c=z(B(o,2),!0);j(i),j(r),V(()=>{a=Jr(i,1,`svelte-l3e5c7`,null,a,{on:t.state===n}),J(s,Zi[n]),J(c,t.counts[n]??0)}),G(`click`,i,()=>t.onState(n)),q(e,r)}),j(h),j(s),q(e,s),Re()}fr([`click`,`change`]);var va=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M5 11h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></svg>`),ya=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M6 12.5 11 7l5 5.5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11 8v7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),ba=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M4.5 12.5c1.6-2.2 3.2-2.2 4.8 0s3.2 2.2 4.8 0 3.2-2.2 4.8 0" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),xa=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M11 6v6.4" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path><circle cx="11" cy="16" r="1.2" fill="currentColor"></circle></svg>`),Sa=K(`<!> <span class="sr svelte-1fu82r1"> </span>`,1);function Ca(e,t){let n={done:`translated`,draft:`written by a machine`,missing:`not translated, shows in your source language`,broken:`breaks your site`};var r=Sa(),i=$t(r),a=e=>{q(e,va())},o=e=>{q(e,ya())},s=e=>{q(e,ba())},c=e=>{q(e,xa())};Y(i,e=>{t.state===`done`?e(a):t.state===`missing`?e(o,1):t.state===`draft`?e(s,2):e(c,-1)});var l=z(B(i,2),!0);V(()=>J(l,n[t.state])),q(e,r)}function wa(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function Ta(e,t=``,n=Object.create(null)){for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;typeof i==`string`?n[e]=i:i&&typeof i==`object`&&!Array.isArray(i)&&Ta(i,e,n)}return n}function Ea(e){let t={};for(let n of e.locales)t[n]=Ta(e.catalogs[n]??{});let n=new Map;for(let t of e.check.broken)t.severity===`error`&&n.set(`${t.locale}\u0000${t.key}`,t.issue);let r=new Map;for(let[t,n]of Object.entries(e.drafts))r.set(t,new Set(n));let i=t[e.sourceLocale]??{},a=e.locales.filter(t=>t!==e.sourceLocale),o=Object.keys(i).map(o=>({key:o,source:i[o]??``,origins:wa(e.origins,o)??[],cells:a.map(i=>{let a=wa(t[i],o)??``,s=n.get(`${i}\u0000${o}`);return{locale:i,text:a,state:s?`broken`:a?r.get(i)?.has(o)?`draft`:`done`:`missing`,issue:s,reasons:wa(e.triage?.[i],o)??[]}})}));return{root:e.root,scanning:e.scanning,sourceLocale:e.sourceLocale,locales:e.locales,rows:o,undefined:e.check.unknown??[],extra:e.check.extra??[],problems:e.problems}}function Da(e){return e.locales.map(t=>{let n=e.rows.length;if(t===e.sourceLocale)return{locale:t,source:!0,total:n,done:n,draft:0,missing:0,broken:0};let r={done:0,draft:0,missing:0,broken:0};for(let n of e.rows){let e=n.cells.find(e=>e.locale===t);e&&r[e.state]++}return{locale:t,source:!1,total:n,...r}})}function Oa(e,t){Object.assign(e,Ea(t))}function ka(e,t,n){return e.rows.length?e.locales.length<2?`oneLocale`:t.length?n.length?null:`noMatch`:`pickOne`:`noCatalogs`}function Aa(e,t){return e?t.length?null:`noFiles`:`scanOff`}function ja(e){let t=e.indexOf(`.`);return t>0?e.slice(0,t):null}function Ma(e,t){let n=new Set(t),r=new Map;for(let t of e){let e=ja(t.key);if(e===null)continue;let i=r.get(e)??{name:e,total:0,broken:0,missing:0,draft:0};i.total+=1;for(let e of t.cells)n.has(e.locale)&&e.state!==`done`&&(i[e.state]+=1);r.set(e,i)}return[...r.values()].sort((e,t)=>e.name<t.name?-1:1)}function Na(e,t){let n=t.text.trim().toLowerCase(),r=new Set(t.locales);return e.filter(e=>{let i=e.cells.filter(e=>r.has(e.locale));return t.state===`look`&&!i.some(e=>e.reasons.length)||t.state===`clean`&&i.some(e=>e.reasons.length)||t.state!==`all`&&t.state!==`look`&&t.state!==`clean`&&!i.some(e=>e.state===t.state)||t.group&&ja(e.key)!==t.group?!1:!n||e.source.toLowerCase().includes(n)?!0:i.some(e=>e.text.toLowerCase().includes(n))})}var Pa=[`broken`,`missing`,`draft`,`done`];function Fa(e){for(let t of Pa)if(e.cells.some(e=>e.state===t))return t;return`done`}function Ia(e,t,n=40){let r=t.trim().toLowerCase();if(!r)return[];let i=[];for(let t of e.rows){let a=[];t.source.toLowerCase().includes(r)&&a.push(e.sourceLocale);for(let e of t.cells)e.text.toLowerCase().includes(r)&&a.push(e.locale);if(!a.length)continue;let o=a[0],s=o===e.sourceLocale?t.source:t.cells.find(e=>e.locale===o)?.text??``;if(i.push({key:t.key,group:ja(t.key),source:t.source,locales:a,text:s,state:Fa(t)}),i.length===n)break}return i}function La(e,t){let n=t.trim(),r=e.toLowerCase().indexOf(n.toLowerCase());return r<0?[e,``,``]:[e.slice(0,r),e.slice(r,r+n.length),e.slice(r+n.length)]}function Ra(e,t){let n=[],r=[];for(let i of e)(i.cells.find(e=>e.locale===t)?.reasons.length?n:r).push(i);return{rows:[...n,...r],flagged:n.length}}function za(e,t){let n=e.cells.find(e=>e.locale===t);return n?.reasons.length?n.reasons.map(e=>e.text).join(`. `):null}var Ba=K(`<li> </li>`),Va=K(`<ul class="files svelte-1dg5efm"></ul>`),Ha=K(`<div class="menu svelte-1dg5efm" role="menu" tabindex="-1"><button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="m9 7-5 5 5 5"></path><path d="m15 7 5 5-5 5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Z"></path><path d="M14 3v5h5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M20 15a2 2 0 0 1-2 2H8l-4 3V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z"></path></svg> </button> <div class="msep svelte-1dg5efm"></div> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><circle cx="12" cy="12" r="8"></circle><path d="M12 7.5V12l3 1.8"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 5h5v5"></path><path d="m19 5-8 8"></path><path d="M18 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h4"></path></svg> <i class="svelte-1dg5efm"> </i></button> <!></div>`);function Ua(e,t){Le(t,!0);let n=I(void 0),r=I(Ht({top:-9999,left:-9999})),i=I(null),a=I(!1),o=P(()=>Aa(t.scanning,t.row.origins)),s=P(()=>W(i)===null?Q.reading:W(i).commit?W(i).commit.sha:Q[W(i).reason??`nogit`]);function c(){let e=t.anchor.getBoundingClientRect(),i=W(n)?.offsetHeight??0,a=e.bottom+6,o=a+i>window.innerHeight?Math.max(8,e.top-i-6):a,s=Math.min(Math.max(8,e.right-308),window.innerWidth-308-8);L(r,{top:o,left:s},!0)}function l(e){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.cssText=`position:fixed;top:-1000px;opacity:0`,document.body.append(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return t.remove(),n}async function u(e,n){let r=!1;try{await navigator.clipboard.writeText(e),r=!0}catch{r=l(e)}t.onNote(r?n:Q.noClipboard),t.onClose(),t.anchor.focus()}function d(){return[...W(n)?.querySelectorAll(`[role="menuitem"]`)??[]]}function f(e){if(e.key===`Escape`||e.key===`Tab`){t.onClose(),t.anchor.focus();return}let n=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let r=d();r[(r.indexOf(document.activeElement)+n+r.length)%r.length]?.focus()}async function p(){L(a,!W(a)),await tr(),c()}gi(()=>{let e=!0;c(),d()[0]?.focus(),t.onCommit(t.row.key).then(n=>{e&&L(i,n??{key:t.row.key,commit:null,reason:`nogit`},!0)});let n=()=>t.onClose();return window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{e=!1,window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}});function m(e){let r=e.target;!W(n)?.contains(r)&&!t.anchor.contains(r)&&t.onClose()}var h=Ha();dr(`pointerdown`,Gt,m);var g=R(h),_=B(R(g)),v=z(B(_),!0);j(g);var y=B(g,2),b=B(R(y)),x=z(B(b),!0);j(y);var S=B(y,2),ee=B(R(S));j(S);var C=B(S,4),w=B(R(C)),te=z(B(w),!0);j(C);var T=B(C,2),ne=B(R(T)),re=z(B(ne),!0);j(T);var ie=B(T,2),ae=e=>{var n=Va();X(n,20,()=>t.row.origins,e=>e,(e,t)=>{var n=Ba(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(n),q(e,n)};Y(ie,e=>{W(a)&&W(o)===null&&e(ae)}),j(h),hi(h,e=>L(n,e),()=>W(n)),V(e=>{Z(h,`aria-label`,Q.open),Xr(h,`top:${W(r).top??``}px;left:${W(r).left??``}px`),Z(g,`aria-disabled`,t.locale===null),J(_,` ${Q.edit??``}`),J(v,t.locale??``),J(b,` ${Q.copyKey??``}`),J(x,t.row.key),J(ee,` ${Q.copySource??``}`),Z(C,`aria-disabled`,!W(i)?.commit),Z(C,`title`,e),J(w,` ${Q.commit??``}`),J(te,W(s)),Z(T,`aria-disabled`,W(o)!==null),Z(T,`aria-expanded`,W(o)===null?W(a):void 0),J(ne,` ${Q.origins??``}`),J(re,W(o)?Q[W(o)]:t.row.origins.length>1?`${t.row.origins[0]} +${t.row.origins.length-1}`:t.row.origins[0])},[()=>W(i)?.commit?`${W(i).commit.subject} · ${W(i).commit.author} · ${W(i).commit.date.slice(0,10)}`:void 0]),G(`keydown`,h,f),G(`click`,g,()=>t.locale===null?t.onNote(Q.nothingToEdit):t.onEdit()),G(`click`,y,()=>u(t.row.key,Q.copiedKey)),G(`click`,S,()=>u(t.row.source,Q.copiedSource)),G(`click`,C,()=>W(i)?.commit&&u(W(i).commit.sha,Q.copiedSha)),G(`click`,T,()=>W(o)===null&&p()),q(e,h),Re()}fr([`keydown`,`click`]);function Wa(e,t){for(let n of e)if(n.kind===`param`&&n.name){t.has(n.name)||t.set(n.name,new Set);for(let[e,r]of n.variants??[])t.get(n.name).add(e),Wa(r,t)}}function Ga(e){let t=new Map;try{Wa(Li(e,Ni),t)}catch{}return t}function Ka(e,t){for(let n of e)typeof n!=`string`&&(t.push(n.name),Ka(n.children,t))}function qa(e){let t=[];try{Ka(Yi(e),t)}catch{return t}return t}function Ja(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return t}var Ya=e=>e.length===1?e[0]:`${e.slice(0,-1).join(`, `)} and ${e.at(-1)}`;function Xa(e,t){let n=Ga(e),r=Ga(t),i=[...new Set([...n.keys(),...r.keys()])].sort().map(e=>({name:e,inSource:n.has(e),inTarget:r.has(e)})),a=[],o=i.filter(e=>e.inSource&&!e.inTarget).map(e=>`{${e.name}}`),s=i.filter(e=>!e.inSource&&e.inTarget).map(e=>`{${e.name}}`);o.length&&a.push(`${Ya(o)} is missing, so its value never reaches the text`),s.length&&a.push(`${Ya(s)} is not in the source, so it renders as literal text`);for(let[e,t]of r)t.size&&!t.has(`other`)&&a.push(`the block for {${e}} has no "other" case, so some counts render empty`);let c=Ja(qa(e)),l=Ja(qa(t));for(let[e,t]of c)(l.get(e)??0)<t&&a.push(`<${e}> is missing from the translation`);for(let[e,t]of l)(c.get(e)??0)<t&&a.push(`<${e}> is not in the source message`);return{params:i,problems:a}}var Za=K(`<span class="ojo svelte-2clsr"> </span>`),Qa=K(`<span class="rmark svelte-2clsr"><!></span>`),$a=K(`<span class="tile svelte-2clsr"><!></span>`),eo=K(`<span> </span>`),to=K(`<span class="vmsg svelte-2clsr"> </span>`),no=K(`<span class="tl edit svelte-2clsr"><span class="disc svelte-2clsr"> </span> <textarea class="tf svelte-2clsr" rows="2"></textarea></span> <span class="editbar svelte-2clsr"><!> <!> <!> <button class="btn sm svelte-2clsr"> </button> <button class="btn sm quiet svelte-2clsr">Cancel</button> <span class="keys svelte-2clsr">Enter saves · Esc closes</span></span>`,1),ro=K(`<button class="tv svelte-2clsr"> </button>`),io=K(`<button class="tv none svelte-2clsr"> </button>`),ao=K(`<span class="sig svelte-2clsr"> </span>`),oo=K(`<span class="tl svelte-2clsr"><span class="disc svelte-2clsr"> </span> <!> <!></span>`),so=K(`<span class="why svelte-2clsr"> </span>`),co=K(`<article><!> <span class="row-t svelte-2clsr"><span class="src svelte-2clsr"> </span> <!></span> <!> <span><button class="ga svelte-2clsr" aria-haspopup="menu"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><circle cx="5.5" cy="12" r="1.4"></circle><circle cx="12" cy="12" r="1.4"></circle><circle cx="18.5" cy="12" r="1.4"></circle></svg></button></span></article> <!>`,1);function lo(e,t){Le(t,!0);let n=I(void 0),r=P(()=>t.why!==void 0),i=P(()=>t.row.cells.filter(e=>t.shown.includes(e.locale))),a=P(()=>[`broken`,`missing`,`draft`,`done`].find(e=>W(i).some(t=>t.state===e))??`done`),o=I(``),s=I(!1),c=I(null),l=P(()=>Xa(t.row.source,W(o))),u=e=>`${e.locale} ${t.row.key}`;function d(e){L(o,e.text,!0),L(c,null),t.onEdit(u(e))}async function f(e){W(s)||(L(s,!0),L(c,await t.onSave(e.locale,t.row.key,W(o)),!0),L(s,!1),W(c)||t.onEdit(null))}function p(e,n){e.key===`Escape`&&t.onEdit(null),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),f(n))}var m=co(),h=$t(m);let g;var _=R(h),v=e=>{var n=Qa(),r=R(n),i=e=>{var t=Za(),n=z(t,!0);V(()=>J(n,$.mark)),q(e,t)};Y(r,e=>{t.why&&e(i)}),j(n),q(e,n)},y=e=>{var t=$a();Ca(R(t),{get state(){return W(a)}}),j(t),V(()=>Z(t,`data-state`,W(a))),q(e,t)};Y(_,e=>{W(r)?e(v):e(y,-1)});var b=B(_,2),x=R(b),S=z(x,!0);X(B(x,2),17,()=>W(i),e=>e.locale,(e,n)=>{var i=Cr(),a=$t(i),m=e=>{var r=no(),i=$t(r),a=R(i),u=z(a,!0),d=B(a,2);Ye(d),Je(d,!0),j(i);var m=B(i,2),h=R(m);X(h,17,()=>W(l).params,e=>e.name,(e,t)=>{var n=eo();let r;var i=z(n);V(()=>{r=Jr(n,1,`pm svelte-2clsr`,null,r,{gone:W(t).inSource&&!W(t).inTarget}),J(i,`${W(t).inSource&&!W(t).inTarget?`+`:``}{${W(t).name??``}}`)}),q(e,n)});var g=B(h,2);X(g,16,()=>W(l).problems,e=>e,(e,t)=>{var n=to(),r=z(n,!0);V(()=>J(r,t)),q(e,n)});var _=B(g,2),v=e=>{var t=to(),n=z(t,!0);V(()=>J(n,W(c))),q(e,t)};Y(_,e=>{W(c)&&!W(l).problems.length&&e(v)});var y=B(_,2),b=z(y,!0),x=B(y,2);ye(2),j(m),V(()=>{Z(a,`data-state`,W(n).state),J(u,W(n).locale),Z(d,`aria-label`,`Translation for ${W(n).locale??``}`),y.disabled=W(s),J(b,W(s)?`Saving`:`Save`)}),G(`keydown`,d,e=>p(e,W(n))),di(d,()=>W(o),e=>L(o,e)),G(`click`,y,()=>f(W(n))),G(`click`,x,()=>t.onEdit(null)),q(e,r)},h=P(()=>t.editing===u(W(n))),g=e=>{var t=oo(),i=R(t),a=z(i,!0),o=B(i,2),s=e=>{var t=ro(),r=z(t,!0);V(()=>{Z(t,`title`,W(n).text),J(r,W(n).text)}),G(`click`,t,()=>d(W(n))),q(e,t)},c=e=>{var t=io(),r=z(t,!0);V(()=>J(r,Xi.missing.long)),G(`click`,t,()=>d(W(n))),q(e,t)};Y(o,e=>{W(n).text?e(s):e(c,-1)});var l=B(o,2),u=e=>{var t=Cr();X($t(t),17,()=>W(n).reasons,e=>e.signal,(e,t)=>{var n=ao(),r=z(n,!0);V(()=>{Z(n,`title`,W(t).text),J(r,Qi[W(t).signal]??W(t).signal)}),q(e,n)}),q(e,t)};Y(l,e=>{W(r)||e(u)}),j(t),V(()=>{Z(i,`data-state`,W(n).state),J(a,W(n).locale)}),q(e,t)};Y(a,e=>{W(h)?e(m):e(g,-1)}),q(e,i)}),j(b);var ee=B(b,2),C=e=>{var n=so(),r=z(n,!0);V(()=>J(r,t.why??``)),q(e,n)};Y(ee,e=>{W(r)&&e(C)});var w=B(ee,2);let te;var T=R(w);hi(T,e=>L(n,e),()=>W(n)),j(w),j(h);var ne=B(h,2),re=e=>{{let r=P(()=>W(i)[0]?.locale??null);Ua(e,{get row(){return t.row},get locale(){return W(r)},get scanning(){return t.scanning},get anchor(){return W(n)},get onNote(){return t.onNote},get onCommit(){return t.onCommit},onEdit:()=>{t.onMenu(!1),W(i)[0]&&d(W(i)[0])},onClose:()=>t.onMenu(!1)})}};Y(ne,e=>{t.menu&&W(n)&&e(re)}),V(e=>{g=Jr(h,1,`row svelte-2clsr`,null,g,{open:e,flagged:W(r)&&!!t.why}),Z(h,`data-worst`,W(a)),Z(h,`data-key`,t.row.key),J(S,t.row.source),te=Jr(w,1,`row-go svelte-2clsr`,null,te,{held:t.menu}),Z(T,`aria-expanded`,t.menu),Z(T,`aria-label`,Q.open)},[()=>W(i).some(e=>t.editing===u(e))]),G(`click`,T,()=>t.onMenu(!t.menu)),q(e,m),Re()}fr([`keydown`,`click`]);var uo=K(`<button> <b class="svelte-1u5fzi5"> </b></button>`),fo=K(`<header class="langbar svelte-1u5fzi5"><div class="text svelte-1u5fzi5"><h2 class="svelte-1u5fzi5"> </h2> <p class="live svelte-1u5fzi5"><span class="disc svelte-1u5fzi5"> </span> <b class="svelte-1u5fzi5"> </b></p> <p class="why svelte-1u5fzi5"> </p></div> <div class="go svelte-1u5fzi5"><button class="btn svelte-1u5fzi5"> </button> <span class="sub svelte-1u5fzi5"> </span></div></header> <div class="chips svelte-1u5fzi5"></div>`,1);function po(e,t){Le(t,!0);let n=P(()=>Ai(t.locale)),r=P(()=>[t.unread>0?$.written(t.unread):$.nothingUnread,t.broken>0?$.broken(t.broken):$.sound,t.flagged>0?$.flagged(t.flagged):$.clean].join(` `)),i=P(()=>[{id:`all`,label:$.chipAll,n:t.total},{id:`look`,label:$.chipLook,n:t.flagged},{id:`clean`,label:$.chipClean,n:t.total-t.flagged}]);var a=fo(),o=$t(a),s=R(o),c=R(s),l=z(c,!0),u=B(c,2),d=R(u),f=z(d,!0),p=B(d),m=z(B(p),!0);j(u);var h=z(B(u,2),!0);j(s);var g=B(s,2),_=R(g),v=z(_,!0),y=z(B(_,2),!0);j(g),j(o);var b=B(o,2);X(b,21,()=>W(i),e=>e.id,(e,n)=>{var r=uo();let i;var a=R(r),o=z(B(a),!0);j(r),V(()=>{i=Jr(r,1,`pill svelte-1u5fzi5`,null,i,{on:t.chip===W(n).id,look:W(n).id===`look`}),Z(r,`aria-pressed`,t.chip===W(n).id),J(a,`${W(n).label??``} `),J(o,W(n).n)}),G(`click`,r,()=>t.onChip(W(n).id)),q(e,r)}),j(b),V((e,i,a)=>{J(l,W(n)),J(f,t.locale),J(p,`${e??``}. `),J(m,$.live),J(h,W(r)),_.disabled=t.unread===0,J(v,i),J(y,a)},[()=>ra(t.total),()=>$.approve(W(n)),()=>t.unread>0?$.approveSub(t.unread):$.nothingUnread]),G(`click`,_,function(...e){t.onApprove?.apply(this,e)}),q(e,a),Re()}fr([`click`]);var mo=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <p class="why svelte-a18sfu"> </p> <div class="pair svelte-a18sfu"><button class="go svelte-a18sfu"> </button> <button class="plain svelte-a18sfu"> </button></div></div>`),ho=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <div class="track svelte-a18sfu"><span class="fill svelte-a18sfu"></span></div> <p class="why svelte-a18sfu"> </p></div>`),go=K(`<button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button> <button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button>`,1),_o=K(`<p> </p>`),vo=K(`<section class="acts svelte-a18sfu" aria-label="Commands"><h2 class="cap svelte-a18sfu">Commands</h2> <!> <!></section>`);function yo(e,t){Le(t,!0);let n=I(Ht({at:`idle`})),r=P(()=>W(n).at===`finding`||W(n).at===`planning`||W(n).at===`running`);function i(e,t=!1){L(n,{at:`said`,text:e,bad:t},!0)}async function a(){L(n,{at:`finding`},!0);let e=await t.api.extract();if(e.error||!e.value)return i(e.error??`no answer`,!0);let{found:r}=e.value;if(!r)return i(ta.nothingNew);let a=`${ra(r)} your code uses and your catalogs did not have`;await t.onDone(a),i(a)}async function o(){L(n,{at:`planning`},!0);let e=await t.api.plan(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);if(!e.value.total)return i(ta.nothingMissing);L(n,{at:`plan`,plan:e.value},!0)}async function s(e){let r=await t.api.job(e);if(r.error||!r.value)return i(r.error??`no answer`,!0);let a=r.value;if(a.state===`running`){L(n,{at:`running`,job:a},!0);return}let o=`${ra(a.written??a.done)} translated, unread until you read them`,s=a.kept?`${o}. ${ta.kept(a.kept)}`:o;await t.onDone(s),i(a.state===`failed`?a.message??`the run failed`:s,a.state===`failed`)}async function c(){let e=await t.api.translate(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);L(n,{at:`running`,job:e.value},!0)}gi(()=>{t.api.job().then(e=>{e.value&&W(n).at===`idle`&&L(n,{at:`running`,job:e.value},!0)})}),fn(()=>{if(W(n).at!==`running`)return;let e=W(n).job.id,t=setInterval(()=>void s(e),1e3);return()=>clearInterval(t)});let l=P(()=>t.targets?t.shown.length?ta.translateWhy:ta.pickFirst:ta.onlyLocale),u=P(()=>W(n).at===`running`&&W(n).job.total?W(n).job.done/W(n).job.total:0);var d=vo(),f=B(R(d),2),p=e=>{var t=mo(),r=R(t),i=z(r),a=B(r,2),o=z(a,!0),s=B(a,2),l=R(s),u=z(l,!0),d=B(l,2),f=z(d,!0);j(s),j(t),V((e,t)=>{J(i,`${e??``} in ${t??``}`),J(o,ta.translateWhy),J(u,ta.translate),J(f,ta.cancel)},[()=>ra(W(n).plan.total),()=>Object.keys(W(n).plan.pending).join(`, `)]),G(`click`,l,c),G(`click`,d,()=>L(n,{at:`idle`},!0)),q(e,t)},m=e=>{var t=ho(),r=R(t),i=z(r),a=B(r,2),o=z(a),s=z(B(a,2));j(t),V(e=>{J(i,`${ta.running??``} ${W(n).job.locale??``??``}`),Xr(o,`width: ${e??``}%`),J(s,`${W(n).job.done??``} of ${W(n).job.total??``}`)},[()=>Math.round(W(u)*100)]),q(e,t)},h=e=>{var i=go(),s=$t(i),c=R(s),u=z(c,!0),d=z(B(c,2),!0);j(s);var f=B(s,2),p=R(f),m=z(p,!0),h=z(B(p,2),!0);j(f),V(()=>{s.disabled=W(r)||!t.scanning,J(u,W(n).at===`finding`?ta.working:ta.find),J(d,t.scanning?ta.findWhy:ta.scanOff),f.disabled=W(r)||!t.shown.length,J(m,ta.translate),J(h,W(l))}),G(`click`,s,a),G(`click`,f,o),q(e,i)};Y(f,e=>{W(n).at===`plan`?e(p):W(n).at===`running`?e(m,1):e(h,-1)});var g=B(f,2),_=e=>{var t=_o();let r;var i=z(t,!0);V(()=>{r=Jr(t,1,`said svelte-a18sfu`,null,r,{bad:W(n).bad}),J(i,W(n).text)}),q(e,t)};Y(g,e=>{W(n).at===`said`&&e(_)}),j(d),q(e,d),Re()}fr([`click`]);var bo=K(`<h2 class="svelte-1qmtve8"> </h2>`),xo=K(`<h2 class="svelte-1qmtve8"> </h2> <p class="svelte-1qmtve8"> </p>`,1),So=K(`<code class="keys svelte-1qmtve8"> </code>`),Co=K(`<button class="svelte-1qmtve8"> </button>`),wo=K(`<div class="job svelte-1qmtve8"><span class="tile svelte-1qmtve8"><!></span> <span class="what svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <span class="svelte-1qmtve8"> </span> <!></span> <!></div>`),To=K(`<p class="empty svelte-1qmtve8">…</p>`),Eo=K(`<p class="empty svelte-1qmtve8"> </p>`),Do=K(`<p class="commit svelte-1qmtve8"><code class="svelte-1qmtve8"> </code> <span class="svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><span class="svelte-1qmtve8"> </span></span></p>`),Oo=K(`<main class="overview svelte-1qmtve8"><header class="svelte-1qmtve8"><span class="chip svelte-1qmtve8"> </span> <!></header> <div class="cols svelte-1qmtve8"><section class="jobs svelte-1qmtve8" aria-label="What needs you"></section> <aside class="side svelte-1qmtve8"><div class="card svelte-1qmtve8"><button class="ring svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <strong class="svelte-1qmtve8"> </strong> <span class="svelte-1qmtve8"> </span></button> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p></div> <div class="card svelte-1qmtve8"><p class="head svelte-1qmtve8"> </p> <!></div></aside></div></main>`);function ko(e,t){Le(t,!0);let n={broken:`broken`,missing:`missing`,draft:`draft`,undefined:`broken`,extra:`missing`},r=new Set([`undefined`,`extra`]),i=P(()=>t.health.filter(e=>!e.source)),a=P(()=>{let e=e=>W(i).reduce((t,n)=>t+e(n),0);return[{id:`broken`,n:e(e=>e.broken)},{id:`missing`,n:e(e=>e.missing)},{id:`draft`,n:e(e=>e.draft)},{id:`undefined`,n:t.undefinedKeys.length},{id:`extra`,n:t.extraKeys.length}].filter(e=>e.n>0)}),o=P(()=>W(a).reduce((e,t)=>e+t.n,0)),s=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});function c(e){let t=Math.round((Date.parse(e)-Date.now())/864e5);return t>-1?s.format(0,`day`):t>-31?s.format(t,`day`):s.format(Math.round(t/30),`month`)}var l=Oo(),u=R(l),d=R(u),f=z(d,!0),p=B(d,2),m=e=>{var t=bo(),n=z(t);V(()=>J(n,`${W(o)??``} ${W(o)===1?`thing is`:`things are`} waiting for you.`)),q(e,t)},h=e=>{var t=xo(),n=$t(t),r=z(n,!0),i=z(B(n,2),!0);V(()=>{J(r,oa.clear),J(i,oa.clearWhy)}),q(e,t)};Y(p,e=>{W(o)>0?e(m):e(h,-1)}),j(u);var g=B(u,2),_=R(g);X(_,21,()=>W(a),e=>e.id,(e,i)=>{var a=wo(),o=R(a);Ca(R(o),{get state(){return n[W(i).id]}}),j(o);var s=B(o,2),c=R(s),l=z(c),u=B(c,2),d=z(u,!0),f=B(u,2),p=e=>{var n=So(),r=z(n,!0);V(e=>J(r,e),[()=>t.undefinedKeys.slice(0,3).map(e=>e.key).join(` · `)]),q(e,n)},m=e=>{var n=So(),r=z(n,!0);V(e=>J(r,e),[()=>t.extraKeys.slice(0,3).map(e=>`${e.key} (${e.locale})`).join(` · `)]),q(e,n)};Y(f,e=>{W(i).id===`undefined`?e(p):W(i).id===`extra`&&e(m,1)}),j(s);var h=B(s,2),g=e=>{var n=Co(),r=z(n,!0);V(()=>J(r,oa.open)),G(`click`,n,()=>t.onFilter(W(i).id)),q(e,n)},_=P(()=>!r.has(W(i).id));Y(h,e=>{W(_)&&e(g)}),j(a),V(()=>{Z(o,`data-state`,n[W(i).id]),J(l,`${W(i).n??``} ${(W(i).n===1?ia[W(i).id].one:ia[W(i).id].many)??``}`),J(d,aa[W(i).id])}),q(e,a)}),j(_);var v=B(_,2),y=R(v),b=R(y),x=R(b),S=z(x,!0),ee=B(x,2),C=z(ee,!0),w=z(B(ee,2),!0);j(b);var te=B(b,2),T=R(te),ne=z(T,!0),re=z(B(T),!0);j(te);var ie=B(te,2),ae=R(ie),oe=z(ae,!0),se=z(B(ae),!0);j(ie),j(y);var ce=B(y,2),le=R(ce),E=z(le,!0),ue=B(le,2),de=e=>{q(e,To())},D=e=>{var t=Eo(),n=z(t,!0);V(()=>J(n,oa.noHistory)),q(e,t)},fe=e=>{var n=Cr();X($t(n),17,()=>t.commits,e=>e.sha,(e,t)=>{var n=Do(),r=R(n),i=z(r,!0),a=B(r,2),o=R(a),s=z(o,!0),l=z(B(o));j(a),j(n),V(e=>{J(i,W(t).sha),J(s,W(t).subject),J(l,`${W(t).author??``} · ${e??``}`)},[()=>c(W(t).date)]),q(e,n)}),q(e,n)};Y(ue,e=>{t.commits===null?e(de):t.commits.length===0?e(D,1):e(fe,-1)}),j(ce),j(v),j(g),j(l),V(()=>{J(f,oa.here),b.disabled=!t.checks,J(S,oa.project),J(C,t.checks&&t.checks.ok===t.checks.total?oa.healthy:oa.problems),J(w,t.checks?`${t.checks.ok} of ${t.checks.total} ${oa.checks}`:`…`),J(ne,oa.countMessages),J(re,t.total),J(oe,oa.countLocales),J(se,t.locales.length),J(E,oa.history)}),G(`click`,b,function(...e){t.onHealth?.apply(this,e)}),q(e,l),Re()}fr([`click`]);var Ao=K(`<p class="none svelte-1xn1b0j"> </p>`),jo=K(`<span class="group svelte-1xn1b0j"> </span>`),Mo=K(`<span class="src svelte-1xn1b0j"> </span>`),No=K(`<b class="disc svelte-1xn1b0j"> </b>`),Po=K(`<li><button><span class="tile svelte-1xn1b0j"><!></span> <span class="what svelte-1xn1b0j"><span class="found svelte-1xn1b0j"> <mark class="svelte-1xn1b0j"> </mark> </span> <!> <!></span> <span class="where svelte-1xn1b0j"></span></button></li>`),Fo=K(`<ul class="svelte-1xn1b0j"></ul>`),Io=K(`<div class="sheet svelte-1xn1b0j" role="dialog"><p class="head svelte-1xn1b0j"><span> </span> <b class="svelte-1xn1b0j"> </b></p> <!> <p class="keys svelte-1xn1b0j"><kbd class="svelte-1xn1b0j">↑</kbd><kbd class="svelte-1xn1b0j">↓</kbd> <kbd class="svelte-1xn1b0j">enter</kbd> <kbd class="svelte-1xn1b0j">esc</kbd> <button class="close svelte-1xn1b0j"> </button></p></div>`);function Lo(e,t){Le(t,!0);let n=I(0);fn(()=>{t.query,L(n,0)});function r(e){t.hits.length&&L(n,(W(n)+e+t.hits.length)%t.hits.length)}function i(){let e=t.hits[W(n)];e&&t.onPick(e.key)}var a={move:r,choose:i},o=Io(),s=R(o),c=R(s),l=z(c,!0),u=z(B(c,2),!0);j(s);var d=B(s,2),f=e=>{var t=Ao(),n=z(t,!0);V(()=>J(n,sa.none)),q(e,t)},p=e=>{var r=Fo();X(r,23,()=>t.hits,e=>e.key,(e,r,i)=>{let a=P(()=>La(W(r).text,t.query));var o=Po(),s=R(o);let c;var l=R(s);Ca(R(l),{get state(){return W(r).state}}),j(l);var u=B(l,2),d=R(u),f=R(d,!0),p=B(f),m=z(p,!0),h=B(p,1,!0);j(d);var g=B(d,2),_=e=>{var t=jo(),n=z(t,!0);V(()=>J(n,W(r).group)),q(e,t)};Y(g,e=>{W(r).group&&e(_)});var v=B(g,2),y=e=>{var t=Mo(),n=z(t,!0);V(()=>J(n,W(r).source)),q(e,t)},b=P(()=>!W(r).locales.includes(t.sourceLocale));Y(v,e=>{W(b)&&e(y)}),j(u);var x=B(u,2);X(x,20,()=>W(r).locales,e=>e,(e,t)=>{var n=No(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(x),j(s),j(o),V(()=>{c=Jr(s,1,`hit svelte-1xn1b0j`,null,c,{on:W(i)===W(n)}),Z(l,`data-state`,W(r).state),J(f,W(a)[0]),J(m,W(a)[1]),J(h,W(a)[2])}),G(`click`,s,()=>t.onPick(W(r).key)),q(e,o)}),j(r),q(e,r)};Y(d,e=>{t.hits.length===0?e(f):e(p,-1)});var m=B(d,2),h=B(R(m),2),g=B(h,2),_=B(g,2),v=B(_),y=z(v,!0);return j(m),j(o),V(e=>{Z(o,`aria-label`,sa.label),J(l,sa.scope),J(u,e),J(h,`${sa.moveKeys??``} `),J(g,`${sa.openKeys??``} `),J(_,`${sa.closeKeys??``} `),J(y,sa.close)},[()=>t.hits.length===1?sa.oneHit:sa.hits(t.hits.length)]),G(`click`,v,function(...e){t.onClose?.apply(this,e)}),q(e,o),Re(a)}fr([`click`]);var Ro=K(`<li><code> </code> </li>`),zo=K(`<ul class="problems svelte-1xn7ig5"></ul>`),Bo=K(`<p class="note svelte-1xn7ig5"> </p>`),Vo=K(`<!> <!>`,1),Ho=K(`<div class="lens svelte-1xn7ig5"><!> <main class="table svelte-1xn7ig5"><!></main></div>`),Uo=K(`Saved in <code> </code>`,1),Wo=K(`<p class="snack svelte-1xn7ig5" role="status"><svg viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1xn7ig5"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg> <!> <button class="svelte-1xn7ig5">Dismiss</button></p>`),Go=K(`<div class="shell svelte-1xn7ig5"><header class="bar svelte-1xn7ig5"><span class="brand svelte-1xn7ig5">verbaly <b class="svelte-1xn7ig5">studio</b></span> <input class="search svelte-1xn7ig5" type="search"/> <span class="root svelte-1xn7ig5"> </span></header> <!> <!> <div class="body svelte-1xn7ig5"><!> <!></div> <!></div>`);function Ko(e,t){Le(t,!0);let n=I(null),r=I(null),i=I(null),a=I(`overview`),o=I(null),s=I(null),c=I(null),l=new Map;async function u(e){let n=l.get(e);if(n)return n;let i=await t.api.commit(e);return i.error||!i.value?(L(r,{text:i.error??`[verbaly] the server sent no answer`,file:``},!0),null):(l.set(e,i.value),i.value)}function d(e){e===`health`?f():L(a,e,!0)}async function f(){L(a,`health`);let e=await t.api.health();e.error?L(r,{text:e.error,file:``},!0):e.value&&L(o,e.value,!0)}fn(()=>{t.api.health().then(e=>{e.value&&L(o,e.value,!0)}),t.api.history().then(e=>{L(s,e.value?.commits??[],!0)})});function p(e){L(y,W(x),!0),L(_,e,!0),L(a,`messages`)}async function m(e){let a=await t.api.state();if(a.error||!a.value){L(r,{text:a.error??`[verbaly] the server sent no state`,file:``},!0);return}L(n,null),L(i,null),L(c,null),l.clear(),Oa(t.panel,a.value),L(r,{text:e,file:``},!0);let s=await t.api.health();s.value&&L(o,s.value,!0)}async function h(e,n,a){let o=await t.api.setRead(e,n,a);if(o.error){L(r,{text:o.error,file:``},!0);return}let s=new Set(o.value?.keys??[]);for(let n of t.panel.rows){if(!s.has(n.key))continue;let t=n.cells.find(t=>t.locale===e);t?.text&&(t.state=a?`draft`:`done`)}L(i,a?null:{locale:e,keys:o.value?.keys??[]},!0)}async function g(e,n,i){let a=await t.api.save(e,n,i);if(a.error)return a.error;let o=t.panel.rows.find(e=>e.key===n)?.cells.find(t=>t.locale===e);return o&&(o.text=i,o.state=i?`done`:`missing`,o.issue=void 0),L(r,{text:i,file:`${e}.json`},!0),null}let _=I(`all`),v=I(``),y=I(null),b=I(null),x=P(()=>t.panel.locales.filter(e=>e!==t.panel.sourceLocale)),S=P(()=>W(y)??W(x).slice(0,1)),ee=P(()=>Da(t.panel)),C=P(()=>W(S).length===1?W(S)[0]:null),w=P(()=>W(C)?W(ee).find(e=>e.locale===W(C)):void 0),te=P(()=>W(C)?t.panel.rows.filter(e=>za(e,W(C))!==null).length:0),T=P(()=>W(_)===`look`?`look`:W(_)===`clean`?`clean`:W(_)===`all`?`all`:null),ne=P(()=>Ia(t.panel,W(v))),re=I(void 0),ie=I(void 0),ae=I(null),oe=P(()=>Ma(t.panel.rows,W(S))),se=P(()=>{let e=Na(t.panel.rows,{text:``,state:W(_),locales:W(S),group:W(b)});return W(C)?Ra(e,W(C)).rows:e}),ce=P(()=>ka(t.panel,W(S),W(se))),le=P(()=>{let e={all:0,look:0,clean:0,missing:0,draft:0,broken:0};for(let n of[`all`,`look`,`clean`,`missing`,`draft`,`broken`])e[n]=Na(t.panel.rows,{text:``,state:n,locales:W(S),group:W(b)}).length;return e}),E=I(60);fn(()=>{W(_),W(S),W(b),L(E,60)});function ue(e){L(v,``),L(_,`all`),L(b,null),L(y,W(x),!0),L(a,`messages`),L(ae,e,!0)}fn(()=>{if(!W(ae))return;let e=W(ae),t=W(se).findIndex(t=>t.key===e);t<0?L(ae,null):t+1>W(E)?L(E,t+1):(L(ae,null),tr().then(()=>{document.querySelector(`[data-key="${CSS.escape(e)}"]`)?.scrollIntoView({block:`center`})}))});function de(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`?(e.preventDefault(),W(ie)?.focus(),W(ie)?.select()):W(v)&&(e.key===`Escape`?(L(v,``),W(ie)?.blur()):e.key===`ArrowDown`?(e.preventDefault(),W(re)?.move(1)):e.key===`ArrowUp`?(e.preventDefault(),W(re)?.move(-1)):e.key===`Enter`&&(e.preventDefault(),W(re)?.choose()))}function D(e){let t=e.currentTarget;t.scrollTop+t.clientHeight>t.scrollHeight-600&&W(E)<W(se).length&&L(E,W(E)+60)}function fe(e){L(y,W(S).includes(e)?W(S).filter(t=>t!==e):[...W(S),e],!0)}var pe=Go();dr(`keydown`,Gt,de);var me=R(pe),he=B(R(me),2);oi(he),hi(he,e=>L(ie,e),()=>W(ie));var ge=B(he,2),O=z(ge,!0);j(me);var _e=B(me,2),k=e=>{var n=zo();X(n,21,()=>t.panel.problems,e=>e.scope+e.message,(e,t)=>{var n=Ro(),r=R(n),i=z(r,!0),a=B(r);j(n),V(()=>{J(i,W(t).scope),J(a,` ${W(t).message??``}`)}),q(e,n)}),j(n),q(e,n)};Y(_e,e=>{t.panel.problems.length&&e(k)});var A=B(_e,2),ve=e=>{hi(Lo(e,{get query(){return W(v)},get hits(){return W(ne)},get sourceLocale(){return t.panel.sourceLocale},onPick:ue,onClose:()=>L(v,``)}),e=>L(re,e,!0),()=>W(re))};Y(A,e=>{W(v)&&e(ve)});var ye=B(A,2),be=R(ye);{let e=e=>{yo(e,{get api(){return t.api},get scanning(){return t.panel.scanning},get targets(){return W(x).length},get shown(){return W(S)},onDone:m})},n=P(()=>W(o)?{bad:W(o).entries.filter(e=>e.level!==`ok`).length}:null);_a(be,{get health(){return W(ee)},get shown(){return W(S)},get state(){return W(_)},get counts(){return W(le)},get pending(){return W(i)},get checks(){return W(n)},onToggle:fe,onState:e=>L(_,e,!0),onRead:e=>h(e,void 0,!1),onUndo:()=>W(i)&&h(W(i).locale,W(i).keys,!0),get view(){return W(a)},onView:d,get groups(){return W(oe)},get group(){return W(b)},onGroup:e=>L(b,e,!0),actions:e,$$slots:{actions:!0}})}var xe=B(be,2),Se=e=>{{let n=P(()=>W(o)?{ok:W(o).entries.filter(e=>e.level===`ok`).length,total:W(o).entries.length}:null);ko(e,{get health(){return W(ee)},get undefinedKeys(){return t.panel.undefined},get extraKeys(){return t.panel.extra},get locales(){return t.panel.locales},get total(){return t.panel.rows.length},get checks(){return W(n)},get commits(){return W(s)},onFilter:p,onHealth:f})}},Ce=e=>{{let t=P(()=>W(o)?.entries??[]),n=P(()=>W(o)?.ok??!0);Ci(e,{get entries(){return W(t)},get ok(){return W(n)},onClose:()=>L(a,`overview`)})}},we=e=>{var i=Ho(),a=R(i),o=e=>{po(e,{get locale(){return W(C)},get total(){return t.panel.rows.length},get unread(){return W(w).draft},get broken(){return W(w).broken},get flagged(){return W(te)},get chip(){return W(T)},onChip:e=>L(_,e,!0),onApprove:()=>h(W(C),void 0,!1)})};Y(a,e=>{W(C)&&W(w)&&!W(ce)&&e(o)});var s=B(a,2),l=R(s),d=e=>{var t=Bo(),n=z(t);V(()=>J(n,`${na[W(ce)]??``}${W(ce)===`oneLocale`?` ${na.oneLocaleFix}`:``}`)),q(e,t)},f=e=>{var i=Vo(),a=$t(i);X(a,17,()=>W(se).slice(0,W(E)),e=>e.key,(e,i)=>{{let a=P(()=>W(C)?za(W(i),W(C)):void 0),o=P(()=>W(c)===W(i).key);lo(e,{get row(){return W(i)},get shown(){return W(S)},get editing(){return W(n)},onEdit:e=>L(n,e,!0),onSave:g,get why(){return W(a)},get scanning(){return t.panel.scanning},get menu(){return W(o)},onMenu:e=>L(c,e?W(i).key:null,!0),onNote:e=>L(r,{text:e,file:``},!0),onCommit:u})}});var o=B(a,2),s=e=>{var t=Bo(),n=z(t,!0);V(e=>J(n,e),[()=>W(C)?$.rest(W(se).length-W(E)):`${W(se).length-W(E)} more below`]),q(e,t)};Y(o,e=>{W(E)<W(se).length&&e(s)}),q(e,i)};Y(l,e=>{W(ce)?e(d):e(f,-1)}),j(s),j(i),dr(`scroll`,s,D),q(e,i)};Y(xe,e=>{W(a)===`overview`?e(Se):W(a)===`health`?e(Ce,1):e(we,-1)}),j(ye);var Te=B(ye,2),Ee=e=>{var t=Wo(),n=B(R(t),2),i=e=>{var t=Uo(),n=z(B($t(t)),!0);V(()=>J(n,W(r).file)),q(e,t)},a=e=>{var t=Sr();V(()=>J(t,W(r).text)),q(e,t)};Y(n,e=>{W(r).file?e(i):e(a,-1)});var o=B(n,2);j(t),G(`click`,o,()=>L(r,null)),q(e,t)};Y(Te,e=>{W(r)&&e(Ee)}),j(pe),V(()=>{Z(he,`placeholder`,sa.placeholder),Z(he,`aria-label`,sa.placeholder),Z(ge,`title`,t.panel.root),J(O,t.panel.root)}),di(he,()=>W(v),e=>L(v,e)),q(e,pe),Re()}fr([`click`]);async function qo(e,t,n){let r=t.includes(`?`)?`&`:`?`,i;try{i=await fetch(`${t}${r}t=${encodeURIComponent(e)}`,{...n,headers:n?.body===void 0?void 0:{"content-type":`application/json`},body:n?.body===void 0?void 0:JSON.stringify(n.body)})}catch{return{error:`[verbaly] the studio server is not answering, is it still running?`}}let a=await i.json().catch(()=>({}));return i.ok?{value:a}:{error:a.error??`[verbaly] the server answered ${i.status}`}}function Jo(e){return{state:()=>qo(e,`/api/state`),health:()=>qo(e,`/api/health`),history:()=>qo(e,`/api/history`),commit:t=>qo(e,`/api/commit/${encodeURIComponent(t)}`),save:(t,n,r)=>qo(e,`/api/message/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:`PUT`,body:{text:r}}),setRead:(t,n,r)=>qo(e,`/api/approve`,{method:`POST`,body:{locale:t,keys:n,undo:r}}),extract:()=>qo(e,`/api/extract`,{method:`POST`}),plan:t=>{let n=t.map(e=>`locale=${encodeURIComponent(e)}`).join(`&`);return qo(e,`/api/translate${n?`?${n}`:``}`)},translate:t=>qo(e,`/api/translate`,{method:`POST`,body:{locales:t}}),job:t=>qo(e,t?`/api/job/${encodeURIComponent(t)}`:`/api/job`)}}function Yo(e){return Ht(Ea(e))}var Xo=new URLSearchParams(location.search).get(`t`)??``;async function Zo(){let e=document.getElementById(`app`),t=Jo(Xo),n=await t.state();n.error||!n.value?e.textContent=n.error??`[verbaly] the server sent no state`:Or(Ko,{target:e,props:{panel:Yo(n.value),api:t}})}Zo();
|
package/dist/ui/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>Verbaly Studio</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-BKTT4Zu6.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-C9E7gq0Q.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verbaly/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.74.0",
|
|
4
4
|
"description": "Local review server for Verbaly: read, edit and approve translations over the JSON files already in your repo. No account, no database.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@verbaly/compiler": "^0.
|
|
46
|
+
"@verbaly/compiler": "^0.74.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"svelte": "^5.57.2",
|
|
52
52
|
"svelte-check": "^4.7.7",
|
|
53
53
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
54
|
-
"verbaly": "^0.
|
|
54
|
+
"verbaly": "^0.74.0",
|
|
55
55
|
"vite": "^8.3.4"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){for(var t=0;t<e.length;t++)e[t]()}function p(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var m=1024,h=2048,g=4096,_=8192,v=16384,y=32768,b=1<<25,x=65536,S=1<<19,ee=1<<20,C=1<<25,w=1<<21,te=1<<22,T=1<<23,ne=Symbol(`$state`),re=Symbol(`component`),ie=Symbol(``),ae=Symbol(`attributes`),oe=Symbol(`class`),se=Symbol(`style`),ce=Symbol(`text`),le=Symbol(`form reset`),E=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ue=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),de={},D=Symbol(`uninitialized`),fe=`http://www.w3.org/1999/xhtml`;function pe(){console.warn(`https://svelte.dev/e/derived_inert`)}function me(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function he(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function ge(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var O=!1;function _e(e){O=e}var k;function A(e){if(e===null)throw me(),de;return k=e}function ve(){return A(Qt(k))}function j(e){if(O){if(Qt(k)!==null)throw me(),de;k=e}}function ye(e=1){if(O){for(var t=e,n=k;t--;)n=Qt(n);k=n}}function be(e=!0){for(var t=0,n=k;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function xe(e){if(!e||e.nodeType!==8)throw me(),de;return e.data}function Se(e){return e===this.v}function Ce(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function we(e){return!Ce(e,this.v)}function Te(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ee(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function De(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Oe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ke(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ae(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function je(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Me(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ne(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Pe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Fe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var M=null;function Ie(e){M=e}function Le(e,t=!1,n){M={p:M,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Re(e){var t=M,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,M=t.p,ze(e)}function ze(e={}){return i(e,re,{value:!0}),e}function Be(){return!0}var Ve=[];function He(){var e=Ve;Ve=[],f(e)}function Ue(e){if(Ve.length===0&&!_t){var t=Ve;queueMicrotask(()=>{t===Ve&&He()})}Ve.push(e)}function We(){for(;Ve.length>0;)He()}var Ge=~(h|g|m);function N(e,t){e.f=e.f&Ge|t}function Ke(e){e.f&512||e.deps===null?N(e,m):N(e,g)}function qe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),N(e,m)}function Je(e,t){if(t){let t=document.body;e.autofocus=!0,Ue(()=>{document.activeElement===t&&e.focus()})}}function Ye(e){O&&Zt(e)!==null&&en(e)}var Xe=!1;function Ze(){Xe||(Xe=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[le]?.()})},{capture:!0}))}function Qe(e){var t=H,n=U;Fn(null),In(null);try{return e()}finally{Fn(t),In(n)}}function $e(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));let i=e[le];e[le]=i?()=>{i(),r(!0)}:()=>r(!0),Ze()}function et(e,t,n,r){let i=Be()?it:st;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=tt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){on(e,s)}nt()}}var d=rt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ot(e))).then(u).catch(e=>on(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),nt())}):f()}function tt(){var e=U,t=H,n=M,r=F;return function(i=!0){In(e),Fn(t),Ie(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function nt(e=!0){In(null),Fn(null),Ie(null),e&&F?.deactivate()}function rt(){var e=U,t=e.b,n=F,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function it(e){var t=2|h;return U!==null&&(U.f|=S),{ctx:M,deps:null,effects:null,equals:Se,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:U,ac:null}}var at=Symbol(`obsolete`);function ot(e,t,n){let r=U;r===null&&Ee();var i=void 0,a=Pt(D),o=!H,s=new Set;return gn(()=>{var t=U,n=p();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==E&&n.reject(e)}).finally(nt)}catch(e){n.reject(e),nt()}var c=F;if(o){if(t.f&32768)var l=rt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(at);else for(let e of s.values())e.reject(at);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==at&&(c.activate(),t?(a.f|=T,Rt(a,t)):(a.f&8388608&&(a.f^=T),Rt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(at)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function P(e){let t=it(e);return Rn(t),t}function st(e){let t=it(e);return t.equals=we,t}function ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Cn(t[n])}}function lt(e){var t,n=U,r=e.parent;if(!Mn&&r!==null&&e.v!==D&&r.f&24576)return pe(),e.v;In(r);try{ct(e),t=Xn(e)}finally{In(n)}return t}function ut(e){var t=lt(e);!e.equals(t)&&(e.wv=qn(),(!F?.is_fork||e.deps===null)&&(F===null?e.v=t:(F.capture(e,t,!0),mt?.capture(e,t,!0)),e.deps===null))?N(e,m):Mn||(ht===null?Ke(e):(un()||F?.is_fork)&&ht.set(e,t))}function dt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Qe(()=>{t.ac.abort(E),t.ac=null}),t.fn!==null&&(t.teardown=d),$n(t,0),xn(t))}function ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&er(t)}var pt=null,F=null,mt=null,ht=null,gt=null,_t=!1,vt=!1,yt=null,bt=null,xt=0,St=1,Ct=class e{id=St++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){pt===null?pt=this:(pt.#n=this,this.#t=pt),pt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)N(r,h),t(r);for(r of n.m)N(r,g),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=m}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),N(e,h),this.schedule(e);for(let e of this.#d)N(e,g),this.schedule(e);this.apply();for(var t=yt=[],n=[],r=bt=[];this.#c.length>0;){xt++>1e3&&(this.#S(),Tt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw At(e),this.#h()||this.discard(),t}}if(F=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(yt=null,bt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)kt(e,t);r.length>0&&F.#_();return}let a=this.#y();if(a)this.#x(n),this.#x(t),a.#b(this);else{this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),mt=this,Dt(n),Dt(t),mt=null,this.#s?.resolve();var o=F;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0){if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this}o!==null&&(Mt.clear(),o.#_())}}#v(e,t,n){e.f^=m;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=m:i&4?t.push(r):Jn(r)&&(i&16&&this.#d.add(r),er(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),N(i,h),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),F=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)qe(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==D&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),ht?.set(e,t)),this.is_fork||(e.v=t)}activate(){F=this}deactivate(){F=null,ht=null}flush(){try{vt=!0,F=this,this.#_()}finally{xt=0,gt=null,yt=null,bt=null,vt=!1,F=null,ht=null,Mt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(at);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ue(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=p()).promise}static ensure(){if(F===null){let t=F=new e;!vt&&!_t&&Ue(()=>{t.#e||t.flush()})}return F}apply(){ht=null}schedule(e){gt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?pt=e:t.#t=e,this.linked=!1}}};function wt(e){var t=_t,n=mt;mt=null,_t=!0;try{var r;for(e&&(wt(),r=e());;){if(We(),F===null)return r;F.flush()}}finally{_t=t,mt=n}}function Tt(){try{je()}catch(e){on(e,gt)}}var Et=null;function Dt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Jn(r)&&(Et=new Set,er(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Tn(r),Et?.size>0)){Mt.clear();for(let e of Et){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Et.has(n)&&(Et.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||er(n)}}Et.clear()}}Et=null}}function Ot(e){F.schedule(e)}function kt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,m);for(var n=e.first;n!==null;)kt(n,t),n=n.next}}function At(e){N(e,m);for(var t=e.first;t!==null;)At(t),t=t.next}var jt=new Set,Mt=new Map,Nt=!1;function Pt(e,t){return{f:0,v:e,reactions:null,equals:Se,rv:0,wv:0}}function I(e,t){let n=Pt(e,t);return Rn(n),n}function Ft(e,t=!1,n=!0){let r=Pt(e);return t||(r.equals=we),r}function L(e,t,n=!1){return H!==null&&(!Pn||H.f&131072)&&Be()&&H.f&4325394&&(Ln===null||!Ln.has(e))&&Pe(),Rt(e,n?Ht(t):t,bt)}var It=null,Lt=0;function Rt(e,t,n=null){if(!e.equals(t)){Mn?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var r=Ct.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&<(t),ht===null&&Ke(t)}e.wv=qn(),It=null,Lt=0,Vt(e,h,n),It=null,Be()&&U!==null&&U.f&1024&&!(U.f&96)&&(Vn===null?Hn([e]):Vn.push(e)),!r.is_fork&&jt.size>0&&!Nt&&zt()}return t}function zt(){Nt=!1;for(let e of jt){e.f&1024&&N(e,g);let t;try{t=Jn(e)}catch{t=!0}t&&er(e)}jt.clear()}function Bt(e){L(e,e.v+1)}function Vt(e,t,n){var r=e.reactions;if(r!==null){var i=Be(),a=r.length;if(Lt+=a,Lt>1e5&&It===null&&(It=new Set),It!==null){if(It.has(e))return;It.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==U){var l=(c&h)===0;if(l&&N(s,t),c&131072)jt.add(s);else if(c&2){var u=s;ht?.delete(u),Vt(u,g,n)}else if(l){var d=s;c&16&&Et!==null&&Et.add(d),n===null?Ot(d):n.push(d)}}}}}function Ht(t){if(typeof t!=`object`||!t||ne in t||re in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=I(0),u=null,d=Gn,f=e=>{if(Gn===d)return e();var t=H,n=Gn;Fn(null),Kn(d);var r=e();return Fn(t),Kn(n),r};return i&&r.set(`length`,I(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Me();var i=r.get(t);return i===void 0?f(()=>{var e=I(n.value,u);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>I(D,u));r.set(t,e),Bt(o)}}else L(n,D),Bt(o);return!0},get(e,n,i){if(n===ne)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>I(Ht(s?e[n]:D),u)),r.set(n,o)),o!==void 0){var c=W(o);return c===D?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=W(i);if(a===D)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ne)return!0;var n=r.get(t),i=n!==void 0&&n.v!==D||Reflect.has(e,t);return(n!==void 0||U!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>I(i?Ht(e[t]):D,u)),r.set(t,n)),W(n)===D)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>I(D,u)),r.set(d+``,p)):L(p,D)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>I(void 0,u)),L(c,Ht(n)),r.set(t,c));else{l=c.v!==D;var m=f(()=>Ht(n));L(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&L(g,_+1)}Bt(o)}return!0},ownKeys(e){W(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==D});for(var[n,i]of r)i.v!==D&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ne()}})}function Ut(e){try{if(typeof e==`object`&&e&&ne in e)return e[ne]}catch{}return e}function Wt(e,t){return Object.is(Ut(e),Ut(t))}var Gt,Kt,qt,Jt;function Yt(){if(Gt===void 0){Gt=window,Kt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;qt=a(t,`firstChild`).get,Jt=a(t,`nextSibling`).get,u(e)&&(e[oe]=void 0,e[ae]=null,e[se]=void 0,e.__e=void 0),u(n)&&(n[ce]=void 0)}}function Xt(e=``){return document.createTextNode(e)}function Zt(e){return qt.call(e)}function Qt(e){return Jt.call(e)}function R(e,t){if(!O)return Zt(e);var n=Zt(k);if(n===null)n=k.appendChild(Xt());else if(t&&n.nodeType!==3){var r=Xt();return n?.before(r),A(r),r}return t&&rn(n),A(n),n}function $t(e,t=!1){if(!O){var n=Zt(e);return n instanceof Comment&&n.data===``?Qt(n):n}if(t){if(k?.nodeType!==3){var r=Xt();return k?.before(r),A(r),r}rn(k)}return k}function z(e,t=!1){if(!O)return Zt(e);var n=R(e,t);return j(e),n}function B(e,t=1,n=!1){let r=O?k:e;for(var i;t--;)i=r,r=Qt(r);if(!O)return r;if(n){if(r?.nodeType!==3){var a=Xt();return r===null?i?.after(a):r.before(a),A(a),a}rn(r)}return A(r),r}function en(e){e.textContent=``}function tn(){return!1}function nn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function rn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function an(e){var t=U;if(t===null)return H.f|=T,e;if(!(t.f&32768)&&!(t.f&4))throw e;on(e,t)}function on(e,t){if(e===de)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function sn(e){U===null&&(H===null&&Ae(e),ke()),Mn&&Oe(e)}function cn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ln(e,t){var n=U;n!==null&&n.f&8192&&(e|=_);var r={ctx:M,deps:null,nodes:null,f:e|h|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F?.register_created_effect(r);var i=r;if(e&4)yt===null?Ct.ensure().schedule(r):yt.push(r);else if(t!==null){try{er(r)}catch(e){throw Cn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=x))}if(i!==null&&(i.parent=n,n!==null&&cn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function un(){return H!==null&&!Pn}function dn(e){let t=ln(8,null);return N(t,m),t.teardown=e,t}function fn(e){sn(`$effect`);var t=U.f;if(!H&&t&32&&M!==null&&!M.i){var n=M;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return ln(4|ee,e)}function mn(e){Ct.ensure();let t=ln(64|S,e);return(e={})=>new Promise(n=>{e.outro?En(t,()=>{Cn(t),n(void 0)}):(Cn(t),n(void 0))})}function hn(e){return ln(4,e)}function gn(e){return ln(te|S,e)}function _n(e,t=0){return ln(8|t,e)}function V(e,t=[],n=[],r=[]){et(r,t,n,t=>{ln(8,()=>{e(...t.map(W))})})}function vn(e,t=0){return ln(16|t,e)}function yn(e){return ln(32|S,e)}function bn(e){var t=e.teardown;if(t!==null){let n=Mn,r=H;Nn(!0),Fn(null);try{t.call(null)}catch(t){on(t,e.parent)}finally{Nn(n),Fn(r)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Qe(()=>{e.abort(E)});var r=n.next;n.f&64?n.parent=null:Cn(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Cn(t),t=n}}function Cn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(wn(e.nodes.start,e.nodes.end),n=!0),e.f|=b,xn(e,t&&!n),$n(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=b,e.f|=v;var i=e.parent;i!==null&&i.first!==null&&Tn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function wn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function Tn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function En(e,t,n=!0){var r=[];e.f|=256,Dn(e,r,!0);var i=()=>{n&&Cn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Dn(e,t,n){if(!(e.f&8192)){e.f^=_;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Dn(i,t,o?n:!1)}i=a}}}function On(e){e.f&=-257,kn(e,!0)}function kn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=_,e.f&1024||(N(e,h),Ct.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);kn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function An(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var jn=null,Mn=!1;function Nn(e){Mn=e}var H=null,Pn=!1;function Fn(e){H=e}var U=null;function In(e){U=e}var Ln=null;function Rn(e){H!==null&&(H.f&2097152||H.f&2)&&(Ln??=new Set).add(e)}var zn=null,Bn=0,Vn=null;function Hn(e){Vn=e}var Un=1,Wn=0,Gn=Wn;function Kn(e){Gn=e}function qn(){return++Un}function Jn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Jn(a)&&ut(a),a.wv>e.wv)return!0}t&512&&ht===null&&N(e,m)}return!1}function Yn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ln!==null&&Ln.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Yn(a,t,!1):t===a&&(n?N(a,h):a.f&1024&&N(a,g),Ot(a))}}function Xn(e){var t=zn,n=Bn,r=Vn,i=H,a=Ln,o=M,s=Pn,c=Gn,l=e.f;zn=null,Bn=0,Vn=null,H=l&96?null:e,Ln=null,Ie(e.ctx),Pn=!1,Gn=++Wn,e.ac!==null&&(Qe(()=>{e.ac.abort(E)}),e.ac=null);try{e.f|=w;var u=e.fn,d=u();e.f|=y;var f=Zn(e);if(Be()&&Vn!==null&&!Pn&&f!==null&&!(e.f&6146))for(var p=0;p<Vn.length;p++)Yn(Vn[p],e);if(i!==null&&i!==e){if(Wn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Wn;if(t!==null)for(let e of t)e.rv=Wn;Vn!==null&&(r===null?r=Vn:r.push(...Vn))}return e.f&8388608&&(e.f^=T),d}catch(t){return Zn(e),an(t)}finally{e.f^=w,zn=t,Bn=n,Vn=r,H=i,Ln=a,Ie(o),Pn=s,Gn=c}}function Zn(e){var t=e.deps,n=F?.is_fork;if(zn!==null){var r;if(n||$n(e,Bn),t!==null&&Bn>0)for(t.length=Bn+zn.length,r=0;r<zn.length;r++)t[Bn+r]=zn[r];else e.deps=t=zn;if(un()&&e.f&512)for(r=Bn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Bn<t.length&&($n(e,Bn),t.length=Bn);return t}function Qn(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(zn===null||!n.call(zn,r))){var s=r;s.f&512&&(s.f^=512),s.v!==D&&Ke(s),s.ac!==null&&Qe(()=>{s.ac.abort(E),s.ac=null,N(s,h)}),dt(s),$n(s,0)}}function $n(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Qn(e,n[r])}function er(e){var t=e.f;if(!(t&16384)){N(e,m);var n=U;U=e;try{t&16777232?Sn(e):xn(e),bn(e);var r=Xn(e);e.teardown=typeof r==`function`?r:null,e.wv=Un}finally{U=n}}}async function tr(){await Promise.resolve(),wt()}function W(e){var t=!!(e.f&2);if(jn?.add(e),H!==null&&!Pn&&!(U!==null&&U.f&16384)&&(Ln===null||!Ln.has(e))){var r=H.deps;if(H.f&2097152)e.rv<Wn&&(e.rv=Wn,zn===null&&r!==null&&r[Bn]===e?Bn++:zn===null?zn=[e]:zn.push(e));else{H.deps??=[],n.call(H.deps,e)||H.deps.push(e);var i=e.reactions;i===null?e.reactions=[H]:n.call(i,H)||i.push(H)}}if(Mn&&Mt.has(e))return Mt.get(e);if(t){var a=e;if(Mn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||rr(a))&&(o=lt(a)),Mt.set(a,o),o}var s=!(a.f&512)&&!Pn&&H!==null&&!!(H.f&512),c=(a.f&y)===0;Jn(a)&&(s&&(a.f|=512),ut(a)),s&&!c&&(ft(a),nr(a))}if(ht?.has(e))return ht.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:n.call(t,e)||t.push(e),r.f&2&&!(r.f&512)&&(ft(r),nr(r))}}function rr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=Pn;try{return Pn=!0,e()}finally{Pn=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var ar=[`touchstart`,`touchmove`];function or(e){return ar.includes(e)}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n,r={}){function i(e){if(r.capture||hr.call(t,e),!e.cancelBubble)return Qe(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Ue(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function dr(e,t,n,r,i){var a={capture:r,passive:i},o=ur(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&dn(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function G(e,t,n){(t[sr]??={})[e]=n}function fr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var pr=null,mr=!1;function hr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;pr=e,mr||(mr=!0,setTimeout(()=>{mr=!1,pr=null}));var s=0,c=pr===e&&e[sr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[sr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=H,f=U;Fn(null),In(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[sr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[sr]=t,delete e.currentTarget,Fn(d),In(f)}}}var gr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function _r(e){return gr?.createHTML(e)??e}function vr(e){var t=nn(`template`);return t.innerHTML=_r(e.replaceAll(`<!>`,`<!---->`)),t.content}function yr(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(O)return yr(k,null),k;i===void 0&&(i=vr(a?e:`<!>`+e),n||(i=Zt(i)));var t=r||Kt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Zt(t),s=t.lastChild;yr(o,s)}else yr(t,t);return t}}function br(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(O)return yr(k,null),k;if(!o){var e=Zt(vr(a));if(i)for(o=document.createDocumentFragment();Zt(e);)o.appendChild(Zt(e));else o=Zt(e)}var t=o.cloneNode(!0);if(i){var n=Zt(t),r=t.lastChild;yr(n,r)}else yr(t,t);return t}}function xr(e,t){return br(e,t,`svg`)}function Sr(e=``){if(!O){var t=Xt(e+``);return yr(t,t),t}var n=k;return n.nodeType===3?rn(n):(n.before(n=Xt()),A(n)),yr(n,n),n}function Cr(){if(O)return yr(k,null),k;var e=document.createDocumentFragment(),t=document.createComment(``),n=Xt();return e.append(t,n),yr(t,n),e}function q(e,t){if(O){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=k),ve()}else e!==null&&e.before(t)}function wr(e){let t=0,n=Pt(0),r;return()=>{un()&&(W(n),_n(()=>(t===0&&(r=ir(()=>e(()=>Bt(n)))),t+=1,()=>{Ue(()=>{--t,t===0&&(r?.(),r=void 0,Bt(n))})})))}}var Tr=x|S;function Er(e,t,n,r){new Dr(e,t,n,r)}var Dr=class{parent;is_pending=!1;transform_error;#e;#t=O?k:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=wr(()=>(this.#m=Pt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=vn(()=>{if(O){let e=xe(this.#t);ve();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#_(t)}else t?this.#b():this.#g()}else this.#x()},Tr),O&&(this.#e=k)}#g(){try{this.#a=yn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ue(r),t&&(this.#s=yn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{this.#y()||(t?ge():(t=!0,n&&Fe(),this.#s!==null&&En(this.#s,()=>{this.#s=null}),this.#C(()=>{this.#x()})))};return{reset:r,invoke_onerror:()=>{if(!this.#y())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){on(e,this.#i&&this.#i.parent)}}}}#y(){return(this.#i.f&(v|b))!==0}#b(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=yn(()=>e(this.#e)),Ue(()=>{if(!this.#y()){var e=this.#c=document.createDocumentFragment(),t=Xt(),n=!1;e.append(t),this.#a=this.#C(()=>{try{return yn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){on(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#S(F)):this.#u===0&&(this.#e.before(e),this.#c=null,En(this.#o,()=>{this.#o=null}),this.#S(F))}}))}#x(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=yn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();An(this.#a,e);let t=this.#n.pending;this.#o=yn(()=>t(this.#e))}else this.#S(F)}catch(e){this.error(e)}}#S(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){qe(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#C(e){var t=U,n=H,r=M;In(this.#i),Fn(this.#i),Ie(this.#i.ctx);try{return Ct.ensure(),e()}finally{In(t),Fn(n),Ie(r)}}#w(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#S(t),this.#o&&En(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#w(e,t)}update_pending_count(e,t){this.#w(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ue(()=>{this.#d=!1,this.#m&&Rt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),W(this.#m)}error(e){if(e===de||!this.#n.onerror&&!this.#n.failed)throw e;F?.is_fork?(this.#a&&F.skip_effect(this.#a),this.#o&&F.skip_effect(this.#o),this.#s&&F.skip_effect(this.#s),F.oncommit(()=>{this.#y()||this.#T(e)})):this.#T(e)}#T(e){this.#a&&=(Cn(this.#a),null),this.#o&&=(Cn(this.#o),null),this.#s&&=(Cn(this.#s),null),O&&(A(this.#t),ye(),A(be()));let t=this.#n.failed,n=e=>{if(this.#y())return;let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&!this.#y()&&(this.#s=this.#C(()=>{try{return yn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return on(e,this.#i.parent),null}}))};Ue(()=>{if(!this.#y()){var t;try{t=this.transform_error(e)}catch(e){on(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>on(e,this.#i&&this.#i.parent)):n(t)}})}};function J(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ce]??=e.nodeValue)&&(e[ce]=n,e.nodeValue=`${n}`)}function Or(e,t){return Ar(e,t)}var kr=new Map;function Ar(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Yt();var l=void 0,u=mn(()=>{var s=n??t.appendChild(Xt());Er(s,{pending:()=>{}},t=>{Le({});var n=M;if(o&&(n.c=o),a&&(i.$$events=a),O&&yr(t,null),l=e(t,i)||ze(),O&&(U.nodes.end=k,k===null||k.nodeType!==8||k.data!==`]`))throw me(),de;Re()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=or(r);for(let e of[t,document]){var a=kr.get(e);a===void 0&&(a=new Map,kr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,hr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(cr)),lr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=kr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,hr),r.delete(e),r.size===0&&kr.delete(n)):r.set(e,i)}lr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return jr.set(l,u),l}var jr=new WeakMap,Mr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)On(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(On(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Cn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();An(r,t),t.append(Xt()),this.#n.set(e,{effect:r,fragment:t})}else Cn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),En(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Cn(n.effect),this.#n.delete(e))};ensure(e,t){var n=F,r=tn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=Xt();i.append(a),this.#n.set(e,{effect:yn(()=>t(a)),fragment:i})}else this.#t.set(e,yn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else O&&(this.anchor=k),this.#a(n)}};function Y(e,t,n=!1){var r;O&&(r=k,ve());var i=new Mr(e),a=n?x:0;function o(e,t){if(O){var n=xe(r);if(e!==parseInt(n.substring(1))){var a=be();A(a),i.anchor=a,_e(!1),i.ensure(e,t),_e(!0);return}}i.ensure(e,t)}vn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Nr(e,t){return t}function Pr(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];En(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Fr(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;en(d),d.append(u),e.items.clear()}Fr(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function Fr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=C,An(a,document.createDocumentFragment())):Cn(t[i],n)}}var Ir;function X(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=O?A(Zt(u)):u.appendChild(Xt())}O&&ve();var d=null,f=st(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var t=W(f);_.fallback=d,Rr(_,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=C,Br(d,null,c)):On(d):En(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:vn(()=>{var e=W(f),t=e.length;let r=!1;O&&xe(c)===`[!`!=(t===0)&&(c=be(),A(c),_e(!1),r=!0);for(var u=new Set,_=F,v=tn(),y=0;y<t;y+=1){O&&k.nodeType===8&&k.data===`]`&&(c=k,r=!0,_e(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&Rt(S.v,b),S.i&&Rt(S.i,y),v&&_.unskip_effect(S.e)):(S=zr(l,m?c:Ir??=Xt(),b,x,y,o,n,i),m||(S.e.f|=C),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=yn(()=>s(c)):(d=yn(()=>s(Ir??=Xt())),d.f|=C)),t>u.size&&De(``,``,``),O&&t>0&&A(be()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}r&&_e(!0),W(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,O&&(c=k)}function Lr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Rr(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=Lr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(On(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=C,_===l)Br(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Vr(e,d,_),Vr(e,_,y),Br(_,y,n),d=_,p=[],m=[],l=Lr(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Br(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Vr(e,S.prev,ee.next),Vr(e,d,S),Vr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Br(_,l,n),Vr(e,_.prev,_.next),Vr(e,_,d===null?e.effect.first:d.next),Vr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Lr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Lr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Fr(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Lr(l.next);var te=w.length;if(te>0){var T=i&4&&s===0?n:null;if(o){for(v=0;v<te;v+=1)w[v].nodes?.a?.measure();for(v=0;v<te;v+=1)w[v].nodes?.a?.fix()}Pr(e,w,T)}}o&&Ue(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function zr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Pt(n):Ft(n,!1,!1):null,l=o&2?Pt(i):null;return{v:c,i:l,e:yn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Br(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Qt(r);if(a.before(r),r===i)return;r=o}}function Vr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Hr(e,t,...n){var r=new Mr(e);vn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},x)}var Ur=[...`
|
|
2
|
-
\r\f\xA0\v`];function Wr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ur.includes(r[o-1]))&&(s===r.length||Ur.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Gr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Kr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function qr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Kr)),i&&c.push(...Object.keys(i).map(Kr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Kr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Gr(r)),i&&(n+=Gr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Jr(e,t,n,r,i,a){var o=e[oe];if(O||o!==n||o===void 0){var s=Wr(n,r,a);(!O||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[oe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Yr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Xr(e,t,n,r){var i=e[se];if(O||i!==t){var a=qr(t,r);(!O||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[se]=t}else r&&(Array.isArray(r)?(Yr(e,n?.[0],r[0]),Yr(e,n?.[1],r[1],`important`)):Yr(e,n,r));return r}function Zr(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Qr(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=ti(c);Zr(c,i?a.includes(l):Wt(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function $r(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return he();for(var i of t.options)i.selected=n.includes(ti(i))}else{for(i of t.options)if(Wt(ti(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}}function ei(e){var t=new MutationObserver(t=>{t.every(ni)||(`__defaultValue`in e&&Qr(e,!1),`__value`in e&&$r(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),dn(()=>{t.disconnect()})}function ti(e){return`__value`in e?e.__value:e.value}function ni(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var ri=Symbol(`is custom element`),ii=Symbol(`is html`),ai=ue?`link`:`LINK`;function oi(e){if(O){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Z(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Z(e,`checked`,null),e.checked=r}}};e[le]=n,Ue(n),Ze()}}function si(e,t){var n=ci(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Z(e,t,n,r){var i=ci(e);O&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ai)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ie]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ui(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ci(e){return e[ae]??={[ri]:e.nodeName.includes(`-`),[ii]:e.namespaceURI===fe}}var li=new Map;function ui(e){var t=e.getAttribute(`is`)||e.nodeName,n=li.get(t);if(n)return n;li.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.add(s);i=l(i)}return n}function di(e,t,n=t){var r=new WeakSet;$e(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=fi(e)?pi(a):a,n(a),F!==null&&r.add(F),await tr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(O&&e.defaultValue!==e.value||ir(t)==null&&e.value)&&(n(fi(e)?pi(e.value):e.value),F!==null&&r.add(F)),_n(()=>{var n=t();if(e===document.activeElement){var i=F;if(r.has(i))return}fi(e)&&n===pi(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function fi(e){var t=e.type;return t===`number`||t===`range`}function pi(e){return e===``?null:+e}function mi(e,t){return e===t||e?.[ne]===t}function hi(e=ze(),t,n,r){var i=M.r,a=U;return hn(()=>{var o,s;return _n(()=>{o=s,s=r?.()||[],ir(()=>{mi(n(...s),e)||(t(e,...s),o&&mi(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&mi(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function gi(e){M===null&&Te(`onMount`),fn(()=>{let t=ir(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var _i=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg>`),vi=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M8 4v5"></path><path d="M8 12h.01"></path></svg>`),yi=xr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg>`),bi=K(`<span class="fix svelte-1grjtup"> </span>`),xi=K(`<li class="svelte-1grjtup"><span class="mark svelte-1grjtup" aria-hidden="true"><!></span> <span class="body svelte-1grjtup"><b class="svelte-1grjtup"> </b> <span class="msg svelte-1grjtup"> </span> <!></span> <span class="sr svelte-1grjtup"> </span></li>`),Si=K(`<section class="health svelte-1grjtup" aria-label="Health"><header class="svelte-1grjtup"><h2 class="svelte-1grjtup"> </h2> <p class="svelte-1grjtup">This is the same check <code>npx verbaly doctor</code> runs, read out loud. It looks at your
|
|
3
|
-
settings, your catalogs and the way your build is wired, and it never changes anything.</p> <button class="close svelte-1grjtup">Back to the messages</button></header> <ul class="svelte-1grjtup"></ul></section>`);function Ci(e,t){Le(t,!0);let n={config:`Your settings`,cli:`The verbaly command`,catalogs:`Your catalogs`,locales:`The names of your languages`,routing:`Where the language lives in your urls`,plugin:`The piece that wires your build`,types:`The generated types`,sources:`Reading your code`,orphans:`Keys nothing in your code uses`,extras:`Keys only a translation has`,bundle:`What the browser downloads`,translations:`The translations themselves`},r=P(()=>t.entries.filter(e=>e.level!==`ok`).length);var i=Si(),a=R(i),o=R(a),s=z(o,!0),c=B(o,4);j(a);var l=B(a,2);X(l,21,()=>t.entries,Nr,(e,t)=>{var r=xi(),i=R(r),a=R(i),o=e=>{q(e,_i())},s=e=>{q(e,vi())},c=e=>{q(e,yi())};Y(a,e=>{W(t).level===`ok`?e(o):W(t).level===`warn`?e(s,1):e(c,-1)}),j(i);var l=B(i,2),u=R(l),d=z(u,!0),f=B(u,2),p=z(f,!0),m=B(f,2),h=e=>{var n=bi(),r=z(n,!0);V(()=>J(r,W(t).fix)),q(e,n)};Y(m,e=>{W(t).fix&&e(h)}),j(l);var g=z(B(l,2),!0);j(r),V(()=>{Z(r,`data-level`,W(t).level),J(d,n[W(t).check]??W(t).check),J(p,W(t).message),J(g,W(t).level)}),q(e,r)}),j(l),j(i),V(()=>J(s,t.ok?`Nothing is broken`:`${W(r)} of ${t.entries.length} need you`)),G(`click`,c,function(...e){t.onClose?.apply(this,e)}),q(e,i),Re()}fr([`click`]);var wi=new Set;function Ti(e){wi.has(e)||(wi.add(e),console.warn(`[verbaly] ${e}`))}var Ei=200,Di=new Map;function Oi(e,t,n,r){let i=e.get(t);if(!i){e.size>=Ei&&e.delete(e.keys().next().value);try{i=r(n)}catch{let e=n.replace(/_/g,`-`);try{i=r(e)}catch{i=r(e=void 0)}Ti(`"${n}" is not a locale tag, so Intl reads it as ${e??`its default locale`}`)}e.set(t,i)}return i}function ki(e){return Oi(Di,e,e,e=>new Intl.DisplayNames(e,{type:`language`}))}function Ai(e,t=e){try{return ki(t).of(e)??e}catch{return e}}var ji=/(^|[^{])\{\s*[a-zA-Z0-9_]+\s*,\s*(?:plural|selectordinal|select|number|date|time)\b/;function Mi(e){return ji.test(e)}function Ni(e){let t=0,n=()=>e.charAt(t),r=()=>{for(;t<e.length&&/\s/.test(n());)t++},i=()=>{let r=``;for(;t<e.length&&/[a-zA-Z0-9_]/.test(n());)r+=e[t++];return r};function a(r){let i=[],a=``,c=()=>{a&&i.push({kind:`text`,value:a}),a=``};for(;t<e.length;){let e=n();if(e===`}`)break;e===`{`?(c(),i.push(s())):e===`#`&&r?(c(),i.push({kind:`hash`}),t++):e===`'`?a+=o():(a+=e,t++)}return c(),i}function o(){if(t++,n()===`'`)return t++,`'`;let r=n();if(r!==`{`&&r!==`}`&&r!==`#`)return`'`;let i=``;for(;t<e.length;){if(n()===`'`){if(e.charAt(t+1)===`'`){i+=`'`,t+=2;continue}return t++,i}i+=e[t++]}return i}function s(){t++,r();let o=i();if(r(),n()===`}`)return t++,{kind:`param`,name:o};n()===`,`&&t++,r();let s=i(),u={kind:`param`,name:o};if(s===`number`||s===`date`||s===`time`){r();let i=``;if(n()===`,`){for(t++,r();t<e.length&&n()!==`}`&&n()!==`,`;)i+=e[t++];i=i.trim()}return s===`number`?u.format=i===`integer`||i===`percent`||i===`currency`?i:`number`:(u.format=s,i&&(u.arg=i)),l(),u}if(s===`plural`||s===`selectordinal`||s===`select`){s===`selectordinal`&&(u.ordinal=!0);let i=[];if(r(),n()===`,`&&t++,r(),s!==`select`&&e.startsWith(`offset:`,t)){for(t+=7,r();t<e.length&&/[0-9]/.test(n());)t++;r()}for(;t<e.length&&n()!==`}`;){let e=c();if(r(),n()!==`{`)break;t++;let o=a(s!==`select`);n()===`}`&&t++,i.push([e,o]),r()}return n()===`}`&&t++,u.variants=i,u}return l(),u}function c(){if(n()===`=`){let r=`=`;for(t++;t<e.length&&/[0-9]/.test(n());)r+=e[t++];return r}let r=``;for(;t<e.length&&!/[\s{]/.test(n());)r+=e[t++];return r}function l(){for(;t<e.length&&n()!==`}`;)t++;n()===`}`&&t++}return a(!1)}var Pi=new Map,Fi=5e3;function Ii(e,t){let n=Pi.get(e);if(!n){if(Mi(e)){if(!t)return Li(e);n=t(e)}else n=Ri(e,!1);Pi.size>=Fi&&Pi.delete(Pi.keys().next().value),Pi.set(e,n)}return n}function Li(e){return Ti(`a message uses ICU syntax and no ICU parser is loaded: set icu: true in your verbaly config, or pass icu to createVerbaly`),[{kind:`text`,value:e}]}function Ri(e,t){let n=[],r=``,i=0,a=()=>{r&&n.push({kind:`text`,value:r}),r=``};for(;i<e.length;){let o=e[i];if(o===`{`){if(e[i+1]===`{`){r+=`{`,i+=2;continue}let t=Bi(e,i);if(t<0){r+=e.slice(i);break}a(),n.push(Vi(e.slice(i+1,t))),i=t+1}else o===`}`&&e[i+1]===`}`?(r+=`}`,i+=2):t&&o===`#`?e[i+1]===`#`?(r+=`#`,i+=2):(a(),n.push({kind:`hash`}),i+=1):(r+=o,i+=1)}return a(),n}var zi;function Bi(e,t,n){zi=n;let r=0,i=t;for(;i<e.length;){let t=e[i];if(t===`{`){if(e[i+1]===`{`){i+=2;continue}r+=1}else if(t===`}`){if(e[i+1]===`}`&&!(n&&r>1)){i+=2;continue}if(--r,r===0)return i}i+=1}return n?-1:Bi(e,t,!0)}function Vi(e){let t=Hi(e),n=(t[0]??``).trim();if(!n)return{kind:`text`,value:`{${e}}`};let r=n.indexOf(`:`),i=(r<0?n:n.slice(0,r)).trim();if(!i)return{kind:`text`,value:`{${e}}`};let a={kind:`param`,name:i};if(r>=0){let e=n.slice(r+1).trim(),t=e.indexOf(`/`);a.format=(t<0?e:e.slice(0,t)).trim(),t>=0&&(a.arg=e.slice(t+1).trim())}if(t.length>1){a.variants=[];for(let e of t.slice(1)){let t=e.indexOf(`:`);if(t<0)continue;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();n&&a.variants.push([n,Ri(r,!0)])}}return a}function Hi(e){let t=[],n=``,r=0,i=0;for(;i<e.length;){let a=e[i];if(a===`{`){if(e[i+1]===`{`){n+=`{{`,i+=2;continue}r+=1,n+=a}else if(a===`}`){if(e[i+1]===`}`&&!(zi&&r>0)){n+=`}}`,i+=2;continue}--r,n+=a}else if(a===`|`&&r===0){if(e[i+1]===`|`){n+=`|`,i+=2;continue}t.push(n),n=``}else n+=a;i+=1}return t.push(n),t}var Ui=/<(\/?)([a-zA-Z][\w-]*)\s*(\/?)>/g,Wi=/^(?:br|wbr)$/,Gi=/&(?:(lt|gt|amp)|#(\d+)|#[xX]([0-9a-fA-F]+));/g,Ki={lt:`<`,gt:`>`,amp:`&`},qi=e=>e.replace(Gi,(e,t,n,r)=>{if(t)return Ki[t];let i=n?parseInt(n,10):parseInt(r,16);return i<=1114111?String.fromCodePoint(i):e});function Ji(e){Ui.lastIndex=0;let t=[],n=[],r=()=>n.length?n[n.length-1].children:t,i=e=>{e&&r().push(qi(e))},a=0,o;for(;(o=Ui.exec(e))!==null;){let[t,s,c,l]=o;if(i(e.slice(a,o.index)),a=o.index+t.length,l||Wi.test(c))s||r().push({name:c,children:[]});else if(s){if(n.length&&n[n.length-1].name===c){let e=n.pop();r().push(e)}else i(t)}else n.push({name:c,children:[]})}for(i(e.slice(a));n.length;){let e=n.pop();r().push(...e.children)}return t}var Yi={done:{short:`ready`,long:`ready`},draft:{short:`unread`,long:`written by a machine, nobody has read it`},missing:{short:`missing`,long:`missing, so your visitor sees the source language`},broken:{short:`breaks`,long:`breaks your site`}},Xi={all:`everything`,missing:`missing`,draft:`unread`,broken:`breaks your site`,look:`worth a look`,clean:`nothing odd`},Zi={divergent:`the source says this two ways`,collision:`came back as two translations`,echo:`still identical to the source`,digits:`the numbers moved`,url:`a link changed`,code:`a code span changed`},Q={open:`More for this message`,close:`Close`,edit:`Edit here`,copyKey:`Copy the key`,copySource:`Copy the source text`,commit:`The commit that changed it`,origins:`Where it is used`,reading:`reading your history`,nogit:`no git here`,uncommitted:`not committed yet`,older:`not in recent commits`,scanOff:`include: [] is off`,noFiles:`no file in your code uses it`,more:e=>`and ${e} more`,copiedKey:`The key is on your clipboard.`,copiedSource:`The source text is on your clipboard.`,copiedSha:`The commit is on your clipboard.`,noClipboard:`Your browser would not let the panel write to the clipboard.`,nothingToEdit:`Tick a language in the rail and this message has a line to edit.`},Qi={cap:`Group`,all:`every group`,none:`Your keys have no groups yet.`,hint:`A key like nav.home belongs to nav.`},$i=`Undo`,ea={find:`Find new text`,findWhy:`Reads your code and adds what your catalogs do not have yet.`,translate:`Translate what is missing`,translateWhy:`Calls your provider, so it costs money and takes minutes.`,cancel:`Not now`,working:`Reading your code`,running:`Translating`,nothingNew:`Nothing new: your catalogs already have every message your code uses.`,nothingMissing:`Nothing missing in the languages you ticked.`,pickFirst:`Tick a language to translate it.`,onlyLocale:`This project has one language, so there is nothing to translate into.`,scanOff:`Source scanning is off in your config, so there is nothing to read.`,kept:e=>`${e===1?`One was`:`${e} were`} written by someone else while it ran, so ${e===1?`it keeps its text`:`they keep their text`}.`},ta={noCatalogs:`No messages yet. Studio reads the catalogs in your project, and there are none here.`,oneLocale:`One language is all you have, so there is nothing to compare it against yet.`,oneLocaleFix:`Add another one to your config and it shows up in the rail.`,pickOne:`Tick a language in the rail to see its translations.`,noMatch:`Nothing matches. Every message here is in the state you asked for.`};function na(e){return`${e} ${e===1?`message`:`messages`}`}var ra={broken:{one:`translation breaks your site`,many:`translations break your site`},missing:{one:`message is missing`,many:`messages are missing`},draft:{one:`translation nobody has read`,many:`translations nobody has read`},undefined:{one:`key your code calls has no message`,many:`keys your code calls have no message`},extra:{one:`key only a translation has`,many:`keys only a translation has`}},ia={broken:`It lost a parameter or a tag, so the sentence would ship incomplete.`,missing:`Your visitor sees the source language until one is written.`,draft:`A machine wrote it and nobody has looked. It is already on your site.`,undefined:`Nothing defines it, so the build fails and the raw key would reach your page.`,extra:`Your source catalog lacks it, so it is dead weight, or a raw key if your code reads it.`},aa={here:`Overview`,clear:`Nothing is waiting for you.`,clearWhy:`Every language is complete and the build passes.`,project:`Project`,healthy:`Healthy`,problems:`Needs a look`,checks:`checks`,history:`Last changes to your catalogs`,noHistory:`No git history for your catalog directory.`,countMessages:`Messages`,countLocales:`Languages`,open:`Open`},oa={label:`Search your messages`,scope:`Searches your text in every language, never the key.`,none:`Nothing has that text, in any language.`,oneHit:`1 message`,hits:e=>`${e} messages`,moveKeys:`move`,openKeys:`open`,closeKeys:`close`,close:`Close`,placeholder:`Search the text, not the key`},$={mark:`Look`,live:`They are already on your site.`,written:e=>`A machine wrote ${e===1?`one of them`:`${e} of them`} and nobody has read ${e===1?`it`:`them`} yet.`,sound:`Nothing is broken: the check your build runs passes on this language.`,broken:e=>`${e} ${e===1?`breaks`:`break`} your site, so ${e===1?`it is`:`they are`} first.`,flagged:e=>`${e} ${e===1?`is`:`are`} worth reading before the rest, so ${e===1?`it is`:`they are`} at the top.`,clean:`Nothing in them looks off to me.`,approve:e=>`Mark all of ${e} as read`,approveSub:e=>`${e} unread, and it undoes`,nothingUnread:`Every one of them has been read.`,chipAll:`Everything`,chipLook:`Look`,chipClean:`Nothing odd`,rest:e=>`${e} more with nothing odd. They are below and you do not need to read them.`,order:`Sorted by what is worth reading first`},sa=K(`<span> </span>`),ca=K(`<li><button><span> </span> <!></button></li>`),la=K(`<button class="read svelte-l3e5c7"> <span class="n svelte-l3e5c7"> </span></button>`),ua=K(`<li><label><input type="checkbox" class="svelte-l3e5c7"/> <span class="meta svelte-l3e5c7"><span class="name svelte-l3e5c7"> <code class="svelte-l3e5c7"> </code></span> <span class="state svelte-l3e5c7"><b class="svelte-l3e5c7"> </b><!></span></span></label> <!></li>`),da=K(`<p class="undo svelte-l3e5c7"><span> </span> <button class="svelte-l3e5c7"> </button></p>`),fa=K(`<option> </option>`),pa=K(`<h2 class="cap svelte-l3e5c7"> </h2> <select class="groups svelte-l3e5c7"><option> </option><!></select>`,1),ma=K(`<li><button type="button"><span> </span> <span class="count svelte-l3e5c7"> </span></button></li>`),ha=K(`<nav class="rail svelte-l3e5c7" aria-label="Languages and filters"><ul class="views svelte-l3e5c7"></ul> <!> <h2 class="cap svelte-l3e5c7">Languages</h2> <ul class="langs svelte-l3e5c7"></ul> <!> <!> <h2 class="cap svelte-l3e5c7">Show</h2> <ul class="filters svelte-l3e5c7"></ul></nav>`);function ga(e,t){Le(t,!0);let n=[{id:`overview`,label:`Overview`},{id:`messages`,label:`Messages`},{id:`health`,label:`Health`}],r=[`all`,`look`,`clean`,`missing`,`draft`,`broken`];function i(e){if(e.source)return[`the one you write`];let t=[];return e.broken&&t.push(`${e.broken} ${e.broken===1?`breaks`:`break`} your site`),e.missing&&t.push(`${e.missing} missing`),e.draft&&t.push(`${e.draft} nobody has read`),t.length?t:[`all read`]}function a(e){let t=i(e);return{lead:t[0],rest:t.slice(1).join(` · `)}}function o(e){return e.source?`done`:e.broken?`broken`:e.missing?`missing`:e.draft?`draft`:`done`}var s=ha(),c=R(s);X(c,21,()=>n,e=>e.id,(e,n)=>{var r=ca(),i=R(r);let a;var o=R(i),s=z(o,!0),c=B(o,2),l=e=>{var n=sa();let r;var i=z(n,!0);V(()=>{r=Jr(n,1,`bad svelte-l3e5c7`,null,r,{clean:!t.checks.bad}),J(i,t.checks.bad||`ok`)}),q(e,n)};Y(c,e=>{W(n).id===`health`&&t.checks&&e(l)}),j(i),j(r),V(()=>{a=Jr(i,1,`nav svelte-l3e5c7`,null,a,{on:t.view===W(n).id}),Z(i,`aria-current`,t.view===W(n).id?`page`:void 0),J(s,W(n).label)}),G(`click`,i,()=>t.onView(W(n).id)),q(e,r)}),j(c);var l=B(c,2);Hr(l,()=>t.actions);var u=B(l,4);X(u,21,()=>t.health,e=>e.locale,(e,n,r,i)=>{let s=P(()=>a(W(n)));var c=ua(),l=R(c);let u;var d=R(l);oi(d);var f=B(d,2),p=R(f),m=R(p),h=z(B(m),!0);j(p);var g=B(p,2),_=R(g),v=z(_,!0),y=B(_),b=e=>{var t=Sr();V(()=>J(t,` · ${W(s).rest??``}`)),q(e,t)};Y(y,e=>{W(s).rest&&e(b)}),j(g),j(f),j(l);var x=B(l,2),S=e=>{var r=la(),i=R(r),a=z(B(i),!0);j(r),V(()=>{J(i,`Mark as read `),J(a,W(n).draft)}),G(`click`,r,()=>t.onRead(W(n).locale)),q(e,r)};Y(x,e=>{!W(n).source&&W(n).draft>0&&e(S)}),j(c),V((e,t,r)=>{u=Jr(l,1,`lang svelte-l3e5c7`,null,u,{source:W(n).source}),si(d,e),d.disabled=W(n).source,J(m,`${t??``} `),J(h,W(n).locale),Z(g,`data-state`,r),J(v,W(s).lead)},[()=>t.shown.includes(W(n).locale),()=>Ai(W(n).locale),()=>o(W(n))]),G(`change`,d,()=>t.onToggle(W(n).locale)),q(e,c)}),j(u);var d=B(u,2),f=e=>{var n=da(),r=R(n),i=z(r),a=B(r,2),o=z(a,!0);j(n),V(()=>{J(i,`${t.pending.keys.length??``} in ${t.pending.locale??``} marked as read`),J(o,$i)}),G(`click`,a,function(...e){t.onUndo?.apply(this,e)}),q(e,n)};Y(d,e=>{t.pending&&e(f)});var p=B(d,2),m=e=>{var n=pa(),r=$t(n),i=z(r,!0),a=B(r,2),o=R(a),s=z(o,!0);o.value=o.__value=``,X(B(o),17,()=>t.groups,e=>e.name,(e,t)=>{var n=fa(),r=z(n),i={};V(()=>{J(r,`${W(t).name??``} (${W(t).total??``})${W(t).broken+W(t).missing+W(t).draft>0?` · ${W(t).broken+W(t).missing+W(t).draft} to do`:``}`),i!==(i=W(t).name)&&(n.value=(n.__value=i)??``)}),q(e,n)}),j(a);var c;ei(a),V(()=>{J(i,Qi.cap),Z(a,`aria-label`,Qi.cap),J(s,Qi.all),c!==(c=t.group??``)&&(a.value=(a.__value=c)??``,$r(a,c))}),G(`change`,a,e=>t.onGroup(e.currentTarget.value||null)),q(e,n)};Y(p,e=>{t.groups.length&&e(m)});var h=B(p,4);X(h,20,()=>r,e=>e,(e,n)=>{var r=ma(),i=R(r);let a;var o=R(i),s=z(o,!0),c=z(B(o,2),!0);j(i),j(r),V(()=>{a=Jr(i,1,`svelte-l3e5c7`,null,a,{on:t.state===n}),J(s,Xi[n]),J(c,t.counts[n]??0)}),G(`click`,i,()=>t.onState(n)),q(e,r)}),j(h),j(s),q(e,s),Re()}fr([`click`,`change`]);var _a=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M5 11h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></svg>`),va=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M6 12.5 11 7l5 5.5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11 8v7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),ya=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M4.5 12.5c1.6-2.2 3.2-2.2 4.8 0s3.2 2.2 4.8 0 3.2-2.2 4.8 0" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),ba=xr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M11 6v6.4" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path><circle cx="11" cy="16" r="1.2" fill="currentColor"></circle></svg>`),xa=K(`<!> <span class="sr svelte-1fu82r1"> </span>`,1);function Sa(e,t){let n={done:`translated`,draft:`written by a machine`,missing:`not translated, shows in your source language`,broken:`breaks your site`};var r=xa(),i=$t(r),a=e=>{q(e,_a())},o=e=>{q(e,va())},s=e=>{q(e,ya())},c=e=>{q(e,ba())};Y(i,e=>{t.state===`done`?e(a):t.state===`missing`?e(o,1):t.state===`draft`?e(s,2):e(c,-1)});var l=z(B(i,2),!0);V(()=>J(l,n[t.state])),q(e,r)}function Ca(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function wa(e,t=``,n=Object.create(null)){for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;typeof i==`string`?n[e]=i:i&&typeof i==`object`&&!Array.isArray(i)&&wa(i,e,n)}return n}function Ta(e){let t={};for(let n of e.locales)t[n]=wa(e.catalogs[n]??{});let n=new Map;for(let t of e.check.broken)t.severity===`error`&&n.set(`${t.locale}\u0000${t.key}`,t.issue);let r=new Map;for(let[t,n]of Object.entries(e.drafts))r.set(t,new Set(n));let i=t[e.sourceLocale]??{},a=e.locales.filter(t=>t!==e.sourceLocale),o=Object.keys(i).map(o=>({key:o,source:i[o]??``,origins:Ca(e.origins,o)??[],cells:a.map(i=>{let a=Ca(t[i],o)??``,s=n.get(`${i}\u0000${o}`);return{locale:i,text:a,state:s?`broken`:a?r.get(i)?.has(o)?`draft`:`done`:`missing`,issue:s,reasons:Ca(e.triage?.[i],o)??[]}})}));return{root:e.root,scanning:e.scanning,sourceLocale:e.sourceLocale,locales:e.locales,rows:o,undefined:e.check.unknown??[],extra:e.check.extra??[],problems:e.problems}}function Ea(e){return e.locales.map(t=>{let n=e.rows.length;if(t===e.sourceLocale)return{locale:t,source:!0,total:n,done:n,draft:0,missing:0,broken:0};let r={done:0,draft:0,missing:0,broken:0};for(let n of e.rows){let e=n.cells.find(e=>e.locale===t);e&&r[e.state]++}return{locale:t,source:!1,total:n,...r}})}function Da(e,t){Object.assign(e,Ta(t))}function Oa(e,t,n){return e.rows.length?e.locales.length<2?`oneLocale`:t.length?n.length?null:`noMatch`:`pickOne`:`noCatalogs`}function ka(e,t){return e?t.length?null:`noFiles`:`scanOff`}function Aa(e){let t=e.indexOf(`.`);return t>0?e.slice(0,t):null}function ja(e,t){let n=new Set(t),r=new Map;for(let t of e){let e=Aa(t.key);if(e===null)continue;let i=r.get(e)??{name:e,total:0,broken:0,missing:0,draft:0};i.total+=1;for(let e of t.cells)n.has(e.locale)&&e.state!==`done`&&(i[e.state]+=1);r.set(e,i)}return[...r.values()].sort((e,t)=>e.name<t.name?-1:1)}function Ma(e,t){let n=t.text.trim().toLowerCase(),r=new Set(t.locales);return e.filter(e=>{let i=e.cells.filter(e=>r.has(e.locale));return t.state===`look`&&!i.some(e=>e.reasons.length)||t.state===`clean`&&i.some(e=>e.reasons.length)||t.state!==`all`&&t.state!==`look`&&t.state!==`clean`&&!i.some(e=>e.state===t.state)||t.group&&Aa(e.key)!==t.group?!1:!n||e.source.toLowerCase().includes(n)?!0:i.some(e=>e.text.toLowerCase().includes(n))})}var Na=[`broken`,`missing`,`draft`,`done`];function Pa(e){for(let t of Na)if(e.cells.some(e=>e.state===t))return t;return`done`}function Fa(e,t,n=40){let r=t.trim().toLowerCase();if(!r)return[];let i=[];for(let t of e.rows){let a=[];t.source.toLowerCase().includes(r)&&a.push(e.sourceLocale);for(let e of t.cells)e.text.toLowerCase().includes(r)&&a.push(e.locale);if(!a.length)continue;let o=a[0],s=o===e.sourceLocale?t.source:t.cells.find(e=>e.locale===o)?.text??``;if(i.push({key:t.key,group:Aa(t.key),source:t.source,locales:a,text:s,state:Pa(t)}),i.length===n)break}return i}function Ia(e,t){let n=t.trim(),r=e.toLowerCase().indexOf(n.toLowerCase());return r<0?[e,``,``]:[e.slice(0,r),e.slice(r,r+n.length),e.slice(r+n.length)]}function La(e,t){let n=[],r=[];for(let i of e)(i.cells.find(e=>e.locale===t)?.reasons.length?n:r).push(i);return{rows:[...n,...r],flagged:n.length}}function Ra(e,t){let n=e.cells.find(e=>e.locale===t);return n?.reasons.length?n.reasons.map(e=>e.text).join(`. `):null}var za=K(`<li> </li>`),Ba=K(`<ul class="files svelte-1dg5efm"></ul>`),Va=K(`<div class="menu svelte-1dg5efm" role="menu" tabindex="-1"><button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="m9 7-5 5 5 5"></path><path d="m15 7 5 5-5 5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Z"></path><path d="M14 3v5h5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M20 15a2 2 0 0 1-2 2H8l-4 3V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z"></path></svg> </button> <div class="msep svelte-1dg5efm"></div> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><circle cx="12" cy="12" r="8"></circle><path d="M12 7.5V12l3 1.8"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 5h5v5"></path><path d="m19 5-8 8"></path><path d="M18 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h4"></path></svg> <i class="svelte-1dg5efm"> </i></button> <!></div>`);function Ha(e,t){Le(t,!0);let n=I(void 0),r=I(Ht({top:-9999,left:-9999})),i=I(null),a=I(!1),o=P(()=>ka(t.scanning,t.row.origins)),s=P(()=>W(i)===null?Q.reading:W(i).commit?W(i).commit.sha:Q[W(i).reason??`nogit`]);function c(){let e=t.anchor.getBoundingClientRect(),i=W(n)?.offsetHeight??0,a=e.bottom+6,o=a+i>window.innerHeight?Math.max(8,e.top-i-6):a,s=Math.min(Math.max(8,e.right-308),window.innerWidth-308-8);L(r,{top:o,left:s},!0)}function l(e){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.cssText=`position:fixed;top:-1000px;opacity:0`,document.body.append(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return t.remove(),n}async function u(e,n){let r=!1;try{await navigator.clipboard.writeText(e),r=!0}catch{r=l(e)}t.onNote(r?n:Q.noClipboard),t.onClose(),t.anchor.focus()}function d(){return[...W(n)?.querySelectorAll(`[role="menuitem"]`)??[]]}function f(e){if(e.key===`Escape`||e.key===`Tab`){t.onClose(),t.anchor.focus();return}let n=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let r=d();r[(r.indexOf(document.activeElement)+n+r.length)%r.length]?.focus()}async function p(){L(a,!W(a)),await tr(),c()}gi(()=>{let e=!0;c(),d()[0]?.focus(),t.onCommit(t.row.key).then(n=>{e&&L(i,n??{key:t.row.key,commit:null,reason:`nogit`},!0)});let n=()=>t.onClose();return window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{e=!1,window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}});function m(e){let r=e.target;!W(n)?.contains(r)&&!t.anchor.contains(r)&&t.onClose()}var h=Va();dr(`pointerdown`,Gt,m);var g=R(h),_=B(R(g)),v=z(B(_),!0);j(g);var y=B(g,2),b=B(R(y)),x=z(B(b),!0);j(y);var S=B(y,2),ee=B(R(S));j(S);var C=B(S,4),w=B(R(C)),te=z(B(w),!0);j(C);var T=B(C,2),ne=B(R(T)),re=z(B(ne),!0);j(T);var ie=B(T,2),ae=e=>{var n=Ba();X(n,20,()=>t.row.origins,e=>e,(e,t)=>{var n=za(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(n),q(e,n)};Y(ie,e=>{W(a)&&W(o)===null&&e(ae)}),j(h),hi(h,e=>L(n,e),()=>W(n)),V(e=>{Z(h,`aria-label`,Q.open),Xr(h,`top:${W(r).top??``}px;left:${W(r).left??``}px`),Z(g,`aria-disabled`,t.locale===null),J(_,` ${Q.edit??``}`),J(v,t.locale??``),J(b,` ${Q.copyKey??``}`),J(x,t.row.key),J(ee,` ${Q.copySource??``}`),Z(C,`aria-disabled`,!W(i)?.commit),Z(C,`title`,e),J(w,` ${Q.commit??``}`),J(te,W(s)),Z(T,`aria-disabled`,W(o)!==null),Z(T,`aria-expanded`,W(o)===null?W(a):void 0),J(ne,` ${Q.origins??``}`),J(re,W(o)?Q[W(o)]:t.row.origins.length>1?`${t.row.origins[0]} +${t.row.origins.length-1}`:t.row.origins[0])},[()=>W(i)?.commit?`${W(i).commit.subject} · ${W(i).commit.author} · ${W(i).commit.date.slice(0,10)}`:void 0]),G(`keydown`,h,f),G(`click`,g,()=>t.locale===null?t.onNote(Q.nothingToEdit):t.onEdit()),G(`click`,y,()=>u(t.row.key,Q.copiedKey)),G(`click`,S,()=>u(t.row.source,Q.copiedSource)),G(`click`,C,()=>W(i)?.commit&&u(W(i).commit.sha,Q.copiedSha)),G(`click`,T,()=>W(o)===null&&p()),q(e,h),Re()}fr([`keydown`,`click`]);function Ua(e,t){for(let n of e)if(n.kind===`param`&&n.name){t.has(n.name)||t.set(n.name,new Set);for(let[e,r]of n.variants??[])t.get(n.name).add(e),Ua(r,t)}}function Wa(e){let t=new Map;try{Ua(Ii(e,Ni),t)}catch{}return t}function Ga(e,t){for(let n of e)typeof n!=`string`&&(t.push(n.name),Ga(n.children,t))}function Ka(e){let t=[];try{Ga(Ji(e),t)}catch{return t}return t}function qa(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return t}var Ja=e=>e.length===1?e[0]:`${e.slice(0,-1).join(`, `)} and ${e.at(-1)}`;function Ya(e,t){let n=Wa(e),r=Wa(t),i=[...new Set([...n.keys(),...r.keys()])].sort().map(e=>({name:e,inSource:n.has(e),inTarget:r.has(e)})),a=[],o=i.filter(e=>e.inSource&&!e.inTarget).map(e=>`{${e.name}}`),s=i.filter(e=>!e.inSource&&e.inTarget).map(e=>`{${e.name}}`);o.length&&a.push(`${Ja(o)} is missing, so its value never reaches the text`),s.length&&a.push(`${Ja(s)} is not in the source, so it renders as literal text`);for(let[e,t]of r)t.size&&!t.has(`other`)&&a.push(`the block for {${e}} has no "other" case, so some counts render empty`);let c=qa(Ka(e)),l=qa(Ka(t));for(let[e,t]of c)(l.get(e)??0)<t&&a.push(`<${e}> is missing from the translation`);for(let[e,t]of l)(c.get(e)??0)<t&&a.push(`<${e}> is not in the source message`);return{params:i,problems:a}}var Xa=K(`<span class="ojo svelte-2clsr"> </span>`),Za=K(`<span class="rmark svelte-2clsr"><!></span>`),Qa=K(`<span class="tile svelte-2clsr"><!></span>`),$a=K(`<span> </span>`),eo=K(`<span class="vmsg svelte-2clsr"> </span>`),to=K(`<span class="tl edit svelte-2clsr"><span class="disc svelte-2clsr"> </span> <textarea class="tf svelte-2clsr" rows="2"></textarea></span> <span class="editbar svelte-2clsr"><!> <!> <!> <button class="btn sm svelte-2clsr"> </button> <button class="btn sm quiet svelte-2clsr">Cancel</button> <span class="keys svelte-2clsr">Enter saves · Esc closes</span></span>`,1),no=K(`<button class="tv svelte-2clsr"> </button>`),ro=K(`<button class="tv none svelte-2clsr"> </button>`),io=K(`<span class="sig svelte-2clsr"> </span>`),ao=K(`<span class="tl svelte-2clsr"><span class="disc svelte-2clsr"> </span> <!> <!></span>`),oo=K(`<span class="why svelte-2clsr"> </span>`),so=K(`<article><!> <span class="row-t svelte-2clsr"><span class="src svelte-2clsr"> </span> <!></span> <!> <span><button class="ga svelte-2clsr" aria-haspopup="menu"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><circle cx="5.5" cy="12" r="1.4"></circle><circle cx="12" cy="12" r="1.4"></circle><circle cx="18.5" cy="12" r="1.4"></circle></svg></button></span></article> <!>`,1);function co(e,t){Le(t,!0);let n=I(void 0),r=P(()=>t.why!==void 0),i=P(()=>t.row.cells.filter(e=>t.shown.includes(e.locale))),a=P(()=>[`broken`,`missing`,`draft`,`done`].find(e=>W(i).some(t=>t.state===e))??`done`),o=I(``),s=I(!1),c=I(null),l=P(()=>Ya(t.row.source,W(o))),u=e=>`${e.locale} ${t.row.key}`;function d(e){L(o,e.text,!0),L(c,null),t.onEdit(u(e))}async function f(e){W(s)||(L(s,!0),L(c,await t.onSave(e.locale,t.row.key,W(o)),!0),L(s,!1),W(c)||t.onEdit(null))}function p(e,n){e.key===`Escape`&&t.onEdit(null),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),f(n))}var m=so(),h=$t(m);let g;var _=R(h),v=e=>{var n=Za(),r=R(n),i=e=>{var t=Xa(),n=z(t,!0);V(()=>J(n,$.mark)),q(e,t)};Y(r,e=>{t.why&&e(i)}),j(n),q(e,n)},y=e=>{var t=Qa();Sa(R(t),{get state(){return W(a)}}),j(t),V(()=>Z(t,`data-state`,W(a))),q(e,t)};Y(_,e=>{W(r)?e(v):e(y,-1)});var b=B(_,2),x=R(b),S=z(x,!0);X(B(x,2),17,()=>W(i),e=>e.locale,(e,n)=>{var i=Cr(),a=$t(i),m=e=>{var r=to(),i=$t(r),a=R(i),u=z(a,!0),d=B(a,2);Ye(d),Je(d,!0),j(i);var m=B(i,2),h=R(m);X(h,17,()=>W(l).params,e=>e.name,(e,t)=>{var n=$a();let r;var i=z(n);V(()=>{r=Jr(n,1,`pm svelte-2clsr`,null,r,{gone:W(t).inSource&&!W(t).inTarget}),J(i,`${W(t).inSource&&!W(t).inTarget?`+`:``}{${W(t).name??``}}`)}),q(e,n)});var g=B(h,2);X(g,16,()=>W(l).problems,e=>e,(e,t)=>{var n=eo(),r=z(n,!0);V(()=>J(r,t)),q(e,n)});var _=B(g,2),v=e=>{var t=eo(),n=z(t,!0);V(()=>J(n,W(c))),q(e,t)};Y(_,e=>{W(c)&&!W(l).problems.length&&e(v)});var y=B(_,2),b=z(y,!0),x=B(y,2);ye(2),j(m),V(()=>{Z(a,`data-state`,W(n).state),J(u,W(n).locale),Z(d,`aria-label`,`Translation for ${W(n).locale??``}`),y.disabled=W(s),J(b,W(s)?`Saving`:`Save`)}),G(`keydown`,d,e=>p(e,W(n))),di(d,()=>W(o),e=>L(o,e)),G(`click`,y,()=>f(W(n))),G(`click`,x,()=>t.onEdit(null)),q(e,r)},h=P(()=>t.editing===u(W(n))),g=e=>{var t=ao(),i=R(t),a=z(i,!0),o=B(i,2),s=e=>{var t=no(),r=z(t,!0);V(()=>{Z(t,`title`,W(n).text),J(r,W(n).text)}),G(`click`,t,()=>d(W(n))),q(e,t)},c=e=>{var t=ro(),r=z(t,!0);V(()=>J(r,Yi.missing.long)),G(`click`,t,()=>d(W(n))),q(e,t)};Y(o,e=>{W(n).text?e(s):e(c,-1)});var l=B(o,2),u=e=>{var t=Cr();X($t(t),17,()=>W(n).reasons,e=>e.signal,(e,t)=>{var n=io(),r=z(n,!0);V(()=>{Z(n,`title`,W(t).text),J(r,Zi[W(t).signal]??W(t).signal)}),q(e,n)}),q(e,t)};Y(l,e=>{W(r)||e(u)}),j(t),V(()=>{Z(i,`data-state`,W(n).state),J(a,W(n).locale)}),q(e,t)};Y(a,e=>{W(h)?e(m):e(g,-1)}),q(e,i)}),j(b);var ee=B(b,2),C=e=>{var n=oo(),r=z(n,!0);V(()=>J(r,t.why??``)),q(e,n)};Y(ee,e=>{W(r)&&e(C)});var w=B(ee,2);let te;var T=R(w);hi(T,e=>L(n,e),()=>W(n)),j(w),j(h);var ne=B(h,2),re=e=>{{let r=P(()=>W(i)[0]?.locale??null);Ha(e,{get row(){return t.row},get locale(){return W(r)},get scanning(){return t.scanning},get anchor(){return W(n)},get onNote(){return t.onNote},get onCommit(){return t.onCommit},onEdit:()=>{t.onMenu(!1),W(i)[0]&&d(W(i)[0])},onClose:()=>t.onMenu(!1)})}};Y(ne,e=>{t.menu&&W(n)&&e(re)}),V(e=>{g=Jr(h,1,`row svelte-2clsr`,null,g,{open:e,flagged:W(r)&&!!t.why}),Z(h,`data-worst`,W(a)),Z(h,`data-key`,t.row.key),J(S,t.row.source),te=Jr(w,1,`row-go svelte-2clsr`,null,te,{held:t.menu}),Z(T,`aria-expanded`,t.menu),Z(T,`aria-label`,Q.open)},[()=>W(i).some(e=>t.editing===u(e))]),G(`click`,T,()=>t.onMenu(!t.menu)),q(e,m),Re()}fr([`keydown`,`click`]);var lo=K(`<button> <b class="svelte-1u5fzi5"> </b></button>`),uo=K(`<header class="langbar svelte-1u5fzi5"><div class="text svelte-1u5fzi5"><h2 class="svelte-1u5fzi5"> </h2> <p class="live svelte-1u5fzi5"><span class="disc svelte-1u5fzi5"> </span> <b class="svelte-1u5fzi5"> </b></p> <p class="why svelte-1u5fzi5"> </p></div> <div class="go svelte-1u5fzi5"><button class="btn svelte-1u5fzi5"> </button> <span class="sub svelte-1u5fzi5"> </span></div></header> <div class="chips svelte-1u5fzi5"></div>`,1);function fo(e,t){Le(t,!0);let n=P(()=>Ai(t.locale)),r=P(()=>[t.unread>0?$.written(t.unread):$.nothingUnread,t.broken>0?$.broken(t.broken):$.sound,t.flagged>0?$.flagged(t.flagged):$.clean].join(` `)),i=P(()=>[{id:`all`,label:$.chipAll,n:t.total},{id:`look`,label:$.chipLook,n:t.flagged},{id:`clean`,label:$.chipClean,n:t.total-t.flagged}]);var a=uo(),o=$t(a),s=R(o),c=R(s),l=z(c,!0),u=B(c,2),d=R(u),f=z(d,!0),p=B(d),m=z(B(p),!0);j(u);var h=z(B(u,2),!0);j(s);var g=B(s,2),_=R(g),v=z(_,!0),y=z(B(_,2),!0);j(g),j(o);var b=B(o,2);X(b,21,()=>W(i),e=>e.id,(e,n)=>{var r=lo();let i;var a=R(r),o=z(B(a),!0);j(r),V(()=>{i=Jr(r,1,`pill svelte-1u5fzi5`,null,i,{on:t.chip===W(n).id,look:W(n).id===`look`}),Z(r,`aria-pressed`,t.chip===W(n).id),J(a,`${W(n).label??``} `),J(o,W(n).n)}),G(`click`,r,()=>t.onChip(W(n).id)),q(e,r)}),j(b),V((e,i,a)=>{J(l,W(n)),J(f,t.locale),J(p,`${e??``}. `),J(m,$.live),J(h,W(r)),_.disabled=t.unread===0,J(v,i),J(y,a)},[()=>na(t.total),()=>$.approve(W(n)),()=>t.unread>0?$.approveSub(t.unread):$.nothingUnread]),G(`click`,_,function(...e){t.onApprove?.apply(this,e)}),q(e,a),Re()}fr([`click`]);var po=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <p class="why svelte-a18sfu"> </p> <div class="pair svelte-a18sfu"><button class="go svelte-a18sfu"> </button> <button class="plain svelte-a18sfu"> </button></div></div>`),mo=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <div class="track svelte-a18sfu"><span class="fill svelte-a18sfu"></span></div> <p class="why svelte-a18sfu"> </p></div>`),ho=K(`<button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button> <button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button>`,1),go=K(`<p> </p>`),_o=K(`<section class="acts svelte-a18sfu" aria-label="Commands"><h2 class="cap svelte-a18sfu">Commands</h2> <!> <!></section>`);function vo(e,t){Le(t,!0);let n=I(Ht({at:`idle`})),r=P(()=>W(n).at===`finding`||W(n).at===`planning`||W(n).at===`running`);function i(e,t=!1){L(n,{at:`said`,text:e,bad:t},!0)}async function a(){L(n,{at:`finding`},!0);let e=await t.api.extract();if(e.error||!e.value)return i(e.error??`no answer`,!0);let{found:r}=e.value;if(!r)return i(ea.nothingNew);let a=`${na(r)} your code uses and your catalogs did not have`;await t.onDone(a),i(a)}async function o(){L(n,{at:`planning`},!0);let e=await t.api.plan(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);if(!e.value.total)return i(ea.nothingMissing);L(n,{at:`plan`,plan:e.value},!0)}async function s(e){let r=await t.api.job(e);if(r.error||!r.value)return i(r.error??`no answer`,!0);let a=r.value;if(a.state===`running`){L(n,{at:`running`,job:a},!0);return}let o=`${na(a.written??a.done)} translated, unread until you read them`,s=a.kept?`${o}. ${ea.kept(a.kept)}`:o;await t.onDone(s),i(a.state===`failed`?a.message??`the run failed`:s,a.state===`failed`)}async function c(){let e=await t.api.translate(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);L(n,{at:`running`,job:e.value},!0)}gi(()=>{t.api.job().then(e=>{e.value&&W(n).at===`idle`&&L(n,{at:`running`,job:e.value},!0)})}),fn(()=>{if(W(n).at!==`running`)return;let e=W(n).job.id,t=setInterval(()=>void s(e),1e3);return()=>clearInterval(t)});let l=P(()=>t.targets?t.shown.length?ea.translateWhy:ea.pickFirst:ea.onlyLocale),u=P(()=>W(n).at===`running`&&W(n).job.total?W(n).job.done/W(n).job.total:0);var d=_o(),f=B(R(d),2),p=e=>{var t=po(),r=R(t),i=z(r),a=B(r,2),o=z(a,!0),s=B(a,2),l=R(s),u=z(l,!0),d=B(l,2),f=z(d,!0);j(s),j(t),V((e,t)=>{J(i,`${e??``} in ${t??``}`),J(o,ea.translateWhy),J(u,ea.translate),J(f,ea.cancel)},[()=>na(W(n).plan.total),()=>Object.keys(W(n).plan.pending).join(`, `)]),G(`click`,l,c),G(`click`,d,()=>L(n,{at:`idle`},!0)),q(e,t)},m=e=>{var t=mo(),r=R(t),i=z(r),a=B(r,2),o=z(a),s=z(B(a,2));j(t),V(e=>{J(i,`${ea.running??``} ${W(n).job.locale??``??``}`),Xr(o,`width: ${e??``}%`),J(s,`${W(n).job.done??``} of ${W(n).job.total??``}`)},[()=>Math.round(W(u)*100)]),q(e,t)},h=e=>{var i=ho(),s=$t(i),c=R(s),u=z(c,!0),d=z(B(c,2),!0);j(s);var f=B(s,2),p=R(f),m=z(p,!0),h=z(B(p,2),!0);j(f),V(()=>{s.disabled=W(r)||!t.scanning,J(u,W(n).at===`finding`?ea.working:ea.find),J(d,t.scanning?ea.findWhy:ea.scanOff),f.disabled=W(r)||!t.shown.length,J(m,ea.translate),J(h,W(l))}),G(`click`,s,a),G(`click`,f,o),q(e,i)};Y(f,e=>{W(n).at===`plan`?e(p):W(n).at===`running`?e(m,1):e(h,-1)});var g=B(f,2),_=e=>{var t=go();let r;var i=z(t,!0);V(()=>{r=Jr(t,1,`said svelte-a18sfu`,null,r,{bad:W(n).bad}),J(i,W(n).text)}),q(e,t)};Y(g,e=>{W(n).at===`said`&&e(_)}),j(d),q(e,d),Re()}fr([`click`]);var yo=K(`<h2 class="svelte-1qmtve8"> </h2>`),bo=K(`<h2 class="svelte-1qmtve8"> </h2> <p class="svelte-1qmtve8"> </p>`,1),xo=K(`<code class="keys svelte-1qmtve8"> </code>`),So=K(`<button class="svelte-1qmtve8"> </button>`),Co=K(`<div class="job svelte-1qmtve8"><span class="tile svelte-1qmtve8"><!></span> <span class="what svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <span class="svelte-1qmtve8"> </span> <!></span> <!></div>`),wo=K(`<p class="empty svelte-1qmtve8">…</p>`),To=K(`<p class="empty svelte-1qmtve8"> </p>`),Eo=K(`<p class="commit svelte-1qmtve8"><code class="svelte-1qmtve8"> </code> <span class="svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><span class="svelte-1qmtve8"> </span></span></p>`),Do=K(`<main class="overview svelte-1qmtve8"><header class="svelte-1qmtve8"><span class="chip svelte-1qmtve8"> </span> <!></header> <div class="cols svelte-1qmtve8"><section class="jobs svelte-1qmtve8" aria-label="What needs you"></section> <aside class="side svelte-1qmtve8"><div class="card svelte-1qmtve8"><button class="ring svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <strong class="svelte-1qmtve8"> </strong> <span class="svelte-1qmtve8"> </span></button> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p></div> <div class="card svelte-1qmtve8"><p class="head svelte-1qmtve8"> </p> <!></div></aside></div></main>`);function Oo(e,t){Le(t,!0);let n={broken:`broken`,missing:`missing`,draft:`draft`,undefined:`broken`,extra:`missing`},r=new Set([`undefined`,`extra`]),i=P(()=>t.health.filter(e=>!e.source)),a=P(()=>{let e=e=>W(i).reduce((t,n)=>t+e(n),0);return[{id:`broken`,n:e(e=>e.broken)},{id:`missing`,n:e(e=>e.missing)},{id:`draft`,n:e(e=>e.draft)},{id:`undefined`,n:t.undefinedKeys.length},{id:`extra`,n:t.extraKeys.length}].filter(e=>e.n>0)}),o=P(()=>W(a).reduce((e,t)=>e+t.n,0)),s=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});function c(e){let t=Math.round((Date.parse(e)-Date.now())/864e5);return t>-1?s.format(0,`day`):t>-31?s.format(t,`day`):s.format(Math.round(t/30),`month`)}var l=Do(),u=R(l),d=R(u),f=z(d,!0),p=B(d,2),m=e=>{var t=yo(),n=z(t);V(()=>J(n,`${W(o)??``} ${W(o)===1?`thing is`:`things are`} waiting for you.`)),q(e,t)},h=e=>{var t=bo(),n=$t(t),r=z(n,!0),i=z(B(n,2),!0);V(()=>{J(r,aa.clear),J(i,aa.clearWhy)}),q(e,t)};Y(p,e=>{W(o)>0?e(m):e(h,-1)}),j(u);var g=B(u,2),_=R(g);X(_,21,()=>W(a),e=>e.id,(e,i)=>{var a=Co(),o=R(a);Sa(R(o),{get state(){return n[W(i).id]}}),j(o);var s=B(o,2),c=R(s),l=z(c),u=B(c,2),d=z(u,!0),f=B(u,2),p=e=>{var n=xo(),r=z(n,!0);V(e=>J(r,e),[()=>t.undefinedKeys.slice(0,3).map(e=>e.key).join(` · `)]),q(e,n)},m=e=>{var n=xo(),r=z(n,!0);V(e=>J(r,e),[()=>t.extraKeys.slice(0,3).map(e=>`${e.key} (${e.locale})`).join(` · `)]),q(e,n)};Y(f,e=>{W(i).id===`undefined`?e(p):W(i).id===`extra`&&e(m,1)}),j(s);var h=B(s,2),g=e=>{var n=So(),r=z(n,!0);V(()=>J(r,aa.open)),G(`click`,n,()=>t.onFilter(W(i).id)),q(e,n)},_=P(()=>!r.has(W(i).id));Y(h,e=>{W(_)&&e(g)}),j(a),V(()=>{Z(o,`data-state`,n[W(i).id]),J(l,`${W(i).n??``} ${(W(i).n===1?ra[W(i).id].one:ra[W(i).id].many)??``}`),J(d,ia[W(i).id])}),q(e,a)}),j(_);var v=B(_,2),y=R(v),b=R(y),x=R(b),S=z(x,!0),ee=B(x,2),C=z(ee,!0),w=z(B(ee,2),!0);j(b);var te=B(b,2),T=R(te),ne=z(T,!0),re=z(B(T),!0);j(te);var ie=B(te,2),ae=R(ie),oe=z(ae,!0),se=z(B(ae),!0);j(ie),j(y);var ce=B(y,2),le=R(ce),E=z(le,!0),ue=B(le,2),de=e=>{q(e,wo())},D=e=>{var t=To(),n=z(t,!0);V(()=>J(n,aa.noHistory)),q(e,t)},fe=e=>{var n=Cr();X($t(n),17,()=>t.commits,e=>e.sha,(e,t)=>{var n=Eo(),r=R(n),i=z(r,!0),a=B(r,2),o=R(a),s=z(o,!0),l=z(B(o));j(a),j(n),V(e=>{J(i,W(t).sha),J(s,W(t).subject),J(l,`${W(t).author??``} · ${e??``}`)},[()=>c(W(t).date)]),q(e,n)}),q(e,n)};Y(ue,e=>{t.commits===null?e(de):t.commits.length===0?e(D,1):e(fe,-1)}),j(ce),j(v),j(g),j(l),V(()=>{J(f,aa.here),b.disabled=!t.checks,J(S,aa.project),J(C,t.checks&&t.checks.ok===t.checks.total?aa.healthy:aa.problems),J(w,t.checks?`${t.checks.ok} of ${t.checks.total} ${aa.checks}`:`…`),J(ne,aa.countMessages),J(re,t.total),J(oe,aa.countLocales),J(se,t.locales.length),J(E,aa.history)}),G(`click`,b,function(...e){t.onHealth?.apply(this,e)}),q(e,l),Re()}fr([`click`]);var ko=K(`<p class="none svelte-1xn1b0j"> </p>`),Ao=K(`<span class="group svelte-1xn1b0j"> </span>`),jo=K(`<span class="src svelte-1xn1b0j"> </span>`),Mo=K(`<b class="disc svelte-1xn1b0j"> </b>`),No=K(`<li><button><span class="tile svelte-1xn1b0j"><!></span> <span class="what svelte-1xn1b0j"><span class="found svelte-1xn1b0j"> <mark class="svelte-1xn1b0j"> </mark> </span> <!> <!></span> <span class="where svelte-1xn1b0j"></span></button></li>`),Po=K(`<ul class="svelte-1xn1b0j"></ul>`),Fo=K(`<div class="sheet svelte-1xn1b0j" role="dialog"><p class="head svelte-1xn1b0j"><span> </span> <b class="svelte-1xn1b0j"> </b></p> <!> <p class="keys svelte-1xn1b0j"><kbd class="svelte-1xn1b0j">↑</kbd><kbd class="svelte-1xn1b0j">↓</kbd> <kbd class="svelte-1xn1b0j">enter</kbd> <kbd class="svelte-1xn1b0j">esc</kbd> <button class="close svelte-1xn1b0j"> </button></p></div>`);function Io(e,t){Le(t,!0);let n=I(0);fn(()=>{t.query,L(n,0)});function r(e){t.hits.length&&L(n,(W(n)+e+t.hits.length)%t.hits.length)}function i(){let e=t.hits[W(n)];e&&t.onPick(e.key)}var a={move:r,choose:i},o=Fo(),s=R(o),c=R(s),l=z(c,!0),u=z(B(c,2),!0);j(s);var d=B(s,2),f=e=>{var t=ko(),n=z(t,!0);V(()=>J(n,oa.none)),q(e,t)},p=e=>{var r=Po();X(r,23,()=>t.hits,e=>e.key,(e,r,i)=>{let a=P(()=>Ia(W(r).text,t.query));var o=No(),s=R(o);let c;var l=R(s);Sa(R(l),{get state(){return W(r).state}}),j(l);var u=B(l,2),d=R(u),f=R(d,!0),p=B(f),m=z(p,!0),h=B(p,1,!0);j(d);var g=B(d,2),_=e=>{var t=Ao(),n=z(t,!0);V(()=>J(n,W(r).group)),q(e,t)};Y(g,e=>{W(r).group&&e(_)});var v=B(g,2),y=e=>{var t=jo(),n=z(t,!0);V(()=>J(n,W(r).source)),q(e,t)},b=P(()=>!W(r).locales.includes(t.sourceLocale));Y(v,e=>{W(b)&&e(y)}),j(u);var x=B(u,2);X(x,20,()=>W(r).locales,e=>e,(e,t)=>{var n=Mo(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(x),j(s),j(o),V(()=>{c=Jr(s,1,`hit svelte-1xn1b0j`,null,c,{on:W(i)===W(n)}),Z(l,`data-state`,W(r).state),J(f,W(a)[0]),J(m,W(a)[1]),J(h,W(a)[2])}),G(`click`,s,()=>t.onPick(W(r).key)),q(e,o)}),j(r),q(e,r)};Y(d,e=>{t.hits.length===0?e(f):e(p,-1)});var m=B(d,2),h=B(R(m),2),g=B(h,2),_=B(g,2),v=B(_),y=z(v,!0);return j(m),j(o),V(e=>{Z(o,`aria-label`,oa.label),J(l,oa.scope),J(u,e),J(h,`${oa.moveKeys??``} `),J(g,`${oa.openKeys??``} `),J(_,`${oa.closeKeys??``} `),J(y,oa.close)},[()=>t.hits.length===1?oa.oneHit:oa.hits(t.hits.length)]),G(`click`,v,function(...e){t.onClose?.apply(this,e)}),q(e,o),Re(a)}fr([`click`]);var Lo=K(`<li><code> </code> </li>`),Ro=K(`<ul class="problems svelte-1xn7ig5"></ul>`),zo=K(`<p class="note svelte-1xn7ig5"> </p>`),Bo=K(`<!> <!>`,1),Vo=K(`<div class="lens svelte-1xn7ig5"><!> <main class="table svelte-1xn7ig5"><!></main></div>`),Ho=K(`Saved in <code> </code>`,1),Uo=K(`<p class="snack svelte-1xn7ig5" role="status"><svg viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1xn7ig5"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg> <!> <button class="svelte-1xn7ig5">Dismiss</button></p>`),Wo=K(`<div class="shell svelte-1xn7ig5"><header class="bar svelte-1xn7ig5"><span class="brand svelte-1xn7ig5">verbaly <b class="svelte-1xn7ig5">studio</b></span> <input class="search svelte-1xn7ig5" type="search"/> <span class="root svelte-1xn7ig5"> </span></header> <!> <!> <div class="body svelte-1xn7ig5"><!> <!></div> <!></div>`);function Go(e,t){Le(t,!0);let n=I(null),r=I(null),i=I(null),a=I(`overview`),o=I(null),s=I(null),c=I(null),l=new Map;async function u(e){let n=l.get(e);if(n)return n;let i=await t.api.commit(e);return i.error||!i.value?(L(r,{text:i.error??`[verbaly] the server sent no answer`,file:``},!0),null):(l.set(e,i.value),i.value)}function d(e){e===`health`?f():L(a,e,!0)}async function f(){L(a,`health`);let e=await t.api.health();e.error?L(r,{text:e.error,file:``},!0):e.value&&L(o,e.value,!0)}fn(()=>{t.api.health().then(e=>{e.value&&L(o,e.value,!0)}),t.api.history().then(e=>{L(s,e.value?.commits??[],!0)})});function p(e){L(y,W(x),!0),L(_,e,!0),L(a,`messages`)}async function m(e){let a=await t.api.state();if(a.error||!a.value){L(r,{text:a.error??`[verbaly] the server sent no state`,file:``},!0);return}L(n,null),L(i,null),L(c,null),l.clear(),Da(t.panel,a.value),L(r,{text:e,file:``},!0);let s=await t.api.health();s.value&&L(o,s.value,!0)}async function h(e,n,a){let o=await t.api.setRead(e,n,a);if(o.error){L(r,{text:o.error,file:``},!0);return}let s=new Set(o.value?.keys??[]);for(let n of t.panel.rows){if(!s.has(n.key))continue;let t=n.cells.find(t=>t.locale===e);t?.text&&(t.state=a?`draft`:`done`)}L(i,a?null:{locale:e,keys:o.value?.keys??[]},!0)}async function g(e,n,i){let a=await t.api.save(e,n,i);if(a.error)return a.error;let o=t.panel.rows.find(e=>e.key===n)?.cells.find(t=>t.locale===e);return o&&(o.text=i,o.state=i?`done`:`missing`,o.issue=void 0),L(r,{text:i,file:`${e}.json`},!0),null}let _=I(`all`),v=I(``),y=I(null),b=I(null),x=P(()=>t.panel.locales.filter(e=>e!==t.panel.sourceLocale)),S=P(()=>W(y)??W(x).slice(0,1)),ee=P(()=>Ea(t.panel)),C=P(()=>W(S).length===1?W(S)[0]:null),w=P(()=>W(C)?W(ee).find(e=>e.locale===W(C)):void 0),te=P(()=>W(C)?t.panel.rows.filter(e=>Ra(e,W(C))!==null).length:0),T=P(()=>W(_)===`look`?`look`:W(_)===`clean`?`clean`:W(_)===`all`?`all`:null),ne=P(()=>Fa(t.panel,W(v))),re=I(void 0),ie=I(void 0),ae=I(null),oe=P(()=>ja(t.panel.rows,W(S))),se=P(()=>{let e=Ma(t.panel.rows,{text:``,state:W(_),locales:W(S),group:W(b)});return W(C)?La(e,W(C)).rows:e}),ce=P(()=>Oa(t.panel,W(S),W(se))),le=P(()=>{let e={all:0,look:0,clean:0,missing:0,draft:0,broken:0};for(let n of[`all`,`look`,`clean`,`missing`,`draft`,`broken`])e[n]=Ma(t.panel.rows,{text:``,state:n,locales:W(S),group:W(b)}).length;return e}),E=I(60);fn(()=>{W(_),W(S),W(b),L(E,60)});function ue(e){L(v,``),L(_,`all`),L(b,null),L(y,W(x),!0),L(a,`messages`),L(ae,e,!0)}fn(()=>{if(!W(ae))return;let e=W(ae),t=W(se).findIndex(t=>t.key===e);t<0?L(ae,null):t+1>W(E)?L(E,t+1):(L(ae,null),tr().then(()=>{document.querySelector(`[data-key="${CSS.escape(e)}"]`)?.scrollIntoView({block:`center`})}))});function de(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`?(e.preventDefault(),W(ie)?.focus(),W(ie)?.select()):W(v)&&(e.key===`Escape`?(L(v,``),W(ie)?.blur()):e.key===`ArrowDown`?(e.preventDefault(),W(re)?.move(1)):e.key===`ArrowUp`?(e.preventDefault(),W(re)?.move(-1)):e.key===`Enter`&&(e.preventDefault(),W(re)?.choose()))}function D(e){let t=e.currentTarget;t.scrollTop+t.clientHeight>t.scrollHeight-600&&W(E)<W(se).length&&L(E,W(E)+60)}function fe(e){L(y,W(S).includes(e)?W(S).filter(t=>t!==e):[...W(S),e],!0)}var pe=Wo();dr(`keydown`,Gt,de);var me=R(pe),he=B(R(me),2);oi(he),hi(he,e=>L(ie,e),()=>W(ie));var ge=B(he,2),O=z(ge,!0);j(me);var _e=B(me,2),k=e=>{var n=Ro();X(n,21,()=>t.panel.problems,e=>e.scope+e.message,(e,t)=>{var n=Lo(),r=R(n),i=z(r,!0),a=B(r);j(n),V(()=>{J(i,W(t).scope),J(a,` ${W(t).message??``}`)}),q(e,n)}),j(n),q(e,n)};Y(_e,e=>{t.panel.problems.length&&e(k)});var A=B(_e,2),ve=e=>{hi(Io(e,{get query(){return W(v)},get hits(){return W(ne)},get sourceLocale(){return t.panel.sourceLocale},onPick:ue,onClose:()=>L(v,``)}),e=>L(re,e,!0),()=>W(re))};Y(A,e=>{W(v)&&e(ve)});var ye=B(A,2),be=R(ye);{let e=e=>{vo(e,{get api(){return t.api},get scanning(){return t.panel.scanning},get targets(){return W(x).length},get shown(){return W(S)},onDone:m})},n=P(()=>W(o)?{bad:W(o).entries.filter(e=>e.level!==`ok`).length}:null);ga(be,{get health(){return W(ee)},get shown(){return W(S)},get state(){return W(_)},get counts(){return W(le)},get pending(){return W(i)},get checks(){return W(n)},onToggle:fe,onState:e=>L(_,e,!0),onRead:e=>h(e,void 0,!1),onUndo:()=>W(i)&&h(W(i).locale,W(i).keys,!0),get view(){return W(a)},onView:d,get groups(){return W(oe)},get group(){return W(b)},onGroup:e=>L(b,e,!0),actions:e,$$slots:{actions:!0}})}var xe=B(be,2),Se=e=>{{let n=P(()=>W(o)?{ok:W(o).entries.filter(e=>e.level===`ok`).length,total:W(o).entries.length}:null);Oo(e,{get health(){return W(ee)},get undefinedKeys(){return t.panel.undefined},get extraKeys(){return t.panel.extra},get locales(){return t.panel.locales},get total(){return t.panel.rows.length},get checks(){return W(n)},get commits(){return W(s)},onFilter:p,onHealth:f})}},Ce=e=>{{let t=P(()=>W(o)?.entries??[]),n=P(()=>W(o)?.ok??!0);Ci(e,{get entries(){return W(t)},get ok(){return W(n)},onClose:()=>L(a,`overview`)})}},we=e=>{var i=Vo(),a=R(i),o=e=>{fo(e,{get locale(){return W(C)},get total(){return t.panel.rows.length},get unread(){return W(w).draft},get broken(){return W(w).broken},get flagged(){return W(te)},get chip(){return W(T)},onChip:e=>L(_,e,!0),onApprove:()=>h(W(C),void 0,!1)})};Y(a,e=>{W(C)&&W(w)&&!W(ce)&&e(o)});var s=B(a,2),l=R(s),d=e=>{var t=zo(),n=z(t);V(()=>J(n,`${ta[W(ce)]??``}${W(ce)===`oneLocale`?` ${ta.oneLocaleFix}`:``}`)),q(e,t)},f=e=>{var i=Bo(),a=$t(i);X(a,17,()=>W(se).slice(0,W(E)),e=>e.key,(e,i)=>{{let a=P(()=>W(C)?Ra(W(i),W(C)):void 0),o=P(()=>W(c)===W(i).key);co(e,{get row(){return W(i)},get shown(){return W(S)},get editing(){return W(n)},onEdit:e=>L(n,e,!0),onSave:g,get why(){return W(a)},get scanning(){return t.panel.scanning},get menu(){return W(o)},onMenu:e=>L(c,e?W(i).key:null,!0),onNote:e=>L(r,{text:e,file:``},!0),onCommit:u})}});var o=B(a,2),s=e=>{var t=zo(),n=z(t,!0);V(e=>J(n,e),[()=>W(C)?$.rest(W(se).length-W(E)):`${W(se).length-W(E)} more below`]),q(e,t)};Y(o,e=>{W(E)<W(se).length&&e(s)}),q(e,i)};Y(l,e=>{W(ce)?e(d):e(f,-1)}),j(s),j(i),dr(`scroll`,s,D),q(e,i)};Y(xe,e=>{W(a)===`overview`?e(Se):W(a)===`health`?e(Ce,1):e(we,-1)}),j(ye);var Te=B(ye,2),Ee=e=>{var t=Uo(),n=B(R(t),2),i=e=>{var t=Ho(),n=z(B($t(t)),!0);V(()=>J(n,W(r).file)),q(e,t)},a=e=>{var t=Sr();V(()=>J(t,W(r).text)),q(e,t)};Y(n,e=>{W(r).file?e(i):e(a,-1)});var o=B(n,2);j(t),G(`click`,o,()=>L(r,null)),q(e,t)};Y(Te,e=>{W(r)&&e(Ee)}),j(pe),V(()=>{Z(he,`placeholder`,oa.placeholder),Z(he,`aria-label`,oa.placeholder),Z(ge,`title`,t.panel.root),J(O,t.panel.root)}),di(he,()=>W(v),e=>L(v,e)),q(e,pe),Re()}fr([`click`]);async function Ko(e,t,n){let r=t.includes(`?`)?`&`:`?`,i;try{i=await fetch(`${t}${r}t=${encodeURIComponent(e)}`,{...n,headers:n?.body===void 0?void 0:{"content-type":`application/json`},body:n?.body===void 0?void 0:JSON.stringify(n.body)})}catch{return{error:`[verbaly] the studio server is not answering, is it still running?`}}let a=await i.json().catch(()=>({}));return i.ok?{value:a}:{error:a.error??`[verbaly] the server answered ${i.status}`}}function qo(e){return{state:()=>Ko(e,`/api/state`),health:()=>Ko(e,`/api/health`),history:()=>Ko(e,`/api/history`),commit:t=>Ko(e,`/api/commit/${encodeURIComponent(t)}`),save:(t,n,r)=>Ko(e,`/api/message/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:`PUT`,body:{text:r}}),setRead:(t,n,r)=>Ko(e,`/api/approve`,{method:`POST`,body:{locale:t,keys:n,undo:r}}),extract:()=>Ko(e,`/api/extract`,{method:`POST`}),plan:t=>{let n=t.map(e=>`locale=${encodeURIComponent(e)}`).join(`&`);return Ko(e,`/api/translate${n?`?${n}`:``}`)},translate:t=>Ko(e,`/api/translate`,{method:`POST`,body:{locales:t}}),job:t=>Ko(e,t?`/api/job/${encodeURIComponent(t)}`:`/api/job`)}}function Jo(e){return Ht(Ta(e))}var Yo=new URLSearchParams(location.search).get(`t`)??``;async function Xo(){let e=document.getElementById(`app`),t=qo(Yo),n=await t.state();n.error||!n.value?e.textContent=n.error??`[verbaly] the server sent no state`:Or(Go,{target:e,props:{panel:Jo(n.value),api:t}})}Xo();
|